similar to: Why is select helpers not using options in add_default_name_and_id ?

Displaying 20 results from an estimated 1000 matches similar to: "Why is select helpers not using options in add_default_name_and_id ?"

2006 Nov 23
1
Select Tag not working in 1.2rc1
I''m getting the following error message under rc1: ActionView::TemplateError (wrong number of arguments (1 for 0)) on line #54 of app/views/admin/admin_index.rhtml: In my view (* = Line 54): <%=start_form_tag(:action=>"sales_by_author")%> *<%=select("author","id",@authors.collect {|a| [a.name,a.id]})%> <%=submit_tag("Go")%>
2007 Jul 17
5
habtm confusion
Hello friends! I am trying to make a database that will have a group of people set to committees, and a person can be in multiple committees, and a committee obviously has multiple people. The people are senators at my university. These are my current models: senator.rb: -- class Senator < ActiveRecord::Base validates_presence_of :first_name, :last_name, :floor has_and_belongs_to_many
2005 Nov 15
2
FormOptionsHelper select call failing
In Rails 0.14.3, I''m doing the following in a view: <%= select ''folder'', ''format'', [''a'', ''b'', ''c''] %> This line in is failing with: ActionView::TemplateError (too few arguments.) Am I calling select incorrectly? (Yes, the @folder object does exist, and does have an attribute
2007 Dec 07
4
strange error on mock proxy
I''m banging my head over this really strange error in a view test when I run "rake spec". The weird thing is that I don''t get the error when I run the spec file by itself. Here is the spec (I know, fixtures are the devil): describe "/units/new.html.erb here" do fixtures :units, :accounts, :groups it_should_behave_like
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
2008 Aug 14
0
facebook_form_builder.rb - add_default_name_and_id
Hi there, I have a model called SignUp with a couple of text_fields and a datetime_select. When I was trying to build a form using the facebook_form_for helper, I realized that the controller was getting values from datetime_select correctly but was missing data from the text fields. I narrowed down the issue to add_default_name_and_id method and when changed it from def
2005 Feb 13
5
Select Enumerated Values with FormOptionsHelper
Hey, I''m new, so apologies if I''ve overlooked obvious resources or violated any etiquette rules for this list. Since rails does not support the MySQL enum data type, I''m following David''s advice of using a varchar and storing the valid values in the application: http://one.textdrive.com/pipermail/rails/2005-January/001536.html So here''s my
2005 Jul 06
1
collection_select not selecting the selected item
Hi ! I have Event belongs_to Category. The generated source is: <p><label for="event_category">Category</label><br/> <select id="event_category" name="event[category]"> <option value="8">Introduction</option> <option value="7">Programming</option> </select></p> Notice no
2005 Jun 13
3
validations not working with collection population droplists
I have an ADD form with foreign key field values selectable via select list ( collection_select (...)). When I add validates_presence_of :someotherfield to my model for error trapping, I get the following error for each droplist: NoMethodError in Reviews#create_curriculum Showing /reviews/_form.rhtml where line #16 raised: undefined method `inject'' for nil:NilClass Extracted source
2006 May 30
0
Problems when applying search to filter rows.
Hello, I am trying to create in the main Layout of the application fields of selection of fields of the model, and other to insert its value. Next I put a search button, with the idea to leak by the search in the view of the model where it executes this button. I have generated the views with ajaxscaffold. I do not know if what I try to do it does of this form or another one. My code is the
2009 Feb 09
0
submit_to_remote change from 2.1 to 2.2 now gives wrong number of arguments
Hi, this snippet <%= submit_to_remote(''create_button'', ''Add Phone'', :submit => "phone_form", :url => send( "#{@phonable_type.to_s.downcase.singularize}_phones_path", @phonable_id),
2008 Jun 26
2
Problem with date_select after Rails 2.1 upgrade
Folks, I think I should start a new thread for this, because a similar one I saw is a bit old and the resolution there doesn''t seem to apply to what I''m running into now. Anyway, my date_select calls are bombing on me with the exception: ---- ActionView::TemplateError (wrong number of arguments (3 for 2)) on line #8 of entries/_dates_form.haml: 8: = date_select(
2005 May 08
3
Overriding date_select in local project to use custom value rather than blank for starting option...
I would like to have a date control on a page and I would like a behavior similar to what 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
2006 Feb 27
0
Simple Namespace Question
I put the following code into my application_helper.rb file, which will allow super fancy ajax pagination blah blah blah. Now the problem is, it''s not being identified. I''m running Rails 1.0.0, and froze edge, so it''s sitting in /vendor. The actual pagination_helper.rb file is appropriately sitting in: /vendor/rails/actionpack/lib/action_view/helpers
2010 Aug 14
0
[rails3.0.0.beta4] extend form_tag to always include a hidden field
hi there, I want every form in the site to add a hidden_field, basically I want them to always submit the I18n.locale, I''ve tried to alias form_tag_html method of ActionView::Helpers::FormTagHelper like this: # in #{MY_APP_ROOT}/lib/action_view/helpers/form_tag_helper.rb module ActionView::Helpers::FormTagHelper def form_tag_html_with_locale(html_options) form =
2008 Feb 12
0
button_to problem http://localhost:3000/art/151470;edi
hi all, now i am facing problem with button_to , it shows the path like http://localhost:3000/art/151470;edit instead of http://localhost:3000/art/edit/151470 the path is not displaying problem, so i got the error , no route found. in application_helper : def button_to(name, options = {}, html_options = nil) html_options = html_options.stringify_keys
2007 Mar 09
0
different mouse event when using link_to_remote
Anybody a have better method for having an onmouseover (or any event). This is the method used but its not as pretty and has to be done for every mouse event. def link_to_remote_mover(name, options = {}, html_options = {}) link_to_function_mover(name, remote_function(options), html_options) end def link_to_function_mover(name, *args, &block) html_options =
2007 Mar 09
0
link_to_remote with onmouseover event
Anyone have a better method for having the onmouseover event (or any other mouse event) instead of onclick when using link_to_remote: This is what I did, but I''d i have to create one for every mouse event, can''t figure out how to call a mouse event via an argument . anyone else run into this problem. Thanks def link_to_remote_mover(name, options = {}, html_options
2006 Feb 27
0
Example code for select_from_db (a.k.a. combo box)
I''m not asking for help this time! :) :) In almost every Rails project I create, I find that I want a select() popup menu that is pre-populated by data from the database. Also, I want an "Other..." option that presents a text_field_tag to input another (not presented) option (basically a combo-box). In an attempt to be as DRY as possible, I''ve come up with
2005 Nov 29
0
undefined method `link_to'
Hi, all I''m trying call link_to from another helper but got this error: undefined method `link_to'' for module `UserHelper'' how can I get access to helper from another helper? this is my users_helper.rb: module UsersHelper alias ink_to_original link_to alias link_to link_to_permission def link_to_permission(name, options = {}, html_options = nil,