add static page to user model#93
add static page to user model#93CLJoker wants to merge 1 commit intohellovietnam93:dao_bao_quang_20143564from
Conversation
Gemfile
Outdated
There was a problem hiding this comment.
sử dụng nháy kép thay cho nháy đơn
Gemfile
Outdated
There was a problem hiding this comment.
xóa tất cả comment trong file này
There was a problem hiding this comment.
file này k dùng thì xóa đi nhé
app/assets/javascripts/users.coffee
Outdated
There was a problem hiding this comment.
file này k dùng thì xóa đi
app/assets/stylesheets/custom.scss
Outdated
There was a problem hiding this comment.
1 dấu csh sau dấu : thôi nhé
app/views/static_pages/help.html.erb
Outdated
There was a problem hiding this comment.
cách ra trước và sau %
app/views/users/new.html.erb
Outdated
There was a problem hiding this comment.
xóa () + sử dụng nháy kép
app/views/users/new.html.erb
Outdated
app/views/users/show.html.erb
Outdated
config/routes.rb
Outdated
There was a problem hiding this comment.
xóa () 1 dấu cách để ngăn thôi nhé
app/controllers/users_controller.rb
Outdated
There was a problem hiding this comment.
ident, lùi so với dòng bên trên thôi
app/controllers/users_controller.rb
Outdated
There was a problem hiding this comment.
params.require(:user).permit :name ....
em k test code à?
app/views/static_pages/help.html.erb
Outdated
app/views/static_pages/home.html.erb
Outdated
| # Use Capistrano for deployment | ||
| # gem 'capistrano-rails', group: :development | ||
| gem "bcrypt", "3.1.7" | ||
|
|
There was a problem hiding this comment.
e xóa dòng này và các dòng 13, 15, 17, 19, 21, 23, 25, 27 nhé
app/helpers/users_helper.rb
Outdated
app/helpers/users_helper.rb
Outdated
app/views/layouts/_header.html.erb
Outdated
There was a problem hiding this comment.
thiếu khoảng trắng
viết đúng convention thì như này em nhé:
<%= link_to "Sample App", "#", id: "logo" %>
app/views/layouts/_shim.html.erb
Outdated
config/routes.rb
Outdated
There was a problem hiding this comment.
e xóa dòng này và các dòng 5, 7, 9, 11 nhé
config/routes.rb
Outdated
| # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) | ||
| # Character.create(name: 'Luke', movie: movies.first) | ||
| 10.times do |n| | ||
| User.create name: "User #{n}", email: "email-#{n}@gmail.com" |
There was a problem hiding this comment.
e xóa hết comment trong file này và sửa lại cách viết dòng này nhé:
User.create! name: "User #{n}", email: "email-#{n}@gmail.com"
app/views/static_pages/help.html.erb
Outdated
There was a problem hiding this comment.
ident, sao lại lùi vòa thé?
app/controllers/users_controller.rb
Outdated
sign up sign up + deleted folder static page readd fix fix second time fix time 3 fix time 4 fix time 5 fix 6 time
| end | ||
|
|
||
| gem "rails", "~> 5.0.2" | ||
|
|
| # See https://github.com/rails/execjs#readme for more supported runtimes | ||
| # gem 'therubyracer', platforms: :ruby | ||
| gem "bcrypt", "3.1.7" | ||
|
|
| <nav> | ||
| <ul> | ||
| <li><%= link_to "About", static_pages_about_path %></li> | ||
| <li><%= link_to "Contact", '#' %></li> |
| @@ -0,0 +1,11 @@ | |||
| <%provide :title, "Home"%> | |||
| This is the home page for the <a href="http://www.railstutorial.org/"> | ||
| Ruby on Rails Tutorial</a> sample application. | ||
| </h2> | ||
| <%= link_to "Sign up now!", "#", class: "btn btn-lg btn-primary"%> |
| # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) | ||
| # Character.create(name: 'Luke', movie: movies.first) | ||
| 10.times do |n| | ||
| User.create name: "User #{n}", email: "email-#{n}@gmail.com" |
There was a problem hiding this comment.
e thêm dấu chấm than ! ngay sau create nhé:
User.create! name: "User #{n}", email: "email-#{n}@gmail.com"
sign up
sign up + deleted folder static page