Camping::Models::Base

Public Class Methods

table_name_prefix() click to toggle source

The default prefix for Camping model classes is the topmost module name lowercase and followed with an underscore.

Tepee::Models::Page.table_name_prefix
  #=> "tepee_pages"
# File lib/camping/ar.rb, line 66
def Base.table_name_prefix
    "#{name[/\w+/]}_".downcase.sub(/^(#{A}|camping)_/,'')
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.