svkurowski

Activity Graph

Page 1 of 2 | Next »

2017-06-17

[08:29:36] svkurowski: Ping timeout: 260 seconds

2017-06-15

[14:05:35] svkurowski: Ping timeout: 240 seconds
[14:08:23] svkurowski: has joined #ruby

2017-06-14

[04:27:57] svkurowski: Ping timeout: 240 seconds
[04:36:45] svkurowski: has joined #ruby
[04:37:12] svkurowski: has joined #RubyOnRails
[13:06:27] svkurowski: Ping timeout: 240 seconds
[13:08:30] svkurowski: has joined #ruby
[13:08:50] svkurowski: has joined #RubyOnRails

2017-05-14

[12:34:36] svkurowski: has joined #ruby
[12:34:56] svkurowski: has joined #RubyOnRails

2017-04-11

[21:20:00] svkurowski: Ping timeout: 260 seconds

2017-03-30

[20:38:57] svkurowski: Ping timeout: 240 seconds
[20:41:26] svkurowski: has joined #ruby
[20:41:26] svkurowski: has joined #RubyOnRails

2016-07-10

[04:59:56] svkurowski: *.net *.split
[08:54:00] svkurowski: has joined #ruby
[08:54:06] svkurowski: has joined #RubyOnRails

2016-07-07

[23:16:55] svkurowski: Ping timeout: 258 seconds

2016-06-28

[14:45:33] svkurowski: Ping timeout: 240 seconds
[14:47:53] svkurowski: has joined #ruby
[14:47:53] svkurowski: has joined #RubyOnRails
[15:23:27] svkurowski: Ping timeout: 276 seconds
[15:28:21] svkurowski: has joined #ruby
[15:28:21] svkurowski: has joined #RubyOnRails

2016-06-17

[08:42:46] svkurowski: Ping timeout: 240 seconds
[08:42:49] svkurowski: has joined #ruby
[08:42:49] svkurowski: has joined #RubyOnRails

2016-05-03

[19:42:26] svkurowski: *.net *.split
[19:51:37] svkurowski: has joined #RubyOnRails
[19:51:42] svkurowski: has joined #ruby

2016-04-29

[14:42:11] svkurowski: Ping timeout: 244 seconds
[14:54:31] svkurowski: has joined #ruby
[14:54:31] svkurowski: has joined #RubyOnRails

2016-04-13

[10:39:37] svkurowski: Ping timeout: 268 seconds
[10:40:24] svkurowski: has joined #ruby
[10:40:24] svkurowski: has joined #RubyOnRails

2016-04-11

[17:04:09] svkurowski: Remote host closed the connection
[17:05:47] svkurowski: has joined #RubyOnRails
[17:05:48] svkurowski: has joined #ruby
[17:29:03] svkurowski: Remote host closed the connection
[17:29:34] svkurowski: has joined #ruby
[17:29:34] svkurowski: has joined #RubyOnRails

2016-03-31

[03:32:56] svkurowski: Ping timeout: 246 seconds

2016-03-28

[15:54:40] svkurowski: has joined #ruby
[15:54:40] svkurowski: has joined #RubyOnRails

2016-03-14

[07:15:29] svkurowski: *.net *.split

2016-03-10

[00:49:04] svkurowski: Ping timeout: 248 seconds
[00:49:55] svkurowski: has joined #ruby
[00:49:55] svkurowski: has joined #RubyOnRails

2016-03-07

[09:21:53] svkurowski: Remote host closed the connection
[09:25:36] svkurowski: has joined #ruby
[09:25:36] svkurowski: has joined #RubyOnRails

2016-02-28

[12:59:48] svkurowski: Ping timeout: 246 seconds
[13:01:13] svkurowski: has joined #ruby
[13:01:13] svkurowski: has joined #RubyOnRails
[14:51:26] svkurowski: Ping timeout: 244 seconds
[14:58:49] svkurowski: has joined #ruby
[14:58:49] svkurowski: has joined #RubyOnRails

2016-02-27

