Skip to content

Conversation

@naomiajacobs
Copy link

@naomiajacobs naomiajacobs commented Nov 9, 2017

Part of the effort in: https://github.com/mavenlink/mavenlink/pull/10271

This PR adds a key to the association object called plural that is set on initialization. If a plural option is passed in, it defaults to that, otherwise it tries to figure out whether the association is plural or not by seeing if it can be singularized. This option can be used to find out whether an association is plural, and allows for an override in case it's not easily guessable from the name of the association.

@naomiajacobs naomiajacobs self-assigned this Nov 9, 2017
@naomiajacobs naomiajacobs requested a review from bennapp November 9, 2017 16:17
@naomiajacobs naomiajacobs changed the title Spike - add support for dynamic associations Add plural to Brainstem::DSL::Association Nov 9, 2017
@naomiajacobs
Copy link
Author

@bennapp can you review please?


context 'when `plural` is not specified in the options' do
it 'delegates to ruby singularize and pluralize to guess if the association is plural or singular' do
class Dress
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants