2008年11月19日 星期三

validate,class,define_method,exists?,[],array

http://api.rubyonrails.org/classes/ActiveRecord/Validations/ClassMethods.html#M001640
http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M001701



Possible gotcha: You can‘t pass in a condition as a string e.g. "name = ‘Jamie’", this would be sanitized and then queried against the primary key column as "id = ‘name = \’Jamie"


原來這種要這樣設

沒有留言: