Class: Junebug::Controllers::Delete

Inherits:
R
  • Object
show all
Defined in:
lib/junebug/controllers.rb

Instance Method Summary collapse

Instance Method Details

#get(page_name) ⇒ Object



84
85
86
87
88
# File 'lib/junebug/controllers.rb', line 84

def get page_name
  redirect("/login") and return unless logged_in? # shouldn't be here
  Page.find_by_title(page_name.gsub(/_/,' ')).destroy() if is_admin?
  redirect Junebug.startpage
end