Re: how to handle >4K session in camping

2013-12-10 Thread Francois Sery
Bonjour, Thanks for your help. Here is how i've modified my app. now i have - a 'session' model - a "sessions" table with a column for my data... - a session cookie: @state[:sessionid]=SecureRandom.hex It works as wanted but i have one more question. how do you handle all the obsolete sessions i

Re: how to handle >4K session in camping

2013-12-10 Thread Bluebie
Unless you’re running your camping app as a CGI script, the ruby instance keeps running, so you could just create a looping thread to do it every now and then: hours = 2 # cleanup every two hours Thread.new do loop do # some database cleanup stuff sleep hours * 60 * 60 end end The

Re: how to handle >4K session in camping

2013-12-10 Thread Francois Sery
i could'nt hope a more detailed answer ! I've never use ruby thread before and it seems to be a the perfect pretext to try . merci Bluebie 2013/12/10 Bluebie > Unless you’re running your camping app as a CGI script, the ruby instance > keeps running, so you could just create a looping threa

how do i customize the 404 "campin problem" page?

2013-12-10 Thread Francois Sery
Bonjour, one more newbie question: how do i customize the 404 "campin problem" page? i cant' find the answer anywhere else. i've read about the @status and @headers but i don't kwow how to "capture" the error ? maybe a special route ? Thanks again for your help !

2 differents layout for my app

2013-12-10 Thread Francois Sery
(re)bonjour, is there a simple / elegant way to have 2 differents layouts for my app. All the solutions i think of seems unmanageable and not very smart. (re)merci ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/li

Re: 2 differents layout for my app

2013-12-10 Thread deveritt
If the markup is semantic and nicely-structured, I'd simply do a CSS switch that uses local storage to persist between visits, as I've done here for the colour theme (http://ee.ecoconsulting.co.uk/ switch, top right) but expanded to div widths, etc. Is that what you meant? - DaveE -

Re: how to handle >4K session in camping

2013-12-10 Thread låzaro
Sorry for the thread hacking but, how could be run camping as standalone CGI -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. Bluebie escribió: >Unless you’re running your camping app as a CGI script, the ruby >instance keeps running, so you could just create a looping thre

Re: 2 differents layout for my app

2013-12-10 Thread Francois Sery
@deveritt: i dont want to switch css. My app has a "front end" and an "admin ". The front end is the public face of my app and th e'admin' is where i manage the content. the visual design of these 2 part are very different and it would be nice to have 2 independant layout . maybe, i don't even k

Re: how to handle >4K session in camping

2013-12-10 Thread Magnus Holm
On Mon, Nov 4, 2013 at 8:55 PM, låzaro wrote: > Sorry for the thread hacking but, how could be run camping as standalone CGI > -- > Sent from my Android phone with K-9 Mail. Please excuse my brevity. You can use Rack: app.cgi: #!/usr/bin/env ruby require 'rack' require 'my_app' Rack::Se