Re: [Rails] myModel.all returns only 138 records

2013-07-06 Thread Geoffroy Gomet
Hi, As of Rails 4, the order is by default based on the id DESC. So Model.last produces the following sql: *SELECT * FROM models ORDER BY models.id DESC LIMIT 1* That said, I've no idea why you only get a part of the records back. Were you able to validates all those numbers directly on the

Re: [Rails] Re: At least one entry for DB

2012-03-09 Thread Geoffroy Gomet
Indeed, you should save (persist) your object (script) after creating it or use the create (or create!) method instead or new: @script = Script.new(:video_id = self.id, :startp = 0, :text = 'ToDo: ') @scipt.save or @script = Script.create(:video_id = self.id, :startp = 0, :text = 'ToDo: ')

[Rails] Re: At least one entry for DB

2012-03-08 Thread Geoffroy Gomet
Hey, The @video.id you are referring to is not yet existing as the @video object is not yet persisted into the db. You have to first save the @video before accessing the id, that is when the after_create or after_save is triggered. In your Video class, the after save has access to the @video

[Rails] Re: Forms do not display in browser. What am I doing wrong?

2012-02-05 Thread Geoffroy Gomet
Hey Dennis, Your form_for tag is missing the = sign , it should be %= form_ for ... Regards Geoffroy On Feb 5, 6:17 am, Dennis Fashimpaur li...@ruby-forum.com wrote: All, I am a rookie to Ruby on Rails. I just started with a book from O'Reilly on Friday (Learning Rails). I have run through

[Rails] Re: using Geokit with rails3

2011-03-18 Thread Geoffroy Gomet
Hey, You should chek this version: https://github.com/jlecour/geokit-rails3 regards Geoffroy On Mar 18, 7:03 am, venkata reddy venkatareddy...@gmail.com wrote: HI all i am  a newbie ,and starting a rails 3 application and my application needs geokit plugin .so anybody knows how to install

[Rails] Re: Rails 3 Development Servers - Is mongrel on its way out?

2010-10-19 Thread Geoffroy Gomet
Hi Dave, You should check out passenger 3.0, fresh from yesterday and really awesome. You can now start your development server with a passenger start command. hope it helps. Regards Geoffroy On Oct 18, 10:37 pm, Dave Bush daveb...@gmail.com wrote: I did but didn't see anything that really

[Rails] Re: Protecting static assets

2010-03-13 Thread Geoffroy Gomet
Thank you, it was a big helper. I found all I needed thanks to you. Cheers Geoffroy On Mar 12, 9:44 pm, Robert Walker li...@ruby-forum.com wrote: Geoffroy Gomet wrote: How can I protect static assets behind authentication. I'm familliar with protecting dynamic pages but how to protect

[Rails] Protecting static assets

2010-03-12 Thread Geoffroy Gomet
How can I protect static assets behind authentication. I'm familliar with protecting dynamic pages but how to protect static files? An example would be : someone login to my application, upload a picture and authorize only some users to see this picture. How to avoid someone to access the

[Rails] Filter access to static content

2010-03-09 Thread Geoffroy Gomet
How can I filter access to static content (images, movies, pdf, ...). I'm familiar with filtering access to parts of a website, but how can I manage to filter access to static files (uploaded images,...)? Greetz Geoffroy -- You received this message because you are subscribed to the Google

[Rails] Re: Filter access to static content

2010-03-09 Thread Geoffroy Gomet
(with something like sendfile) On Mar 9, 10:19 pm, Robert Walker li...@ruby-forum.com wrote: Geoffroy Gomet wrote: How can I filter access to static content (images, movies, pdf, ...). I'm familiar with filtering access to parts of a website, but how can I manage to filter access to static files

[Rails] Re: Rails 2.3.4 is now available.

2009-09-04 Thread Geoffroy Gomet
A security fix! On Sep 4, 6:59 am, Rails Girl rails-mailing-l...@andreas-s.net wrote: Happy to inform that... Rails 2.3.4 is now available. Does any one know... what's new in Rails 2.3.4. ...? Pl. share here. -- Posted viahttp://www.ruby-forum.com/.

[Rails] Create a Zip with Kernel.system

2009-09-01 Thread Geoffroy Gomet
Hey, I'm trying to create a zipfile containing a lots of pictures that where uploaded using attachement_fu. I used rubyzip, and everything worked great until I used it to compress a lot of files, then it produced a RangeError (from an Array#pack call somewhere in rubyzip). So with a little irc