Okay... let's compare.
```haml
-# created_by user link
- if @ticket.created_by_user
  - created_by = link_to(@ticket.created_by_user.login, user_overview_path(@ticket.created_by_user))
- else
  - created_by = t(:anonymous)

- # regarding user link
- if admin?
  - if @ticket.regarding_user_actual_user
    - regarding_user_link = link_to @ticket.regarding_user_actual_user.login, user_overview_path(@ticket.regarding_user_actual_user)
  - else
    - regarding_user_link = "(#{t(:unknown)})"
- else
  - regarding_user_link = ''
```

```ruby
def created_by_user_link
  if user = @ticket.created_by_user
    link_to(user.login, user_overview_path(user))
  else
    t(:anonymous)
  end
end

def regarding_user_link
  return "" unless admin?
  if user = @ticket.regarding_user_actual_user
    link_to(user.login, user_overview_path(user))
  else
    "(#{t(:unknown)})"
  end
end
```

So here's what I think this get's us:
* use local variables like `user` in the functions without them conflicting.
* simply return the result instead of repeating the `regarding_user_link = ...`
* return and know the remaining code will not be executed - instead of nesting two `if` blocks like with `admin?`
* no more minuses at the beginning of each line. This indicates we are writing ruby and not ruby inside haml. So we could break up lines if we wanted.