
Ruby on Rails
Sample REST API in Rails | codedecoder
I have tried to define and explain API in this post. I again, put it in simple words “ API is program which let the user to use methods of your application from outside the application “. I will create a REST API here which will implement CRUD ( create, read, update, delete ) operation on users table from outside the application. I assume you all have implemented CRUD for user in your application. The API implementation will remain same, with below difference.American Date Parsing
Wave the flag! I recently ran into an interesting issue while working on a Rails 3, Ruby 1.9.3 project. My needs were simple: I had a single text field that allowed the user to enter a date in MM/DD/YYYY format.How I learned to test my Rails applications, Part 3: Model specs
March 19, 2012 We’ve got all the tools we need for building a solid, reliable test suite—now it’s time to put them to work. We’ll get started with the app’s core building blocks—its models.Auditing via paper_trail (change history) · gregbell/active_admin Wiki
Transactions In Rails - Mark Daggett's Blog
Rails Nested Form with Has Many Through Association (Part 2) | IqbalFarabi.net
What about editing? I create this post to answer Pierre’s question in the comment section in my previous tutorial here . The edit part is actually not much different from the new part. Therefore, I wanted to just edit that previous post. But somehow, there is something wrong with my blog, I could not update that post. Well, I tried this and that and nothing worked while my lunch time is almost over now.Delete .svn folders on your Mac | Andrey's Daily Light and Shadow | Photo Blog
Efficient Updates & Data Import in Rails
By Ilya Grigorik on July 11, 2007 /* Typical ActiveRecord insert * number of records = slow */ mysql > insert into widgets ( title , price ) values ( 'gizmo' , 5 ); Query OK , 1 row affected ( 0 . 01 sec ) /* Multi-record insert with ar-extensions * 1 insert = fast */ mysql > insert into widgets ( title , price ) values ( 'gizmo' , 5 ),( 'super-gizmo' , 10 ),( 'hammer' , 6 ); Query OK , 3 rows affected ( 0 . 01 sec ) Records : 3 Duplicates : 0 Warnings : 0 ActiveRecord is a fantastic database abstraction layer and is rightfully one of the core pillars of Rails, but that doesn't mean we can't improve it.activerecord-import activerecord-import is a library for bulk inserting data using ActiveRecord. Note: activerecord-import requires Rails 3.×. It does not work with Rails 2.×.

