In a nutshell: return statements inside blocks cause a method's return value to change. This is by design (and...
If you get errors from your development WEBrick that contain unicode salad, you are probably requesting the page via SSL...
With the the Ruby Tempfile class you can create temporary files. Those files only stick around as long as you...
sudo apt-get install gnome-session-fallback or (alias) sudo apt-get install gnome-panel from a terminal.
RubyMine: Set specific Ruby version per project
Assuming the following sunspot setup of the post class: class Post < ActiveRecord::Base searchable do text :title string :state
Note: Instead of using the method in this card, you probably want to use ActiveType's nested attributes which is...
Sometimes you need to look at the filter chain in specs. You can do it like that on Rails 2...
I was experiencing the following problem: It seems your ruby installation is missing psych (for YAML output). To eliminate this...
For string columns, MySQL indexes the left side of a string. That means an index can speed a like query...
You can quickly access views that belong to a controller by using the tiny "page with arrow" icon in the...
In Selenium features the server and client are running in separate processes. Therefore, when mocking time with a tool like...
Be careful when stubbing out attributes on records that are defined by associations. Nothing is as it seems to be...
The attached initializer gives your hashes a #deep_slice method that lets you recursively slice their contents by a given...
Testing with real live production data does come with at least one catch. All those real live users in your...
Our rspec_candy gem now gives you three matchers: be_same_number_as Tests if the given number is the...
A number of issues concerning Sass/SCSS autocompletion and syntax highlighting were submitted as a feedback for RubyMine 4.5. Web development...
assignable_values now lets you define a secondary default that is only used if the primary default value is not...
You can use String#demodulize from ActiveSupport: "ActiveRecord::CoreExtensions::String::Inflections".demodulize # => "Inflections" "Inflections".demodulize # => "Inflections"
Consul 0.4.0 comes with some new features. Dependencies Consul no longer requires assignable_values, it's optional for when you...
Don't say is_a?(ActiveRecord::NamedScope::Scope) because that is no longer true in Rails 3 and also doesn...
paper_trail is an excellent gem to track record versions and changes. You almost never want to reimplement something like...
The will_paginate gem will show a default of 30 records per page. If you want to test pagination in...
... you probably have a time zone issue. When you get Timecop.travel(Date.parse("2011-11-11 00:00") do Time.current # Thu...