Rails’ ORM layer, ActiveRecord, is an elegant solution for keeping model code simple and modular (aka DRY). Demystifying the way Ruby-on-Rails uses runtime method generation opens a doorway for understanding and provides a foundation for the other ways Rails uses simple conventions to allow sophisticated, concise functionality in a declarative style.
Here is big mystery that you’ll be equipped to understand better after playing with the slides
-> If honeys is an array - and honeys has a method create! - then why does an array object [] not have create!
Hive.first.honeys.class
=> Array
[].create!
=> NoMethodError
Hive.first.honeys.create!
ruby
ruby on rails
activerecord
orm
blazingcloud
ActiveRecord query syntax on steroids.
Presented at the Ruby Drink-up of Sophia Antipolis on the 4th of October 2011 by Pierre Schambacher (@PierreSchambac).
http://rivierarb.fr/2011/10/04/Drinkup/
ruby
rails
activerecord
orm
sophia
rivierarb
metawhere
Object-relational mappers, or ORMs, enable rapid software development by allowing application developers to treat database entities similar to objects within an application. This can increase productivity drastically, but has unfortunate implications for DBAs and anyone who actually looks at data created by the application. This talk will help DBAs, Developers-turned-DBAs, and anyone in between understand how to leverage and limit, as necessary, ORMs. The talk will cover what types of data ORMs are really great for, and how to look for and understand the nuances that may impact performance or compromise data integrity in an application.
rails
activerecord
postgresql
databases
orms
inheritance
pgsql