module SmoothOperator::ResourceName

Public Instance Methods

custom_model_name() click to toggle source
# File lib/smooth_operator/resource_name.rb, line 22
def custom_model_name
  get_option :model_name, nil
end
model_name() click to toggle source
# File lib/smooth_operator/resource_name.rb, line 12
def model_name
  return '' if custom_model_name == :none

  if defined? ActiveModel
    smooth_model_name
  else
    custom_model_name ||= name.split('::').last.underscore.capitalize
  end
end
resource_name() click to toggle source
# File lib/smooth_operator/resource_name.rb, line 8
def resource_name
  get_option :resource_name, self.model_name.to_s.underscore
end
resources_name() click to toggle source
# File lib/smooth_operator/resource_name.rb, line 4
def resources_name
  get_option :resources_name, self.resource_name.pluralize
end