« Back to channel list

#RubyOnRails - 04 December 2017

« Back 1 day Forward 1 day »
[00:02:16] jrabe: has joined #RubyOnRails
[00:05:40] agent_white: has joined #RubyOnRails
[00:28:21] cschneid: has joined #RubyOnRails
[00:32:10] mr-spoon: has joined #RubyOnRails
[00:33:01] sevenseacat: has joined #RubyOnRails
[01:11:18] cschneid: has joined #RubyOnRails
[02:02:59] DTZUZO: has joined #RubyOnRails
[02:14:54] one_zero: has joined #RubyOnRails
[02:15:35] segy: has joined #RubyOnRails
[02:17:52] tamouse__: has joined #RubyOnRails
[02:20:21] jnollette: has joined #RubyOnRails
[02:23:22] gil_: has joined #RubyOnRails
[02:30:44] Jameser: has joined #RubyOnRails
[03:08:38] xlegoman: has joined #RubyOnRails
[03:25:31] hdaugherty: has joined #RubyOnRails
[04:14:34] Exhiled: has joined #RubyOnRails
[04:16:51] ayonkhan: has joined #RubyOnRails
[04:17:34] mtkd: has joined #RubyOnRails
[04:21:43] _aeris_: has joined #RubyOnRails
[04:21:44] jnollette: has joined #RubyOnRails
[04:30:09] Technodrome: has joined #RubyOnRails
[04:38:25] cschneid: has joined #RubyOnRails
[04:48:18] srinidhi: has joined #RubyOnRails
[04:57:10] hailey27: has joined #RubyOnRails
[04:57:13] hailey27: hi everyone!
[04:57:51] hailey27: i'm looking to block a route after-the-fact. is that possible? the devise library i'm using hard-codes that the route must be both GET and POST, but i'd like to have it be POST only.
[04:58:08] hailey27: i don't really want to copy-and-paste all the code from Devise, so I'm trying to just block the route.
[04:58:26] hailey27: https://github.com/plataformatec/devise/blob/master/lib/devise/rails/routes.rb#L448 here's the line in devise causing the problem. i'd like the [:get, :post] to just be [:post]
[04:59:29] hailey27: i know this isn't Railsey but hopefully someone can help me out with this until I can get Devise to add an option.
[05:41:52] iamarun: has joined #RubyOnRails
[06:13:38] arBmind: has joined #RubyOnRails
[06:16:25] AntiSpamMeta: has joined #RubyOnRails
[06:21:48] mtkd: has joined #RubyOnRails
[06:28:41] _aeris_: has joined #RubyOnRails
[06:32:08] moei: has joined #RubyOnRails
[06:59:43] Dimik: has joined #RubyOnRails
[07:00:10] cschneid: has joined #RubyOnRails
[07:09:34] DoubleMalt: has joined #RubyOnRails
[07:12:31] KeyJoo: has joined #RubyOnRails
[07:19:26] Technodrome: has joined #RubyOnRails
[07:33:52] conta: has joined #RubyOnRails
[07:35:29] Puffball: has joined #RubyOnRails
[07:38:57] apeiros: has joined #RubyOnRails
[07:46:31] Tempesta: has joined #RubyOnRails
[07:50:08] hammer065: has joined #RubyOnRails
[07:53:22] silvermine: has joined #RubyOnRails
[08:26:53] mtkd: has joined #RubyOnRails
[08:46:11] DoubleMalt: has joined #RubyOnRails
[08:47:24] silvermine: has joined #RubyOnRails
[08:59:59] mikecmpbll: has joined #RubyOnRails
[09:08:04] DoubleMalt: has joined #RubyOnRails
[09:11:41] Ergo: has joined #RubyOnRails
[09:18:49] KeyJoo: has joined #RubyOnRails
[09:19:49] marr: has joined #RubyOnRails
[09:39:24] Ag3nt: has joined #RubyOnRails
[09:48:48] marahin: Does someone know how RSpec's "let" handle arguments like `:'name-with-dashes-in-it'`?
[09:49:21] marahin: I mean, it works with rswag's parameters, if a parameter is 'access-token', i can let(:'access-token') and it will work. However, if I'd like to define a variable instead - how would I do that?
[09:50:08] sevenseacat: dashes arent valid in variable names.
[09:50:19] francuz: has joined #RubyOnRails
[09:50:42] francuz: Hello everyone, I'm working with a few friends on a series of small projects. For now, we were using Trello and chatted for everything regarding communication, but we would like to start using more adequate tools for more significant projects(issues, start making branches in our reps etc). Two primary tools we are still looking for are a nice way to visualise and work on code structure/architecture and model
[09:50:42] francuz: structure/architecture. Any advice?
[09:51:53] Technodrome: has joined #RubyOnRails
[09:53:36] marahin: sevenseacat that's correct, however in my rswag tests i need to include a parameter called 'access-token'.
[09:53:54] marahin: With let() syntax it's fine - I can call `let(:'access-token')` and it _just works_.
[09:54:18] marahin: however, I'm unsure - if I'd like to omit let syntax and instead define a local variable, how can I do that? Can I do that at all?
[09:54:21] sevenseacat: right, because under the hood its creating a method, not a variable.
[09:54:37] marahin: with a memoized value too. :)
[09:58:54] okraits: Hi everybody, I want to utilize Rails lowlevel caching to store some datastructures I am using. So I did a simple test. But it seems that caching is not active, the block is executed every time. Here is a gist: https://gist.github.com/anonymous/26b527fbc49c0fe2d35657d84bc2f4b0
[10:00:28] okraits: I'm using Rails 5.0.0. Any ideas why it isn't working?
[10:00:32] okraits: Thank you.
[10:02:36] matthewd: okraits: Check config.cache_store; action_controller.perform_caching doesn't affect the low level cache
[10:04:21] okraits: matthewd: Yeah, that's what I read. In production.rb: # config.cache_store = :mem_cache_store So the value is not set, I guess. Do I need to set it?
[10:06:09] matthewd: I don't recall what the defaults are, sorry. Probably?
[10:08:54] okraits: Ok, I will try it
[10:18:15] Terens: has joined #RubyOnRails
[10:28:36] okraits: matthewd: I tried now both with "config.cache_store = :mem_cache_store" (and installing dalli and memcached first) and "config.cache_store = :memory_store, { size: 64.megabytes }". But the cache is still not used and the block is executed every time I try to access the cache
[10:34:02] Torrone: has joined #RubyOnRails
[10:35:11] Torrone: Hello, is there any way I can set custom getters for association fields? For example, I have models Question, Answer: can I override the way rails gets question.answer.title? Thanks
[10:36:09] marahin: Torrone have you tried `def title?` on the model itself?
[10:38:20] Torrone: marahin: yes, but I want the method to fire only when the class instance is called as an association
[10:39:06] Torrone: if I call answer.title or question.answer.title I want two different responses
[10:41:02] marahin: Torrone that's not a very nice design :-)
[10:41:42] marahin: And, well, as far as I'm concerned - as `question.answer` returns an object related to Question, and that object is an Answer - then `.title` is called onto the object.
[10:42:00] marahin: so basically, it's the same as answer = question.answer; answer.title
[10:42:06] marahin: or at least it implies to be the same.
[10:44:59] Torrone: marahin, I'll explain my need: I'm optimizing my listing queries, I'm using .join and .select and I want each question to be one row, so that when I select a question, I get a field named 'answer_title' that I can get without hitting the db again. Of course this isn't gonna be very useful when I only call 'answer.title' by itself but can save me plenty of sql time if i call question.answer.title
[11:15:51] Combined2857: has joined #RubyOnRails
[11:16:00] Combined2857: We have a project on gihub that worked fine with django 1.11 but broke with the recent update to version 2. I've heard people complain that django breaks things a lot even when upgrading in minor versions. Is that true? Also do other web frameworks such as ruby's rails break things often ? Thanks
[11:19:53] sekmo: has joined #RubyOnRails
[11:21:09] sevenseacat: we cant help you with django here
[11:21:31] sevenseacat: but Rails publishes upgrade guides for all its minor and major versions
[11:24:37] cschneid: has joined #RubyOnRails
[11:31:43] Terens: how can I read a queue with concurrent ruby?
[11:40:54] DTZUZO: has joined #RubyOnRails
[11:43:56] mostlybadfly: has joined #RubyOnRails
[11:54:25] KeyJoo: has joined #RubyOnRails
[11:58:49] Ag3nt: has joined #RubyOnRails
[12:01:03] uks: has joined #RubyOnRails
[12:02:47] apeiros_: has joined #RubyOnRails
[12:05:41] roshanavand: has joined #RubyOnRails
[12:12:14] lunarkitty7: has joined #RubyOnRails
[12:27:05] mtkd: has joined #RubyOnRails
[12:45:47] dionysus69: has joined #RubyOnRails
[12:48:11] tcopeland: has joined #RubyOnRails
[13:04:59] apparition: has joined #RubyOnRails
[13:06:32] Jameser: has joined #RubyOnRails
[13:11:06] Combined2857: has joined #RubyOnRails
[13:35:04] sunrunner20: has joined #RubyOnRails
[13:36:30] ahrs: has joined #RubyOnRails
[13:39:17] atrius: has joined #RubyOnRails
[13:42:54] NL3limin4t0r: has joined #RubyOnRails
[14:12:16] Ag3nt: has joined #RubyOnRails
[14:14:58] adgtl: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[14:24:10] cschneid: has joined #RubyOnRails
[14:24:38] sevenseacat: has joined #RubyOnRails
[14:33:36] Technodrome: has joined #RubyOnRails
[14:33:52] safetypin: has joined #RubyOnRails
[14:34:22] tycoon177: would it be better to move away from using the record_tag_helpers or should i just use the gem and not change my code?
[14:38:15] hailey27: has joined #RubyOnRails
[14:47:27] iamarun: has joined #RubyOnRails
[14:47:30] yehowyada: has joined #RubyOnRails
[14:47:34] krawchyk: has joined #RubyOnRails
[15:00:02] TinkerTyper: has joined #RubyOnRails
[15:00:56] Terens: I didnt know that this existed
[15:01:03] safetypin: has joined #RubyOnRails
[15:11:40] nertzy: has joined #RubyOnRails
[15:12:06] Iarfen: has joined #RubyOnRails
[15:12:25] Iarfen: is there a way to compile SASS files automatically during development?
[15:12:35] Iarfen: I use sass from cli for that or there's another intended command?
[15:13:27] dminuoso: Iarfen: Sprockets handles this for you.
[15:13:35] dminuoso: Iarfen: What exactly is your goal?
[15:13:45] Iarfen: dminuoso: to don't recompile sass files during each laod
[15:14:31] dminuoso: Iarfen: Please gist the content of your config/environments/development.rb, as well as the output of `ls public/assets/*`
[15:14:36] helpa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[15:14:42] DoubleMalt: has joined #RubyOnRails
[15:14:50] dminuoso: Iarfen: Also include your Gemfile please.
[15:17:35] Iarfen: I include the gemfile inside another gist?
[15:18:01] dminuoso: Iarfen: Use the same gist. You can use the "Add file" button to attach multiple files. Also use proper file extensions in the filenames to enable syntax hilighting.
[15:19:06] srinidhi: has joined #RubyOnRails
[15:20:00] srinidhi: has joined #RubyOnRails
[15:20:15] Iarfen: dminuoso: Gemfile has syntax highlighting?
[15:21:09] dminuoso: Iarfen: It's just a ruby file, but github knows this - you can keep the name Gemfile
[15:21:40] Iarfen: dminuoso: here it's: https://gist.github.com/Iarfen/c9a4aa087578d70a7ba7c80e77392aae
[15:23:31] drowze: has joined #RubyOnRails
[15:24:59] dminuoso: Iarfen: This looks good. How do you make your sass files available in your application.css?
[15:28:27] Iarfen: dminuoso: it's automatic I think
[15:28:39] Iarfen: I need that it doesn't runs SASS files all the times, just when it's edited
[15:28:49] Iarfen: I need to have the css files already compiled, how I configure that?
[15:28:50] dminuoso: Iarfen: Do you have an application.scss or an application.css?
[15:28:57] dminuoso: Please gist the content of that file.
[15:29:08] Iarfen: I've an application.css file
[15:29:15] dminuoso: Iarfen: Alright that's the issue. :-)
[15:29:24] dminuoso: Iarfen: Gist the content for completion please.
[15:29:26] Iarfen: I change that
[15:29:37] dminuoso: not enough, we need to talk about the content too
[15:29:40] Iarfen: well it just contains comments, I gist that?
[15:29:43] dminuoso: Iarfen: Yes.
[15:29:50] dminuoso: They are strictly speaking not comments.
[15:30:44] Iarfen: here it's: https://gist.github.com/Iarfen/3455cbe53e8cbd6f07aed3eb74b0f818
[15:31:17] dminuoso: So Sprockets is the assets pipeline. In your application layout you somewhere have some <%= stylesheet_link_tag 'application' %> which directs sprockets to find application and build some css file from it alright?
[15:31:41] dminuoso: Sprockets is a Ruby thing, and when it finds the application.css, it will look for comments starting with a =, like these two https://gist.github.com/Iarfen/3455cbe53e8cbd6f07aed3eb74b0f818#file-application-css-L13-L14
[15:31:48] dminuoso: They are called sprockets directives.
[15:31:59] dminuoso: This just causes it to keep looking for css files.
[15:32:08] mtkd: has joined #RubyOnRails
[15:32:37] dminuoso: What you are going to do instead, is rename the css file into sass, which makes sprockets understand that its a sass file - so it will automatically compile your application.sass
[15:33:04] dminuoso: So the way to then include your other css files, is by using plain sass @import
[15:34:37] dminuoso: Iarfen: At the same time you might want to remove the sprockets directives for require_tree and require_self and manually build up the dependencies as you need it.
[15:34:56] dminuoso: When done, remember to delete your manually compiled css files. Sprockets will do the rest for you.
[15:36:03] dminuoso: The details are covered in this guide: http://guides.rubyonrails.org/asset_pipeline.html
[15:38:33] Iarfen: dminuoso: I've the same file that you send
[15:38:48] Iarfen: dminuoso: it should load fast then?
[15:38:51] Iarfen: cause it isn't
[15:38:53] dminuoso: Iarfen: Huh?
[15:39:14] dminuoso: Iarfen: I didnt send you a file. I just send your own file, but with 2 lines selected to highlight them.
[15:40:12] safetypin: has joined #RubyOnRails
[15:45:20] Iarfen: dminuoso: ok
[15:45:36] Iarfen: well, how I do to don't load the sass files everytime Ruby on Rails loads an url
[15:45:50] dminuoso: Iarfen: I just told you.
[15:46:25] dminuoso: Iarfen: Change the application.css into a sass file (that will make sprockets automatically compile application.sass with sas), and then make sure there's a sass @import tree reaching all your sass files.
[15:49:28] Iarfen: dminuoso: ok, then I change the file extension
[15:49:56] dminuoso: And then remove the sprockets directives and clean up your .css files.
[15:56:17] Iarfen: dminuoso: where I remove sprockets?
[15:56:46] dminuoso: Iarfen: do you know what a sprockets directive is?
[15:57:35] Iarfen: no, I'm confused
[15:57:52] dminuoso: Iarfen: Look into your application.css, do you see those comments that start with a = ?
[15:58:02] dminuoso: they look like `*= require_tree .`
[15:58:11] Iarfen: I activate them?
[15:58:20] dminuoso: No they already are activated.
[15:59:22] dminuoso: Sprockets looks for comments that start with = and understands `require_tree`, `require_self` or `require` as directives/commands. But we don't want this behavior.
[15:59:26] Saukk: has joined #RubyOnRails
[15:59:29] dminuoso: So you delete these lines altogether.
[15:59:29] dviola: has joined #RubyOnRails
[15:59:30] Exhiled: has joined #RubyOnRails
[15:59:57] dminuoso: Then sprockets no longer scans your app/assets/stylesheets recursively for all css files.
[16:00:21] dminuoso: (This is just the first part)
[16:01:07] Iarfen: well, I've done that
[16:01:08] Iarfen: what now?
[16:01:27] dminuoso: Iarfen: Now turn the file into a sass file.
[16:02:00] Iarfen: it's a sass file
[16:02:22] dminuoso: Great. Now whenever you refresh, it will automatically build that application.sass into css and put it into the page.
[16:02:41] troys: has joined #RubyOnRails
[16:02:42] dminuoso: There's one last thing missing, because your stylesheets are probably in differnet files, right?
[16:02:50] cschneid: has joined #RubyOnRails
[16:02:54] Iarfen: yes, they are
[16:03:12] Iarfen: how I can precompile them?
[16:03:20] dminuoso: Iarfen: Well how do you include another file in sass?
[16:03:28] dminuoso: You dont, compilation is already handled and working.
[16:03:46] Iarfen: I'm creating another .sass file inside the same directory
[16:04:21] dminuoso: Iarfen: Yes, and sass has a mechanism of loading another file, kind of like ruby's `require`.
[16:04:54] dminuoso: Iarfen: @import, please check out the sass guide on: http://sass-lang.com/guide
[16:04:55] Iarfen: yes, it's @import
[16:05:01] Iarfen: I add all there?
[16:05:09] dminuoso: Iarfen: You import files in your application.sass, yes.
[16:05:12] Iarfen: I shouldn't use webpack instead?
[16:05:21] dminuoso: You could actually
[16:05:25] dminuoso: Up to you which one you want to use.
[16:05:53] dminuoso: But this will work just fine. Just @import your other sass files in your application.sass
[16:06:03] dminuoso: Also please remember to delete all old .css files, you dont need them anymore
[16:06:12] dminuoso: (the ones generated from sass compilation)
[16:07:40] Iarfen: those css files are inside public right?
[16:08:51] dminuoso: Iarfen: Do you have any content in public/assets/ ?
[16:08:54] dminuoso: If yes, delete it
[16:08:58] dminuoso: Delete the entire directory.
[16:09:11] tycoon177: would it be better to move away from using the record_tag_helpers or should i just use the gem and not change my code?
[16:10:08] dminuoso: tycoon177: do you have any code that is dependent on this?
[16:10:27] Iarfen: dminuoso: inside public/ I don't have contents?
[16:10:31] tycoon177: dminuoso: we have some views that use it, but nothing that can't be changed as far as i know.
[16:10:35] Iarfen: (without the ?, I mistaked)
[16:10:48] dminuoso: Iarfen: That's good. Then you probably compiled them into app/assets/stylesheets
[16:11:08] Iarfen: well, there they aren't compiled
[16:11:17] Iarfen: I think they are being compiled each time I load the website
[16:11:23] dminuoso: Iarfen: They are now. Yes.
[16:11:32] dminuoso: Iarfen: I just thought you had them left over from when you ran `sass` manually.
[16:13:12] dminuoso: tycoon177: Well I meant, do you have any styling or JS that depends on those attributes?
[16:13:54] Iarfen: there's no faster way?
[16:14:03] Iarfen: can I watch the files and just wait for that?
[16:14:08] tycoon177: dminuoso: JS may depend on it. I was mainly just asking if it is considered bad practice to use this gem. I'm not opposed to rewriting the affected code if it will be better in the long run
[16:14:40] dminuoso: Iarfen: what do you mean "no faster way" ?
[16:14:59] dminuoso: Iarfen: Sprockets is smart and cache the compilation results, and only recompile if the file has actually changed.
[16:15:04] Iarfen: I think it's loading slow because it's loading SASS files again
[16:15:11] dminuoso: ACTION sighs
[16:15:23] dminuoso: Iarfen: What do you mean "slow"
[16:15:33] Iarfen: it takes like 1 minute to load the website
[16:15:57] dminuoso: Use the diagnostics that are available to you.
[16:16:12] dminuoso: Check the logs. Use your browsers dev tools.
[16:16:18] dminuoso: Please be more exact about "what is slow"
[16:24:03] Iarfen: well, it just takes time to load each time the url
[16:24:06] Iarfen: how many time it should take?
[16:24:11] Iarfen: it should be nearly instant right?
[16:25:49] dminuoso: Iarfen: Do you want me to repeat the last 3 lines?
[16:26:10] dminuoso: What is slow specifically. How slow is it.
[16:26:21] Iarfen: ok, how I use the diagnostics?
[16:26:33] dminuoso: 17:16 dminuoso | Check the logs. Use your browsers dev tools.
[16:28:46] conta: has joined #RubyOnRails
[16:29:22] dionysus69: has joined #RubyOnRails
[16:33:27] DrYockel: has joined #RubyOnRails
[16:36:54] srinidhi: has joined #RubyOnRails
[16:46:24] iamarun: has joined #RubyOnRails
[16:51:51] Technodrome: has joined #RubyOnRails
[16:52:24] jottr: has joined #RubyOnRails
[16:54:12] mcr: I wish that we could get google to find things on ruby-doc.org newer than 1.9.3 by default... or if there were links in the header to easily navigate to the version of the doc I want to see. (I just edit the URL usually)
[16:56:21] SteenJobs: has joined #RubyOnRails
[17:01:44] SteenJobs: has joined #RubyOnRails
[17:06:38] apeiros: has joined #RubyOnRails
[17:07:01] jottr: Hello everyone. I'm having trouble connecting to my rails application when running it inside a docker container. I have `force_ssl = true`. If I set it to `false`, I can access without issues. Puma returns a HTTP parse error https://git.io/vbsJd
[17:07:52] dminuoso: mcr: Blame google. Just run a local yard server.
[17:08:15] dminuoso: jottr: puma does not speak TLS.
[17:08:48] dminuoso: jottr: force_ssl basically makes the rails application generate headers and I think force link generation to https:// links
[17:08:59] dminuoso: jottr: But from the http side you need a TLS termination proxy (say nginx)
[17:09:06] jottr: dminuoso: Aaaah. Ok.
[17:11:51] one_zero: has joined #RubyOnRails
[17:12:29] dminuoso: jottr: Here we use a separate docker container (and use docker-compoe to connect the dots like the port that puma listens to)
[17:12:56] dminuoso: The nginx then provides tls termination for multiple docker containers running different HTTP servers.
[17:13:32] jottr: dminuoso: I guess thats the route we'll have to go as well.
[17:14:42] francuz: has joined #RubyOnRails
[17:18:25] Aherin: has joined #RubyOnRails
[17:19:51] one_zero: has joined #RubyOnRails
[17:23:20] jottr_: has joined #RubyOnRails
[17:37:25] mtkd: has joined #RubyOnRails
[17:46:52] s2013: has joined #RubyOnRails
[18:05:47] blackmesa: has joined #RubyOnRails
[18:18:11] truenito: has joined #RubyOnRails
[18:20:50] Dimik: has joined #RubyOnRails
[18:24:20] cagomez: has joined #RubyOnRails
[18:29:24] conta1: has joined #RubyOnRails
[18:34:56] _aeris_: has joined #RubyOnRails
[18:35:58] arBmind: has joined #RubyOnRails
[18:36:43] dionysus69: has joined #RubyOnRails
[18:39:54] orbyt_: has joined #RubyOnRails
[18:44:46] marr: has joined #RubyOnRails
[18:56:36] drowze: has joined #RubyOnRails
[18:57:20] hailey27: has joined #RubyOnRails
[18:59:32] ule: Hey guys.. where should I add my monkey patch in order do disable all "mail" calls from ActionMailer?
[19:00:00] ule: I guess it should be after a boot loads or something like that
[19:00:48] Aherin: has joined #RubyOnRails
[19:02:15] ule: I'll give a shot to one of those initializers
[19:03:21] workmad3: has joined #RubyOnRails
[19:08:15] sameerynho: has joined #RubyOnRails
[19:11:04] hailey27: has joined #RubyOnRails
[19:17:14] kies: has joined #RubyOnRails
[19:18:35] Exhiled: has joined #RubyOnRails
[19:19:51] Technodrome: has joined #RubyOnRails
[19:21:05] Iarfen: how I can know if sass if being cached?
[19:21:54] tcopeland: has joined #RubyOnRails
[19:23:14] hailey27: has joined #RubyOnRails
[19:23:32] someish: has joined #RubyOnRails
[19:29:35] hailey27: has joined #RubyOnRails
[19:29:40] conta3: has joined #RubyOnRails
[19:39:33] barhum2013: has joined #RubyOnRails
[19:41:15] barhum2013: Hello everyone is there a way to use binding.pry while running the server with forego/rails https://pasteboard.co/GWH1u12.png ?
[19:41:47] someish: has joined #RubyOnRails
[19:42:34] mtkd: has joined #RubyOnRails
[19:44:39] fryguy: maybe switch to pry-remote
[19:47:27] barhum2013: fryguy: interesting, thanks for the tip,
[19:57:55] hailey27: has joined #RubyOnRails
[20:08:22] urk187: has joined #RubyOnRails
[20:09:52] hailey27: has joined #RubyOnRails
[20:14:45] tycoon177: is there a way to define all parameters as allowed in strong parameters?
[20:25:08] havenwood: tycoon177: do you really want to allow created_at, etc?
[20:25:08] troys: has joined #RubyOnRails
[20:25:48] s2013: has joined #RubyOnRails
[20:25:50] havenwood: tycoon177: in config/applications.rb: config.action_controller.permit_all_parameters = true
[20:25:58] havenwood: tycoon177: (don't do it!)
[20:31:35] tycoon177: havenwood: it's not desired for all models, just those that are used by users to store their info, nothing that's used by anyone but the user that has control to change it
[20:32:31] havenwood: tycoon177: I'd still suggest just permitting the params explicitly.
[20:33:10] tycoon177: Alright, thanks for your input :)
[20:33:16] havenwood: tycoon177: You could use #column_names - %i[created_at updated_at]
[20:33:35] xco: has joined #RubyOnRails
[20:33:59] xco: i have a question, something like this `Rails.logger.warn e` will print a stack trace right?
[20:34:20] xco: where `e` comes from `rescue SomeError => e`
[20:42:55] barhum2013: has joined #RubyOnRails
[20:43:58] orbyt_: has joined #RubyOnRails
[20:49:16] someish: has joined #RubyOnRails
[21:02:43] Cyrus: Hrm, if I have an activerecord model that has named scopes which are the same name as native attributes to the model, is there a sane way for me to access the attribute and bypass the scope? In normal usage such as: Object.name -- this triggers the `name` scope and not accessing the `name` attribute. Need a way to force accessing the attribute of the object and not use the scope.
[21:02:45] Cyrus: Anyone have ideas?
[21:21:18] chromis: has joined #RubyOnRails
[21:38:00] creature: Cyrus: You can use the `read_attribute` method to do that, but overall my advice would be "don't have scopes with the same name as your attributes".
[21:38:19] Cyrus: It's solid advice, but alas, a bit late. :P
[21:38:25] Cyrus: I'll play with read_attribute, thank you.
[21:43:20] npgm: has joined #RubyOnRails
[21:43:40] urk187: has joined #RubyOnRails
[21:45:06] sameerynho: has joined #RubyOnRails
[21:50:22] arBmind: has joined #RubyOnRails
[21:53:56] urk187: has joined #RubyOnRails
[21:57:07] urk187: has joined #RubyOnRails
[21:57:32] urk187: has joined #RubyOnRails
[22:00:41] cagomez: has joined #RubyOnRails
[22:02:07] blackmesa1: has joined #RubyOnRails
[22:05:27] Technodrome: has joined #RubyOnRails
[22:07:23] xco: has joined #RubyOnRails
[22:11:43] conta1: has joined #RubyOnRails
[22:15:21] bga57: has joined #RubyOnRails
[22:15:30] sekmo: has joined #RubyOnRails
[22:20:35] mtkd: has joined #RubyOnRails
[22:24:49] uksio: has joined #RubyOnRails
[22:25:32] Exhiled: has joined #RubyOnRails
[22:37:24] xco: has joined #RubyOnRails
[22:46:39] jnollette: has joined #RubyOnRails
[23:07:43] Axsuul: has joined #RubyOnRails
[23:07:54] mostlybadfly: has joined #RubyOnRails
[23:10:06] barhum2013: has joined #RubyOnRails
[23:22:08] Jameser: has joined #RubyOnRails
[23:26:04] urk187: has joined #RubyOnRails
[23:34:50] tcopeland: has joined #RubyOnRails
[23:34:52] ResidentBiscuit: has joined #RubyOnRails
[23:36:10] nogic: has joined #RubyOnRails
[23:42:59] Iarfen: has joined #RubyOnRails
[23:43:01] s2013: has joined #RubyOnRails
[23:43:15] Iarfen: when an image is missing Ruby on Rails takes a lot of time for loading the website, that's normal?
[23:43:27] dminuoso: Iarfen: No.
[23:43:36] Iarfen: what can be the problem?
[23:43:38] dminuoso: Where is it trying to load that image from?
[23:47:21] Iarfen: it was an image that wasn't previously existing
[23:47:30] Iarfen: it was wasting apparently a lot of time because of that reason
[23:50:35] dminuoso: Iarfen: It shouldn't block the rendering though if an image is not there yet.
[23:51:46] dminuoso: If the web browser shows you that it's still loading, it's because it technically still is the attempt is not aborted through say a network or server error.
[23:54:15] mikecmpbll: has joined #RubyOnRails
[23:59:28] s2013: has joined #RubyOnRails