In Rails 5 you can say: ApplicationController.render( :template => 'users/index', :layout => 'my_layout', :assigns => { users: @users } ) If a Request Environment is...
Simply give the select helper an option :disabled, passing either a single value or an array. You need to specify...
Using CSS sprites for background images is a technique for optimizing page load time by combining smaller images into a...
Next time you have to do more than trivial CSS changes on a project, you probably want to have live...
Remember why preloading associations "randomly" uses joined tables or multiple queries? If you don't like the cleverness of this...
1. Saving files to a directory that is not shared between deploys or servers If you save your uploads to...
Rails 4.0 is finally ready after a thorough process of betas and release candidates. It's an amazing new version...
This card shows how to upgrade a Rails 2 application from Rails 2.3.8 through every single patch level up to...
The Rails secret_token must be unique for each application and any instance of it. If not, someone could exploit...
ActionMailer per default uses http as protocol, which enables SSL-stripping. When a logged-in user follows an http link...
Put the attached files into your home directory and enjoy. .irbrc defines interesting_methods, which is essentially all methods without...
The Ruby on Rails security list archive can be found here: http://groups.google.com/group/rubyonrails-security You can subscribe to this mailing...
Our development process makes us deploy very often. As the number of releases grows, junk clogs up the hard drive...
New WYSIWYG editor that claims to be lighter and prettier than TinyMCE and CKEditor. Has some Rails integration, too.
When you need to find out in which kind of spec you are during run-time, it's definitely possible...
Sometimes you need a piece of code to do something different for specs than for features. If you don't...
When HTTP clients make an request they can define which response formats they can process. They do it by adding...
Authentication is hard: there are many edge cases, and most users (including yourself) usually only go the "happy path" once...
We have often felt the pain where our models need to serve too many masters. E.g. we are adding a...
tl;dr: Ruby's Bundler environment is passed on to system calls, which may not be what you may want...
Rails gives you migrations to change your database schema with simple commands like add_column or update. Unfortunately these commands...
Caution when using .where to exclude records from a scope like this: # Fragile - avoid User.where("id NOT IN (?)", excluded_ids...
This only works when you actually have a session ID (not the case for Rails' CookieStore, for example): request.session_options...
In specs, the session never persists but is always a new object for each request. Data put into the session...