ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> rubyonrails-talk
rubyonrails-talk
[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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved