text columns

M

madcowley

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
 
M

Matt Todd

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,212
Messages
2,571,101
Members
47,695
Latest member
KayleneBee

Latest Threads

Top