I have an action in my RoR application, and it calls a different script depending on the user running it.
def index
@user = User.find(session[:user_id], :include => [ :balances, :links, :comments ])
render :file => "#{RAILS_ROOT}/app/views/user/index_#{@user.class.to_s.downcase}.html.erb"
end
How to make the call to render a more elegant and simple?