Sha256: ece07c6922757c9546140b3b43f161b88b641f25e57cb702a18141d03fdae652

Contents?: true

Size: 369 Bytes

Versions: 8

Compression:

Stored size: 369 Bytes

Contents

module Iatelier
  module Controllers
    module Books
      class Create
        include Iatelier::Action
		include Iatelier::Controllers::Books::DbConnector
        def call(params)
	        self.set_database params[:database]
			@book = Object.const_get(params[:book_type].capitalize).new
			@book.save
			@book.create(params)
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
iatelier-0.4.4 lib/iatelier/controllers/books/create.rb
iatelier-0.4.3 lib/iatelier/controllers/books/create.rb
iatelier-0.4.2 lib/iatelier/controllers/books/create.rb
iatelier-0.4.1 lib/iatelier/controllers/books/create.rb
iatelier-0.4.0 lib/iatelier/controllers/books/create.rb
iatelier-0.3.2 lib/iatelier/controllers/books/create.rb
iatelier-0.3.1 lib/iatelier/controllers/books/create.rb
iatelier-0.3.0 lib/iatelier/controllers/books/create.rb