hobo 0.8.3 → 0.8.4

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.
Files changed (80) hide show
  1. data/CHANGES.txt +330 -0
  2. data/Manifest +12 -4
  3. data/Rakefile +4 -6
  4. data/dryml_generators/rapid/cards.dryml.erb +5 -1
  5. data/dryml_generators/rapid/forms.dryml.erb +8 -10
  6. data/dryml_generators/rapid/pages.dryml.erb +65 -36
  7. data/hobo.gemspec +28 -15
  8. data/lib/active_record/association_collection.rb +3 -22
  9. data/lib/hobo.rb +25 -258
  10. data/lib/hobo/accessible_associations.rb +131 -0
  11. data/lib/hobo/authentication_support.rb +15 -9
  12. data/lib/hobo/composite_model.rb +1 -1
  13. data/lib/hobo/controller.rb +7 -8
  14. data/lib/hobo/dryml.rb +9 -10
  15. data/lib/hobo/dryml/dryml_builder.rb +7 -1
  16. data/lib/hobo/dryml/dryml_doc.rb +161 -0
  17. data/lib/hobo/dryml/dryml_generator.rb +18 -9
  18. data/lib/hobo/dryml/part_context.rb +76 -42
  19. data/lib/hobo/dryml/tag_parameters.rb +1 -0
  20. data/lib/hobo/dryml/taglib.rb +2 -1
  21. data/lib/hobo/dryml/template.rb +39 -29
  22. data/lib/hobo/dryml/template_environment.rb +79 -37
  23. data/lib/hobo/dryml/template_handler.rb +66 -21
  24. data/lib/hobo/guest.rb +2 -10
  25. data/lib/hobo/hobo_helper.rb +125 -53
  26. data/lib/hobo/include_in_save.rb +0 -1
  27. data/lib/hobo/lifecycles.rb +54 -24
  28. data/lib/hobo/lifecycles/actions.rb +95 -31
  29. data/lib/hobo/lifecycles/creator.rb +18 -23
  30. data/lib/hobo/lifecycles/lifecycle.rb +86 -62
  31. data/lib/hobo/lifecycles/state.rb +1 -2
  32. data/lib/hobo/lifecycles/transition.rb +22 -28
  33. data/lib/hobo/model.rb +64 -176
  34. data/lib/hobo/model_controller.rb +67 -54
  35. data/lib/hobo/model_router.rb +5 -2
  36. data/lib/hobo/permissions.rb +397 -0
  37. data/lib/hobo/permissions/associations.rb +167 -0
  38. data/lib/hobo/scopes.rb +15 -38
  39. data/lib/hobo/scopes/association_proxy_extensions.rb +15 -5
  40. data/lib/hobo/scopes/automatic_scopes.rb +43 -18
  41. data/lib/hobo/scopes/named_scope_extensions.rb +2 -2
  42. data/lib/hobo/user.rb +10 -4
  43. data/lib/hobo/user_controller.rb +6 -5
  44. data/lib/hobo/view_hints.rb +58 -0
  45. data/rails_generators/hobo/hobo_generator.rb +7 -3
  46. data/rails_generators/hobo/templates/guest.rb +1 -13
  47. data/rails_generators/hobo_front_controller/hobo_front_controller_generator.rb +1 -1
  48. data/rails_generators/hobo_model/hobo_model_generator.rb +4 -2
  49. data/rails_generators/hobo_model/templates/hints.rb +4 -0
  50. data/rails_generators/hobo_model/templates/model.rb +8 -8
  51. data/rails_generators/hobo_model_controller/hobo_model_controller_generator.rb +10 -0
  52. data/rails_generators/hobo_model_controller/templates/controller.rb +1 -1
  53. data/rails_generators/hobo_rapid/templates/hobo-rapid.js +91 -56
  54. data/rails_generators/hobo_rapid/templates/lowpro.js +15 -15
  55. data/rails_generators/hobo_rapid/templates/reset.css +36 -3
  56. data/rails_generators/hobo_rapid/templates/themes/clean/public/stylesheets/clean.css +13 -17
  57. data/rails_generators/hobo_user_controller/templates/controller.rb +1 -1
  58. data/rails_generators/hobo_user_model/templates/model.rb +18 -16
  59. data/taglibs/core.dryml +60 -18
  60. data/taglibs/rapid.dryml +8 -401
  61. data/taglibs/rapid_core.dryml +586 -0
  62. data/taglibs/rapid_document_tags.dryml +28 -10
  63. data/taglibs/rapid_editing.dryml +92 -55
  64. data/taglibs/rapid_forms.dryml +406 -87
  65. data/taglibs/rapid_generics.dryml +1 -1
  66. data/taglibs/rapid_navigation.dryml +2 -1
  67. data/taglibs/rapid_pages.dryml +7 -16
  68. data/taglibs/rapid_plus.dryml +39 -14
  69. data/taglibs/rapid_support.dryml +1 -1
  70. data/taglibs/rapid_user_pages.dryml +14 -4
  71. data/tasks/{generate_tag_reference.rb → generate_tag_reference.rake} +49 -18
  72. data/tasks/hobo_tasks.rake +16 -0
  73. data/test/permissions/models/models.rb +134 -0
  74. data/test/permissions/models/schema.rb +55 -0
  75. data/test/permissions/models/test.sqlite3 +0 -0
  76. data/test/permissions/test_permissions.rb +436 -0
  77. metadata +27 -14
  78. data/lib/hobo/mass_assignment.rb +0 -64
  79. data/rails_generators/hobo/templates/patch_routing.rb +0 -30
  80. data/uninstall.rb +0 -1
@@ -15,33 +15,31 @@ cancel_to_index_page = !cancel_to_index_page && linkable?(:index)
15
15
  </form>
16
16
  </def>
17
17
 
18
- <% if defined? model::Lifecycle -%>
19
- <% model::Lifecycle.creators.values.where.publishable?.each do |creator| -%>
20
- <def tag="<%= creator.name.dasherize %>-form" polymorphic/>
21
- <def tag="<%= creator.name.dasherize %>-form" for="<%= model.name %>">
18
+ <% creators.each do |creator| -%>
19
+ <def tag="<%= creator.name.to_s.dasherize %>-form" polymorphic/>
20
+ <def tag="<%= creator.name.to_s.dasherize %>-form" for="<%= model.name %>">
22
21
  <form lifecycle="<%= creator.name %>">
23
22
  <error-messages param/>
24
23
  <field-list fields="<%= creator.parameters * ', ' %>" param/>
25
24
  <div param="actions">
26
- <submit label="<%= creator.name.titleize %>" param/><or-cancel param="cancel"/>
25
+ <submit label="<%= creator.name.to_s.titleize %>" param/><or-cancel param="cancel"/>
27
26
  </div>
28
27
  </form>
29
28
  </def>
30
29
  <% end -%>
31
30
 
32
- <% model::Lifecycle.transitions.where.publishable?.each do |transition| -%>
33
- <def tag="<%= transition.name.dasherize %>-form" polymorphic/>
34
- <def tag="<%= transition.name.dasherize %>-form" for="<%= model.name %>">
31
+ <% transitions.each do |transition| -%>
32
+ <def tag="<%= transition.name.to_s.dasherize %>-form" polymorphic/>
33
+ <def tag="<%= transition.name.to_s.dasherize %>-form" for="<%= model.name %>">
35
34
  <form lifecycle="<%= transition.name %>">
36
35
  <error-messages param/>
37
36
  <input type="hidden" name="key" value="&this.lifecycle.provided_key" if="&this.lifecycle.provided_key"/>
38
37
  <field-list fields="<%= transition.parameters * ', ' %>" param/>
39
38
  <div param="actions">
40
- <submit label="<%= transition.name.titleize %>" param/><or-cancel param="cancel"/>
39
+ <submit label="<%= transition.name.to_s.titleize %>" param/><or-cancel param="cancel"/>
41
40
  </div>
42
41
  </form>
43
42
  </def>
44
43
  <% end -%>
45
- <% end # of if defined? model::Lifecycle -%>
46
44
 
47
45
  <% end # of each_model do -%>
@@ -33,7 +33,7 @@ new_link = linkable?(:new)
33
33
  <section param="content-body">
34
34
  <% if new_link -%>
35
35
 
36
- <a action="new" to="&model" merge-params/>
36
+ <a action="new" to="&model" param="new-link"/>
37
37
  <% end -%>
38
38
 
39
39
  <page-nav param="top-page-nav"/>
@@ -74,7 +74,10 @@ creator_link = creator && model.reflections[creator] && linkable?(model.reflec
74
74
  edit_link = linkable?(:edit)
75
75
  main_content = model.primary_content_attribute
76
76
  show_fields = standard_fields(:belongs_to).*.to_s - [model.name_attribute, main_content, creator, back_link, *boolean_fields].*.to_s
77
- collection = model.dependent_collections.sort_by(&:to_s).first
77
+
78
+ is_user_model = model < Hobo::User
79
+
80
+ collection = model.view_hints.primary_children
78
81
  if collection
79
82
  collection_class = model.reflections[collection].klass
80
83
  owner = model.reverse_reflection(collection)._?.name
@@ -83,6 +86,8 @@ if collection
83
86
  add_form = !add_link && linkable?(collection_class, :"create_for_#{owner}", :method => :post)
84
87
  end
85
88
  end
89
+
90
+ aside_collections = model.view_hints.secondary_children unless model.view_hints.secondary_children.empty?
86
91
  -%>
87
92
  <def tag="show-page" for="<%= model.name %>">
88
93
  <page merge title="<%= model_name :title %>">
@@ -90,60 +95,79 @@ end
90
95
  <body: class="show-page <%= model_class %>" param/>
91
96
 
92
97
  <content: param>
93
- <header param="content-header">
98
+ <% if aside_collections -%>
99
+ <section-group param="content-body">
100
+ <section param="main-content">
101
+ <% end -%>
102
+ <header param="content-header">
94
103
  <% if back_link -%>
95
- <a:<%= back_link %> param="parent-link">&laquo; <name/></a>
104
+ <a:<%= back_link %> param="parent-link">&laquo; <name/></a>
96
105
  <% end -%>
97
- <h2 param="heading"><name/></h2>
98
- <% if boolean_fields.any? -%>
106
+ <h2 param="heading"><name/></h2>
107
+ <% if boolean_fields -%>
99
108
 
100
- <field-names-where-true fields="<%= boolean_fields * ', ' %>" param/>
109
+ <field-names-where-true fields="<%= boolean_fields * ', ' %>" param/>
101
110
  <% end -%>
102
111
  <% if creator_link -%>
103
112
 
104
- <a:<%= model.creator_attribute %> param="creator-link"/>
113
+ <a:<%= model.creator_attribute %> param="creator-link"/>
105
114
  <% elsif creator -%>
106
115
 
107
- <view:get-creator param="creator-name"/>
116
+ <view:get-creator param="creator-name"/>
108
117
  <% end -%>
109
118
  <% if edit_link -%>
110
119
 
111
- <a action="edit" if="&can_edit?" param="edit-link">Edit <%= model_name :title %></a>
120
+ <a action="edit" if="&can_edit?" param="edit-link">Edit <%= model_name :title %></a>
112
121
  <% end -%>
113
- </header>
122
+ </header>
114
123
 
115
- <section param="content-body">
124
+ <section param="content-body"<%= ' with-flash-messages' if aside_collections %>>
116
125
  <% if main_content -%>
117
- <view:<%= main_content %> param="primary-content"/>
126
+ <view:<%= main_content %> param="description"/>
118
127
  <% end -%>
119
128
  <% if show_fields.any? -%>
120
- <field-list fields="<%= show_fields * ', ' %>" param/>
129
+ <field-list fields="<%= show_fields * ', ' %>" param/>
121
130
  <% end -%>
122
131
  <% if collection -%>
123
- <section param="collection-section">
124
- <h3 param="collection-heading"><%= collection.to_s.titleize %></h3>
132
+ <section param="collection-section">
133
+ <h3 param="collection-heading"><%= '<Your/>' if is_user_model %><%= collection.to_s.titleize %></h3>
125
134
 
126
135
  <% if sortable_collection?(collection) -%>
127
- <sortable-collection:<%= collection %> param="collection"/>
136
+ <sortable-collection:<%= collection %> param="collection"/>
128
137
  <% else -%>
129
- <collection:<%= collection %> param/>
138
+ <collection:<%= collection %> param/>
130
139
  <% end -%>
131
140
  <% if add_link -%>
132
141
 
133
- <a:<%= collection %> action="new" if="&can_create?(@<%= model_name.underscore %>.<%= collection %>)" param="new-link">New <%= collection.to_s.singularize.titleize %></a>
142
+ <a:<%= collection %> action="new" if="&can_create?(@<%= model_name.underscore %>.<%= collection %>)" param="new-link">New <%= collection.to_s.singularize.titleize %></a>
134
143
  <% elsif add_form -%>
135
144
 
136
- <section param="add-to-collection" if="&can_create?(@<%= model_name.underscore %>.<%= collection %>)">
137
- <h3 param="add-form-heading">Add <%= a_or_an collection.to_s.singularize.titleize %></h3>
138
- <form with="&@<%= collection_class.name.underscore %> || @<%= model_name.underscore %>.<%= collection %>.new" owner="<%= owner %>" method="post" without-cancel param>
139
- <field-list: skip="<%= owner %>"/>
140
- <submit: label="Add"/>
141
- </form>
142
- </section>
145
+ <section param="add-to-collection" if="&can_create?(@<%= model_name.underscore %>.<%= collection %>)">
146
+ <h3 param="add-form-heading">Add <%= a_or_an collection.to_s.singularize.titleize %></h3>
147
+ <form with="&@<%= collection_class.name.underscore %> || @<%= model_name.underscore %>.<%= collection %>.new_candidate" owner="<%= owner %>" without-cancel param>
148
+ <field-list: skip="<%= owner %>"/>
149
+ <submit: label="Add"/>
150
+ </form>
151
+ </section>
143
152
  <% end -%>
153
+ </section>
154
+ <% end # of main collection -%>
155
+ </section>
156
+ <% if aside_collections -%>
144
157
  </section>
158
+
159
+ <aside param>
160
+ <% for collection in aside_collections -%>
161
+ <preview-with-more:<%= collection %>.recent param="preview-<%= collection %>">
162
+ <% if is_user_model -%>
163
+ <heading:><Your with="&@<%= model_name.underscore %>"/> <%= collection.to_s.titleize %></heading:>
164
+ <% end -%>
165
+ <more:>more</more:>
166
+ </preview-with-more>
167
+ <% end -%>
168
+ </aside>
169
+ </section-group>
145
170
  <% end -%>
146
- </section>
147
171
  </content:>
148
172
 
149
173
  </page>
@@ -160,7 +184,7 @@ name_attribute = model.name_attribute
160
184
 
161
185
  <content:>
162
186
  <section param="content-header">
163
- <h2 param="heading"><name/></h2>
187
+ <h2 param="heading">Edit <type-name/></h2>
164
188
  <delete-button label="Remove This <%= model_name :title %>" param/>
165
189
  </section>
166
190
 
@@ -179,6 +203,8 @@ owner_model = model.reflections[owner].klass
179
203
  linkable_owner = linkable?(owner_model, :show)
180
204
  owner_tag = linkable_owner ? "a" : "name"
181
205
 
206
+ owner_is_user = owner_model < Hobo::User
207
+
182
208
  owner = model.reflections[owner].macro == :has_many ? owner.to_s.singularize : owner.to_s
183
209
  -%>
184
210
  <% if :index.in? actions -%>
@@ -192,17 +218,22 @@ new_link = :new.in?(actions)
192
218
 
193
219
  <content: param>
194
220
  <header param="content-header">
195
- <% if linkable_owner %><div param="back-to">Back to <a with="&@<%= owner %>"/></div><% end %>
221
+ <% if linkable_owner -%>
222
+ <div param="back-to">Back to <a with="&@<%= owner %>"/></div>
223
+ <% end -%>
224
+ <% if owner_is_user %>
225
+ <h2 param="heading"><Your with="&current_user"/> <%= model_name :title, :plural %></h2>
226
+ <% else -%>
196
227
  <h2 param="heading"><%= model_name :title, :plural %></h2>
197
228
  <h3 param="subheading">For: <<%= owner_tag %> with="&@<%= owner %>"/></h3>
198
-
229
+ <% end -%>
199
230
  <p param="count" if>There <count prefix="are"/></p>
200
231
  </header>
201
232
 
202
233
  <section param="content-body">
203
234
  <% if new_link -%>
204
235
 
205
- <a action="new" to="&model" merge-params/>
236
+ <a action="new" to="&model" param="new-link"/>
206
237
  <% end -%>
207
238
 
208
239
  <page-nav param="top-page-nav"/>
@@ -227,7 +258,7 @@ new_link = :new.in?(actions)
227
258
  <content: param>
228
259
  <header param="content-header">
229
260
  <h2 param="heading">New <%= collection_name.singularize.titleize %></h2>
230
- <h3 class="subheading" param>For: <<%= owner_tag %> with="&@<%= owner %>"/></h3>
261
+ <h3 param="subheading">For: <<%= owner_tag %> with="&@<%= owner %>"/></h3>
231
262
  </header>
232
263
 
233
264
  <section param="content-body">
@@ -243,8 +274,7 @@ new_link = :new.in?(actions)
243
274
 
244
275
  <% end # of owner_actions.each_pair -%>
245
276
 
246
- <% if defined? model::Lifecycle -%>
247
- <% model::Lifecycle.creators.values.where.publishable?.*.name.each do |creator| -%>
277
+ <% creator_names.each do |creator| -%>
248
278
  <def tag="<%= creator.dasherize %>-page" polymorphic/>
249
279
  <def tag="<%= creator.dasherize %>-page" for="<%= model.name %>">
250
280
 
@@ -266,7 +296,7 @@ new_link = :new.in?(actions)
266
296
  </def>
267
297
  <% end -%>
268
298
 
269
- <% model::Lifecycle.transitions.where.publishable?.*.name.each do |transition| -%>
299
+ <% transition_names.each do |transition| -%>
270
300
  <def tag="<%= transition.dasherize %>-page" polymorphic/>
271
301
  <def tag="<%= transition.dasherize %>-page" for="<%= model.name %>">
272
302
  <page title="<%= transition.titleize %>" merge>
@@ -287,6 +317,5 @@ new_link = :new.in?(actions)
287
317
  </def>
288
318
 
289
319
  <% end -%>
290
- <% end # of if defined? model::Lifecycle -%>
291
320
 
292
321
  <% end # of each_model do -%>
@@ -1,18 +1,18 @@
1
1
 
2
- # Gem::Specification for Hobo-0.8.3
2
+ # Gem::Specification for Hobo-0.8.4
3
3
  # Originally generated by Echoe
4
4
 
5
5
  --- !ruby/object:Gem::Specification
6
6
  name: hobo
7
7
  version: !ruby/object:Gem::Version
8
- version: 0.8.3
8
+ version: 0.8.4
9
9
  platform: ruby
10
10
  authors:
11
11
  - Tom Locke
12
12
  autorequire:
13
13
  bindir: bin
14
14
 
15
- date: 2008-10-15 00:00:00 +01:00
15
+ date: 2008-12-06 00:00:00 +00:00
16
16
  default_executable:
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
@@ -21,9 +21,9 @@ dependencies:
21
21
  version_requirement:
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.8.3
26
+ version: 0.8.4
27
27
  version:
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: hobofields
@@ -31,9 +31,9 @@ dependencies:
31
31
  version_requirement:
32
32
  version_requirements: !ruby/object:Gem::Requirement
33
33
  requirements:
34
- - - ">="
34
+ - - "="
35
35
  - !ruby/object:Gem::Version
36
- version: 0.8.3
36
+ version: 0.8.4
37
37
  version:
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: rails
@@ -43,7 +43,7 @@ dependencies:
43
43
  requirements:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: "2.1"
46
+ version: 2.2.2
47
47
  version:
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: mislav-will_paginate
@@ -68,12 +68,14 @@ extra_rdoc_files:
68
68
  - lib/active_record/association_proxy.rb
69
69
  - lib/active_record/association_reflection.rb
70
70
  - lib/extensions/test_case.rb
71
+ - lib/hobo/accessible_associations.rb
71
72
  - lib/hobo/authentication_support.rb
72
73
  - lib/hobo/bundle.rb
73
74
  - lib/hobo/composite_model.rb
74
75
  - lib/hobo/controller.rb
75
76
  - lib/hobo/dev_controller.rb
76
77
  - lib/hobo/dryml/dryml_builder.rb
78
+ - lib/hobo/dryml/dryml_doc.rb
77
79
  - lib/hobo/dryml/dryml_generator.rb
78
80
  - lib/hobo/dryml/dryml_support_controller.rb
79
81
  - lib/hobo/dryml/parser/attribute.rb
@@ -104,11 +106,12 @@ extra_rdoc_files:
104
106
  - lib/hobo/lifecycles/state.rb
105
107
  - lib/hobo/lifecycles/transition.rb
106
108
  - lib/hobo/lifecycles.rb
107
- - lib/hobo/mass_assignment.rb
108
109
  - lib/hobo/model.rb
109
110
  - lib/hobo/model_controller.rb
110
111
  - lib/hobo/model_router.rb
111
112
  - lib/hobo/model_support.rb
113
+ - lib/hobo/permissions/associations.rb
114
+ - lib/hobo/permissions.rb
112
115
  - lib/hobo/rapid_helper.rb
113
116
  - lib/hobo/scopes/apply_scopes.rb
114
117
  - lib/hobo/scopes/association_proxy_extensions.rb
@@ -120,12 +123,13 @@ extra_rdoc_files:
120
123
  - lib/hobo/undefined_access_error.rb
121
124
  - lib/hobo/user.rb
122
125
  - lib/hobo/user_controller.rb
126
+ - lib/hobo/view_hints.rb
123
127
  - lib/hobo.rb
124
128
  - LICENSE.txt
125
129
  - README
126
130
  - tasks/environments.rake
127
131
  - tasks/fix_dryml.rake
128
- - tasks/generate_tag_reference.rb
132
+ - tasks/generate_tag_reference.rake
129
133
  - tasks/hobo_tasks.rake
130
134
  files:
131
135
  - bin/hobo
@@ -139,12 +143,14 @@ files:
139
143
  - lib/active_record/association_proxy.rb
140
144
  - lib/active_record/association_reflection.rb
141
145
  - lib/extensions/test_case.rb
146
+ - lib/hobo/accessible_associations.rb
142
147
  - lib/hobo/authentication_support.rb
143
148
  - lib/hobo/bundle.rb
144
149
  - lib/hobo/composite_model.rb
145
150
  - lib/hobo/controller.rb
146
151
  - lib/hobo/dev_controller.rb
147
152
  - lib/hobo/dryml/dryml_builder.rb
153
+ - lib/hobo/dryml/dryml_doc.rb
148
154
  - lib/hobo/dryml/dryml_generator.rb
149
155
  - lib/hobo/dryml/dryml_support_controller.rb
150
156
  - lib/hobo/dryml/parser/attribute.rb
@@ -175,11 +181,12 @@ files:
175
181
  - lib/hobo/lifecycles/state.rb
176
182
  - lib/hobo/lifecycles/transition.rb
177
183
  - lib/hobo/lifecycles.rb
178
- - lib/hobo/mass_assignment.rb
179
184
  - lib/hobo/model.rb
180
185
  - lib/hobo/model_controller.rb
181
186
  - lib/hobo/model_router.rb
182
187
  - lib/hobo/model_support.rb
188
+ - lib/hobo/permissions/associations.rb
189
+ - lib/hobo/permissions.rb
183
190
  - lib/hobo/rapid_helper.rb
184
191
  - lib/hobo/scopes/apply_scopes.rb
185
192
  - lib/hobo/scopes/association_proxy_extensions.rb
@@ -191,6 +198,7 @@ files:
191
198
  - lib/hobo/undefined_access_error.rb
192
199
  - lib/hobo/user.rb
193
200
  - lib/hobo/user_controller.rb
201
+ - lib/hobo/view_hints.rb
194
202
  - lib/hobo.rb
195
203
  - LICENSE.txt
196
204
  - Manifest
@@ -200,7 +208,6 @@ files:
200
208
  - rails_generators/hobo/templates/dryml-support.js
201
209
  - rails_generators/hobo/templates/guest.rb
202
210
  - rails_generators/hobo/templates/initializer.rb
203
- - rails_generators/hobo/templates/patch_routing.rb
204
211
  - rails_generators/hobo_front_controller/hobo_front_controller_generator.rb
205
212
  - rails_generators/hobo_front_controller/templates/controller.rb
206
213
  - rails_generators/hobo_front_controller/templates/functional_test.rb
@@ -209,6 +216,7 @@ files:
209
216
  - rails_generators/hobo_front_controller/USAGE
210
217
  - rails_generators/hobo_model/hobo_model_generator.rb
211
218
  - rails_generators/hobo_model/templates/fixtures.yml
219
+ - rails_generators/hobo_model/templates/hints.rb
212
220
  - rails_generators/hobo_model/templates/model.rb
213
221
  - rails_generators/hobo_model/templates/unit_test.rb
214
222
  - rails_generators/hobo_model/USAGE
@@ -257,6 +265,7 @@ files:
257
265
  - script/generate
258
266
  - taglibs/core.dryml
259
267
  - taglibs/rapid.dryml
268
+ - taglibs/rapid_core.dryml
260
269
  - taglibs/rapid_document_tags.dryml
261
270
  - taglibs/rapid_editing.dryml
262
271
  - taglibs/rapid_forms.dryml
@@ -269,12 +278,15 @@ files:
269
278
  - taglibs/rapid_user_pages.dryml
270
279
  - tasks/environments.rake
271
280
  - tasks/fix_dryml.rake
272
- - tasks/generate_tag_reference.rb
281
+ - tasks/generate_tag_reference.rake
273
282
  - tasks/hobo_tasks.rake
274
283
  - test/generators/test_generator_helper.rb
275
284
  - test/generators/test_helper.rb
276
285
  - test/generators/test_hobo_model_controller_generator.rb
277
- - uninstall.rb
286
+ - test/permissions/models/models.rb
287
+ - test/permissions/models/schema.rb
288
+ - test/permissions/models/test.sqlite3
289
+ - test/permissions/test_permissions.rb
278
290
  - hobo.gemspec
279
291
  has_rdoc: true
280
292
  homepage: http://hobocentral.net/
@@ -303,7 +315,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
303
315
  requirements: []
304
316
 
305
317
  rubyforge_project: hobo
306
- rubygems_version: 1.2.0
318
+ rubygems_version: 1.3.1
307
319
  specification_version: 2
308
320
  summary: The web app builder for Rails
309
321
  test_files:
@@ -311,3 +323,4 @@ test_files:
311
323
  - test/generators/test_generator_helper.rb
312
324
  - test/generators/test_helper.rb
313
325
  - test/generators/test_hobo_model_controller_generator.rb
326
+ - test/permissions/test_permissions.rb
@@ -10,20 +10,9 @@ module ActiveRecord
10
10
  end
11
11
 
12
12
 
13
- def build_with_reverse_reflection(*args)
14
- res = build_without_reverse_reflection(*args)
15
- set_reverse_association(res) if hobo_association_collection?
16
- res
17
- end
18
- alias_method_chain :build, :reverse_reflection
19
-
20
-
21
- def new(attributes = {})
22
- record = @reflection.klass.new(attributes)
23
- if hobo_association_collection?
24
- set_belongs_to_association_for(record)
25
- set_reverse_association(record) unless proxy_reflection.options[:as]
26
- end
13
+ def new_candidate(attributes = {})
14
+ record = new
15
+ @target.delete record
27
16
  record
28
17
  end
29
18
 
@@ -32,14 +21,6 @@ module ActiveRecord
32
21
  proxy_reflection.klass
33
22
  end
34
23
 
35
-
36
- def proxy_respond_to_with_automatic_scopes?(method, include_priv = false)
37
- proxy_respond_to_without_automatic_scopes?(method, include_priv) ||
38
- (@reflection.klass.create_automatic_scope(method) if @reflection.klass.respond_to?(:create_automatic_scope))
39
- end
40
- alias_method_chain :proxy_respond_to?, :automatic_scopes
41
-
42
-
43
24
  private
44
25
 
45
26
  def set_reverse_association(object)