Skip to content

Commit

Permalink
Merge fb4a92c into 380efaf
Browse files Browse the repository at this point in the history
  • Loading branch information
miurahr committed Jul 15, 2015
2 parents 380efaf + fb4a92c commit 981571b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions app/controllers/apis_controller.rb
@@ -1,4 +1,5 @@
class ApisController < ApplicationController
before_filter :authenticate_user_from_token!
before_filter :authenticate_user!

def active_users
Expand Down
1 change: 1 addition & 0 deletions app/controllers/application_controller.rb
@@ -1,6 +1,7 @@
class ApplicationController < ActionController::Base
protect_from_forgery

skip_before_filter :verify_authenticity_token, if: -> {request.format.json?}
before_filter :force_approved_account
before_filter :redirect_suspended_account

Expand Down
1 change: 1 addition & 0 deletions app/controllers/channels_controller.rb
@@ -1,4 +1,5 @@
class ChannelsController < ApplicationController
before_filter :authenticate_user_from_token!
before_filter :authenticate_user!
before_filter :find_channel_by_name, :only => :show
load_and_authorize_resource
Expand Down
18 changes: 10 additions & 8 deletions config/routes.rb
Expand Up @@ -4,21 +4,23 @@
:sessions => "sessions"
}
devise_scope :user do

# these are allow to access with auth_token
get "/active_users" => "apis#active_users"
get "/me" => "apis#me"

resources :channels do
resources :activities
resources :attachments
end

authenticated :user do
root :to => "main#index"

get '/search' => "main#search"

resources :channels do
resources :activities
resources :attachments
end

resources :users, :only => [:index, :show]

get "/active_users" => "apis#active_users"
get "/me" => "apis#me"

get "/users/edit" =>"main#users_edit"

namespace :admin do
Expand Down

0 comments on commit 981571b

Please sign in to comment.