Class: Backend::CultivableZonesController

Inherits:
BaseController show all
Defined in:
app/controllers/backend/cultivable_zones_controller.rb

Instance Attribute Summary

Attributes inherited from ApplicationController

#current_theme

Instance Method Summary collapse

Methods inherited from BaseController

account_lettering_states_crit, accounts_range_crit, amount_range_crit, crit_params, journal_entries_states_crit, journal_letter_crit, journal_period_crit, journals_crit, search_conditions

Methods inherited from ApplicationController

#after_sign_in_path_for, #authorized?, human_action_name, #human_action_name, #session_controller?

Instance Method Details

#showObject

Show one cultivable zone with params_id


53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'app/controllers/backend/cultivable_zones_controller.rb', line 53

def show
  return unless @cultivable_zone = find_and_check
  t3e @cultivable_zone
  respond_with(@cultivable_zone, methods: %i[shape_svg cap_number human_shape_area],
                                 include: [
                                   { activity_productions: {
                                     methods: %i[name implanted_at harvested_at],
                                     include: {
                                       interventions: {
                                         methods: %i[started_at stopped_at status name human_working_duration human_working_zone_area human_actions_names human_input_quantity_names],
                                         include: {}
                                       }
                                     }
                                   } }
                                 ], procs: proc { |options| options[:builder].tag!(:url, backend_cultivable_zone_url(@cultivable_zone)) })
end