[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

text columns

madcowley

9/16/2006 4:52:00 AM

Ok, this is probably a stupid question: how to handle mysql text
columns in rails?

<%= @foo.text_column_name %> returns ###

<%= @foo.send('text_column_name') %> returns #<object reference>

Using the scaffold-generated edit view, I see the text but saving it
returns "expected <column name> and got string".

I need to store text longer than 255 chars, so varchar won't work
(until we upgrade mysql..)

I know it's something simple..

Thanks

2 Answers

Matt Todd

9/16/2006 10:55:00 AM

0

> Ok, this is probably a stupid question: how to handle mysql text
> columns in rails?
>
> <%= @foo.text_column_name %> returns ###
>
> <%= @foo.send('text_column_name') %> returns #<object reference>

I'll be honest: I don't completely understand the situation. Where is
@foo assigned a value?

Also, you might just find that there is better support for
Rails-specific problems (if that ends up being the case) on the
RubyOnRails.org mailing list, rather than here. Or, you can get on IRC
and talk it up on #rubyonrails. You'll find that we mainly deal with
non-Rails stuff.

M.T.

madcowley

9/16/2006 6:05:00 PM

0


thanks, i've moved the question over to the rails group.