[logaling-commit] logaling/logaling-server [enable-creating-user-glossary] Remove #set_user_glossary

Back to archive index

SUZUKI Miho null+****@clear*****
Mon Sep 10 15:13:14 JST 2012


SUZUKI Miho	2012-09-10 15:13:14 +0900 (Mon, 10 Sep 2012)

  New Revision: 8f0132cfaccdf743ed91a584227eaf9822f0e02a
  https://github.com/logaling/logaling-server/commit/8f0132cfaccdf743ed91a584227eaf9822f0e02a

  Log:
    Remove #set_user_glossary

  Modified files:
    app/controllers/user_glossaries_controller.rb

  Modified: app/controllers/user_glossaries_controller.rb (+1 -5)
===================================================================
--- app/controllers/user_glossaries_controller.rb    2012-09-10 15:10:31 +0900 (865a898)
+++ app/controllers/user_glossaries_controller.rb    2012-09-10 15:13:14 +0900 (6b49fa7)
@@ -2,7 +2,6 @@
 class UserGlossariesController < ApplicationController
   before_filter :authenticate!, :except => :show
   before_filter :valid_user?, :only => [:new, :create]
-  before_filter :set_user_glossary, :only => :create
 
   # GET /user_glossaries/1
   # GET /user_glossaries/1.json
@@ -23,6 +22,7 @@ class UserGlossariesController < ApplicationController
   # POST /user_glossaries
   # POST /user_glossaries.json
   def create
+    @user_glossary = current_user.user_glossaries.build(params[:user_glossary])
     if @user_glossary.create
       respond_to do |format|
         if @user_glossary.save
@@ -37,10 +37,6 @@ class UserGlossariesController < ApplicationController
   end
 
   private
-  def set_user_glossary
-    @user_glossary = current_user.user_glossaries.build(params[:user_glossary])
-  end
-
   def valid_user?
     if current_user.id != params[:user_id].to_i
       flash[:notice] = "不正なアクセスです"
-------------- next part --------------
An HTML attachment was scrubbed...
Download 



More information about the logaling-commit mailing list
Back to archive index