Hi , i am facing strange problem i want to validate two models through
validates_associated,


class Cpanel::Banner < ActiveRecord::Base

  has_one :bannerimage
  validates_associated :bannerimage
  validates_presence_of :title
  validates_uniqueness_of :title
end


class Cpanel::Bannerimage < ActiveRecord::Base

  belongs_to :banner

  has_attachment    :content_type => :image,
         :storage => :file_system,
         :max_size => 10.megabytes,
         :min_size=>250.bytes,
         :resize_to => '320x200>',
         :processor => 'MiniMagick'

  validates_as_attachment
end

Here are two models , i am not getting only banner model validation but
not for bannerimage model .

Thanks .
-- 
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to