lib/lookbook/entities/entity.rb in lookbook-1.4.0 vs lib/lookbook/entities/entity.rb in lookbook-1.4.1

- old
+ new

@@ -1,7 +1,8 @@ module Lookbook class Entity + include Comparable include Lookbook::Engine.routes.url_helpers def initialize(lookup_path = nil) @lookup_path = lookup_path end @@ -32,9 +33,13 @@ nil end def type @_type ||= self.class.name.demodulize.underscore.downcase.to_sym + end + + def <=>(other) + label <=> other.label end alias_method :path, :lookup_path alias_method :logical_path, :lookup_path