Displaying 20 results from an estimated 5000 matches similar to: "how do i get country_select and select to show values"
2007 Dec 06
8
Default value for country_select
Using Country_select how to have default valur set to United States.
I have a select drop down in my Ui to display the Country names.
But i need United tates to be selected as default value.
I use country_select to populate the country names.
This is how i use <%= f.country_select :country, :selected=>''United
States'' %>
i also tried
<%= f.country_select :country,
2006 Dec 10
1
how to add a class to country_select field
<%=country_select ''user'', ''country''%>
I have the above field, how can I add a class to this?
The api says this, if someone could explain how to get to the
html_options bit, without the others, that would be great?
country_select(object, method, priority_countries = nil, options = {},
html_options = {})
--
Posted via http://www.ruby-forum.com/.
2009 Jan 03
1
Not working country_select in Rails 2.2.2
country_select not working in Rails 2.2.2
How to fix it''
<%= country_select(:employee, :national, ["United States", "Russian
Federation"], {}) %>
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To
2005 Nov 04
0
ISO-3166 country_select
Hi Railers,
I need country_select to give me ISO-3166 country codes (the two letter
alphabetic "alpha2" ones). I''ve seen Multilingual Rails at:
http://www.tuxsoft.se/sv/oss/rails/multilingual
That has the function I need, but I really don''t need the rest of it, since
this is literally the only function I need. I''m wondering whether:
1. To install the
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
2011 Mar 11
0
Add tabindex to country_select
How do I add tabindex to a country_select?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
2005 Dec 08
0
#3136 - Country codes in country_select
http://dev.rubyonrails.org/ticket/3136
Simple patch, but in following with others I figured I''d post a quick
email to this list.
All this does is adds functionality of country_select to allow people to
build country select boxes that use country codes. It doesn''t modify
default behaviour, and the test suite has been updated.
I''ve seen a few people trying to figure out
2008 May 02
1
names of select elements inside a fields_for block not generated as expected
Hey All,
I''m trying to play along w/the ''complex forms 1'' railscast
(http://railscasts.com/episodes/73) and having trouble. The view is
projects/new. I''m trying to add some project_people to the form w/code
like so:
<% form_for(@project) do |f| %>
[project stuff here]
<% for pp in @project.project_person %>
<% fields_for
2009 Oct 15
4
Getting the object in fields_for
I''m using the fields_for helper with accepts_nested_attributes_for
The System model has_many children.
If I do this in my haml template:
-form_for @system do |s|
=s.text_field :name
-s.fields_for :children do |child_fields|
=child_fields.text_field :name
all is fine. The fields_for iterates over all children and puts the
correct data in the fields.
But...what I
2011 Feb 18
1
Rails plugins new official maintainers
Hey guys,
This is the final list of the new maintainers of each plugin.
We need two more things to do:
First please the owners of the repos add the rest of the maintainers.
Second I will add a note on each rails/plugin mentioning this repos updates.
So from now on, if someone else is interested in helping/contributing
please send a message to the appropriate repo owner.
verification
2008 Dec 02
4
Am I wrong or is fields_for not working right in Rails 2.2.2
I may be totally wrong about what the fields_for method is supposed to
do, but for some reason I thought using it scoped an object around an
association.
For example, I have a User class and when you''re creating a new user I
want to use fields_for to add a BillingAddress to the user like so:
<%- fields_for :billing_address do |billing_address_form| -%>
<%= render :partial
2009 Oct 15
1
fields_for weirdness
I just did a large upgrade to to Rails 2.3.4 and I am trying to make
use of the more modern view features.
I have a Newsletter object. Newsletter has many Sections.
I also have:
accepts_nested_attributes_for :sections
on the Newsletter object.
I have the typical scaffolded new.html.erb with:
<% form_for(@newsletter) do |f| %>
in there, I am trying to populate the first Section
2009 May 12
2
2.3 Nested Model Forms; build new without updating existing
I''m trying to build something similar to a Facebook messaging app, in
which the view displays all the messages for a particular thread, with
a form box for replying at the bottom of the thread.
The problem is that using fields_for generates form fields for each
existing record, and for one new record. In this case, there is no
need to edit existing messages - just a need to add new
2011 Apr 04
1
Best way to instanciate an empty address element in many nested fields_for
Hi!
I have 3 models, User, Company and Address.
Basically, a User belongs to a Company and an Address has one Company
(because it can be linked to other models).
In a form I want to display a User, its Company and its company Address,
with fields_for.
The problem is when my User has a Company, that does *not* have an Address:
the part containing the Address is not displayed.
I see 2 ways of
2011 Jul 25
4
[Rails 3.0.9] I have trouble about fields_for
Hi,all. I''m new bee to Rails and I have trouble about fields_for
method..
It isn''t show up between the <%= f.fields ~ <% end %>
Please teach me some advice.
Thanks!
#new/_form.html.erb
<%= form_for(@user) do |f| %>
<div class="field">
<%= f.label :name %><br />
<%= f.text_field :name %>
</div>
<!-- Below
2010 Aug 13
2
Rails 3 / ActiveModel for Credit Card information?
When submitting billing information in the past I''ve always used
attr_accessor for credit card details as they should not be saved in
the database. In addition I always end up storing the card
expiration date so that the date form helper works correctly.
With Active Model it seems logical to create a CreditCard class to
hold this data instead.
**1st issue.**
It seems there still
2012 Jan 20
3
Fields_for adding html (text) for hidden field
Hello all,
I''m getting this weird ''<input name value=''2'' type=''hidden'' />'' text
printed out in my form. See attached image. I''ve spent too much time
trying to figure it out already and it''s not going to stop me from
moving on for now.
As you can see it''s still very early on.
I''m using
2006 May 16
1
fields_for giving undefined method exception
I''m getting an undefined method exception with the fields_for method.
I''m following the gem examples. The form_for works but when I add
fields_for it breaks.
Are there other examples of how this works anywhere?
--
Posted via http://www.ruby-forum.com/.
2013 Dec 10
2
form_tag + fields_for Rails 4
Hi There,
I''m trying to user fields_for inside a form_tag, but i can''t catch it
on my controller.
I just take some html code off to makes it easy to read
my view...
i''m using campuses_path(current_church, @campus) instead form_for
@campus, because my route is like
resources :campuses, :path => ":church/campuses"
<%= form_tag
2011 Jul 11
2
Pre-populating association
Hello,
I think this is an easy one for the average Rails developer but I''m a bit stuck.
I''m creating a simple voting app: any user can create a survey, with any number of questions, and other users can then vote by creating a ballot for that survey.
Here''s the modeling:
class Survey < ActiveRecord::Base
has_many :questions
has_many :eligibilities
has_many