Sha256: 4b0f1e023178bd74b3594ca810e69e82884d39cd589e456d8d3637f9623cd612

Contents?: true

Size: 438 Bytes

Versions: 11

Compression:

Stored size: 438 Bytes

Contents

class Tramway::Landing::BlockDecorator < ::Tramway::Core::ApplicationDecorator
  class << self
    def collections
      [ :all ]
    end

    def list_attributes
      [ :position, :view_state ]
    end
  end

  delegate :position, to: :object

  def view_state
    object.human_view_state_name
  end

  def view_state_button_color(event)
    case event
    when :publish
      :primary
    when :hide
      :secondary
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
tramway-landing-1.2.1 app/decorators/tramway/landing/block_decorator.rb
tramway-landing-1.2 app/decorators/tramway/landing/block_decorator.rb
tramway-landing-1.1.3.1 app/decorators/tramway/landing/block_decorator.rb
tramway-landing-1.1.3.trash.pre.3 app/decorators/tramway/landing/block_decorator.rb
tramway-landing-1.1.3.trash.pre.2 app/decorators/tramway/landing/block_decorator.rb
tramway-landing-1.1.3.trash app/decorators/tramway/landing/block_decorator.rb
tramway-landing-1.1.3 app/decorators/tramway/landing/block_decorator.rb
tramway-landing-1.1.2 app/decorators/tramway/landing/block_decorator.rb
tramway-landing-1.1.1 app/decorators/tramway/landing/block_decorator.rb
tramway-landing-1.1 app/decorators/tramway/landing/block_decorator.rb
tramway-landing-1.0 app/decorators/tramway/landing/block_decorator.rb