Sha256: 9e5ed81551c53d3cdedd16b755b4ae0772280913cc3388033b089583e72a87d0

Contents?: true

Size: 664 Bytes

Versions: 10

Compression:

Stored size: 664 Bytes

Contents

class Tramway::Event::ParticipantDecorator < ::Tramway::Core::ApplicationDecorator
  class << self
    def collections
      [ :all ]
    end
  end

  def title
    first_name = object.values['Фамилия']
    last_name = object.values['Имя']
    patronymic = object.values['Отчество']
    "#{first_name} #{last_name} #{patronymic}"
  end

  def values
    content_tag :table, class: :table do
      object.values.each do |key, value|
        concat(content_tag(:tr) do
          concat(content_tag(:td) do
            key
          end)
          concat(content_tag(:td) do
            value
          end)
        end)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
tramway-event-1.2.6 app/decorators/tramway/event/participant_decorator.rb
tramway-event-1.2.5 app/decorators/tramway/event/participant_decorator.rb
tramway-event-1.2.4 app/decorators/tramway/event/participant_decorator.rb
tramway-event-1.2.3 app/decorators/tramway/event/participant_decorator.rb
tramway-event-1.2.2 app/decorators/tramway/event/participant_decorator.rb
tramway-event-1.2.1 app/decorators/tramway/event/participant_decorator.rb
tramway-event-1.2 app/decorators/tramway/event/participant_decorator.rb
tramway-event-1.1 app/decorators/tramway/event/participant_decorator.rb
tramway-event-1.0.1 app/decorators/tramway/event/participant_decorator.rb
tramway-event-1.0 app/decorators/tramway/event/participant_decorator.rb