hobo 0.7.2 → 0.7.3
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/hobo +24 -7
- data/hobo_files/plugin/CHANGES.txt +501 -0
- data/hobo_files/plugin/generators/hobo/hobo_generator.rb +8 -6
- data/hobo_files/plugin/generators/hobo/templates/application.dryml +3 -0
- data/hobo_files/plugin/generators/hobo/templates/dryml-support.js +132 -0
- data/hobo_files/plugin/generators/hobo_front_controller/hobo_front_controller_generator.rb +4 -5
- data/hobo_files/plugin/generators/hobo_model_resource/hobo_model_resource_generator.rb +75 -0
- data/hobo_files/plugin/generators/hobo_model_resource/templates/controller.rb +7 -0
- data/hobo_files/plugin/generators/hobo_model_resource/templates/functional_test.rb +8 -0
- data/hobo_files/plugin/generators/hobo_model_resource/templates/helper.rb +2 -0
- data/hobo_files/plugin/generators/hobo_rapid/templates/hobo-rapid.js +30 -11
- data/hobo_files/plugin/generators/hobo_rapid/templates/themes/clean/public/stylesheets/application.css +149 -92
- data/hobo_files/plugin/generators/hobo_rapid/templates/themes/clean/public/stylesheets/rapid-ui.css +0 -48
- data/hobo_files/plugin/init.rb +45 -13
- data/hobo_files/plugin/lib/action_view_extensions/base.rb +4 -3
- data/hobo_files/plugin/lib/active_record/association_proxy.rb +18 -0
- data/hobo_files/plugin/lib/active_record/association_reflection.rb +5 -0
- data/hobo_files/plugin/lib/active_record/has_many_association.rb +7 -11
- data/hobo_files/plugin/lib/active_record/has_many_through_association.rb +8 -0
- data/hobo_files/plugin/lib/extensions/test_case.rb +1 -1
- data/hobo_files/plugin/lib/hobo.rb +38 -60
- data/hobo_files/plugin/lib/hobo/authentication_support.rb +1 -1
- data/hobo_files/plugin/lib/hobo/bundle.rb +131 -34
- data/hobo_files/plugin/lib/hobo/composite_model.rb +1 -1
- data/hobo_files/plugin/lib/hobo/controller.rb +7 -8
- data/hobo_files/plugin/lib/hobo/dev_controller.rb +21 -0
- data/hobo_files/plugin/lib/hobo/dryml/dryml_builder.rb +14 -8
- data/hobo_files/plugin/lib/hobo/dryml/dryml_support_controller.rb +13 -0
- data/hobo_files/plugin/lib/hobo/dryml/taglib.rb +6 -7
- data/hobo_files/plugin/lib/hobo/dryml/template.rb +207 -73
- data/hobo_files/plugin/lib/hobo/dryml/template_environment.rb +67 -55
- data/hobo_files/plugin/lib/hobo/dryml/template_handler.rb +53 -3
- data/hobo_files/plugin/lib/hobo/hobo_helper.rb +75 -107
- data/hobo_files/plugin/lib/hobo/model.rb +236 -429
- data/hobo_files/plugin/lib/hobo/model_controller.rb +277 -437
- data/hobo_files/plugin/lib/hobo/model_router.rb +62 -29
- data/hobo_files/plugin/lib/hobo/rapid_helper.rb +48 -9
- data/hobo_files/plugin/lib/hobo/scopes.rb +98 -0
- data/hobo_files/plugin/lib/hobo/scopes/association_proxy_extensions.rb +31 -0
- data/hobo_files/plugin/lib/hobo/scopes/automatic_scopes.rb +282 -0
- data/hobo_files/plugin/lib/hobo/scopes/defined_scope_proxy_extender.rb +88 -0
- data/hobo_files/plugin/lib/hobo/scopes/scope_reflection.rb +18 -0
- data/hobo_files/plugin/lib/hobo/scopes/scoped_proxy.rb +59 -0
- data/hobo_files/plugin/lib/hobo/undefined.rb +2 -0
- data/hobo_files/plugin/lib/hobo/user.rb +31 -14
- data/hobo_files/plugin/lib/hobo/user_controller.rb +41 -27
- data/hobo_files/plugin/taglibs/core.dryml +9 -11
- data/hobo_files/plugin/taglibs/rapid.dryml +51 -108
- data/hobo_files/plugin/taglibs/rapid_editing.dryml +25 -25
- data/hobo_files/plugin/taglibs/rapid_forms.dryml +111 -79
- data/hobo_files/plugin/taglibs/rapid_generics.dryml +74 -0
- data/hobo_files/plugin/taglibs/rapid_navigation.dryml +23 -21
- data/hobo_files/plugin/taglibs/rapid_pages.dryml +83 -169
- data/hobo_files/plugin/taglibs/rapid_plus.dryml +16 -2
- data/hobo_files/plugin/taglibs/rapid_support.dryml +3 -3
- data/hobo_files/plugin/taglibs/rapid_user_pages.dryml +104 -0
- metadata +60 -55
- data/hobo_files/plugin/generators/hobo_migration/hobo_migration_generator.rb +0 -276
- data/hobo_files/plugin/generators/hobo_migration/templates/migration.rb +0 -9
- data/hobo_files/plugin/lib/active_record/table_definition.rb +0 -34
- data/hobo_files/plugin/lib/extensions.rb +0 -375
- data/hobo_files/plugin/lib/hobo/email_address.rb +0 -12
- data/hobo_files/plugin/lib/hobo/enum_string.rb +0 -50
- data/hobo_files/plugin/lib/hobo/field_declaration_dsl.rb +0 -43
- data/hobo_files/plugin/lib/hobo/field_spec.rb +0 -68
- data/hobo_files/plugin/lib/hobo/html_string.rb +0 -7
- data/hobo_files/plugin/lib/hobo/lazy_hash.rb +0 -40
- data/hobo_files/plugin/lib/hobo/markdown_string.rb +0 -11
- data/hobo_files/plugin/lib/hobo/migrations.rb +0 -12
- data/hobo_files/plugin/lib/hobo/model_queries.rb +0 -117
- data/hobo_files/plugin/lib/hobo/password_string.rb +0 -7
- data/hobo_files/plugin/lib/hobo/percentage.rb +0 -14
- data/hobo_files/plugin/lib/hobo/predicate_dispatch.rb +0 -78
- data/hobo_files/plugin/lib/hobo/proc_binding.rb +0 -32
- data/hobo_files/plugin/lib/hobo/text.rb +0 -3
- data/hobo_files/plugin/lib/hobo/textile_string.rb +0 -25
- data/hobo_files/plugin/lib/hobo/where_fragment.rb +0 -28
data/bin/hobo
CHANGED
@@ -1,11 +1,21 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
HOBO_VERSION = "0.7.3"
|
4
|
+
|
3
5
|
require 'fileutils'
|
4
6
|
Signal.trap("INT") { puts; exit }
|
5
7
|
|
6
8
|
hobo_src = File.join(File.dirname(__FILE__), "../hobo_files/plugin")
|
7
9
|
|
8
|
-
USAGE = "USAGE: hobo
|
10
|
+
USAGE = "USAGE: hobo <options> <app-path>
|
11
|
+
|
12
|
+
Options:
|
13
|
+
--user-model <model-name-or-false>
|
14
|
+
--svn # Use 'svn co' to checkout Hobo trunk
|
15
|
+
--create-dbs # Run rake db:create:all
|
16
|
+
--hobo-src <path to hobo src>
|
17
|
+
-d | --database <database> # e.g. mysql, sqlite
|
18
|
+
"
|
9
19
|
|
10
20
|
HOBO_REPO = "svn://hobocentral.net/hobo/trunk/hobo"
|
11
21
|
|
@@ -34,8 +44,8 @@ end
|
|
34
44
|
|
35
45
|
app_path = ARGV.pop
|
36
46
|
|
37
|
-
user_model
|
38
|
-
hobo_svn
|
47
|
+
user_model = "user"
|
48
|
+
hobo_svn = create_db = false
|
39
49
|
|
40
50
|
until ARGV.empty?
|
41
51
|
case ARGV.shift
|
@@ -44,10 +54,12 @@ until ARGV.empty?
|
|
44
54
|
user_model = arg == "false" ? nil : arg
|
45
55
|
when "--svn"
|
46
56
|
hobo_svn = true
|
47
|
-
when "--
|
57
|
+
when "--create-dbs"
|
48
58
|
create_db = true
|
49
59
|
when "--hobo-src"
|
50
60
|
hobo_src = "../" + ARGV.shift
|
61
|
+
when "-d", "--database"
|
62
|
+
database_type = ARGV.shift
|
51
63
|
else
|
52
64
|
puts USAGE
|
53
65
|
exit 1
|
@@ -55,7 +67,9 @@ until ARGV.empty?
|
|
55
67
|
end
|
56
68
|
|
57
69
|
puts "\nGenerating Rails app...\n"
|
58
|
-
|
70
|
+
opts = []
|
71
|
+
opts << "-d #{database_type}" if database_type
|
72
|
+
system("rails #{opts * ' '} #{app_path}")
|
59
73
|
|
60
74
|
|
61
75
|
Dir.chdir(app_path) do
|
@@ -64,9 +78,12 @@ Dir.chdir(app_path) do
|
|
64
78
|
|
65
79
|
FileUtils.touch("public/stylesheets/application.css")
|
66
80
|
|
67
|
-
puts "\nInstalling
|
68
|
-
command(plugin, "install svn://errtheblog.com/svn/plugins/
|
81
|
+
puts "\nInstalling will_paginate\n"
|
82
|
+
command(plugin, "install svn://errtheblog.com/svn/plugins/will_paginate")
|
69
83
|
|
84
|
+
puts "\nInstalling hobofields\n"
|
85
|
+
command("svn export svn://hobocentral.net/hobofields/tags/rel_#{HOBO_VERSION} vendor/plugins/hobofields")
|
86
|
+
|
70
87
|
if hobo_svn
|
71
88
|
puts "\nInstalling Hobo plugin via svn checkout...\n"
|
72
89
|
command("svn co #{HOBO_REPO} vendor/plugins/hobo")
|
@@ -1,3 +1,504 @@
|
|
1
|
+
=== Release 0.7.3 ===
|
2
|
+
|
3
|
+
hobo command -- options are now:
|
4
|
+
|
5
|
+
--user-model <model-name-or-false>
|
6
|
+
--svn # Use 'svn co' to checkout Hobo
|
7
|
+
--create-dbs # Run rake db:create:all
|
8
|
+
--hobo-src <path to hobo src>
|
9
|
+
-d | --database <database> # e.g. mysql, sqlite
|
10
|
+
|
11
|
+
|
12
|
+
Core extentions
|
13
|
+
|
14
|
+
Extracted from Hobo into new project: HoboSupport
|
15
|
+
|
16
|
+
Some notable changes:
|
17
|
+
|
18
|
+
#every has gone: users.every(:name) is now users.*.name
|
19
|
+
|
20
|
+
|
21
|
+
hobo generator
|
22
|
+
|
23
|
+
application.dryml now has a generated <app-name> tag
|
24
|
+
|
25
|
+
|
26
|
+
hobo_front_controller generator
|
27
|
+
|
28
|
+
Generated "search" route is now called "site_search"
|
29
|
+
|
30
|
+
Removed unused --no-user option
|
31
|
+
|
32
|
+
|
33
|
+
hobo_migration_generator
|
34
|
+
|
35
|
+
Removed from Hobo - now part of the HoboFields spinn-off project
|
36
|
+
|
37
|
+
|
38
|
+
New generator hobo_model_resource creates a model + controller pair
|
39
|
+
|
40
|
+
|
41
|
+
Rapid Javascripts
|
42
|
+
|
43
|
+
Default ajax message changed to "Saving..."
|
44
|
+
|
45
|
+
Hobo.ajaxRequest now takes the message as an option (was the second argument)
|
46
|
+
|
47
|
+
Fix to showing the ajax spinner in the right place in IE
|
48
|
+
|
49
|
+
Hobo.addUrlParams now has an option to remove specified parameters
|
50
|
+
|
51
|
+
Fixes to HasManyThroughInput behaviour
|
52
|
+
|
53
|
+
New behaviour supporting filtering (e.g. on index pages) using <select> tags
|
54
|
+
|
55
|
+
|
56
|
+
Rich data types
|
57
|
+
|
58
|
+
These are all part of the HoboFields project now
|
59
|
+
|
60
|
+
Booleans are now represented by the type Hobo::Boolean which is still part of Hobo
|
61
|
+
|
62
|
+
|
63
|
+
Active record extensions
|
64
|
+
|
65
|
+
Monkey-patch to make AR complain less about missing classes for
|
66
|
+
polymorphic associations
|
67
|
+
|
68
|
+
|
69
|
+
The block-based "composable query mechanism" is gone. Named scopes are much better.
|
70
|
+
|
71
|
+
|
72
|
+
Hobo's original implementation of what later became "Sexy Migrations" is gone.
|
73
|
+
|
74
|
+
|
75
|
+
Hobo module utility methods
|
76
|
+
|
77
|
+
Hobo.field_types and Hobo.symbolic_type_name are gone - now part of
|
78
|
+
HoboFields
|
79
|
+
|
80
|
+
Fixes to can_edit?
|
81
|
+
|
82
|
+
|
83
|
+
Site-search:
|
84
|
+
|
85
|
+
Now automatically skips searching of non-linkable models.
|
86
|
+
|
87
|
+
Can now be passed an array of models (including scoped finders) to search
|
88
|
+
|
89
|
+
Now renders <search-card> instead of <card>
|
90
|
+
|
91
|
+
|
92
|
+
New feature: Hobo::DevController
|
93
|
+
|
94
|
+
A controller that adds developer support features (not in production
|
95
|
+
mode). For now it just adds a method that can be used to change the current_user:
|
96
|
+
|
97
|
+
/dev/set_current_user?name=Fred+Bloggs
|
98
|
+
|
99
|
+
Very useful
|
100
|
+
|
101
|
+
|
102
|
+
Hobo Routing
|
103
|
+
|
104
|
+
Hobo::ModelRouter.linkable? can now be used with all the routes
|
105
|
+
created by Hobo.
|
106
|
+
|
107
|
+
|
108
|
+
Hobo helpers
|
109
|
+
|
110
|
+
object_url now always returns nil if the URL requested is not a
|
111
|
+
route known to Hobo routing
|
112
|
+
|
113
|
+
|
114
|
+
object_url never includes _method= in the query string
|
115
|
+
|
116
|
+
dom_id is now moved to DRYML's TemplateEnvironment
|
117
|
+
|
118
|
+
can_view? now utilises some simple cacheing
|
119
|
+
|
120
|
+
signup_url now defaults to the
|
121
|
+
|
122
|
+
linkable? no longer accepts an array as parameter
|
123
|
+
|
124
|
+
|
125
|
+
Rapid helpers
|
126
|
+
|
127
|
+
ajax_updater(url_or_form, message, update, options) is now
|
128
|
+
ajax_updater(url_or_form, update, options) (message has become an
|
129
|
+
option)
|
130
|
+
|
131
|
+
|
132
|
+
DRYML
|
133
|
+
|
134
|
+
DRYML integration changes -- this is a start to the work of
|
135
|
+
extracting DRYML from Hobo.
|
136
|
+
|
137
|
+
The fallback from a template file to a tag, e.g. from index.dryml
|
138
|
+
to <index-page/> is now handled by DRYML, not by Hobo's model
|
139
|
+
controller. You can customise the chosed tag by calling
|
140
|
+
|
141
|
+
dryml_fallback_tag("my-tag") from your controller action
|
142
|
+
|
143
|
+
The default DRYML context is now the value returned by
|
144
|
+
#dryml_context (was previously the value of @this). #dryml_context
|
145
|
+
returns @this by default but can be overridden.
|
146
|
+
|
147
|
+
<include src="mytags" bundle="foo">
|
148
|
+
|
149
|
+
includes a taglib from the plugin that the 'foo' bundle came from,
|
150
|
+
and puts into effect any class renames from that bundle (for
|
151
|
+
polymorphic tags).
|
152
|
+
|
153
|
+
Fix - tags with capitalised names now work
|
154
|
+
|
155
|
+
<my-param:></my-param:> can now be used to clear the contents of a
|
156
|
+
parameter. It's not the same as <my-param:/> (which does nothing)
|
157
|
+
|
158
|
+
New psuedo parameters for insterting content in and around
|
159
|
+
parameters. e.g. for a param 'title':
|
160
|
+
|
161
|
+
<before-title:> and <after-title:> for insterting content
|
162
|
+
immediately before and after the parameter.
|
163
|
+
|
164
|
+
<append-content:> and <prepend-content:> for inserting content at
|
165
|
+
the begining and end of the default content.
|
166
|
+
|
167
|
+
Note these are all just syntactic sugar for things you can do
|
168
|
+
already with <param-content/> and <title: replace> /
|
169
|
+
<title: restore/>
|
170
|
+
|
171
|
+
When changing the context with the ':' shorthand, now use dashes,
|
172
|
+
not underscores (the idea being that underscores are soley for use
|
173
|
+
in Ruby code
|
174
|
+
|
175
|
+
e.g. <with:my-field>
|
176
|
+
|
177
|
+
Control attributes <my-tag if> is equivalent to <my-tag if="&this"/>
|
178
|
+
(remember these test for blank? / not blank?, not Ruby trueness)
|
179
|
+
|
180
|
+
this_type now never returns AssociationReflections,
|
181
|
+
this_field_reflection does
|
182
|
+
|
183
|
+
this_type now returns Hobo::Boolean for boolean types.
|
184
|
+
|
185
|
+
this_field_dom_id is now just dom_id -- pass an object and an
|
186
|
+
attriubte, or nothing to default to this and this_field
|
187
|
+
|
188
|
+
Can now do merge-params="param1, param2" to merge just the named
|
189
|
+
params
|
190
|
+
|
191
|
+
Fix: <foo:foo> (i.e. field name same as tag name)
|
192
|
+
|
193
|
+
Fix: using alias-of with a reserved word was broken
|
194
|
+
|
195
|
+
|
196
|
+
Hobo models
|
197
|
+
|
198
|
+
New method Model.named to find things by name,
|
199
|
+
e.g. Category.named("Cars"), also aliased as Category["Cars"]
|
200
|
+
|
201
|
+
Various new methods to support permission. This moves much of the
|
202
|
+
logic into the model (from Hobo::ModelController). These methods are
|
203
|
+
all passed, as the first argument, the user performing the action. A
|
204
|
+
Hobo::Model::PermissionDeniedError is raised if the permission check
|
205
|
+
fails.
|
206
|
+
|
207
|
+
Class methods:
|
208
|
+
|
209
|
+
user_find -- find with view-permission check
|
210
|
+
user_new -- new with create-permission check
|
211
|
+
user_create -- create with create-permission check
|
212
|
+
|
213
|
+
user_can_create? -- test to see if a user is allowed to create the model.
|
214
|
+
|
215
|
+
Instace methods:
|
216
|
+
|
217
|
+
user_can_create?
|
218
|
+
user_save_changes
|
219
|
+
user_view
|
220
|
+
user_destroy
|
221
|
+
|
222
|
+
Models now get a new_foo method for each has_one :foo
|
223
|
+
|
224
|
+
The old id_name system is gone. Will be coming back in various
|
225
|
+
guises (e.g. see .named above)
|
226
|
+
|
227
|
+
def_scope implementation factored out into separate modules
|
228
|
+
|
229
|
+
New metod #get_creator returns the value of the creator attribute
|
230
|
+
(if there is one)
|
231
|
+
|
232
|
+
Various features exrtacted and now part of HoboFields
|
233
|
+
|
234
|
+
|
235
|
+
Scopes
|
236
|
+
|
237
|
+
Note: Hobo will probably switch to has_finder which provides
|
238
|
+
(nearly) all the functionality of Hobo's scopes and has a superior
|
239
|
+
implementation. We'll extend has_finder to add the bits that it is
|
240
|
+
missing.
|
241
|
+
|
242
|
+
The implementation of scopes has been factored out into separate models.
|
243
|
+
|
244
|
+
Large new set of automatically defined scopes. These are defined
|
245
|
+
automatically when you call them for the first time, much like the
|
246
|
+
magic finders in ActiveRecord (e.g. find_by_name_and_address):
|
247
|
+
|
248
|
+
For every has_many relationship (e.g. tags)
|
249
|
+
|
250
|
+
with_tag(t) -- find records that have tag c
|
251
|
+
with_tags(a, b, c) -- find records that have all these tags
|
252
|
+
without_tag(t)
|
253
|
+
without_tags(a, b, c)
|
254
|
+
|
255
|
+
For every belongs_to and has_one (e.g. manager)
|
256
|
+
|
257
|
+
manager_is(m)
|
258
|
+
manager_is_not(m)
|
259
|
+
|
260
|
+
For every regular field (e.g. name)
|
261
|
+
|
262
|
+
name_is(x)
|
263
|
+
name_is_not(x)
|
264
|
+
|
265
|
+
For textual fields
|
266
|
+
|
267
|
+
name_contains(x)
|
268
|
+
name_does_not_contain(x)
|
269
|
+
name_starts(x)
|
270
|
+
name_does_not_start(x)
|
271
|
+
name_ends(x)
|
272
|
+
name_does_not_end(x)
|
273
|
+
|
274
|
+
For boolean fields (e.g. published)
|
275
|
+
|
276
|
+
published
|
277
|
+
not_published
|
278
|
+
|
279
|
+
For the various date/time columns (these must end _at, e.g. pulished_at)
|
280
|
+
|
281
|
+
published_before(x)
|
282
|
+
published_after(x)
|
283
|
+
published_between(x, y)
|
284
|
+
|
285
|
+
And finally
|
286
|
+
|
287
|
+
order_by(field_name) -- add an ORDER BY clause
|
288
|
+
limit(n) -- add a LIMIT clause
|
289
|
+
recent(n) -- orders by created_at and limits to n records
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
Hobo model controller
|
294
|
+
|
295
|
+
Permission and not-found errors are now handled centrally using the
|
296
|
+
new rescue_from declaration in Rails. No need to worry about these
|
297
|
+
in individual actions.
|
298
|
+
|
299
|
+
All the hobo actions (hobo_show, hobo_new etc) are greatly
|
300
|
+
simplified. Much of the logic has been moved elsewhere, so it's now
|
301
|
+
a lot easier to avoid using those actions at all and still get the
|
302
|
+
usual features such as permission checks, fallback on page tags etc.
|
303
|
+
|
304
|
+
hobo_index now takes a "finder" (model class or scoped model
|
305
|
+
class) as the first argument. If you want to retrieve the
|
306
|
+
collection yourself, there's no reason to call hobo_index at all -
|
307
|
+
just write a regular Rails style action.
|
308
|
+
|
309
|
+
The hobo_actions don't set any extra instance variables any more
|
310
|
+
beyond @this. e.g. hobo_show_collection doesn't set @owner,
|
311
|
+
because you can now use this.origin
|
312
|
+
|
313
|
+
As part of the previous change, #not_allowed? is gone.
|
314
|
+
|
315
|
+
Some work on autocomplete - might be working now :-)
|
316
|
+
|
317
|
+
auto_actions -- can now say
|
318
|
+
|
319
|
+
auto_actions :write_only # just gives you create, update and destroy
|
320
|
+
auto_actions :read_only # gives you all except the above three
|
321
|
+
|
322
|
+
Support for scopes on declarative index actions:
|
323
|
+
|
324
|
+
index_action :scope => :my_scope
|
325
|
+
|
326
|
+
New method filter_by for easily adding filtering to index actions, e.g.
|
327
|
+
|
328
|
+
# assuming category and price_range are scopes defined on the current model
|
329
|
+
def index
|
330
|
+
finder = filter_by(:category => params[:category], price_range => [params[:min_price], params[:max_price])
|
331
|
+
hobo_index finder
|
332
|
+
end
|
333
|
+
|
334
|
+
The old data_filters stuff is gone. This was based on the
|
335
|
+
"composable query" thing which is gone too (see above).
|
336
|
+
|
337
|
+
Dependency on classic_pagination is gone. Now uses will_paginate
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
User model
|
342
|
+
|
343
|
+
Hobo::UserController.user_models is now Hobo::User.user_models
|
344
|
+
|
345
|
+
New method Hobo::User.default_user_model returns the user model used
|
346
|
+
in various places if no model is specified.
|
347
|
+
|
348
|
+
Now requires the current password to be provided when changing the
|
349
|
+
password (at the model level and in the related rapid-pages)
|
350
|
+
|
351
|
+
User.login_attr renamed to User.login_attribute
|
352
|
+
|
353
|
+
|
354
|
+
User controller
|
355
|
+
|
356
|
+
Now includes the rapid_user_pages taglib (these have been separated
|
357
|
+
from the main rapid-pages taglib)
|
358
|
+
|
359
|
+
New helper: logout_current_user
|
360
|
+
|
361
|
+
|
362
|
+
Bundles
|
363
|
+
|
364
|
+
Support for multiple bundles per plugin -- bundles can now be
|
365
|
+
selective about which models and controllers they include.
|
366
|
+
|
367
|
+
Adding support for: belongs_to :foo, :polymorphic => :optional
|
368
|
+
|
369
|
+
Magic option names are now available inside the model and controller *instances*
|
370
|
+
|
371
|
+
Bundle options with defaults now work with nested option hashes
|
372
|
+
|
373
|
+
belongs_to in a bundle model can now be given an :alias option - an
|
374
|
+
alias of the (parameterised) belongs_to is created so that the model
|
375
|
+
has a known API
|
376
|
+
|
377
|
+
|
378
|
+
Core DRYML tags
|
379
|
+
|
380
|
+
<wrap> can be given a parameter="..." attribute to wrap the content
|
381
|
+
in a template using the given parameter name.
|
382
|
+
|
383
|
+
<repeat> can now be used with <else> (i.e. the collection was empty)
|
384
|
+
|
385
|
+
|
386
|
+
Rapid tags: general
|
387
|
+
|
388
|
+
New standardised API for getting metadata from collections
|
389
|
+
|
390
|
+
#association_name returns th, er, name of the association. If
|
391
|
+
called on a named scope it returns the original association name,
|
392
|
+
not the scope name
|
393
|
+
|
394
|
+
#member_class returns the (expected) class of items in the array
|
395
|
+
|
396
|
+
#origin returns the object from which the collection was obtained
|
397
|
+
|
398
|
+
#origin_attribute returns the name of the attribute from which the
|
399
|
+
collection was obtained
|
400
|
+
|
401
|
+
So, unless something has changed:
|
402
|
+
|
403
|
+
collection.origin.send(collection.origin_attribute) == collection
|
404
|
+
|
405
|
+
This API is made available on all association proxies, regular
|
406
|
+
arrays and will_paginate collections.
|
407
|
+
|
408
|
+
New taglib - rapid_generics - provides various tags used by the
|
409
|
+
default pages. These tags are designed to work generically with your
|
410
|
+
models, but can also be customised of course.
|
411
|
+
|
412
|
+
<table> -- the "Edit" link now goes to action="edit" (was linking to
|
413
|
+
the show page)
|
414
|
+
|
415
|
+
<count> is now better at guessing the label to use, also now
|
416
|
+
supports <count lowercase/> to downcase the label.
|
417
|
+
|
418
|
+
<clearer> is gone - hooray for overflow: hidden
|
419
|
+
|
420
|
+
Added do to <you> as in: <you do/>
|
421
|
+
|
422
|
+
New tag <filter-menu/> creates a form with a <select>. Used for
|
423
|
+
adding menu-based filters to index pages.
|
424
|
+
|
425
|
+
New tag <comma-list>
|
426
|
+
|
427
|
+
|
428
|
+
Rapid tags: editing
|
429
|
+
|
430
|
+
<editor> now merges params and attributes (e.g. you can add your own css classes)
|
431
|
+
|
432
|
+
Most ajax controls now just give "Saving..." as the default ajax
|
433
|
+
message.
|
434
|
+
|
435
|
+
|
436
|
+
Rapid tags: forms
|
437
|
+
|
438
|
+
<form> (without an action attribute) now renders nothing if the
|
439
|
+
calculated action is not linkable
|
440
|
+
|
441
|
+
If you provide action="..." to <form> (i.e. a manual form) the
|
442
|
+
automatic css classes are not added.
|
443
|
+
|
444
|
+
<delete-button> now renders nothing if the destory action is not linkable
|
445
|
+
|
446
|
+
<delete-button> now automatically switche to non-in-place delete if
|
447
|
+
the thing being deleted is the top-level context if the page.
|
448
|
+
|
449
|
+
New tag <select-menu>
|
450
|
+
|
451
|
+
<remote-method-button> now switches to in-place mode if you give any
|
452
|
+
ajax attribute (e.g. success="...")
|
453
|
+
|
454
|
+
<after-submit> -- can now do
|
455
|
+
|
456
|
+
<after-submit go-back> (requires session[:previous_uri])
|
457
|
+
|
458
|
+
and
|
459
|
+
|
460
|
+
<after-submit stay-here>
|
461
|
+
|
462
|
+
|
463
|
+
Rapid tags: navigation
|
464
|
+
|
465
|
+
Now assumes will_paginate style pagination instead of classic_pagination
|
466
|
+
|
467
|
+
<account-nav> now proivides a link to the account page by default
|
468
|
+
|
469
|
+
<account-nav> now provides a complete set of parameters for customisation
|
470
|
+
|
471
|
+
|
472
|
+
Rapid tags: pages
|
473
|
+
|
474
|
+
login, signup and account-disabled pages have been moved out to
|
475
|
+
rapid-user-pages
|
476
|
+
|
477
|
+
simple-layout -- the main-nav parameter is now on a wrapper around
|
478
|
+
<magic-nav> rather than actually on <magic-nav>, so this now works
|
479
|
+
as you'd expect:
|
480
|
+
|
481
|
+
<main-nav:> --- your nav here --- </main-nav:>
|
482
|
+
|
483
|
+
aside-layout -- the aside now appears in the output even if it's
|
484
|
+
empty
|
485
|
+
|
486
|
+
<show-page> -- various improvements and new parameters
|
487
|
+
|
488
|
+
<permission-denied-page> now sets a body class, and the message can
|
489
|
+
be changed with an attribute.
|
490
|
+
|
491
|
+
<app-name> is gone -- this is now automatically generated in your
|
492
|
+
application.dryml (you may need to manually add this to existing
|
493
|
+
apps)
|
494
|
+
|
495
|
+
|
496
|
+
Rapid tags: plus
|
497
|
+
|
498
|
+
New tag <change-password-form>
|
499
|
+
|
500
|
+
|
501
|
+
|
1
502
|
=== Release 0.7.2 ===
|
2
503
|
|
3
504
|
Migration generator
|