I have to create a web app with
2 different user’s types: advanced and basic.
What’s the best way to manage different user’s views (one for user’s
type) ?
I am using respond_to in this way:
respond_to do |format|
case current_operator.op_type
when 'basic'
format.html { render :template => "devices/index_basic.html.erb"
}
when ‘advanced’
format.html # index.html.erb
end
end
but I don’t like that I need to specify
render :template => “devices/basic_action_page.html.erb” in every
respond_to
Do you know some cleaner way to do that ?
thank you,
Alessandro