Files: README CHANGELOG COPYING lib/camping.rb lib/camping/reloader.rb lib/camping/fastcgi.rb lib/camping/session.rb lib/camping/db.rb lib/camping/webrick.rb | classes: MissingLibrary Camping Camping::Views Camping::Session Camping::Controllers Camping::Controllers::ServerError Camping::Controllers::NotFound Camping::Helpers Camping::Base Camping::Models Camping::Models::Session Camping::FastCGI Camping::Mab Camping::Reloader Camping::H WEBrick WEBrick::CampingHandler

Module Camping::Models < R()

(in files lib/camping.rb lib/camping/session.rb lib/camping/db.rb )

Models is an empty Ruby module for housing model classes derived from ActiveRecord::Base. As a shortcut, you may derive from Base which is an alias for ActiveRecord::Base.

  module Camping::Models
    class Post < Base; belongs_to :user end
    class User < Base; has_many :posts end
  end

Where Models are Used

Models are used in your controller classes. However, if your model class name conflicts with a controller class name, you will need to refer to it using the Models module.

  module Camping::Controllers
    class Post < R '/post/(\d+)'
      def get(post_id)
        @post = Models::Post.find post_id
        render :index
      end
    end
  end

Models cannot be referred to in Views at this time.

Includes

Methods

Public Instance method: Y()

     # File lib/camping.rb, line 722
722:       def Y;self;end