short_rails 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca33b7c60de0f51c85c943bb53b00da0bd60a9e6d25540c129a9af2f74b3ed34
|
4
|
+
data.tar.gz: b8de5a9552fe3236b9a527dc6559f96f5ebfb111bcef99a27faf2db25d5974b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 655b5878c74abed2304d498c81deafb4ddb227a2159486af2a0c9a06e3397f555b0d5b6c7912bb3a7eafa43a09ddf3e896f4d067fc6bac441e605c9caffa5053
|
7
|
+
data.tar.gz: 881786572239f4c330f7e76723d25acf0d0668ba2d061e1d7620392c840619ddae039fb3a39abdd337c10c295502259ad5444fa81781d168c43ff784dfeee536
|
@@ -13,7 +13,7 @@ module ShortRails
|
|
13
13
|
|
14
14
|
if short_url.url_short_param.nil?
|
15
15
|
# redirect to full URL
|
16
|
-
query_params = short_url.params
|
16
|
+
query_params = short_url.params
|
17
17
|
else
|
18
18
|
# redirect to base URL with short param
|
19
19
|
query_params = {short_url.url_short_param => short_url.short}
|
@@ -29,7 +29,7 @@ module ShortRails
|
|
29
29
|
short = SecureRandom.base64(6).tr("+/=", "xyz").downcase
|
30
30
|
end while ShortUrl.where(short: short).exists?
|
31
31
|
|
32
|
-
url_params = params.except(:action, :controller, :base_url, :base_url_short_param)
|
32
|
+
url_params = params.except(:action, :controller, :base_url, :base_url_short_param).permit!.to_hash
|
33
33
|
short_url = ShortUrl.new(short: short, url: params[:base_url], params: url_params, url_short_param: params[:base_url_short_param])
|
34
34
|
if short_url.save
|
35
35
|
# return short id
|
data/lib/short_rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: short_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mathias Walker
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-04-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|