My helper methods in controller
- by FancyDancy
My app should render html, to answer when a user clicks ajax-link.
My controller:
def create_user
@user = User.new(params)
if @user.save
status = 'success'
link = link_to_profile(@user) #it's my custom helper in Application_Helper.rb
else
status = 'error'
link = nil
end
render :json => {:status => status, :link…