Skip to content

Commit

Permalink
makes spaces consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
voodoorai2000 committed Sep 2, 2015
1 parent 29ae0c6 commit 4897d5d
Show file tree
Hide file tree
Showing 20 changed files with 14 additions and 13 deletions.
1 change: 0 additions & 1 deletion app/controllers/account_controller.rb
@@ -1,5 +1,4 @@
class AccountController < ApplicationController

before_action :authenticate_user!
before_action :set_account
load_and_authorize_resource class: "User"
Expand Down
1 change: 0 additions & 1 deletion app/controllers/admin/comments_controller.rb
@@ -1,5 +1,4 @@
class Admin::CommentsController < Admin::BaseController

has_filters %w{all with_confirmed_hide}

before_filter :load_comment, only: [:confirm_hide, :restore]
Expand Down
1 change: 0 additions & 1 deletion app/controllers/admin/moderators_controller.rb
@@ -1,5 +1,4 @@
class Admin::ModeratorsController < Admin::BaseController

load_and_authorize_resource

def index
Expand Down
1 change: 0 additions & 1 deletion app/controllers/admin/organizations_controller.rb
@@ -1,5 +1,4 @@
class Admin::OrganizationsController < Admin::BaseController

has_filters %w{all pending verified rejected}, only: :index

load_and_authorize_resource except: :search
Expand Down
1 change: 0 additions & 1 deletion app/controllers/admin/users_controller.rb
@@ -1,5 +1,4 @@
class Admin::UsersController < Admin::BaseController

has_filters %w{all with_confirmed_hide}, only: :index

before_filter :load_user, only: [:confirm_hide, :restore]
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/api/stats_controller.rb
@@ -1,4 +1,5 @@
class Api::StatsController < Api::ApiController

def show
unless params[:events].present? || params[:visits].present?
return render json: {}, status: :bad_request
Expand All @@ -19,4 +20,5 @@ def show

render json: ds.build
end

end
2 changes: 1 addition & 1 deletion app/controllers/moderation/base_controller.rb
Expand Up @@ -2,9 +2,9 @@ class Moderation::BaseController < ApplicationController
layout 'admin'

before_action :authenticate_user!
before_action :verify_moderator

skip_authorization_check
before_action :verify_moderator

private

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/moderation/comments_controller.rb
@@ -1,6 +1,6 @@
class Moderation::CommentsController < Moderation::BaseController

has_filters %w{all pending_flag_review with_ignored_flag}, only: :index

before_filter :load_comments, only: :index

load_and_authorize_resource
Expand Down
1 change: 0 additions & 1 deletion app/controllers/moderation/debates_controller.rb
@@ -1,5 +1,4 @@
class Moderation::DebatesController < Moderation::BaseController

has_filters %w{all pending_flag_review with_ignored_flag}, only: :index

before_filter :load_debates, only: :index
Expand Down
1 change: 1 addition & 0 deletions app/controllers/organizations/registrations_controller.rb
@@ -1,4 +1,5 @@
class Organizations::RegistrationsController < Devise::RegistrationsController

def new
super do |user|
user.build_organization
Expand Down
1 change: 0 additions & 1 deletion app/controllers/pages_controller.rb
@@ -1,5 +1,4 @@
class PagesController < ApplicationController

skip_authorization_check

def census_terms
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/stats_controller.rb
@@ -1,6 +1,6 @@
class StatsController < ApplicationController
skip_authorization_check
before_action :verify_administrator
skip_authorization_check

def show
@event_types = Ahoy::Event.select(:name).uniq.pluck(:name)
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/users/omniauth_callbacks_controller.rb
@@ -1,4 +1,5 @@
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController

def self.provides_callback_for(provider)
class_eval %Q{
def #{provider}
Expand Down Expand Up @@ -26,4 +27,5 @@ def after_sign_in_path_for(resource)
finish_signup_path
end
end

end
1 change: 1 addition & 0 deletions app/helpers/application_helper.rb
@@ -1,4 +1,5 @@
module ApplicationHelper

def percentage(vote, debate)
return "0%" if debate.total_votes == 0
debate.send(vote).percent_of(debate.total_votes).to_s + "%"
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/cache_keys_helper.rb
@@ -1,4 +1,5 @@
module CacheKeysHelper

def locale_and_user_status
@cache_key_user ||= calculate_user_status
"#{I18n.locale}/#{@cache_key_user}"
Expand All @@ -17,4 +18,5 @@ def calculate_user_status

user_status
end

end
2 changes: 2 additions & 0 deletions app/helpers/flags_helper.rb
@@ -1,4 +1,5 @@
module FlagsHelper

def show_flag_action?(flaggable)
current_user && !own_flaggable?(flaggable) && !flagged?(flaggable)
end
Expand All @@ -24,4 +25,5 @@ def own_flaggable?(flaggable)
flaggable.author_id == current_user.id
end
end

end
1 change: 1 addition & 0 deletions app/helpers/stats_helper.rb
@@ -1,4 +1,5 @@
module StatsHelper

def events_chart_tag(events, opt={})
events = events.join(',') if events.is_a? Array
opt[:data] ||= {}
Expand Down
1 change: 0 additions & 1 deletion app/models/flag.rb
@@ -1,5 +1,4 @@
class Flag < ActiveRecord::Base

belongs_to :user
belongs_to :flaggable, polymorphic: true, counter_cache: true

Expand Down
1 change: 0 additions & 1 deletion app/models/organization.rb
@@ -1,5 +1,4 @@
class Organization < ActiveRecord::Base

belongs_to :user

validates :name, presence: true
Expand Down
1 change: 0 additions & 1 deletion app/models/setting.rb
@@ -1,5 +1,4 @@
class Setting < ActiveRecord::Base

validates :key, presence: true, uniqueness: true

default_scope { order(key: :desc) }
Expand Down

0 comments on commit 4897d5d

Please sign in to comment.