class MenuItemLinkContent < ApplicationRecord
  belongs_to :menu_item
  belongs_to :image_file
  
  has_one :portlet, :as => :content, :dependent => :destroy
  
  belongs_to :cible, :polymorphic => true
  accepts_nested_attributes_for :cible
  
  
  STYLES = [["normal"], ["combat du mois"], ["Bandeaux de titre"]]
  
  
  def ratio
    if self.proportion?
      self.proportion
    else
      0.62
    end
  end
end
