Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autosave raising unknown key #72

Open
baweaver opened this issue Apr 25, 2016 · 1 comment
Open

autosave raising unknown key #72

baweaver opened this issue Apr 25, 2016 · 1 comment

Comments

@baweaver
Copy link

:autosave => true,

Exception: ArgumentError: Unknown key: :autosave. Valid keys are: :class_name, :class, :foreign_key, :validate, :table_name, :before_add, :after_add, :before_remove, :after_remove, :extend, :primary_key, :dependent, :as, :through, :source, :source_type, :inverse_of, :counter_cache, :join_table, :foreign_type

--
 0: /my_gem_path/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/core_ext/hash/keys.rb:75:in `block in assert_valid_keys'
 1: /my_gem_path/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/core_ext/hash/keys.rb:73:in `each_key'
 2: /my_gem_path/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/core_ext/hash/keys.rb:73:in `assert_valid_keys'
 3: /my_gem_path/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/associations/builder/association.rb:82:in `validate_options'
 4: /my_gem_path/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/associations/builder/association.rb:62:in `initialize'
 5: /my_gem_path/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/associations/builder/collection_association.rb:18:in `initialize'
 6: /my_gem_path/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/associations/builder/association.rb:47:in `new'
 7: /my_gem_path/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/associations/builder/association.rb:47:in `create_builder'
 8: /my_gem_path/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/associations/builder/association.rb:35:in `build'
 9: /my_gem_path/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/associations.rb:1258:in `has_many'
10: /my_gem_path/ruby-2.1.2/gems/ledermann-rails-settings-2.4.0/lib/rails-settings/base.rb:5:in `block in included'
11: /my_gem_path/ruby-2.1.2/gems/ledermann-rails-settings-2.4.0/lib/rails-settings/base.rb:4:in `class_eval'
12: /my_gem_path/ruby-2.1.2/gems/ledermann-rails-settings-2.4.0/lib/rails-settings/base.rb:4:in `included'
13: /my_gem_path/ruby-2.1.2/gems/ledermann-rails-settings-2.4.0/lib/rails-settings.rb:10:in `include'
14: /my_gem_path/ruby-2.1.2/gems/ledermann-rails-settings-2.4.0/lib/rails-settings.rb:10:in `has_settings'
@ledermann
Copy link
Owner

I don't know what is going wrong here. The :autosave option for has_many is part of ActiveRecord for a long time, see here:
https://github.com/rails/rails/blob/v4.2.0/activerecord/lib/active_record/autosave_association.rb

I can't reproduce your issue. The testsuite using Rails 4.2.0 is running fine. Can you give me some more hints to reproduce this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants