lib/trestle/scopes/scope.rb in trestle-0.9.4 vs lib/trestle/scopes/scope.rb in trestle-0.9.5
- old
+ new
@@ -6,14 +6,18 @@
def initialize(admin, name, options={}, &block)
@admin, @name, @options, @block = admin, name, options, block
end
def to_param
- name
+ name unless default?
end
def label
@options[:label] || @admin.t("scopes.#{name}", default: name.to_s.humanize.titleize)
+ end
+
+ def group
+ @options[:group]
end
def default?
@options[:default] == true
end