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

undefined method `inline_edit' for #<RailsAdmin::Config::Fields::Types::HasManyAssociation:0x00000006766a50> #2744

Closed
SuperMasterBlasterLaser opened this issue Oct 17, 2016 · 8 comments

Comments

@SuperMasterBlasterLaser
Copy link
Contributor

SuperMasterBlasterLaser commented Oct 17, 2016

I have found interesting error:

My code in rails_admin.rb file is this:

  config.model Category do
    edit do
      field :speeches do
        inline_add false
        inline_edit false
      end
    end
  end

When I open my rails_admin panel it shows me this:

 NoMethodError in RailsAdmin::MainController#dashboard
 undefined method `inline_edit' for #<RailsAdmin::Config::Fields::Types::HasManyAssociation:0x00000006766a50> Did you mean? inline_add

However, if I remove inline_edit it works.

Inline edit exists in has_many association, it could be called when user double-clicks to models name and editing modal appears.

@thedanielhanke
Copy link
Contributor

@SuperMasterBlasterLaser the has_many association in rails_admin simply does not feature a inline_edit option. its currently limited to has_one and belongs_to.

so this is not a bug. ;)

@SuperMasterBlasterLaser
Copy link
Contributor Author

@thedanielhanke But when I double click on name of my model, edit modal appears.

@thedanielhanke
Copy link
Contributor

@SuperMasterBlasterLaser ah cool. even nested_form false does not help in this case. that might indeed be a bug. 👍
maybe you might want to rephrase this issues title to point on beein unable to disable this.

@SuperMasterBlasterLaser
Copy link
Contributor Author

@thedanielhanke Updated my question as you asked.

@Jamevidi
Copy link

Jamevidi commented Apr 1, 2017

👍

@RodrigoPereyraDiaz
Copy link
Contributor

I have the same problem.
Doble click show modal form to edit.
I mark nested_form false but nothing change.

@mshibuya
Copy link
Member

Dup of #1911.

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

5 participants