Get updates


Scott Q&A: How to Customize Rails to_json output?

Rails has a bunch of JavaScript helpers, but once you move beyond those and want to write your own JavaScript code for your application, you may find yourself dealing with some JSON produced on the server-side.

By default, the to_json method in Rails is probably a lot more verbose than most people want. I’ll share a few tips on how to tame it.

Question: How can I slim down the output of to_json in Rails?

Continue Reading…

3DM Design is where Scott Drake publishes thoughts on programming web applications in JavaScript and Ruby.

Fatal error: Uncaught Error: Call to undefined function ereg_replace() in /home/dmetro/ Stack trace: #0 /home/dmetro/ akpc_is_searcher() #1 /home/dmetro/ akpc_api_footer_javascript('') #2 /home/dmetro/ WP_Hook->apply_filters(NULL, Array) #3 /home/dmetro/ WP_Hook->do_action(Array) #4 /home/dmetro/ do_action('wp_footer') #5 /home/dmetro/ wp_footer() #6 /home/dmetro/ require_once('/home/dmetro/3d...') #7 /home/dmetro/ load_template('/home/dmetro/3d...', true) #8 /home/dmetro/ locate_t in /home/dmetro/ on line 2531