Skip to content

Commit

Permalink
refactor some view code into partial
Browse files Browse the repository at this point in the history
  • Loading branch information
lislis committed May 15, 2018
1 parent e8e2ee7 commit 41d2b30
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 37 deletions.
17 changes: 17 additions & 0 deletions app/views/groups/_meeting_info.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
%p
%strong 🗓️ When
- if group.time?
= group.time
- else
%span.info-not-given
not specified
%p
%strong 🏢 Meeting place
- if group.address?
= group.address
- else
%span.info-not-given
not specified
%p
%strong 🗺️ Address
= group_location(group)
19 changes: 2 additions & 17 deletions app/views/groups/_one_group.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,5 @@
- if group.searching_location
%span.tag
Searching for location
%p
%strong When:
- if group.time?
= group.time
- else
%span.info-not-given
not specified
%p
%strong Where:
- if group.address?
= group.address
- else
%span.info-not-given
not specified
%p
%strong Address:
= group_location(group)
= render 'meeting_info', group: group
19 changes: 2 additions & 17 deletions app/views/groups/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,8 @@
- else
= image_tag('/group-avatar.png', size: "100x100")
.profile-contact-sub
%p
%strong 🗓️ When
- if @group.time?
= @group.time
- else
%span.info-not-given
not specified
%p
%strong 🏢 Meeting place
- if @group.address?
= @group.address
- else
%span.info-not-given
not specified
%p
%strong 🗺️ Address
= group_location(@group)
= render 'meeting_info', group: @group

- if @group.contact?
%p
%strong 📮 Contact
Expand Down
2 changes: 1 addition & 1 deletion app/views/people/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
= render partial: "shared/website", locals: { object: @person }

.profile-working-on
.m-b-l
.m-b-l.working-on
- if @person.working_on?
%h2 Working on
%p= markdown(@person.working_on)
Expand Down
3 changes: 1 addition & 2 deletions spec/features/workshop_coach_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

require 'spec_helper'

feature 'workshop coach' do
Expand All @@ -18,7 +17,7 @@ def login_as_user
end

def coach_text
'I am willing to coach at Rails Girls workshops'
'I am willing to coach at'
end

def see_workshop_coach_text
Expand Down

0 comments on commit 41d2b30

Please sign in to comment.