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 CHANGED
@@ -1,7 +1,16 @@
1
1
  == ActsAsExtjs
2
2
 
3
- ActiveRecord Helper for Extjs
3
+ ActiveRecord Store - Helper for Extjs
4
4
 
5
+ == Dependecy
6
+
7
+ * Rails 3
8
+
9
+ == Installtion
10
+
11
+ Insert into Gemfile
12
+
13
+ gem 'acts_as_extjs'
5
14
 
6
15
  == Integration
7
16
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.5
1
+ 0.3.0
@@ -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.1.5"
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-09}
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
- # empty named sop
23
- if Rails.version.at(0).to_i >= 3
24
- scope :extjs
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.each do |error|
158
- if error.last.at(0) == '^'
159
- message = error.last.slice(1..-1)
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(error.first)} #{error.last}"
158
+ message = "#{self.class.human_attribute_name(field)} #{error}"
162
159
  end
163
- hash["data[#{error.first}]"] = message
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
- - 1
8
- - 5
9
- version: 0.1.5
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-09 00:00:00 +02:00
17
+ date: 2010-10-10 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency