Sha256: 2217fa5ba2242e2bd98a13efd1de7c2aaffcc4f617b29d989070f71fe0e067b5

Contents?: true

Size: 367 Bytes

Versions: 38

Compression:

Stored size: 367 Bytes

Contents

module NoNotifierNeeded
  module UrlHelper
    def url_for(destination)
      unless destination.is_a?(Hash) || destination.match(/_path/i)
        raise ArgumentError.new(" must pass something that ends with a _path. #{destination} sent.")
      end
      to_send = "Rails.application.routes.url_helpers.#{destination}"
      instance_eval to_send
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
no_notifier_needed-2.4.5 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.4.4 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.4.3 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.4.2 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.4.1 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.4.0 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.3.8 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.3.7 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.3.6 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.3.5 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.3.4 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.3.3 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.3.2 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.3.1 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.3.0 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.2.4 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.2.3 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.2.2 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.2.1 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.2.0 lib/no_notifier_needed/url_helper.rb