Nothing Special   »   [go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This pull request adds support for symbol type #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bogdanRada
Copy link
@bogdanRada bogdanRada commented Sep 1, 2017

This is needed for example when you want to change locally action_mailer settings to use for example :letter_opener as delivery method .

Please let me know what you think. Thank you very much.

Example of configuration file:

delivery_method:
    note: 'letter_opener'
    type: 'symbol'

And the code from config/environments/development.rb

  notes_cfg = "#{Rails.root}/tmp/kansen_notes.yml"
  if defined?(Kansen) && File.exist?(notes_cfg)
    yaml =YAML.load_file(notes_cfg).with_indifferent_access
    notes = Kansen.parse(yaml)
    Kansen.modify config.action_mailer, with: notes, via: :accessor
  end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant