설교 노트 CRUD
ID: 9f2af9b5-310a-47c2-a422-e1a2862344cd
## 목표
SermonNote 모델 생성 + 설교 노트 CRUD (목록/생성/상세/수정/삭제)
## 모델
### SermonNote
- user_id: UUID FK NOT NULL
- title: text NOT NULL
- sermon_date: date NOT NULL
- bible_book: string NOT NULL
- bible_book_abbrev: string NOT NULL
- start_chapter: integer NOT NULL
- start_verse: integer NOT NULL
- end_chapter: integer NULL
- end_verse: integer NULL
- passage_reference: text NOT NULL
- personal_meditation: text NULL
- action_plan: text NULL
- prayer_topics: text NULL
- ai_interpretation: text NULL
- highlights: text NULL (JSON)
- is_shared: boolean DEFAULT false
- mood_after: integer NULL (1-5)
## 컨트롤러
SermonsController: index, new, create, show, edit, update, destroy
- 페이지네이션 (pagy gem 또는 수동)
- 검색 (제목/성경구절)
- 날짜 필터
## 뷰
- app/views/sermons/ (index, new, show, edit, _form, _sermon_card)
- 성경구절 입력 UI (책/장/절 선택)
- 하이라이트 표시
## 라우트
resources :sermons
## 테스트
- 모델 테스트 (SermonNote validations)
- 컨트롤러 테스트 (전체 CRUD + 검색/페이지네이션)
첨부 이미지
이미지 추가 (Ctrl+V로 붙여넣기 또는 클릭)
JPEG, PNG, GIF, WebP / 최대 10MB
활동 로그
-
팀팀리드 상태 변경: 리뷰 → 완료
2026년 03월 02일 02:38:24
-
Ssermon-dev 상태 변경: 진행 중 → 리뷰
2026년 03월 02일 02:38:17
-
Ssermon-dev 설교 노트 CRUD 구현 완료
2026년 03월 02일 02:38:17
상세 보기
## 변경 사항
### 생성된 파일
- `db/migrate/20260302120000_create_sermon_notes.rb` - SermonNote 테이블 마이그레이션
- `app/models/sermon_note.rb` - 모델 (validations, scopes, belongs_to)
- `app/controllers/sermons_controller.rb` - CRUD 컨트롤러 (인증, 소유권 검증, 검색, 페이지네이션)
- `app/views/sermons/index.html.erb` - 목록 뷰 (검색, 월별 필터, 페이지네이션)
- `app/views/sermons/show.html.erb` - 상세 뷰
- `app/views/sermons/new.html.erb` - 새 노트 폼
- `app/views/sermons/edit.html.erb` - 수정 폼
- `app/views/sermons/_form.html.erb` - 공통 폼 파셜
- `app/views/sermons/_sermon_card.html.erb` - 카드 파셜
- `test/models/sermon_note_test.rb` - 모델 테스트 (22건)
- `test/controllers/sermons_controller_test.rb` - 컨트롤러 테스트 (17건)
- `test/fixtures/sermon_notes.yml` - 테스트 픽스처 (3건)### 수정된 파일
- `app/models/user.rb` - `has_many :sermon_notes, dependent: :destroy` 추가## 테스트 결과
- 전체 테스트: 215 runs, 506 assertions, 0 failures, 0 errors
- Rubocop: 내 코드 0 offenses
- Brakeman: 내 코드 0 security warnings## 주요 기능
- sanitize_sql_like로 SQL injection 방지
- UUID PK 사용
- 수동 페이지네이션 (offset/limit)
- 소유권 기반 접근 제어 (current_user.sermon_notes.find)
- 기분(mood) 이모지 표시 (1-5)
- 검색 (제목/성경구절), 월별 필터 -
Ssermon-dev 설교 노트 CRUD 작업 시작
2026년 03월 02일 02:32:32
상세 보기
## 작업 계획
1. SermonNote 마이그레이션 + 모델 생성
2. Model 테스트 → 구현 (TDD)
3. Controller 테스트 → 구현 (TDD)
4. 뷰 구현 (shared partials 활용)
5. Fixtures 생성
6. bin/ci 전체 통과 확인 -
Ssermon-dev 티켓 클레임 완료
2026년 03월 02일 02:32:26