Sabado 3

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

rails new auth

railsbundle
gem
g devise:install
'devise'
install

config/enviroments/development.rb

rails g controller welcome index

config/routes.rb

app/views/layout/application.html.erb

rails
rakegdb:migrate
devise user

localhost:3000/users/sign_up

current_user.email
current_user

app/views/layout/application.html.erb

<%= link_to "Logout", destroy_user_session_path, method: :delete %>

@#&%!!!!

user_signed_in

Generar un scaffold llamado post con los atributos:


titulo tipo string | Contenido tipo text

agregar en la vista index, del controllador welcome,


un enlace a un nuevo post

respond_to :html

before_filter :authenticate_user!

git init
git remote add origin git@github.com/misuarui/miproyecto
git add .
git commit -m Init repo
git push -u origin master
git pull -u origin master

You might also like