Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From: /opt/gitlab/gitlab/gdk-ce/gitlab/lib/gitlab/i18n.rb @ line 61 Gitlab::I18n#with_user_locale:
- 60: def with_user_locale(user, &block)
- => 61: with_locale(user&.preferred_language, &block)
- 62: end
- [57] pry(Gitlab::I18n)> user
- => nil
- [58] pry(Gitlab::I18n)> show-source block
- From: /opt/gitlab/gitlab/.rvm/gems/ruby-2.5.3/gems/activesupport-5.0.7.1/lib/active_support/callbacks.rb
- Number of lines: 3
- user_callback.call(target, value) {
- run.call.value
- }
- [59] pry(Gitlab::I18n)> down
- From: /opt/gitlab/gitlab/gdk-ce/gitlab/lib/gitlab/i18n.rb @ line 54 Gitlab::I18n#with_locale:
- 51: def with_locale(locale_string)
- 52: original_locale = locale
- 53:
- => 54: self.locale = locale_string
- 55: yield
- 56: ensure
- 57: self.locale = original_locale
- 58: end
- [59] pry(Gitlab::I18n)>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement