[Rails] Form Blocks
by Nigel.Bris other posts by this author
Aug 12 2007 11:52PM messages near this date
[Rails] Is validates_uniqueness_of transaction safe?
|
[Rails] Re: Form Blocks
Hi,
How do I get a value out of a form block
eg.
<% form_for :order do |form_block| %>
<%= form_block.text_field :name, :size => 40 %>
<% end %>
If within that block I wanted to get the value of an attribute like
age, how cold you get that from the form_block instance? eg
form_block.age (i realise this does not work). I could just do
@order.age but I need to check from a helper where the block is only
sen to it.
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Ta
lk" group.
To post to this group, send email to rubyonrails-talk@[...].com
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@[...].com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Thread:
Nigel.Bris
dblack
Carolene
Nigel.Bris
|