url_format 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1d5dfa1ccbb5f619c64cb28afa566501f4211ffe
4
- data.tar.gz: 91d6d09f0c8c612b824a789b76c6a09bb00f553d
3
+ metadata.gz: c553211f808197b8910c54132572fb2713766a27
4
+ data.tar.gz: 32344bd21e3393e7df21f5ad0c745564ccebaa7c
5
5
  SHA512:
6
- metadata.gz: d7548a7be7112d4dd292d9c2e06a25961162f2585d53362c70db57e1de8a0c8783ac4445761de62c035a1fd222aa5afc173591b2f5e468b4b4e0f95af368e8bd
7
- data.tar.gz: bdb879d6b050ce9e6c6c898e5e321caa0e5a1c99a4bf61a446713f8b6b5006bdadf2aff59bcae7d1c340a027df1b9b3a06c5f707152dd55ba31ea3b2c5669262
6
+ metadata.gz: 6cfc469b1170baafbea1f8d729ed28d4347e61cf7db621d9e4f90456eb8f1a955bb0ccb3265191a424ccfb24f018a9df2fe4d50543c89771a0ff844cba227470
7
+ data.tar.gz: a60ff9bc7200221a97eedd9f1e733724bdf4845c5f563a822d79c8f60ddb2c0a6f83109273b91be102bd610569de69c2c67eff47b4f7e77a164ae0e1f61c4151
@@ -9,7 +9,7 @@ class UrlFormatValidator < ActiveModel::EachValidator
9
9
  end
10
10
 
11
11
  def format_value(value)
12
- value = "http://#{value}" unless value =~ /\Ahttps?:\/\//
12
+ record.send("#{attribute}=","http://#{value}") unless value =~ /\Ahttps?:\/\//
13
13
  end
14
14
 
15
15
  # Thanks to Dean Perry and Ryan Bates
@@ -1,3 +1,3 @@
1
1
  module UrlFormat
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: url_format
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Otander