Sha256: 297b085f159e21bc2d13d4578a2894a28bf566408b978bd42374096c73be4b72

Contents?: true

Size: 486 Bytes

Versions: 2

Compression:

Stored size: 486 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 = Ilog.configuration.namespaces.key(@database)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
iatelier-0.4.4 lib/iatelier/controllers/books/edit.rb
iatelier-0.4.3 lib/iatelier/controllers/books/edit.rb