File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
3535 spec . add_development_dependency 'semmy' , '~> 1.0'
3636 spec . add_development_dependency 'sprockets' , '~> 3.7'
3737
38- spec . add_runtime_dependency 'activeadmin' , [ '>= 1.x' , '< 3 ' ]
38+ spec . add_runtime_dependency 'activeadmin' , [ '>= 1.x' , '< 4 ' ]
3939 spec . add_runtime_dependency 'jquery-rails' , [ '>= 3.0' , '< 5' ]
4040 spec . add_runtime_dependency 'select2-rails' , '~> 4.0'
4141end
Original file line number Diff line number Diff line change @@ -4,13 +4,21 @@ class User < ActiveRecord::Base; end
44
55class Category < ActiveRecord ::Base
66 belongs_to :created_by , class_name : 'User'
7+
8+ def self . ransackable_attributes ( _auth_object = nil )
9+ [ 'name' ]
10+ end
711end
812
913class Post < ActiveRecord ::Base
1014 belongs_to :category
1115 belongs_to :user
1216
1317 scope ( :published , -> { where ( published : true ) } )
18+
19+ def self . ransackable_attributes ( _auth_object = nil )
20+ %w( category_id title )
21+ end
1422end
1523
1624module RGB
@@ -24,13 +32,21 @@ module Internal
2432 class TagName < ActiveRecord ::Base
2533 self . table_name = :internal_tag_names
2634 belongs_to :color , class_name : 'RGB::Color' , foreign_key : :color_id
35+
36+ def self . ransackable_attributes ( _auth_object = nil )
37+ [ 'color_id' ]
38+ end
2739 end
2840end
2941
3042class OptionType < ActiveRecord ::Base ; end
3143
3244class OptionValue < ActiveRecord ::Base
3345 belongs_to :option_type
46+
47+ def self . ransackable_attributes ( _auth_object = nil )
48+ [ 'value' ]
49+ end
3450end
3551
3652class Product < ActiveRecord ::Base
You can’t perform that action at this time.
0 commit comments