diff options
author | Xavier Noria <fxn@hashref.com> | 2008-12-31 01:19:59 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2008-12-31 01:19:59 +0100 |
commit | 6260dee0154e189a84637e31cd438da0e4809350 (patch) | |
tree | 9dec0f5e1ca1aca133fcb7cf057dd5811fd645e2 /actionpack | |
parent | 3dae667d8fd6e959a80d8b6ba825f7b82a36d251 (diff) | |
download | rails-6260dee0154e189a84637e31cd438da0e4809350.tar.gz rails-6260dee0154e189a84637e31cd438da0e4809350.tar.bz2 rails-6260dee0154e189a84637e31cd438da0e4809350.zip |
This example seems unnecessary. Note that the examples of form helpers depict just their traditional usage. The documentation of form_for is the one that makes the link with form builders. On the other hand, people are expected to know what's a hidden field in HTML forms.
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_helper.rb | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index 094eea1808..a85751c657 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -390,14 +390,6 @@ module ActionView # # hidden_field(:user, :token) # # => <input type="hidden" id="user_token" name="user[token]" value="#{@user.token}" /> - # - # If you have a form object f that is using an object @client: - # <%= f.hidden_field :user_id, :value => current_user.id %> - # # => <input id="client_user_id" name="client[user_id]" type="hidden" value="12345" /> - # - # This passes a hidden variable user_id with the value of current_user.id, it can be accessed in the controller as: - # params[:client][:user_id] - def hidden_field(object_name, method, options = {}) InstanceTag.new(object_name, method, self, options.delete(:object)).to_input_field_tag("hidden", options) end |