Sha256: 3d75ecc8ecc3cef6c8ba62376fc4cbd0a877f8ddd6ff5a0e1440d979f77cfee5
Contents?: true
Size: 714 Bytes
Versions: 27
Compression:
Stored size: 714 Bytes
Contents
module DeviseInvitable module Controllers module UrlHelpers [:path, :url].each do |path_or_url| [nil, :new_, :accept_].each do |action| class_eval <<-URL_HELPERS, __FILE__, __LINE__ + 1 def #{action}invitation_#{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}_invitation_#{path_or_url}", *args) end URL_HELPERS end end end end end
Version data entries
27 entries across 27 versions & 3 rubygems