List Info

Thread: syntax for text_field




syntax for text_field
country flaguser name
Germany
2007-12-31 23:44:28
Hi....
 I have two tables named cis and software_cis which are
polymorphically
related.
In the interface for editing the data in software_cis table,
i specified
the text_field component as
    <label for="ci_name">Name</label>
    <%= text_field 'ci.content', 'name'  %>

But it printed an error:
 `ci.content' is not allowed as an instance variable
name

When i give <%= ci.content.name%> the name field from
software_cis
table is
printed. So please tell me the correct syntax of text_field.
How can i
refer the software_cis table using model ci?

Regards
Suneeta
-- 
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-talkgooglegroups.com
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )