salve ragazzi, so che qualcuno di voi puo aiutarmi con questo
celeberrimo
plugin.
il problema è che non mi genera nessuna thumbnail dell’immagine passata
come
parametro… la salva correttamente ma niente thumb
MODEL
class Photo < ActiveRecord::Base
acts_as_attachment :storage => :file_system,
:thumbnails => { :normal => ‘300>’, :thumb =>
‘50’ }
validates_as_attachment
end
CONTROLLER
class PhotoController < ApplicationController
…
def create
@photo = Photo.create! params[:photo]
redirect_to :action => ‘show’, :id => @photo
rescue ActiveRecord::RecordInvalid
render :action => ‘new’
end
end
VIEW
<% form_for :photo, :url => { :action => ‘create’ }, :html => {
:multipart
=> true } do |f| -%>
<%= f.file_field :uploaded_data %>
<%= submit_tag :Create %>
<% end -%>si comporta come se l’opzione :thumbnail non ci sia…
–
everything has got to end sometime we were satellites drifting off into
space
vega 4 - burn and fade away