Sha256: cc09579288c388690ae67244818cb593c3423f09bb7dea8771a4bbfc142d8bcc

Contents?: true

Size: 754 Bytes

Versions: 6

Compression:

Stored size: 754 Bytes

Contents

class Voluntary::ApplicationController < ActionController::Base
  include Applicat::Mvc::Controller
  include Voluntary::V1::BaseController
  
  protect_from_forgery
  
  before_filter :set_twitter_sidenav_level
  
  layout Proc.new { |controller| controller.request.xhr? ? 'facebox' : 'application' }
  
  respond_to :html, :js, :json
  
  protected

  def after_sign_in_path_for(resource_or_scope)
    if resource_or_scope.provider == 'lastfm'
      music_path
    else
      workflow_path
    end
  end
  
  def set_twitter_sidenav_level
    @twitter_sidenav_level = 3
  end
  
  def response_with_standard(format = nil, error = nil)
    render status: error ? 500 : 200, json: { success: error ? false : true, error: error} and return true
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
voluntary-0.7.1 app/controllers/voluntary/application_controller.rb
voluntary-0.7.0 app/controllers/voluntary/application_controller.rb
voluntary-0.6.0 app/controllers/voluntary/application_controller.rb
voluntary-0.5.2 app/controllers/voluntary/application_controller.rb
voluntary-0.5.1 app/controllers/voluntary/application_controller.rb
voluntary-0.5.0 app/controllers/voluntary/application_controller.rb