Location - category fixes
Conflicts: app/models/category.rb vendor/built_in_modules/location/init.rb
This commit is contained in:
1 parent
109b891b27
commit
7ea9945af0
5 files changed
+58
-1
No files matched your search
+24
-1
@@ -5,6 +5,8 @@ class Category
|
||||
|
||||
field :disable, type: Boolean, default: false
|
||||
field :title, localize: true
|
||||
field :custom, type: Boolean, default: false
|
||||
field :custom_value
|
||||
|
||||
validates :title, :at_least_one => true
|
||||
|
||||
@@ -12,5 +14,26 @@ class Category
|
||||
has_many :buffer_categories
|
||||
|
||||
scope :enabled, where(:disable.in => [false, nil, ''])
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
# base.instance_eval("scope :admin_manager_all,find(:all)")
|
||||
|
||||
# base.define_singleton_method :find do |*args|
|
||||
# if args ==[:all]
|
||||
# unscoped
|
||||
# else
|
||||
# res = unscoped.find(args)
|
||||
# res.count == 1 ? res[0] : res
|
||||
# end
|
||||
# end
|
||||
|
||||
# base.define_singleton_method :first do |*args|
|
||||
# all.first
|
||||
# end
|
||||
|
||||
# base.define_singleton_method :last do |*args|
|
||||
# all.last
|
||||
# end
|
||||
>>>>>>> 87741bf... Location - category fixes
|
||||
Reference in new issue
Block a user