class Baza::DatabaseModelName

Used for link-methods in Rails apps

Public Class Methods

new(instance) click to toggle source
# File lib/baza/database_model_name.rb, line 3
def initialize(instance)
  @instance = instance
end

Public Instance Methods

human() click to toggle source
# File lib/baza/database_model_name.rb, line 13
def human
  @instance.class.name.split("::").last
end
singular_route_key() click to toggle source
# File lib/baza/database_model_name.rb, line 7
def singular_route_key
  route_key = human.underscore
  route_key = "indexes" if route_key == "indices"
  route_key
end