noesya/osuny

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

Summary

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

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

  def dependencies
    [category]
  end

end