Andrew Tomaka
d3dd0ff848
Notes on closing subcreddit: This doesn't seem great. Would be slightly better if closed could be referenced as true or false instead of '0' or '1' in the model. Testing this is a bit messy, but Tiemcop makes it a bit better. Notes on subcreddit validations: This is still not ideal. For starters, from http://guides.rubyonrails.org/active_record_validations.html: "Note that some databases are configured to perform case-insensitive searches anyway." It also seems difficult to validate fields that are set in before_save since validations occur before callbacks. Revisit this (perhaps friendly_id wll save us).
18 lines
675 B
Text
18 lines
675 B
Text
.navbar.navbar-default.navbar-static-top
|
|
.container-fluid
|
|
.navbar-header
|
|
button.navbar-toggle.collapsed type='button' data-toggle='collapse' data-target='.navbar-collapse'
|
|
span.sr-only Toggle navigation
|
|
span.icon-bar
|
|
span.icon-bar
|
|
span.icon-bar
|
|
= link_to 'Creddit', root_path, class: 'navbar-brand'
|
|
.collapse.navbar-collapse
|
|
ul.nav.navbar-nav
|
|
li= link_to 'Subcreddits', subcreddits_path
|
|
ul.nav.navbar-nav.navbar-right
|
|
- if logged_in?
|
|
li= link_to 'Sign Out', signout_path
|
|
- else
|
|
li= link_to 'Create Account', signup_path
|
|
li= link_to 'Sign In', signin_path
|