Skip to content

Validate resource_id #43

@takestar15

Description

@takestar15

If user clicks 'Add Refinery Page' without checking any pages, it returns error.

https://github.com/pylonweb/refinerycms-menus/blob/master/app/controllers/refinery/menus/admin/menu_links_controller.rb#L15
I think we have to validate params[:menu_link][:resource_id].

Request Sample:
commit: Add Refinery Page
menu_link[refinery_menu_id]: 10
menu_link[resource_type]: refinery_page
Error:
create action returns one menu_link, but it's not valid because label field is empty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions