Alex Ferreira
unread,Jul 31, 2010, 7:09:55 PM7/31/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Lipsiadmin
Eu estou tentando Utilizar o lipsiadmin com o attachment porém estou
encontrando o seguinte erro no console quando tento incluir uma
imagem.
my model:
class Line < ActiveRecord::Base
has_many :products
has_friendly_id :titulo, :use_slug => true, :approximate_ascii =>
true
has_one_attachment :imagem_linha, :dependent => :destroy
end
my form:
=simple_error_messages_for :line
-tab :general do
%table.full
%tr
%td.fixed=human_name_for :line, :titulo
%td=text_field :line, :titulo
%tr
%td.fixed=human_name_for :line, :descricao
%td=text_area :line, :descricao
%tr
%td.fixed=human_name_for :line, :imagem_linha
%td=attachment_tag(:line, :imagem_linha, :image => true, :order
=> true)
%tr
%td.fixed=human_name_for :line, :status
%td=check_box :line, :status
error returned in the console
[Attachment] Attachment on Attachment initialized.
ActiveRecord::ReadOnlyRecord (ActiveRecord::ReadOnlyRecord):
app/controllers/backend/lines_controller.rb:43:in `update'
haml (3.0.15) lib/sass/plugin/rack.rb:41:in `call'
/usr/local/rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/webrick/
httpserver.rb:104:in `service'
/usr/local/rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/webrick/
httpserver.rb:65:in `run'
/usr/local/rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/webrick/server.rb:
173:in `start_thread'
/usr/local/rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/webrick/server.rb:
162:in `start'
/usr/local/rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/webrick/server.rb:
162:in `start_thread'
/usr/local/rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/webrick/server.rb:
95:in `start'
/usr/local/rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/webrick/server.rb:
92:in `each'
/usr/local/rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/webrick/server.rb:
92:in `start'
/usr/local/rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/webrick/server.rb:
23:in `start'
/usr/local/rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/webrick/server.rb:
82:in `start'