app/controllers/application_controller.rb
# 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 user_group
    if current_user.current_group_id == 0
        return nil
    else
      Group.find(current_user.current_group_id) rescue nil
    end
  end
def user_group if current_user . current_group_id == 0 return nil else Group . find ( current_user . current_group_id ) rescue nil end end
Prevent CSRF attacks by raising an exception.
Prevent CSRF attacks by raising an exception .