ACMUCSB/acm — Issue #5: Anonymous users can create posts
Author: andrewberls
Created: 2012-01-30 01:39:30+00:00
State: open

Lane brought up an issue where anonymous (not logged in) users are allowed to see the create new post form, which will throw up an error on submit due to the line `@post.user_id = @current_user.id`. A solution would be to modify `app/models/ability.rb` so that only logged in users can create posts, whereas everybody can read them. I put in a method skeleton for user.logged_in? but wasn't able to implement it.