Class: Actions::Helpers::Humanizer::ProductResource

Inherits:
Resource
  • Object
show all
Defined in:
app/lib/actions/helpers/humanizer.rb

Instance Method Summary collapse

Methods inherited from Resource

#humanized_value, inherited

Instance Method Details

#humanized_nameObject



170
171
172
# File 'app/lib/actions/helpers/humanizer.rb', line 170

def humanized_name
  _('product')
end


174
175
176
177
178
# File 'app/lib/actions/helpers/humanizer.rb', line 174

def link(data)
  if product_id = fetch_data(data, :product, :id)
    "#/products/#{product_id}/info"
  end
end

#nameObject



166
167
168
# File 'app/lib/actions/helpers/humanizer.rb', line 166

def name
  :product
end