search for: create_schema

Displaying 5 results from an estimated 5 matches for "create_schema".

2012 May 15
5
setting up the SQLite database
...me #from an old snippet 1.2 OR like this (postgres) example [Magnus]: def List.create List::Models::Base.establish_connection( :adapter => "postgresql", :username => "root", :password => "toor, :database => "list" ) List::Models.create_schema end 1.3 in a config/database.yml file [Magnus] (probably not worth it for SQLite): --- adapter: postgresql username: root password: toor database: mycampingdb And then do: require ''yaml'' def AppName.create AppName ::Models ::Base.establish_connection(YAML.load(File.rea...
2006 Feb 21
6
+ camping/session
...class, checked in tonight. To get sessions working for your application: 1. require ''camping/session'' 2. include Camping::Session in your application''s toplevel module. 3. In your application''s create method, add a call to Camping::Models::Schema.create_schema 4. Throughout your application, use the @state method like a hash to store your application''s data. You can see a practical example in the examples/blog/blog.rb app: require ''camping/session'' Camping.goes :Blog module Blog include Camping::Sessio...
2008 Jul 10
1
AR Sessions
...store, but falls over when I try to use the AR session store. The changes I made were: require ''camping/session'' becomes require ''camping/ar/session'' module Blog; include Camping::Session; end becomes module Blog; include Camping::ARSession; end and I did the create_schema in Blog.create. It set up the session table correctly, it adds a new row with a session id and sets a cookie on the browser correctly, but it never saves anything to the session state hash. Do I need to do something differently to make @state save itself? Using the cookie session store, changes...
2006 Aug 13
3
+ migrations in camping
...lf as version 1.0 of the schema. The app starts out at 0.0, so the first time you run your app, it''ll `up`grade to 1.0. A `schema_info` table is created for each app, containing a single row with the latest version number in it. Oh, one other thing: def Tepee.create Tepee::Models.create_schema end Now the `create_schema` method will update the database when the app is loaded. So stick it in your app''s `create` method[2]. As you''re developing, you can add new migration classes, save the file, refresh the page in your browser, and when The Camping Server reloads your...
2006 Nov 14
11
RESTful mixin, mixin repo?
Hi, I just put together a little mixin to provide pseudo-RESTful services in camping apps. Basically, it looks for a hidden _verb field in form posts, and sets the @method to the supplied value (e.g. put or delete - which browsers don''t support). This lets you define put and delete methods in your controllers. Groovy. Code: http://pastie.caboo.se/22613 Is there any permanent repo of