Activity Graph

Page 1 of 5 | Next »


[15:41:25] syndikate: How can I implement a dedup with other available functions?
[15:41:50] syndikate: I am working on a problem and it is to remove consecutive duplicate elements in a list
[15:42:07] syndikate: I figured dedup can do it, but I am curious how I can implement otherwise
[18:05:59] syndikate: I am trying to read the definition of deduce but am not still able to understand :D


[13:02:56] syndikate: How do I do an idiomatic lazy lookup for translations in a partial under namespaced route?
[13:03:03] syndikate: Right now I get a path is not available error
[13:06:26] syndikate: Sample file for reference


[05:30:48] syndikate: Remote host closed the connection
[05:31:13] syndikate: has joined #ruby
[05:31:13] syndikate: has joined #elixir-lang
[05:31:13] syndikate: has joined #RubyOnRails


[17:34:44] syndikate: Quit: M'Kay
[17:59:54] syndikate: has joined #ruby
[17:59:54] syndikate: has joined #elixir-lang
[17:59:54] syndikate: has joined #RubyOnRails


[13:29:45] syndikate: Anybody migrated from feature spec to system specs? I am seeing to be having problem in configuring chrome for capybara
[13:41:18] syndikate: Okay, I want to run chrome in headless mode
[13:41:42] syndikate: I am not able to understand what to set it to get It running on an existing applicationn
[13:43:22] syndikate: Nope, I whatever I change it brings up chrome and not headless. I have both old Capybara config setting for default driver and the driven_by as well. Let me share config?
[13:48:57] syndikate: tbuehlmann,
[13:49:06] syndikate: Sorry if any of that is stupid I am just starting to pick this up
[13:59:28] syndikate: tbuehlmann, I think there are many issues, let me do some clean up and get back
[14:38:55] syndikate: tbuehlmann, I have `Rspec.feature` is it mandatory to have that changed to `Rspec.describe` ?


