fix redirect after edit in product.rb
add method to type model
fix i18n error in application.rb