[logaling-commit] logaling/logaling-server [github-project-related-to-user] Use form_for's hidden field

Zurück zum Archiv-Index

SHIMADA Koji null+****@clear*****
Tue Sep 25 19:27:13 JST 2012


SHIMADA Koji	2012-09-25 19:27:13 +0900 (Tue, 25 Sep 2012)

  New Revision: 10b83e8dde695f7912714033568199ffd094edb7
  https://github.com/logaling/logaling-server/commit/10b83e8dde695f7912714033568199ffd094edb7

  Merged 971b851: Merge pull request #14 from logaling/prioritize-the-search

  Log:
    Use form_for's hidden field

  Modified files:
    app/views/dashboard/show.html.haml

  Modified: app/views/dashboard/show.html.haml (+6 -6)
===================================================================
--- app/views/dashboard/show.html.haml    2012-09-25 19:24:36 +0900 (20498c3)
+++ app/views/dashboard/show.html.haml    2012-09-25 19:27:13 +0900 (c342d5f)
@@ -12,13 +12,13 @@
           = 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|
-              = hidden_field :user_config, :glossary_name, value: user_glossary.glossary_name
-              = hidden_field :user_config, :source_language, value: user_glossary.source_language
-              = hidden_field :user_config, :target_language, value: user_glossary.target_language
+              = 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|
-              = hidden_field :user_config, :glossary_name, value: user_glossary.glossary_name
-              = hidden_field :user_config, :source_language, value: user_glossary.source_language
-              = hidden_field :user_config, :target_language, value: user_glossary.target_language
+              = 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...
Download 



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