Remove: #55 アンテナ新規作成ボタンを除去
This commit is contained in:
parent
15fafb5860
commit
31d2eb7a4d
5 changed files with 0 additions and 38 deletions
|
@ -12,28 +12,8 @@ class AntennasController < ApplicationController
|
|||
@antennas = current_account.antennas.includes(:antenna_domains).includes(:antenna_tags).includes(:antenna_accounts)
|
||||
end
|
||||
|
||||
def new
|
||||
@antenna = current_account.antennas.build
|
||||
@antenna.antenna_domains.build
|
||||
@antenna.antenna_tags.build
|
||||
@antenna.antenna_accounts.build
|
||||
end
|
||||
|
||||
def edit; end
|
||||
|
||||
def create
|
||||
@antenna = current_account.antennas.build(thin_resource_params)
|
||||
|
||||
saved = @antenna.save
|
||||
saved = @antenna.update(resource_params) if saved
|
||||
|
||||
if saved
|
||||
redirect_to antennas_path
|
||||
else
|
||||
render action: :new
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
if @antenna.update(resource_params)
|
||||
redirect_to antennas_path
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
- content_for :page_title do
|
||||
= t('antennas.index.title')
|
||||
|
||||
- content_for :heading_actions do
|
||||
= link_to t('antennas.new.title'), new_antenna_path, class: 'button'
|
||||
|
||||
- if @antennas.empty?
|
||||
.muted-hint.center-text= t 'antennas.index.empty'
|
||||
- else
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
- content_for :page_title do
|
||||
= t('antennas.new.title')
|
||||
|
||||
= simple_form_for @antenna, url: antennas_path do |f|
|
||||
= render 'shared/error_messages', object: @antenna
|
||||
= render 'antenna_fields', f: f, lists: @lists
|
||||
|
||||
.actions
|
||||
= f.button :button, t('antennas.new.save'), type: :submit
|
Loading…
Add table
Add a link
Reference in a new issue