noesya/osuny

View on GitHub
app/models/communication/block/component/event.rb

Summary

Maintainability
A
0 mins
Test Coverage
F
50%
class Communication::Block::Component::Event < Communication::Block::Component::Base

  def event
    return unless website
    website.events
           .published_now_in(template.block.language)
           .find_by(id: data)
  end

  def dependencies
    [event]
  end

end