Just to be clear that error is generated with this code in place...
class NewsItem < ActiveRecord::Base
belongs_to :country
# has_attached_file :image, :styles => { :original => '57x57' },
:default_url => '/images/football.png'
has_attached_file :image,
:styles => { :original => '57x57' },
:default_url => self.country.flag.url
validates_attachment_content_type :image, :content_type =>
['image/png'], :message => "only pngs are allowed."
validates_presence_of :title
validates_length_of :title, :within => 3..50
validates_presence_of :url
end
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.