Sha256: a268069c0a7b36bc1eb19d9cbd92aa4189f336cc89eea3a671dda118a3d01f49

Contents?: true

Size: 413 Bytes

Versions: 3

Compression:

Stored size: 413 Bytes

Contents

if defined?(EffectiveRegions)
  module Effective
    module Snippets
      class EffectiveAsset < Snippet
        attribute :asset_id, Integer
        attribute :html_class, String
        attribute :link_title, String

        def asset
          @asset ||= (Effective::Asset.where(:id => asset_id).first if asset_id)
        end

        def snippet_tag
          :span
        end

      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
effective_assets-1.1.2 app/models/effective/snippets/effective_asset.rb
effective_assets-1.1.1 app/models/effective/snippets/effective_asset.rb
effective_assets-1.1.0 app/models/effective/snippets/effective_asset.rb