Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Zack Warburg's Profile

GitHub User: zwarburg

Comments by Zack Warburg

Avatar

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:

ruby
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:

ruby
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