Skip to content

Commit d1d5529

Browse files
committed
corrected the missing csrf meta tag on application.html.erb
1 parent 8d2d5da commit d1d5529

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

app/controllers/sessions_controller.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ class SessionsController < ApplicationController
33
def new
44
end
55

6-
def create
7-
6+
def create
87
user = User.find_by(email: params[:session][:email].downcase)
98
if user && user.authenticate(params[:session][:password])
109
if user.activated?

app/views/layouts/application.html.erb

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<%= render 'layouts/shim' %>
77
</head>
88
<body>
9+
<%= csrf_meta_tags %>
910
<%= render 'layouts/header' %>
1011
<div class="container">
1112
<% flash.each do |message_type, message| %>

app/views/users/_unfollow.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
<%= form_for(current_user.active_relationships.find_by(followed_id: @user.id), html: { method: :delete }, remote: true) do |f| %> %>
1+
<%= form_for(current_user.active_relationships.find_by(followed_id: @user.id), html: { method: :delete }, remote: true) do |f| %>
22
<%= f.submit "Unfollow", class: "btn" %>
33
<% end %>

0 commit comments

Comments
 (0)