On Wed, Jan 19, 2011 at 5:58 PM, abdelkrim fitouri <[email protected]>wrote:
> hello every body ! > > i have a little problem > > i have created a scaffold Zone witch contain : name , interface and > description as attribute > > all works fine but when i add this line to my model : > > class Zone < ActiveRecord::Base > > validates_presence_of :name, :message => "Missing name " > > end > > i have an error when the name is empty ! > > > > this is the error : > > You have a nil object when you didn't expect it! > You might have expected an instance of Array. > The error occurred while evaluating nil.inject > > Hi! Can you post more data on the error --- it probably tells you a line number and class where this is occurring. I suspect that the issue might be in your view code?? At least I have had such... anyhow more info should help. > > > any help please i have searched a lot but i don't found any solution :( have > i forgot any step ? > > thanks a lot > > > > > -- > Cordialement > Abdelkarim Fitouri > Membre Securinets :http://www.securinets.com <http://www.securinets.com> > Élève ingénieur . > Technicien Réseaux et Systèmes : Agence Universitaire de la Francophonie > (AUF) > Cnf Tunis . > > > > -- > 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]<rubyonrails-talk%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > -- 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.

