Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- layout :layout_by_resource
- theme :layout_by_resource
- def layout_by_resource
- if devise_controller?
- if resource_name == :participant
- if subdomain_conference && user_signed_in?
- "conf_manage"
- elsif subdomain_conference && participant_signed_in?
- "conf_participant"
- elsif subdomain_conference
- theme "default"
- else
- "login"
- end
- elsif resource_name == :user
- "login"
- end
- else
- layout "application"
- end
- end
- /* in layout_by_resource there is a lot of layouts and themes to choose from.
- layout :layout_by_resource * should return layout *
- theme :layout_by_resource * should return theme *
- i'm looking for a solution for dynamic choose "layout" or "them".
- as the above example will return error.
- */
Add Comment
Please, Sign In to add comment