ActiveRecord acting weird
I got this out of a book so I'm pretty sure it should work:
class Folder < ActiveRecord::Base
errors.add("folder by that name exists")
but when I validate:
f = Folder.find_by_name("New Folder")
<%= f.valid? %>
I get this:
undefined method `find_by_name' for #<Folder:0x40a125f4>
|All times are GMT. The time now is 12:39 PM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.