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



7
8
9
10
# File 'app/controllers/bard/static/static_controller.rb', line 7

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

#staticObject



12
13
14
15
# File 'app/controllers/bard/static/static_controller.rb', line 12

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