-
Notifications
You must be signed in to change notification settings - Fork 4
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
Feature request: different roots for different actions #8
Comments
What was the problem with this code?
|
IR permits params for the resources and build_resources of every action. In a #new action, for example, the build fails because the required root is not available unless I set it to false. If I do however the require is not present in the #create action. |
https://github.com/cloudsdaleapp/arcane/blob/master/lib/arcane/parameters.rb#L60 You can define UPD. Sorry, This request is actual |
I'm very sorry for the immense wait, not very nice of me to leave you hanging like this. What if you could specify a method in the chain to select the root key? params.at(:published_article).refine |
To get arcane to cooperate with the InheritedResources gem, I had to do a little metaprogramming trickery that allows an overwrite of the self.root method for each action because I didn't find a way to get the current action inside of the #root function. I think adding a reference point like that would make a good addition to the gem in general.
The text was updated successfully, but these errors were encountered: