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
- 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.
- Jumprope-based local content store☆55Mar 17, 2013Updated 13 years ago
- 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
- 1-Click AI Models by DigitalOcean Gradient • AdDeploy popular AI models on DigitalOcean Gradient GPU virtual machines with just a single click. Zero configuration with optimized deployments.
- Simple Ruby trees☆18Apr 14, 2010Updated 16 years ago
- A CLI app for getting the weather forecast using forecast.io's API.☆15Apr 21, 2015Updated 11 years ago
- particle attractor, multiverse, ruby game programming tutorial & 2d engine☆15Jul 6, 2009Updated 17 years ago
- Calculations around the National Retail Federation's 4-5-4 calendar☆14Updated this week
- 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
- Snelps is a RTS written in Rubygame☆15May 31, 2012Updated 14 years ago
- A Ruby gem for streaming remote files one line at a time☆12Jul 27, 2026Updated 2 weeks 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.
- 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
- A* pathfinding in Ruby☆19Mar 20, 2013Updated 13 years ago
- ☆13Aug 4, 2016Updated 10 years ago
- Ruby-FFI binding to SDL multimedia libraries. (Still in alpha)☆16Mar 6, 2011Updated 15 years ago
- A game made entirely in Ruby. They said it couldn't be done, so I did it anyway :)☆16Nov 25, 2017Updated 8 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
- 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.
- RTS game engine for Atomic Games☆24Nov 9, 2024Updated last year
- Updated build/specs for ruby-1.9.3☆15Jan 18, 2012Updated 14 years ago
- rendering views via HTML::Pipeline in Rails☆20Aug 14, 2017Updated 8 years ago
- Ruby client for the Posterous API☆23May 4, 2016Updated 10 years ago
- 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