Module: NoNotifierNeeded::UrlHelper
- Defined in:
- lib/no_notifier_needed/url_helper.rb
Instance Method Summary collapse
Instance Method Details
#url_for(destination) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/no_notifier_needed/url_helper.rb', line 3 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 |