Hello,
I have a table called templates and have three columns in it
id of type int
template_name of type varchar
template_text of type text
I am getting the following error
undefined method `template_text’ for #<#Class:0x45ad828:0x45ad800>
have been trying to figure out for a while now. looksa very very easy
problem…
Also if i want to load value in the text_area when a template is
selected from the select field what should i write in the :value of the
text_area
<%form_for
:template,@template,:url=>{:controller=>“template”,:action=>“submit_tag”}
do |t|%>
<%=t.select(:id,Template.find(:all).collect{|tem|[tem.template_name,tem.id]},{:prompt=>"-Select
a template"})%>
<%=submit_tag(‘Apply Template’, :name=>“submit”)%>     
<%=link_to (“Create
Template”,{:controller=>“template”,:action=>“create_template”})%>
    
<%=link_to(“Update
Template”,{:controller=>“template”,:action=>“update_template”,:id=>t.id})%>
    
<%=link_to(“Update
Template”,{:controller=>“template”,:action=>“delete_template”,:id=>t.id})%>
<%=t.text_area(“template_text”,:name=>“textarea”,:cols=>50,:rows=>600)%>
<%end%>
Please help.
Thank you.