title: Issue while using || (OR) in if statement
body: <p>In my project controller I have the actions below. As you can see 'check_if_owner_or_member' is called when the 'show' view is rendered, which checks whether or not a user is a member of the project or administrator. If that's not the case the user get's an error message and gets redirected to the root.</p>
  
  <p>When trying out the action it works if the user is admin, but not if the user is a member. So, something is apparently wrong with 'if !is_owner || !is_member', because it works if I only try with 'if !is_member'.</p>
  
  <p>What am I doing wrong?</p>
  
  <pre><code>before_filter :check_if_owner_or_member, :only =&gt; [:show]
  
  def is_owner
      Project.where("id = ? AND user_id = ?", params[:id], current_user.id).count &gt; 0
  end
  
  def is_member
      ProjectsUser.where("project_id = ? AND user_id = ?", params[:id], current_user.id).count &gt; 0
  end
  
  def check_if_owner_or_member
      if !is_owner || !is_member
          redirect_to root_path
          flash[:error] = "You don't have permission to the project!"
      end
  end
  </code></pre>