use model name to determine the type

This commit is contained in:
Lachlan Sylvester
2015-06-12 18:53:47 +10:00
parent de23501995
commit 97e82c3eb7
3 changed files with 7 additions and 3 deletions

View File

@@ -188,7 +188,7 @@ module ActiveModel
end
def type
object.class.to_s.demodulize.underscore.pluralize
object.class.model_name.plural
end
def attributes(options = {})