Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F425264
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Apr 4, 3:05 AM
Size
1 KB
Mime Type
text/x-diff
Expires
Sun, Apr 6, 3:05 AM (1 d, 4 h)
Engine
blob
Format
Raw Data
Handle
204868
Attached To
rWEBDNS WebDNS (edet4)
View Options
diff --git a/app/controllers/records_controller.rb b/app/controllers/records_controller.rb
index b54da1c..2c8a1c0 100644
--- a/app/controllers/records_controller.rb
+++ b/app/controllers/records_controller.rb
@@ -1,49 +1,49 @@
class RecordsController < ApplicationController
before_action :domain
before_action :record, only: [:edit, :update, :destroy]
# GET /records/new
def new
- @record = @domain.records.build
+ @record = domain.records.build
end
# GET /records/1/edit
def edit
end
# POST /records
def create
- @record = @domain.records.new(new_record_params)
+ @record = domain.records.new(new_record_params)
if @record.save
- redirect_to @domain, notice: 'Record was successfully created.'
+ redirect_to domain, notice: 'Record was successfully created.'
else
render :new
end
end
# PATCH/PUT /records/1
def update
if @record.update(edit_record_params)
- redirect_to @domain, notice: 'Record was successfully updated.'
+ redirect_to domain, notice: 'Record was successfully updated.'
else
render :edit
end
end
# DELETE /records/1
def destroy
@record.destroy
- redirect_to @domain, notice: 'Record was successfully destroyed.'
+ redirect_to domain, notice: 'Record was successfully destroyed.'
end
private
def edit_record_params
params.require(:record).permit(:name, :content, :prio, :disabled)
end
def new_record_params
params.require(:record).permit(:name, :content, :type, :prio)
end
end
Event Timeline
Log In to Comment