Permalink
Browse files

damn trailing whitespace

  • Loading branch information...
1 parent f146579 commit be24819c950d253aa445b2a1c3b7cd4cdf615b97 @zenspider zenspider committed Aug 15, 2012
@@ -2,15 +2,15 @@ class AboutController < ApplicationController
def index
@title = "Home"
end
-
+
def people
@people = Dude.order('featured desc, name asc')
end
-
+
def projects
@projects = Project.order('name')
end
-
+
def join_us
end
end
@@ -2,7 +2,7 @@ class ApplicationController < ActionController::Base
# filter_parameter_logging :password
helper :all
protect_from_forgery
-
+
def basic_auth
authenticate_or_request_with_http_basic do |username, password|
(username.downcase == "admin") && (password == ENV["SEATTLERB_ADMIN_PASSWORD"])
@@ -3,11 +3,11 @@ class DudesController < ApplicationController
def index
@dudes = Dude.scoped
end
-
+
def edit
@dude = Dude.find(params[:id])
end
-
+
def update
@dude = Dude.find(params[:id])
if @dude.update_attributes(params[:dude])
@@ -16,11 +16,10 @@ def update
render :edit
end
end
-
+
def destroy
@dude = Dude.find(params[:id])
@dude.destroy
redirect_to dudes_path
end
-
end
@@ -1,11 +1,10 @@
class NewsletterController < ApplicationController
def index
end
-
+
def subscribe
response = ZenspiderSubscriber.subscribe!(params[:subscribe])
puts response.inspect
redirect_to join_us_path
end
-
end
View
@@ -5,11 +5,11 @@ class Dude < ActiveRecord::Base
has_many :projects, :through => :affiliations
scope :featured, where(featured: true)
scope :regular, where(featured: false)
-
+
def bio
super.blank? ? "..." : super
end
-
+
def update_avatar!
twitter_response = get_twitter_info if twitter
image_url = if twitter_response
@@ -19,9 +19,9 @@ def update_avatar!
end
self.update_attributes(image_url: image_url)
end
-
+
private
-
+
def get_twitter_info
response = HTTParty.get("https://api.twitter.com/1/users/show.json?screen_name=#{self.twitter}")
if response.code == 200
@@ -30,5 +30,4 @@ def get_twitter_info
false
end
end
-
end
@@ -1,22 +1,21 @@
class ZenspiderSubscriber
include HTTParty
base_uri 'lists.zenspider.com/mailman'
+
class << self
-
def subscribe!(options)
subscribe_to_discussion options[:person] if options[:subscribe_to_discussion]
subscribe_to_jobs options[:person] if options[:subscribe_to_jobs]
end
-
+
private
-
+
def subscribe_to_discussion(person)
post "/subscribe/ruby", query: person
end
def subscribe_to_jobs(person)
post "/subscribe/rubyjobs", query: person
end
-
end
-end
+end

0 comments on commit be24819

Please sign in to comment.