Skip to content

Commit

Permalink
Removed trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
hcarreras committed Feb 1, 2014
1 parent 6236375 commit 2562ae5
Show file tree
Hide file tree
Showing 44 changed files with 1,364 additions and 77 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -29,7 +29,7 @@ gem 'coffee-rails'
gem 'uglifier'
gem 'bootstrap-sass'

gem 'jquery-rails'
gem 'jquery-rails'

#Image manipulation
gem "carrierwave"
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Expand Up @@ -6,7 +6,7 @@ class ApplicationController < ActionController::Base
rescue_from Tractis::InvalidVerificationError do |exception|
render :text => "Access Denied Bitch", :status => 403
end

helper :all

protected
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/proposals_controller.rb
Expand Up @@ -2,7 +2,7 @@ class ProposalsController < InheritedResources::Base
before_filter :check_is_admin, :only => :toggle

belongs_to :category, :proposer, :optional => true

helper_method :parent, :parent_type

respond_to :html, :xml
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/registrations_controller.rb
@@ -1,6 +1,6 @@
class RegistrationsController < Devise::RegistrationsController
before_filter :set_params, only: :create

private

#used to be able to have multiple signin and singnup forms in one page
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/sessions_controller.rb
@@ -1,6 +1,6 @@
class SessionsController < Devise::SessionsController
include Tractis::IdentityVerifications

# Refactor with omniauth_callbacks controller
# by creating a custom tractis ominiauth stategy, inspiration:
# https://gist.github.com/dira/722793
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/spokesmen_controller.rb
Expand Up @@ -2,7 +2,7 @@ class SpokesmenController < ApplicationController
before_filter :authenticate_user!

def new
@spokesman = User.find(params[:id])
@spokesman = User.find(params[:id])
end

def edit
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/users_controller.rb
@@ -1,6 +1,6 @@
class UsersController < ApplicationController
before_filter :authenticate_user!, :only => :choose_as_spokesman

def index
@users = User.all
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/votes_controller.rb
@@ -1,7 +1,7 @@
class VotesController < InheritedResources::Base
belongs_to :proposal
before_filter :authenticate_user!

def new
@proposal = Proposal.find(params[:proposal_id])
@vote = @proposal.votes.new(params[:vote])
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Expand Up @@ -7,7 +7,7 @@ def home?
def import_bootstrap?
action_name == "new" and ["votes", "spokesmen"].include?(controller_name)
end

def menu_link(text, path, icon='')
content_tag :li, class: current_page_css(path) do
link_to path, class: "nav-link" do
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/pages_helper.rb
@@ -1,5 +1,5 @@
module PagesHelper

def users_page?
controller_name == "users"
end
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/proposals_helper.rb
@@ -1,5 +1,5 @@
module ProposalsHelper

def proposal_type
if parent then parent_type
else action_name end
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/share_helper.rb
Expand Up @@ -6,7 +6,7 @@ def image_url(source)
end
abs_path
end

def share_text
t(:share_text)
end
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/spokesman_helper.rb
@@ -1,5 +1,5 @@
module SpokesmanHelper

def current_spokesman?(user)
current_user && current_user.spokesman == user
end
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/users_helper.rb
@@ -1,5 +1,5 @@
# coding: utf-8
module UsersHelper
module UsersHelper
def humanize_vote_text(user, proposal)
case find_choice user, proposal
when "si" then "A favor"
Expand Down
2 changes: 1 addition & 1 deletion app/models/category.rb
@@ -1,7 +1,7 @@
# coding: utf-8
class Category < ActiveRecord::Base
has_many :proposals

before_create :set_name

scope :hot, -> { order("proposals_count DESC").limit(5) }
Expand Down
2 changes: 1 addition & 1 deletion app/models/delegated_vote.rb
@@ -1,6 +1,6 @@
class DelegatedVote < ActiveRecord::Base
belongs_to :proposal

def reset!
self.in_favor = 0
self.against = 0
Expand Down
2 changes: 1 addition & 1 deletion app/models/proposal.rb
Expand Up @@ -4,7 +4,7 @@ class Proposal < ActiveRecord::Base
has_many :votes
belongs_to :category, :counter_cache => true
belongs_to :proposer, :counter_cache => true

scope :open, -> { where("closed_at is null") }
scope :hot, -> { open.order("votes_count desc, visits desc").limit(5) }
scope :recently_closed, -> { where("closed_at is not null and status is not null").order("closed_at DESC").limit(5) }
Expand Down
2 changes: 1 addition & 1 deletion app/models/scrapper.rb
@@ -1,6 +1,6 @@
class Scrapper

