app/controllers/products_controller.rb
def new_product_portfolio(new_product_portfolio)
      unless new_product_portfolio.blank? || new_product_portfolio[:portfolio_id].blank?
        @product.portfolios << Portfolio.find(new_product_portfolio[:portfolio_id])
        flash[:notice] = t(:portfolio) + t(:added)
      end
    end
# Adds portfolio to product's list of portfolios
Adds portfolio to product's list of portfolios
Adds portfolio to product ' s list of portfolios
def new_product_portfolio(new_product_portfolio)
      unless new_product_portfolio.blank? || new_product_portfolio[:portfolio_id].blank?
        @product.portfolios << Portfolio.find(new_product_portfolio[:portfolio_id])
        flash[:notice] = t(:portfolio) + t(:added)
      end
    end
def new_product_portfolio ( new_product_portfolio ) unless new_product_portfolio . blank? || new_product_portfolio [ :portfolio_id ] . blank? @product . portfolios << Portfolio . find ( new_product_portfolio [ :portfolio_id ] ) flash [ :notice ] = t ( :portfolio ) + t ( :added ) end end
Adds portfolio to product's list of portfolios
Adds portfolio to product ' s list of portfolios
new_product_portfolio