Skip to content

Commit

Permalink
adds Rails 5.2 gemfiles for Appraisal and remove raw SQL deprecation …
Browse files Browse the repository at this point in the history
…warning
  • Loading branch information
jamesmk committed Apr 12, 2018
1 parent 8000e81 commit cd16299
Show file tree
Hide file tree
Showing 4 changed files with 416 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/fae/change.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def filter(params)
# apply conditions and search from above to our scope
order(id: :desc)
.includes(:user).references(:user)
.where(date_scope).where(conditions).where(search)
.where(Arel.sql(date_scope)).where(conditions).where(Arel.sql(search))
end

end
Expand Down
2 changes: 1 addition & 1 deletion app/models/fae/role.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Role < ActiveRecord::Base
has_many :users

acts_as_list add_new_at: :bottom
default_scope { order('-position DESC') }
default_scope { order(Arel.sql('-position DESC')) }

scope :public_roles, -> {where.not(name: 'super admin')}

Expand Down
30 changes: 30 additions & 0 deletions gemfiles/rails_5_2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "rails", "~> 5.2"
gem "rake", "< 12.0.0"
gem "sass", require: "sass"
gem "capistrano", "~> 3.1"
gem "capistrano-rails", git: "https://github.com/wearefine/rails"
gem "capistrano-rvm"
gem "mysql2"

group :test, :development do
gem "rspec-rails", "~> 3.6.0"
gem "pry"
end

group :test do
gem "factory_girl_rails", "~> 4.4.1"
gem "capybara-webkit", "~> 1.11.1"
gem "capybara-screenshot"
gem "guard-rspec", "~> 4.7.3"
gem "selenium-webdriver", "~> 2.42.0"
gem "shoulda-matchers", require: false
gem "yarjuf"
gem "database_cleaner"
gem "rails-controller-testing"
end

gemspec path: "../"
Loading

0 comments on commit cd16299

Please sign in to comment.