Instead of to_xml and as_json, simply implement to_api. Return an unformatted hash. Let the model understand the data. Let the controller understand the format. In Rails, the controller can simply call render :xml => model.to_api or render :json => model.to_api.
☆16Jan 20, 2017Updated 9 years ago
Alternatives and similar repositories for to_api
Users that are interested in to_api are comparing it to the libraries listed below. We may earn a commission when you buy through links labeled 'Ad' on this page.
Sorting:
- Wrapping Objection in RubyMotion.☆25Jan 14, 2015Updated 11 years ago
- An action RPG created in Ruby☆22May 3, 2013Updated 13 years ago
- Random-access directory storage in your shell. Navigate deep project hierarchies super fast. The root of your current project is just a '…☆25Jul 4, 2026Updated last month
- A small Objective-C wrapper around GCD☆30Sep 24, 2012Updated 13 years ago
- A collection of strategies for Warden☆19Mar 1, 2010Updated 16 years ago
- Managed hosting for WordPress and PHP on Cloudways • AdManaged hosting for WordPress, Magento, Laravel, or PHP apps, on multiple cloud providers. Deploy in minutes on Cloudways by DigitalOcean.
- Nice-FFI: Convenience layer atop Ruby-FFI☆23Jul 8, 2015Updated 11 years ago
- Palmist☆17May 13, 2008Updated 18 years ago
- ☆10Nov 25, 2022Updated 3 years ago
- Simple implementation of the technology behind SimCity 5 (GlassBox)☆15Jul 16, 2013Updated 13 years ago
- Write Ruby extensions with Crystal☆12Jan 18, 2016Updated 10 years ago
- Little Fortune Planet LD38 Jam entry☆10May 20, 2017Updated 9 years ago
- Ludum Dare 38 Jam submission☆10Oct 24, 2022Updated 3 years ago
- MOVED TO https://github.com/pry/pry-stack_explorer☆18Nov 29, 2015Updated 10 years ago
- Simple Ruby trees☆18Apr 14, 2010Updated 16 years ago
- Bare Metal GPUs on DigitalOcean Gradient AI • AdPurpose-built for serious AI teams training foundational models, running large-scale inference, and pushing the boundaries of what's possible.
- particle attractor, multiverse, ruby game programming tutorial & 2d engine☆15Jul 6, 2009Updated 17 years ago
- Hamcrest - library of matchers for building test expressions - for Objective-C.☆25Sep 8, 2011Updated 14 years ago
- Ruby wrapper for the CheddarGetter API☆27Jan 11, 2011Updated 15 years ago
- Multiplayer same-screen action shooter.☆15Oct 19, 2022Updated 3 years ago
- Ruby gem to generate excerpts from html formatted text. Great for blogs.☆28Jan 28, 2020Updated 6 years ago
- An ActiveRecord database adapter that allows you to setup a "master/slave" environment☆99Nov 9, 2009Updated 16 years ago
- A Rails plugin to track database queries.☆37Dec 1, 2008Updated 17 years ago
- Rack middleware which embeds small images as base64 data-url in css/html files if the browser supports it☆16Feb 2, 2018Updated 8 years ago
- Set of Rails helpers for unobtrusive frontend validations using HTML5 attributes, Rails 3 validators and JavaScript.☆112Oct 26, 2010Updated 15 years ago
- Proton VPN Special Offer - Get 70% off • AdSpecial partner offer. Trusted by over 100 million users worldwide. Tested, Approved and Recommended by Experts.
- A* pathfinding in Ruby☆19Mar 20, 2013Updated 13 years ago
- ☆13Aug 4, 2016Updated 10 years ago
- Content for Strange Loop 2014 workshop☆23Mar 2, 2015Updated 11 years ago
- Explore Ruby Audio through examples using libraries from various authors☆15Jan 4, 2010Updated 16 years ago
- Ruby-FFI binding to SDL multimedia libraries. (Still in alpha)☆16Mar 6, 2011Updated 15 years ago
- This Rails plugin/gem allows you to generate virtual boolean attributes, which get saved in the database as a single bitset integer.☆23Feb 6, 2011Updated 15 years ago
- Updated build/specs for ruby-1.9.3☆15Jan 18, 2012Updated 14 years ago
- rendering views via HTML::Pipeline in Rails☆20Aug 14, 2017Updated 9 years ago
- Ruby client for the Posterous API☆23May 4, 2016Updated 10 years ago
- Wordpress hosting with auto-scaling - Free Trial Offer • AdFully Managed hosting for WordPress and WooCommerce businesses that need reliable, auto-scalable performance. Cloudways SafeUpdates now available.
- Developer-Friendly, In-Browser Presentation Software with auto-resize and syntax highlighting☆17Oct 25, 2014Updated 11 years ago
- Small ruby code snippets for Raspberry Pi peripherals from Adafruit☆16Jul 27, 2015Updated 11 years ago
- A small utility to get the colors of an image.☆15Apr 15, 2011Updated 15 years ago
- Ory Hydra / Next.js reference implementation (TypeScript)☆13Jul 16, 2022Updated 4 years ago
- Currently just a growing skeleton for roguelike game being written in ruby (NCurses interface) and tested with RSpec☆16Dec 15, 2008Updated 17 years ago
- An interface for performing queries in MongoDB using query string parameters.☆15Jun 27, 2013Updated 13 years ago
- has_browser makes it possible to create simple, parameterized browser interfaces to your models. That is, given a set of parameters, retu…☆16Jun 21, 2008Updated 18 years ago