Commit e4cbd8cd by Đường Sỹ Hoàng

Fixed indetation, double quote

parent 0b5679e5
...@@ -201,4 +201,4 @@ input { ...@@ -201,4 +201,4 @@ input {
padding: 10px 0; padding: 10px 0;
border-bottom: 1px solid $gray-lighter; border-bottom: 1px solid $gray-lighter;
} }
} }
\ No newline at end of file
...@@ -71,5 +71,4 @@ user ...@@ -71,5 +71,4 @@ user
@user = User.find(params[:id]) @user = User.find(params[:id])
redirect_to(root_url) unless current_user?(@user) redirect_to(root_url) unless current_user?(@user)
end end
end end
...@@ -59,5 +59,3 @@ module SessionsHelper ...@@ -59,5 +59,3 @@ module SessionsHelper
session[:forwarding_url] = request.original_url if request.get? session[:forwarding_url] = request.original_url if request.get?
end end
end end
...@@ -9,4 +9,4 @@ ...@@ -9,4 +9,4 @@
<%= f.label :password_confirmation %> <%= f.label :password_confirmation %>
<%= f.password_field :password_confirmation, class: "form-control" %> <%= f.password_field :password_confirmation, class: "form-control" %>
<%= f.submit yield(:button_text), class: "btn btn-primary" %> <%= f.submit yield(:button_text), class: "btn btn-primary" %>
<% end %> <% end %>
\ No newline at end of file
...@@ -4,4 +4,4 @@ ...@@ -4,4 +4,4 @@
<% if current_user.admin? && !current_user?(user) %> <% if current_user.admin? && !current_user?(user) %>
| <%= link_to "delete", user, method: :delete,data: {confirm: "You sure?" } %> | <%= link_to "delete", user, method: :delete,data: {confirm: "You sure?" } %>
<% end %> <% end %>
</li> </li>
\ No newline at end of file
...@@ -7,4 +7,4 @@ ...@@ -7,4 +7,4 @@
<%= render @users %> <%= render @users %>
<% end %> <% end %>
</ul> </ul>
<%= will_paginate %> <%= will_paginate %>
\ No newline at end of file
<!-- <% provide(:title, "Sign up") %>
<h1>Sign up</h1>
<div class="row">
<div class="col-md-6 col-md-offset-3">
<%= form_for(@user) do |f| %>
<%= render "shared/error_messages" %>
<%= f.label :name %>
<%= f.text_field :name, class: "form-control" %>
<%= f.label :email %>
<%= f.email_field :email, class: "form-control" %>
<%= f.label :password %>
<%= f.password_field :password, class: "form-control" %>
<%= f.label :password_confirmation, "Confirmation" %>
<%= f.password_field :password_confirmation, class: "form-control" %>
<%= f.submit "Create my account", class: "btn btn-primary" %>
<% end %>
</div>
</div> -->
<% provide(:title, 'Sign up') %> <% provide(:title, 'Sign up') %>
<% provide(:button_text, 'Create my account') %> <% provide(:button_text, 'Create my account') %>
<h1>Sign up</h1> <h1>Sign up</h1>
...@@ -24,4 +5,4 @@ ...@@ -24,4 +5,4 @@
<div class="col-md-6 col-md-offset-3"> <div class="col-md-6 col-md-offset-3">
<%= render 'form' %> <%= render 'form' %>
</div> </div>
</div> </div>
\ No newline at end of file
...@@ -4,4 +4,4 @@ name = Faker::Name.name ...@@ -4,4 +4,4 @@ name = Faker::Name.name
email = "example-#{n+1}@railstutorial.org" email = "example-#{n+1}@railstutorial.org"
password = "password" password = "password"
User.create!(name: name,email: email,password:password,password_confirmation: password) User.create!(name: name,email: email,password:password,password_confirmation: password)
end end
\ No newline at end of file
...@@ -24,4 +24,4 @@ user_<%= n %>: ...@@ -24,4 +24,4 @@ user_<%= n %>:
name: <%= "User #{n}" %> name: <%= "User #{n}" %>
email: <%= "user-#{n}@example.com" %> email: <%= "user-#{n}@example.com" %>
password_digest: <%= User.digest('password') %> password_digest: <%= User.digest('password') %>
<% end %> <% end %>
\ No newline at end of file
...@@ -41,4 +41,4 @@ class UsersEditTest < ActionDispatch::IntegrationTest ...@@ -41,4 +41,4 @@ class UsersEditTest < ActionDispatch::IntegrationTest
assert_equal name, @user.name assert_equal name, @user.name
assert_equal email, @user.email assert_equal email, @user.email
end end
end end
\ No newline at end of file
...@@ -27,4 +27,4 @@ class UsersIndexTest < ActionDispatch::IntegrationTest ...@@ -27,4 +27,4 @@ class UsersIndexTest < ActionDispatch::IntegrationTest
get users_path get users_path
assert_select "a", text: "delete", count: 0 assert_select "a", text: "delete", count: 0
end end
end end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment