Sha256: 042f84ba471261cedf64ad9711755bd08502b5ad774559e68f28804738beabe2
Contents?: true
Size: 1.48 KB
Versions: 1
Compression:
Stored size: 1.48 KB
Contents
class <%= camelcased_class_name %> < Hancock::Seo::Seo # # after_save :og_image_auto_rails_admin_jcrop # def og_image_auto_rails_admin_jcrop # auto_rails_admin_jcrop(:og_image) # or nil for cancel autocrop # end # # hancock_cms_attached_file(:og_image) # def og_image_styles # {thumb: "160x120>", standard: "800x600>"} # end # # def og_image_jcrop_options # {} # end def set_default_seo _obj = self.seoable if _obj and _obj.set_default_seo? self.h1 = _obj.default_seo_h1 if self.h1.blank? self.title = _obj.default_seo_title if self.title.blank? self.keywords = _obj.default_seo_keywords if self.keywords.blank? self.description = _obj.default_seo_description if self.description.blank? self.title = _obj.default_seo_og_title if self.title.blank? end end ############ rails_admin ############## def self.rails_admin_add_fields [] #super end def self.rails_admin_add_config(config) #super(config) end def self.admin_can_user_defined_actions [].freeze end def self.admin_cannot_user_defined_actions [].freeze end def self.manager_can_user_defined_actions [].freeze end def self.manager_cannot_user_defined_actions [].freeze end def self.rails_admin_user_defined_visible_actions [].freeze end rails_admin(&Hancock::Seo::Admin::Seo.config(rails_admin_add_fields) { |config| rails_admin_add_config(config) }) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hancock_cms_seo-1.0.2 | lib/generators/hancock/seo/models/templates/seo.erb |