Compare commits
	
		
			1 Commits
		
	
	
		
			a142321354
			...
			fc9911abf4
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| fc9911abf4 | 
| @ -1,5 +1,7 @@ | |||||||
| # Copyright (C) 2024-2025 LibreWeddingPlanner contributors | # Copyright (C) 2024-2025 LibreWeddingPlanner contributors | ||||||
| 
 | 
 | ||||||
|  | # frozen_string_literal: true | ||||||
|  | 
 | ||||||
| class WebsitesController < ApplicationController | class WebsitesController < ApplicationController | ||||||
|   def show |   def show | ||||||
|     render json: current_tenant.website.as_json(only: %i[content]) || {}, status: :ok |     render json: current_tenant.website.as_json(only: %i[content]) || {}, status: :ok | ||||||
| @ -16,6 +18,6 @@ class WebsitesController < ApplicationController | |||||||
|   private |   private | ||||||
| 
 | 
 | ||||||
|   def website_params |   def website_params | ||||||
|     params.require(:website).permit(:content) |     params.expect(website: [:content]) | ||||||
|   end |   end | ||||||
| end | end | ||||||
|  | |||||||
| @ -1,5 +1,7 @@ | |||||||
| # Copyright (C) 2024-2025 LibreWeddingPlanner contributors | # Copyright (C) 2024-2025 LibreWeddingPlanner contributors | ||||||
| 
 | 
 | ||||||
|  | # frozen_string_literal: true | ||||||
|  | 
 | ||||||
| # == Schema Information | # == Schema Information | ||||||
| # | # | ||||||
| # Table name: websites | # Table name: websites | ||||||
|  | |||||||
| @ -1,8 +1,10 @@ | |||||||
| # Copyright (C) 2024-2025 LibreWeddingPlanner contributors | # Copyright (C) 2024-2025 LibreWeddingPlanner contributors | ||||||
| 
 | 
 | ||||||
|  | # frozen_string_literal: true | ||||||
|  | 
 | ||||||
| FactoryBot.define do | FactoryBot.define do | ||||||
|   factory :website do |   factory :website do | ||||||
|     content { "MyText" } |     content { 'MyText' } | ||||||
|     wedding { nil } |     wedding { nil } | ||||||
|   end |   end | ||||||
| end | end | ||||||
|  | |||||||
| @ -1,7 +1,9 @@ | |||||||
| # Copyright (C) 2024-2025 LibreWeddingPlanner contributors | # Copyright (C) 2024-2025 LibreWeddingPlanner contributors | ||||||
| 
 | 
 | ||||||
|  | # frozen_string_literal: true | ||||||
|  | 
 | ||||||
| require 'rails_helper' | require 'rails_helper' | ||||||
| 
 | 
 | ||||||
| RSpec.describe Website, type: :model do | RSpec.describe Website do | ||||||
|   it { should belong_to(:wedding) } |   it { is_expected.to belong_to(:wedding) } | ||||||
| end | end | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user