Sha256: 523e88641c7b66737c747323b7c3b412a9a3016dc1a6cfa33f3abd2265b5c355

Contents?: true

Size: 448 Bytes

Versions: 2

Compression:

Stored size: 448 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])
	        @book.namespace = @database
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
iatelier-0.4.2 lib/iatelier/controllers/books/edit.rb
iatelier-0.4.1 lib/iatelier/controllers/books/edit.rb