Module: VisibleAssignment::ActionControllerExtension

Defined in:
lib/visible_assignment/action_controller_extension.rb

Instance Method Summary collapse

Instance Method Details

#all_view_assign_variablesObject



19
20
21
22
23
# File 'lib/visible_assignment/action_controller_extension.rb', line 19

def all_view_assign_variables
  @_assign_variables ||= {}
  @_global_assign_variables ||= {}
  @_global_assign_variables.merge(@_assign_variables)
end

#global_view_assign_variables=(variables) ⇒ Object



15
16
17
# File 'lib/visible_assignment/action_controller_extension.rb', line 15

def global_view_assign_variables=(variables)
  @_global_assign_variables = variables
end

#view_assign_variables=(variables) ⇒ Object



11
12
13
# File 'lib/visible_assignment/action_controller_extension.rb', line 11

def view_assign_variables=(variables)
  @_assign_variables = variables
end

#view_assignsObject



3
4
5
6
7
8
9
# File 'lib/visible_assignment/action_controller_extension.rb', line 3

def view_assigns
  if VisibleAssignment.config.enable_instance_variables
    super.merge(all_view_assign_variables)
  else
    all_view_assign_variables
  end
end