hi. by reading the rdocs, i believe that sequel is different to activerecord because it return a dataset instead of an object (maybe there is a way to return a object or collection of them, but i don't now how) ... the code below i use to return a single user based on a filter, but even though it's a single user, it's a dataset with 1 element inside it, right?
# considering a unique username dataset = DB[:users].filter(:username => 'johndoe') user = dataset[1].first user[:username] is there a way to make sequel return an object, so i could access it like: user.username? obj = Sequel_please_return_a_user_object(:username => 'johndoe') obj.username, will return: 'johndoe' ? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to sequel-talk@googlegroups.com To unsubscribe from this group, send email to sequel-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en -~----------~----~----~----~------~----~------~--~---