The will_paginate plugin makes pagination for your models in Ruby on Rails ridiculously simple. However sometimes you’ll find yourself wanting to paginate over two or more models on a single page. For instance, you might want to display a list of users and administrators on a single page along with a pager for each model [...]
Posts Tagged ‘ruby on rails’
20 Oct
Testing file uploads in Ruby on Rails with RSpec
While working on my latest project,I wanted to drive the design of my file upload code using Behavior Driven Development using Webrat and RSpec. For most people, I would recommend using a plugin like Paperclip rather than reinvent the wheel, but if you’re interested in seeing how to use RSpec to drive the design of [...]
12 Sep
Sample nginx (with Phusion Passenger) configuration file to enable SSL
Read my earlier post if you want Phusion Passenger to compile nginx with SSL support. If your nginx server already supports SSL, read on. Phusion Passenger fills up most of the configuration in nginx.conf for you with a nice set of defaults. You just have to do a little more work if you want to [...]