Hello,
Background:
Development is done using InstantRails on a Windows Machine and MySQL
Database.
Production environment is a Debian server running a mongrel cluster w/
apache, connected to a MSSQL 2005 database server.
*** This only happens in production ***
I''m having problem on our production app where when model has several
validating text fields. The columns are nullable in the database. The
value of the string field is initially NULL in the database. When the
model is edited and saved, an empty string is written to the database.
Then when I go to edit the model again, the text field in the html form
has a value of " ". Somehow this breaks my app with an error message
totally unrelated:
undefined method `inject'' for nil:NilClass
Extracted source (around line #28):
25:
26: <tr>
27: <td><label
for="employee_supervisor">Supervisor</label></td>
28: <td><%= collection_select("employee",
"supervisor_id" ,
@employees, "id", "display_name") %></td>
29: </tr>
30:
31: <tr>
If I edit the model again, and just delete the " " value so
it''s an
empty string, the save works fine. Why is ActiveRecord putting a space
character into the text field instead of an empty string?
Does anyone have any help /pointers / experience with MSSQL ?
Thanks,
Kevin
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
kevincolyar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Dec-18 17:54 UTC
Space Character in Textbox
Hello,
Background:
Development is done using InstantRails on a Windows Machine and MySQL
Database.
Production environment is a Debian server running a mongrel cluster w/
apache, connected to a MSSQL 2005 database server.
*** This only happens in production ***
I''m having problem on our production app where when model has
several
validating text fields. The columns are nullable in the database.
The
value of the string field is initially NULL in the database. When the
model is edited and saved, an empty string is written to the database.
Then when I go to edit the model again, the text field in the html
form
has a value of " ". Somehow this breaks my app with an error message
totally unrelated:
undefined method `inject'' for nil:NilClass
Extracted source (around line #28):
25:
26: <tr>
27: <td><label
for="employee_supervisor">Supervisor</label></td>
28: <td><%= collection_select("employee",
"supervisor_id" ,
@employees, "id", "display_name") %></td>
29: </tr>
30:
31: <tr>
If I edit the model again, and just delete the " " value so
it''s an
empty string, the save works fine. Why is ActiveRecord putting a
space
character into the text field instead of an empty string?
Does anyone have any help /pointers / experience with MSSQL ?
Thanks,
Kevin
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---