Skip to content
This repository
Browse code

Merge branch 'master' of github.com:equivalent/scrapbook

  • Loading branch information...
commit 33ccc3f0db17b98f28bd095324eed9031eaf030b 2 parents e50b889 + dd95621
Tomi authored
17 wisdom_inside/scraps2/carrierwave
... ... @@ -0,0 +1,17 @@
  1 +
  2 +
  3 +# how to have different storage in test enviroment for carrierwave
  4 +
  5 + # config/initializers/carrierwave.rb
  6 + if Rails.env.test? or Rails.env.cucumber?
  7 + CarrierWave.configure do |config|
  8 + config.storage = :file
  9 + config.enable_processing = false
  10 + end
  11 + else
  12 + CarrierWave.configure do |config|
  13 + config.storage = :fog
  14 + end
  15 + end
  16 +
  17 +
10 wisdom_inside/scraps2/rails
... ... @@ -1,3 +1,13 @@
  1 +
  2 +# Rails path
  3 +
  4 + Rails.root.join(*%w[spec fixtures files uploads]) + 'a'
  5 + => #<Pathname:/Users/tomi/git/memo/spec/fixtures/files/uploads/a>
  6 +
  7 +date: 2013-03-13
  8 +keys: rails root path route to file
  9 +rails: 3.2.12
  10 +
1 11 # custom Logger
2 12
3 13 NotificationLogger = Logger.new( File.open("#{Rails.root.to_s}/log/#{Rails.env}_notifications.log", 'a') )

0 comments on commit 33ccc3f

Please sign in to comment.
Something went wrong with that request. Please try again.