Er, yeah, that's not going to work. It's actually part of the Ruby standard
lib as part of CGI::HtmlExtension, and now that I'm looking at it more
closely, it's not compatible with Rails use. My bad. Rails only supports
the radio_button helper, as Jim pointed out.
On Mon, Feb 21, 2011 at 2:10 A
On Mon, Feb 21, 2011 at 2:06 AM, Chris Kottom wrote:
> Ah, yes. Sorry about that. The radio_group method isn't a part of the
> FormBuilder, so while you can still call it within the scope of the form_for
> block, you can't call it the way I told you to.
So there really is a radio_group helper
Ah, yes. Sorry about that. The radio_group method isn't a part of the
FormBuilder, so while you can still call it within the scope of the form_for
block, you can't call it the way I told you to.
You will need to call it similar to:
<%= form_for @post do |f| %>
...
<%= radio_group "pos
it should be f.radio_button. more samples at
http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-radio_button
On Sun, Feb 20, 2011 at 10:29 PM, señor tower wrote:
> Chris, thanks.
> but iam getting an this error after trying your code:
>
> *undefined method `radio_grou
Chris, thanks.
but iam getting an this error after trying your code:
*undefined method `radio_group' for
#*
am not sure if it is because this is a rails 3 app?
I googled this error but noting seemed helpful
<%= f.radio_group :postType_id, PostType.all(:order => "name ASC").map {|pt|
[ pt.id, pt.
I think you're looking for something like radio_group. Based on your
previous example, I would code it as:
<%= f.radio_group :postType_id, PostType.all(:order => "name ASC").map
{|pt| [ pt.id, pt.name ] }
On Sun, Feb 20, 2011 at 5:21 AM, oliver torres wrote:
> Hi all, am writing a simple ap
Hi all, am writing a simple app that lets me pick a post type to go
under National or International.
the code bellow generates a drop-down from where I can pick the
options
<%= f.collection_select :postType_id, PostType.all(:order => "name
ASC"), :id, :name %>
what would be the syntax for
7 matches
Mail list logo