Sha256: 29d44959cc8ba35972ff9288b911591e61d0c9a199a5674772778bc8b8e3be18

Contents?: true

Size: 471 Bytes

Versions: 1

Compression:

Stored size: 471 Bytes

Contents

module Spree
  class HomePageFeature < ActiveRecord::Base
    self.table_name = 'home_page_features'
    attr_accessible :body, :publish, :style, :title

    scope :published, where(publish: true)

    def display
      self.style || ""
    end

    class << self
      def styles
        @styles ||= []
      end

      def styles=(styles)
        @styles = styles
      end

      def styles_dropdown
        styles.map {|s| [s.humanize, s]}
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spree_home_page_features-1.2.1 app/models/spree/home_page_feature.rb