RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: zwarburg
When I got to the 2 minute mark, at the page refresh, I got the following error: 'undefined method write_inheritable_attribute' for #<Class:0x007fccb5cd1c50>. Additionally it points to line 1:
write_inheritable_attribute' for #<Class:0x007fccb5cd1c50>
1: <%- model_class = Factoid -%> 2: <div class="page-header"> 3: <h1><%=t '.title', :default => [:'helpers.titles.edit', 'Edit %{model}'], :model => model_class.model_name.human.titleize %></h1> 4: </div>
The Model:
class Factoid < ActiveRecord::Base attr_accessible :description, :name, :title, :tag_list acts_as_taggable validates_presence_of :description, :name, :title validates_uniqueness_of :title UNRANSACKABLE_ATTRIBUTES = ["id", "updated_at"] def self.ransackable_attributes auth_object = nil (column_names - UNRANSACKABLE_ATTRIBUTES) + _ransackers.keys end end
When I got to the 2 minute mark, at the page refresh, I got the following error: 'undefined method
write_inheritable_attribute' for #<Class:0x007fccb5cd1c50>
. Additionally it points to line 1:The Model: