기본적인 문법 class PostsController < ApplicationControllerdef edit@post = Post.find(params[:id])if session[:user_id] != @post.user_idflash[:notice] = "Sorry, you can't edit this post"redirect_to post_pathendendend 대체가능한 문법class PostsController < ApplicationControllerdef edit@post = Post.find(params[:id])if session[:user_id] != @post.user_idredirect_to (post_path, notice: "Sorry, you can't edit this p..
기본 Create 문법 t = User.newt.name = "Jinny"t.phone = "01012341234"t.save 대체가능 Create 문법1t. = User.new(name: "Jinny"phone: "01012341234") t.save 대체가능 Create 문법2t = User.create(name: "Jinny", phone: "01012341234") 기본 Update 문법 t = User.find(3)t.name = "Jinny"t.phone = "01012341234"t.save 대체가능 Update 문법1t = User.find(3)t.attributes = {name: "Jinny"phone: "01012341234"} t.save 대체가능 Update 문법2t = User...
- Total
- Today
- Yesterday
- 이수페타시스
- OpenStack
- 프로그래밍
- 알고리즘
- Rails
- ubuntu
- install
- ruby
- Message Queue
- 주식투자
- SK하이닉스
- javascript
- html
- 반도체관련주
- 한미반도체
- codecademy
- ruby on rails
- 현대차
- 자료구조
- HBM
- Java
- 엔비디아
- 이펙티브 자바
- 웹프로그래밍
- 투자전략
- 삼성전자
- rabbitmq
- CSS
- 티스토리 초대장
- IT
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 |
