Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Mime::Type.register "application/fft", :fft
- get '/form_types/global_identifier=:global_identifier.fft', to: 'form_types#show'
- curl myserver:3000/form_types/global_identifier=AB394C1D.fft
- def show
- respond_to do |format|
- format.html
- format.fft { send_file Rails.root.join('app', 'assets', 'packages', "#{params[:global_identifier]}.fft"), :disposition => 'inline' }
- end
- end
- [2014-09-19 12:30:40] INFO WEBrick 1.3.1
- [2014-09-19 12:30:40] INFO ruby 2.1.2 (2014-05-08) [x86_64-linux]
- [2014-09-19 12:30:40] INFO WEBrick::HTTPServer#start: pid=5247 port=3000
- Started GET "/form_types/global_identifier=AB394C1D.fft" for 192.168.1.117 at 2014-09-19 12:30:50 -0500
- ActiveRecord::SchemaMigration Load (1.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
- Processing by FormTypesController#show as */*
- Parameters: {"global_identifier"=>"AB394C1D"}
- FormType Load (1.5ms) SELECT "form_types".* FROM "form_types" WHERE "form_types"."global_identifier" IS NULL LIMIT 1
- Completed 500 Internal Server Error in 52ms
- ActionView::MissingTemplate (Missing template form_types/show, application/show with {:locale=>[:en], :formats=>[:fft], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder, :coffee]}. Searched in:
- * "/home/david/Projects/Packages2/app/views":
- app/controllers/form_types_controller.rb:19:in `show'
- Rendered /home/david/.rvm/gems/ruby-2.1.2/gems/actionpack-4.1.5/lib/action_dispatch/middleware/templates/rescues/missing_template.html.erb within rescues/layout (1.8ms)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement