-
Notifications
You must be signed in to change notification settings - Fork 1
Add migration to Intercom #1
base: master
Are you sure you want to change the base?
Conversation
apps/web/config/routes.rb
Outdated
@@ -3,6 +3,8 @@ | |||
|
|||
get '/', to: 'folders#index' | |||
|
|||
post '/tickets/:id/export', to: 'tickets#export', as: :export_ticket |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are rails-like resource routes http://hanamirb.org/guides/routing/restful-resources/
ticket = TicketRepository.new.find(params[:id]) | ||
ticket.migrate | ||
redirect_to '/' | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some notification like "Exported started" would be great
lib/mkdev_hanami/entities/ticket.rb
Outdated
|
||
def messages | ||
MessageRepository.new.by_ticket(id) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like associations. There is support of assoications in Hanami: http://hanamirb.org/guides/1.0/models/associations/
Gemfile
Outdated
@@ -7,6 +7,8 @@ gem 'hanami-bootstrap' | |||
gem 'omniauth-google-oauth2' | |||
gem 'warden' | |||
gem 'groovehq' | |||
gem 'intercom' | |||
gem 'sucker_punch', '~> 2.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's wrong with Sidekiq?
require 'intercom' | ||
|
||
module Services | ||
class Intercom |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it recommended way to implement service objects? Ain't Hanami Entities better choice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also search for interactors here https://discourse.hanamirb.org/t/hanami-2-0-ideas/306/2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.