Class: ApiController

Inherits:
ApplicationController show all
Defined in:
app/controllers/api_controller.rb

Overview

api requests come through here

Instance Attribute Summary (collapse)

Attributes inherited from ApplicationController

#is_data_controller, #is_task_controller, #meta_data, #meta_description, #meta_keywords, #meta_title, #page_title, #site_name

Instance Method Summary (collapse)

Methods inherited from ApplicationController

#clear_project_and_user_variables, #digest_cookie, #digested_cookie_exists?, #disable_turbolinks, #intercept_api, #invalid_object, #is_data_controller?, #is_task_controller?, #log_user_recent_route, #notice_user, #project_matches, #record_not_found, #set_project_and_user_variables, #set_project_from_params, #token_authenticate

Methods included from ProjectsHelper

#project_link, #project_tag, #projects_list, #projects_search_form

Instance Attribute Details

- (Object) permitted_projects

Returns the value of attribute permitted_projects



3
4
5
# File 'app/controllers/api_controller.rb', line 3

def permitted_projects
  @permitted_projects
end

Instance Method Details

- (Object) index



7
8
9
10
11
12
13
# File 'app/controllers/api_controller.rb', line 7

def index
  respond_to do |format|
    format.json {
      render(json: {success: true}, status: 200)
    }
  end
end

- (Object) set_permitted_projects (protected)



17
18
19
# File 'app/controllers/api_controller.rb', line 17

def set_permitted_projects
  @permitted_projects = @sessions_current_user.projects
end