336 lines
11 KiB
HTML
336 lines
11 KiB
HTML
|
|
<?xml version="1.0" encoding="utf-8"?>
|
||
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||
|
|
<head>
|
||
|
|
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
||
|
|
|
||
|
|
<title>Class: DeviseAuth::RegistrationsController</title>
|
||
|
|
|
||
|
|
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
|
||
|
|
|
||
|
|
<script src="../js/jquery.js" type="text/javascript"
|
||
|
|
charset="utf-8"></script>
|
||
|
|
<script src="../js/thickbox-compressed.js" type="text/javascript"
|
||
|
|
charset="utf-8"></script>
|
||
|
|
<script src="../js/quicksearch.js" type="text/javascript"
|
||
|
|
charset="utf-8"></script>
|
||
|
|
<script src="../js/darkfish.js" type="text/javascript"
|
||
|
|
charset="utf-8"></script>
|
||
|
|
|
||
|
|
</head>
|
||
|
|
<body class="class">
|
||
|
|
|
||
|
|
<div id="metadata">
|
||
|
|
<div id="home-metadata">
|
||
|
|
<div id="home-section" class="section">
|
||
|
|
<h3 class="section-header">
|
||
|
|
<a href="../index.html">Home</a>
|
||
|
|
<a href="../index.html#classes">Classes</a>
|
||
|
|
<a href="../index.html#methods">Methods</a>
|
||
|
|
</h3>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div id="file-metadata">
|
||
|
|
<div id="file-list-section" class="section">
|
||
|
|
<h3 class="section-header">In Files</h3>
|
||
|
|
<div class="section-body">
|
||
|
|
<ul>
|
||
|
|
|
||
|
|
<li><a href="../app/controllers/devise_auth/registrations_controller_rb.html?TB_iframe=true&height=550&width=785"
|
||
|
|
class="thickbox" title="app/controllers/devise_auth/registrations_controller.rb">app/controllers/devise_auth/registrations_controller.rb</a></li>
|
||
|
|
|
||
|
|
</ul>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div id="class-metadata">
|
||
|
|
|
||
|
|
<!-- Parent Class -->
|
||
|
|
|
||
|
|
<div id="parent-class-section" class="section">
|
||
|
|
<h3 class="section-header">Parent</h3>
|
||
|
|
|
||
|
|
<p class="link">Devise::RegistrationsController</p>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
<!-- Namespace Contents -->
|
||
|
|
|
||
|
|
|
||
|
|
<!-- Method Quickref -->
|
||
|
|
|
||
|
|
<div id="method-list-section" class="section">
|
||
|
|
<h3 class="section-header">Methods</h3>
|
||
|
|
<ul class="link-list">
|
||
|
|
|
||
|
|
<li><a href="#method-i-create">#create</a></li>
|
||
|
|
|
||
|
|
<li><a href="#method-i-edit">#edit</a></li>
|
||
|
|
|
||
|
|
<li><a href="#method-i-new">#new</a></li>
|
||
|
|
|
||
|
|
</ul>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
<!-- Included Modules -->
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div id="project-metadata">
|
||
|
|
|
||
|
|
|
||
|
|
<div id="fileindex-section" class="section project-section">
|
||
|
|
<h3 class="section-header">Files</h3>
|
||
|
|
<ul>
|
||
|
|
|
||
|
|
<li class="file"><a href="../doc/README_FOR_APP.html">README_FOR_APP</a></li>
|
||
|
|
|
||
|
|
</ul>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
<div id="classindex-section" class="section project-section">
|
||
|
|
<h3 class="section-header">Class Index
|
||
|
|
<span class="search-toggle"><img src="../images/find.png"
|
||
|
|
height="16" width="16" alt="[+]"
|
||
|
|
title="show/hide quicksearch" /></span></h3>
|
||
|
|
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
||
|
|
<fieldset>
|
||
|
|
<legend>Quicksearch</legend>
|
||
|
|
<input type="text" name="quicksearch" value=""
|
||
|
|
class="quicksearch-field" />
|
||
|
|
</fieldset>
|
||
|
|
</form>
|
||
|
|
|
||
|
|
<ul class="link-list">
|
||
|
|
|
||
|
|
<li><a href="../LastFM.html">LastFM</a></li>
|
||
|
|
|
||
|
|
<li><a href="../LastFM/Album.html">LastFM::Album</a></li>
|
||
|
|
|
||
|
|
<li><a href="../LastFM/Artist.html">LastFM::Artist</a></li>
|
||
|
|
|
||
|
|
<li><a href="../LastFM/Chart.html">LastFM::Chart</a></li>
|
||
|
|
|
||
|
|
<li><a href="../LastFM/Request.html">LastFM::Request</a></li>
|
||
|
|
|
||
|
|
<li><a href="../LastFM/Track.html">LastFM::Track</a></li>
|
||
|
|
|
||
|
|
<li><a href="../LastFM/Validator.html">LastFM::Validator</a></li>
|
||
|
|
|
||
|
|
<li><a href="../DeviseAuth.html">DeviseAuth</a></li>
|
||
|
|
|
||
|
|
<li><a href="../DeviseAuth/RegistrationsController.html">DeviseAuth::RegistrationsController</a></li>
|
||
|
|
|
||
|
|
<li><a href="../DeviseAuth/SessionsController.html">DeviseAuth::SessionsController</a></li>
|
||
|
|
|
||
|
|
<li><a href="../Users.html">Users</a></li>
|
||
|
|
|
||
|
|
<li><a href="../Users/OmniauthCallbacksController.html">Users::OmniauthCallbacksController</a></li>
|
||
|
|
|
||
|
|
<li><a href="../ApplicationController.html">ApplicationController</a></li>
|
||
|
|
|
||
|
|
<li><a href="../ApplicationHelper.html">ApplicationHelper</a></li>
|
||
|
|
|
||
|
|
<li><a href="../Artist.html">Artist</a></li>
|
||
|
|
|
||
|
|
<li><a href="../ArtistsController.html">ArtistsController</a></li>
|
||
|
|
|
||
|
|
<li><a href="../ChartsController.html">ChartsController</a></li>
|
||
|
|
|
||
|
|
<li><a href="../HomeController.html">HomeController</a></li>
|
||
|
|
|
||
|
|
<li><a href="../Playlist.html">Playlist</a></li>
|
||
|
|
|
||
|
|
<li><a href="../PlaylistsTracks.html">PlaylistsTracks</a></li>
|
||
|
|
|
||
|
|
<li><a href="../RedisQueryable.html">RedisQueryable</a></li>
|
||
|
|
|
||
|
|
<li><a href="../SearchController.html">SearchController</a></li>
|
||
|
|
|
||
|
|
<li><a href="../Track.html">Track</a></li>
|
||
|
|
|
||
|
|
<li><a href="../TracksController.html">TracksController</a></li>
|
||
|
|
|
||
|
|
<li><a href="../User.html">User</a></li>
|
||
|
|
|
||
|
|
<li><a href="../UsersController.html">UsersController</a></li>
|
||
|
|
|
||
|
|
<li><a href="../UsersHelper.html">UsersHelper</a></li>
|
||
|
|
|
||
|
|
<li><a href="../YoutubeVideoRating.html">YoutubeVideoRating</a></li>
|
||
|
|
|
||
|
|
</ul>
|
||
|
|
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div id="documentation">
|
||
|
|
<h1 class="class">DeviseAuth::RegistrationsController</h1>
|
||
|
|
|
||
|
|
<div id="description">
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- Constants -->
|
||
|
|
|
||
|
|
|
||
|
|
<!-- Attributes -->
|
||
|
|
|
||
|
|
|
||
|
|
<!-- Methods -->
|
||
|
|
|
||
|
|
<div id="public-instance-method-details" class="method-section section">
|
||
|
|
<h3 class="section-header">Public Instance Methods</h3>
|
||
|
|
|
||
|
|
|
||
|
|
<div id="create-method" class="method-detail ">
|
||
|
|
<a name="method-i-create"></a>
|
||
|
|
|
||
|
|
<div class="method-heading">
|
||
|
|
|
||
|
|
<span class="method-name">create</span><span
|
||
|
|
class="method-args">()</span>
|
||
|
|
<span class="method-click-advice">click to toggle source</span>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="method-description">
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<div class="method-source-code"
|
||
|
|
id="create-source">
|
||
|
|
<pre>
|
||
|
|
<span class="ruby-comment cmt"># File app/controllers/devise_auth/registrations_controller.rb, line 12</span>
|
||
|
|
12: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create</span>
|
||
|
|
13: <span class="ruby-identifier">build_resource</span>
|
||
|
|
14:
|
||
|
|
15: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">save</span>
|
||
|
|
16: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">active_for_authentication?</span>
|
||
|
|
17: <span class="ruby-identifier">set_flash_message</span> <span class="ruby-value">:notice</span>, <span class="ruby-value">:signed_up</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">is_navigational_format?</span>
|
||
|
|
18: <span class="ruby-identifier">sign_in</span>(<span class="ruby-identifier">resource_name</span>, <span class="ruby-identifier">resource</span>)
|
||
|
|
19: <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">user_path</span>(<span class="ruby-identifier">resource</span>)
|
||
|
|
20: <span class="ruby-keyword kw">else</span>
|
||
|
|
21: <span class="ruby-identifier">set_flash_message</span> <span class="ruby-value">:notice</span>, <span class="ruby-value">:inactive_signed_up</span>, <span class="ruby-value">:reason</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">inactive_message</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">is_navigational_format?</span>
|
||
|
|
22: <span class="ruby-identifier">expire_session_data_after_sign_in!</span>
|
||
|
|
23: <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">user_path</span>(<span class="ruby-identifier">resource</span>)
|
||
|
|
24: <span class="ruby-keyword kw">end</span>
|
||
|
|
25: <span class="ruby-keyword kw">else</span>
|
||
|
|
26: <span class="ruby-identifier">clean_up_passwords</span>(<span class="ruby-identifier">resource</span>)
|
||
|
|
27: <span class="ruby-identifier">respond_with_navigational</span>(<span class="ruby-identifier">resource</span>) { <span class="ruby-identifier">render</span> <span class="ruby-value">:partial</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"devise/registrations/new"</span> }
|
||
|
|
28: <span class="ruby-keyword kw">end</span>
|
||
|
|
29: <span class="ruby-keyword kw">end</span></pre>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
<div id="edit-method" class="method-detail ">
|
||
|
|
<a name="method-i-edit"></a>
|
||
|
|
|
||
|
|
<div class="method-heading">
|
||
|
|
|
||
|
|
<span class="method-name">edit</span><span
|
||
|
|
class="method-args">()</span>
|
||
|
|
<span class="method-click-advice">click to toggle source</span>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="method-description">
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<div class="method-source-code"
|
||
|
|
id="edit-source">
|
||
|
|
<pre>
|
||
|
|
<span class="ruby-comment cmt"># File app/controllers/devise_auth/registrations_controller.rb, line 8</span>
|
||
|
|
8: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">edit</span>
|
||
|
|
9: <span class="ruby-identifier">render</span> <span class="ruby-value">:partial</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"devise/registrations/edit"</span>
|
||
|
|
10: <span class="ruby-keyword kw">end</span></pre>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
<div id="new-method" class="method-detail ">
|
||
|
|
<a name="method-i-new"></a>
|
||
|
|
|
||
|
|
<div class="method-heading">
|
||
|
|
|
||
|
|
<span class="method-name">new</span><span
|
||
|
|
class="method-args">()</span>
|
||
|
|
<span class="method-click-advice">click to toggle source</span>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="method-description">
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<div class="method-source-code"
|
||
|
|
id="new-source">
|
||
|
|
<pre>
|
||
|
|
<span class="ruby-comment cmt"># File app/controllers/devise_auth/registrations_controller.rb, line 3</span>
|
||
|
|
3: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">new</span>
|
||
|
|
4: <span class="ruby-identifier">resource</span> = <span class="ruby-identifier">build_resource</span>({})
|
||
|
|
5: <span class="ruby-identifier">respond_with_navigational</span>(<span class="ruby-identifier">resource</span>) { <span class="ruby-identifier">render</span> <span class="ruby-value">:partial</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"devise/registrations/new"</span> }
|
||
|
|
6: <span class="ruby-keyword kw">end</span></pre>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
|
||
|
|
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
||
|
|
|
||
|
|
<p>Disabled; run with --debug to generate this.</p>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div id="validator-badges">
|
||
|
|
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||
|
|
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
||
|
|
Rdoc Generator</a> 1.1.6</small>.</p>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</body>
|
||
|
|
</html>
|
||
|
|
|