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



163
164
165
# File 'app/lib/actions/helpers/humanizer.rb', line 163

def humanized_name
  _('product')
end


167
168
169
170
171
# File 'app/lib/actions/helpers/humanizer.rb', line 167

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

#nameObject



159
160
161
# File 'app/lib/actions/helpers/humanizer.rb', line 159

def name
  :product
end