lib/enjoy/models/mongoid/seo.rb in enjoy_cms-0.2.1 vs lib/enjoy/models/mongoid/seo.rb in enjoy_cms-0.3.0.2

- old
+ new

@@ -14,19 +14,22 @@ field :description, type: String, localize: Enjoy.config.localize field :robots, type: String, localize: Enjoy.config.localize field :og_title, type: String, localize: Enjoy.config.localize enjoy_cms_mongoid_attached_file(:og_image, - styles: og_image_styles, + styles: lambda { |attachment| attachment.instance.og_image_styles }, + convert_options: lambda { |attachment| attachment.instance.og_image_convert_options }, content_type: { content_type: ["image/jpg", "image/jpeg", "image/png"] } ) end - module ClassMethods - def og_image_styles - {thumb: "800x600>"} - end + def og_image_styles + {thumb: "800x600>"} end + def og_image_convert_options + {} + end + end end end end