Sha256: f8387ab52d64760db196d0fd44c47784759aac8076d0787c9f073e892ace8d2a

Contents?: true

Size: 1.86 KB

Versions: 10

Compression:

Stored size: 1.86 KB

Contents

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>delete (UserController)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre><span class="ruby-comment cmt"># File app/controllers/user_controller.rb, line 131</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>
    <span class="ruby-ivar">@user</span> = <span class="ruby-identifier">current_user</span> <span class="ruby-operator">||</span> <span class="ruby-constant">User</span>.<span class="ruby-identifier">find_by_id</span>( <span class="ruby-identifier">session</span>[<span class="ruby-identifier">:user_id</span>] )
    <span class="ruby-keyword kw">begin</span>
      <span class="ruby-ivar">@user</span>.<span class="ruby-identifier">update_attribute</span>( <span class="ruby-identifier">:deleted</span>, <span class="ruby-keyword kw">true</span> )
      <span class="ruby-identifier">logout</span>
      <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">ex</span>
      <span class="ruby-identifier">flash</span>.<span class="ruby-identifier">now</span>[<span class="ruby-value str">'message'</span>] = <span class="ruby-node">&quot;Error: #{@ex}.&quot;</span>
      <span class="ruby-identifier">redirect_back_or_default</span> <span class="ruby-identifier">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'welcome'</span>
    <span class="ruby-keyword kw">end</span>
  <span class="ruby-keyword kw">end</span></pre>
</body>
</html>

Version data entries

10 entries across 5 versions & 1 rubygems

Version Path
backlog-0.7.10 doc/classes/UserController.src/M000023.html
backlog-0.7.10 doc/classes/UserController.src/M000035.html
backlog-0.7.12 doc/classes/UserController.src/M000035.html
backlog-0.7.12 doc/classes/UserController.src/M000023.html
backlog-0.7.9 doc/classes/UserController.src/M000035.html
backlog-0.7.9 doc/classes/UserController.src/M000023.html
backlog-0.8.0 doc/classes/UserController.src/M000023.html
backlog-0.8.0 doc/classes/UserController.src/M000035.html
backlog-0.8.1 doc/classes/UserController.src/M000035.html
backlog-0.8.1 doc/classes/UserController.src/M000023.html