Skip to content

Commit

Permalink
[CodeFactor] Apply fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
code-factor committed Apr 7, 2021
1 parent d44b854 commit 02f47b5
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions app/controllers/spina/admin/conferences/conferences_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ module Conferences
class ConferencesController < ApplicationController
PARTS_PARAMS = [
:name, :title, :type, :content, :filename, :signed_blob_id, :alt, :attachment_id, :image_id,
{ images_attributes: %i[filename signed_blob_id image_id alt],
content_attributes: [
:name, :title,
{ parts_attributes: [
:name, :title, :type, :content, :filename, :signed_blob_id, :alt, :attachment_id, :image_id,
{ images_attributes: %i[filename signed_blob_id image_id alt] }
] }
] }
images_attributes: %i[filename signed_blob_id image_id alt],
content_attributes: [
:name, :title,
parts_attributes: [
:name, :title, :type, :content, :filename, :signed_blob_id, :alt, :attachment_id, :image_id,
images_attributes: %i[filename signed_blob_id image_id alt]
]
]
].freeze
CONTENT_PARAMS = Spina.config.locales.inject({}) { |params, locale| params.merge("#{locale}_content_attributes": [*PARTS_PARAMS]) }
PARAMS = [:start_date, :finish_date, :name, { **CONTENT_PARAMS,
events_attributes: %i[id name start_datetime finish_datetime description location] }].freeze
PARAMS = [:start_date, :finish_date, :name, **CONTENT_PARAMS,
events_attributes: %i[id name start_datetime finish_datetime description location] ].freeze
PARTS = %w[text submission_url submission_email_address submission_date submission_text gallery sponsors].freeze

before_action :set_conference, only: %i[edit update destroy]
Expand Down

0 comments on commit 02f47b5

Please sign in to comment.