Posted By

winson on 04/30/07


Tagged

textmate method model alias


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

webstic


More simple finder


 / Published in: Rails
 

  1. class << ActiveRecord::Base
  2. # Use 'Book[params[:id]]'
  3. # instead of # Let 'Book.find params[:id]'.
  4. alias_method :[], :find
  5. end

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: on October 26, 2018

the 8 best air purifier for cigarette smoke the 8 best air purifier for cigarette smoke 577

You need to login to post a comment.