Use Camping.goes
It is not recommended that you write your application under the Camping module.
#!ruby # NOT RECOMMENDED module Camping::Models class Post < Base; end end
Instead, Camping.goes can fill up a new module for you with the full set of Camping gear. This way you can use apps together without them crashing into each other.
#!ruby # HIGHLY RECOMMENDED! Camping.goes :Blog module Blog::Models class Post < Base; end end
Table names reflect the new module. The above class corresponds to the blog_posts table.
Once again, remember that even applications which use goes will all share a database through ActiveRecord::Base. You only need to establish ONE (1) connection between these applications. It is recommended that you use Camping::Models::Base.establish_connection to do this.
Return to CampingRulesOfThumb
