I need to render another controller action <%= render \"controller/index\" %>
and i get this error
Missing partial controller/inde
If you do not want just to render the view of the other controller (/model), but calling the action (method), think more the ruby way of life - put this method(s) into a module and include it in the controllers you need it.
I think its less 'spooky' then somehow touching an other controller.
module StandardActions
def show_user_homepage(local_params=params)
#something finding
#something to check
render :"homepage/show"
def
end
class AddressesController < ApplicationController
include StandardActions
def update
# update address
if ok
show_user_homepage(id: user_id)
else
#errorthings
render :edit #(eg.)
end
end
end
class HobbiesController < ApplicationController
include StandardActions
def update
# update hobby
if ok
show_user_homepage(id: user_id)
else
#errorthings
render :edit #(eg.)
end
end
end