Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,6 @@ Rails/HasManyOrHasOneDependent:
- 'app/models/workshop.rb'
- 'app/models/workshop_invitation.rb'

# Offense count: 1
Rails/HelperInstanceVariable:
Exclude:
- 'app/helpers/email_helper.rb'

# Offense count: 2
# Configuration parameters: IgnoreScopes.
Rails/InverseOf:
Expand Down
7 changes: 0 additions & 7 deletions app/helpers/email_helper.rb

This file was deleted.

1 change: 0 additions & 1 deletion app/mailers/contact_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ class ContactMailer < ApplicationMailer
include EmailHeaderHelper

helper ApplicationHelper
helper EmailHelper

def subscription_notification(contact)
@contact = contact
Expand Down
8 changes: 0 additions & 8 deletions app/mailers/event_invitation_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,4 @@ def attending(event, member, invitation)

mail_to_member(member, subject, &:html)
end

private

helper do
def full_url_for(path)
"#{@host}#{path}"
end
end
end
6 changes: 0 additions & 6 deletions app/mailers/feedback_request_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,4 @@ def request_feedback(workshops, member, feedback_request)

mail_to_member(member, subject, &:html)
end

helper do
def full_url_for(path)
"#{@host}#{path}"
end
end
end
8 changes: 0 additions & 8 deletions app/mailers/meeting_invitation_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,4 @@ def attendance_reminder(meeting, member)
subject = "Reminder: You have a spot for #{@meeting.name} on #{humanize_date(@meeting.date_and_time)}"
mail_to_member(@member, subject, &:html)
end

private

helper do
def full_url_for(path)
"#{@host}#{path}"
end
end
end
2 changes: 0 additions & 2 deletions app/mailers/virtual_workshop_invitation_mailer.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
class VirtualWorkshopInvitationMailer < ApplicationMailer
include EmailHelper
include EmailHeaderHelper
include ApplicationHelper

helper ApplicationHelper
helper EmailHelper

def attending(workshop, member, invitation, waiting_list = false)
setup(workshop, invitation, member)
Expand Down
2 changes: 0 additions & 2 deletions app/mailers/workshop_invitation_mailer.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
class WorkshopInvitationMailer < ApplicationMailer
include EmailHelper
include EmailHeaderHelper
include ApplicationHelper

helper ApplicationHelper
helper EmailHelper

def attending(workshop, member, invitation, waiting_list = false)
@workshop = WorkshopPresenter.new(workshop)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Hi #{@contact.name},
%p
You have been subscribed to codebar's sponsors mailing list. To opt-out follow the link below:
%br
=link_to 'Update subscription preferences', full_url_for(contact_preferences_url(token: @contact.token)), class: 'btn'
=link_to 'Update subscription preferences', contact_preferences_url(token: @contact.token), class: 'btn'
2 changes: 1 addition & 1 deletion app/views/event_invitation_mailer/attending.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#{@event.name}
%br
%small #{humanize_date(@event.date_and_time, @event.ends_at, with_time: true)}
= link_to 'Update your attendance', full_url_for(event_invitation_url(@event.id, @invitation.token)), class: 'btn'
= link_to 'Update your attendance', event_invitation_url(@event.id, @invitation.token), class: 'btn'

.content
%table
Expand Down
2 changes: 1 addition & 1 deletion app/views/event_invitation_mailer/invite_coach.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#{@event.name}
%p
#{humanize_date(@event.date_and_time, @event.ends_at, with_time: true)}
= link_to 'View invitation and RSVP', full_url_for(event_invitation_url(event_id: @event.slug, token: @invitation.token)), class: 'btn'
= link_to 'View invitation and RSVP', event_invitation_url(event_id: @event.slug, token: @invitation.token), class: 'btn'

