Skip to content

Strong Parameters? #6

@asecondwill

Description

@asecondwill

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions