use the default carrierwave settings for envs other than development and production + does not include the templates of snippets in the theme assets index page (it was breaking the layout in locomotive for some snippets)

This commit is contained in:
Didier Lafforgue 2012-02-07 11:17:56 +01:00
parent f2467bbf42
commit f1662770e7
2 changed files with 4 additions and 3 deletions

View File

@ -16,7 +16,7 @@
- content_for :backbone_view_data do
:plain
snippets: #{can?(:manage, Locomotive::Snippet) ? @snippets.to_json : 'null'},
snippets: #{can?(:manage, Locomotive::Snippet) ? @snippets.map { |snippet| snippet.to_presenter.as_json_for_html_view }.to_json : 'null'},
images: #{@assets[:images].to_json},
media: #{@assets[:media].to_json},
js_and_css_assets: #{can?(:manage, Locomotive::ThemeAsset) ? @js_and_css_assets.to_json : 'null'},

View File

@ -15,9 +15,10 @@ CarrierWave.configure do |config|
config.s3_bucket = ENV['S3_BUCKET']
# config.s3_cname = 'ENV['S3_CNAME']
else
# settings for the local filesystem
# config.storage = :file
# config.root = File.join(Rails.root, 'public')
config.storage = :file
config.root = File.join(Rails.root, 'public')
end
end