Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
include:
- ruby-version: '3.0'
gemfile: gemfiles/rails_6.x_active_admin_2.x.gemfile
- ruby-version: '3.0'
gemfile: gemfiles/rails_6.x_active_admin_3.x.gemfile

env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
Expand Down
7 changes: 6 additions & 1 deletion Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@ end
appraise 'rails-6.x-active-admin-2.x' do
gem 'rails', '~> 6.1'
gem 'activeadmin', '~> 2.0'
end
end

appraise 'rails-6.x-active-admin-3.x' do
gem 'rails', '~> 6.1'
gem 'activeadmin', '~> 3.0'
end
2 changes: 1 addition & 1 deletion activeadmin-searchable_select.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'semmy', '~> 1.0'
spec.add_development_dependency 'sprockets', '~> 3.7'

spec.add_runtime_dependency 'activeadmin', ['>= 1.x', '< 3']
spec.add_runtime_dependency 'activeadmin', ['>= 1.x', '< 4']
spec.add_runtime_dependency 'jquery-rails', ['>= 3.0', '< 5']
spec.add_runtime_dependency 'select2-rails', '~> 4.0'
end
9 changes: 9 additions & 0 deletions gemfiles/rails_6.x_active_admin_3.x.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "sass-rails"
gem "rails", "~> 6.1"
gem "activeadmin", "~> 3.0"

gemspec path: "../"
16 changes: 16 additions & 0 deletions spec/support/models.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@ class User < ActiveRecord::Base; end

class Category < ActiveRecord::Base
belongs_to :created_by, class_name: 'User'

def self.ransackable_attributes(_auth_object = nil)
['name']
end
end

class Post < ActiveRecord::Base
belongs_to :category
belongs_to :user

scope(:published, -> { where(published: true) })

def self.ransackable_attributes(_auth_object = nil)
%w(category_id title)
end
end

module RGB
Expand All @@ -24,13 +32,21 @@ module Internal
class TagName < ActiveRecord::Base
self.table_name = :internal_tag_names
belongs_to :color, class_name: 'RGB::Color', foreign_key: :color_id

def self.ransackable_attributes(_auth_object = nil)
['color_id']
end
end
end

class OptionType < ActiveRecord::Base; end

class OptionValue < ActiveRecord::Base
belongs_to :option_type

def self.ransackable_attributes(_auth_object = nil)
['value']
end
end

class Product < ActiveRecord::Base
Expand Down