[logaling-commit] logaling/logaling-server [prioritize-the-search] Return 404 if user glossary resoruce doesn't exist

Zurück zum Archiv-Index

SHIMADA Koji null+****@clear*****
Wed Sep 19 20:06:33 JST 2012


SHIMADA Koji	2012-09-19 20:06:33 +0900 (Wed, 19 Sep 2012)

  New Revision: 69d6fbe5bc8a23c1fdf31ab78c822d1422463b41
  https://github.com/logaling/logaling-server/commit/69d6fbe5bc8a23c1fdf31ab78c822d1422463b41

  Merged c5d082c: Merge pull request #13 from logaling/enable-creating-user-glossary

  Log:
    Return 404 if user glossary resoruce doesn't exist

  Modified files:
    app/controllers/user_glossaries_controller.rb

  Modified: app/controllers/user_glossaries_controller.rb (+2 -0)
===================================================================
--- app/controllers/user_glossaries_controller.rb    2012-09-19 20:05:09 +0900 (71bf9f4)
+++ app/controllers/user_glossaries_controller.rb    2012-09-19 20:06:33 +0900 (17299ae)
@@ -7,6 +7,8 @@ class UserGlossariesController < ApplicationController
   # GET /user_glossaries/1.json
   def show
     @user_glossary = UserGlossary.find(params[:id])
+  rescue ActiveRecord::RecordNotFound
+    render :file => 'public/404.html', :status => 404, :layout => false
   end
 
   # GET /user_glossaries/new
-------------- next part --------------
An HTML attachment was scrubbed...
Download 



More information about the logaling-commit mailing list
Zurück zum Archiv-Index