tbone 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/generators/tbone/scaffold_backbone_router/templates/router.coffee.erb +20 -20
- data/tbone.gemspec +1 -1
- metadata +8 -8
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
@@ -17,36 +17,36 @@ define [
|
|
17
17
|
"<%= plural_name %>.*" : "index"
|
18
18
|
|
19
19
|
initialize: (options) ->
|
20
|
-
|
20
|
+
@<%= plural_name %> = options.collection
|
21
21
|
|
22
|
-
new
|
23
|
-
view = require 'views
|
24
|
-
@view = new view(collection:
|
22
|
+
new<%= class_name %>: ->
|
23
|
+
view = require 'views/<%= plural_name %>/new_view'
|
24
|
+
@view = new view(collection: @<%= plural_name %>, model: new @<%= plural_name %>.model())
|
25
25
|
Layout.setContent(@view)
|
26
26
|
|
27
27
|
index: (page = 1) ->
|
28
|
-
|
29
|
-
View = require 'views
|
30
|
-
@view = new View(collection:
|
28
|
+
@<%= plural_name %>.setPage(page)
|
29
|
+
View = require 'views/<%= plural_name %>/index_view'
|
30
|
+
@view = new View(collection: @<%= plural_name %>)
|
31
31
|
Layout.setContent(@view)
|
32
32
|
|
33
33
|
show: (id) ->
|
34
|
-
View = require 'views
|
35
|
-
|
36
|
-
@view = new View(model:
|
34
|
+
View = require 'views/<%= plural_name %>/show_view'
|
35
|
+
<%= single_name %> = this.get<%= class_name %> id, (<%= single_name %>) ->
|
36
|
+
@view = new View(model: <%= single_name %>)
|
37
37
|
Layout.setContent(@view)
|
38
38
|
|
39
39
|
edit: (id) ->
|
40
|
-
View = require 'views
|
41
|
-
this.get
|
42
|
-
@view = new View(model:
|
40
|
+
View = require 'views/<%= plural_name %>/edit_view'
|
41
|
+
this.get<%= class_name %> id, (<%= single_name %>) ->
|
42
|
+
@view = new View(model: <%= single_name %>)
|
43
43
|
Layout.setContent(@view)
|
44
44
|
|
45
|
-
get
|
46
|
-
|
47
|
-
if
|
48
|
-
handler(
|
45
|
+
get<%= class_name %>: (id, handler) ->
|
46
|
+
<%= single_name %> = @<%= plural_name %>.get(id)
|
47
|
+
if <%= single_name %>?
|
48
|
+
handler(<%= single_name %>)
|
49
49
|
else
|
50
|
-
|
51
|
-
|
52
|
-
|
50
|
+
<%= single_name %> = new @<%= plural_name %>.model()
|
51
|
+
<%= single_name %>.id = id
|
52
|
+
<%= single_name %>.fetch(success: handler)
|
data/tbone.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tbone
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-07-08 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rdoc
|
16
|
-
requirement: &
|
16
|
+
requirement: &70326152370340 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70326152370340
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: bundler
|
27
|
-
requirement: &
|
27
|
+
requirement: &70326152369720 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70326152369720
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: jeweler
|
38
|
-
requirement: &
|
38
|
+
requirement: &70326152369120 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70326152369120
|
47
47
|
description: Library for mixing together requirejs backbone and twitter bootstrap
|
48
48
|
email: fazzzenda@mail.ru
|
49
49
|
executables: []
|
@@ -128,7 +128,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
128
128
|
version: '0'
|
129
129
|
segments:
|
130
130
|
- 0
|
131
|
-
hash:
|
131
|
+
hash: -635141089194474263
|
132
132
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
133
|
none: false
|
134
134
|
requirements:
|