I believe this is called a named scope, if I am not mistaken. At any rate, does anyone know of a better / more efficient way of coding this..
This is from a Rails 4 Model
def line_total
product = Product.find_by_id(self.product_id)
line_total = self.quantity * product.current_price
return line_total
end