[07:38:05] syndikate: If am running my specs using parallel_tests gems and in between in one of the specs if I call `DatabaseCleaner.clean` does it wipe out data from all the connections? How does this behave?
[07:51:46] syndikate: Can I interpret that word as "god knows" or "anomaly" or "can't say"
[07:52:15] syndikate: I have not used that word before sevenseacat :P
[07:53:08] syndikate: database_cleaner gem shows the clean method calling clean on all connections
[07:53:30] syndikate: Now gotta see what happens when we have parallel_tests to the mix :( Why do people have to bring in complicated situations


[12:58:17] syndikate: If my clean up strategy is truncation does it truncate only the data added in that test or the whole table?
[13:22:02] syndikate: Ah okay thanks


[06:34:44] syndikate: Is true parallelism possible in ruby using processes?
[06:37:35] syndikate: Ah okay havenwood. Was reading through parallel_tests gem
[06:48:51] syndikate: Oh, they are helped by having the VM eh? havenwood
[06:49:25] syndikate: havenwood, Yeah that's what I meant. Oh okay nice will read through.
[06:50:28] syndikate: Oh, I have never worked on it so pretty un-informed on these
[06:51:16] syndikate: havenwood, Thanks! I have been on rails for sometime but haven't written much tools in Ruby. Recently started looking into gems and seeing if I can get hands into more ruby stuff
[06:52:39] syndikate: havenwood, Any pointers, suggestions, mentoring on stuff to begin contribution are all welcome :D socketry/falcon is something that I wanted to look into for a while now. Fibers as well.
[06:56:14] syndikate: havenwood, Oh didn't know that. Sure, I will probably request for clarification for things I don't understand :D
[07:01:20] syndikate: Oh okay, let me check them. Might need some time :D
[07:02:58] syndikate: Yeah I started picking up enumerators a while ago
[07:03:35] syndikate: But problem is that there is not much scope to write much stuff with all those in my current work as mostly it's the usual rails related stuff
[07:07:56] syndikate: Exactly, after a while the charm is lost - well for someone who wants to do something new most of the time. It's not that the current application is best ever but when you working with business requirements and timelines out of scope work is always in the backlogs. You do what's required and that's mostly straightforward stuff. So, I thought looking into more of ruby can help me take something back.
[07:08:25] syndikate: Oh alright, that's quite a lot of stuff to bookmark now :D
[07:08:47] syndikate: Thanks havenwood !
[07:09:21] syndikate: I am trying to see how I can (If I can) improve the tooling and use it to it's utmost potential in my project
[07:09:35] syndikate: mostly the ruby gems and all


[13:43:02] syndikate: How long does y'all monolith app's test suite's take to complete? Is something near to an hour normal thing?
[13:51:12] syndikate: tbuehlmann, do they have any writeup on how they have parallelized it? (I know it's coming in rails 6 and also know about parallel_tests), just curious
[13:51:21] syndikate: Also, what is it that you mean by testing preferences?
[13:52:11] syndikate: In such cases what do we do when we want a pipeline to be completed before having a PR merged? We check for the "green tick" before merging a branch and I was trying to see how I can bring the spec timings down
[14:05:00] syndikate: Looks like I scared you away
[14:09:08] syndikate: tbuehlmann, alright. I have got all those in the app now.
[14:09:22] syndikate: fox_mulder_cp, how do you segregate the relevant tests?
[14:13:53] syndikate: I was thinking along the lines of an automated test. What I had in mind was when a person submits a PR, run a subset of tests and not the whole suite. Trying to figure that "subset" is what am trying to do for now.
[14:13:58] syndikate: Not sure if I made sense
[14:46:52] syndikate: tbuehlmann, yeah that's the thing. It could break something else.


[12:35:50] syndikate: Anybody used parallel_tests gem with database_cleaner to run capybara tests? I am running into issue in my pipeline where it gets stuck and not exiting eventually pipeline has to time out
[12:35:57] syndikate: Not sure where to start debugging from


[06:05:31] syndikate: I see this method #with_responders in a codebase I am working on but I can't figure where it is coming from. It's being called on ActiveRecord collection object
[06:22:03] syndikate: TLDR; Need info on `with_responders` method
[06:25:00] syndikate: Correction - it's a relation object
[06:34:55] syndikate: My bad everyone, feel so stupid right now. There was a concern written for some other context but used the same naming
[06:35:22] syndikate: Grep failed and I didn't notice
[06:35:27] syndikate: On local code


[06:19:56] syndikate: IGnorAND, yes, I am trying to understand more innards of the gem. Still looking into it.


[18:49:33] syndikate: I am trying to understand the new Zeitwerk Gem and how it fixes the current issue. Have been going through the code and current Auto Load issues, but failing to understand. Can anybody give me few pointers here please?


[05:13:55] syndikate:
[05:14:05] syndikate: There is a typo here -> s/had/add
[05:14:11] syndikate: It's already fixed in master
[05:14:21] syndikate: But not reflected here


[04:43:10] syndikate: Is it advised to use Pundit rules in views? I have this page in which a partial has to be rendered only if the user has a certain role.
[04:48:10] syndikate: Scratch that^


[04:22:28] syndikate: fox_mulder_cp, Oh okay.


[11:20:53] syndikate: Do we use son serialisers for non model object? My API has to return a value( integer ) and I can't figure how I would create a serialiser for it. Should I be using jsonapi then I can't create it for an object with no model associated
[11:21:25] syndikate: Just creating a placeholder model object seems overkill and also it won't have a unique id


[05:41:40] syndikate: I have some javascript code that dynamically loads page content using fetch, this code fails in my build pipeline but passes in local. Where do I even start debugging it? I have no clue
[05:41:59] syndikate: Could it be something related to ES6?


[17:25:01] syndikate: Ping timeout: 252 seconds
[17:26:19] syndikate: has joined #RubyOnRails
[17:26:19] syndikate: has joined #ruby


[17:42:00] syndikate: Not sure what caused this - I used draper gem, created a decorator which has a field being called itself inside a method with same name essentially going into an infinite loop. So, the app got stuck and I killed it. This somehow broke my mysql data. The table name got rewritten and I am not sure where to start debugging for this. Although, I could replace my dev data and go ahead but I want to inv
[17:42:05] syndikate: estigate what happened.


[00:18:40] syndikate: Ping timeout: 240 seconds
[00:19:13] syndikate: has joined #RubyOnRails
[00:19:13] syndikate: has joined #ruby


[14:05:18] syndikate: Ping timeout: 264 seconds
[14:05:33] syndikate: has joined #RubyOnRails
[14:05:33] syndikate: has joined #ruby


[06:05:25] syndikate: Does this PR means that there won't be anymore coffee script left in Rails?
[06:06:29] syndikate: Think I just misread that


[15:01:36] syndikate: Trying to do a redirect_to to the same controller's index action after a PUT request. The PUT request is made using javascript fetch. But unfortunately render does not happen - rails log shows the page being sent with status 200 but at the browser only the 'being redirected' html page is recieved.
[16:11:09] syndikate: crankharder,
[16:11:18] syndikate: But I guess you are right, that's where I must be missing it
[16:13:25] syndikate: has left #RubyOnRails: ("Leaving")
[16:15:54] syndikate: has joined #RubyOnRails
[16:16:13] syndikate: Exited by mistake, so if crankharder you said anything I missed it :/
[17:22:56] syndikate: thasnk crankharder


[18:53:22] syndikate: Hey, can someone help me understand why this happens?


[04:20:34] syndikate: Anybody upgraded to rubicon 0.6 on a rails project and faced any issues?


[06:53:17] syndikate: If time cop is not used in `before` block would the time freezing leak out globally to all specs?
[07:03:44] syndikate: Or rather I am looking for a strong argument on why time cop should be in `before` blcok


[06:54:57] syndikate: When sorting with ransack if the field values are all same ransack does not sort the entire table - how does ransack manage to do that?
[06:56:00] syndikate: My assumption was this - even if the specific column values are all same, the table should get sorted desc and ask alternatively. Is it because the SQL query returns the rows without difference?


[08:34:18] syndikate: Is there any naming convention for boolean field?



[15:42:49] syndikate: Are you trying to do array1 - array2?


[03:55:54] syndikate: Is module or class preferred for creating namespaces models?
[04:02:15] syndikate: Alright thanks baweaver, anywhere I can read why that's preferred?
[04:07:51] syndikate: Oh okay, yeah here its' just purely namespacing purpose with not much functionality of it's own, rather than define a self.table_name_prefix
[04:12:44] syndikate: pipework, can you explain that with a gist pleasE?
[04:14:33] syndikate: Oh, okay TIL thanks pipework
[04:38:33] syndikate: baweaver, pipework another thing though - I have a table_name_prefix for the intended tables (obviously), so as per Rails 5 convention is it okay to create a module and declare a self.table_name_prefix method in it?
[04:39:27] syndikate: I tried, it works. I wanted to know if it's a preferred approach to have such a method in module
[04:51:07] syndikate: baweaver, pipework This is the kind of simplified setup I have now -
[04:52:25] syndikate: There is no table for library as such but book and division
[04:57:22] syndikate: Sorry if any confusions were caused, I thank you guys' help. Just wanted to understand if I have any convention to follow


[20:19:28] syndikate: *.net *.split
[20:21:02] syndikate: has joined #ruby
[20:21:02] syndikate: has joined #RubyOnRails


[00:57:12] syndikate: *.net *.split
[01:04:29] syndikate: has joined #RubyOnRails
[01:04:29] syndikate: has joined #ruby
[08:17:11] syndikate: Can someone help me figure how to add filter in 'administrate' gem?


[23:02:49] syndikate: *.net *.split
[23:03:11] syndikate: has joined #ruby
[23:03:11] syndikate: has joined #RubyOnRails


[09:48:02] syndikate: Andr3as, can you elaborate please?
[09:53:28] syndikate: Or you could add a class to the field if the returned object has no error for it?
[09:53:53] syndikate: Which I believe could be a repetitive task


[04:07:11] syndikate: tycoon177, as in if I use `probations` it will be come `...probations_path` but if I use `probation` it will become `...probation_index_path`


[15:56:10] syndikate: Does rail infer paths from the resource's plural/singular status/
[16:07:03] syndikate: tycoon177, nope. I understand that difference. I had a route like this `resources :probation`. Here, I didn't provide a plural name and things were all quite messed up
[16:07:33] syndikate: I thought it doesn't matter what the resource name's state is but `resource` or `resources` mattered
[18:54:49] syndikate: tycoon177, okay. Although I thought even if I don't give plural names, only the naming schema would be screwed, apparently the whole path is changed


[18:57:24] syndikate: Can someone help me understand this line of code?
[18:57:28] syndikate: ` label onclick="javascript:window.location.href='#{url_for(params.permit(:limit, :q => [:name_cont, :title_cont, :deleted_at_present]).merge(limit: limit))}'"`
[18:57:39] syndikate: I got it from a view file
[18:57:53] syndikate: I understood till url_for, which would give teh current path
[18:58:03] syndikate: Changing href will reload to that path
[18:58:13] syndikate: What's the role params.permit have there?
[18:58:57] syndikate: I understand what params.permit does, but trying to figure how it helps there


[11:40:58] syndikate: Guys, I have a question related to view logic. One of my view requires data from lot of tables and conditions. As a start I have a service which eager loads all the records and does some transformations to create a data structure and pass to view.
[11:41:35] syndikate: Although In view I still need to alter the data structure, I was wondering where could I put all these logic - wasn't sure if view objects would fit in
[11:42:03] syndikate: I have managed to move out all the database calls to the controller, but there is still some data transormaation left.
[11:42:18] syndikate: Any tips/pointers?


[08:24:04] syndikate: Is there any helper In rails where I can show the time difference in XX year YY months only? I was looking at disance_of_time_in_words but wasn't sure if that was possible in that method
[08:47:29] syndikate: Trying to use scope: for distance_of_time_in_words, looks much cumbersome to get it working the way I want
[08:47:41] syndikate: More inclined towards writing a silly method


[06:27:55] syndikate: Not sure if it's the right way to do it but is it possible to lazy load in rails console?
[06:29:06] syndikate: So what am trying to do is, calling an enumerator method on an eager loaded association, if that association is not eager loaded ( i.e lazy loading) then what would happen when that enumerator method is called?
[06:30:51] syndikate: Oh wait I think I got it all wrong


[06:18:12] syndikate: In one of my methods I have to call params[:date] three times since I am passing it to different methods. Rubocop highlights this and tells me I am calling it multiple times. I am not sure how to address this, is assigning that to a variable and using it a good practice? Or I just ignore it?
[06:18:25] syndikate: There has to be some reason the rule exists, so was wondering about it
[06:28:16] syndikate: Yeah so I was calling that hash more than once but I saw no use in assigning it to a variable. Alright, thanks.


[06:25:03] syndikate: I need to temporarily disable has_secure_token on a field. Is it okay if I don't migrate and remove the field but just remove the line `has_secure_token token_field`?


[12:15:23] syndikate: Date.strptime gave me this error Exception: invalid strptime format - `%F'. I can't figure what %F is. My date to parse is of the format this "14 Jul 2018"
[12:28:25] syndikate: konsolebox, I am just trying it out in irb
[12:32:14] syndikate: %F - The ISO 8601 date format (%Y-%m-%d)
[12:32:25] syndikate: That doesn't match what I gave
[12:32:34] syndikate: Hence my argument is wrong
[12:33:19] syndikate: Yeah, I think I got confused there with couple of issues
[12:36:39] syndikate: Okay, I need to clarify couple of things. If not template is passed strptime uses %F
[12:37:31] syndikate: That's correct, right?
[12:41:21] syndikate: I was looking at the source code of that method. So, my conclusion is that I was passing wrong string format.
[12:43:16] syndikate: I should have used this Date.strptime('7 Jul 2018', "%d %b %Y")
[12:43:59] syndikate: Now, my actual problem here is that my backed expects another format and teh frontend provides another
[12:44:02] syndikate: Oh too late
[12:44:17] syndikate: Time to talk to frontenders
[12:44:44] syndikate: I have a validator send to expect a format and parsing happens with that format
[12:44:49] syndikate: Set to expect*
[12:45:58] syndikate: I have other views providing the date in the expected format
[12:46:04] syndikate: I would prefer everything to be unique
[12:46:16] syndikate: And not add an extra case for a specific page
[12:46:23] syndikate: Hope that makes sense dminuoso
[12:55:33] syndikate: Okay, so how do you say this can be solved? I have some code in backend which expects Date.strptime('date_string', EXPECTED_FORMAT)
[12:55:42] syndikate: This is being used at multiple places
[12:56:01] syndikate: Hence everywhere that format is _expected_
[13:02:05] syndikate: dminuoso, I am moving towards something similar to a. I will get to b.


[10:51:45] syndikate: I have a ActiveJob which updates the associations of a record. The association ids are passed as arguments. As of now I blindly get the id and write it to the target record.
[10:52:01] syndikate: I found a gotcha here, if someone messes up the id order nothing can be done
[10:52:18] syndikate: Should I query the db to check if teh id exists before write?
[10:52:36] syndikate: Or should this be kept as something that the devs should take care of?


[03:40:08] syndikate: mguex, Yeah I ended up doing something similar, thanks!


[06:03:02] syndikate: Is there an opposite of Hash#slice in ruby? Like I can provide a key which I don't want and display the hash with rest of the key and values?
[06:05:43] syndikate: Okay, I doubt if it works on hashes, let me check
[06:07:48] syndikate: Okay, so there is no ready method which would accept just a key I would have to provide a block
[06:10:13] syndikate: Makes sense. Guess I have that rails disease
[06:10:57] syndikate: In fact #except works as well like elomatreb said. But, good to know these. Thanks elomatreb dminuoso
[06:11:07] syndikate: I already have it but I wanted to know about ruby as well :)
[06:11:42] syndikate: dminuoso, if I use rails methods?
[06:13:19] syndikate: I faced that issue
[06:13:28] syndikate: And was irked
[06:13:41] syndikate: I kept providing keys for a while and was wondering why the method is not working
[06:13:51] syndikate: Keys == symbols
[12:28:34] syndikate: Is there a way to put a unique constraint/index on a specific value? As in I need the unique index on two fields when one of the field has a specific value
[12:28:58] syndikate: I have put this at a model level. Is it possible at Database level?
[13:03:34] syndikate: Putting it in another way how can I created a conditional unique constraint


[12:35:42] syndikate: Can anybody help me understand the difference between concurrency and number of workers in sidekiq settings? I do understand what workers are and concurrency sets the number of threads for the sidekiq process.
[12:47:58] syndikate: tbuehlmann, I was looking at sidekiq configs. I see an option to set concurrency and it says it means number of threads. What does that mean? Number of threads for the sidekiq process as a whole?
[12:50:13] syndikate: Okay, so how does number of workers and number of threads come into play? tbuehlmann
[12:53:29] syndikate: tbuehlmann, Okay I think my understanding was off - so how do I increase the number of workers?
[12:54:30] syndikate: Config file
[12:56:26] syndikate: Ah okay. So I thought they were different
[12:56:35] syndikate: If I want to increase workers, I increase concurrency
[12:56:47] syndikate: Which means it will increase the number of threads
[12:56:55] syndikate: As each worker takes its own threads
[13:00:41] syndikate: Oh okay tbuehlmann Thanks! Will read up and get back if I have any more doubts


[01:46:41] syndikate: Ping timeout: 248 seconds
[01:53:22] syndikate: has joined #ruby
[01:53:22] syndikate: has joined #RubyOnRails


[08:22:49] syndikate: What was rib navigation shortcut inspiration?
[08:22:53] syndikate: I see resemblance to emacs


[09:15:08] syndikate: Why is there no specific ruby 2.4.1 docker image file in registry?
[09:20:50] syndikate: Can I use 2.4.4 for a ruby app of version 2.4.1
[09:24:12] syndikate: Yeah, am trying it out now dminuoso
[09:24:22] syndikate: It's a simple rails app, I hope nothing breaks
[09:25:16] syndikate: dminuoso, Na, this is a scaffold app, my aim is to learn something else - so there is nothing in the app basically
[09:27:20] syndikate: dminuoso, yes my bad. I should have asked that. But was not sure of it.
[09:27:25] syndikate: I was thinking of the gems involved
[09:59:01] syndikate: Oh okay, thanks dminuoso
[12:21:50] syndikate: How can I change the redis url for my rails app? I was trying to deploy it in kubernetes but rails is unable to connect to redis
[12:22:00] syndikate: The redis service is available as 'redis'
[12:26:49] syndikate: Not sure if that was for me


[19:00:35] syndikate: If I assign an ENV variable in a before block in a rspec test, does it pollute the whole test session or will it be available only for the specific spec file?
[19:05:19] syndikate: I was wondering if I should add an after block and remove it. I only need it in two spec files. Thought I will add it in manually
[19:13:20] syndikate: Or shall I just add it in env/test.rb config itself?
[19:15:32] syndikate: What's the proper format to stub it?
[19:15:41] syndikate: Also, so adding it in config is wrong?
[19:19:12] syndikate: Okay, let me try that
[19:20:42] syndikate: BloopMonster, okay it fails in one case. I am having a spec for a service. RSpec.describe QiscusSyncService do
[19:21:12] syndikate: So, when that gets initialised, it fails. It expects it to be present before that I believe
[19:21:23] syndikate: Since that service fetches it
[19:29:41] syndikate: I am gonna put it in env/test.rb for now


[02:46:51] syndikate: *.net *.split
[02:47:43] syndikate: has joined #RubyOnRails
[02:47:51] syndikate: has joined #ruby
[06:17:43] syndikate: Check the job code. Check if the mail delivery service is working fine. Check if the Env variables for the same are set properly