simple_model 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/lib/simple_model.rb CHANGED
@@ -3,7 +3,7 @@ module SimpleModel
3
3
  autoload :ExtendCore, "simple_model/extend_core"
4
4
  autoload :Attributes, "simple_model/attributes"
5
5
  autoload :Errors, "simple_model/errors"
6
- autoloan :ErrorHelpers, "simple_model/error_helpers"
6
+ autoload :ErrorHelpers, "simple_model/error_helpers"
7
7
  autoload :Validation, "simple_model/validation"
8
8
 
9
9
  # require active_model if available
@@ -1,26 +1,25 @@
1
- # To change this template, choose Tools | Templates
2
- # and open the template in the editor.
1
+ module SimpleModel
2
+ module ErrorHelpers
3
3
 
4
- module ErrorHelpers
5
-
6
- def errors?
7
- !self.errors.nil? && !self.errors.empty?
8
- end
4
+ def errors?
5
+ !self.errors.nil? && !self.errors.empty?
6
+ end
9
7
 
10
- def errors_for_flash
11
- error_string = "<div id='smErrorExplanation'>#{self.errors.count} errors prevented saving.</div>"
12
- self.errors.full_messages.each do |m|
13
- error_string << "<div>#{m}</div>"
8
+ def errors_for_flash
9
+ error_string = "<div id='smErrorExplanation'>#{self.errors.count} errors prevented saving.</div>"
10
+ self.errors.full_messages.each do |m|
11
+ error_string << "<div>#{m}</div>"
12
+ end
13
+ error_string
14
14
  end
15
- error_string
16
- end
17
15
 
18
- def errors_to_s
19
- error_string = ""
20
- self.errors.full_messages.each do |m|
21
- error_string << "#{m} "
16
+ def errors_to_s
17
+ error_string = ""
18
+ self.errors.full_messages.each do |m|
19
+ error_string << "#{m} "
20
+ end
21
+ error_string
22
22
  end
23
- error_string
24
- end
25
23
 
24
+ end
26
25
  end
@@ -1,3 +1,3 @@
1
1
  module SimpleModel
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 4
9
- version: 0.1.4
8
+ - 5
9
+ version: 0.1.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Joshua T Mckinney