#RubyOnRails - 29 October 2018
« Back 1 day Forward 1 day »
[16:24:56] sgt_disco: If I have table A and table B, which is a M.N relationship that is joined on table J (my junction table)
[16:24:57] sgt_disco: But for each of the id's in J, I need another column to denote qtys(single integer value) for each of those relationships.
[16:24:57] sgt_disco: How should I do this, should I add a column to table J to save this 1 value I need, or should I be making a new table to hold that value and then link it to the J table?
[16:26:09] sgt_disco: I am integrating this in a Rails app, although I don't think that detail is important, but stating it just in case
[16:52:36] havenwood: jlebrech: Sure, you can use i18n for whatever you'd like. You could look at the conventions adopted by gems that do Raills i18n with custom error code pages, such as exception_handler: https://github.com/richpeck/exception_handler
[16:53:47] havenwood: jlebrech: https://github.com/richpeck/exception_handler/blob/04fffc9c86f67d39e0e13a96a891c02ce6d7b884/app/models/exception_handler/exception.rb#L123-L125
[20:11:30] cxl: Is this kind of side effect good practice in Ruby/Rails? I'm surprised to see it in the rails tutorial: https://bitbucket.org/railstutorial/sample_app_4th_ed/src/6f522278a8e2f0c65738bb10ac09a265a727be42/app/helpers/sessions_helper.rb#lines-22
[21:06:20] glasz: hello siblings. is there a way to prevent sprockets from including underscored files like `_foo.scss` so that only @import "foo" can load them?
[21:12:25] glasz: basically, i want non of my sass partials to be loaded by sprockets. wonder why that's not a convention.
[21:34:06] cxl: Inside: It's still in the latest version: https://www.railstutorial.org/book/advanced_login#code-persistent_current_user
[22:34:32] mjacob: what's the easiest way to have a dynamic segment in a route that consumes everything (dots, slashes, etc.)?
[22:36:59] mjacob: well, it should also be allowed to contain hashes etc., which of course need to be escaped when creating the url