extjs-mvc 0.1.2 → 0.1.5
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 +1 -1
- data/lib/active_record/model.rb +10 -1
- data/lib/extjs-mvc.rb +18 -0
- data/lib/mvc.rb +2 -18
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.5
|
data/lib/active_record/model.rb
CHANGED
@@ -50,7 +50,16 @@ module ExtJS
|
|
50
50
|
{
|
51
51
|
"fields" => @@fields.collect {|f|
|
52
52
|
col = self.columns.find {|c| c.name.to_sym === f}
|
53
|
-
|
53
|
+
type = col.type
|
54
|
+
case col.type
|
55
|
+
when :datetime || :date || :time || :timestamp
|
56
|
+
type = :date
|
57
|
+
when :text
|
58
|
+
type = :string
|
59
|
+
when :integer
|
60
|
+
type = :int
|
61
|
+
end
|
62
|
+
field = {:name => col.name, :allowBlank => col.null, :type => type}
|
54
63
|
field[:dateFormat] = "c" if col.type === :datetime || col.type === :date # <-- ugly hack for date
|
55
64
|
field
|
56
65
|
},
|
data/lib/extjs-mvc.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
module ExtJS
|
2
|
+
class MVC
|
3
|
+
@@success_property = :success
|
4
|
+
@@message_property = :message
|
5
|
+
@@root = :data
|
6
|
+
cattr_accessor :success_property
|
7
|
+
cattr_accessor :message_property
|
8
|
+
cattr_accessor :root
|
9
|
+
|
10
|
+
if defined?(ActiveRecord)
|
11
|
+
require 'active_record/model'
|
12
|
+
end
|
13
|
+
require 'action_controller/controller'
|
14
|
+
require 'action_view/helpers/store'
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
|
data/lib/mvc.rb
CHANGED
@@ -1,18 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
@@success_property = :success
|
4
|
-
@@message_property = :message
|
5
|
-
@@root = :data
|
6
|
-
cattr_accessor :success_property
|
7
|
-
cattr_accessor :message_property
|
8
|
-
cattr_accessor :root
|
9
|
-
|
10
|
-
if defined?(ActiveRecord)
|
11
|
-
require 'active_record/model'
|
12
|
-
end
|
13
|
-
require 'action_controller/controller'
|
14
|
-
require 'action_view/helpers/store'
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
|
1
|
+
# Git naming issue when in dev mode, gem is named "mvc", when installed via gem install from Git, becomes "extjs-mvc"
|
2
|
+
require 'extjs-mvc'
|
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.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Scott
|
@@ -42,12 +42,12 @@ files:
|
|
42
42
|
- lib/action_view/helpers/store.rb
|
43
43
|
- lib/active_record/model.rb
|
44
44
|
- lib/dm/model.rb
|
45
|
+
- lib/extjs-mvc.rb
|
45
46
|
- lib/mvc.rb
|
46
47
|
- test/mvc_test.rb
|
47
48
|
- test/test_helper.rb
|
48
49
|
has_rdoc: true
|
49
50
|
homepage: http://github.com/extjs/mvc
|
50
|
-
licenses:
|
51
51
|
post_install_message:
|
52
52
|
rdoc_options:
|
53
53
|
- --charset=UTF-8
|
@@ -68,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
68
|
requirements: []
|
69
69
|
|
70
70
|
rubyforge_project:
|
71
|
-
rubygems_version: 1.
|
71
|
+
rubygems_version: 1.2.0
|
72
72
|
signing_key:
|
73
73
|
specification_version: 2
|
74
74
|
summary: Ruby tools for ExtJS development
|