Sha256: 1bc32a21bffff960967ab697486fa33407dcfea80a87dbe7aff271efd3f0bcf9
Contents?: true
Size: 459 Bytes
Versions: 7
Compression:
Stored size: 459 Bytes
Contents
require 'thor/group' require 'active_support/inflector' module Rid module Generators class NamedBase < Base argument :name, :type => :string argument :attributes, :type => :array, :default => [] protected # force underscored and singularized model name def model_name @model_name ||= name.underscore.singularize end def pluralized_model_name model_name.pluralize end end end end
Version data entries
7 entries across 7 versions & 1 rubygems