On 23 March 2010 16:35, andrew <andrew.ggroups@gmail.com> wrote:
> Ok, I'll clean up the variable names. Thanks! :)
>
> However....
>
> <%=h comment.txt %> undefined method `text'
> <%= text %> and <%=h text %> give undefined local variable or method
> `text'
>
> Neither of those ideas work. :(
Well what *is* your "a/comment" variable? Have you debugged it to see
what's going on in that block? Do you *know* what methods it's got, or
are you assuming there's a "text" method?
You can use <% puts .... %> or <% logger.info .... %> to output
messages to help you diagnose what's going on. Personally, I prefer to
use breakpoint debugging in Netbeans.
does 'puts a.respond_to("text")' display true?
what does 'puts a.inspect' give you?
--
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-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment