Skip to content

Commit

Permalink
Merge pull request #1583 from mamhoff/sets-for-on-page-layout
Browse files Browse the repository at this point in the history
Use Set to collect callbacks in OnPageLayout
  • Loading branch information
tvdeyen authored May 23, 2019
2 parents 6f89191 + 0abfc5c commit 5ff0e88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/alchemy/on_page_layout.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def self.callbacks
# Registers a callback for given page layout
def self.register_callback(page_layout, callback)
@callbacks ||= {}
@callbacks[page_layout] ||= []
@callbacks[page_layout] ||= Set.new
@callbacks[page_layout] << callback
end

Expand Down

0 comments on commit 5ff0e88

Please sign in to comment.