panier_app/app/models/menu_item_link_content.rb
Nicolas Bally d744a04b28 initial
2020-10-30 22:26:40 +01:00

22 lines
417 B
Ruby

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