#RubyOnRails - 09 April 2018
« Back 1 day Forward 1 day »
[03:20:16] helpa: NorthLumberJack: Please explain why you are trying to do this so we can better understand you.
[03:21:08] NorthLumberJack: helpa: Just so I can raise an error for my method if the param is not a collection
[10:15:29] j0bk: Hi, can someone help me? https://stackoverflow.com/questions/49730312/rails-circular-and-dynamic-nested-form
[12:45:43] thesubr00t: dminuoso, I just need a helper like `something_path` to return the pattern, ex (users/:id)
[12:48:43] thesubr00t: dminuoso, well I'm sending a bunch of urls pattern to the front, so basically a clean approach is what I'm looking for.
[12:51:17] dminuoso: thesubr00t: Well nevermind that then. Im not familiar with any public API for this.
[13:14:23] Andr3as: maybe this does the trick for rails 4 too? https://stackoverflow.com/questions/21171524/rails-3-get-route-pattern-for-current-controller-action
[13:14:45] dminuoso: thesubr00t: route = Rails.application.routes.routes.to_a.sample; route.path.spec.to_s
[13:16:03] dminuoso: thesubr00t: https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/routing/inspector.rb
[13:16:46] dminuoso: thesubr00t: In particular the `collection_routes` should be of interest for you
[13:18:05] dminuoso: thesubr00t: Just keep in mind that none of this is considered public API. Rails minor or patch version changes could at any time break this.
[14:17:31] MrCrackPotBuilde: how would you add an image from a hashed array to an image_tag i either get image not in asset pipeline or nill class for method error
[14:18:12] MrCrackPotBuilde: when i use the rails console i get the https url for the image but when i add to the tag i get errors only
[14:45:11] walidvb: i set a cache key to a static string for testing, and expect the response from the server to be the exact same. Still, it seems like on the 2nd request the view is still rendered.
[16:36:55] MrPunkin: I have upgraded a prior install to Rails 5.1.5, which now apparently requires Yarn to compile assets. Does Rails not install these dependencies for me?
[16:40:20] havenwood: MrPunkin: You'll have to install stuff like Ruby, Postgres, Redis, Yarn, etc yourself.
[16:58:37] MrCrackPotBuilde: when i use the above @output['pr..... i get the http url of the image but just under neath that i get => nil
[19:21:56] et09: having a million problems for yarn + webpacker on rails... "Your yarn packages are out of date / Please run `yarn install` to update" despite yarn install being up to date
[19:30:43] et09: nevermind, disabled yarn a la https://medium.com/@shvetsovdm/how-to-use-webpacker-with-npm-instead-of-yarn-a8a764e3a8ab
[20:31:23] orbyt_: whats the diff between `RSpec.configure do |config|` vs `RSpec.configuration do |config|`
[23:22:19] xco: hi, is there a nice way to write params.require(:data).require(:object).require(:charge)?