Sha256: 3671feec7279570526bfe1e2414214eed0aac612f718685ade2b2d5a402e511f

Contents?: true

Size: 411 Bytes

Versions: 4

Compression:

Stored size: 411 Bytes

Contents

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
iatelier-0.4.0 lib/iatelier/controllers/books/edit.rb
iatelier-0.3.2 lib/iatelier/controllers/books/edit.rb
iatelier-0.3.1 lib/iatelier/controllers/books/edit.rb
iatelier-0.3.0 lib/iatelier/controllers/books/edit.rb