#RubyOnRails - 08 May 2019
« Back 1 day Forward 1 day »
[00:25:32] FrankD: Hi -- if I have two scaffolds generated for say Triggers and Events.. and I want an interface like GenerateEmails, which grabs Triggers and Events in a certain time range.. would it be appropriate to just create another controller and then use something like render partial inside GenerateEmails?
[11:48:29] ss942: Hello, I'm writing helper, which task is to render label + input for multiple "custom fields" based on it's "custom field type"
[11:48:29] ss942: The only problem I have is with that "I can't imagine that there's impossible to do it in Rails that way"
[11:48:29] ss942: I'm looking for a way to write string in a way that html.erb files are (somthing like: x="<%= label ... %>".to_erb_html)
[11:51:53] tbuehlmann: ss942: you can use view helpers in helper methods, just call the methods directly
[13:28:02] ss942: tbuehlmann: are you still here? I had unexpected meeting, and cannot say thank you when after your answer I found solution.
[14:00:02] arechsteiner: quick question. in rails 5.2 where would I best store my DB credentials per environment/machine?
[14:01:14] arechsteiner: i'm guessing it's not neccessarily credentials.yml.enc because that is the same for all environments (or isn't it?)
[18:37:51] choke: I am building an API, I have some a post body that contains some fields that are there solely for determining if i should send an email or not, so, what's the best way to handle that? making them attributes on the model seems off since they only apply for this decision, sending the mail from the controller while would work - seems like i'm adding too much logic to the controller, and adding everything to a series of helpers also
[18:37:51] choke: seems weird as i'm passing post parameters or the request object around everywhere. thoughts?
[19:49:40] choke: using https://github.com/rails/rails-observers is there any way to make the context used to save available to the observer?