Module: MagicLinks::UrlHelper
- Defined in:
- app/helpers/magic_links/url_helper.rb
Class Method Summary collapse
- .magic_link_for(user, template_name, path, expiry = nil) ⇒ Object
- .magic_url_for(user, template_name, path, expiry = nil) ⇒ Object
Instance Method Summary collapse
- #magic_link_for(user, template_name, path, expiry = nil) ⇒ Object
- #magic_url_for(user, template_name, path, expiry = nil) ⇒ Object
Class Method Details
.magic_link_for(user, template_name, path, expiry = nil) ⇒ Object
4 5 6 7 8 9 |
# File 'app/helpers/magic_links/url_helper.rb', line 4 def magic_link_for(user, template_name, path, expiry = nil) template = MagicLinks::Templates.find(template_name) raise ArgumentError, 'Template not found' unless template.present? template.magic_link_for(user, path, expiry) end |
.magic_url_for(user, template_name, path, expiry = nil) ⇒ Object
11 12 13 14 15 16 |
# File 'app/helpers/magic_links/url_helper.rb', line 11 def magic_url_for(user, template_name, path, expiry = nil) template = MagicLinks::Templates.find(template_name) raise ArgumentError, 'Template not found' unless template.present? template.magic_url_for(user, path, expiry) end |
Instance Method Details
#magic_link_for(user, template_name, path, expiry = nil) ⇒ Object
19 20 21 |
# File 'app/helpers/magic_links/url_helper.rb', line 19 def magic_link_for(user, template_name, path, expiry = nil) MagicLinks::UrlHelper.magic_link_for(user, template_name, path, expiry) end |
#magic_url_for(user, template_name, path, expiry = nil) ⇒ Object
23 24 25 |
# File 'app/helpers/magic_links/url_helper.rb', line 23 def magic_url_for(user, template_name, path, expiry = nil) MagicLinks::UrlHelper.magic_url_for(user, template_name, path, expiry) end |