padrino-helpers 0.6.7 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.7
1
+ 0.7.0
@@ -12,8 +12,9 @@ module Padrino
12
12
  end
13
13
 
14
14
  # f.error_messages
15
- def error_messages(options={})
16
- @template.error_messages_for(@object, options)
15
+ def error_messages(*params)
16
+ params.unshift object_name.to_sym
17
+ @template.error_messages_for(*params)
17
18
  end
18
19
 
19
20
  # f.label :username, :caption => "Nickname"
@@ -111,7 +112,7 @@ module Padrino
111
112
 
112
113
  def field_error(field, options)
113
114
  if @object && @object.respond_to?(:errors) && @object.errors.respond_to?(:on) && @object.errors.on(field)
114
- options[:class] = ["x-form-text", "x-form-invalid", options[:class]].compact.join(" ")
115
+ ["x-form-invalid", options[:class]].compact.join(" ")
115
116
  end
116
117
  end
117
118
 
@@ -90,6 +90,7 @@ module Padrino
90
90
  def label_tag(name, options={}, &block)
91
91
  options.reverse_merge!(:caption => "#{name.to_s.titleize}: ", :for => name)
92
92
  caption_text = options.delete(:caption)
93
+ caption_text << "* " if options.delete(:required)
93
94
  if block_given? # label with inner content
94
95
  label_content = caption_text + capture_html(&block)
95
96
  concat_content(content_tag(:label, label_content, options))
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{padrino-helpers}
8
- s.version = "0.6.7"
8
+ s.version = "0.7.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Padrino Team", "Nathan Esquenazi", "Davide D'Agostino", "Arthur Chiu"]
12
- s.date = %q{2010-01-26}
12
+ s.date = %q{2010-01-31}
13
13
  s.description = %q{Tag helpers, asset helpers, form helpers, form builders and many more helpers for padrino}
14
14
  s.email = %q{nesquena@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -80,7 +80,7 @@ Gem::Specification.new do |s|
80
80
 
81
81
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
82
82
  s.add_runtime_dependency(%q<sinatra>, [">= 0.9.2"])
83
- s.add_runtime_dependency(%q<padrino-core>, ["= 0.6.7"])
83
+ s.add_runtime_dependency(%q<padrino-core>, ["= 0.7.0"])
84
84
  s.add_development_dependency(%q<haml>, [">= 2.2.1"])
85
85
  s.add_development_dependency(%q<shoulda>, [">= 0"])
86
86
  s.add_development_dependency(%q<mocha>, [">= 0.9.7"])
@@ -88,7 +88,7 @@ Gem::Specification.new do |s|
88
88
  s.add_development_dependency(%q<webrat>, [">= 0.5.1"])
89
89
  else
90
90
  s.add_dependency(%q<sinatra>, [">= 0.9.2"])
91
- s.add_dependency(%q<padrino-core>, ["= 0.6.7"])
91
+ s.add_dependency(%q<padrino-core>, ["= 0.7.0"])
92
92
  s.add_dependency(%q<haml>, [">= 2.2.1"])
93
93
  s.add_dependency(%q<shoulda>, [">= 0"])
94
94
  s.add_dependency(%q<mocha>, [">= 0.9.7"])
@@ -97,7 +97,7 @@ Gem::Specification.new do |s|
97
97
  end
98
98
  else
99
99
  s.add_dependency(%q<sinatra>, [">= 0.9.2"])
100
- s.add_dependency(%q<padrino-core>, ["= 0.6.7"])
100
+ s.add_dependency(%q<padrino-core>, ["= 0.7.0"])
101
101
  s.add_dependency(%q<haml>, [">= 2.2.1"])
102
102
  s.add_dependency(%q<shoulda>, [">= 0"])
103
103
  s.add_dependency(%q<mocha>, [">= 0.9.7"])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: padrino-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.7
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Padrino Team
@@ -12,7 +12,7 @@ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
14
 
15
- date: 2010-01-26 00:00:00 +01:00
15
+ date: 2010-01-31 00:00:00 +01:00
16
16
  default_executable:
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
@@ -33,7 +33,7 @@ dependencies:
33
33
  requirements:
34
34
  - - "="
35
35
  - !ruby/object:Gem::Version
36
- version: 0.6.7
36
+ version: 0.7.0
37
37
  version:
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: haml