Skip to content

Commit

Permalink
rename helper variables to view_context for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
blaknite committed May 17, 2016
1 parent a01a72c commit 0235332
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions lib/blush.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ module Blush
@config ||= Blush::Configuration.new
end

module_function def helpers=(view_context)
@helpers = view_context
module_function def view_context=(view_context)
@view_context = view_context
end

module_function def helpers
@helpers ||= ApplicationController.helpers
module_function def view_context
@view_context ||= ApplicationController.helpers
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/blush/helper_proxy.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Blush
class HelperProxy
def method_missing(method, *args, &block)
Blush.helpers.send(method, *args, &block)
Blush.view_context.send(method, *args, &block)
end
end
end
2 changes: 1 addition & 1 deletion lib/blush/view_context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Blush
module ViewContext
def view_context
super.tap do |context|
Blush.helpers = context
Blush.view_context = context
end
end
end
Expand Down

0 comments on commit 0235332

Please sign in to comment.