You should post other parts of your code: as I said that model is ok. Probably there is some problem in your views.
ciao dd On Thu, Mar 31, 2011 at 8:55 AM, DJ <[email protected]> wrote: > A problem from a relative Noob (lots of previous programming > exprerience, new to Rails and Ruby). Any help gratefully received: > > I'm having trouble understanding what is wrong with this patient.rb > model file. I have merely substituted ":string" with > enum_string(:male, :female) it causes the exception: > > NoMethodError in Patients#show > > Showing controller: patients; dryml-tag: show-page where line #1 > raised: > > undefined method `underscore' for nil:NilClass > Extracted source (around line #1): > > The model is as follows: > > > class Patient < ActiveRecord::Base > > hobo_model # Don't put anything above this > > fields do > first_name :string > last_name :string > initials :string > title :string > gender enum_string(:male, :female) # > <=========== this line causes an error > date_of_birth :date > timestamps > end > > > (NB, I posted this to lighthouse as a ticket but ddnexus found no > error). > > Thanks again for any pointers. > > DJ > > -- > You received this message because you are subscribed to the Google Groups > "Hobo Users" 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/hobousers?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Hobo Users" 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/hobousers?hl=en.