[21:36:30] svkurowski: Ping timeout: 268 seconds

2016-02-19

[12:19:58] svkurowski: I upgraded to rails 5 and want to implement websockets using this guide (https://github.com/rails/rails/tree/master/actioncable) with thin as the server, but I get this message when connecting via JS: WebSocket connection to 'ws://localhost:28080' failed: Error during WebSocket handshake: 'Upgrade' header is missing
[12:20:11] svkurowski: Has anyone encountered this?
[12:38:52] svkurowski: Oh I will try puma then.. The guide says "If you are using a threaded server like Puma or Thin, the current implementation of ActionCable can run side-along with your Rails application."

2016-01-30

[01:04:02] svkurowski: *.net *.split

2016-01-26

[13:14:01] svkurowski: Remote host closed the connection
[13:14:34] svkurowski: has joined #ruby
[13:14:34] svkurowski: has joined #RubyOnRails

2016-01-18

[19:48:09] svkurowski: I'm using devise_auth_token gem for a new API. How do you debug such APIs? Are there any helpful apps for this? Especially it's kinda inconvenient that the access-token changes on every request

2016-01-16

[20:45:18] svkurowski: Remote host closed the connection
[20:45:50] svkurowski: has joined #RubyOnRails
[20:45:51] svkurowski: has joined #ruby

2015-12-29

[12:25:10] svkurowski: Ping timeout: 260 seconds
[12:26:40] svkurowski: has joined #ruby
[12:26:40] svkurowski: has joined #RubyOnRails

2015-12-21

[09:50:29] svkurowski: *.net *.split
[09:55:53] svkurowski: has joined #RubyOnRails
[09:55:54] svkurowski: has joined #ruby

2015-12-02

[15:37:13] svkurowski: *.net *.split
[15:41:34] svkurowski: has joined #ruby
[15:41:47] svkurowski: has joined #RubyOnRails
[15:53:20] svkurowski: *.net *.split
[16:47:49] svkurowski: has joined #ruby
[16:48:06] svkurowski: has joined #RubyOnRails

2015-11-30

[00:49:27] svkurowski: Ping timeout: 260 seconds
[03:57:21] svkurowski: has joined #ruby
[03:57:21] svkurowski: has joined #RubyOnRails
[04:28:54] svkurowski: Ping timeout: 245 seconds
[08:16:28] svkurowski: has joined #RubyOnRails
[08:16:29] svkurowski: has joined #ruby
[10:55:38] svkurowski: Ping timeout: 260 seconds
[10:56:30] svkurowski: has joined #RubyOnRails
[10:56:31] svkurowski: has joined #ruby
[13:42:15] svkurowski: Ping timeout: 259 seconds
[15:45:20] svkurowski: has joined #RubyOnRails
[15:45:21] svkurowski: has joined #ruby

2015-11-26

[07:45:30] svkurowski: has joined #ruby
[07:45:30] svkurowski: has joined #RubyOnRails
[07:56:02] svkurowski: *.net *.split
[07:58:57] svkurowski: has joined #ruby
[07:58:57] svkurowski: has joined #RubyOnRails
[19:01:58] svkurowski: *.net *.split

2015-11-23

[16:51:00] svkurowski: Ping timeout: 250 seconds
[16:53:22] svkurowski: has joined #ruby
[16:53:22] svkurowski: has joined #RubyOnRails

2015-11-22

[03:38:36] svkurowski: Ping timeout: 264 seconds
[03:45:34] svkurowski: has joined #ruby
[03:45:34] svkurowski: has joined #RubyOnRails

2015-11-18

[10:48:01] svkurowski: has joined #ruby
[10:48:01] svkurowski: has joined #RubyOnRails

2015-11-16

[23:06:51] svkurowski: *.net *.split

2015-11-11

[16:17:07] svkurowski: Ping timeout: 240 seconds
[16:22:30] svkurowski: has joined #RubyOnRails
[16:22:31] svkurowski: has joined #ruby

2015-11-09

[14:41:31] svkurowski: Ping timeout: 260 seconds
[14:48:19] svkurowski: has joined #ruby
[14:48:19] svkurowski: has joined #RubyOnRails
[15:08:27] svkurowski: Remote host closed the connection
[15:31:28] svkurowski: has joined #ruby
[15:31:28] svkurowski: has joined #RubyOnRails

2015-11-04

[22:27:10] svkurowski: How can I change which language Ruby uses for Month and Weekday names in DateTime::strftime

2015-10-27

[20:49:04] svkurowski: has joined #ruby
[20:49:29] svkurowski: ruby -e "require 'date'; puts Date.rfc3339('2009-04-04T09:51:28+00:00').strftime('%Y/%m-%B/%d-%A/%H-%M')" > Why does this print 0 for the minute and the hour value?
[20:50:12] svkurowski: I'm trying to batch process a bunch of files
[20:51:38] svkurowski: Wow, I'm stupid
[23:09:22] svkurowski: Which environment variable do i have to set s.t. Datetime#strftime outputs day and month names in another language than English? I tried LANG=de_DE.UTF-8 LC_ALL=de_DE.UTF-8 LANGUAGE=de_DE ./script.rb but it still outputs english names

2015-10-25

[17:06:24] svkurowski: Remote host closed the connection
[17:06:54] svkurowski: has joined #RubyOnRails

2015-10-22

[23:09:58] svkurowski: Remote host closed the connection
[23:10:29] svkurowski: has joined #RubyOnRails

2015-10-16

[00:15:53] svkurowski: has joined #RubyOnRails

2015-10-15

[23:33:22] svkurowski: Ping timeout: 265 seconds
[23:39:55] svkurowski: has joined #RubyOnRails

2015-10-14

[16:50:18] svkurowski: *.net *.split
[17:00:01] svkurowski: has joined #RubyOnRails
[17:07:20] svkurowski: *.net *.split
[17:10:32] svkurowski: has joined #RubyOnRails

2015-10-05

[05:02:58] svkurowski: has joined #RubyOnRails

2015-10-02

[09:17:48] svkurowski: Ping timeout: 250 seconds

2015-09-24

[05:12:06] svkurowski: Remote host closed the connection
[05:14:06] svkurowski: has joined #RubyOnRails

2015-09-23

[17:46:44] svkurowski: Remote host closed the connection
[17:57:25] svkurowski: has joined #RubyOnRails

2015-09-10

[03:39:28] svkurowski: has joined #RubyOnRails
[03:41:27] svkurowski: Hi, if I have a Many to Many relation between User and Course, and I have a collection of courses, how can I access the users of the courses without duplicates?
[03:42:54] svkurowski: I know that an ugly solution is courses.includes(:users).flat_map(&:users) but that still leaves me with duplicates
[03:52:55] svkurowski: I managed to solve it using User.joins(:courses).where(courses_users: {course_id: course_ids})
[03:53:27] svkurowski: Where course_ids is an array of course ids
[03:54:21] svkurowski: However, this performs an INNER JOIN on the courses table, too, which is unnecessary, because I only need the users (and therefore INNER JOIN on courses_users should suffice)
[03:56:09] svkurowski: I'm not sure on what to join? I can not join(:courses_users), because courses_users is not an relationship of User but merely a join table
[03:56:38] svkurowski: I could join using a String SQL Fragment but that seems very verbose
[03:57:00] svkurowski: (http://guides.rubyonrails.org/active_record_querying.html#using-a-string-sql-fragment)
[04:02:18] svkurowski: Ah, well I guess I will just take the slower query to accomplish higher readability/maintainability in this case
[04:02:34] svkurowski: Thanks for your help :)

2015-07-28

[21:27:44] svkurowski: Remote host closed the connection

2015-07-13

[15:36:52] svkurowski: *.net *.split

2015-07-12

[21:53:41] svkurowski: has joined #RubyOnRails
[21:55:27] svkurowski: In production I am running ruby with rbenv and the thin server globally installed via gem install thin. However rails has stronger dependencies than thin (rack >= 1.6.4 or something) and thus I have to manually install rack globally using gem install rack -v 1.6.4. How do you solve this problem?

2014-11-15

[11:14:21] svkurowski: Shouldn't number_with_delimiter(1.0, strip_insignificant_zeros: true, separator: ",") output "1" instead of "1,0"?

2014-11-01

[23:26:04] svkurowski: Hey guys, how would you validate a field that has been created like this: t.decimal :value, precision: 2, scale: 1 and is supposed to only take a value from 1.0 to 6.0 in 0.5 steps?
[23:34:37] svkurowski: soahccc: Okay thanks for the tip :)

