Sha256: 86296fa7f5855ee1d7cea1b9fbb2eea694b307d6f725d8763a2dd9df2947be46

Contents?: true

Size: 516 Bytes

Versions: 15

Compression:

Stored size: 516 Bytes

Contents

class JeraPush::MessagePresenter < BasePresenter

	def list_content
		JSON.pretty_generate({
			title: item.content["title"],
			body: item.content["body"]
		})
	end

	def display_content
		JSON.pretty_generate(item.content)
	end

	def display_created_at
		item.created_at.strftime('%d/%m/%Y %H:%M')
	end

	def show_link
		helpers.link_to(
			helpers.t('jera_push.admin.buttons.details'),
			Rails.application.routes.url_helpers.jera_push_admin_message_path(item), class: 'waves-effect waves-light btn'
		)
	end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
jera_push-1.2.4 app/presenters/jera_push/message_presenter.rb
jera_push-1.2.3 app/presenters/jera_push/message_presenter.rb
jera_push-1.2.1 app/presenters/jera_push/message_presenter.rb
jera_push-1.1.7 app/presenters/jera_push/message_presenter.rb
jera_push-1.1.6 app/presenters/jera_push/message_presenter.rb
jera_push-1.1.5 app/presenters/jera_push/message_presenter.rb
jera_push-1.1.4 app/presenters/jera_push/message_presenter.rb
jera_push-1.1.3 app/presenters/jera_push/message_presenter.rb
jera_push-1.1.2 app/presenters/jera_push/message_presenter.rb
jera_push-1.1.1 app/presenters/jera_push/message_presenter.rb
jera_push-1.1.0 app/presenters/jera_push/message_presenter.rb
jera_push-1.0.3 app/presenters/jera_push/message_presenter.rb
jera_push-1.0.2 app/presenters/jera_push/message_presenter.rb
jera_push-1.0.1.1 app/presenters/jera_push/message_presenter.rb
jera_push-1.0.1 app/presenters/jera_push/message_presenter.rb