Permalink
Browse files

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

  • Loading branch information...
2 parents e50b889 + dd95621 commit 33ccc3f0db17b98f28bd095324eed9031eaf030b @equivalent committed Mar 14, 2013
Showing with 27 additions and 0 deletions.
  1. +17 −0 wisdom_inside/scraps2/carrierwave
  2. +10 −0 wisdom_inside/scraps2/rails
View
17 wisdom_inside/scraps2/carrierwave
@@ -0,0 +1,17 @@
+
+
+# how to have different storage in test enviroment for carrierwave
+
+ # config/initializers/carrierwave.rb
+ if Rails.env.test? or Rails.env.cucumber?
+ CarrierWave.configure do |config|
+ config.storage = :file
+ config.enable_processing = false
+ end
+ else
+ CarrierWave.configure do |config|
+ config.storage = :fog
+ end
+ end
+
+
View
10 wisdom_inside/scraps2/rails
@@ -1,3 +1,13 @@
+
+# Rails path
+
+ Rails.root.join(*%w[spec fixtures files uploads]) + 'a'
+ => #<Pathname:/Users/tomi/git/memo/spec/fixtures/files/uploads/a>
+
+date: 2013-03-13
+keys: rails root path route to file
+rails: 3.2.12
+
# custom Logger
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.