{"action":"closed","issue":{"url":"https://api.github.com/repos/Steve998/Assignments/issues/44","labels_url":"https://api.github.com/repos/Steve998/Assignments/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/Steve998/Assignments/issues/44/comments","events_url":"https://api.github.com/repos/Steve998/Assignments/issues/44/events","html_url":"https://github.com/Steve998/Assignments/issues/44","id":59507728,"number":44,"title":"Using Memoization, Scopes, Flash, and Authorization","user":{"login":"brianburridge","id":62898,"avatar_url":"https://avatars.githubusercontent.com/u/62898?v=3","gravatar_id":"","url":"https://api.github.com/users/brianburridge","html_url":"https://github.com/brianburridge","followers_url":"https://api.github.com/users/brianburridge/followers","following_url":"https://api.github.com/users/brianburridge/following{/other_user}","gists_url":"https://api.github.com/users/brianburridge/gists{/gist_id}","starred_url":"https://api.github.com/users/brianburridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianburridge/subscriptions","organizations_url":"https://api.github.com/users/brianburridge/orgs","repos_url":"https://api.github.com/users/brianburridge/repos","events_url":"https://api.github.com/users/brianburridge/events{/privacy}","received_events_url":"https://api.github.com/users/brianburridge/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Steve998/Assignments/labels/activerecord","name":"activerecord","color":"ededed"},{"url":"https://api.github.com/repos/Steve998/Assignments/labels/assignment","name":"assignment","color":"ededed"},{"url":"https://api.github.com/repos/Steve998/Assignments/labels/authorization","name":"authorization","color":"ededed"},{"url":"https://api.github.com/repos/Steve998/Assignments/labels/models","name":"models","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-02T16:48:29Z","updated_at":"2015-04-16T15:23:22Z","closed_at":"2015-04-16T15:23:22Z","body":"_This is assignment 43 and is due on Mar 03, 2015._\n\n* [Read about memoization](http://www.justinweiss.com/blog/2014/07/28/4-simple-memoization-patterns-in-ruby-and-one-gem/)\r\n* Review the [ActiveRecord Scopes](http://guides.rubyonrails.org/active_record_querying.html#scopes) guide\r\n* Review using model scopes in [ActiveAdmin](http://activeadmin.info/docs/3-index-pages.html). Scroll down to the _Index Scopes_ section\r\n* Review my [troubleshooting guide](https://github.com/TIY-TSP-Rails-Fall2014/Assignments/blob/master/TroubleshootingGuide.md)\r\n* Read about the [Flash](http://guides.rubyonrails.org/action_controller_overview.html#the-flash)\r\n* Add three scopes to any model and implement in ActiveAdmin too\r\n* Scope all your user owned models (ex. pin and board), and use within your controller so your site cannot be hacked (denying other's from accessing records they don't own).\r\n* Add flash display on site (within layout). Use a flash notice when denying access to a record the user doesn't own. Note: once in the site wide layout, you'll want to remove the notice displays your scaffolding put in place, or you'll have them repeating on those pages.\r\n* Add an `admin` attribute to your user model. Restrict any admin only actions from your views."}}