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.1.0 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.0.17 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.0.16 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.0.15 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.0.14 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.0.13 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.0.12 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.0.11 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.0.9 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.0.8 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.0.4 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.0.3 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.0.2 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.0.1 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-2.0.0 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-1.0.0 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-0.1.10 lib/no_notifier_needed/url_helper.rb
no_notifier_needed-0.1.9 lib/no_notifier_needed/url_helper.rb