2014-10-16

[11:23:00] svkurowski: In the source of the rails assets gem I'm writing, I have included some rake tasks to fix the original assets (e.g. css urls). In the rake file I now want to read from a template file and replace some string. The template file itself should not be included in the gem. Where should i put it? A new folder like helpers? Or somewhere in the lib folder?

2014-10-11

[14:48:39] svkurowski: What is the best way to test a gem with the whole purpose of adding files to the rails assets pipeline? I tried to look at the jquery-rails gem but it doesnt seem to have tests at all
[15:03:23] svkurowski: elaptics: Well I want to test, that the rails app serves the files correctly and that the css background-image urls got fixed correctly (which is done by a rake task automatically). It seems like the way to go is to create a dummy rails application which requires the gem and to do the testing inside of the rails app
[15:05:29] svkurowski: elaptics: Yeah it seems so.. thanks for your input :)
[15:11:43] svkurowski: odraencode: https://github.com/plataformatec/devise ;)
[15:17:17] svkurowski: odraencode: Then roll your own solution.. Maybe this describes a possible solution: http://nycda.com/blog/basic-user-authentication-model-in-rails-4/
[15:18:14] svkurowski: odraencode: disclaimer: I did my first rails app with devise ;) I think there's more to do wrong with a custom solution. It depends though, how much will the authentication you want differ from the one that devise assumes you want?
[15:18:57] svkurowski: odraencode: Mine happened to be pretty close to devise's idea, just a lot less (e.g. i didn't need registration forms etc), which is easy to do
[15:22:07] svkurowski: odraencode: Then use devise, you won't regret it :D See https://github.com/plataformatec/devise#getting-started on howto disable some unneded modules of devise

