similar to: AR Sessions

Displaying 20 results from an estimated 9000 matches similar to: "AR Sessions"

2012 May 15
5
setting up the SQLite database
I know this isn''t Python, but I''d like to get a view on the ''one obvious'' way to set up an SQLite (or other) database and its location per-app. I''ve got a bit lost with the Camping 2 changes and various code snippets I have kicking around. 1. is it best to set up the DB creation/connection: 1.1 at the end of the app
2006 Feb 21
6
+ camping/session
Camping now comes with a sessioning 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
2008 May 21
32
Rack, Camping 2.0++
=== 1. Camping on Rack === I''ve just finished rewriting Camping to use Rack in the "core". I got rid of (a little less) than 1kB in camping.rb and removed lots of un-necessary files (lib/server/*.rb, fastcgi.rb & mongrel.rb). bin/camping does now only provide WEBrick, Mongrel and console-support and should only be used in development. It uses Rack::ShowExceptions to catch
2006 Aug 13
3
+ migrations in camping
Camping apps are supposed to be little independent apps, often contained in a single file, which create the database tables and manage them without hassle. These days it''s common to see in a Camping app: module Tepee::Models def self.schema(&block) @@schema = block if block_given? @@schema end end Tepee::Models.schema do create_table :tepee_pages,
2008 May 24
19
Camping 2.0 - What''s left?
I''ve just sent a pull-request to _why with my changes[1] and here is some things that I think needs to be done before a (possible) release: * The cookie session is named Camping::Session and is placed in camping/session.rb. Maybe this should be called Camping::CookieSession or??? * The ActiveRecord session is named Camping::ARSession and is placed in camping/ar/session.rb. Maybe it
2007 Oct 05
8
Cookie session handling?
Hi, I and a few folks on #camping thought it would be nice to have either cookie based or file based session handling. This would eliminate the need for creating a sessions table in the database (or a sequence), which feels too heavy for a lightweight framework like Camping anyway. Plus, we can more easily avoid nasty adapter errors. :) The general consensus was to create a separate
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
2008 May 19
6
Sample Code, quick simple openid auth
You''ll need to install the ''openid'' gem for this, and require it in your camping app: class Login < R ''/login'' def get this_url = ''http:'' + URL(''/login'').to_s unless input.finish.to_s == ''1'' # start doing the auth here begin
2007 Oct 09
4
Camping and sessions proposal.
Hi Campers, from the discussions gathered around, the current Camping sessions don''t seem to be satisfying. ActiveRecord doesn''t seem to handle hashid as an identifier, plus it doesn''t seem to be fully consistent across the various RDBMS. On the other hand, the scope of the project does not permit to implement all kind of client persistence. Secure sessions with
2008 May 17
4
Setting cookies in service overloader thingo
I''m implementing a simpler version of the Cookie Session Store in Rails 2.0. If you know what that is, skip the next paragraph. A cookie session store stores the session data inside cookies, on the client, and signs them using a secret string, hashed together. The user can decode the cookie easily if they know much about computers and see what''s inside, but they
2007 Sep 25
13
Session cookies not passed on first redirect
Hello Campers! Is it just me or does Camping init the session twice on a redirect? If I have an app and when the user visits it for the first time, a session is generated. Afterwards I redirect the user in a service (that basically does auth) and he gets bounced to the login page - but when I arrive at the login page my SID somehow has changed :-( so there is a stale session dangling
2009 Mar 29
5
Rack::Lint::LintError with latest camping and rack
I''m trying to use Camping from Magnus'' repo (1.9.300) but running the blog.rb example (or anything for that matter) gives me Rack::Lint::LintError at / Content-Length header was 0, but should be 548 Ruby C:/ruby-1.8.7/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/lint.rb: in assert, line 16 Web GET localhost/ There are no errors on the camping output so I suspect something has
2007 Nov 22
2
How many CRLFs between header and body?
Just ran into a problem[1]. It seems to have been introduced by changeset 224 [2], a fix for ticket 126 [3]. The root is the number of CRLFs Camping puts between the headers and the body of the response. This has changed at least 3 times; right now we''re back to 1. (ie. every header ends in a CRLF, and then there''s the body) The HTTP RFC[4], the CGI spec[5] and the FastCGI
2008 Jun 03
8
@@state_secret
I was having some issue getting the class variables in Camping::Session to work with some old apps, so I''ve changed @@state_secret to a method. module Blog include Camping::Session def state_secret; "kxxxx" end end Also, merged some of zimbatm''s patches. And trying to revive the Junebug wiki <http://github.com/why/junebug> since it''s still
2011 Oct 13
2
how to catch 404s?
How can I hide/catch the "Camping problem! /xxx not found" pages? It would be great to define my own handler instead, or simply redirect to the root of my app. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/camping-list/attachments/20111013/ba7145ee/attachment.html>
2008 Jun 06
2
Messy Cookies
It looks like everyone has tried to fix the cookies lately, and no-one managed to get it 100% correctly. The current implementation doesn''t set the path correctly, and you can''t use @cookies in a #service-overload. Qwzybug''s patch fixed only the sessions. Jenna''s patch won''t allow to set complex cookies (@cookies.key = {:path => "/path",
2007 Apr 19
4
Save sessions on file system instead of database table?
Hi Is there a way to save session data on the file system (like in Rails) instead of a database table? The reason I''m asking is, that I''m writing a Camping application without using ActiveRecord (mostly for learning purposes) and I don''t want to use ActiveRecord just for sessions. Thanks, Thomas -------------- next part -------------- A non-text attachment was
2007 Oct 05
11
Session handling busted on Oracle
Hi, Ruby 1.8.6 (one-click) Camping 1.5 I''d submit this as a bug, but the tracker says I''m forbidden, so here you go. The first problem is that the sql to create the sessions table is broken. This is what it tried to send: CREATE TABLE sessions ( id NUMBER(38) NOT NULL PRIMARY KEY (38), --> Problem here hashid VARCHAR2(32), created_at DATE, ivars CLOB DEFAULT
2008 May 22
2
Camping-list Digest, Vol 23, Issue 8
Removed 25% of the framework? Gosh, I wish _why wasn''t so darn verbose... -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/camping-list/attachments/20080522/7612c03e/attachment.html>
2008 May 23
8
An issue for consideration
We''ve just come across an issue for consideration. I am avoiding some words which would allow people to find this message in an internet search who have questionable intentions, but wish to communicate a strong sense of caution. Consider someone who adds extra methods to their controller which they use in their main get/post methods to do things or to get secret data. Consider