app/controllers/phcscriptcdnpro/scriptcdn/authors_controller.rb in phcscriptcdnpro-1.12.0 vs app/controllers/phcscriptcdnpro/scriptcdn/authors_controller.rb in phcscriptcdnpro-1.12.1
- old
+ new
@@ -29,30 +29,30 @@
# POST Author
def create
@scriptcdn_main = Scriptcdn::Main.find(params[:main_id])
@scriptcdn_author = @scriptcdn_main.authors.create(scriptcdn_author_params)
if @scriptcdn_author.save
- redirect_to scriptcdn_main_authors_url, notice: 'Author was successfully created.'
+ redirect_to scriptcdn_main_authors_path, notice: 'Author was successfully created.'
else
render :new
end
end
# PATCH/PUT Author
def update
if @scriptcdn_author.update(scriptcdn_author_params)
- redirect_to scriptcdn_main_authors_url, notice: 'Author was successfully updated.'
+ redirect_to scriptcdn_main_authors_path, notice: 'Author was successfully updated.'
else
render :edit
end
end
# DELETE Author
def destroy
@scriptcdn_main = Scriptcdn::Main.find(params[:main_id])
@scriptcdn_author = @scriptcdn_main.authors.find(params[:id])
@scriptcdn_author.destroy
- redirect_to scriptcdn_main_authors_url, notice: 'Author was successfully destroyed.'
+ redirect_to scriptcdn_main_authors_path, notice: 'Author was successfully destroyed.'
end
private
# Common Callbacks