- if @event.venue.present?
.content
Expand Down
2 changes: 1 addition & 1 deletion app/views/event_invitation_mailer/invite_student.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#{@event.name}
%p
#{humanize_date(@event.date_and_time, @event.ends_at, with_time: true)}
= link_to 'View invitation and RSVP', full_url_for(event_invitation_url(event_id: @event.slug, token: @invitation.token)), class: 'btn'
= link_to 'View invitation and RSVP', event_invitation_url(event_id: @event.slug, token: @invitation.token), class: 'btn'

- if @event.venue.present?
.content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
%tr
%td
%p
=link_to "Submit feedback", full_url_for(feedback_url(@feedback_request.token)), class: 'btn'
=link_to "Submit feedback", feedback_url(@feedback_request.token), class: 'btn'

.content
= render partial: 'shared_mailers/social', locals: { workshop: @workshop }
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/email.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<div style="color: #111111; font-size: 15px; font-weight: 300; margin-top: 60px;">Despo</div>
<div style="color: #111111; font-size: 16px; font-weight: 600; margin-top: 5px;"><a href="http://codebar.io" style="color: #663095; text-decoration: none;">codebar</a></div>

<p style="color: #6d6a6a; font-size: 13px; font-weight: 600; margin-top: 90px;">If you dont want to receive these emails <%= link_to "unsubscribe", full_url_for(unsubscribe_url(member_token(@member))), style: "color: #a369d5; text-decoration: underline" %></p>
<p style="color: #6d6a6a; font-size: 13px; font-weight: 600; margin-top: 90px;">If you dont want to receive these emails <%= link_to "unsubscribe", unsubscribe_url(member_token(@member)), style: "color: #a369d5; text-decoration: underline" %></p>
</div>

<div style="width: 100%; height: 40px; background-color: #f6f4f8;"></div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared_mailers/_footer.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
%tr
%td{ align: "center" }
%p
%a{ href: full_url_for(unsubscribe_url(member_token(@member))) }
%a{ href: unsubscribe_url(member_token(@member)) }
%unsubscribe Unsubscribe
%td
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
%td
%h4
%small #{humanize_date(@workshop.date_and_time, @workshop.ends_at, with_time: true)}
= link_to 'Update or cancel your attendance', full_url_for(invitation_url(@invitation)), class: 'btn'
= link_to 'Update or cancel your attendance', invitation_url(@invitation), class: 'btn'

.content
%table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
%td
%h4
%small #{humanize_date(@workshop.date_and_time, @workshop.ends_at, with_time: true)}
= link_to 'Update or cancel your attendance', full_url_for(invitation_url(@invitation)), class: 'btn'
= link_to 'Update or cancel your attendance', invitation_url(@invitation), class: 'btn'

.content
%table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
=@workshop.to_s
%br
%small #{humanize_date(@workshop.date_and_time, @workshop.ends_at, with_time: true)}
= link_to 'View invitation and RSVP', full_url_for(invitation_url(@invitation)), class: 'btn'
= link_to 'View invitation and RSVP', invitation_url(@invitation), class: 'btn'
%td{ width: '40%', style: 'vertical-align: top;'}
- if @workshop.sponsors.any?
%h4 Sponsored by
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
%p.lead
We’re excited to invite you to our next #{@workshop.chapter.name} virtual workshop.
%p
As part of our workshops, you’ll get to work through any of our #{link_to 'tutorials', 'http://codebar.github.io/tutorials' } or receive guidance on your personal project. We believe that everyone should be entitled to free learning and our community has #{ link_to 'a lot of devoted developers', full_url_for(coaches_url)} who help out as coaches.
As part of our workshops, you’ll get to work through any of our #{link_to 'tutorials', 'http://codebar.github.io/tutorials' } or receive guidance on your personal project. We believe that everyone should be entitled to free learning and our community has #{ link_to 'a lot of devoted developers', coaches_url} who help out as coaches.
%p You will also get the opportunity to interact with other people interested in coding and collaborate with them.
%p <strong>Please note:</strong> We do not accept any RSVPs over email.

