Advertisement
Guest User

Untitled

a guest
Sep 19th, 2014
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. Mime::Type.register "application/fft", :fft
  2.  
  3. get '/form_types/global_identifier=:global_identifier.fft', to: 'form_types#show'
  4.  
  5. curl myserver:3000/form_types/global_identifier=AB394C1D.fft
  6.  
  7. def show
  8. respond_to do |format|
  9. format.html
  10. format.fft { send_file Rails.root.join('app', 'assets', 'packages', "#{params[:global_identifier]}.fft"), :disposition => 'inline' }
  11. end
  12. end
  13.  
  14. [2014-09-19 12:30:40] INFO WEBrick 1.3.1
  15. [2014-09-19 12:30:40] INFO ruby 2.1.2 (2014-05-08) [x86_64-linux]
  16. [2014-09-19 12:30:40] INFO WEBrick::HTTPServer#start: pid=5247 port=3000
  17.  
  18.  
  19. Started GET "/form_types/global_identifier=AB394C1D.fft" for 192.168.1.117 at 2014-09-19 12:30:50 -0500
  20. ActiveRecord::SchemaMigration Load (1.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
  21. Processing by FormTypesController#show as */*
  22. Parameters: {"global_identifier"=>"AB394C1D"}
  23. FormType Load (1.5ms) SELECT "form_types".* FROM "form_types" WHERE "form_types"."global_identifier" IS NULL LIMIT 1
  24. Completed 500 Internal Server Error in 52ms
  25.  
  26. ActionView::MissingTemplate (Missing template form_types/show, application/show with {:locale=>[:en], :formats=>[:fft], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder, :coffee]}. Searched in:
  27. * "/home/david/Projects/Packages2/app/views":
  28. app/controllers/form_types_controller.rb:19:in `show'
  29.  
  30.  
  31. 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