extjs-mvc 0.1.25 → 0.1.30

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.
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require 'rake'
4
4
  begin
5
5
  require 'jeweler'
6
6
  Jeweler::Tasks.new do |gem|
7
- gem.name = "mvc"
7
+ gem.name = "extjs-mvc"
8
8
  gem.summary = %Q{Ruby tools for ExtJS development}
9
9
  gem.description = %Q{MVC tools to assist with ExtJS development in Rails and Merb}
10
10
  gem.email = "christocracy@gmail.com"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.25
1
+ 0.1.30
@@ -16,7 +16,15 @@ module ExtJS
16
16
  def to_record
17
17
  data = {self.class.primary_key => self.send(self.class.primary_key)}
18
18
  self.class.extjs_record_fields.each do |f|
19
- data[f] = self.send(f)
19
+ if refl = self.class.reflections[f]
20
+ if refl.macro === :belongs_to
21
+ data[f] = self.send(f).to_record
22
+ elsif refl.macro === :has_many
23
+ data[f] = self.send(f).collect {|r| r.to_record}
24
+ end
25
+ else
26
+ data[f] = self.send(f)
27
+ end
20
28
  end
21
29
  data
22
30
  end
@@ -4,11 +4,11 @@
4
4
  module ExtJS::Data
5
5
  class Store
6
6
  attr_accessor :id, :format, :type, :controller, :model
7
-
8
- def initialize(params)
7
+
8
+ def initialize(*params)
9
9
  options = params.extract_options!
10
10
  options[:format] = 'json' if options[:format].nil?
11
-
11
+
12
12
  @config = options[:config]
13
13
 
14
14
  @format = options[:format]
data/lib/helpers/store.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module ExtJS::Helpers
2
2
  module Store
3
3
  def extjs_store(*params)
4
- ExtJS::Data::Store.new(params)
4
+ ExtJS::Data::Store.new(*params)
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: extjs-mvc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.25
4
+ version: 0.1.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Scott
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-13 00:00:00 -07:00
12
+ date: 2009-09-30 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -51,6 +51,8 @@ files:
51
51
  - test/test_helper.rb
52
52
  has_rdoc: true
53
53
  homepage: http://github.com/extjs/mvc
54
+ licenses: []
55
+
54
56
  post_install_message:
55
57
  rdoc_options:
56
58
  - --charset=UTF-8
@@ -71,9 +73,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
71
73
  requirements: []
72
74
 
73
75
  rubyforge_project:
74
- rubygems_version: 1.2.0
76
+ rubygems_version: 1.3.5
75
77
  signing_key:
76
- specification_version: 2
78
+ specification_version: 3
77
79
  summary: Ruby tools for ExtJS development
78
80
  test_files: []
79
81