On Wednesday, November 28, 2012 2:52:26 PM UTC-8, Jarrod Manzer wrote: > > Hello, > I've been having some problems with the word "address" in terms of > pluralization and singularization of a field name. > When I try to name my model 'Ipaddress' it produces new methods like the > following... > > :ipaddress_id > :ipaddress_id= > :ipaddress_dataset > :ipaddress > :add_ipaddres <----- missing an 's' > :remove_ipaddres <-also missing an 's' > :remove_all_ipaddress > > For the two incorrectly named methods I cannot seem to find the cause of > to fix it. I was hoping someone here might have an answer. > I'm using Ruby 1.9.3p194 and sequel (3.40.0). > > > First, I can only assume you are talking about naming associations, not models, based on the methods you list. It appears as though are you creating a *_to_many association using :ip_address as the name as the name instead of :ip_addresses. *_to_many association names must be plural, this is explicitly mentioned in the documentation.
If that doesn't solve your issue, you probably should post the code you are using. While I appreciate a good guessing game as much as the next person, it's not a very efficient approach to debugging. Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/sequel-talk/-/_8SCsOLuln0J. 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/sequel-talk?hl=en.
