ruby on rails - rails_admin ArgumentError when trying to edit or create a new entry -


i'm getting error while trying create new or edit limitation (model below)

argumenterror in rails_admin/main#new

showing /users/deini/.rvm/gems/ruby-2.0.0-p195/gems/rails_admin-0.4.9/app/views/rails_admin/main/_form_filtering_select.html.haml line #11 raised:

wrong number of arguments (0 1+)

extracted source (around line #11): (selected_id = field.selected_id)

    selected_id = selected.send(field.associated_primary_key)      selected_name = selected.send(field.associated_object_label_method)    else      selected_id = field.selected_id      selected_name = field.formatted_value    end 

system.rb

class system < activerecord::base   has_many :attachments    has_many :limitations   has_many :companies, :through => :limitations    accepts_nested_attributes_for :attachments   accepts_nested_attributes_for :companies    attr_accessible :conf_type, :version, :hardware_type, :name, :attachments_attributes, :company_ids, :companies_attributes    rails_admin     list       exclude_fields :created_at, :updated_at     end   end  end 

company.rb

  class company < activerecord::base   belongs_to :distributor   has_many :users, dependent: :destroy    has_many :limitations   has_many :systems, :through => :limitations    accepts_nested_attributes_for :limitations    attr_accessible :distributor_id, :name, :system_ids, :email, :limitations_attributes    rails_admin     list       exclude_fields :custom_url, :created_at, :updated_at     end      edit       exclude_fields :custom_url, :users     end   end  end 

limitation.rb

class limitation < activerecord::base   belongs_to :company   belongs_to :system   attr_accessible :company_id, :system_id, :version_limit end 

i haven't modify in rails_admin, ideas of i'm doing wrong?

actually got same error. when changed name system other name in entire code including model,table name , all, code starts work fine. try changing name system other word.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -