Class: Bard::Static::StaticController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/bard/static/static_controller.rb

Instance Method Summary collapse

Instance Method Details

#mockupsObject



4
5
6
7
# File 'app/controllers/bard/static/static_controller.rb', line 4

def mockups
  request.env["bard_static.prototype"] = true
  with_404_handler { render_with_index "mockups/#{params[:file_path]}", layout: false }
end

#staticObject



9
10
11
12
# File 'app/controllers/bard/static/static_controller.rb', line 9

def static
  layout = !request.xhr? # render ajax responses with no layout
  with_404_handler { render_with_index "static/#{params[:file_path]}", layout: layout }
end