#RubyOnRails - 04 December 2018
« Back 1 day Forward 1 day »
[01:03:26] ule: Radar: Is it Tuesday for you already? Thats cool eh, I'm chatting with someone in the future
[01:08:16] Radar: ule: I've been working my way through the Advent of Code exercises by using Elixir.
[01:08:54] ule: Cool, one of the features I really like is that kind of guard statement on the method signature.
[01:10:20] ule: I spoke with some guys that actually see this as an overhead saying that if we use this all the time, we're gonna have a lot of method, one per each conditions
[06:40:58] dionysus69: is there a conventional way to save record errors to the column? I moved model validation to just a method since I need to validate this at sidekiq dyno, but how should I tell user what the rejecting error was, create a custom field on the model?
[08:04:33] tbuehlmann: that also applies to passwords, and you shouldn't use simple password as a consequence of that fact
[08:07:35] sevenseacat: as in, you've found someone else's site that evals input? email their security team, immediately.
[08:08:14] Terens: Boss wants features with no tests if I replace the eval thing he will tell me " I feel we waste lot of time"
[17:54:46] Travis-42: I'm using a rails application template to generate new rails applications, and I noticed that it's possible to apply to existing applications as well with "rails app:template". I tried it out, but it seems like it skips after_bundle. Is there a way to the template to detect if it's being used in a new or existing template?
[18:05:52] tubbo: in the beginning of the app template you could try setting an ivar, `@new_application = false` then in `after_bundle` you can flip that to true
[18:06:17] tubbo: if you're saying `rails app:template` doesn't call after_bundle, then maybe you can kinda use that as a signal that it's a new app
[18:06:55] tubbo: i think create_file has something that will prevent it from running if the file exists though
[18:11:54] Travis-42: Or at least something like it should work I think. Since after_bundle typically happens last, I'd need some way to check at the very end, I guess.
[18:52:17] jarlopez: Hiya. Is there a recommended way of storing constant strings used in flash messages for reuse across the application/rspec tests?
[18:54:15] tubbo: idk what "constant strings" means in this case, just generic stuff like "Saved Item" or "Item has been deleted"?
[18:55:33] tubbo: jarlopez: yeah. you can always access translation strings with I18n.t() from anywhere in the application.
[20:00:44] jarlopez: Is it possible to use select_tag populated by options_from_collection_for_select to get a `disabled value="" selected hidden` <option> entry in a select dropdown?