You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have my classes all set up, but i cannot instantiate a subclass. Here is what i am getting:
[1] pry(main)> AssemblyTypeItem.create :name => 'this is it'
NoMethodError: undefined method update' for #<ActiveModel::MassAssignmentSecurity::WhiteList: {}> from /Users/xxx/.rvm/gems/ruby-1.9.3-p448/gems/acts_as_relation-0.1.2/lib/active_record/acts_as_relation.rb:106:inincluded'
anyone have any ideas? thanks in advance..
here is what everything looks like:
environment
rails (3.0.20)
acts_as_relation (0.1.2)
ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin12.5.0]
classes
class Item < ActiveRecord::Base
acts_as_superclass
attr_accessible :type, :name, :key
end
class AssemblyTypeItem < ActiveRecord::Base
acts_as :item
attr_accessible :comment
end
schema
create_table "assembly_type_items", :force => true do |t|
t.string "comment"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "items", :force => true do |t|
t.integer "as_item_id"
t.string "as_item_type"
t.string "name"
t.string "key"
t.string "description"
t.datetime "created_at"
t.datetime "updated_at"
end
The text was updated successfully, but these errors were encountered:
class CreateItems < ActiveRecord::Migration
def self.up
create_table :items, :as_relation_superclass => true do |t|
t.string :name
t.string :key
t.string :description
t.timestamps
end
end
end
I have my classes all set up, but i cannot instantiate a subclass. Here is what i am getting:
[1] pry(main)> AssemblyTypeItem.create :name => 'this is it'
NoMethodError: undefined method
update' for #<ActiveModel::MassAssignmentSecurity::WhiteList: {}> from /Users/xxx/.rvm/gems/ruby-1.9.3-p448/gems/acts_as_relation-0.1.2/lib/active_record/acts_as_relation.rb:106:in
included'anyone have any ideas? thanks in advance..
here is what everything looks like:
The text was updated successfully, but these errors were encountered: