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



57
58
59
60
61
# File 'lib/junebug/controllers.rb', line 57

def get page_name
  redirect("#{Junebug.config['url']}/login") and return unless logged_in?
  Page.find_by_title(page_name).destroy() if is_admin?
  redirect Junebug.startpage
end