hobo 0.8.5 → 0.8.6
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES.txt +41 -0
- data/Manifest +1 -5
- data/Rakefile +10 -3
- data/bin/hobo +38 -15
- data/dryml_generators/rapid/cards.dryml.erb +7 -7
- data/dryml_generators/rapid/pages.dryml.erb +52 -24
- data/hobo.gemspec +42 -322
- data/init.rb +0 -7
- data/lib/active_record/association_collection.rb +9 -0
- data/lib/hobo.rb +13 -14
- data/lib/hobo/accessible_associations.rb +32 -7
- data/lib/hobo/authentication_support.rb +1 -1
- data/lib/hobo/controller.rb +5 -7
- data/lib/hobo/dryml.rb +9 -2
- data/lib/hobo/dryml/dryml_builder.rb +11 -12
- data/lib/hobo/dryml/dryml_doc.rb +22 -24
- data/lib/hobo/dryml/dryml_generator.rb +41 -4
- data/lib/hobo/dryml/part_context.rb +5 -3
- data/lib/hobo/dryml/template.rb +7 -7
- data/lib/hobo/dryml/template_environment.rb +11 -22
- data/lib/hobo/dryml/template_handler.rb +94 -25
- data/lib/hobo/find_for.rb +2 -2
- data/lib/hobo/hobo_helper.rb +21 -21
- data/lib/hobo/include_in_save.rb +9 -5
- data/lib/hobo/lifecycles/transition.rb +2 -2
- data/lib/hobo/model.rb +11 -61
- data/lib/hobo/model_controller.rb +28 -29
- data/lib/hobo/model_router.rb +12 -13
- data/lib/hobo/permissions.rb +47 -37
- data/lib/hobo/permissions/associations.rb +1 -1
- data/lib/hobo/scopes/association_proxy_extensions.rb +5 -6
- data/lib/hobo/scopes/automatic_scopes.rb +7 -4
- data/lib/hobo/tasks/rails.rb +4 -0
- data/lib/hobo/user.rb +0 -1
- data/lib/hobo/user_controller.rb +3 -1
- data/lib/hobo/view_hints.rb +17 -3
- data/rails_generators/hobo/hobo_generator.rb +1 -0
- data/rails_generators/hobo_front_controller/templates/functional_test.rb +1 -11
- data/rails_generators/hobo_front_controller/templates/index.dryml +1 -6
- data/rails_generators/hobo_rapid/hobo_rapid_generator.rb +1 -0
- data/rails_generators/hobo_rapid/templates/hobo-rapid.css +3 -2
- data/rails_generators/hobo_rapid/templates/hobo-rapid.js +24 -15
- data/rails_generators/hobo_rapid/templates/themes/clean/public/stylesheets/clean.css +17 -12
- data/rails_generators/hobo_rapid/templates/themes/clean/public/stylesheets/rapid-ui.css +6 -2
- data/rails_generators/hobo_rapid/templates/themes/clean/views/clean.dryml +2 -2
- data/rails_generators/hobo_user_model/templates/forgot_password.erb +2 -2
- data/rails_generators/hobo_user_model/templates/model.rb +2 -2
- data/taglibs/rapid.dryml +3 -2
- data/taglibs/rapid_core.dryml +21 -16
- data/taglibs/rapid_document_tags.dryml +1 -1
- data/taglibs/rapid_editing.dryml +7 -10
- data/taglibs/rapid_forms.dryml +115 -26
- data/taglibs/rapid_generics.dryml +13 -3
- data/taglibs/rapid_lifecycles.dryml +18 -1
- data/taglibs/rapid_navigation.dryml +50 -61
- data/taglibs/rapid_pages.dryml +103 -19
- data/taglibs/rapid_plus.dryml +54 -6
- data/taglibs/rapid_support.dryml +38 -1
- data/taglibs/rapid_user_pages.dryml +17 -5
- data/test/permissions/models/models.rb +24 -12
- data/test/permissions/models/test.sqlite3 +0 -0
- metadata +6 -15
- data/lib/extensions/test_case.rb +0 -129
- data/lib/hobo/composite_model.rb +0 -73
- data/lib/hobo/model_support.rb +0 -44
- data/tasks/fix_dryml.rake +0 -143
- data/tasks/generate_tag_reference.rake +0 -192
- data/test/dryml/complilation_test.rb +0 -261
@@ -33,7 +33,7 @@ module Hobo
|
|
33
33
|
# and record in question are Hobo models
|
34
34
|
def nullify_keys(records)
|
35
35
|
if (user = acting_user)
|
36
|
-
records.each { |r| r.
|
36
|
+
records.each { |r| r.user_update_attributes!(user, @reflection.primary_key_name => nil) if r.is_a?(Hobo::Model) }
|
37
37
|
end
|
38
38
|
|
39
39
|
# Normal ActiveRecord implementatin
|
@@ -30,16 +30,15 @@ module Hobo
|
|
30
30
|
|
31
31
|
HasManyThroughAssociationExtensions = classy_module do
|
32
32
|
|
33
|
-
def
|
33
|
+
def build_conditions_with_hobo_scopes
|
34
34
|
scope_conditions = self.scope_conditions(@reflection)
|
35
35
|
through_scope_conditions = self.scope_conditions(@reflection.through_reflection)
|
36
|
-
unscoped_conditions =
|
36
|
+
unscoped_conditions = build_conditions_without_hobo_scopes
|
37
37
|
combine_conditions(scope_conditions, through_scope_conditions, unscoped_conditions)
|
38
38
|
end
|
39
|
-
alias_method_chain :
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
alias_method_chain :build_conditions, :hobo_scopes
|
40
|
+
public :conditions
|
41
|
+
|
43
42
|
end
|
44
43
|
|
45
44
|
AssociationCollectionExtensions = classy_module do
|
@@ -7,9 +7,12 @@ module Hobo
|
|
7
7
|
def create_automatic_scope(name)
|
8
8
|
ScopeBuilder.new(self, name).create_scope
|
9
9
|
rescue ActiveRecord::StatementInvalid => e
|
10
|
-
# Problem with the database? Don't try to create automatic
|
11
|
-
|
12
|
-
ActiveRecord::Base.logger
|
10
|
+
# Problem with the database? Don't try to create automatic
|
11
|
+
# scopes
|
12
|
+
if ActiveRecord::Base.logger
|
13
|
+
ActiveRecord::Base.logger.warn "!! Database exception during hobo auto-scope creation -- continuing automatic scopes"
|
14
|
+
ActiveRecord::Base.logger.warn "!! #{e.to_s}"
|
15
|
+
end
|
13
16
|
false
|
14
17
|
end
|
15
18
|
|
@@ -196,7 +199,7 @@ module Hobo
|
|
196
199
|
end
|
197
200
|
|
198
201
|
# active (a lifecycle state)
|
199
|
-
elsif @klass.has_lifecycle? && name.in?(@klass::Lifecycle.state_names)
|
202
|
+
elsif @klass.has_lifecycle? && name.to_sym.in?(@klass::Lifecycle.state_names)
|
200
203
|
|
201
204
|
if @klass::Lifecycle.state_names.length == 1
|
202
205
|
# nothing to check for - create a dummy scope
|
data/lib/hobo/user.rb
CHANGED
data/lib/hobo/user_controller.rb
CHANGED
@@ -92,7 +92,9 @@ module Hobo
|
|
92
92
|
flash[:notice] << " You must activate your account before you can log in. Please check your email." unless this.account_active?
|
93
93
|
end
|
94
94
|
response_block(&b) or if valid?
|
95
|
-
|
95
|
+
if this.account_active?
|
96
|
+
self.current_user = this if this.account_active?
|
97
|
+
end
|
96
98
|
redirect_back_or_default(home_page)
|
97
99
|
end
|
98
100
|
end
|
data/lib/hobo/view_hints.rb
CHANGED
@@ -7,16 +7,22 @@ module Hobo
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def self.setter(name, default=nil, &block)
|
10
|
+
ivname = name.to_s.remove(/\?$/)
|
10
11
|
metaclass.send :define_method, name do |*args|
|
11
12
|
if args.empty?
|
12
|
-
instance_variable_get("@#{
|
13
|
+
val = instance_variable_get("@#{ivname}")
|
14
|
+
if val.nil?
|
15
|
+
val = default.is_a?(Proc) ? instance_eval(&default) : default
|
16
|
+
instance_variable_set("@#{ivname}", val)
|
17
|
+
end
|
18
|
+
val
|
13
19
|
else
|
14
20
|
arg = if block
|
15
21
|
block[*args]
|
16
22
|
else
|
17
23
|
args.first
|
18
24
|
end
|
19
|
-
instance_variable_set("@#{
|
25
|
+
instance_variable_set("@#{ivname}", arg)
|
20
26
|
end
|
21
27
|
end
|
22
28
|
end
|
@@ -31,13 +37,21 @@ module Hobo
|
|
31
37
|
args
|
32
38
|
end
|
33
39
|
|
40
|
+
setter :paginate?, proc { !sortable? }
|
41
|
+
|
42
|
+
setter :sortable?, proc { defined?(ActiveRecord::Acts::List::InstanceMethods) &&
|
43
|
+
model < ActiveRecord::Acts::List::InstanceMethods &&
|
44
|
+
model.new.try.scope_condition == "1 = 1" }
|
45
|
+
|
46
|
+
|
34
47
|
# Accessors
|
35
48
|
|
36
49
|
class << self
|
37
50
|
|
38
51
|
def model
|
39
|
-
|
52
|
+
@model ||= name.sub(/Hints$/, "").constantize
|
40
53
|
end
|
54
|
+
|
41
55
|
|
42
56
|
def field_name(field)
|
43
57
|
field_names.fetch(field.to_sym, field.to_s.titleize)
|
@@ -3,6 +3,7 @@ class HoboGenerator < Rails::Generator::Base
|
|
3
3
|
def manifest
|
4
4
|
if options[:add_gem]
|
5
5
|
add_to_file "config/environment.rb", "Rails::Initializer.run do |config|", " config.gem 'hobo'\n"
|
6
|
+
add_to_file "Rakefile", "require 'tasks/rails'", "\nrequire 'hobo/tasks/rails'"
|
6
7
|
end
|
7
8
|
|
8
9
|
if options[:add_routes]
|
@@ -1,16 +1,6 @@
|
|
1
1
|
require File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../test_helper'
|
2
|
-
require '<%= file_path %>_controller'
|
3
|
-
|
4
|
-
# Re-raise errors caught by the controller.
|
5
|
-
class <%= class_name %>Controller; def rescue_action(e) raise e end; end
|
6
|
-
|
7
|
-
class <%= class_name %>ControllerTest < Test::Unit::TestCase
|
8
|
-
def setup
|
9
|
-
@controller = <%= class_name %>Controller.new
|
10
|
-
@request = ActionController::TestRequest.new
|
11
|
-
@response = ActionController::TestResponse.new
|
12
|
-
end
|
13
2
|
|
3
|
+
class <%= class_name %>ControllerTest < ActionController::TestCase
|
14
4
|
# Replace this with your real tests.
|
15
5
|
def test_truth
|
16
6
|
assert true
|
@@ -13,12 +13,7 @@
|
|
13
13
|
</section>
|
14
14
|
</header>
|
15
15
|
|
16
|
-
<section class="content-body"
|
17
|
-
<div class="model">
|
18
|
-
<h3><type-name plural/></h3>
|
19
|
-
<collection:recent/>
|
20
|
-
<p if="&can_create? && linkable?(:new)">Create a <a to="&this" action="new"/>.</p>
|
21
|
-
</div>
|
16
|
+
<section class="content-body">
|
22
17
|
</section>
|
23
18
|
</content:>
|
24
19
|
|
@@ -13,6 +13,7 @@ class HoboRapidGenerator < Hobo::Generator
|
|
13
13
|
m.file "hobo-rapid.js", "public/javascripts/hobo-rapid.js"
|
14
14
|
m.file "lowpro.js", "public/javascripts/lowpro.js"
|
15
15
|
m.file "IE7.js", "public/javascripts/IE7.js"
|
16
|
+
m.file "ie7-recalc.js", "public/javascripts/ie7-recalc.js"
|
16
17
|
m.file "blank.gif", "public/javascripts/blank.gif"
|
17
18
|
m.file "reset.css", "public/stylesheets/reset.css"
|
18
19
|
m.file "hobo-rapid.css", "public/stylesheets/hobo-rapid.css"
|
@@ -1,12 +1,12 @@
|
|
1
1
|
/**** Default styling for Rapid ****/
|
2
2
|
|
3
3
|
#ajax_progress {
|
4
|
-
color:
|
4
|
+
color: gray;
|
5
5
|
float: right;
|
6
6
|
margin: 20px;
|
7
7
|
position: fixed;
|
8
8
|
background: white;
|
9
|
-
font-family:
|
9
|
+
font-family: tahoma, sans-serif;
|
10
10
|
display: none;
|
11
11
|
z-index: 10;
|
12
12
|
}
|
@@ -32,6 +32,7 @@ div.completions_popup {
|
|
32
32
|
border:1px solid #888;
|
33
33
|
margin:0px;
|
34
34
|
padding:0px;
|
35
|
+
z-index:100;
|
35
36
|
}
|
36
37
|
div.completions_popup ul {
|
37
38
|
list-style-type:none;
|
@@ -380,9 +380,10 @@ var Hobo = {
|
|
380
380
|
}
|
381
381
|
if (e = $('ajax-progress')) {
|
382
382
|
if (nextTo) {
|
383
|
-
var
|
384
|
-
|
385
|
-
e.style.
|
383
|
+
var e_nextTo = $(nextTo);
|
384
|
+
var pos = e_nextTo.cumulativeOffset()
|
385
|
+
e.style.top = pos.top - e_nextTo.offsetHeight + "px"
|
386
|
+
e.style.left = (pos.left + e_nextTo.offsetWidth + 5) + "px"
|
386
387
|
}
|
387
388
|
e.style.display = "block";
|
388
389
|
}
|
@@ -569,13 +570,16 @@ new HoboBehavior("ul.input-many", {
|
|
569
570
|
this.updateButtons()
|
570
571
|
this.updateInputNames()
|
571
572
|
|
573
|
+
ul.fire("rapid:add", { element: newItem })
|
574
|
+
ul.fire("rapid:change", { element: newItem })
|
575
|
+
|
572
576
|
new Effect.BlindDown(newItem, {duration: 0.3})
|
573
577
|
},
|
574
578
|
|
575
579
|
removeOne: function(ev, el) {
|
576
580
|
Event.stop(ev)
|
577
581
|
var self = this;
|
578
|
-
var li = el.up('li')
|
582
|
+
var ul = el.up('ul'), li = el.up('li')
|
579
583
|
if (li.parentNode.childElements().length == 1) {
|
580
584
|
// It's the last one - don't remove it, just clear it
|
581
585
|
this.clearInputs(li)
|
@@ -586,11 +590,15 @@ new HoboBehavior("ul.input-many", {
|
|
586
590
|
self.updateInputNames()
|
587
591
|
} });
|
588
592
|
}
|
593
|
+
ul.fire("rapid:remove")
|
594
|
+
ul.fire("rapid:change")
|
589
595
|
},
|
596
|
+
|
590
597
|
|
591
598
|
clearInputs: function(item) {
|
592
|
-
$(item).select('input').each(function(input){
|
593
|
-
|
599
|
+
$(item).select('input,select,textarea').each(function(input){
|
600
|
+
t = input.getAttribute('type')
|
601
|
+
if (t && t.match(/hidden/i)) {
|
594
602
|
input.remove()
|
595
603
|
} else {
|
596
604
|
input.value = ""
|
@@ -603,15 +611,15 @@ new HoboBehavior("ul.input-many", {
|
|
603
611
|
var addButton = "<button class='add-item'>+</button>"
|
604
612
|
|
605
613
|
var ul = this.element
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
614
|
+
var children = ul.childElements();
|
615
|
+
// assumption: only get here after add or remove, so only second last button needs the "+" removed
|
616
|
+
if(children.length > 1) {
|
617
|
+
// cannot use .down() because that's a depth-first search. Did I mention that I hate Prototype?
|
618
|
+
children[children.length-2].childElements().last().innerHTML = removeButton;
|
619
|
+
}
|
620
|
+
if(children.length > 0) {
|
621
|
+
children[children.length-1].childElements().last().innerHTML = removeButton + ' ' + addButton;
|
613
622
|
}
|
614
|
-
|
615
623
|
Event.addBehavior.reload()
|
616
624
|
},
|
617
625
|
|
@@ -720,6 +728,7 @@ AutocompleteBehavior = Behavior.create({
|
|
720
728
|
|
721
729
|
|
722
730
|
|
731
|
+
Event.addBehavior.reassignAfterAjax = true;
|
723
732
|
Event.addBehavior({
|
724
733
|
|
725
734
|
'div.section-group' : function() {
|
@@ -746,7 +755,7 @@ Event.addBehavior({
|
|
746
755
|
|
747
756
|
'.autocompleter' : AutocompleteBehavior(),
|
748
757
|
|
749
|
-
'.string.in-place-edit, .datetime.in-place-edit, .date.in-place-edit, .integer.in-place-edit, .float.in-place
|
758
|
+
'.string.in-place-edit, .datetime.in-place-edit, .date.in-place-edit, .integer.in-place-edit, .float.in-place-edit, big-integer.in-place-edit' :
|
750
759
|
function (ev) {
|
751
760
|
|
752
761
|
var ipe = Hobo._makeInPlaceEditor(this)
|
@@ -56,6 +56,10 @@ a:hover {
|
|
56
56
|
}
|
57
57
|
h1 a, h2 a, h3 a {border: none; background: none;}
|
58
58
|
|
59
|
+
pre, code {
|
60
|
+
font-family: "Courier New", Courier, monospace;
|
61
|
+
}
|
62
|
+
|
59
63
|
input.text, input.string, input.email-address, input.password, input.search, input.integer, input.float, textarea {
|
60
64
|
border-top:1px solid #7c7c7c;
|
61
65
|
border-left:1px solid #c3c3c3;
|
@@ -77,7 +81,7 @@ input.file_upload {
|
|
77
81
|
margin-top: 10px;
|
78
82
|
}
|
79
83
|
.button:hover {cursor: pointer;}
|
80
|
-
form .actions {
|
84
|
+
form .actions {_zoom: 1; overflow: hidden; font-size: 11px;}
|
81
85
|
form .actions input { margin: 0; }
|
82
86
|
|
83
87
|
.flash {
|
@@ -107,7 +111,7 @@ form .actions input { margin: 0; }
|
|
107
111
|
padding: 8px 20px 8px 40px;
|
108
112
|
border: 1px solid #444;
|
109
113
|
background: black url(../images/spinner.gif) no-repeat 10px 8px;
|
110
|
-
|
114
|
+
color: white;
|
111
115
|
}
|
112
116
|
|
113
117
|
.article {margin: 20px 0; border-top: 1px dotted #ccc;}
|
@@ -121,9 +125,9 @@ form .actions input { margin: 0; }
|
|
121
125
|
.content-body {padding: 15px 0;}
|
122
126
|
.content-footer {padding-bottom: 20px;}
|
123
127
|
|
124
|
-
.page-header {
|
128
|
+
.page-header {margin-top: 25px; padding: 0 0 0;}
|
125
129
|
.page-header h1 {
|
126
|
-
margin: 0; padding:
|
130
|
+
margin: 0; padding: 20px 30px 30px;
|
127
131
|
font-family: "Arial Black", Tahoma, Arial, sans-serif; font-size: 36px; letter-spacing: -1.5pt;
|
128
132
|
}
|
129
133
|
.page-header ul {zoom: 1; overflow: hidden;}
|
@@ -136,9 +140,9 @@ form .actions input { margin: 0; }
|
|
136
140
|
{border: none; color: white; background: none;}
|
137
141
|
|
138
142
|
.page-header div.search {
|
139
|
-
|
140
|
-
|
141
|
-
}
|
143
|
+
float: right;
|
144
|
+
padding: 0 30px 8px 15px;
|
145
|
+
}
|
142
146
|
.page-header div.search label {
|
143
147
|
padding-right: 10px;
|
144
148
|
font: bold 9px Arial, sans-serif; text-transform: uppercase; letter-spacing: 1.0pt;
|
@@ -164,7 +168,8 @@ form .actions input { margin: 0; }
|
|
164
168
|
}
|
165
169
|
|
166
170
|
.account-nav {
|
167
|
-
|
171
|
+
float:right;
|
172
|
+
margin: -22px 5px 0 0;
|
168
173
|
font-size: 11px;
|
169
174
|
}
|
170
175
|
.account-nav li {
|
@@ -196,7 +201,7 @@ form .actions input { margin: 0; }
|
|
196
201
|
.login-page .content-header { position: relative; }
|
197
202
|
.login-page .forgot-password {font-size: 11px; margin-left: 160px;}
|
198
203
|
|
199
|
-
.edit-page .content-header {overflow: hidden;
|
204
|
+
.edit-page .content-header {overflow: hidden; _zoom: 1;}
|
200
205
|
.edit-page .content-header h1 {float: left;}
|
201
206
|
.edit-page .content-header .delete-button {float: right; margin-top: 25px;}
|
202
207
|
form .actions {margin: 30px 0; width: 100%; text-align: center;}
|
@@ -221,7 +226,7 @@ form .actions {margin: 30px 0; width: 100%; text-align: center;}
|
|
221
226
|
/* styling of generic elements */
|
222
227
|
.creator {font-weight: bold;}
|
223
228
|
.card {
|
224
|
-
|
229
|
+
overflow: hidden; _zoom: 1;
|
225
230
|
margin: 10px 0; padding: 12px; border: 1px solid #e8e8e8;
|
226
231
|
background: #f5f5f5;
|
227
232
|
position: relative;
|
@@ -257,7 +262,7 @@ ul.collection > li { margin-left: 0; list-style: none;}
|
|
257
262
|
padding: 15px 0; margin-bottom: 20px; border-bottom: 1px dotted #888;
|
258
263
|
}
|
259
264
|
|
260
|
-
.table-plus .header {
|
265
|
+
.table-plus .header {_zoom: 1; overflow: hidden;}
|
261
266
|
.table-plus .header a {float: left; margin-right: 20px;}
|
262
267
|
.table-plus div.search {float: right;}
|
263
268
|
.table-plus div.search span {color: #444;}
|
@@ -284,7 +289,7 @@ ul.collection > li { margin-left: 0; list-style: none;}
|
|
284
289
|
div.select-many {border-top: 1px dotted #999;}
|
285
290
|
div.select-many .items {margin-bottom: 10px;}
|
286
291
|
div.select-many .item {
|
287
|
-
overflow:hidden;
|
292
|
+
overflow:hidden; _zoom: 1; font-weight: bold;
|
288
293
|
border-bottom: 1px dotted #999; padding: 5px 10px; /*margin: 5px 25px 5px 0;*/
|
289
294
|
}
|
290
295
|
div.select-many .item span { float: left; }
|
@@ -87,5 +87,9 @@ textarea.tall { height: 350px; }
|
|
87
87
|
|
88
88
|
.field-list input.percentage {width: 25px; display: inline; margin-right: 5px; padding: 1px 3px;}
|
89
89
|
|
90
|
-
select.dev-user-changer { opacity: 0.3;
|
91
|
-
select.dev-user-changer:hover { opacity: 1; }
|
90
|
+
select.dev-user-changer { opacity: 0.3; }
|
91
|
+
select.dev-user-changer:hover { opacity: 1; }
|
92
|
+
|
93
|
+
.part-wrapper {
|
94
|
+
display: inline; /* don't mess up layout when wrapping something */
|
95
|
+
}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<%%= @user %>,
|
2
2
|
|
3
|
-
If you have forgotten your password for <%%= @app_name %>, you can
|
3
|
+
If you have forgotten your password for <%%= @app_name %>, you can choose
|
4
4
|
a new one by clicking on this link:
|
5
5
|
|
6
6
|
<%%= <%= name -%>_reset_password_url :host => @host, :id => @user, :key => @key %>
|
7
7
|
|
8
|
-
|
8
|
+
Thank you,
|
9
9
|
|
10
10
|
The <%%= @app_name %> team.
|
@@ -11,7 +11,7 @@ class <%= class_name %> < ActiveRecord::Base
|
|
11
11
|
|
12
12
|
# This gives admin rights to the first sign-up.
|
13
13
|
# Just remove it if you don't want that
|
14
|
-
before_create { |user| user.administrator = true if count == 0 }
|
14
|
+
before_create { |user| user.administrator = true if RAILS_ENV != "test" && count == 0 }
|
15
15
|
|
16
16
|
|
17
17
|
# --- Signup lifecycle --- #
|
@@ -29,7 +29,7 @@ class <%= class_name %> < ActiveRecord::Base
|
|
29
29
|
end
|
30
30
|
|
31
31
|
transition :reset_password, { :active => :active }, :available_to => :key_holder,
|
32
|
-
:
|
32
|
+
:params => [ :password, :password_confirmation ]
|
33
33
|
|
34
34
|
end
|
35
35
|
|
data/taglibs/rapid.dryml
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
<!--
|
2
2
|
|
3
3
|
The Rapid tag library makes web development go fast. The Rapid tag library is your friend.
|
4
|
-
|
5
|
-
(This taglib defines no tags - it just includes all the other taglibs.
|
4
|
+
|
5
|
+
(This taglib defines no tags - it just includes all the other taglibs. Move along. Nothing to see here.)
|
6
|
+
|
6
7
|
-->
|
7
8
|
|
8
9
|
<include module="Hobo::RapidHelper"/>
|