272 lines
6.9 KiB
HTML
272 lines
6.9 KiB
HTML
<html>
|
|
<head>
|
|
<style>
|
|
table { background: #fff; color: #000; }
|
|
.ruby .normal { color: #000; }
|
|
.ruby .comment { color: #005; font-style: italic; }
|
|
.ruby .keyword { color: #A44; font-weight: bold; }
|
|
.ruby .method { color: #44f; }
|
|
.ruby .class { color: #b1713d; }
|
|
.ruby .module { color: #050; }
|
|
.ruby .punct { color: #668; font-weight: bold; }
|
|
.ruby .symbol { color: #00f; }
|
|
.ruby .string { color: #4a4; }
|
|
.ruby .char { color: #F07; }
|
|
.ruby .ident { color: #000; }
|
|
.ruby .constant { color: #b1713d; }
|
|
.ruby .regex { color: #B66; background: #FEF; }
|
|
.ruby .number { color: #F99; }
|
|
.ruby .attribute { color: #f84; }
|
|
.ruby .global { color: #7FB; }
|
|
.ruby .expr { color: #227; }
|
|
.ruby .escape { color: #277; }
|
|
</style>
|
|
<title>Analyzed File Report</title>
|
|
</head>
|
|
<body>
|
|
<table cellpadding='0' cellspacing='0' class='ruby'>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span><span class="keyword">class</span> <span class="class">Project</span> < <span class="constant">ActiveRecord</span>::<span class="constant">Base</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n2" name="n2">2</a></span> has_and_belongs_to_many <span class="symbol">:users</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n3" name="n3">3</a></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n4" name="n4">4</a></span> validate <span class="symbol">:require_at_least_on_user</span>,<span class="key">on</span>: <span class="symbol">:update</span> <span class="comment"># </span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n5" name="n5">5</a></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n6" name="n6">6</a></span> validates <span class="symbol">:name</span>, <span class="key">presence</span>: <span class="predefined-constant">true</span>, <span class="key">length</span>: { <span class="key">minimum</span>: <span class="integer">1</span>, <span class="key">maximum</span>: <span class="integer">50</span> }, <span class="key">uniqueness</span>: <span class="predefined-constant">true</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n7" name="n7">7</a></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n8" name="n8">8</a></span> private
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"> <a href="#n9" name="n9">9</a></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span> <span class="keyword">def</span> <span class="function">require_at_least_on_user</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n11" name="n11">11</a></span> <span class="keyword">if</span> !users || users.size == <span class="integer">0</span> <span class="comment"># size</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n12" name="n12">12</a></span> errors[<span class="symbol">:users</span>] = <span class="string"><span class="delimiter">'</span><span class="content">at least one user in the project</span><span class="delimiter">'</span></span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n13" name="n13">13</a></span> <span class="keyword">end</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n14" name="n14">14</a></span> <span class="keyword">end</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign='top'>
|
|
|
|
|
|
|
|
</td>
|
|
<td valign='top'>
|
|
<div class="CodeRay">
|
|
<div class="code"><pre><span class="line-numbers"><a href="#n15" name="n15">15</a></span><span class="keyword">end</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
</body>
|
|
</html>
|