Lidia Wisniewska

Joined

980 Experience
2 Lessons Completed
1 Question Solved

Activity

Posted in Doorkeeper Omniauth OAuth Client Discussion

I've added non-gem strategy in lib/strategies and in initializers I have
module OmniAuth
module Strategies
autoload :Doorkeeper, Rails.root.join('lib', 'strategies', 'area_agent_doorkeeper')
end
end
I keep getting 'Could not authenticate you from Doorkeeper because "Invalid credentials".' - do I need to do anything differently if the strategy is not in a gem?

Posted in How to test attachments in ActionMailbox?

Awesome! It was actually my teammate who got to this solution in the end.

Posted in How to test attachments in ActionMailbox?

It turns out this is the way to go
mail = Mail.new(
from: '[email protected]',
to: '[email protected]',
subject: 'Logo',
body: 'Hi, See the logo attached.',
)
mail.add_file filename: 'sample.txt', content: StringIO.new('Sample Logo')
create_inbound_email_from_source(mail.to_s, status: :processing).tap(&:route)

Posted in Namespace rails belongs_to

Hi Tiago, is this a typo?
belongs_to: permission
It should be belongs_to :permission

Posted in How to test attachments in ActionMailbox?

I'm trying to test attachments using receive_inbound_email_from_mail, but when inspecting mail.attachments I get an empty array. Is there another way around this?
receive_inbound_email_from_mail(
from: '[email protected]',
to: '[email protected]',
subject: 'Logo',
body: 'Hi, See the logo attached.',
attachments: [ fixture_file_upload("files/logo.png") ]
)

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2020 GoRails, LLC. All rights reserved.