This is a sample rails 4.0 app that allows
-
Users and Admins to register (there is a admin toggle on the registration form for testing, obviously this would be removed for a production site)
-
Once users are login they can CRUD notes
-
Admins can CRUD Terms and Conditions
-
When users login they must accept all terms and conditions before being able to creat notes
Currently a double select is used to determine what terms and conditions have not been accepted by a user. However postgres required a CAST to int on the inner select query before it could be sent to the outer query. I’m sure there is a more railsy way to do this.
Hosted for a limited to at dry-crag-9245.herokuapp.com/terms_and_conditions