Skip to content

Instantly share code, notes, and snippets.

@madhums madhums/minifind.rb
Created Nov 12, 2010

Embed
What would you like to do?
mini-find - this will save a few key strokes!
class << ActiveRecord::Base
alias_method :[], :find
end
@post = Post[5]
@post = Post[:first]
@post = Post[:all, :conditions => { :name => "first post" }]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.