Skip to content

Commit

Permalink
[Rails 5] Prevent the reference to model decorator from being cached (#…
Browse files Browse the repository at this point in the history
…65)

* remove instance varialbe cache for model decorator

* remove Map.clear from initializer

* patch version
  • Loading branch information
Tian Chen committed Jan 8, 2018
1 parent 2ac66cf commit 6ab71a4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@ N/A

# History:

## 5.1.2

1. Chore: prevent the reference to model decorator from being cached ([issue 65](#65))

## 5.1.1

1. Chore: update lookup context wrapper ([issue 59](#59))
2. Chore: update application.html ([issue 62](#62))
2. Chore: fix deprecated styling (@extend :before) ([issue 63](#63))
2. Chore: add manual preload into initializer as well ([issue 64](#64))
3. Chore: fix deprecated styling (@extend :before) ([issue 63](#63))
4. Chore: add manual preload into initializer as well ([issue 64](#64))

## 5.1.0

Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
wallaby (5.1.1)
wallaby (5.1.2)
bootstrap-sass
bootstrap3-datetimepicker-rails
cancancan
Expand Down
2 changes: 1 addition & 1 deletion lib/decorators/wallaby/abstract_resource_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def model_class
# @return Wallaby::ModelDecorator
def model_decorator
return unless self < ::Wallaby::ResourceDecorator
@model_decorator ||= Map.model_decorator_map model_class
Map.model_decorator_map model_class
end

delegation_methods =
Expand Down
1 change: 0 additions & 1 deletion lib/wallaby/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class Engine < ::Rails::Engine
end

config.after_initialize do
Map.clear
Utils.preload_all unless Rails.env.development?
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/wallaby/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Wallaby
VERSION = '5.1.1'.freeze
VERSION = '5.1.2'.freeze
end

0 comments on commit 6ab71a4

Please sign in to comment.