Sha256: 139159b3efb5ab58332583aa0b4b084b867921ead17cd56b8f411b4f27566111
Contents?: true
Size: 616 Bytes
Versions: 6
Compression:
Stored size: 616 Bytes
Contents
# frozen_string_literal: true module Scrapbook # Engine-wide helpers module ApplicationHelper # Using `include Rails.application.helpers` didn't work for reloading changes # made to the main app's helper methods, but this is adapted from its code. # (I think it's getting around the memoized "@helpers" variable.) # https://github.com/rails/rails/blob/6bfc637659248df5d6719a86d2981b52662d9b50/railties/lib/rails/engine.rb#L494 ActionController::Base.modules_for_helpers( ActionController::Base.all_helpers_from_path(Rails.application.helpers_paths) ).each { include _1 } end end
Version data entries
6 entries across 6 versions & 1 rubygems