Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyController < ApplicationController
- def my_action
- if current_user.nil?
- render layout: "new_user_layout"
- else
- render layout: "member_layout"
- end
- end
- end
- class ApplicationController < ActionController::Base
- layout :users_layout
- private
- def users_layout
- current_user.nil? ? "new_user_layout" : "member_layout"
- end
- end
- class MyController < ApplicationController
- def my_action
- #solo debes poner en modo false para que lo desabilites solo para este metodo
- render layout: false
- end
- end
- class MyController < ApplicationController
- layout: false
- def my_action
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement