Re: Rails 3 Beta

2010-03-17 Thread Jeremy Evans
On Mar 16, 9:15 pm, cult hero binarypala...@gmail.com wrote: So, I've got an app that's currently in Ramaze (it was in Merb, but the lack of 1.9 support had me strike up and move). Now that Rails 3 Beta is out I'm going to start transitioning in that direction. Do I need to install some kind

Re: Rails 3 Beta

2010-03-17 Thread pete
On Mar 16, 9:15 pm, cult hero binarypala...@gmail.com wrote: So, I've got an app that's currently in Ramaze (it was in Merb, but the lack of 1.9 support had me strike up and move). Now that Rails 3 Beta is out I'm going to start transitioning in that direction. Do I need to install some kind

Re: Rails 3 Beta

2010-03-17 Thread cult hero
That's the same thing Jeremy was mentioning. (I Googled a bunch of stuff. Would have helped if I just looked at the Sequel website instead. :P) I've been handling my migrations via sequel directly and I dunno that there's a need for model generation. (Especially since I'm just migrating a bunch

Re: temporary object creation with associations

2010-03-17 Thread jv27243
Great, that was really helpful! On Mar 16, 2:35 pm, Jeremy Evans jeremyeva...@gmail.com wrote: On Mar 16, 11:02 am, jv27243 jvu...@gmail.com wrote: I'm working on an app that uses a two stage create.  A user clicks the new button and the app presents a form with default values in return.

Model dataset ordering

2010-03-17 Thread अमित चक्रदेव
Hi, I think this is a simple one, but could not figure this out myself. I am using the Sequel::Model interface. How do I specify ordering ? class Event Sequel::Model order :id end puts Event.last gives an error Sequel::Error: No order specified Event.dataset does not include ORDER BY 'id'

Re: Model dataset ordering

2010-03-17 Thread Aman Gupta
Event.set_dataset Event.dataset.order(:id) 2010/3/17 Amit Chakradeo (अमित चक्रदेव) chakra...@gmail.com: Hi,    I think this is a simple one, but could not figure this out myself. I am using the Sequel::Model interface. How do I specify ordering ? class Event Sequel::Model   order :id end

Re: Model dataset ordering

2010-03-17 Thread अमित चक्रदेव
Answering my own question, but the following works: class Event Sequel::Model self.dataset= self.dataset.order :id end But it sounds awkward, there must be a better way... --Amit 2010/3/17 Amit Chakradeo (अमित चक्रदेव) chakra...@gmail.com Hi, I think this is a simple one, but could

Re: Model dataset ordering

2010-03-17 Thread Aman Gupta
2010/3/17 Amit Chakradeo (अमित चक्रदेव) chakra...@gmail.com: Answering my own question, but the following works: class Event Sequel::Model   self.dataset= self.dataset.order :id end But it sounds awkward, there must be a better way... self.dataset.order!(:id) might work too --Amit

Re: Model dataset ordering

2010-03-17 Thread अमित चक्रदेव
On Wed, Mar 17, 2010 at 4:15 PM, Aman Gupta themastermi...@gmail.comwrote: self.dataset.order!(:id) might work too Yup, that works good! Thanks Aman, Amit -- You received this message because you are subscribed to the Google Groups sequel-talk group. To post to this group, send email to

sqlite example

2010-03-17 Thread cinaed
hi - i'm using ruby ruby 1.9.1p376 and sequel 3.9.0 and i tried to run the example from rdoc but it no work. i installed sequel by gem install sequel if i just run #!/usr/bin/env ruby require 'rubygems' require 'sequel' DB=Sequel.sqlite # memory database it barfs with

Re: Rails 3 Beta

2010-03-17 Thread Jeremy Evans
On Mar 17, 2:02 pm, cult hero binarypala...@gmail.com wrote: 1. Does Sequel::Model.plugin :active_model load the plugin? (I haven't actually used any plugins yet!) Yes. 2. Do I need to include that code somewhere in the Rails bootstrap process? (I don't want to have to do it explicitly for

Re: Model dataset ordering

2010-03-17 Thread Jeremy Evans
On Mar 17, 4:15 pm, Aman Gupta themastermi...@gmail.com wrote: self.dataset.order!(:id) might work too It does, but using dataset mutation methods on a model dataset is the path to madness. I would do: class Event Sequel::Model set_dataset dataset.order(:id) end Jeremy -- You

Re: sqlite example

2010-03-17 Thread Jeremy Evans
On Mar 17, 6:00 pm, cinaed cinaed.sim...@gmail.com wrote: If you want to access postgres, install the pg gem. Jeremy -- You received this message because you are subscribed to the Google Groups sequel-talk group. To post to this group, send email to sequel-t...@googlegroups.com. To

Re: sqlite example

2010-03-17 Thread cinaed
i had just installed sqlite3 but it example barfs in the first do loop. i uninstalled sqlite3 and installed sqlite-ruby as you suggest and the example works. thank you! On Mar 17, 6:16 pm, Scott LaBounty slabou...@gmail.com wrote: Try: sudo gem install sqlite3-ruby and see if that gets you

Re: sqlite example

2010-03-17 Thread cinaed
On Mar 17, 6:22 pm, Jeremy Evans jeremyeva...@gmail.com wrote: On Mar 17, 6:00 pm, cinaed cinaed.sim...@gmail.com wrote: If you want to access postgres, install the pg gem. Jeremy great - that worked thank you! -- You received this message because you are subscribed to the Google Groups

Re: Rails 3 Beta

2010-03-17 Thread Scott LaBounty
Off topic, but why are you moving from Ramaze to Rails? Scott On Wed, Mar 17, 2010 at 6:50 PM, cult hero binarypala...@gmail.com wrote: Excellent! Time to dig in. I haven't touched Rails in a couple years. Thanks for all the help. On Mar 17, 6:19 pm, Jeremy Evans jeremyeva...@gmail.com

Re: Ordering in group_and_count

2010-03-17 Thread rohit
With group_and_count I usually want ordering by count descending. Is it easy to support asc, desc, and none? On Mar 15, 3:48 pm, Jeremy Evans jeremyeva...@gmail.com wrote: Currently, Dataset#group_and_count orders by the count.  I'm considering changing this.  Thoughts? Jeremy -- You