File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,18 @@ We've fixed this so you don't need to care, but this is what's happening.
6565> [!TIP]
6666> Plural Associated Object names are also supported: ` Account .has_object :seats ` will look up ` Account ::Seats ` .
6767
68+ > [!TIP]
69+ > For certain names you may want to define an acronym like so:
70+ >
71+ > ` ` ` ruby
72+ > # config/initializers/inflections.rb
73+ > ActiveSupport ::Inflector .inflections(:en ) do |inflect |
74+ > inflect.acronym " OAuth" # ‘oauth’ → ‘OAuth’
75+ > end
76+ > ` ` `
77+ >
78+ > Then ` has_object :oauth_scopes ` will look up ` OAuthScopes ` , instead of ` OauthScopes ` .
79+
6880See how we're always expecting a link to the model, here ` post` ?
6981
7082Because of that, you can rely on ` post` from the associated object:
You can’t perform that action at this time.
0 commit comments