app/controllers/posts_controller.rb
#Must login to create/edit post
Must login to create/edit post
Must login to create / edit post
def authenticate
      authenticate_or_request_with_http_basic do |name, password|
        name == "admin" && password == "secret"
      end
    end
def authenticate authenticate_or_request_with_http_basic do | name , password | name == "admin" && password == "secret" end end
Must login to create/edit post
Must login to create / edit post
# TODO replace with a proper admin login