Shortcut for find method in rails

/ Published in: Ruby
Save to your folder(s)

Put this in environment.rb to use in your whole app or the console

Copy this code and paste it in your HTML
  1. class <<ActiveRecord::Base
  2. alias_method :[], :find
  3. end


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.