2014-10-09

[21:47:58] svkurowski: I'm gemifying some assets developed by a 3rd person and released under the MIT License. The license file starts with a copyright notice. What should my License file look like? Obviously I have to keep the MIT License and the original copyright in some way, but i also want to add my own copyright to the stuff I have written
[21:50:52] svkurowski: webdestroya: yh prolly thats the way to go. Especially the othershit part sounds good ;)
[22:43:02] svkurowski: The assets that I bundle in a gem require jquery. should I add jquery-rails as an dependency of the gem?
[22:43:28] svkurowski: Because maybe some folks included jquery manually in the assets or vendor folder right?
[22:47:39] svkurowski: webdestroya: Yh good idea explicitly stating that :) thank you

2014-10-06

[13:40:26] svkurowski: https://gist.github.com/anonymous/431fb864b7b779cfed5b I understand why the second scope is not working as expected, but could anyone point me to a working solution? An User has_many :roles obviously :)
[13:48:20] svkurowski: Anyone has an idea on my scope problem? :(
[13:52:03] svkurowski: banas: Yeah, thats normal, ActiveRecord derives the attributes from the tables columns.. That's part of rails' convention over configuration principle I'd say
[13:58:29] svkurowski: banas: How did you configure e.g. the shirt_size parameter? Did you add it as an permitted parameter in the applicationcontroller? see https://github.com/plataformatec/devise#strong-parameters
[14:00:19] svkurowski: banas: Is the registration form working though (is it setting the shirt_size correctly)? Thats a difference to say, the rails console
[14:01:18] svkurowski: You can configure basically all of that tho
[14:02:28] svkurowski: https://gist.github.com/anonymous/431fb864b7b779cfed5b Does noone have an idea of a working alternative to the second scope?
[14:02:40] svkurowski: Im pretty sure its easy again and i just dont see it
[14:03:36] svkurowski: Ill poste further info on whats not working
[14:04:37] svkurowski: Say I have an User test_user with two roles, administrator and guest. test_user will still be included in User.without_role(:administrator),
[14:06:28] svkurowski: sevenseacat: Well I see, why it doesnt work. User JOIN RolesUsers JOIN (Role \ {AdministratorRole}) will obviously still include the test_user
[14:07:00] svkurowski: sevenseacat: But I know neither SQL nor activerecord filters enough to come up with something that works
[14:07:36] svkurowski: sevenseacat: Ok, inc :)
[14:10:53] svkurowski: sevenseatcat: https://gist.github.com/anonymous/e201efeb0783210ed255
[14:13:09] svkurowski: sevenseacat: Exactly
[14:13:20] svkurowski: sevenseacat: The thing is, i dont want them :D
[14:13:56] svkurowski: sevenseacat: Im looking for something that will filter out all users with the administrator role, independent of whether they have other rules or not
[14:18:34] svkurowski: sevenseacat: You're a genius <3 it seems to be working. Trying not to be greedy here, but do you have an idea on a scope for users with only the specified rule? Should i do sth like roles_count = 1 and with_role(role_name) ?
[14:18:50] svkurowski: sevenseacat: Or is there a more efficient way
[14:37:08] svkurowski: sevenseacat: Thanks for the link, but im still struggling. I think Im grouping on the wrong column, any idea? https://gist.github.com/anonymous/0886d83249720b08ab8e
[14:41:50] svkurowski: sevenseacat: HAVING requires a GROUP_BY before it.
[14:41:57] svkurowski: sevenseacat: Huh, ill try again
[14:43:34] svkurowski: sevenseacat: I have created an user with all three available roles, and he is in the result of User.with_only_role(:participant) for some reason
[14:47:22] svkurowski: sevenseacat: I think merge is incorrect, one needs the intersection. Is there a method for that?
[14:48:00] svkurowski: sevenseacat: User.joins(:roles).group('users.id').having('count(users.id) = 1').merge(User.with_role(:participant)) will output users with exactly one role or with the participant role
[14:48:15] svkurowski: sevenseacat: Which makes sense, thats the meaning of merge isnt it
[14:48:40] svkurowski: sevenseacat: I think we need the intersection, i.e. exactly one role AND has participant role
[14:49:20] svkurowski: sevenseacat: Oh yh I just saw in the documentation.. Weird, Ill look into it
[15:04:49] svkurowski: sevenseacat: The thing with merge is definitely not working (even though it should), I managed to create a SQL query with a subquery that works tho, now I just need to formulate it in activerecord. https://gist.github.com/anonymous/79253af43cdb07b172d6
[16:39:40] svkurowski: Scriptonaut: https://github.com/evrone/quiet_assets
[16:41:34] svkurowski: ACTION raises his hat

