RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: twler
I second this
+1 Was easy to debug, but still cost me 10 minutes...
He talks about this in the video: " If we used a before_filter here instead the time zone would leak through to other requests so it’s necessary to use an around filter instead."
FWIW, I implemented a simple around_filter as shown here in my ApplicationController and it has massively slowed down my requests:
around_filter :use_time_zone private def use_time_zone(&block) Time.use_zone('Eastern Time (US & Canada)', &block) end
Jasmine can have problems if you have a catchall route at the end of your routes.rb file. To solve, you can add
if Rails.env.development? mount Jasminerice::Engine => '/jasmine' end
before the catchall in routes.rb
Does anyone know how to grab just the first frame of an animated gif and save it as a png? I'm having trouble finding this on stackoverflow and blogs.
The goal is to allow the user to upload gifs, but to only use the first frame so that there's not motion all over the page.
I second this
+1
Was easy to debug, but still cost me 10 minutes...
He talks about this in the video: " If we used a before_filter here instead the time zone would leak through to other requests so it’s necessary to use an around filter instead."
FWIW, I implemented a simple around_filter as shown here in my ApplicationController and it has massively slowed down my requests:
Jasmine can have problems if you have a catchall route at the end of your routes.rb file. To solve, you can add
before the catchall in routes.rb
Does anyone know how to grab just the first frame of an animated gif and save it as a png? I'm having trouble finding this on stackoverflow and blogs.
The goal is to allow the user to upload gifs, but to only use the first frame so that there's not motion all over the page.