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
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to