docs/lib/dailycred/helper.html in dailycred-0.1.33 vs docs/lib/dailycred/helper.html in dailycred-0.1.34

- old
+ new

@@ -58,11 +58,11 @@ example: before</em>filter :authenticate</p> </td> <td class=code> <div class='highlight'><pre> <span class="k">def</span> <span class="nf">authenticate</span> - <span class="n">redirect_to_auth</span> <span class="k">unless</span> <span class="n">current_user</span> + <span class="n">redirect_to_unauth</span> <span class="k">unless</span> <span class="n">current_user</span> <span class="k">end</span></pre></div> </td> </tr> <tr id='section-3'> <td class=docs> @@ -101,9 +101,15 @@ <span class="k">end</span> <span class="k">def</span> <span class="nf">redirect_to_auth</span> <span class="n">opts</span><span class="o">=</span><span class="p">{}</span> <span class="n">conf</span> <span class="o">=</span> <span class="no">Rails</span><span class="o">.</span><span class="n">configuration</span><span class="o">.</span><span class="n">DAILYCRED_OPTIONS</span> <span class="n">path</span> <span class="o">=</span> <span class="o">!</span><span class="n">conf</span><span class="o">[</span><span class="ss">:after_auth</span><span class="o">].</span><span class="n">nil?</span> <span class="p">?</span> <span class="n">conf</span><span class="o">[</span><span class="ss">:after_auth</span><span class="o">]</span> <span class="p">:</span> <span class="n">dailycred_engine</span><span class="o">.</span><span class="n">auth_info_path</span> + <span class="n">redirect_to</span> <span class="n">path</span><span class="p">,</span> <span class="n">opts</span> + <span class="k">end</span> + + <span class="k">def</span> <span class="nf">redirect_to_unauth</span> <span class="n">opts</span> <span class="o">=</span> <span class="p">{}</span> + <span class="n">conf</span> <span class="o">=</span> <span class="no">Rails</span><span class="o">.</span><span class="n">configuration</span><span class="o">.</span><span class="n">DAILYCRED_OPTIONS</span> + <span class="n">path</span> <span class="o">=</span> <span class="o">!</span><span class="n">conf</span><span class="o">[</span><span class="ss">:after_unauth</span><span class="o">].</span><span class="n">nil?</span> <span class="p">?</span> <span class="n">conf</span><span class="o">[</span><span class="ss">:after_unauth</span><span class="o">]</span> <span class="p">:</span> <span class="n">dailycred_engine</span><span class="o">.</span><span class="n">auth_info_path</span> <span class="n">redirect_to</span> <span class="n">path</span><span class="p">,</span> <span class="n">opts</span> <span class="k">end</span> <span class="no">ActiveSupport</span><span class="o">.</span><span class="n">on_load</span><span class="p">(</span><span class="ss">:action_controller</span><span class="p">)</span> <span class="k">do</span>