gavit

Activity Graph

Page 1 of 8 | Next »

2018-12-15

[03:13:18] gavit: Remote host closed the connection

2018-12-14

[02:31:37] gavit: Remote host closed the connection
[16:02:51] gavit: has joined #RubyOnRails
[16:03:28] gavit: if I were to make an api only app in RoR, where do I run the api consuming app that runs something like vue?
[16:26:48] gavit: @sevenseacat: I meant, if you run it on your own vm. Do I run an apache server with just HTML and JS
[17:52:12] gavit: Killed (hitchcock.freenode.net (Nickname regained by services))
[20:54:48] gavit: has joined #RubyOnRails
[20:55:19] gavit: Do you need rails-ujs for devise if you run with webpacker? I can't seem to log out.

2018-12-13

[20:06:32] gavit: has joined #RubyOnRails
[20:09:25] gavit: Read error: No route to host
[22:43:22] gavit: has joined #RubyOnRails
[22:44:05] gavit: <%= csp_meta_tag %> is missing attribute content or property, how can I add this?

2018-12-12

[00:30:44] gavit: has joined #RubyOnRails
[00:30:56] gavit: whats the diff between vue and vuejs when doing yarn add?
[01:47:35] gavit: Remote host closed the connection
[15:22:38] gavit: has joined #RubyOnRails
[15:27:26] gavit: Ping timeout: 250 seconds

2018-12-11

