0
Im, получивший вышеупомянутую ошибку после того, как я попытаюсь обновить мою модель живописи.undefined method `remove_previously_stored_files_after_update 'для # <Paperclip :: Attachment: 0x6b04720>
Heres моя картина Контроллер
def update
@painting = Painting.find(params[:id])
if @painting.update_attributes(params[:painting])
redirect_to :action => 'show', :id => @painting
else
@paintings = Painting.find(:all)
render :action => 'edit'
end
end
Heres моя модель
class Painting < ActiveRecord::Base
attr_accessible :gallery_id, :name, :image, :avatar
belongs_to :gallery
mount_uploader :avatar, ImageUploader
has_attached_file :avatar, :default_url => "/images/:style/missing.png"
# , :url => "/assets/:id/:style/:basename.:extension", :path => ":rails_root/public/assets/:id/:style/:basename.:extension"
validates_presence_of :name
end
Heres моя картина образуют частичный
<%= form_for([@gallery,@painting], :html => {:multipart => true}) do |f| %>
<!-- <#%= form_for @painting, :html => {:multipart => true} do |f| %> -->
<p>
<%= f.label :name %><br />
<%= f.text_field :name %>
</p>
<p><%= f.file_field :avatar %></p>
<p><%= f.submit %></p>
<% end %>
Картина принадлежит к галерее галерее содержит т.е. картину. P.S Я также использую несущую волну.
Не было бы это просто отключить CarrierWave? – fatuhoku
@fatuhoku Я полагаю, что так и будет. В то же время я работал над двумя драгоценными камнями, удалил mount_uploader для своего проекта –