module CustomersHelper

File

customers_helper.rb

(C)

Hipposoft 2008

Purpose

Support functions for views related to Customer objects. See controllers/customers_controller.rb for more.


04-Jan-2008 (ADH): Created.

Public Instance Methods

customerhelp_actions( customer ) click to toggle source

Return list actions appropriate for the given customer

# File app/helpers/customers_helper.rb, line 15
def customerhelp_actions( customer )
  if ( @current_user.admin? or ( customer.active and @current_user.manager? ) )
    actions = [ 'edit', 'delete' ]
  else
    actions = []
  end

  actions.push( 'show' )
  return actions
end