2014-10-05

[13:40:43] svkurowski: I'm struggling to find the correct way to do the following: Two models, say Users and Posts. A Post belongs_to an User. I want to get all the users with published posts. Post.where(published: true).users is not working. Also every user can have at most one post, so there is no need to filter duplicate users. I'm pretty sure the solution is super easy and I'm just blind :/
[13:43:04] svkurowski: Thank you for the pointer guys, I'll try that :)
[13:52:33] svkurowski: tbuehlmanns suggestion works without any changes :) thank you

2014-09-30

[16:43:59] svkurowski: What would be the best active record type for exam grades that go from 1, 1.5, 2, 2.5 to 5.5, 6? Float or decimal or anyting completely different? I will need to calculate the average grade of an exam
[16:45:29] svkurowski: baweaver: Memory is not an issue.. Then i'll take float :D
[16:47:36] svkurowski: workmad3: Would be a Decimal(2,1) if I understood that type right, wouldnt it?

2014-07-07

[10:15:43] svkurowski: What is the best way to add some instance methods to a subset of my model instances? I have users associated with many roles, and if a User has a certain role I want the instance to have some additional methods. Should I just define the methods for all instances and throw an exception when the method is called on users without the role_
[10:17:37] svkurowski: mikecmpll: using sti? I dont really want to add attributes
[10:21:18] svkurowski: Demerzel: Well for example I want to add new many to many relationships to specific users. Say I have a role 'student' and I want to add a many to many relationship to Courses only for students
[10:23:41] svkurowski: Demerzel: Yes he could be a tutor, too. Then he would have another many to many relationship to courses (with a different name) etc pp
[10:26:26] svkurowski: But how could I specify multiple roles using sti?
[10:26:39] svkurowski: Yeah that is what i was thinking
[10:50:46] svkurowski: Does anyone have an idea what I'm doing wrong? https://gist.github.com/svkurowski/a3fa8101c14fb8f41c49
[10:53:02] svkurowski: sevenseacat: Welp, thank you :D

