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

Strong Parameters? #6

Open
asecondwill opened this issue May 17, 2014 · 1 comment
Open

Strong Parameters? #6

asecondwill opened this issue May 17, 2014 · 1 comment

Comments

@asecondwill
Copy link

Seems to have issues with strong parameters. So for example i had to do this to be able to create a menu:

ActiveAdmin.register Menu do
    permit_params :name, :area
end
ActiveAdmin::Menus.configure do |c|
  # Areas are specific parts of a page layout, you can add many of them
  c.add_area :main_navigation do |i|

  end

  c.add_predefined_item :home do |i|
    # Specify how to render the menu item
    i.renderer = lambda { link_to 'Home', root_path }
  end

  c.add_resource_class Page do |i|
    # Specify how to render the menu item
    i.renderer = lambda { |page| link_to page.title, page }
  end
end

but then I can't create a resource menu item with error:

ActiveModel::ForbiddenAttributesError
@asecondwill
Copy link
Author

also, when i get to the add New Resource Item page, I can select resource type, but the resource select box is empty? Should it be populated by the pages?

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

1 participant