일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- mac
- 쿠버네티스
- 이것이 자바다
- docker
- change_column
- after_update
- Rails
- ubuntu
- 우분투 24
- 오랜지파이
- ruby #string #strip #split #gsub
- Migrate
- 우분투
- Orange Pi 3B
- RUBY
- 주차장 시스템
- Java
- Kotlin
- after_save
- MySQL
- 사용중인포트검색
- Time.znoe.now
- 설치
- docket
- with_indifferent_access
- install
- Ruby on Rails
- Visual Studio Code
- change_column_null
- 도커
- Today
- Total
목록전체 글 (112)
중고 신입이 개발해보기..
`before_save` 콜백에서 **저장 후의 값을 미리 확인하는 방법**은 해당 속성이 `변경될 예정인 값`을 포함하고 있기 때문에 단순히 `self.attribute_name`을 조회하면 됩니다. 하지만 변경 전의 값이 필요하다면 `attribute_was` 또는 `changes` 메서드를 사용해야 합니다.---## **🚀 변경 전후 값 확인하는 방법**### **1. `self.attribute_name` (변경 후 값)**- `before_save`에서 `self.attribute_name`을 조회하면 **저장될 값(변경 후 값)**이 나옵니다.```rubyclass User before_save :check_role_change private def check_role_change ..
var 와 val var : 변할 수 있는 수 (variable)의 약자, 내용을 재대입할수 잇다. .. 변수 val : 값(value)의 약자, 식별자의 값을 단 한번만 초기화할수 잇다.. 한번 초기회하면 변경할수 없다. val 변수는 불변(immutable)이다. Data Type CategoryBasic typesExample codeIntegersByte, Short, Int, Longval year: Int = 2020Unsigned integersUByte, UShort, UInt, ULongval score: UInt = 100uFloating-point numbersFloat, Doubleval currentTemp: Float = 24.5f, val price: Double = ..

visual studio code를 에디터로 사용한다. 간단하고... 기능이 좋다. 설치는.. 아래 사이트에서 받으면된다. https://code.visualstudio.com/ Visual Studio Code - Code Editing. RedefinedVisual Studio Code redefines AI-powered coding with GitHub Copilot for building and debugging modern web and cloud applications. Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows.code.visualstudio.com $ code..
현재 살고 있는 아파트는 방3 거실1 화장실2로 구성되어 있다. 현재 스마트홈으로 되어 있다.. 하지만~~ IOT를 이용하여 각방의 온도/습도를 측정하여 나의 홈서버로 데이터를 쌓아보자.. 서버구성 레일즈 문서 https://guides.rubyonrails.org/getting_started.html Getting Started with Rails — Ruby on Rails GuidesGetting Started with RailsThis guide covers getting up and running with Ruby on Rails.After reading this guide, you will know: How to install Rails, create a new Rails appli..
Rails에서 데이터 업데이트 시 유효성 검증(Validation)을 무시하고 저장하려면 `update` 대신 **`update_column`** 또는 `update_columns` 메서드를 사용하면 됩니다. 1. `update_column``update_column`은 단일 속성에 대해 유효성 검증 없이 데이터를 업데이트합니다. user = User.find(1)user.update_column(:name, "New Name")- 특징: - 유효성 검증이 무시됩니다. - 콜백(before_save, after_save 등)이 실행되지 않습니다. - `updated_at` 타임스탬프는 자동으로 업데이트됩니다.---2. `update_columns``update_columns`는 여러 속성을 유효성..
2024 12 18 기준으로 rails는 https://rubyonrails.org/2024/12/13/Rails-Version-8-0-1-has-been-released Rails Version 8.0.1 has been released!Hi everyone,rubyonrails.org 8.0.1이 릴리즈 되었다. ruby의 경우 https://www.ruby-lang.org/ko/news/2024/12/12/ruby-3-4-0-rc1-released/ Ruby 3.4.0 rc1 릴리스작성자: naruse (2024-12-12) 번역자: shia Ruby 3.4.0-rc1 릴리스를 알리게 되어 기쁩니다. Prism parse.y에서 Prism으로 기본 파서를 변경했습니다. [Feature #2056..
우분투에 도커설치는 정보가 많아서.. 검색하면 쉽게 알수 있다.. 순서되로 실행하면 설치가 완료된다. $ sudo apt-get update$ sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"$ sudo apt-get install docker..
docket curl -fsSL https://get.docker.com | sh k3s curl -sfL https://get.k3s.io | sh -s - --docker -disable=traefik --write-kubeconfig-mode=644 E0708 15:09:47.485583 136744 memcache.go:265] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refusedE0708 15:09:47.485940 136744 memcache.go:265] couldn't get curren..