[00:02:55] gavit: @Radar well, I have several singular things, but I can't even load the page anymore now that I changed it. ActionController::UnknownFormat in OrganizationsController#index
[00:03:35] gavit: @Radar going to assume you're right and see what's wrong
[00:03:45] gavit: it looks correct in comparison to a template
[00:06:11] gavit: seems I had a singular view as well
[00:18:40] gavit: @radar, my code works again :)
[00:43:50] gavit: Remote host closed the connection
[00:45:07] gavit: has joined #RubyOnRails
[00:49:27] gavit: Ping timeout: 240 seconds
[01:12:03] gavit: has joined #RubyOnRails
[01:13:22] gavit: Anyone know how to make pgsql distinct work in rails? I did default_scope { select('DISTINCT ON (id_card_number) id_card_number, request_number, surname, given_name) } and this works untill I do a count on the model
[02:17:59] gavit: Remote host closed the connection
[12:33:55] gavit: has joined #RubyOnRails

2018-12-10

[23:43:54] gavit: has joined #RubyOnRails
[23:45:15] gavit: I have a <%= link_to organization.organization_name, organization %> in my view, but the link shows to /organization.id instead of to organization/id where am I doing something wrong? is it my routes?
[23:49:37] gavit: @radar, lemme check. I made the routes manually

2018-12-09

[00:04:45] gavit: Remote host closed the connection
[00:37:38] gavit: has joined #RubyOnRails
[03:12:23] gavit: Remote host closed the connection

2018-12-08

[02:23:57] gavit: has joined #RubyOnRails
[02:24:27] gavit: Hi, should the following still work in rails 5.2? - https://www.thegreatcodeadventure.com/managing-multiple-databases-in-a-single-rails-application/
[02:46:35] gavit: Remote host closed the connection
[02:57:44] gavit: has joined #RubyOnRails
[02:59:06] gavit: What would be the way to convert a timestamp on db level: select applicant_given_name, applicant_surname, TO_TIMESTAMP(validity_from/1000) from security_id;
[03:07:55] gavit: just want the validity in some kind of readable format (its stored in the db as a epoch timestamp*1000 (dont know why)
[03:07:55] gavit: andrew_v: it works in postgresql
[03:08:28] gavit: just not sure on how to run it in rails
[03:12:37] gavit: andrew_v: any idea?
[03:13:24] gavit: andrew_v: I do that in my model?
[03:14:17] gavit: I'd like to be able to do something like SecurityId.validity_from and get the timestamp
[03:23:21] gavit: I was hoping that just like how you can define a table with self.table_name you could do something with the fields
[03:34:58] gavit: andrew_v: DateTime.strptime((expiry_date/1000).to_s, "%s") seems to work :(
[03:53:52] gavit: Remote host closed the connection
[11:12:13] gavit: has joined #RubyOnRails
[11:54:19] gavit: I'm using gem 'webpacker' but I can't seem to load the js. I have run webpack-dev-server, and modified content_securoty_policy.rb How do I check what else could be wrong.
[12:27:59] gavit: hmm, the js works, its just jquery that doesnt seem to :(
[12:38:49] gavit: sevenseacat: lemme see if I can elaborate
[12:41:11] gavit: sevenseacat: https://dpaste.de/KNGC
[12:42:42] gavit: sevenseacat: its bootstrap version 3 installed via npm
[12:50:25] gavit: sevenseacat: okay, thanks I'll go look again
[13:01:05] gavit: odd, I swapped import 'bootstrap' with import 'bootstrap/dist/js/bootstrap.min.js'; and I get an error: Bootstrap's JavaScript requires jQuery. Looks more prosmising
[21:17:18] gavit: Remote host closed the connection
[22:00:14] gavit: has joined #RubyOnRails
[22:52:28] gavit: Can I write a default scope of a class in raw SQL?
[22:56:12] gavit: I'd like a group_by for my query

2018-12-07

[11:14:37] gavit: has joined #RubyOnRails
[11:18:52] gavit: Ping timeout: 250 seconds

2018-12-06

[00:01:10] gavit: has joined #RubyOnRails
[01:04:01] gavit: Remote host closed the connection
[09:04:29] gavit: has joined #RubyOnRails
[09:08:48] gavit: Ping timeout: 245 seconds
[11:39:11] gavit: has joined #RubyOnRails
[11:41:21] gavit: Read error: Connection reset by peer

2018-12-05

[01:16:37] gavit: has joined #RubyOnRails
[01:20:49] gavit: Ping timeout: 244 seconds
[11:34:37] gavit: has joined #RubyOnRails
[16:16:01] gavit: Remote host closed the connection
[16:18:24] gavit: has joined #RubyOnRails
[16:22:12] gavit: Read error: Connection reset by peer
[18:41:19] gavit: has joined #RubyOnRails
[20:45:06] gavit: Remote host closed the connection

2018-12-03

[14:37:56] gavit: has joined #RubyOnRails
[14:42:07] gavit: Ping timeout: 240 seconds
[19:07:49] gavit: has joined #RubyOnRails
[19:12:07] gavit: Ping timeout: 246 seconds

2018-12-02

[16:08:55] gavit: Remote host closed the connection
[16:09:28] gavit: has joined #RubyOnRails
[16:14:17] gavit: Ping timeout: 268 seconds

2018-12-01

[10:51:02] gavit: has joined #RubyOnRails
[12:03:43] gavit: does schema.rb get recreated if someone changes an old migration instead of adding a new migration?
[12:04:12] gavit: with a db:reset
[12:07:55] gavit: it doesnt seem to change it sadly
[12:10:33] gavit: tbuehlmann: rake db:drop && rake db:create && rake db:migrate is what I was looking for
[12:16:50] gavit: tbuehlmann: db:migrate:reset seems easier, thanks
[12:27:52] gavit: https://stackoverflow.com/questions/7164865/how-to-populate-fields-in-a-has-many-through-join-table <- is :physician => demento an old syntax? I get a syntax error on rails 5 (unexpected =>)
[12:32:39] gavit: tbuehlmann: https://dpaste.de/dpc5
[12:36:59] gavit: tbuehlmann: my ide likes your suggestion, rake db:seed however tells me syntax error, unexpected ( arg, expecting end-of-input ...employments << Employment.new ( :person => Person.find_by(fi.
[12:41:05] gavit: I never knew ruby was white space sensitive
[13:39:43] gavit: Remote host closed the connection
[15:50:59] gavit: has joined #RubyOnRails
[16:02:39] gavit: Remote host closed the connection
[16:03:11] gavit: has joined #RubyOnRails
[16:07:40] gavit: Ping timeout: 250 seconds
[18:36:50] gavit: has joined #RubyOnRails
[18:56:58] gavit: I have a membership which has a start_date and an end_date. I want to add a scope where I see who was a member in the period between begin_period and end_period. I thought the scope would be something like: scope :member_during, lambda {|begin_period, end_period| {:conditions => ['? >= start_date AND end_date >= ?', end_period.end_of_day, begin_period.beginning_of_day]}}
[18:57:29] gavit: this however prints everthing between the {}
[19:27:23] gavit: got the syntax down
[21:34:09] gavit: quiet in here

2018-11-30

[15:32:52] gavit: has joined #RubyOnRails
[15:44:30] gavit: has joined #RubyOnRails
[16:34:15] gavit: Killed (hitchcock.freenode.net (Nickname regained by services))

2018-11-29

[12:06:49] gavit: has joined #RubyOnRails
[23:12:15] gavit: has joined #RubyOnRails
[23:12:45] gavit: has joined #RubyOnRails
[23:12:45] gavit: Killed (card.freenode.net (Nickname regained by services))

2018-11-28

[00:23:40] gavit: has joined #RubyOnRails
[00:23:40] gavit: Killed (orwell.freenode.net (Nickname regained by services))

2018-11-27

[10:21:57] gavit: has joined #RubyOnRails
[10:26:07] gavit: Ping timeout: 240 seconds
[22:19:28] gavit: guess I had to restart the webserver

2018-11-26

[16:25:47] gavit: has joined #RubyOnRails
[17:11:26] gavit: Remote host closed the connection
[20:09:30] gavit: has joined #RubyOnRails
[20:19:41] gavit: Killed (tolkien.freenode.net (Nickname regained by services))

2018-11-25

[12:25:25] gavit: has joined #RubyOnRails
[12:26:16] gavit: When someone does a bundle install, is there a file that gets generated?
[12:26:30] gavit: except for the files that get installed ofc
[12:27:16] gavit: Andr3as: thanks

2018-11-22

[01:43:38] gavit: has joined #RubyOnRails
[01:43:54] gavit: execjs seems to support nodejs, however I can't find any documentation on how to make nodejs integrate with rails, do I need to add a gem etc, or should I just install nodejs and it should work out of the box
[01:44:40] gavit: sevenseacat: so just install nodjs on the os and I'm done?
[01:45:31] gavit: sevenseacat: ow cool. I was already going to just enable mini_racer and install it with a gem
[04:05:36] gavit: Ping timeout: 268 seconds
[10:44:03] gavit: has joined #RubyOnRails

2018-11-21

[10:09:47] gavit: has joined #RubyOnRails
[10:14:13] gavit: Ping timeout: 245 seconds
[19:51:43] gavit: has joined #RubyOnRails
[19:51:56] gavit: Remote host closed the connection

2018-11-19

[11:15:10] gavit: has joined #RubyOnRails
[11:30:38] gavit: execjs seems to support nodejs, however I can't find any documentation on how to make nodejs integrate with rails, do I need to add a gem etc, or should I just install nodejs and it should work out of the box
[12:00:10] gavit: Remote host closed the connection
[17:34:03] gavit: has joined #RubyOnRails
[17:38:27] gavit: Ping timeout: 240 seconds

2018-11-18

[03:00:53] gavit: has joined #RubyOnRails
[03:04:59] gavit: Read error: No route to host
[17:11:28] gavit: has joined #RubyOnRails
[17:15:42] gavit: Ping timeout: 252 seconds

2018-11-17

[12:30:35] gavit: has joined #RubyOnRails
[14:14:36] gavit: Killed (karatkievich.freenode.net (Nickname regained by services))

2018-11-16

[18:35:59] gavit: has joined #RubyOnRails

2018-11-14

[08:36:40] gavit: has joined #RubyOnRails
[08:48:12] gavit: has joined #RubyOnRails
[16:17:57] gavit: has joined #RubyOnRails
[16:22:34] gavit: Ping timeout: 268 seconds

2018-11-13

[09:32:56] gavit: has joined #RubyOnRails
[10:12:23] gavit: Remote host closed the connection
[12:14:07] gavit: has joined #RubyOnRails
[12:26:15] gavit: Remote host closed the connection
[12:45:00] gavit: has joined #RubyOnRails
[13:47:51] gavit: Remote host closed the connection
[15:10:41] gavit: has joined #RubyOnRails
[15:26:40] gavit: Ping timeout: 244 seconds
[17:01:19] gavit: has joined #RubyOnRails

2018-11-12

[11:02:24] gavit: has joined #RubyOnRails
[11:04:41] gavit: Read error: Connection reset by peer

2018-10-23

[16:31:07] gavit: has joined #RubyOnRails
[16:38:44] gavit: Ping timeout: 252 seconds

2018-09-02

[11:26:54] gavit: has joined #RubyOnRails
[11:28:08] gavit: is apache/passenger still the way to go?
[14:13:51] gavit: tycoon177: why do you prefer nginx?
[14:52:56] gavit: tycoon177: I have both running, so doesnt matter to me

2018-05-17

[14:42:45] gavit: has left #RubyOnRails: ()

2018-05-14

[11:26:47] gavit: has joined #ruby
[11:26:54] gavit: has left #ruby: ()
[11:26:57] gavit: has joined #RubyOnRails
[11:27:35] gavit: how can I determine the specs of a vm required for my ror app?
[12:24:26] gavit: Radar: I'm contemplating of going from RoR to Laravel. Php is horrible, but the resources for a RoR app seem so high in comparison.

2016-07-18

[22:00:04] gavit: Ping timeout: 250 seconds
[22:51:55] gavit: has joined #RubyOnRails

2016-07-17

[18:54:28] gavit: *.net *.split
[19:13:25] gavit: has joined #RubyOnRails

2016-05-25

[22:37:37] gavit: Ping timeout: 252 seconds
[22:37:44] gavit: has joined #RubyOnRails

2016-05-19

[14:57:44] gavit: I have three type of memberships. A single, couple, family. They have as attributes: start_date, end_date and persons with a limit of 1,2,no real limit, but I guess 20 is crazy enough. Would you make 3 models or an STI? I'd like to add a payment for all three memberships etc
[15:00:12] gavit: I guess I can store the people as an array and not even make an STI
[15:02:40] gavit: alfie_max15: yeah, between Person and membership
[15:02:56] gavit: jhass: basically, start/end_date, when to send an email
[15:03:41] gavit: jhass: I can't think of anything else
[15:04:00] gavit: jhass: some point in time a person might become single, and thus needs to change his membership
[15:04:19] gavit: or a child becomes big enough that he no longer fits in the family category and needs to start his own membership
[15:04:27] gavit: jhass: max 1 membership per person
[15:04:38] gavit: jhass: sorry, max 1 active membership per person
[15:05:03] gavit: jhass: I'm going to store memberships with dates. so the data is always 'valid'
[15:05:20] gavit: john was a member from 2011-2012, and then from 2012-2013 etc
[15:06:13] gavit: I guess, but 'max' 1 per point in time
[15:07:15] gavit: membership_type_of(john, Date.now) will always result in 1 result
[15:07:58] gavit: AmiMoench: 1 membership can have many, e.g. 1 family has mother, father, child.
[15:08:09] gavit: AmiMoench: 1 single has 1 person though
[15:08:23] gavit: jhass: so whats the conclusion?
[15:08:36] gavit: jhass: to array, to sti, or to cry
[15:08:59] gavit: whats in a name :)
[15:10:19] gavit: so 3 tables?
[15:17:28] gavit: jhass: http://imgur.com/FdQw91s
[15:20:46] gavit: jhass: I dont think I understand what you're trying to warn me about
[15:23:50] gavit: jhass: oow, that makes sense
[15:25:35] gavit: jhass: so how about add a 'responsible member' to SocialgroupMembership. aka Alladin, couple, date, Alladin; Jasmin, coupld, date, Alladin
[15:27:24] gavit: jhass: that could work, but I'm wondering about the reasoning why its better. In your solution I need to query 2 tables, in my solution I need to query 1 table (for most operations)
[15:27:58] gavit: or am I complicating things for no reason?
[15:29:16] gavit: jhass: the last column(responsible will be the 'father') for mother, father, children.
[15:31:18] gavit: jhass: okay.
[15:31:24] gavit: I'll just listen then :)
[15:32:58] gavit: now to migrate. Next problem will be how I can make that in possible in a form :'(
[15:33:12] gavit: but thats a problem for later
[16:12:23] gavit: argh, type is for STI. should've used a diff name
[18:13:49] gavit: jhass: I was right, it isn't an easy task: https://gist.github.com/gavit/92ecfb70ca8564d942fb5571e3a34d1c
[18:17:33] gavit: is it normal to rewrite a 'new' method of a class?
[18:37:21] gavit: jhass: it makes an array right?
[18:40:28] gavit: I recall using something like: params.require(:social_group).permit(:category, :name, :description, socialgroup_memberships_attributes: [:start_date, :end_date, :_destroy, :person_id => []])
[18:41:21] gavit: jhass: "person_id"=>["2", ""] gives as error Unpermitted parameter: person_id (So :person_id)
[18:43:22] gavit: durexlw: yep, I'm trying to make a many to many relationship which requires entering multiple rows with 1 submit
[18:44:12] gavit: durexlw: https://gist.github.com/gavit/92ecfb70ca8564d942fb5571e3a34d1c
[18:44:51] gavit: durexlw: I want to add a membership for mom, dad, child1, child2. I can do it with 4 adds
[18:45:09] gavit: durexlw: I am now trying to do it with a nested attributes
[18:45:58] gavit: durexlw: http://imgur.com/FdQw91s
[18:46:46] gavit: durexlw: yes
[18:50:53] gavit: durexlw: I want a query statement to create 1 social group and several memberships
[18:52:03] gavit: tubbo: redirect_to action: 'index', status: 303
[18:53:26] gavit: durexlw: I suspect so too, but how do I do that. I remove @social_group = SocialGroup.new(social_group_params) and parse social_group_params myself?
[18:58:55] gavit: durexlw: I don't think an add_members function exists, so that should be written
[18:59:42] gavit: also I dont think I can access the params like that: I think: social_group_params[:persons]
[19:03:29] gavit: durexlw: which self in which each?
[19:08:28] gavit: durexlw: I get a undefined method `each' for nil:NilClass, but I have no clue where the each popped up from :(
[19:15:06] gavit: why does it make an array of attributes: Parameters: {"utf8"=>"✓", "authenticity_token"=>"4EtoH15Y47mVikVJj58aNW0ew3FRxsd1PCwUacZqETsPvIvz8QhmqiBAgmsIhFqaaTAMo7dKUFRe9dh3CvmwRA==", "social_group"=>{"category"=>"Single", "name"=>"Test", "description"=>"", "socialgroup_memberships_attributes"=>{"0"=>{"start_date"=>"2015-01-01", "end_date"=>"2017-01-01", "person_id"=>["3", ""]}}}, "commit"=>"Create Social group", "locale"=>"en"}
[19:15:12] gavit: I'll only ever get a 0 right?
[19:16:24] gavit: oow, ok. I thought I had something wrong in my code.
[19:19:41] gavit: tubbo: so it's okay to access socialgroup_memberships_attributes["0"] to make my members?
[19:35:06] gavit: tubbo: https://gist.github.com/gavit/75b58433ed0d05889315a26fdf068d5e#file-console-log-L8 am I doing soemthing wrong?
[19:38:44] gavit: tubbo: bbl, gonna drive home
[19:39:12] gavit: tubbo: I'm not exactly parsing the 'correct' params
[19:40:13] gavit: tubbo: http://imgur.com/FdQw91s
[19:40:38] gavit: but in the view I am selecting multiple members so I can make the 'membership' at once

2016-05-03

[19:42:22] gavit: *.net *.split
[19:51:40] gavit: has joined #RubyOnRails

2016-04-27

[07:00:28] gavit: Ping timeout: 264 seconds
[07:01:25] gavit: has joined #RubyOnRails

2016-04-14

[01:06:23] gavit: has joined #RubyOnRails

2016-04-13

[17:47:01] gavit: Ping timeout: 252 seconds

2016-03-17

[00:23:23] gavit: has joined #RubyOnRails