Skip to content

[Rails5] Add `touch_later` to `Commit` model

What does this MR do?

This MR adds the touch_later method to the Commit model which fixes errors like:

1) API::Todos GET /todos when unauthenticated returns authentication error
    Failure/Error: @raw.__send__(method, *args, &block) # rubocop:disable GitlabSecurity/PublicSend
    
    NoMethodError:
      undefined method `touch_later' for #<Gitlab::Git::Commit:0x00005573f5196270>
    # ./app/models/commit.rb:259:in `method_missing'
    # ./spec/requests/api/todos_spec.rb:12:in `block (2 levels) in <top (required)>'

Are there points in the code the reviewer needs to double check?

No.

Why was this MR needed?

Migration to Rails 5.0

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

#14286 (closed) and !12841 (closed)

Merge request reports