Matt Jones wrote:
> @errors is an instance variable on the model - I doubt you're
> accessing that from the controller...
> 
> I'm also not clear what's wrong with @model.errors.each - it gets you
> exactly the same results as iterating with each_key on the underlying
> array...
> 
> --Matt Jones
> 
> 
> On Aug 12, 8:04�pm, Cali Wildman <rails-mailing-l...@andreas-s.net>

There isn't anything wrong with @model.errors.each, I was experimenting 
with different ways to get at the unique keys since there may be more 
than 1 error message per key (field). I ended up creating a local hash 
variable to get the functionality I want. Thanks for your insight.
-- 
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to