> Anyone have any further insight on this one - it's still not solved for
> me, should I look perhaps at altering my database configuration or
> perhaps it's something in the migration that sets up these attributes?
> No clue but something means I cannot save a text type attribute to the
> db that begins with a newline character - daft!
I don't remember the history of this that well, but you need to break the
process up into discrete steps.
- Connect to your database directly (not via rails/ruby!) and using plain SQL
insert data with whitespace. Check it with SQL and see if the white space is
still there. If it is, then your database is okay. If it isn't, your database
is doing something. Figure out why.
- Setup a simple web form that simply spits the output back to the page and
logs it to the development log. Do not touch the database at all. If that
works, then Rails (sans AR) is working right. If it doesn't, for kicks, try a
different browser. Maybe you have some funky plugin that is stripping white
text for you.
- Now, use rails console to run the *same* query you ran earlier via
Model.connection.execute('sql here') and again to get it out. Does that work?
If not, then the problem is in your ruby<->db adapter most likely. If it does
work...
- Insert data into your model using normal AR methods. If this doesn't work,
then you've got something in that model that is doing it.
Basically... break it all apart and see what works and what doesn't... you've
got way too many steps b/n "web form" and "database" to know where the problem
is without doing this...
-philip
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.