def initialize
def initialize
end

def scrape
Expand Down
2 changes: 1 addition & 1 deletion app/models/user.rb
@@ -1,6 +1,6 @@
class User < ActiveRecord::Base
default_scope { order('represented_users_count DESC, updated_at DESC') }

devise :database_authenticatable, :registerable, :omniauthable,
:recoverable, :rememberable, :trackable, :validatable

Expand Down
2 changes: 1 addition & 1 deletion app/models/vote.rb
@@ -1,7 +1,7 @@
class Vote < ActiveRecord::Base
belongs_to :proposal, touch: true
belongs_to :user

scope :order_by_represented_users, -> { order("users.represented_users_count DESC").includes("user") }

validates_uniqueness_of :proposal_id, :scope => :user_id
Expand Down
16 changes: 8 additions & 8 deletions app/views/devise/sessions/new.html.erb
Expand Up @@ -3,7 +3,7 @@
<h3 class="gamma">Entra en Agoraonrails</h3>
<!-- Social Login
================================================== -->

<div id="social-network-account" class="social-login five-twelfths float--left">
<div class="row three-quarters">
<fieldset>
Expand All @@ -22,12 +22,12 @@
</div>
<% end %>
</div>

<a href="#" class="agoraonrails-account-link">
Entra con tu cuenta de Agoraonrails
</a>
</div>

<!-- Signup form
================================================== -->
<div id="signup" class="five-twelfths float--right">
Expand All @@ -50,7 +50,7 @@
<% end %>
</fieldset>
</div>

<div id="agoraonrails-account" class="agora-login five-twelfths float--left" style="display:none">
<!-- Agora Login
================================================== -->
Expand All @@ -71,7 +71,7 @@
</div>
<% end %>
</fieldset>

<a href="#" class="social-network-account-link">
Entra a través de Twitter ó Facebook
</a>
Expand All @@ -96,7 +96,7 @@
</div>
</fieldset>
<% end %>

<div>
<a href="#" class="social-network-account-link">
Entra a través de Twitter ó Facebook
Expand All @@ -114,5 +114,5 @@





4 changes: 2 additions & 2 deletions app/views/layouts/pages.html.erb
Expand Up @@ -14,7 +14,7 @@
<div id="wrap">
<div id="wrap-inner">
<div class="wrap-fit">

<section id="header">
<% if current_user %>
<nav id="user-nav">
Expand All @@ -36,7 +36,7 @@
</div>
</div>
</div>

<%= javascript_include_tag "application" %>
<%= yield :custom_javascript %>
<%= render :partial => "shared/google_analytics" if Rails.env == 'production' %>
Expand Down
6 changes: 3 additions & 3 deletions app/views/proposals/_proposal.html.erb
Expand Up @@ -5,7 +5,7 @@
<hgroup>
<h2 class="proposal-title"><%= link_to awesome_truncate(proposal.title, 150), proposal %></h2>
<p>
<%= t(:proposed_by_html, :proposer => link_to(proposal.proposer.name, proposal.proposer, :class => "proposer")) %>
<%= t(:proposed_by_html, :proposer => link_to(proposal.proposer.name, proposal.proposer, :class => "proposer")) %>
<span class="proposed_at"><%= t(:on_html, :date => l(proposal.proposed_at, :format => :long)) %></span>
</p>
</hgroup>
Expand All @@ -14,7 +14,7 @@

<% if proposal.closed? %>
<section class="proposal-footer">

<div class="wrap cf separator--top">
<ul class="list meta cf flush">
<li class="visuallyhidden">
Expand Down Expand Up @@ -44,6 +44,6 @@
<% end %>
</section>
<% end %>

</article>
<% end %>
2 changes: 1 addition & 1 deletion app/views/proposals/new.html.erb
Expand Up @@ -23,7 +23,7 @@
<%= f.label :proposer %><br />
<%= f.select :proposer_id, Proposer.all.map {|proposer| [proposer.name, proposer.id]} %>
</p>

<p>
<%= f.label :proposed_at %><br />
<%= f.date_select :proposed_at %>
Expand Down
10 changes: 5 additions & 5 deletions app/views/proposals/show.html.erb
Expand Up @@ -3,15 +3,15 @@
<% @title = "#{awesome_truncate(@proposal.title, 100)}" %>

<div class="proposals">

<article class="proposal" id="proposal_<%= @proposal.id %>">

