Class: PhiX::StocksController

Inherits:
ApplicationController show all
Defined in:
app/controllers/phi_x/stocks_controller.rb

Overview

Takes form input from PhiXesController#show and generates a PhiX LibraryTube using the factory Stock

Instance Method Summary collapse

Methods inherited from ApplicationController

#block_api_access, #clean_params_from_check, #evil_parameter_hack!, #extract_header_info, #set_cache_disabled!

Instance Method Details

#createObject


6
7
8
9
10
11
12
13
14
15
# File 'app/controllers/phi_x/stocks_controller.rb', line 6

def create
  @stock = PhiX::Stock.new(phi_x_stock_params)
  if @stock.save
    @stocks = @stock.created_stocks
    render :show
  else
    @tag_option_names = PhiX.tag_option_names
    render :new
  end
end