Expand All @@ -29,7 +29,7 @@
=@workshop.to_s
%br
%small #{humanize_date(@workshop.date_and_time, @workshop.ends_at, with_time: true)}
= link_to 'View invitation and RSVP', full_url_for(invitation_url(@invitation)), class: 'btn'
= link_to 'View invitation and RSVP', invitation_url(@invitation), class: 'btn'
%td{ width: '40%', style: 'vertical-align: top;'}
- if @workshop.sponsors.any?
%h4 Sponsored by
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
so you should keep keep an eye on your emails during the afternoon on the day of the workshop.
%p
Alternatively, if you know you can no longer make it, please
= link_to 'remove yourself from the waiting list', full_url_for(invitation_url(@invitation))
= link_to 'remove yourself from the waiting list', invitation_url(@invitation)
so someone else can take part in the workshop.

.content
%table{ bgcolor: '#FFFFFF' }
%tr
%td
%p #{humanize_date(@workshop.date_and_time, @workshop.ends_at, with_time: true)}
= link_to 'Update or cancel your attendance', full_url_for(invitation_url(@invitation)), class: 'btn'
= link_to 'Update or cancel your attendance', invitation_url(@invitation), class: 'btn'

.content
%table
Expand Down
2 changes: 1 addition & 1 deletion app/views/workshop_invitation_mailer/attending.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
%h4
Workshop
%p #{humanize_date(@workshop.date_and_time, @workshop.ends_at, with_time: true)}
= link_to 'Update your attendance', full_url_for(invitation_url(@invitation)), class: 'btn'
= link_to 'Update your attendance', invitation_url(@invitation), class: 'btn'
- if @workshop.description.present?
%p{ style: 'margin-top: 10px;' }
%strong Description:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
Workshop
%br
%p #{humanize_date(@workshop.date_and_time, @workshop.ends_at, with_time: true)}
= link_to 'Update your attendance', full_url_for(invitation_url(@invitation)), class: 'btn'
= link_to 'Update your attendance', invitation_url(@invitation), class: 'btn'
- if @workshop.description.present?
%p{ style: 'margin-top: 10px;' }
%strong Description:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
Workshop
%br
%small #{humanize_date(@workshop.date_and_time, @workshop.ends_at, with_time: true)}
= link_to 'View invitation and RSVP', full_url_for(invitation_url(@invitation)), class: 'btn'
= link_to 'View invitation and RSVP', invitation_url(@invitation), class: 'btn'
- if @workshop.description.present?
%p{ style: 'margin-top: 15px;' }
%strong Description:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
Workshop
%br
%small #{humanize_date(@workshop.date_and_time, @workshop.ends_at, with_time: true)}
= link_to 'View invitation and RSVP', full_url_for(invitation_url(@invitation)), class: 'btn'
= link_to 'View invitation and RSVP', invitation_url(@invitation), class: 'btn'
- if @workshop.description.present?
%p{ style: 'margin-top: 15px;' }
%strong Description:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
Workshop
%br
%p #{humanize_date(@workshop.date_and_time, @workshop.ends_at, with_time: true)}
= link_to 'Update your attendance', full_url_for(invitation_url(@invitation)), class: 'btn'
= link_to 'Update your attendance', invitation_url(@invitation), class: 'btn'

.content
%table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
%strong Attendees often drop out at short notice, so you should keep an eye on your emails during the afternoon on the day of the workshop.
%p
Alternatively, if you can no longer make it, you should
= link_to 'remove yourself from the waiting list', full_url_for(invitation_url(@invitation))
= link_to 'remove yourself from the waiting list', invitation_url(@invitation)
so someone else can come to the workshop.

.content
Expand All @@ -31,7 +31,7 @@
Workshop
%br
%small #{humanize_date(@workshop.date_and_time, @workshop.ends_at, with_time: true)}
= link_to 'Update your attendance', full_url_for(invitation_url(@invitation)), class: 'btn'
= link_to 'Update your attendance', invitation_url(@invitation), class: 'btn'
%td{ width: '40%', style: 'vertical-align: top;'}
%h4
Venue
Expand Down