acts_as_extjs 0.1.5 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +10 -1
- data/VERSION +1 -1
- data/acts_as_extjs.gemspec +2 -2
- data/lib/acts_as_extjs.rb +9 -12
- metadata +4 -4
data/README.rdoc
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.3.0
|
data/acts_as_extjs.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{acts_as_extjs}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.3.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Marco Scholl"]
|
12
|
-
s.date = %q{2010-10-
|
12
|
+
s.date = %q{2010-10-10}
|
13
13
|
s.description = %q{ActiveRecord Helper for Extjs}
|
14
14
|
s.email = %q{develop@marco-scholl.de}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/acts_as_extjs.rb
CHANGED
@@ -19,13 +19,9 @@ module Extjs #:nodoc:
|
|
19
19
|
# end
|
20
20
|
#
|
21
21
|
def acts_as_extjs
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
else
|
26
|
-
named_scope :extjs
|
27
|
-
end
|
28
|
-
include Extjs::ActsAsExtjs::InstanceMethods
|
22
|
+
scope :extjs
|
23
|
+
|
24
|
+
include Extjs::ActsAsExtjs::InstanceMethods
|
29
25
|
extend Extjs::ActsAsExtjs::SingletonMethods
|
30
26
|
end
|
31
27
|
end
|
@@ -154,13 +150,14 @@ module Extjs #:nodoc:
|
|
154
150
|
|
155
151
|
def extjs_errors
|
156
152
|
hash = {}
|
157
|
-
self.errors.
|
158
|
-
|
159
|
-
|
153
|
+
self.errors.each_pair do |field, error|
|
154
|
+
error = error.first
|
155
|
+
if error.at(0) == '^'
|
156
|
+
message = error.slice(1..-1)
|
160
157
|
else
|
161
|
-
message = "#{self.class.human_attribute_name(
|
158
|
+
message = "#{self.class.human_attribute_name(field)} #{error}"
|
162
159
|
end
|
163
|
-
hash["
|
160
|
+
hash["#{self.class.name.downcase}[#{field}]"] = message
|
164
161
|
end
|
165
162
|
return hash
|
166
163
|
end
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 0.
|
7
|
+
- 3
|
8
|
+
- 0
|
9
|
+
version: 0.3.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Marco Scholl
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-10-
|
17
|
+
date: 2010-10-10 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|