E
E
eldar_web2016-01-11 16:16:23
Ruby on Rails
eldar_web, 2016-01-11 16:16:23

How can you validate a url in Ruby on Rails?

For example, there is a url site.ru/subscriber/103/expired
I want to check if the url has expired or not. How can you do that?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
eldar_web, 2016-01-11
@eldar_web

if request.original_url.split('/').last == 'expired'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question