It'd be nice if you could optionally define the name for methods created when adding an association.
Here is a contrived example: class Fan < Sequel::Model one_to_many :artists end Say you want to reference a fan's favorite artists as 'friends' instead of 'artists', as in: Fan[:id=>1].friends instead of Fan[:id].artists. Right now, the only way to do that is to use the first argument as the name and explicitly define the rest of the association, like so: class Fan < Sequel::Model one_to_many :friends, :class => :Artist, :key => :artist_id end It'd be nice if you could just do: class Fan < Sequel::Model one_to_many :artists, :name => :fans end This still takes advantage of inflection based configuration, but allows you to control the resulting method names. I'm happy to submit a PR for this, but Jeremy requested feedback from the community before he'd consider the addition. -- 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/-/9NQgq7YyI9IJ. 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.
