Sha256: f856792e9665d4227e19a4108b4a624f7b690decfc5a53e1224720bfbd001050

Contents?: true

Size: 517 Bytes

Versions: 2

Compression:

Stored size: 517 Bytes

Contents

# coding: utf-8

module Redditor
  class SliderBlock < ActiveRecord::Base
    self.table_name = "redditor_slider_blocks"

    attr_accessor :object_id, :kind

    belongs_to :page, class_name: "::Redditor::Page", touch: true
    has_many :images, as: :imageable, dependent: :destroy, class_name: "::Redditor::Image"
    accepts_nested_attributes_for :images

    def to_partial_path
      'redditor/slider_block'
    end

    def self.model_name
      ActiveModel::Name.new(self, nil, 'SliderBlock')
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
redditor-0.1.22 app/models/redditor/slider_block.rb
redditor-0.1.20 app/models/redditor/slider_block.rb