noesya/osuny

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

Summary

Maintainability
A
0 mins
Test Coverage
F
50%
class Communication::Block::Component::Page < Communication::Block::Component::Base
  def page
    return unless website
    website.pages
           .published_now_in(template.block.language)
           .find_by(id: data)
  end

  def dependencies
    [page]
  end

end