Class: Admin::DialogsController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- BaseController
- Admin::DialogsController
- Defined in:
- app/controllers/admin/dialogs_controller.rb
Instance Method Summary collapse
Instance Method Details
#from_dialog? ⇒ Boolean
21 22 23 |
# File 'app/controllers/admin/dialogs_controller.rb', line 21 def from_dialog? true end |
#show ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/admin/dialogs_controller.rb', line 4 def show if (@dialog_type = params[:id].try(:downcase)) url_params = params.reject {|key, value| key =~ /(action)|(controller)/} @iframe_src = if @dialog_type == 'image' insert_admin_images_url(url_params.merge(:id => nil, :modal => true)) elsif @dialog_type == 'link' link_to_admin_pages_dialogs_url(url_params.merge(:id => nil)) end render :layout => false else render :nothing => true end end |