This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--type-add=ruby=.haml,.slim,.rake,.rsel,.builder,.prawn | |
--type-add=html=.html.erb,.html.haml,.html.slim | |
--type-add=js=.js,.js.erb | |
--type-add=css=.sass,.scss | |
--type-set=cucumber=.feature | |
--type-set=ejs=.ejs | |
--type-set=markdown=.markdown | |
--ignore-dir=log | |
--ignore-dir=rails | |
--ignore-dir=tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby-1.9.2-p180 :027 > (1..4).to_a | |
=> [1, 2, 3, 4] | |
ruby-1.9.2-p180 :028 > (4..1).to_a | |
=> [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby-1.9.2-p180 :023 > (2.years.from_now.year..1987) | |
=> 2013..1987 | |
ruby-1.9.2-p180 :024 > (2.years.from_now.year..1987).to_a | |
=> [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Factory.define :member, :parent => :person do |person| | |
person.after_build do |p| | |
p.memberships.build Factory.attributes_for(:membership, :parish => Factory(:parish), :status => 'Approved' ) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
en: | |
activerecord: | |
attributes: | |
vehicle: | |
front_tires_need_to_be_replaced_soon: Need to be replaced soon | |
front_tires_need_to_be_replaced_now: Need to be replaced now | |
front_wheels_are_damaged_but_repairable: Damaged, but repairable | |
front_wheels_are_damaged_beyond_repair: Damaged, not repairable | |
front_hub_caps_are_damaged_but_repairable: Center/Hub Caps, Damaged, but repairable | |
front_hub_caps_are_damaged_beyond_repair: Center/Hub Caps, Damaged, not repairable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'test_helper' | |
class VehiclesTest < ActionDispatch::IntegrationTest | |
test "a brand new visitor should be able to price a vehicle" do | |
visit('/vehicles/new') | |
assert has_selector?('h3', :text => 'Vehicle Description') | |
vehicle = Factory.attributes_for(:vehicle) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'test_helper' | |
class InitialSuitTest < ActionDispatch::IntegrationTest | |
include Capybara::DSL | |
test "user should create a suit by uploading files" do | |
user = Factory(:user) | |
visit("/users/sign_in") | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--type-add=ruby=.haml,.slim,.rake,.rsel,.builder,.prawn | |
--type-add=html=.html.erb,.html.haml,.html.slim | |
--type-add=js=.js.erb | |
--type-add=css=.sass,.scss | |
--type-set=cucumber=.feature | |
--type-set=ejs=.ejs | |
--ignore-dir=javascripts | |
--ignore-dir=log | |
--ignore-dir=rails | |
--ignore-dir=tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DriversLicenseUploader < CarrierWave::Uploader::Base | |
storage :file | |
end | |
class HeadshotUploader < CarrierWave::Uploader::Base | |
include CarrierWave::RMagick | |
storage :fog | |
process :resize_to_fit => [800, 800] |