Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

Commit

Permalink
Allow nil in essence delagtions
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas von Deyen committed Apr 24, 2015
1 parent e004435 commit 82d625f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/alchemy/essence_spree_product.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Alchemy
class EssenceSpreeProduct < ActiveRecord::Base
belongs_to :product, class_name: "Spree::Product", foreign_key: 'spree_product_id'
delegate :name, to: :product
delegate :name, to: :product, allow_nil: true

acts_as_essence(
ingredient_column: 'spree_product_id',
Expand Down
2 changes: 1 addition & 1 deletion app/models/alchemy/essence_spree_taxon.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Alchemy
class EssenceSpreeTaxon < ActiveRecord::Base
belongs_to :taxon, class_name: "Spree::Taxon", foreign_key: 'taxon_id'
delegate :name, to: :taxon
delegate :name, to: :taxon, allow_nil: true

acts_as_essence(
ingredient_column: 'taxon_id',
Expand Down

0 comments on commit 82d625f

Please sign in to comment.