I have User and Photo controllers and models.
the user has many photos
photos belongs to the user
In a user profile section i have a photo gallery using RJS.
I’m on user controller, and the logic of ‘photos’ are on photos controller, how can i call the RJS template using logic from another controller (in this case photo)?
at user controller:
page.replace_html('html_id, :partial => ‘photo’)
here i need put a lot of logic from the photo controller, how can i use a method from it?
Thank your very much for the attention!