vrfs-927: carrierwave_direct integration

This commit is contained in:
Jonathan Kolyer 2014-01-08 01:04:17 -06:00
parent c94537da62
commit bb2024fe19
3 changed files with 3 additions and 3 deletions

View File

@ -99,9 +99,10 @@ ActiveAdmin.register JamRuby::PromoBuzz, :as => 'Buzz' do
def new
@promo = JamRuby::PromoBuzz.new
@promo.key = params[:key] if params[:key].present?
@promo.aasm_state = 'active'
@uploader = @promo.image
# @uploader.success_action_redirect = new_painting_url
@uploader.success_action_redirect = new_admin_buzz_url
super
end

View File

@ -5,7 +5,6 @@ class ImageUploader < CarrierWave::Uploader::Base
include CarrierWave::MimeTypes
process :set_content_type
storage :fog
# Add a white list of extensions which are allowed to be uploaded.
def extension_white_list

View File

@ -5,7 +5,7 @@
<%= f.input(:text_long, :label => "Long Text", :input_html => {:rows => 3, :maxlength => 4096}) %>
<%= f.input(:aasm_state, :as => :select, :collection => Promotional::STATES, :label => 'Status') %>
<p>File: <%= @promo.image_name %></p>
<% # = f.hidden_field :key %>
<%= f.hidden_field :key %>
<% # = f.input(:photo, :as => :file, :hint => f.template.image_tag(@promo.image_url(:thumb), :size => '50x50')) if @promo.new_record? %>
<% end %>
<%= f.actions %>