Module: Releaf::ActionController::Ajax

Extended by:
ActiveSupport::Concern
Included in:
Releaf::ActionController
Defined in:
app/lib/releaf/action_controller/ajax.rb

Instance Method Summary collapse

Instance Method Details

#ajax?Boolean

Returns:

  • (Boolean)

9
10
11
# File 'app/lib/releaf/action_controller/ajax.rb', line 9

def ajax?
  @_ajax || false
end

#layoutObject


13
14
15
# File 'app/lib/releaf/action_controller/ajax.rb', line 13

def layout
  ajax? ? false : "releaf/admin"
end

#manage_ajaxObject


17
18
19
20
21
22
23
# File 'app/lib/releaf/action_controller/ajax.rb', line 17

def manage_ajax
  @_ajax = params.has_key? :ajax
  if @_ajax
    request.query_parameters.delete(:ajax)
    params.delete(:ajax)
  end
end