awesome_back_url 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/lib/awesome_back_url/version.rb +1 -1
- data/lib/awesome_back_url.rb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b258250b23be794910a6c16e2f211213fd31667d89165a70aae46349dca34ad0
|
4
|
+
data.tar.gz: eee8a71a22e5f61f712789accc800cb27f41de3e7691f10bedd9a230f3754713
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2a83f18b99e63f05f255399cc459c818ac6484d8f8cf6749b083bdb69354aa5fca0917f9c0e2ef516c8310cca45d69000d2008f85e1f0c12aaa18cbc6b8a4d2
|
7
|
+
data.tar.gz: 01c66012327c54bc28b4abdb6de639244df3d30d010b1d42f7c88d2a424afc52afcd433688be78872798bb6cb465a3991278420b1723ed09916ffd78e635161a
|
data/README.md
CHANGED
@@ -5,11 +5,11 @@ Redirect to proper back URL for your Rails applications. In case if you want to
|
|
5
5
|
## Usage
|
6
6
|
|
7
7
|
```ruby
|
8
|
-
awesome_back_path(except: /\/new|\/edit/, fallback: users_path)
|
9
|
-
awesome_back_path('/path', except: /\/new|\/edit/, fallback: '/users')
|
10
|
-
awesome_back_path('/path/new', except: /\/new|\/edit/, fallback: '/users')
|
11
|
-
awesome_back_path('/path/edit', except: /\/new|\/edit/, fallback: '/users')
|
12
|
-
awesome_back_path('/path', only: /\/new|\/edit/, fallback: '/users')
|
8
|
+
link_to 'Back', awesome_back_path(except: /\/new|\/edit/, fallback: users_path) # returns '/users'
|
9
|
+
link_to 'Back', awesome_back_path('/path', except: /\/new|\/edit/, fallback: '/users') # returns '/path'
|
10
|
+
link_to 'Back', awesome_back_path('/path/new', except: /\/new|\/edit/, fallback: '/users') # returns '/users'
|
11
|
+
link_to 'Back', awesome_back_path('/path/edit', except: /\/new|\/edit/, fallback: '/users') # returns '/users'
|
12
|
+
link_to 'Back', awesome_back_path('/path', only: /\/new|\/edit/, fallback: '/users') # returns '/users'
|
13
13
|
```
|
14
14
|
|
15
15
|
## Installation
|
data/lib/awesome_back_url.rb
CHANGED