Sha256: b32db479edd3b32e0d3312ffcb87b897ac58f08889861e978805d31aeeaa7984
Contents?: true
Size: 1.69 KB
Versions: 1
Compression:
Stored size: 1.69 KB
Contents
# Place any database customizations here. There are several ways you may desire enabling # database connectivity: # # * Daemons (MySQL/PostgreSQL/etc) # | # | If you're running sophisticated applications for your VoIP server # | and desire performance or integration, you'll want a daemon database # | management system. MySQL is recommended. # '____________________________________________________________ # * File-based (Sqlite/Sqlite3) # | # | If you have little desire to integrate your VoIP application's # | user and group data with other apps, sqlite/3 is a very # | easy solution to get running. # '____________________________________________________________ # * No database # | # | If you simply have no use for keeping any information about # | users, groups, or anything else, you can leave this entire # | file commented. You don't even need ActiveRecord installed. # '____________________________________________________________ # ### SETTING UP YOUR DATABASE WITH A SAMPLE SCHEMA # # If you would like run # # ActiveRecord resources: # * http://slash7.com/cheats/activerecord_cheatsheet.pdf # # # Uncomment the =begin/=end blocks to enable database access. #=begin require 'active_record' ActiveRecord::Base.logger = Logger.new 'logs/database.log', 10, 1.megabyte ActiveRecord::Base.establish_connection YAML.load_file('config/database.yml') # When Adhearsion first encounters this Group class, it will automatically associate it # to the "groups" database. class Group < ActiveRecord::Base has_many :user end class User < ActiveRecord::Base validates_uniqueness_of :name validates_presence_of :name belongs_to :group end #=end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
adhearsion-0.7.0 | new_projects/config/database.rb |