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

Multiple field support in configure call #2667

Closed
ain opened this issue Jul 4, 2016 · 3 comments · Fixed by #3406
Closed

Multiple field support in configure call #2667

ain opened this issue Jul 4, 2016 · 3 comments · Fixed by #3406
Milestone

Comments

@ain
Copy link

ain commented Jul 4, 2016

Would be nice to be able to configure several fields at once as follows:

  rails_admin do
    configure [:field1, :field2] do
      visible do
        !bindings[:object].new_record?
      end
    end
  end
@Hemant-yadav
Copy link

Any RoadMap for this

@wkitsin
Copy link

wkitsin commented Mar 24, 2020

Yeah would be great to implement this

@mshibuya mshibuya added this to the 3.0.0 milestone Oct 14, 2021
@RocKhalil
Copy link
Contributor

In the meantime, you can do:

[:field1, :field2].each do |field|
  configure field do
    visible do
      !bindings[:object].new_record?
    end
  end
end

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

Successfully merging a pull request may close this issue.

5 participants