RSpec 3 has verifying doubles. This breed of mock objects check that any methods being stubbed are present on an...
If you need to log to a file you can use Ruby's Logger class: require 'logger'
If you're on Ruby 2.3+ there's a <<~ operator to automatically unindent HEREDOCs: str = <<~MESSAGE Hello Universe!
See this Railscast. Basically you can simply write views like index.xlsx.erb: ID Name Release Date Price <% @products.each do |product| %> <%= product.id...
To achieve this goal you have to setup the session store like the following example: MyApp::Application.config.session_store( :cookie_store...
Postgres 9.4 introduces a new column type: jsonb. json and jsonb columns store data differently, so just compare the two...
When you are using the #selector_for helper in Cucumber steps, as e.g. Spreewald does, the following snippet will save...
When running migrations with rake db:migrate, there's the STEP and VERSION parameters that you can pass to nearly...
If you want to load an SQL dump from an ActiveRecord migration, you might find this to be harder than...
I've pushed an update to Cucumber factory that simplifies working with FactoryGirl factories. Say you define a factory with...
Using uncountable resources is not recommended as it breaks Rails' magic, e.g. when using form_for. You'll always be...
Geordi 1.0 features a command line application geordi, that holds most of Geordi's previous commands. New features
Add gem 'database_cleaner' to your Gemfile. Then: Cucumber & Rails 3+ # features/support/database_cleaner.rb DatabaseCleaner.clean_with(:deletion) # clean once, now DatabaseCleaner.strategy = :transaction...
Jonas Nicklas, the author of Carrierwave and Capybara, has released Refile, a gem for handling file uploads in Rails. It...
Run bundle update cucumber capybara cucumber-rails to update to the newest versions. Backup your features/support/path.rb to be able to...
Capybara-screenshot can automatically save screenshots and the HTML for failed Capybara tests in Cucumber, RSpec or Minitest. Requires Capybara...
Rails includes a way to see what an e-mail will look like. Integration to RSpec All you need to...
Databound provides Javascript a simple API to the Ruby on Rails CRUD. Tries to expose a full model CRUD as...
Rails guide that covers PostgreSQL-specific column types and usages for Active Record. You should especially keep in mind the...
When accepting GIF images, you will also accept animated GIFs. Resizing them can be a time-consuming task and will...
Lightweight Angular JS directive to upload files Includes polyfills for old IEs. Unfortunately, their auto-loading mechanism may not work...
If you have trouble updating something on FreeBSD you should always take a look in the UPDATING file.
The benefit of the Rails asset pipeline is that it compiles your stylesheets and javascripts to a single file, respectively...
The Rails asset pipeline improves delivery of application assets (javascripts, stylesheets, images, fonts). Here are some basic facts about its...