Good evening all.
I have two different places in my app that need to call the same
controller/action and react differently in terms of output. In other
words, in one case I want to use some rjs to update a page in a certain
way and in another case - I'd like to to do something entirely different
to a different/distinct page but use the same controller/action.
Say controller is foo and action is 'unsubscribe'...
class Foo << ApplicationController
foo = SomeModel.find(params[:id])
# in one case i want to update the calling page (x) with some
# in another, the page has a completely different dom and i need to
do something else
render :update do |page|
Is the answer to just create two actions here?