Hello. I have a problem with rails. I have a filed in a table that is of double type. When I show the view, a default value is shown, but there is no default value in the database. How can I override this? Thanks -- 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 -~----------~----~----~----~------~----~------~--~---
Hi Pedro Cardoso, This problem is surely interesting, but it would be very helpful if you could some info. about your migration/ model. I didn''t observe this behavior in my application, which also had a ''double'' field. -- askme On Mar 23, 10:27 am, Pedro Cardoso <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hello. > > I have a problem with rails. > > I have a filed in a table that is of double type. When I show the view, > a default value is shown, but there is no default value in the database. > How can I override this? > > Thanks > > -- > Posted viahttp://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 -~----------~----~----~----~------~----~------~--~---
askme wrote:> Hi Pedro Cardoso, > > This problem is surely interesting, but it would be very helpful if > you could some info. about your migration/ model. I didn''t observe > this behavior in my application, which also had a ''double'' field. > > -- askme > > On Mar 23, 10:27 am, Pedro Cardoso <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>What kind of info do you need? BTW: I solve it making it equal to null before I render the view -- 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 -~----------~----~----~----~------~----~------~--~---
The model definition/ migration definition can shed some light on the problem. -- askme On Mar 23, 12:05 pm, Pedro Cardoso <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> askme wrote: > > Hi Pedro Cardoso, > > > This problem is surely interesting, but it would be very helpful if > > you could some info. about your migration/ model. I didn''t observe > > this behavior in my application, which also had a ''double'' field. > > > -- askme > > > On Mar 23, 10:27 am, Pedro Cardoso <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > > What kind of info do you need? > > BTW: I solve it making it equal to null before I render the view > > -- > Posted viahttp://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 -~----------~----~----~----~------~----~------~--~---
askme wrote:> The model definition/ migration definition can shed some light on the > problem. > > -- askme > > On Mar 23, 12:05 pm, Pedro Cardoso <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>This is the line from the DDL that maters [...] global_cost double(100,10) NOT NULL,[...] Everything else is pure Rails -- 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 -~----------~----~----~----~------~----~------~--~---