Skip to content

Commit

Permalink
Merge branch 'release/0.14.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
kalashnikovisme committed Jan 29, 2017
2 parents 936e952 + 139f9f4 commit 9281c9a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
4 changes: 4 additions & 0 deletions app/models/member.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ def has_permission_to?(action, type)
Organization::Permissions.send(type)[action].map(&:id).include? self.id
end

def is_honorable?
merits.where(nomination: :first_degree).any?
end

private

def remove_empty_positions
Expand Down
10 changes: 6 additions & 4 deletions app/views/web/members/shared/_mic_userpic_circle.html.haml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
- if member.confirmed?
.mic-userpic-circle.link{ data: { href: member_path(member.ticket) }, style: "background-image: url(#{member.avatar})" }
.silver_icon
= image_tag 'organization/silver_icon.png'
- if member.is_honorable?
.silver_icon
= image_tag 'organization/silver_icon.png'
- else
.mic-userpic-circle{ style: "background-image: url(#{member.element_avatar})" }
.silver_icon
= image_tag 'organization/silver_icon.png'
- if member.is_honorable?
.silver_icon
= image_tag 'organization/silver_icon.png'
.name
- if member.confirmed?
%a.text{ href: member_path(member.ticket) }
Expand Down
7 changes: 7 additions & 0 deletions test/controllers/web/welcome_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,11 @@ class Web::WelcomeControllerTest < ActionController::TestCase
get :index
assert_response :success, @response.body
end

test 'should get index 100 times' do
100.times do
get :index
assert_response :success, @response.body
end
end
end

0 comments on commit 9281c9a

Please sign in to comment.