Class: LazyModal::LazyModalsController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/lazy_modal/lazy_modals_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



9
10
11
12
13
14
15
16
# File 'app/controllers/lazy_modal/lazy_modals_controller.rb', line 9

def show
  tmpl = if params[:modal_dir]
           "#{params[:modal_dir]}/#{params[:id]}"
         else
           "/lazy_modal/modals/#{params[:id]}"
         end
  render tmpl, layout: nil
end