Sha256: d616cc8deb7f170e29a066151dedbd03b04a71a684e5b261a5f933dc5c804dc5
Contents?: true
Size: 611 Bytes
Versions: 2
Compression:
Stored size: 611 Bytes
Contents
class Tramway::Landing::BlockDecorator < ::Tramway::Core::ApplicationDecorator class << self def collections [ :all ] end def list_attributes [ :position, :view_state, :block_type ] end end delegate :position, to: :object delegate :title, to: :object delegate :background, to: :object def block_type object.block_type_text end def view_state object.human_view_state_name end def link "##{object.anchor}" end def view_state_button_color(event) case event when :publish :primary when :hide :secondary end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tramway-landing-1.2.9 | app/decorators/tramway/landing/block_decorator.rb |
tramway-landing-1.2.8 | app/decorators/tramway/landing/block_decorator.rb |