use gem angularjs-rails
prepare to use angular in the index template
bind a text field to some model data
make a form with one text field and display what we type in text field bellow this
display a list of the initial raffler entries in the index template
display a new entry in the list upon submitting the form
mark an entry as a winner
highlight the last draw winner in red
select winner only from non-winner entries
set an resource entry and make an json api for this resource on rails side
pass the resource service as an argument in our controller(an object that allows us to comunicate with the REST API), if we pass an entry object that has an id assigned is going to be used in url, otherwise url will be '/entries'
default resource service handle the most of the REST actions but not update action so must be defined in the second hash options
populate the list of entries with entries provided by rails json api
added entries and if he is a winner will be persisted in database
refactor resources into services
rewrite the raffler.js.cofee for production environment, otherwise the previous refactoring will fail in production due to minifying scripts
another way to not have screwed by minifying javascript code in production
documentation