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

RFC: Custom variadic UI #57

Open
julik opened this issue Aug 31, 2015 · 2 comments
Open

RFC: Custom variadic UI #57

julik opened this issue Aug 31, 2015 · 2 comments

Comments

@julik
Copy link

julik commented Aug 31, 2015

We are using email previews a lot, and we have many variations in our templates regarding model objects that participate in email rendering. Using the menus for raw/html/text and languages is really cool, and I thought that it would be nice to add some call for adding custom variadic UI to the preview pages. Something like

def notify_person
  add_parameter_selector :recipient_id, {"John" => 1, "Jane" => 2}
  recipient = Recipient.find(@recipient_id)
  DownloadMailer.notify_recipient transfer, recipient
end

with an additional effect that add_parameter_selector would preset the defined instance variable to the first value of the select. Would that be welcome?

@glebm
Copy link
Owner

glebm commented Aug 31, 2015

Perhaps it would be better to add a view hook to where you would render the UI?
Or you could use the existing nav hook. See https://github.com/glebm/rails_email_preview/blob/master/README.md#hooks

@dmitry
Copy link

dmitry commented Dec 7, 2016

@julik looks similar: #52

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

No branches or pull requests

3 participants