Hi Truong,

This question is appropriate for rubyonrails-talk not rubyonrails-core.

Core is for discussing development of the Rails framework itself.

Cheers,
Alan

On Mon, Jun 2, 2008 at 5:09 PM, Truong Thanh Hai
<[EMAIL PROTECTED]> wrote:
> Hello I just started messing around with RoR yesterday. I have a simple
> little data entry app I'm learning on currently. I just set it up with the
> scaffold command and then used rake to make the db for me.
>
> I have the fields all set up as "string" so they all by default from the
> scaffold use this same text boxes in the new.html.erb file
> Code:
>
> <% form_for(@beer) do |f| %>
>   <p>
>     <b>Name</b><br />
>
>     <%= f.text_field :name %>
>   </p>
>
> My question is what is the do |f| actually doing. What is |f| referring to?
> Also how can I use a grouping of radio buttons to submit information as well
> as a select box with set options? (I want to have a "yes", "no", and
> "maybe") radio group for one of my fields and I want a select box with the
> US States in it.
>
> I have looked up the form stuff and all i could get it to do was display a
> radio button that did nothing when submitted. - I think this is probably my
> lack of understanding of 'f.'
>
> I know it has to be a simple little thing and I look like a real noob for
> asking - but hey, I am a noob! I'm really excited about learning more RoR as
> I go on - its really fun so far.
>
> Thanks!
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to