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: 312cb7ab3456051bd02ce370632315213846dd1eea8a68627a291f353a84c6b8
4
- data.tar.gz: 58a0be9855654507bda85a1b8afc4f4aefa8a10a39ce96b2ed98c6fb389260e3
3
+ metadata.gz: ca33b7c60de0f51c85c943bb53b00da0bd60a9e6d25540c129a9af2f74b3ed34
4
+ data.tar.gz: b8de5a9552fe3236b9a527dc6559f96f5ebfb111bcef99a27faf2db25d5974b8
5
5
  SHA512:
6
- metadata.gz: 314a394f93cbb5a7eb7a81d5dcd17be79679af8370c8587b8205252d02d53ff3ae4c8b003c0f07d0e5f784b0cd3fa4cb89e1ca7439601e564a2da6c7c9042a93
7
- data.tar.gz: 71f8c517ddf90c88cfce8367a5141a4686eb666d49dc32f675ea596858f297cb70b5cd8ae9a43212f00c5c60f2c0413e5b570b6e52916d2a3b62661e28f8c005
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.permit!
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
@@ -1,3 +1,3 @@
1
1
  module ShortRails
2
- VERSION = '2.0.0'
2
+ VERSION = '2.0.1'
3
3
  end
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.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: 2021-11-16 00:00:00.000000000 Z
12
+ date: 2022-04-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails