Class: Iatelier::Controllers::Books::New
- Inherits:
-
Object
- Object
- Iatelier::Controllers::Books::New
- Includes:
- Action, DbConnector
- Defined in:
- lib/iatelier/controllers/books/new.rb
Instance Method Summary collapse
Methods included from DbConnector
Instance Method Details
permalink #call(params) ⇒ Object
[View source]
8 9 10 11 12 13 14 15 16 |
# File 'lib/iatelier/controllers/books/new.rb', line 8 def call(params) # [optional] setting the database @database = params.get(:database) self.set_database @database @book_type = params[:book_type].capitalize; @book = Object.const_get(@book_type).new @book.namespace = @database end |