muck-users 0.1.12 → 0.1.13
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/.gitignore +7 -1
- data/Rakefile +8 -13
- data/VERSION +1 -1
- data/app/controllers/admin/muck/users_controller.rb +1 -1
- data/app/models/user_mailer.rb +1 -1
- data/lib/active_record/acts/muck_user.rb +17 -20
- data/lib/active_record/secure_methods.rb +1 -1
- data/lib/muck_users/tasks.rb +2 -2
- data/locales/ar.yml +1 -1
- data/locales/bg.yml +2 -2
- data/locales/ca.yml +2 -2
- data/locales/cs.yml +1 -1
- data/locales/da.yml +1 -1
- data/locales/de.yml +2 -2
- data/locales/el.yml +4 -4
- data/locales/en.yml +5 -5
- data/locales/es.yml +1 -1
- data/locales/et.yml +126 -0
- data/locales/fa.yml +126 -0
- data/locales/fi.yml +126 -0
- data/locales/fr.yml +1 -1
- data/locales/gl.yml +126 -0
- data/locales/hi.yml +126 -0
- data/locales/hr.yml +126 -0
- data/locales/hu.yml +126 -0
- data/locales/id.yml +126 -0
- data/locales/it.yml +1 -1
- data/locales/iw.yml +1 -1
- data/locales/ja.yml +2 -2
- data/locales/ko.yml +1 -1
- data/locales/lt.yml +2 -2
- data/locales/lv.yml +2 -2
- data/locales/mt.yml +126 -0
- data/locales/nl.yml +2 -2
- data/locales/no.yml +2 -2
- data/locales/pl.yml +1 -1
- data/locales/pt-PT.yml +126 -0
- data/locales/ro.yml +1 -1
- data/locales/ru.yml +3 -3
- data/locales/sk.yml +1 -1
- data/locales/sl.yml +3 -3
- data/locales/sq.yml +126 -0
- data/locales/sr.yml +2 -2
- data/locales/sv.yml +1 -1
- data/locales/th.yml +126 -0
- data/locales/tl.yml +1 -1
- data/locales/tr.yml +126 -0
- data/locales/uk.yml +2 -2
- data/locales/vi.yml +1 -1
- data/locales/zh-CN.yml +1 -1
- data/locales/zh-TW.yml +1 -1
- data/locales/zh.yml +1 -1
- data/muck-users.gemspec +18 -32
- data/test/rails_root/config/global_config.yml +49 -2
- data/test/rails_root/test/functional/password_resets_controller_test.rb +13 -1
- data/test/rails_root/test/unit/role_test.rb +1 -1
- data/test/rails_root/test/unit/user_mailer_test.rb +6 -6
- data/test/rails_root/test/unit/user_test.rb +79 -1
- metadata +25 -32
- data/muck-users-0.1.4.gem +0 -0
- data/pkg/muck-users-0.1.11.gem +0 -0
- data/rdoc/classes/ActionController.html +0 -112
- data/rdoc/classes/ActionController/AuthenticApplication.html +0 -161
- data/rdoc/classes/ActionController/AuthenticApplication/InstanceMethods.html +0 -741
- data/rdoc/classes/ActionController/Routing.html +0 -107
- data/rdoc/classes/ActionController/Routing/RouteSet.html +0 -148
- data/rdoc/classes/ActiveRecord.html +0 -115
- data/rdoc/classes/ActiveRecord/Acts/MuckUser/ClassMethods.html +0 -167
- data/rdoc/classes/ActiveRecord/Acts/MuckUser/InstanceMethods.html +0 -537
- data/rdoc/classes/ActiveRecord/Acts/MuckUser/SingletonMethods.html +0 -296
- data/rdoc/classes/ActiveRecord/SecureMethods.html +0 -216
- data/rdoc/classes/MuckUsers.html +0 -116
- data/rdoc/classes/MuckUsers/Exceptions.html +0 -111
- data/rdoc/classes/MuckUsers/Exceptions/InvalidPasswordResetCode.html +0 -111
- data/rdoc/classes/MuckUsers/Tasks.html +0 -146
- data/rdoc/created.rid +0 -1
- data/rdoc/files/README_rdoc.html +0 -211
- data/rdoc/files/lib/action_controller/authentic_application_rb.html +0 -101
- data/rdoc/files/lib/active_record/acts/muck_user_rb.html +0 -101
- data/rdoc/files/lib/active_record/secure_methods_rb.html +0 -101
- data/rdoc/files/lib/muck_users/exceptions_rb.html +0 -101
- data/rdoc/files/lib/muck_users/initialize_routes_rb.html +0 -101
- data/rdoc/files/lib/muck_users/tasks_rb.html +0 -110
- data/rdoc/files/lib/muck_users_rb.html +0 -117
- data/rdoc/fr_class_index.html +0 -40
- data/rdoc/fr_file_index.html +0 -34
- data/rdoc/fr_method_index.html +0 -77
- data/rdoc/index.html +0 -24
- data/rdoc/rdoc-style.css +0 -208
@@ -1,107 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Module: ActionController::Routing</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Module</strong></td>
|
53
|
-
<td class="class-name-in-header">ActionController::Routing</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
</td>
|
59
|
-
</tr>
|
60
|
-
|
61
|
-
</table>
|
62
|
-
</div>
|
63
|
-
<!-- banner header -->
|
64
|
-
|
65
|
-
<div id="bodyContent">
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
<div id="contextContent">
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
</div>
|
74
|
-
|
75
|
-
|
76
|
-
</div>
|
77
|
-
|
78
|
-
|
79
|
-
<!-- if includes -->
|
80
|
-
|
81
|
-
<div id="section">
|
82
|
-
|
83
|
-
<div id="class-list">
|
84
|
-
<h3 class="section-bar">Classes and Modules</h3>
|
85
|
-
|
86
|
-
Class <a href="Routing/RouteSet.html" class="link">ActionController::Routing::RouteSet</a><br />
|
87
|
-
|
88
|
-
</div>
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
<!-- if method_list -->
|
97
|
-
|
98
|
-
|
99
|
-
</div>
|
100
|
-
|
101
|
-
|
102
|
-
<div id="validator-badges">
|
103
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
104
|
-
</div>
|
105
|
-
|
106
|
-
</body>
|
107
|
-
</html>
|
@@ -1,148 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Class: ActionController::Routing::RouteSet</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">ActionController::Routing::RouteSet</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../../files/lib/muck_users/initialize_routes_rb.html">
|
59
|
-
lib/muck_users/initialize_routes.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
<tr class="top-aligned-row">
|
66
|
-
<td><strong>Parent:</strong></td>
|
67
|
-
<td>
|
68
|
-
Object
|
69
|
-
</td>
|
70
|
-
</tr>
|
71
|
-
</table>
|
72
|
-
</div>
|
73
|
-
<!-- banner header -->
|
74
|
-
|
75
|
-
<div id="bodyContent">
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
<div id="contextContent">
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
</div>
|
84
|
-
|
85
|
-
<div id="method-list">
|
86
|
-
<h3 class="section-bar">Methods</h3>
|
87
|
-
|
88
|
-
<div class="name-list">
|
89
|
-
<a href="#M000023">load_routes_with_muck_users!</a>
|
90
|
-
</div>
|
91
|
-
</div>
|
92
|
-
|
93
|
-
</div>
|
94
|
-
|
95
|
-
|
96
|
-
<!-- if includes -->
|
97
|
-
|
98
|
-
<div id="section">
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
<!-- if method_list -->
|
108
|
-
<div id="methods">
|
109
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
110
|
-
|
111
|
-
<div id="method-M000023" class="method-detail">
|
112
|
-
<a name="M000023"></a>
|
113
|
-
|
114
|
-
<div class="method-heading">
|
115
|
-
<a href="#M000023" class="method-signature">
|
116
|
-
<span class="method-name">load_routes_with_muck_users!</span><span class="method-args">()</span>
|
117
|
-
</a>
|
118
|
-
</div>
|
119
|
-
|
120
|
-
<div class="method-description">
|
121
|
-
<p><a class="source-toggle" href="#"
|
122
|
-
onclick="toggleCode('M000023-source');return false;">[Source]</a></p>
|
123
|
-
<div class="method-source-code" id="M000023-source">
|
124
|
-
<pre>
|
125
|
-
<span class="ruby-comment cmt"># File lib/muck_users/initialize_routes.rb, line 2</span>
|
126
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_routes_with_muck_users!</span>
|
127
|
-
<span class="ruby-identifier">muck_users_routes</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword kw">__FILE__</span>), <span class="ruby-operator">*</span><span class="ruby-node">%w[.. .. config muck_users_routes.rb]</span>)
|
128
|
-
<span class="ruby-identifier">add_configuration_file</span>(<span class="ruby-identifier">muck_users_routes</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">configuration_files</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">muck_users_routes</span>
|
129
|
-
<span class="ruby-identifier">load_routes_without_muck_users!</span>
|
130
|
-
<span class="ruby-keyword kw">end</span>
|
131
|
-
</pre>
|
132
|
-
</div>
|
133
|
-
</div>
|
134
|
-
</div>
|
135
|
-
|
136
|
-
|
137
|
-
</div>
|
138
|
-
|
139
|
-
|
140
|
-
</div>
|
141
|
-
|
142
|
-
|
143
|
-
<div id="validator-badges">
|
144
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
145
|
-
</div>
|
146
|
-
|
147
|
-
</body>
|
148
|
-
</html>
|
@@ -1,115 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Module: ActiveRecord</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Module</strong></td>
|
53
|
-
<td class="class-name-in-header">ActiveRecord</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../files/lib/active_record/acts/muck_user_rb.html">
|
59
|
-
lib/active_record/acts/muck_user.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
<a href="../files/lib/active_record/secure_methods_rb.html">
|
63
|
-
lib/active_record/secure_methods.rb
|
64
|
-
</a>
|
65
|
-
<br />
|
66
|
-
</td>
|
67
|
-
</tr>
|
68
|
-
|
69
|
-
</table>
|
70
|
-
</div>
|
71
|
-
<!-- banner header -->
|
72
|
-
|
73
|
-
<div id="bodyContent">
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
<div id="contextContent">
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
</div>
|
82
|
-
|
83
|
-
|
84
|
-
</div>
|
85
|
-
|
86
|
-
|
87
|
-
<!-- if includes -->
|
88
|
-
|
89
|
-
<div id="section">
|
90
|
-
|
91
|
-
<div id="class-list">
|
92
|
-
<h3 class="section-bar">Classes and Modules</h3>
|
93
|
-
|
94
|
-
Module <a href="ActiveRecord/SecureMethods.html" class="link">ActiveRecord::SecureMethods</a><br />
|
95
|
-
|
96
|
-
</div>
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
<!-- if method_list -->
|
105
|
-
|
106
|
-
|
107
|
-
</div>
|
108
|
-
|
109
|
-
|
110
|
-
<div id="validator-badges">
|
111
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
112
|
-
</div>
|
113
|
-
|
114
|
-
</body>
|
115
|
-
</html>
|
@@ -1,167 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Module: ActiveRecord::Acts::MuckUser::ClassMethods</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Module</strong></td>
|
53
|
-
<td class="class-name-in-header">ActiveRecord::Acts::MuckUser::ClassMethods</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../../../files/lib/active_record/acts/muck_user_rb.html">
|
59
|
-
lib/active_record/acts/muck_user.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
</table>
|
66
|
-
</div>
|
67
|
-
<!-- banner header -->
|
68
|
-
|
69
|
-
<div id="bodyContent">
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
<div id="contextContent">
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
</div>
|
78
|
-
|
79
|
-
<div id="method-list">
|
80
|
-
<h3 class="section-bar">Methods</h3>
|
81
|
-
|
82
|
-
<div class="name-list">
|
83
|
-
<a href="#M000030">acts_as_muck_user</a>
|
84
|
-
</div>
|
85
|
-
</div>
|
86
|
-
|
87
|
-
</div>
|
88
|
-
|
89
|
-
|
90
|
-
<!-- if includes -->
|
91
|
-
<div id="includes">
|
92
|
-
<h3 class="section-bar">Included Modules</h3>
|
93
|
-
|
94
|
-
<div id="includes-list">
|
95
|
-
<span class="include-name"><a href="InstanceMethods.html">ActiveRecord::Acts::MuckUser::InstanceMethods</a></span>
|
96
|
-
</div>
|
97
|
-
</div>
|
98
|
-
|
99
|
-
<div id="section">
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
<!-- if method_list -->
|
109
|
-
<div id="methods">
|
110
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
111
|
-
|
112
|
-
<div id="method-M000030" class="method-detail">
|
113
|
-
<a name="M000030"></a>
|
114
|
-
|
115
|
-
<div class="method-heading">
|
116
|
-
<a href="#M000030" class="method-signature">
|
117
|
-
<span class="method-name">acts_as_muck_user</span><span class="method-args">(options = {})</span>
|
118
|
-
</a>
|
119
|
-
</div>
|
120
|
-
|
121
|
-
<div class="method-description">
|
122
|
-
<p><a class="source-toggle" href="#"
|
123
|
-
onclick="toggleCode('M000030-source');return false;">[Source]</a></p>
|
124
|
-
<div class="method-source-code" id="M000030-source">
|
125
|
-
<pre>
|
126
|
-
<span class="ruby-comment cmt"># File lib/active_record/acts/muck_user.rb, line 10</span>
|
127
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">acts_as_muck_user</span>(<span class="ruby-identifier">options</span> = {})
|
128
|
-
|
129
|
-
<span class="ruby-identifier">has_many</span> <span class="ruby-identifier">:permissions</span>
|
130
|
-
<span class="ruby-identifier">has_many</span> <span class="ruby-identifier">:roles</span>, <span class="ruby-identifier">:through</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:permissions</span>
|
131
|
-
|
132
|
-
<span class="ruby-identifier">named_scope</span> <span class="ruby-identifier">:by_newest</span>, <span class="ruby-identifier">:order</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"created_at DESC"</span>
|
133
|
-
<span class="ruby-identifier">named_scope</span> <span class="ruby-identifier">:active</span>, <span class="ruby-identifier">:conditions</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"activated_at IS NOT NULL"</span>
|
134
|
-
<span class="ruby-identifier">named_scope</span> <span class="ruby-identifier">:inactive</span>, <span class="ruby-identifier">:conditions</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"activated_at IS NULL"</span>
|
135
|
-
<span class="ruby-identifier">named_scope</span> <span class="ruby-identifier">:recent</span>, <span class="ruby-identifier">lambda</span> { { <span class="ruby-identifier">:conditions</span> =<span class="ruby-operator">></span> [<span class="ruby-value str">'created_at > ?'</span>, <span class="ruby-value">1</span>.<span class="ruby-identifier">week</span>.<span class="ruby-identifier">ago</span>] } }
|
136
|
-
|
137
|
-
<span class="ruby-identifier">email_name_regex</span> = <span class="ruby-value str">'[\w\.%\+\-]+'</span>.<span class="ruby-identifier">freeze</span>
|
138
|
-
<span class="ruby-identifier">domain_head_regex</span> = <span class="ruby-value str">'(?:[A-Z0-9\-]+\.)+'</span>.<span class="ruby-identifier">freeze</span>
|
139
|
-
<span class="ruby-identifier">domain_tld_regex</span> = <span class="ruby-value str">'(?:[A-Z]{2}|com|org|net|edu|gov|mil|biz|info|mobi|name|aero|jobs|museum)'</span>.<span class="ruby-identifier">freeze</span>
|
140
|
-
<span class="ruby-identifier">email_regex</span> = <span class="ruby-node">/\A#{email_name_regex}@#{domain_head_regex}#{domain_tld_regex}\z/i</span>
|
141
|
-
|
142
|
-
<span class="ruby-identifier">before_save</span> <span class="ruby-identifier">:lower_login</span>
|
143
|
-
|
144
|
-
<span class="ruby-identifier">class_eval</span> <span class="ruby-value str">"validates_format_of :login, :with => /^[a-z0-9-]+$/i, :message => 'may only contain letters, numbers or a hyphen.'\nvalidates_format_of :email, :with => email_regex, :message => 'does not look like a valid email address.'\n\n# prevents a user from submitting a crafted form that bypasses activation\nattr_protected :crypted_password, :password_salt, :persistence_token, :single_access_token, :perishable_token, :login_count,\n:failed_login_count, :last_request_at, :last_login_at, :current_login_at, :current_login_ip, :last_login_ip,\n:terms_of_service, :time_zone, :disabled_at, :activated_at, :created_at, :updated_at\n"</span>
|
145
|
-
|
146
|
-
<span class="ruby-identifier">include</span> <span class="ruby-constant">ActiveRecord</span><span class="ruby-operator">::</span><span class="ruby-constant">Acts</span><span class="ruby-operator">::</span><span class="ruby-constant">MuckUser</span><span class="ruby-operator">::</span><span class="ruby-constant">InstanceMethods</span>
|
147
|
-
<span class="ruby-identifier">extend</span> <span class="ruby-constant">ActiveRecord</span><span class="ruby-operator">::</span><span class="ruby-constant">Acts</span><span class="ruby-operator">::</span><span class="ruby-constant">MuckUser</span><span class="ruby-operator">::</span><span class="ruby-constant">SingletonMethods</span>
|
148
|
-
|
149
|
-
<span class="ruby-keyword kw">end</span>
|
150
|
-
</pre>
|
151
|
-
</div>
|
152
|
-
</div>
|
153
|
-
</div>
|
154
|
-
|
155
|
-
|
156
|
-
</div>
|
157
|
-
|
158
|
-
|
159
|
-
</div>
|
160
|
-
|
161
|
-
|
162
|
-
<div id="validator-badges">
|
163
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
164
|
-
</div>
|
165
|
-
|
166
|
-
</body>
|
167
|
-
</html>
|