When you need to find out in which kind of spec you are during run-time, it's definitely possible...
When your site is on HTTPS and you are linking or redirecting to a HTTP site, the browser will not...
Option 1: Creating a self-signed certificate with the openssl binary As igalic commented on this gist. openssl req -new...
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...
Create a directory mkdir ~/.aws Initialise git repository cd ~/.aws && git init Create a git branch with a name you...
We ran into trouble when adding additional compute units to our railscomplete Hosting environment lately. VM-instances on the new...
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...
Note: This technique is confusing and slows down your test suite. Copy the attached code to features/support. This gets you...
Rails’ reputation as a relatively secure Web framework is well deserved. Out-of-the-box, there is protection against many...
The User-Agent HTTP header identifies the client and is sent by "regular" browsers, search engine crawlers, or other web...
When a controller action redirects to an external URL (like http://somehost.com/some/path) you will find that this is hard...
Unfortunately, Capybara does not offer a switch to disable cookies in your test browser. However, you can work around that...
To set a cookie in your test browser for cucumber tests, you need to know which driver you are using...
Rails flashes (FlashHash) track a list of used keys, which is not respected when comparing flash hashes.
Smashing Magazine lists some handy tricks for print style sheets, all with CSS: Expand External Links For Print
Given you use Capistrano together with bundler to automatically install your gems when deploying. I recently had the problem that...
tl;dr: Do not use merge! for session hashes. Use update instead. Outline Let's assume you're modifying the...
If bundle install shows the following message for you ... Error Bundler::HTTPError during request to dependency API ... upgrade to Bundler...
This works well in the simplified case, when your link disappears after it was clicked. Let link_to_remote behave...
You probably know that you can use CSS selectors to match against elements and their attributes, such as:
You can use the content CSS attribute to set an element's content – which is especially useful for the :before...
January has been a very bad month for Ruby on Rails developers, with two high-severity security bugs permitting remote...