controller:
class MyController < ApplicationController
layout :check_layout
private
def check_layout
return current_user.admin? ? "admin" : "application"
# current_user is user who logged in
end
end
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.