/ Published in: Rails
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
class << ActiveRecord::Base # Use 'Book[params[:id]]' # instead of # Let 'Book.find params[:id]'. alias_method :[], :find end