Skip to content

Commit 8f5413a

Browse files
committed
Add annotations to actions
1 parent b3ee87f commit 8f5413a

17 files changed

+511
-6
lines changed

app/controllers/accounts_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def update
4040
end
4141
end
4242

43+
# GET /webhooks/stripe(.:format)
4344
def webhook
4445
data = JSON.parse request.body.read
4546
if data[:type] == "invoice.payment_succeeded"

app/controllers/achievements_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ def show
1414
redirect_to(destination_url) if @badge && @user.username.downcase != show_achievements_params[:username].downcase
1515
end
1616

17+
# POST /award(.:format)
1718
def award
1819

1920
award_params = params.permit(:badge, :twitter, :linkedin, :github, :date)

app/controllers/alerts_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ class AlertsController < ApplicationController
77
GA_VISITORS_ALERT_INTERVAL = 30.minutes
88
TRACTION_ALERT_INTERVAL = 30.minutes
99

10+
# GET /alerts(.:format)
1011
def create
1112
case @alert[:type].to_sym
1213
when :traction
@@ -18,6 +19,7 @@ def create
1819
head(:ok)
1920
end
2021

22+
#GET /alerts(.:format)
2123
def index
2224
@alerts = []
2325
[:traction, :google_analytics].each do |type|

app/controllers/comments_controller.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ class CommentsController < ApplicationController
77
before_action :lookup_protip, only: [:create]
88
before_action :require_moderator!, only: [:mark_as_spam]
99

10+
# POST /p/:protip_id/comments(.:format)
1011
def create
1112
redirect_to_signup_if_unauthenticated(request.referer + "?" + (comment_params.try(:to_query) || ""), "You must signin/signup to add a comment") do
1213
@comment = @protip.comments.build(comment_params)
@@ -26,6 +27,7 @@ def create
2627
end
2728
end
2829

30+
# PUT /p/:protip_id/comments/:id(.:format)
2931
def update
3032
respond_to do |format|
3133
if @comment.update_attributes(comment_params)
@@ -38,6 +40,7 @@ def update
3840
end
3941
end
4042

43+
# DELETE /p/:protip_id/comments/:id(.:format)
4144
def destroy
4245
return head(:forbidden) if @comment.nil?
4346
@comment.destroy
@@ -47,6 +50,7 @@ def destroy
4750
end
4851
end
4952

53+
# POST /p/:protip_id/comments/:id/like(.:format)
5054
def like
5155
redirect_to_signup_if_unauthenticated(request.referer, "You must signin/signup to like a comment") do
5256
@comment.like_by(current_user)
@@ -57,6 +61,7 @@ def like
5761
end
5862
end
5963

64+
# POST /p/:protip_id/comments/:id/mark_as_spam(.:format)
6065
def mark_as_spam
6166
@comment.mark_as_spam
6267
respond_to do |format|

app/controllers/emails_controller.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
class EmailsController < ApplicationController
2+
3+
# GET /unsubscribe(.:format)
24
def unsubscribe
35
Rails.logger.info("Mailgun Unsubscribe: #{params.inspect}")
46
if mailgun?(ENV['MAILGUN_API_KEY'], params['token'], params['timestamp'], params['signature'])
@@ -17,6 +19,7 @@ def unsubscribe
1719
return head(200)
1820
end
1921

22+
# GET /delivered(.:format)
2023
def delivered
2124
Rails.logger.info("Mailgun Delivered: #{params.inspect}")
2225
if mailgun?(ENV['MAILGUN_API_KEY'], params['token'], params['timestamp'], params['signature'])

app/controllers/follows_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ def index
1616
@network = @network.order('score_cache DESC').page(params[:page]).per(50)
1717
end
1818

19+
# POST /users/:username/follow(.:format)
1920
def create
2021
apply_cache_buster
2122

app/controllers/home_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
class HomeController < ApplicationController
22
layout 'home4-layout'
3-
3+
# GET /welcome(.:format)
44
def index
55
return redirect_to destination_url, flash: flash if signed_in?
66
end

app/controllers/invitations_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
class InvitationsController < ApplicationController
22

3+
# GET /invitations/:id(.:format)
4+
# GET /i/:id/:r(.:format)
35
def show
46
@team = Team.find(params[:id])
57
invitation_failed! unless @team.has_user_with_referral_token?(params[:r])

app/controllers/networks_controller.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ class NetworksController < ApplicationController
77
respond_to :html, :json, :js
88
cache_sweeper :follow_sweeper, only: [:join, :leave]
99

10+
# GET /n(.:format)
1011
def index
1112
@index_networks_params = params.permit(:sort, :action)
1213

@@ -18,6 +19,7 @@ def index
1819
end
1920
end
2021

22+
#POST /n/:id/join(.:format)
2123
def join
2224
redirect_to_signup_if_unauthenticated(request.referer, 'You must login/signup to join a network') do
2325
return leave if current_user.member_of?(@network)
@@ -28,6 +30,7 @@ def join
2830
end
2931
end
3032

33+
# POST /n/:id/leave(.:format)
3134
def leave
3235
redirect_to_signup_if_unauthenticated(request.referer, 'You must login/signup to leave a network') do
3336
return join unless current_user.member_of?(@network)

app/controllers/opportunities_controller.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ def visit
6969
end
7070
header_ok
7171
end
72-
72+
73+
# GET /jobs(/:location(/:skill))(.:format)
7374
def index
7475
current_user.seen(:jobs) if signed_in?
7576
store_location! unless signed_in?
7677
chosen_location = (params[:location] || closest_to_user(current_user)).try(:titleize)
7778
chosen_location = nil if chosen_location == 'Worldwide'
78-
7979
@remote_allowed = params[:remote] == 'true'
8080

8181
@page = params[:page].try(:to_i) || 1
@@ -94,13 +94,14 @@ def index
9494
@lat, @lng = geocode_location(chosen_location)
9595

9696
respond_to do |format|
97-
format.html { render layout: 'jobs' }
97+
format.html { render layout: 'coderwallv2' }
9898
format.json { render json: @jobs.map(&:to_public_hash) }
9999
format.js
100100
end
101101

102102
end
103103

104+
# GET /jobs-map(.:format)
104105
def map
105106
@job_locations = all_job_locations
106107
@job_skills = all_job_skills

0 commit comments

Comments
 (0)