redirect_to is the preferred way of doing this.
CommentsController :
class CommentsController < ApplicationController
def country
redirect_to :controller => ‘countries’, :action => ‘sample’
end
end
CountriesController :
class CountriesController < ApplicationController
def sample
render :text => ‘Test’
end
end
Output :
Test
Comments
Post a Comment