Sha256: 6c1aa9a5c71bad0f5486435d6144e3e465dcb5d3586576b1fa457076b798b835

Contents?: true

Size: 478 Bytes

Versions: 4

Compression:

Stored size: 478 Bytes

Contents

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
iatelier-0.4.4 lib/iatelier/controllers/books/new.rb
iatelier-0.4.3 lib/iatelier/controllers/books/new.rb
iatelier-0.4.2 lib/iatelier/controllers/books/new.rb
iatelier-0.4.1 lib/iatelier/controllers/books/new.rb