simple_params 0.0.2.pre3 → 0.0.2.pre4

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NzA0NmIwOWFmNjFmOGRjMWMzOGI1OWNiNjNkZTc2YWFkMmQ5MzllNA==
4
+ OTVhZDQxZjQzMzZiMWI2ODU1MTc2MWNkMDJlYWY2M2YxN2JlNzMxZQ==
5
5
  data.tar.gz: !binary |-
6
- OTY1MzA1MTM3NGVkMzNhMGE3ODUxNDdiNGU5ODdkZGQ5MzE5ZjcwZQ==
6
+ YTk1ZjhhZGUwMmIyMjFlNmU5NThkNTczMDNiNDA0MGJhMmY4Y2U5Ng==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NmNhMzY3NTJiNTdmYzE5MmNiNjI3NjI1MTBhNzcwNzMwYmQzYzRjMjA2Nzlj
10
- YThjZWFhNGM1N2NiYzc4NzhlNmMxNDA1YzMzZjIxYmIwMTFhOWI3MmUzNDgw
11
- YmE1Y2VhZjNhZjFlN2ViYTY5YjdjNjIxZTdlMjFiYTJmOGFiNTI=
9
+ ZDJhZDkzY2Q5OTFmZmY1NDNhMDlmNDQ1MDA1YThiNjcwZDBlZDhhNmIxODQ0
10
+ NWQzYzg4YzQxMjMwZTY2NWJlZDg1ZGQxMDhmNWU0YTExMmI0ZjBhZmQwMzFm
11
+ ZWE0M2JiY2IzNzY5MTZmYWMzYzllYmE2Y2Q5ZGU1ZDYyOTgyZmY=
12
12
  data.tar.gz: !binary |-
13
- OGVkMjVhYjRkNjgwN2IzYjg4MDFiMWNlNmYxYzIyNjI3NTZjNWUzYzM0OTk5
14
- NmI0ODcyZGE1ODI4ODE3MjJjOTFhNmY4OTU3ZGNmMWU4OTQ5ZTBkYzI3NDI0
15
- YjhhMTA3YjJiZWJmOWY4MmY5Y2YxOGM0MGRiYmIxZDgwZGY1MjU=
13
+ NjFhZmI0NTZhNWE0NjNhNGU0YmUxZWFjYmY2M2NhM2MzMDgxZGYzNGMxZTFj
14
+ ZDI0YzgwOWE3YjQxMjAwZTgxNjU0NTA3NDJhNmM3MzlkNzVkMDhmYmZiOWFl
15
+ ZjMwMzFmYmY3ZTc3ZWVhOTYwOGZlM2FlZGMyNDNhNjQxYmFlNmI=
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simple_params (0.0.2.pre2)
4
+ simple_params (0.0.2.pre3)
5
5
  activemodel (>= 3.0, < 5.0)
6
6
  virtus (>= 1.0.0)
7
7
 
@@ -78,7 +78,16 @@ module SimpleParams
78
78
  end
79
79
 
80
80
  def to_hash(full_messages = false)
81
- messages = super(full_messages)
81
+ messages = if full_messages
82
+ msgs = {}
83
+ self.messages.each do |attribute, array|
84
+ msgs[attribute] = array.map { |message| full_message(attribute, message) }
85
+ end
86
+ msgs
87
+ else
88
+ self.messages.dup
89
+ end
90
+
82
91
  nested_messages = @nested_attributes.map do |attribute|
83
92
  errors = nested_error_messages(attribute, full_messages)
84
93
  unless errors.empty?
@@ -1,3 +1,3 @@
1
1
  module SimpleParams
2
- VERSION = "0.0.2.pre3"
2
+ VERSION = "0.0.2.pre4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_params
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2.pre3
4
+ version: 0.0.2.pre4
5
5
  platform: ruby
6
6
  authors:
7
7
  - brycesenz