I am developing a rails application, and I have 2 different user roles : advanced and basic.
Instead of hiding the links in the main user views (ai using CanCan), I want to manage 2 different sets of views : one for the advanced user and one for the main user.
I am currently working as follows:
case current_operator.op_type
when 'basic'
format.html { render :template => "devices/index_basc.html.erb" }
when 'advanced'
format.html
end
But I do not want to specify a template for the main user with every action ({render: template => "devices / index_basc.html.erb"}) I think there is another way (I hope more neat :)
Do you have any ideas?
Thanks Alessandro