Module: ActiveScaffold::Actions::Core

Defined in:
lib/active_scaffold/actions/core.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/active_scaffold/actions/core.rb', line 3

def self.included(base)
  base.class_eval do
    before_action :set_vary_accept_header
    before_action :check_input_device
    before_action :register_constraints_with_action_columns, :unless => :nested?
    after_action :clear_flashes
    after_action :dl_cookie
    around_action :clear_storage
    rescue_from ActiveScaffold::RecordNotAllowed, ActiveScaffold::ActionNotAllowed, :with => :deny_access
  end
  base.helper_method :active_scaffold_config
  base.helper_method :successful?
  base.helper_method :nested?
  base.helper_method :grouped_search?
  base.helper_method :embedded?
  base.helper_method :loading_embedded?
  base.helper_method :calculate_query
  base.helper_method :calculate_subquery
  base.helper_method :new_model
  base.helper_method :touch_device?
  base.helper_method :hover_via_click?
end

Instance Method Details

#render_fieldObject



26
27
28
29
30
31
32
33
34
35
36
# File 'lib/active_scaffold/actions/core.rb', line 26

def render_field
  if request.get? || request.head?
    render_field_for_inplace_editing
    respond_to do |format|
      format.js { render :action => 'render_field_inplace', :layout => false }
    end
  else
    render_field_for_update_columns
    respond_to { |format| format.js }
  end
end