<section class="proposal-content">
<!-- Body of proposal
================================================== -->
<h2 class="proposal-title"><%=h @proposal.title %></h2>
<p class="proposal_type">
<%=h @proposal.proposal_type %>
<%=h @proposal.proposal_type %>
<%= link_to t(:official_link), @proposal.official_url, :class => 'official_url' %>
</p>
<!-- Footer of proposal
Expand Down Expand Up @@ -51,8 +51,8 @@
================================================== -->
<!-- Begins the related content this proposal
================================================== -->
<div class="proposal-graphic">

<div class="proposal-graphic">
<section class="vote-results documents-list">
<h5 class="flush"><%= t(:popular_vote)%></h5>
<%= render :partial => "shared/results", :locals => {:proposal => @proposal, :width => 20} %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/spokesmen/_form.html.erb
Expand Up @@ -2,7 +2,7 @@
<p class="actions">
<span>
<%= submit_tag t(:i_am_sure), :class => "make-my-spokesman-submit" %>
<%= t(:or_well)%>
<%= t(:or_well)%>
<%= link_to t(:think_more), user_url(@spokesman), class: "oh-no" %>
</span>
</p>
Expand Down
2 changes: 1 addition & 1 deletion app/views/spokesmen/show.html.erb
Expand Up @@ -8,7 +8,7 @@
<%= t(:chosen_spokesman) %>
<% end %>
</strong>

<%= t :spokeman_redirect %>
</p>

Expand Down
6 changes: 3 additions & 3 deletions app/views/users/_actions.html.erb
Expand Up @@ -2,13 +2,13 @@
<% if current_user == @user %>
<%= link_to( (t :edit_profile) , edit_user_path(@user), :class => "btn btn--info btn-smart")%>
<% elsif current_spokesman?(@user) %>
<%= link_to t(:discharge_spokesman, :name => @user.name), spokesman_path(id: @user.id),
<%= link_to t(:discharge_spokesman, :name => @user.name), spokesman_path(id: @user.id),
:class => "btn btn--secondary discharge-my-spokesman mb2", :method => :delete %>
<% elsif has_spokesman? %>
<%= link_to t(:choose_spokeman, :name => @user.name), edit_spokesman_path(id: @user.id),
<%= link_to t(:choose_spokeman, :name => @user.name), edit_spokesman_path(id: @user.id),
:class => "make-my-spokesman btn btn--secondary mb2" %>
<% else %>
<%= link_to t(:choose_spokeman, :name => @user.name), new_spokesman_path(id: @user.id),
<%= link_to t(:choose_spokeman, :name => @user.name), new_spokesman_path(id: @user.id),
:class => "make-my-spokesman btn btn--secondary mb2" %>
<% end %>
</div>
2 changes: 1 addition & 1 deletion app/views/users/show.html.erb
Expand Up @@ -9,7 +9,7 @@
</section>

<aside>
<div id="tree"></div>
<div id="tree"></div>
<aside>
<div id="log" style="display:none"></div>
<table style="display:none">
Expand Down
2 changes: 1 addition & 1 deletion app/views/votes/new.html.erb
Expand Up @@ -6,6 +6,6 @@

<%= t(:the_proposal, :title => @proposal.title) %>
<p style="text-align:center"><%= render 'form' %>

</p>
</div>
2 changes: 1 addition & 1 deletion config/application.rb
Expand Up @@ -22,7 +22,7 @@ class Application < Rails::Application

# Raise exception if the passed locale is unavailable.
config.i18n.enforce_available_locales = true

# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
config.time_zone = 'UTC'
Expand Down
2 changes: 1 addition & 1 deletion config/environments/development.rb
Expand Up @@ -11,7 +11,7 @@
config.consider_all_requests_local = true
# config.action_view.debug_rjs = true
config.action_controller.perform_caching = false

# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false

Expand Down
2 changes: 1 addition & 1 deletion config/environments/production.rb
Expand Up @@ -27,7 +27,7 @@

# Use a different cache store in production
config.cache_store = :dalli_store

# How long an item should stay cached unless they have changed.
config.static_cache_control = "public, max-age=2592000"

Expand Down
2 changes: 1 addition & 1 deletion config/environments/test.rb
Expand Up @@ -22,7 +22,7 @@
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test

# Use SQL instead of Active Record's schema dumper when creating the test database.
# This is necessary if your schema can't be completely dumped by the schema dumper,
# like if you have constraints or database-specific column types
Expand Down

0 comments on commit 2562ae5

Please sign in to comment.