#RubyOnRails - 22 May 2019
« Back 1 day Forward 1 day »
[02:22:59] haxx0r: i'm calling `Haml::Engine.new(haml.template).render` but no rails helper available in there. how to access them?
[02:30:41] haxx0r: alternative: how can i render a 'template" that is coming out of the database? it seems that `actionview.render` and all the other render methods require a template on filesystem
[02:36:57] Dr_MDMA_MD: you have to deal with a new, different and unnecessary format as opposed to regular html/erb
[02:37:21] Dr_MDMA_MD: you have to add a ton of dependencies to your app's stack, increasing its likelihood of breaking later on
[02:37:50] Dr_MDMA_MD: imho its complete and utter nonsense. for what, just because you're too lazy to write html tags?
[03:38:00] Axsuul: What should I name a variable that goes with "start_from"? I have "end_before" or "end_until"
[03:45:25] haxx0r: Dr_MDMA_MD well i do it now with ERB and it works. but writing erb templates is nasty compared to HAML or SLIM :P
[11:29:56] yottanami: How can I use `Rails::Generators.invoke ..., :behavior => :revoke` for destroying a generator of a Gem?
[11:44:10] yottanami: Something like this: ` Rails::Generators.invoke 'devise:install', :behavior => :revoke`
[13:23:17] ziyadb: General architecture question, I have a "post" model with uuids as their primary key, and it doesn't exactly play nice with the polymorphic models it's associated with. i.e. commentable, eventable, and action_text_rich_texts, what's the best practice in this case?
[13:24:27] ziyadb: I'm leaning towards simply no longer using uuids for the post model, because it's creating more trouble than it's worth.
[18:42:20] weaksauce: the old saying goes there are 2 hard things in computer science: cache invalidation, naming things and off by one errors
[19:14:28] ziyadb: weaksauce: the polymorphic association expects an integer type for the commentable type (post), which is a uuid, so it's not playing nice
[19:23:38] weaksauce: i guess you could keep the uuid as a backup and use an int as the primary key if it's causing you issue