...If you want to allow setting #id on .new, .create or create! you can include the attached module in order to whitelist #id on a model of your choice like...
class MyModel < ActiveRecord::Base include AllowSettingIdOnCreate end Note that your controllers should always whitelist the attributes they set on model records...
group :cucumber do ... gem 'headless' end Go to your features/support/env.rb file and include the following snippet: require 'headless' headless = Headless.new at_exit do headless.destroy end Before("@selenium,@javascript...
...token with #{Rails.env unless Rails.env.production?}. Note: There may be tokens in single quotes that include backslashes, double quotes etc. You should not change this to double quotes because Ruby would...
Hint: There's another card with this helper for Cucumber features. Sometimes you feel like you need to stub some...
...to create one file per matcher in spec/support/matchers: spec/support/matchers/be_same_numbers_as.rb spec/support/matchers/be_same_second_as.rb spec/support/matchers/exist_in_database.rb spec/support/matchers/include_hash.rb You can include all matchers in the support directory by adding the following line to your spec_helper.rb:
...rendering the favicons, in all needed sizes, formats and with the HTML needed to include them! In Rails applications with Haml: put all the favicon files into /public
...development and test environments, and false in all other environments. Rails 3: If you include the strong_params gem, see the Readme for handling unpermitted keys...