extjs-mvc 0.1.13 → 0.1.14

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.13
1
+ 0.1.14
@@ -0,0 +1,24 @@
1
+ module ExtJS::Helpers
2
+ module Component
3
+ def extjs_create_component(params)
4
+ ExtJS::Component.new(params)
5
+ end
6
+ end
7
+ end
8
+
9
+ class ExtJS::Component
10
+
11
+ def initialize(params)
12
+ @params = params
13
+ @params[:items] = [] if @params[:items].nil?
14
+ end
15
+
16
+ def add(p)
17
+ @params[:items] << p
18
+ end
19
+
20
+ def render
21
+ cmp = "Ext.ComponentMgr.create(#{@params.to_json});"
22
+ "<script>Ext.onReady(function() {#{cmp}});</script>"
23
+ end
24
+ end
data/lib/extjs-mvc.rb CHANGED
@@ -10,6 +10,7 @@ module ExtJS
10
10
  if defined?(ActiveRecord)
11
11
  require 'active_record/model'
12
12
  end
13
+ require 'action_view/helpers/component'
13
14
  require 'action_controller/controller'
14
15
  require 'action_view/helpers/store'
15
16
  end
data/lib/mvc.rb CHANGED
@@ -12,6 +12,7 @@ module ExtJS
12
12
  end
13
13
  require 'action_controller/controller'
14
14
  require 'action_view/helpers/store'
15
+ require 'action_view/helpers/component'
15
16
  end
16
17
  end
17
18
 
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.13
4
+ version: 0.1.14
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-08-31 00:00:00 -07:00
12
+ date: 2009-09-03 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -39,6 +39,7 @@ files:
39
39
  - Rakefile
40
40
  - VERSION
41
41
  - lib/action_controller/controller.rb
42
+ - lib/action_view/helpers/component.rb
42
43
  - lib/action_view/helpers/store.rb
43
44
  - lib/active_record/model.rb
44
45
  - lib/dm/model.rb