Module: Camping::Models::Base

### Home Classes Methods

### In Files

- lib/camping/ar.rb

### Methods

- ::table_name_prefix

### Files

- CHANGELOG
- COPYING

### Class/Module Index

Quicksearch

- Camping
- Camping::Base
- Camping::Controllers
- Camping::Cookies
- Camping::H
- Camping::Helpers
- Camping::Models
- Camping::Models::Base
- Camping::Reloader
- Camping::Server
- Camping::Server::Options
- Camping::Server::XSendfile
- Camping::Session
- Camping::Views
- Camping::X

No matching classes.

# 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.