new

new(klass, namespace = nil, name = nil)
Class Public methods

Returns a new ActiveModel::Name instance. By default, the namespace and name option will take the namespace and name of the given class respectively.

module Foo
  class Bar
  end
end

ActiveModel::Name.new(Foo::Bar).to_s
# => "Foo::Bar"
doc_ruby_on_rails
2015-06-20 00:00:00
Comments
Leave a Comment

Please login to continue.