app/controllers/application_controller.rb
def event_edit_permission?
    if !is_event_creater?
      flash[:notice] = "You must be the event creater to see this page"
      redirect_to root_path
    end
  end
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception.
For APIs, you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception . For APIs you may want to use : null_session instead .
def event_edit_permission?
    if !is_event_creater?
      flash[:notice] = "You must be the event creater to see this page"
      redirect_to root_path
    end
  end
def event_edit_permission? if ! is_event_creater? flash [ :notice ] = "You must be the event creater to see this page" redirect_to root_path end end
Prevent CSRF attacks by raising an exception.
Prevent CSRF attacks by raising an exception .