일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
- Time.znoe.now
- Java
- MySQL
- 우분투 24
- 오랜지파이
- Migrate
- change_column_null
- Orange Pi 3B
- RUBY
- Ruby on Rails
- ubuntu
- after_save
- docker
- ruby #string #strip #split #gsub
- install
- bulma
- 주차장 시스템
- with_indifferent_access
- Visual Studio Code
- Kotlin
- Rails
- 설치
- 사용중인포트검색
- mac
- 쿠버네티스
- after_update
- 우분투
- 이것이 자바다
- change_column
- docket
- Today
- Total
목록RUBY (5)
중고 신입이 개발해보기..
ChatGPT 3.5의 검색결과 루비 온 레일즈(Ruby on Rails)에서 `after_update`와 `after_save`는 두 가지 다른 콜백 메서드입니다. 이 두 메서드는 ActiveRecord 모델의 생명주기 동안 특정 시점에 코드를 실행하도록 설계되어 있습니다. 1. `after_update` 콜백: - `after_update`는 ActiveRecord 객체가 업데이트된 후에 호출됩니다. - 이 메서드는 레코드가 이미 존재하고 업데이트가 수행된 경우에만 호출됩니다. - 레코드가 처음 생성될 때는 `after_update`가 호출되지 않습니다. 예를 들어: class YourModel < ApplicationRecord after_update :some_method private def s..
rbenv install --list brew upgrade ruby-build rbenv install 3.2.2 rbenv local 3.2.2 gem install rails -v 7.0.4.3 rails _7.0.4.3_ new palla -d mysql 최신 버전으로 모두 설치 보았다. ㅋㅋ
마이그레이션 # ./bin/rails db:migrate 롤백하기 # ./bin/rails db:rollback 마이그레이션 상태 보기 #./bin/rake db:migrate:status up 20200903071549 ********** NO FILE ********** up 20200903071603 ********** NO FILE ********** up 20201005053504 Create User up 20201012013519 ********** NO FILE ********** up 20201013012806 ********** NO FILE **********
https://medium.com/steady-study/%EB%A3%A8%EB%B9%84-mixin-include-prepend-extend-%EA%B7%B8%EB%A6%AC%EA%B3%A0-concern-e691c92fb233 루비 mixin: include, prepend, extend 그리고 Concern 루비에서 module을 mixin하면 다중 상속과 비슷한, 또는 더 풍부한 효과를 낼 수 있습니다. mixin과 ActiveSupport::Concern에 대해 알아봅시다. medium.com
루비 설치 https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rbenv-on-ubuntu-18-04 우분투에서 rbenv 업데이트하기 https://www.endpoint.com/blog/2015/11/03/updating-rbenv-ruby-build-on-ubuntu cd ~/.rbenv git pull cd ~/.rbenv/plugins/ruby-build/ git pull for MAC https://pie001.github.io/entry/blog/0017/https://rorlab.org/rblogs/214 for mac 업데이트 하기.. - 새로운 루비 버전이 나와서 세팅해야될때.. $ brew..