I have read and read and obvisouly I am not getting something. Basically I am wanting to have a check box checked if the value of a database field is set to 1. Here is my code. <% for prod_detail in @product.prod_detail %> <p> <b>Color:</b><%= prod_detail.color %></br> <b>Size:</b><%= prod_detail.size %></br> <b>Price:</b><%= prod_detail.price %></br> <b>Available:</b> --this is always unchecked even though available is one in the database <%= check_box ("available", prod_detail.available) %> --this actually works. <input type="checkbox" name="available[<%= prod_detail.id %>]" value="<%= prod_detail.available %>" <% if prod_detail.available == 1 %> checked="checked" <% end %> /> </p> <% end %> So why does one work and the other does not? Thanks in advance Thom -- 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 -~----------~----~----~----~------~----~------~--~---
Hi! Try this: <%= check_box ("available", prod_detail.available?) %> 1 != true in ruby. Markus On 9/22/06, Thom Morrow <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > I have read and read and obvisouly I am not getting something. Basically > I am wanting to have a check box checked if the value of a database > field is set to 1. Here is my code. > > > <% for prod_detail in @product.prod_detail %> > <p> > <b>Color:</b><%= prod_detail.color %></br> > <b>Size:</b><%= prod_detail.size %></br> > <b>Price:</b><%= prod_detail.price %></br> > <b>Available:</b> > > --this is always unchecked even though available is one in the database > <%= check_box ("available", prod_detail.available) %> > > --this actually works. > <input type="checkbox" name="available[<%= prod_detail.id %>]" > value="<%= prod_detail.available %>" > <% if prod_detail.available == 1 %> checked="checked" <% end > %> /> > > </p> > <% end %> > > So why does one work and the other does not? > Thanks in advance > Thom > > -- > 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 -~----------~----~----~----~------~----~------~--~---
Markus Piff wrote:> Hi! > > Try this: > > <%= check_box ("available", prod_detail.available?) %> > > 1 != true in ruby. > > Markus > > On 9/22/06, Thom Morrow <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > > > > > I have read and read and obvisouly I am not getting something. Basically > > I am wanting to have a check box checked if the value of a database > > field is set to 1. Here is my code. > > > > > > <% for prod_detail in @product.prod_detail %> > > <p> > > <b>Color:</b><%= prod_detail.color %></br> > > <b>Size:</b><%= prod_detail.size %></br> > > <b>Price:</b><%= prod_detail.price %></br> > > <b>Available:</b> > > > > --this is always unchecked even though available is one in the database > > <%= check_box ("available", prod_detail.available) %> > > > > --this actually works. > > <input type="checkbox" name="available[<%= prod_detail.id %>]" > > value="<%= prod_detail.available %>" > > <% if prod_detail.available == 1 %> checked="checked" <% end > > %> /> > > > > </p> > > <% end %> > > > > So why does one work and the other does not? > > Thanks in advance > > Thom > > > > -- > > Posted via http://www.ruby-forum.com/. > > > > > > > >Actually, only ''false'' and ''nil'' are false in ruby. The reason check_box isn''t working for you is because you aren''t using it properly. <%= check_box ''prod_detail'', ''available'' %> should work, although it might be looking for an instance variable so you may need to use @prod_detail instead. _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 -~----------~----~----~----~------~----~------~--~---
_Kevin wrote:> Markus Piff wrote: >> On 9/22/06, Thom Morrow <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >> > <b>Size:</b><%= prod_detail.size %></br> >> > %> /> >> > >> > > >> > >> > > Actually, only ''false'' and ''nil'' are false in ruby. The reason > check_box isn''t working for you is because you aren''t using it > properly. > > <%= check_box ''prod_detail'', ''available'' %> > > should work, although it might be looking for an instance variable so > you may need to use @prod_detail instead. > > _KevinWell Kevin and Markus, I appreciate all you have done but neither worked. Do you have any other suggestions? -- 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 -~----------~----~----~----~------~----~------~--~---
Checkboxes in HTML are only trasnsmitted if they are set. For this reason, most seriousapplications depending on accurate checkbox state write their own checkbox idiom. I use a cell in a table contraining a hidden input field, and set the background image to eithe cbChecked.png or cbUnchecked.png based on teh contents of the input field. The onclick event of the table cell is hooked to javascript that sets or clears the hidden input field text. The hidden input field is named in a manner that is parseable by Rails, depending on the purpose of the application. My checkbox idiom is: function checkboxClick(element) { inputValue = element.firstChild if (inputValue.getAttribute ("value") == "off") { inputValue.setAttribute ("value", "on") element.setAttribute ("background","/images/cbChecked.png"); } else { inputValue.setAttribute ("value", "off") element.setAttribute ("background","/images/cbUnchecked.png"); } } <td background="<%answer.iscorrect==''Y''?''/images/cbChecked.png'':''/images/cbUnchecked.png'' %>" onClick="checkboxClick(this)"><input type="hidden" name="iscorrect[]" value="<%= answer.iscorrect==''Y''?''on'':''off'' %>" style="background-repeat: no-repeat"/></td> Thom Morrow wrote:> _Kevin wrote: > > Markus Piff wrote: > >> On 9/22/06, Thom Morrow <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > >> > <b>Size:</b><%= prod_detail.size %></br> > >> > %> /> > >> > > >> > > > >> > > >> > > > > Actually, only ''false'' and ''nil'' are false in ruby. The reason > > check_box isn''t working for you is because you aren''t using it > > properly. > > > > <%= check_box ''prod_detail'', ''available'' %> > > > > should work, although it might be looking for an instance variable so > > you may need to use @prod_detail instead. > > > > _Kevin > > Well Kevin and Markus, I appreciate all you have done but neither > worked. Do you have any other suggestions? > > -- > 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 -~----------~----~----~----~------~----~------~--~---
Wow that is interesting. Thanks?!? But I would still like to know how to use check_box. Thanks again. This is my first post here and I love the responsiveness. thanks Thom -- 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 -~----------~----~----~----~------~----~------~--~---
My personal experience is use it for waste paper. This is also what I have seen in serious commercial web apps that I have dissected. On Thursday 21 September 2006 21:50, Thom Morrow wrote:> Wow that is interesting. Thanks?!? > > But I would still like to know how to use check_box. > > > Thanks again. > > This is my first post here and I love the responsiveness. thanks > > > Thom--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
David Johnson wrote:> My personal experience is use it for waste paper. > > This is also what I have seen in serious commercial web apps that I have > dissected. > > On Thursday 21 September 2006 21:50, Thom Morrow wrote: > > Wow that is interesting. Thanks?!? > > > > But I would still like to know how to use check_box. > > > > > > Thanks again. > > > > This is my first post here and I love the responsiveness. thanks > > > > > > ThomTake a look at this.. http://railsmanual.com/module/ActionView%3A%3AHelpers%3A%3AFormHelper/check_box You probably are just not setting up the instance variables correctly. It really does work well, but it''s kind of hard to debug with so little of your code. FYI, the rails check-box helper has a work around for submitting when it''s not checked. _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 -~----------~----~----~----~------~----~------~--~---
The business problem being solved was creating and editing a multiple choice question. I was looking for iscorrect[]={''N'',''Y'',''N''} to parallel the array of answerText[] = {''bla bla bla'',''mam mam mam'',''ya ya ya''}. This well-published but clumsy workaround produced iscorrect[]={''Y'',''Y'',''Y'',''Y''}, which is neither correct nor decipherable into a correct answer. The error is not with Rails, but with the assumptions of the HTML specification writers surrounding the usage of checkboxes (if it isn''t checked you don''t want to know about it). It is a well known issue with a well published alternative pattern that works in all cases, regardless of the language platform or application framework of choice. On Thursday 21 September 2006 22:25, _Kevin wrote:> Take a look at this.. > > http://railsmanual.com/module/ActionView%3A%3AHelpers%3A%3AFormHelper/check >_box > > You probably are just not setting up the instance variables correctly. > It really does work well, but it''s kind of hard to debug with so little > of your code. > > FYI, the rails check-box helper has a work around for submitting when > it''s not checked. > > _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 -~----------~----~----~----~------~----~------~--~---
Th alternative iscorrect[]={''N'',''Y'',''N'',''N''} requires enough extra work to process that it is still not "better" than the pattern I finally used that simply returns what I need in the first place. On Friday 22 September 2006 01:03, David Johnson wrote:> This well-published but clumsy workaround produced > iscorrect[]={''Y'',''Y'',''Y'',''Y''}, which is neither correct nor decipherable > into a correct answer.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
_Kevin wrote:> David Johnson wrote: >> > >> > Thanks again. >> > >> > This is my first post here and I love the responsiveness. thanks >> > >> > >> > Thom > > Take a look at this.. > > http://railsmanual.com/module/ActionView%3A%3AHelpers%3A%3AFormHelper/check_box > > You probably are just not setting up the instance variables correctly. > It really does work well, but it''s kind of hard to debug with so little > of your code. > > FYI, the rails check-box helper has a work around for submitting when > it''s not checked. > > _KevinWhat additional code do I need to put up here? I basically created a database and then the generic model, controller, view. Nothing fancy at all. I have written no code to speak of. Maybe I should have put NOOB in all caps because I feel pretty stupid at this point. -- 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 -~----------~----~----~----~------~----~------~--~---
On Friday 22 September 2006 07:08, Thom Morrow wrote:> Maybe I should have put NOOB in > all caps because I feel pretty stupid at this point.I have about 30 years programming experience, and I chased my tail for a week on this one. The ones who should feel stupid are the people that figured that a checkbox''s contents should only be transmitted if it is set, when they put together the specification for the widget in the HTML specification. That''s why I''m partial to a single code idiom that is guaranteed to work for all situations. Unfortunately, now I have to work out what to do for text browsers like lynx :o(. Fortunately, they are not a big player for my curent target audience. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thom, What works for me is instead of the database field being set to 1 (tinyint) It is set to true (boolean). I have confirmed that this does not work in oracle through, as my friend and I had the same problem, his database was mysql and mine was oracle. (his works). Something about my oracle that doesn''t do true, only 1s... HTH --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
@Thom: This doesn''t work for you? <% for @prod_detail in @product.prod_detail %> <p> <b>Color:</b><%= prod_detail.color %></br> <b>Size:</b><%= prod_detail.size %></br> <b>Price:</b><%= prod_detail.price %></br> <b>Available:</b> <%= check_box ("prod_detail","available") %> </p> <% end %> Notice some changes to your code You had <% for prod_detail in @product.prod_detail %> I have <% for @prod_detail in @product.prod_detail %> Secondly, you had <%= check_box ("available", prod_detail.available) %> I had <%= check_box ("prod_detail", "available") %> Notice that the check_box takes two params + options..... OBJECT, METHOD. If you want "prod_detail.available" you use it just like a text field I have similar code in an app I''m using right now and it works fine... no need for strange workarounds as the check_box helper already adds a hidden field to handle those situations where the value is uncheked. On 9/21/06, Thom Morrow <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > I have read and read and obvisouly I am not getting something. Basically > I am wanting to have a check box checked if the value of a database > field is set to 1. Here is my code. > > > <% for prod_detail in @product.prod_detail %> > <p> > <b>Color:</b><%= prod_detail.color %></br> > <b>Size:</b><%= prod_detail.size %></br> > <b>Price:</b><%= prod_detail.price %></br> > <b>Available:</b> > > --this is always unchecked even though available is one in the database > <%= check_box ("available", prod_detail.available) %> > > --this actually works. > <input type="checkbox" name="available[<%= prod_detail.id %>]" > value="<%= prod_detail.available %>" > <% if prod_detail.available == 1 %> checked="checked" <% end > %> /> > > </p> > <% end %> > > So why does one work and the other does not? > Thanks in advance > Thom > > -- > 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 -~----------~----~----~----~------~----~------~--~---
Brian Hogan wrote:> @Thom: > > This doesn''t work for you? >You had> <% for @prod_detail in @product.prod_detail %> > <p> > <b>Color:</b><%= prod_detail.color %></br> > <b>Size:</b><%= prod_detail.size %></br> > <b>Price:</b><%= prod_detail.price %></br> > <b>Available:</b> > <%= check_box ("prod_detail","available") %> > </p> > <% end %>I changed to You had> <% for @prod_detail in @product.prod_detail %> > <p> > <b>Color:</b><%= @prod_detail.color %></br> > <b>Size:</b><%= @prod_detail.size %></br> > <b>Price:</b><%= @prod_detail.price %></br> > <b>Available:</b> > <%= check_box ("prod_detail","available") %>I had to at the @ in front of all of the prod_details and it worked. Thanks so much........ I wish I understood why that worked but I am stoked now. -- 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 -~----------~----~----~----~------~----~------~--~---
The helpers like text_field, etc expect an instance variable (defined with @) to do some of their magic. You''ll run into this a lot. On 9/22/06, Thom Morrow <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > Brian Hogan wrote: > > @Thom: > > > > This doesn''t work for you? > > > You had > > <% for @prod_detail in @product.prod_detail %> > > <p> > > <b>Color:</b><%= prod_detail.color %></br> > > <b>Size:</b><%= prod_detail.size %></br> > > <b>Price:</b><%= prod_detail.price %></br> > > <b>Available:</b> > > <%= check_box ("prod_detail","available") %> > > </p> > > <% end %> > > I changed to > You had > > <% for @prod_detail in @product.prod_detail %> > > <p> > > <b>Color:</b><%= @prod_detail.color %></br> > > <b>Size:</b><%= @prod_detail.size %></br> > > <b>Price:</b><%= @prod_detail.price %></br> > > <b>Available:</b> > > <%= check_box ("prod_detail","available") %> > > I had to at the @ in front of all of the prod_details and it worked. > Thanks so much........ > > I wish I understood why that worked but I am stoked now. > > -- > 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 -~----------~----~----~----~------~----~------~--~---
Brian Hogan wrote:> The helpers like text_field, etc expect an instance variable (defined > with > @) to do some of their magic. You''ll run into this a lot.Ok... I officially hate checkboxes... Here is the next problem This section works great <% for @prod_detail in @product.prod_details %> <p> <b>Color:</b><%= @prod_detail.color %></br> <b>Size:</b><%= @prod_detail.size %></br> <b>Price:</b><%= @prod_detail.price %></br> <b>Available:</b> <%= check_box ("prod_detail","available") %> </p> <hr /> <% end %> When I added this to the bottom the text field is already filled out with what is in the data that is in the last record of the table. I.E. if the last record is blue for color then the text field has a value of blue. If I remove the @ from the prod_detail after the for and the color,size,price it works fine but then the check box stops functioning again. AHHHHHHHHHH <%= form_tag :action => "prod_add", :id => @product%> <%= text_field "prod_detail", "color"%> <%= submit_tag "Add Option"%> </form> Thanks in advance AGAIN.... Thom -- 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 -~----------~----~----~----~------~----~------~--~---
No one want to take a crack at why it is doing this??? -- 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 -~----------~----~----~----~------~----~------~--~---
The issues that have been explored so far in this thread are: 1. The HTML specification for checkboxes is not ideal, so many serious web apps write their own checkboxes. The standard idiom for a graphical checkbox widget was supplied. 2. @prod_detail and prod_detail are two distinctly different variables. the former is an instance scoped variable, and the other is method scoped. The @ is actually meaningful in the variable''s name. 3. MySQL supports a non-standard boolean type, which SQL-92 compliant RDBMS'' gnererally do not support. The standard idioms for representing booleans in SQL-92 compliant databases are char(1) constrained to ''Y''/''N'', ''T''/''F'', or ''1''/''0'', or numeric(1) constratined to 1/0. I don''t really know what else there is to cover. At this point, it might be worthwhile to put "p @prod_detail" and/or "p prod_detail" on every other line and watch the contents of @prod_detail in your terminal window. On Monday 25 September 2006 07:45, Thom Morrow wrote:> No one want to take a crack at why it is doing this???--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---