Skip to content

Commit

Permalink
Removed filterable method from taxon
Browse files Browse the repository at this point in the history
  • Loading branch information
Willianvdv committed Dec 6, 2013
1 parent 20a58d8 commit be6b1a8
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion app/controllers/spree/taxons_controller_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def show_with_filter

private
def filterables
@taxon.filterables
@taxon.properties
end

def filterables_with_values
Expand Down
5 changes: 0 additions & 5 deletions app/models/spree/taxon_decorator.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
Spree::Taxon.class_eval do
has_many :taxon_filters
has_many :properties, through: :taxon_filters

# todo: remove this method
def filterables
properties
end
end
6 changes: 0 additions & 6 deletions spec/models/spree/taxon_decorator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,5 @@
expect(taxon.properties).to eq([property])
end
end

describe '.filterables' do
it 'returns the properties defined as filterable' do
expect(taxon.filterables).to eq([property])
end
end
end
end

0 comments on commit be6b1a8

Please sign in to comment.