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
before_action :authenticate_user!
before_action :set_account
load_and_authorize_resource class: "User"

View File

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

View File

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

View File

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

View File

@@ -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]

View File

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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

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

View File

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

View File

@@ -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)

View File

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

View File

@@ -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 + "%"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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