SHIMADA Koji
null+****@clear*****
Tue Sep 25 19:30:21 JST 2012
SHIMADA Koji 2012-09-25 19:30:21 +0900 (Tue, 25 Sep 2012) New Revision: 1151574abec36feae2a3b1639104c05c430b3dfc https://github.com/logaling/logaling-server/commit/1151574abec36feae2a3b1639104c05c430b3dfc Merged 971b851: Merge pull request #14 from logaling/prioritize-the-search Log: Limit branch scope to decision of submit path Modified files: app/views/dashboard/show.html.haml Modified: app/views/dashboard/show.html.haml (+6 -12) =================================================================== --- app/views/dashboard/show.html.haml 2012-09-25 19:27:13 +0900 (c342d5f) +++ app/views/dashboard/show.html.haml 2012-09-25 19:30:21 +0900 (e0ce876) @@ -10,15 +10,9 @@ = user_glossary.source_language = user_glossary.target_language = link_to "Show", user_glossary_path(current_user, user_glossary) - - if @user_config.new_record? - = form_for @user_config, url: user_configs_path(current_user) do |f| - = f.hidden_field :glossary_name, value: user_glossary.glossary_name - = f.hidden_field :source_language, value: user_glossary.source_language - = f.hidden_field :target_language, value: user_glossary.target_language - = f.submit mark, :class => 'btn btn-link' - - else - = form_for @user_config, url: user_config_path(current_user, @user_config) do |f| - = f.hidden_field :glossary_name, value: user_glossary.glossary_name - = f.hidden_field :source_language, value: user_glossary.source_language - = f.hidden_field :target_language, value: user_glossary.target_language - = f.submit mark, :class => 'btn btn-link' + - config_submit_path = @user_config.new_record? ? user_configs_path(current_user) : user_config_path(current_user, @user_config) + = form_for @user_config, url: config_submit_path do |f| + = f.hidden_field :glossary_name, value: user_glossary.glossary_name + = f.hidden_field :source_language, value: user_glossary.source_language + = f.hidden_field :target_language, value: user_glossary.target_language + = f.submit mark, :class => 'btn btn-link' -------------- next part -------------- An HTML attachment was scrubbed... 下載