{"action":"closed","issue":{"url":"https://api.github.com/repos/bitzesty/qae/issues/279","labels_url":"https://api.github.com/repos/bitzesty/qae/issues/279/labels{/name}","comments_url":"https://api.github.com/repos/bitzesty/qae/issues/279/comments","events_url":"https://api.github.com/repos/bitzesty/qae/issues/279/events","html_url":"https://github.com/bitzesty/qae/issues/279","id":67109348,"number":279,"title":"Settings.current","user":{"login":"dreamfall","id":332810,"avatar_url":"https://avatars.githubusercontent.com/u/332810?v=3","gravatar_id":"","url":"https://api.github.com/users/dreamfall","html_url":"https://github.com/dreamfall","followers_url":"https://api.github.com/users/dreamfall/followers","following_url":"https://api.github.com/users/dreamfall/following{/other_user}","gists_url":"https://api.github.com/users/dreamfall/gists{/gist_id}","starred_url":"https://api.github.com/users/dreamfall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dreamfall/subscriptions","organizations_url":"https://api.github.com/users/dreamfall/orgs","repos_url":"https://api.github.com/users/dreamfall/repos","events_url":"https://api.github.com/users/dreamfall/events{/privacy}","received_events_url":"https://api.github.com/users/dreamfall/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-04-08T11:35:39Z","updated_at":"2015-04-20T12:20:25Z","closed_at":"2015-04-20T12:20:25Z","body":"@matthewford @jaleszek @RuslanHamidullin  \r\n\r\nWe use `Settings.current` to get current settings for the application. \r\n\r\n```ruby\r\n  def self.for_year(year)\r\n    where(year: year).first_or_create\r\n  end\r\n\r\n  def self.current\r\n    for_year(Date.current.year)\r\n  end\r\n```\r\n\r\nThe problem is that applications are being processed for a period that covers two years so we can not just use `Date.current.year`. Otherwise all settings that've been set up now won't be used after 01.01.2016. \r\nWe need to think of the way of detecting what award year is it. \r\n\r\n@matthewford @jaleszek @RuslanHamidullin "}}