mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-16 21:24:05 +00:00
style: if ! changed by unless
- if ! changed by unless as it is more readable - !object.blank? is equivalent to object.present?, also more readable
This commit is contained in:
parent
96155eb87f
commit
7e5d20c89d
18 changed files with 27 additions and 28 deletions
|
|
@ -103,7 +103,7 @@ module Admin
|
|||
comment.commentable = @event
|
||||
comment.user_id = current_user.id
|
||||
comment.save!
|
||||
if !params[:parent].nil?
|
||||
unless params[:parent].nil?
|
||||
comment.move_to_child_of(params[:parent])
|
||||
end
|
||||
|
||||
|
|
@ -202,7 +202,7 @@ module Admin
|
|||
|
||||
def get_event
|
||||
@event = @conference.program.events.find(params[:id])
|
||||
if !@event
|
||||
unless @event
|
||||
redirect_to admin_conference_program_events_path(conference_id: @conference.short_title),
|
||||
error: 'Error! Could not find event!'
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue