You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you use the component helper, your polymorphic components must have identical arguments.
In your example, you have to refactor user=model and event=model into a common name: modalModel.
But if some of the components needs a unique argument, you'll be passing it as usual, e. g. eventGroup=eventGroup. A user modal would simply ignore that argument.
You already know that. So why don't you apply the same principle to actions? Use common names for shared actions, use unique names for non-shared actions.
In this example I've separated shared attributes and actions from unique attributes and actions:
Hi.
Inside my app a use
component
helper to dynamically call a component. But the attributes may vary depending of which component I'm calling.Let's say I have this code:
I would like to write it this way:
In this case,
modalActions
is a hash with the actions. But, to do this, I need a way to useroute-action
logic inside a mixin. Thechangeset
helper uses internally aChangetset
class that can be used anywhere. It would be great to have aRouteAction
class, too.The text was updated successfully, but these errors were encountered: