Byte4/acebook-byte4

View on GitHub

Showing 326 of 326 total issues

Assignment Branch Condition size for create is too high. [17.06/15]
Open

def create
like = Like.where('post_id = ? AND user_id = ?', params[:post_id], current_user.id)
if like.count <= 0
Like.create({'post_id': params[:post_id], 'user_id': current_user.id})
else
Severity: Minor
Found in app/controllers/likes_controller.rb by rubocop

Assignment Branch Condition size for create is too high. [17.06/15]
Open

def create
dislike = Dislike.where('post_id = ? AND user_id = ?', params[:post_id], current_user.id)
if dislike.count <= 0
Dislike.create({'post_id': params[:post_id], 'user_id': current_user.id})
else

Similar blocks of code found in 2 locations. Consider refactoring.
Open

def create
dislike = Dislike.where('post_id = ? AND user_id = ?', params[:post_id], current_user.id)
if dislike.count <= 0
Dislike.create({'post_id': params[:post_id], 'user_id': current_user.id})
else
Severity: Minor
Found in app/controllers/dislikes_controller.rb and 1 other location - About 30 mins to fix
app/controllers/likes_controller.rb on lines 5..12

Similar blocks of code found in 2 locations. Consider refactoring.
Open

def create
like = Like.where('post_id = ? AND user_id = ?', params[:post_id], current_user.id)
if like.count <= 0
Like.create({'post_id': params[:post_id], 'user_id': current_user.id})
else
Severity: Minor
Found in app/controllers/likes_controller.rb and 1 other location - About 30 mins to fix
app/controllers/dislikes_controller.rb on lines 6..13

Element (img.right) is overqualified, just use .right without element name.
Open

p img.right {float:right;margin:1.5em 0 1.5em 1.5em;}

Rule doesn't have all its properties in alphabetical order.
Open

fieldset {padding:1.4em;margin:0 0 1.5em 0;border:1px solid #ccc;}

Background image 'images/ui-icons_454545_256x240.png' was used multiple times, first declared at line 331, col 53.
Open

.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }

Rule doesn't have all its properties in alphabetical order.
Open

.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }

Rule doesn't have all its properties in alphabetical order.
Open

.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }

Don't use IDs in selectors.
Open

#cboxMiddleLeft, #cboxBottomLeft{clear:left;}

Don't use IDs in selectors.
Open

#cboxError{padding:50px; border:1px solid #ccc;}

Don't use IDs in selectors.
Open

#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{position:absolute; bottom:-29px; background:url(colorbox/controls.png) no-repeat 0px 0px; width:23px; height:23px; text-indent:-9999px;}

Don't use IDs in selectors.
Open

#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{position:absolute; bottom:-29px; background:url(colorbox/controls.png) no-repeat 0px 0px; width:23px; height:23px; text-indent:-9999px;}

Rule doesn't have all its properties in alphabetical order.
Open

#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{position:absolute; bottom:-29px; background:url(colorbox/controls.png) no-repeat 0px 0px; width:23px; height:23px; text-indent:-9999px;}

Heading (h6) has already been defined.
Open

h6 {font-size:1em;font-weight:bold;}

Rule doesn't have all its properties in alphabetical order.
Open

blockquote {margin:1.5em;color:#666;font-style:italic;}

Rule doesn't have all its properties in alphabetical order.
Open

.success {background:#E6EFC2;color:#264409;border-color:#C6D880;}

Rule doesn't have all its properties in alphabetical order.
Open

.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }

Rule doesn't have all its properties in alphabetical order.
Open

.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }

Expected (<filter-function-list> | none) but found 'Alpha(Opacity=30)'.</filter-function-list>
Open

.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }
Severity
Category
Status
Source
Language