makes spaces consistent

This commit is contained in:
rgarcia
2015-09-03 01:29:46 +02:00
parent 29ae0c68f8
commit 4897d5df4e
20 changed files with 14 additions and 13 deletions

View File

@@ -1,5 +1,4 @@
class AccountController < ApplicationController class AccountController < ApplicationController
before_action :authenticate_user! before_action :authenticate_user!
before_action :set_account before_action :set_account
load_and_authorize_resource class: "User" load_and_authorize_resource class: "User"

View File

@@ -1,5 +1,4 @@
class Admin::CommentsController < Admin::BaseController class Admin::CommentsController < Admin::BaseController
has_filters %w{all with_confirmed_hide} has_filters %w{all with_confirmed_hide}
before_filter :load_comment, only: [:confirm_hide, :restore] before_filter :load_comment, only: [:confirm_hide, :restore]

View File

@@ -1,5 +1,4 @@
class Admin::ModeratorsController < Admin::BaseController class Admin::ModeratorsController < Admin::BaseController
load_and_authorize_resource load_and_authorize_resource
def index def index

View File

@@ -1,5 +1,4 @@
class Admin::OrganizationsController < Admin::BaseController class Admin::OrganizationsController < Admin::BaseController
has_filters %w{all pending verified rejected}, only: :index has_filters %w{all pending verified rejected}, only: :index
load_and_authorize_resource except: :search load_and_authorize_resource except: :search

View File

@@ -1,5 +1,4 @@
class Admin::UsersController < Admin::BaseController class Admin::UsersController < Admin::BaseController
has_filters %w{all with_confirmed_hide}, only: :index has_filters %w{all with_confirmed_hide}, only: :index
before_filter :load_user, only: [:confirm_hide, :restore] before_filter :load_user, only: [:confirm_hide, :restore]

View File

@@ -1,4 +1,5 @@
class Api::StatsController < Api::ApiController class Api::StatsController < Api::ApiController
def show def show
unless params[:events].present? || params[:visits].present? unless params[:events].present? || params[:visits].present?
return render json: {}, status: :bad_request return render json: {}, status: :bad_request
@@ -19,4 +20,5 @@ class Api::StatsController < Api::ApiController
render json: ds.build render json: ds.build
end end
end end

View File

@@ -2,9 +2,9 @@ class Moderation::BaseController < ApplicationController
layout 'admin' layout 'admin'
before_action :authenticate_user! before_action :authenticate_user!
before_action :verify_moderator
skip_authorization_check skip_authorization_check
before_action :verify_moderator
private private

View File

@@ -1,6 +1,6 @@
class Moderation::CommentsController < Moderation::BaseController class Moderation::CommentsController < Moderation::BaseController
has_filters %w{all pending_flag_review with_ignored_flag}, only: :index has_filters %w{all pending_flag_review with_ignored_flag}, only: :index
before_filter :load_comments, only: :index before_filter :load_comments, only: :index
load_and_authorize_resource load_and_authorize_resource

View File

@@ -1,5 +1,4 @@
class Moderation::DebatesController < Moderation::BaseController class Moderation::DebatesController < Moderation::BaseController
has_filters %w{all pending_flag_review with_ignored_flag}, only: :index has_filters %w{all pending_flag_review with_ignored_flag}, only: :index
before_filter :load_debates, only: :index before_filter :load_debates, only: :index

View File

@@ -1,4 +1,5 @@
class Organizations::RegistrationsController < Devise::RegistrationsController class Organizations::RegistrationsController < Devise::RegistrationsController
def new def new
super do |user| super do |user|
user.build_organization user.build_organization

View File

@@ -1,5 +1,4 @@
class PagesController < ApplicationController class PagesController < ApplicationController
skip_authorization_check skip_authorization_check
def census_terms def census_terms

View File

@@ -1,6 +1,6 @@
class StatsController < ApplicationController class StatsController < ApplicationController
skip_authorization_check
before_action :verify_administrator before_action :verify_administrator
skip_authorization_check
def show def show
@event_types = Ahoy::Event.select(:name).uniq.pluck(:name) @event_types = Ahoy::Event.select(:name).uniq.pluck(:name)

View File

@@ -1,4 +1,5 @@
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
def self.provides_callback_for(provider) def self.provides_callback_for(provider)
class_eval %Q{ class_eval %Q{
def #{provider} def #{provider}
@@ -26,4 +27,5 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
finish_signup_path finish_signup_path
end end
end end
end end

View File

@@ -1,4 +1,5 @@
module ApplicationHelper module ApplicationHelper
def percentage(vote, debate) def percentage(vote, debate)
return "0%" if debate.total_votes == 0 return "0%" if debate.total_votes == 0
debate.send(vote).percent_of(debate.total_votes).to_s + "%" debate.send(vote).percent_of(debate.total_votes).to_s + "%"

View File

@@ -1,4 +1,5 @@
module CacheKeysHelper module CacheKeysHelper
def locale_and_user_status def locale_and_user_status
@cache_key_user ||= calculate_user_status @cache_key_user ||= calculate_user_status
"#{I18n.locale}/#{@cache_key_user}" "#{I18n.locale}/#{@cache_key_user}"
@@ -17,4 +18,5 @@ module CacheKeysHelper
user_status user_status
end end
end end

View File

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

View File

@@ -1,4 +1,5 @@
module StatsHelper module StatsHelper
def events_chart_tag(events, opt={}) def events_chart_tag(events, opt={})
events = events.join(',') if events.is_a? Array events = events.join(',') if events.is_a? Array
opt[:data] ||= {} opt[:data] ||= {}

View File

@@ -1,5 +1,4 @@
class Flag < ActiveRecord::Base class Flag < ActiveRecord::Base
belongs_to :user belongs_to :user
belongs_to :flaggable, polymorphic: true, counter_cache: true belongs_to :flaggable, polymorphic: true, counter_cache: true

View File

@@ -1,5 +1,4 @@
class Organization < ActiveRecord::Base class Organization < ActiveRecord::Base
belongs_to :user belongs_to :user
validates :name, presence: true validates :name, presence: true

View File

@@ -1,5 +1,4 @@
class Setting < ActiveRecord::Base class Setting < ActiveRecord::Base
validates :key, presence: true, uniqueness: true validates :key, presence: true, uniqueness: true
default_scope { order(key: :desc) } default_scope { order(key: :desc) }