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

unknown attribute 'images_attributes' for Refinery::Page if only added to extension #140

Open
javinto opened this issue Dec 21, 2016 · 2 comments
Labels

Comments

@javinto
Copy link

javinto commented Dec 21, 2016

I had a RefineryCMS 2.x installation with a Projects extension where I had added the PageImages extension to the projects only:

config.enable_for = [
    {model: "Refinery::Projects::Project", tab: "Refinery::Projects::Tab"}
]

On upgrading to RefineryCMS 3.x I now get an exception error on updating a RefineryPage: unknown attribute 'images_attributes' for Refinery::Page

When I add {model: "Refinery::Page", tab: "Refinery::Pages::Tab"} to the above config the exception disappears but then I have a Images tab on every Page which I do not want.

The problem seems to be that in the pages_controller_decorator.rb the permitted_page_params are added unconditionally.

It is not a show stopper, but could it be solved?

@bricesanchez
Copy link
Member

Hi @javinto it looks like enable_for does not do its job like it should. we probably should add conditional statement in the pages_controller_decorator.rb

@javinto
Copy link
Author

javinto commented Jan 26, 2018 via email

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

No branches or pull requests

2 participants