Displaying 16 results from an estimated 16 matches for "form_options_help".
Did you mean:
form_options_helper
2007 Dec 07
4
strange error on mock proxy
...;/li>
vendor/plugins/rspec/lib/spec/mocks/proxy.rb:71:in `send''
vendor/plugins/rspec/lib/spec/mocks/proxy.rb:71:in
`message_received''
vendor/plugins/rspec/lib/spec/mocks/proxy.rb:100:in `include?''
vendor/rails/actionpack/lib/action_view/helpers/
form_options_helper.rb:304:in `option_value_selected?''
vendor/rails/actionpack/lib/action_view/helpers/
form_options_helper.rb:163:in `options_for_select''
vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb:
29:in `inject''
vendor/rails/actionpack/lib/action_view...
2007 Jul 17
5
habtm confusion
...ctiverecord-1.15.3/lib/active_record/associations/association_proxy.rb:131:in
`load_target''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/associations/association_proxy.rb:29:in
`respond_to?''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/form_options_helper.rb:116:in
`options_for_select''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1358:in
`inject''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/form_options_helper.rb:114:in
`each''
/usr/lib/ruby/gems/1.8/gems/actionpack-1....
2006 Nov 23
1
Select Tag not working in 1.2rc1
...gt;"sales_by_author")%>
*<%=select("author","id",@authors.collect {|a| [a.name,a.id]})%>
<%=submit_tag("Go")%>
<%=end_form_tag()%>
Part of the trace:
C:/INSTAN~2/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5.5618/lib/action_view/helpers/form_options_helper.rb:300:in
`value''
C:/INSTAN~2/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5.5618/lib/action_view/helpers/form_options_helper.rb:300:in
`to_select_tag''
C:/INSTAN~2/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5.5618/lib/action_view/helpers/form_options_helper.rb:66:in
`...
2005 Nov 15
2
FormOptionsHelper select call failing
...ems/1.8/gems/actionpack-1.11.0/lib/
action_view/helpers/form_helper.rb:247:in `send''
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/
action_view/helpers/form_helper.rb:247:in `value''
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/
action_view/helpers/form_options_helper.rb:299:in `to_select_tag''
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/
action_view/helpers/form_options_helper.rb:63:in `select''
#{RAILS_ROOT}/app/views/folder/new.rhtml:13
Cheers,
Pete Yandell
2005 Jun 13
3
validations not working with collection population droplists
...9;'Add'', :controller => ''publishers'',
:action => ''new'' %>
18: </td>
19: </tr>
Trace of template inclusion: /reviews/new_curriculum.rhtml
Show template trace
/usr/lib/ruby/gems/1.8/gems/actionpack-1.8.1/lib/action_view/helpers/form_options_helper.rb:139:in
`options_from_collection_for_select''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.8.1/lib/action_view/helpers/form_options_helper.rb:304:in
`to_collection_select_tag''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.8.1/lib/action_view/helpers/form_options_helper.rb:66:in
`collect...
2006 May 30
0
Problems when applying search to filter rows.
..."search_value" value="<%=@search_value%>"
size=''16'' id=''search_value''/>
RAILS_ROOT: script/../config/..
Application Trace | Framework Trace | Full Trace
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_view/helpers/form_options_helper.rb:114:in
`options_for_select''
#{RAILS_ROOT}/app/views/layouts/application.rhtml:266:in
`_run_rhtml_layouts_application''
lib/globalize/rails/action_view.rb:15:in `render_file''
#{RAILS_ROOT}/app/controllers/empresas_controller.rb:32:in `buscar''
#{RAILS_ROOT}/app...
2005 Feb 13
5
Select Enumerated Values with FormOptionsHelper
...al/lib/ruby/gems/1.8/gems/actionpack-1.4.0/lib/action_view/
helpers/form_helper.rb:203:in `send''
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.4.0/lib/action_view/
helpers/form_helper.rb:203:in `value''
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.4.0/lib/action_view/
helpers/form_options_helper.rb:200:in `to_select_tag''
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.4.0/lib/action_view/
helpers/form_options_helper.rb:20:in `select''
2006 Aug 18
0
Why is select helpers not using options in add_default_name_and_id ?
Hello,
In actionpack/lib/action_view/helpers/form_options_helper.rb (trunk) @
~296 in the
def to_select_tag(choices, options, html_options)
function, why is there
add_default_name_and_id(html_options)
instead of
add_default_name_and_id(options)
This is inconsistent with the non-select helpers where
add_default_name_and_id always use options. Is there a...
2005 Jul 06
1
collection_select not selecting the selected item
...uot;select", add_blank_option(
options_from_collection_for_select(
collection, value_method, text_method, value),
options[:include_blank]), html_options
[split for readability; looking at r1739, line 306:
http://dev.rubyonrails.org/svn/rails/trunk/actionpack/lib/action_view/helpers/form_options_helper.rb]
I''m wondering where the "value" item is coming from... If I remember
correctly, that should invoke self.value in the context of the method,
but what value will be returned ?
Can someone tell me where I''ve gone wrong ? I have been struggling with
this for the...
2005 Nov 04
0
RE: Why class InstanceTag is defined at 4 different places inRails
...t: Friday, November 04, 2005 4:31 PM
To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Subject: [Rails] Why class InstanceTag is defined at 4 different
places inRails
In Rails, the class InstanceTag is defined at 4 places:
active_record_helper.rb
date_helper.rb
form_helper.rb
form_options_helper.rb
I have a need to overrite the
def to_date_select_tag(options = {})
method of class InstanceTag defined in date_helper.rb . With
little background in Ruby I am finding it difficult to achieve
overwriting a method in an elegant way.
Is it a good design practice to have such big class...
2007 Apr 30
1
collection_select - prepending a "any" option
Say I have a normal <SELECT> tag being generated thusly:
<%= collection_select :task, :id, Task.find(:all), :id, :name %>
what is the easiest way to add a "ANY" option to the top of the option
list? I know Task.find(:all) returns a collection object, so is there
a unshift() for that?
well OK I tried:
Task.find(:all).unshift([:id=>0,
2010 Jul 16
31
Added associations but don't see generated methods
Hi,
I''ve got a Rails app working that includes two two classes, etc.:
Expense & Vendor. I eventually learned that the mental concept I had
of their relationship should be express in Rails as:
class Expense < ActiveRecord::Base; belongs_to :vendor; end
class Vendor < ActiveRecord::Base; has_many :expenses; end
2008 Jul 21
6
form_for and select ( => f.select)
Hi All
I''m trying to combine the from_for and select helpers
Right now I have
form_for :service, :url => ...... do |f|
select("abc", "xyz_id", @my_arr.collect {|item| [ item, "bla" ] },
{:prompt => "opt1"} )
....
end
What I want to do is something like
....
f.select("abc", "xyz_id", @my_arr.collect {|item|
2006 Jul 08
10
A rant about parameters
Guys,
I''ve been chasing a problem with country_select for the past few hours
now. My intention was pretty simple...use the following line in a form:
<p><label for="country_region">Country</label>
<%= f.country_select :country_region, "United States" %></p>
However, for the life of me, I couldn''t get it to work. I kept getting
2006 Mar 31
18
Modelling Foreign Keys
Can someone point me to a reference or tutorial that shows how to map
foreign key relationships in the model?
For example given:
Users
id
name
email
Posts
id
user_id
title
How do I associate user_id with users.id in the Post and User models?
has_many and belongs_to don''t seem to do it.
--
Posted via http://www.ruby-forum.com/.
Overriding date_select in local project to use custom value rather than blank for starting option...
2005 May 08
3
Overriding date_select in local project to use custom value rather than blank for starting option...
...hat you get using date_select with the
:include_blank => true option where the first value in the dropdown is
"- Month -", "- Day -", or "- Year -" rather than a blank value for
the respective month, day, and year select fields.
I took a look at the ruby source for form_options_helper.rb in
gems/actionpack-1.8.1/lib/action_view/helpers on my machine,
specifically the to_select_tag function and see that it could be
reasonably easy to override this method to do what I''d like (I''d need
to set an option at the date_select level for a label to use as well),
but I...