Sha256: 302b4b733d50d5fcf9803f66ccc6f68b16511dc77ba78749573a824c9a9d9b1a
Contents?: true
Size: 736 Bytes
Versions: 1
Compression:
Stored size: 736 Bytes
Contents
module DeviseSmsActivable module Controllers module UrlHelpers [:path, :url].each do |path_or_url| [nil, :new_, :create_, :activate_].each do |action| class_eval <<-URL_HELPERS, __FILE__, __LINE__ + 1 def #{action}sms_activation_#{path_or_url}(resource, *args) resource = case resource when Symbol, String resource when Class resource.name.underscore else resource.class.name.underscore end send("#{action}\#{resource}_sms_activation_#{path_or_url}", *args) end URL_HELPERS end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
devise_sms_activable-0.0.9 | lib/devise_sms_activable/controllers/url_helpers.rb |