SHIMADA Koji
null+****@clear*****
Wed Sep 19 18:44:58 JST 2012
SHIMADA Koji 2012-09-19 18:44:58 +0900 (Wed, 19 Sep 2012) New Revision: 68f467abe18af4845b920731be3b2e11a6db13af https://github.com/logaling/logaling-server/commit/68f467abe18af4845b920731be3b2e11a6db13af Merged c5d082c: Merge pull request #13 from logaling/enable-creating-user-glossary Log: Relegate user_glossary to local variable Modified files: app/controllers/terms_controller.rb Modified: app/controllers/terms_controller.rb (+3 -3) =================================================================== --- app/controllers/terms_controller.rb 2012-09-19 18:39:16 +0900 (7b34b47) +++ app/controllers/terms_controller.rb 2012-09-19 18:44:58 +0900 (4ad0a05) @@ -7,10 +7,10 @@ class TermsController < ApplicationController def create @term = Term.new(params[:term]) - @user_glossary = UserGlossary.find(params[:glossary_id]) - @user_glossary.add!(@term) + user_glossary = UserGlossary.find(params[:glossary_id]) + user_glossary.add!(@term) - redirect_to user_glossary_path(current_user, @user_glossary), notice: 'Term was successfully added.' + redirect_to user_glossary_path(current_user, user_glossary), notice: 'Term was successfully added.' rescue => e @term.errors.add(:source_term, e) if****@term*****? render action: "new" -------------- next part -------------- An HTML attachment was scrubbed... 下載