piggybak_taxonomy 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2b2a52f1e600dfd25861f83638ba755ee4c31bf1
4
- data.tar.gz: af22b45ba0bc0c91a01c511e704e3b54b4a9f98a
3
+ metadata.gz: f4660c56c3ad15f277635273557e2f25235b92ae
4
+ data.tar.gz: 207e8c5f79f3c2fc7f2ac870968df92644f2b0c4
5
5
  SHA512:
6
- metadata.gz: f4a8f1a24dd5ce2e616277afa4fad30cb6205d1760301c604f31d0efd10a60e95710ee70e39a6950142367445d8a456eae2387e8f58051bc3cf83c20dcf88690
7
- data.tar.gz: 20f58a4be463377ebf1e035a08e4fa6477c6c2faf0199913d23f2d9621d43b35fad3e2167fa7c3b6fc9521e1639ab4023ca18e3ececac8afdbdcf2b90d3c4cb9
6
+ metadata.gz: 0bc3feed331a6324b3235045cccf4b77f11dc2fb77ee6a9ce4c47e0aa7a811c652753f8a6c67325dfc2090fa9d555ed43a1d3e0c0153e7239cb3fbfaef271fcb
7
+ data.tar.gz: 6c6804f8dd5cc6b4ef31c411ae4fa4766afa0074cdf661d496f1832ab268849abc531b3af1999ebe2fae89b38ae2dbe3002a9db39bb724cc5abee7d5eb872ffc
@@ -14,7 +14,7 @@ module PiggybakTaxonomy
14
14
  def recursive_path(paths, nodes)
15
15
  return nodes if paths.empty?
16
16
  first = paths.shift
17
- node = NavigationNode.find_by_slug(first)
17
+ node = NavigationNode.where(slug: first).first
18
18
  if node && (nodes.empty? || node.parent == nodes.last) && !(nodes.empty? && !node.parent.nil?)
19
19
  nodes << node
20
20
  nodes = recursive_path(paths, nodes)
@@ -2,8 +2,7 @@ module PiggybakTaxonomy
2
2
  class SellableTaxonomy < ActiveRecord::Base
3
3
  belongs_to :navigation_node, :class_name => "::PiggybakTaxonomy::NavigationNode"
4
4
  belongs_to :sellable, :class_name => "::Piggybak::Sellable"
5
- default_scope order('sort ASC')
6
- # attr_accessible :navigation_node_id, :sellable_id, :sort
5
+ default_scope { order('sort ASC') }
7
6
 
8
7
  validates_presence_of :sellable, :sort
9
8
 
@@ -1,3 +1,3 @@
1
1
  module PiggybakTaxonomy
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: piggybak_taxonomy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steph Skardal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-27 00:00:00.000000000 Z
11
+ date: 2014-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ancestry