Module: SimpleResource::CustomHelper

Defined in:
app/helpers/simple_resource/custom_helper.rb

Instance Method Summary collapse

Instance Method Details

#resource_human_attributesObject



3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'app/helpers/simple_resource/custom_helper.rb', line 3

def resource_human_attributes
  human_attributes = resource_attributes - non_human_attributes
  
  if @exclude_fields
    human_attributes = human_attributes - @exclude_fields
  end

  if respond_to?("parent?")
    human_attributes = human_attributes - ["#{parent.class.name.underscore}_id"]
  end

  human_attributes
end