2014-06-28

[19:21:35] svkurowski: How can I add i18n translations for the activerecord error messages etc? E.g. "singular_table_name was successfully updated."
[19:33:54] svkurowski: pontiki: I didnt find it in the guides. Or atleast not howto find the file that contains all the keys and english values
[19:34:17] svkurowski: pontiki: But I just found the file in the activemodel bundle
[19:36:30] svkurowski: tewlz: I know how to override, and the link you gave me is just about adding additional locales folders. I was looking for a list of keys and the according english translations, so I can do them in my target language
[19:37:24] svkurowski: pontiki: That doesnt handle the messages. This file does though: https://github.com/rails/rails/blob/master/activemodel/lib/active_model/locale/en.yml
[19:37:57] svkurowski: pontiki: Okay maybe my question wasnt really easy to understand
[19:38:51] svkurowski: pontiki: Okay definitely ;) my bad
[19:39:19] svkurowski: pontiki: Im searching for a list of all the message keys, for errors and success etc pp. The file I linked is for the validation messages, now Im looking for success messages like " was successfully updated"
[19:39:35] svkurowski: pontiki: Those gotta be somewhere to
[19:41:22] svkurowski: pontiki: Do you have an idea where? They are not in the activerecord and not in the activemodel locale files
[19:44:01] svkurowski: pontiki: Oh welp :/ .. Thank you for helping and again sorry for the weird question
[19:59:11] svkurowski: diegoviola: Like php scales better than ruby
[19:59:39] svkurowski: diegoviola: If they suggested go or scala or something, okay, but php ... :D
[20:01:01] svkurowski: Yes, but some languages scale better than others
[20:01:09] svkurowski: Especially in performance

2014-06-20

[17:02:01] svkurowski: Is there a detailed resource on testing in rails you guys can recommend me?

2014-06-19

[14:12:57] svkurowski: Anyone knows why Rubocop wants me to "Rename has_role? to role?" ? Which cop determines this and why is it advised

2014-06-16

[15:03:27] svkurowski: I have setup a Many-To-Many relationship between User and Role. Based on the roles of the user I want to add additional methods and relationships. What is the rails way of handling this? Decorators?
[15:08:41] svkurowski: andywww: http://edgeguides.rubyonrails.org/configuring.html#configuring-rails-components
[23:35:21] svkurowski: I have setup users with multiple roles (many to many). Based on the roles of the user I want to add additional methods and relationships to the instance. What would be the best way to do so? Decorators?
[23:43:10] svkurowski: dda: Thank you, I will have a look into it
[23:45:47] svkurowski: Can i include concerns/modules conditionally? Like include Participations if has_role? :participant
[23:51:38] svkurowski: dda: Okay thank you :)

2014-06-12

[21:23:16] svkurowski: hfp: again those are just assumptions
[21:24:09] svkurowski: here you can see it tests @posts though: https://gist.github.com/anonymous/437ec5375206bd726b03
[21:24:18] svkurowski: hfp: (from https://github.com/rspec/rspec-rails)
[21:32:46] svkurowski: good evening