summaryrefslogtreecommitdiff
path: root/app/controllers/info_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/info_controller.rb')
-rw-r--r--app/controllers/info_controller.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/app/controllers/info_controller.rb b/app/controllers/info_controller.rb
index 7c1b631..7834d2a 100644
--- a/app/controllers/info_controller.rb
+++ b/app/controllers/info_controller.rb
@@ -22,9 +22,9 @@ class InfoController < ApplicationController
def create
@info = Info.new(info_params)
if @info.save
- redirect_to @info, notice: 'Info has been created.'
+ redirect_to @info, notice: 'The info page has been created!'
else
- flash[:alert] = "Error creating info"
+ flash[:alert] = "An error occured while creating the info page."
render action: "new"
end
end
@@ -32,18 +32,18 @@ class InfoController < ApplicationController
def update
@info.attributes = info_params()
if @info.save
- redirect_to @info, notice: 'Info has been updated.'
+ redirect_to @info, notice: 'The info page has been updated!'
else
- flash[:alert] = "There was a problem while updating the info"
+ flash[:alert] = "An error occured while updating the info page."
render action: "edit"
end
end
def destroy
if @info.destroy
- flash[:notice] = "Info deleted!"
+ flash[:notice] = "The info page has been deleted!"
else
- flash[:alert] = "There was a problem while deleting this info"
+ flash[:alert] = "An error occured while deleting the info page."
end
redirect_to info_index_path
end
@@ -63,8 +63,8 @@ class InfoController < ApplicationController
def auth
unless mod?
- flash[:alert] = "You are not allowed to edit info!"
+ flash[:alert] = "You are not allowed to edit info pages!"
redirect_to @info ? @info : info_index_path
end
end
-end \ No newline at end of file
+end