Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Commit

Permalink
Merge pull request #183 from omu/develop
Browse files Browse the repository at this point in the history
Merge develop into master
  • Loading branch information
msdundar authored Aug 5, 2018
2 parents 6589569 + 178ccc9 commit 1473f85
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/controllers/account/identities_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def set_identity
def set_elapsed_time
formal_identity = current_user.identities.user_identity
return if formal_identity.blank?
elapsed_time(formal_identity.first)
elapsed_time(formal_identity)
end

def redirect_with(message)
Expand Down
1 change: 1 addition & 0 deletions app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def create
def edit; end

def update
@user.slug = nil if user_params[:email].present?
@user.update_without_password(user_params) ? redirect_with('.success') : render(:edit)
end

Expand Down
2 changes: 1 addition & 1 deletion app/jobs/kps_identity_save_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def perform(user, student_id = nil)
end

# callbacks
after_perform do |_job|
after_perform do |job|
response = @response.merge(student_id: @student_id)
formal_address = job.arguments.first.identities.formal
formal_address.present? ? formal_address.update(response) : formal_address.create(response)
Expand Down
2 changes: 2 additions & 0 deletions app/services/kps/omu/kimlik.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ def initialize
def sorgula(queried_id_number)
make_request(queried_id_number)

raise IdNumberError if @response[:hata_bilgisi].present?

err_args = %i[kisi_bilgisi hata_bilgisi aciklama]
id_info_args = %i[kisi_bilgisi temel_bilgisi]
marital_info_args = %i[kisi_bilgisi durum_bilgisi]
Expand Down
4 changes: 2 additions & 2 deletions app/views/home/components/_membership_notifications.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
<hr>
<% unless current_user.addresses.any? %>
<div class="alert alert-warning" role="alert">
<small class="text-muted"><%= link_to t('.address_information'), new_address_path %> <%= t('.seems_missing') %></small>
<small class="text-muted"><%= link_to t('.address_information'), addresses_path %> <%= t('.seems_missing') %></small>
</div>
<% end %>
<% unless current_user.identities.any? %>
<div class="alert alert-warning" role="alert">
<small class="text-muted"><%= link_to t('.identity_information'), new_identity_path %> <%= t('.seems_missing') %></small>
<small class="text-muted"><%= link_to t('.identity_information'), identities_path %> <%= t('.seems_missing') %></small>
</div>
<% end %>
</div>
Expand Down
4 changes: 1 addition & 3 deletions app/views/users/_addresses.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
<td>
<span class="badge badge-secondary">
<%= fa_icon('gavel', text: t('activerecord.enums.address.names.formal')) if address.formal? %>
<%= fa_icon('home', text: t('activerecord.enums.address.names.home')) if address.home? %>
<%= fa_icon('building', text: t('activerecord.enums.address.names.work')) if address.work? %>
<%= fa_icon('address-book', text: t('activerecord.enums.address.names.other')) if address.other? %>
<%= fa_icon('address-book', text: t('activerecord.enums.address.names.other')) if address.informal? %>
</span>
</td>
</tr>
Expand Down

0 comments on commit 1473f85

Please sign in to comment.