Commit 5ad6e140 by Đường Sỹ Hoàng

Fixed coding styles

parent 4348edea
......@@ -4,12 +4,12 @@ class ApplicationController < ActionController::Base
private
# Confirms a logged-in user.
def logged_in_user
unless logged_in?
store_location
flash[:danger] = "Please log in."
redirect_to login_url
end
# Confirms a logged-in user.
def logged_in_user
unless logged_in?
store_location
flash[:danger] = "Please log in."
redirect_to login_url
end
end
end
class Micropost < ApplicationRecord
belongs_to :user
default_scope -> { order(created_at: :desc) }
mount_uploader :picture, PictureUploader
belongs_to :user
validates :user_id, presence: true
validates :content, presence: true, length: { maximum: 140 }
validate :picture_size
......
......@@ -17,8 +17,8 @@
</div>
</div>
<% else %>
<div class="center jumbotron">
<h1>Welcome to the Sample App</h1>
<div class="center jumbotron">
<h1>Welcome to the Sample App</h1>
<h2>
This is the home page for the
......
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