In Rails, I'm attempting to create a notification system where notifications will be created automatically when certain controller actions are called. I have the following 'create' action in the notifications controller:
def create
@notification = Notification.new(notification_params)
@notification.save
end
I need to call this action from other controller actions, and pass different parameter values to it depending on which controller action calls it. After creating the new notification, I need to continue running code in the controller action that calls it.
Is this possible?