summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLogan Fick <logaldeveloper@protonmail.com>2017-11-10 14:31:29 -0500
committerLogan Fick <logaldeveloper@protonmail.com>2017-11-10 14:31:29 -0500
commitac583b73519cbceec6d3c1aa063125a628da2406 (patch)
treedd80d92c7086f5a006841b85f40cce9b0198e332
parentb4af851ad01ffd43a182a99f21f572276326502d (diff)
Changed messages shown by info pages.
-rw-r--r--app/controllers/info_controller.rb16
-rw-r--r--app/views/info/edit.html.erb4
2 files changed, 10 insertions, 10 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
diff --git a/app/views/info/edit.html.erb b/app/views/info/edit.html.erb
index 0135219..0f90c74 100644
--- a/app/views/info/edit.html.erb
+++ b/app/views/info/edit.html.erb
@@ -6,5 +6,5 @@
<%= render partial: "md_editor", locals: {name: "info[content]", content: @info.content} %>
<p><%= f.submit "Update Info", class: "btn blue left" %></p>
<% end %>
-<p><%= button_to "Delete Info", @info, method: "delete", data: {confirm: "Delete Info forever?"}, class: "btn red right" %></p>
-<div class="clear"></div> \ No newline at end of file
+<p><%= button_to "Delete Info", @info, method: "delete", data: {confirm: "Are you sure you want to delete this info page?"}, class: "btn red right" %></p>
+<div class="clear"></div>