Kill trailing whitespace in ruby files
This commit is contained in:
@@ -9,19 +9,19 @@ class DmailsController < ApplicationController
|
||||
else
|
||||
@dmail = Dmail.new(params[:dmail])
|
||||
end
|
||||
|
||||
|
||||
respond_with(@dmail)
|
||||
end
|
||||
|
||||
|
||||
def index
|
||||
@search = Dmail.visible.search(params[:search])
|
||||
@dmails = @search.order("dmails.created_at desc").paginate(params[:page])
|
||||
respond_with(@dmails)
|
||||
end
|
||||
|
||||
|
||||
def search
|
||||
end
|
||||
|
||||
|
||||
def show
|
||||
@dmail = Dmail.find(params[:id])
|
||||
check_privilege(@dmail)
|
||||
@@ -33,20 +33,20 @@ class DmailsController < ApplicationController
|
||||
@dmail = Dmail.create_split(params[:dmail])
|
||||
respond_with(@dmail)
|
||||
end
|
||||
|
||||
|
||||
def destroy
|
||||
@dmail = Dmail.find(params[:id])
|
||||
check_privilege(@dmail)
|
||||
@dmail.destroy
|
||||
redirect_to dmails_path, :notice => "Message destroyed"
|
||||
end
|
||||
|
||||
|
||||
def mark_all_as_read
|
||||
Dmail.visible.unread.each do |x|
|
||||
x.update_column(:is_read, true)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
private
|
||||
def check_privilege(dmail)
|
||||
if !dmail.visible_to?(CurrentUser.user)
|
||||
|
||||
Reference in New Issue
Block a user