I am developing a rails app and I have 2 different user's role: advanced and basic.
Instead of to hide links in the basic user's views (a.i. using CanCan ) I want to manage 2 different set of views: one for the advanced user and one for basic user.
Currently I am working in this way:
case current_operator.op_type
when 'basic'
format.html { render :template => "devices/index_basc.html.erb" }
when 'advanced'
format.html # index.html.erb
end
But I dont like to specify at every action the template for the basic user ( { render :template => "devices/index_basc.html.erb" } ) I think there is some other way (I hope more neat :)
Do you have any ideas ?
Thank you, Alessandro