diff --git a/lib/commentable_methods.rb b/lib/commentable_methods.rb index c1bdc7f..377822c 100644 --- a/lib/commentable_methods.rb +++ b/lib/commentable_methods.rb @@ -25,6 +25,12 @@ def define_role_based_inflection_4(role) -> { where(role: role.to_s) }, has_many_options(role) end + + def define_role_based_inflection_5(role) + has_many "#{role.to_s}_comments".to_sym, + -> { where(role: role.to_s) }, + has_many_options(role) + end def has_many_options(role) {:class_name => "Comment",