decidim-budgets/app/models/decidim/budgets/project.rb in decidim-0.1.0 vs decidim-budgets/app/models/decidim/budgets/project.rb in decidim-0.2.0
- old
+ new
@@ -1,6 +1,7 @@
# frozen_string_literal: true
+
module Decidim
module Budgets
# The data store for a Project in the Decidim::Budgets component. It stores a
# title, description and any other useful information to render a custom project.
class Project < Budgets::ApplicationRecord
@@ -11,10 +12,10 @@
include Decidim::HasAttachments
include Decidim::HasReference
include Decidim::Comments::Commentable
feature_manifest_name "budgets"
- has_many :line_items, class_name: Decidim::Budgets::LineItem, foreign_key: "decidim_project_id", dependent: :destroy
+ has_many :line_items, class_name: "Decidim::Budgets::LineItem", foreign_key: "decidim_project_id", dependent: :destroy
has_many :orders, through: :line_items, foreign_key: "decidim_project_id", class_name: "Decidim::Budgets::Order"
# Public: Overrides the `commentable?` Commentable concern method.
def commentable?
feature.settings.comments_enabled?