Skip to content

Commit

Permalink
update to rails 6
Browse files Browse the repository at this point in the history
  • Loading branch information
antpaw committed Dec 26, 2019
1 parent 54c1299 commit 2627ed2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
source 'http://rubygems.org'

gem 'rails', '>= 4.2'
gem 'sass-rails', '>= 6'
gem 'turbolinks', '>= 2'
gem 'kaminari', '>= 0'
gem 'haml-rails', '>= 0'
gem 'sass-rails', '>= 5'


group :development do
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/bhf/entries_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def load_new_object
def manage_many_to_many
return unless params[:has_and_belongs_to_many]
params[:has_and_belongs_to_many].each_pair do |relation, ids|
next unless ids.any?
next unless ids.empty?
reflection = @model.reflections[relation]
relation_array = @object.send(relation)
reflection.klass.unscoped.find(ids.keys).each do |relation_obj|
Expand Down Expand Up @@ -208,7 +208,7 @@ def manage_has_many
return unless params[:has_many]
object_id = @object.send(@model.bhf_primary_key)
params[:has_many].each_pair do |relation, ids|
next unless ids.any?
next unless ids.empty?
reflection = @model.reflections[relation]
preset_ids = @object.send(relation).collect do |object|
object.send(object.class.bhf_primary_key).to_s
Expand Down
3 changes: 1 addition & 2 deletions lib/bhf.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require 'haml'
require 'sass'
require 'turbolinks'
require 'kaminari'

Expand All @@ -24,7 +23,7 @@ class Engine < Rails::Engine
end

initializer 'bhf.assets.precompile' do |app|
app.config.assets.precompile += %w( bhf/logo_bhf.svg )
app.config.assets.precompile += %w( bhf/application.css bhf/application.js bhf/logo_bhf.svg )
end
end

Expand Down

0 comments on commit 2627ed2

Please sign in to comment.