parametrized access
This commit is contained in:
@@ -57,7 +57,7 @@ post '/cart/delivery_destination', &update_delivery_destination
|
||||
def report_to_trello(cart)
|
||||
Thread.new do
|
||||
@cart = cart
|
||||
board = Trello::Board.find('FqDO1eFL')
|
||||
board = Trello::Board.find(RibicaConfig.TRELLO_BOARD_NAME)
|
||||
list = board.lists.first
|
||||
card = Trello::Card.new
|
||||
card.list_id = list.id
|
||||
@@ -71,16 +71,16 @@ end
|
||||
def send_order_email(cart)
|
||||
Thread.new do
|
||||
client = SendGrid::Client.new(
|
||||
api_user: "ribica",
|
||||
api_key: "plava*kutija*svjetlo*torba07"
|
||||
api_user: RibicaConfig.SENDGRID_API_USER,
|
||||
api_key: RibicaConfig.SENDGRID_API_KEY
|
||||
)
|
||||
|
||||
email = SendGrid::Mail.new do |m|
|
||||
m.to = "narudzbe@ribica.ba"
|
||||
m.from = "draga@ribica.ba"
|
||||
m.to = RibicaConfig.BACKOFFICE_ORDER_EMAIL_TO
|
||||
m.from = RibicaConfig.BACKOFFICE_ORDER_EMAIL_FROM
|
||||
m.from_name = "Prodavnica Ribica"
|
||||
m.subject = "Nova Narudžba: #{cart.id}"
|
||||
m.html = "Mušterija naručila nešto. <br /> Pogledati https://www.ribica.ba/backoffice/carts/#{cart.id}"
|
||||
m.html = "Mušterija naručila nešto. <br /> Pogledati #{RibicaConfig.ROOT_ADDRESS}/backoffice/carts/#{cart.id}"
|
||||
end
|
||||
client.send(email)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user