module Iatelier module Controllers module Books class New include Iatelier::Action include Iatelier::Controllers::Books::DbConnector expose :book, :book_type, :database def call(params) @database = params[:database] self.set_database database @book_type = params[:book_type].capitalize; @book = Object.const_get(@book_type).new @book.namespace = @database end end end end end