FLeiXiuS

Activity Graph

Page 1 of 4 | Next »

2019-07-08

[19:30:09] FLeiXiuS: has joined #RubyOnRails
[19:31:12] FLeiXiuS: I have a has_many through, with a field called 'type'. I'm defining checkboxes using collection_check_boxes. Is there a way to define the `type` for the associated checkbox?
[19:54:56] FLeiXiuS: Quit: Leaving

2019-05-23

[00:38:28] FLeiXiuS: Ping timeout: 252 seconds

2019-05-22

[19:24:15] FLeiXiuS: has joined #RubyOnRails

2019-04-26

[05:38:09] FLeiXiuS: Quit: Leaving

2019-04-25

[19:40:25] FLeiXiuS: has joined #RubyOnRails
[19:40:58] FLeiXiuS: Within rpsec, can you make dependent tests? IE, click and acknowledgement before login and before logout.

2019-03-22

[22:48:38] FLeiXiuS: has joined #RubyOnRails
[22:48:51] FLeiXiuS: Does rails auto create controlller methods like, create, read, etc? Also - when an action is blank, does rails automatically set an instance var for the model? So User would populate @user by default?
[22:49:01] FLeiXiuS: I know that it does - im just curious as to the documentation for it.
[23:13:04] FLeiXiuS: Quit: Leaving

2019-03-20

[17:11:51] FLeiXiuS: has joined #RubyOnRails
[23:14:39] FLeiXiuS: Quit: Leaving

2018-12-01

[08:33:30] FLeiXiuS: Quit: Leaving

2018-11-30

[22:23:19] FLeiXiuS: has joined #RubyOnRails
[22:24:04] FLeiXiuS: Using fields_for, how do I get question_1_answers[param]?
[22:24:22] FLeiXiuS: I want the <id> of question as a part of the parameter

2018-11-27

[21:32:46] FLeiXiuS: has joined #RubyOnRails
[21:54:25] FLeiXiuS: Quit: Leaving

2018-11-21

[04:16:34] FLeiXiuS: Quit: Leaving

2018-11-20

[05:30:31] FLeiXiuS: Read error: Connection reset by peer
[22:22:34] FLeiXiuS: has joined #RubyOnRails
[22:23:46] FLeiXiuS: I have a model Lesson and a model Progress. Progress is a has_many :through for Users. I want to be able to eager load a Progress with a constraint. Ex: Lesson.order(:order).includes(:progress, where(user_id: 1))
[23:00:45] FLeiXiuS: I have something close.
[23:01:06] FLeiXiuS: But it's only loading Lessons where the has_one condition is true.

2018-11-19

[20:26:05] FLeiXiuS: has joined #RubyOnRails
[20:26:19] FLeiXiuS: Is there a specific way to update an array of objects with a dynamic hash?
[20:26:32] FLeiXiuS: Single query? Or is it going to be a query per object?
[20:36:19] FLeiXiuS: tubbo, Yeah in my scenario, foo: is dynamic based on the object.
[20:36:27] FLeiXiuS: I think I need multiple queries rather a massive insert.

2018-08-03

[05:48:46] FLeiXiuS: has joined #RubyOnRails
[05:49:43] FLeiXiuS: I have a model TemplateManager with 2 fields [field_type, field_data]. I'm trying to set it up to be 'polymorphic-esk' Where field_type groups together like records.
[05:50:07] FLeiXiuS: I'm curious how I can do relations on the field_type records?
[05:50:47] FLeiXiuS: ex: TemplateManager.new(field_type: 'position_type', field_data: 'admin')
[05:55:40] FLeiXiuS: I guess these should probably be a separate model/table and not stored under a single model.
[06:58:43] FLeiXiuS: Quit: Leaving

2018-07-12

[19:51:36] FLeiXiuS: has joined #RubyOnRails
[19:51:58] FLeiXiuS: How can I destroy a record through the attribute? Model.update
[20:13:40] FLeiXiuS: accepts_nested_attributes has _destroy parameters. Is there something similar for batch updating?
[20:33:11] FLeiXiuS: params = foo[bar] = {'1': '_destroy': true}
[20:34:17] FLeiXiuS: I'll go ahead with using an array of ids for now.
[22:04:21] FLeiXiuS: Read error: Connection reset by peer

2018-06-29

[05:31:31] FLeiXiuS: Quit: Leaving

2018-06-28

[16:34:43] FLeiXiuS: has joined #RubyOnRails
[16:36:53] FLeiXiuS: I have a table Country and another table System. I want System to have 2 (has many) associations Country_A and Country B. Is this possible through polymorphism? Or has_many conditions?
[16:37:47] FLeiXiuS: I was trying to get away by having a country_system table with country_id, system_id, type (a/b)
[16:38:16] FLeiXiuS: Then define a has_many system_b, has_many system_a
[16:38:40] FLeiXiuS: How do I get rails to recognize the type as A or B?
[16:47:24] FLeiXiuS: They're exactly the same. Except I want to instantiate them differently, via a type.
[16:47:56] FLeiXiuS: Technically, I could do 2 tables, one for each type. The use a has_many to iterate them.
[16:48:15] FLeiXiuS: I was wondering if theres a singular way of doing this with 1 table. Then have a field distinguish the two.
[16:49:59] FLeiXiuS: I was trying to do something like this has_many :system_a, through: :country_system, source: :system, -> (where: type: 'a')
[16:50:40] FLeiXiuS: That scopes the type column under System and not the join country_system. :-(
[16:52:59] FLeiXiuS: Awesome - yah I'll give it a research
[16:53:15] FLeiXiuS: Just trying to avoid 1000 of models if I can handle this singularly.
[17:21:01] FLeiXiuS: Andr3as, I decided to just add 2 fields in the join table. system_a_id, system_b_id. Using has_many system_b, source: system in the model.
[17:21:09] FLeiXiuS: It's not the prettiest, but it definitely works.
[18:05:08] FLeiXiuS: Andr3as, with about def terminate; raise 'failed', end
[18:05:30] FLeiXiuS: Try that as a before_filter.
[18:05:50] FLeiXiuS: When it doubt - restart the dev server.

2018-05-16

[07:58:42] FLeiXiuS: Read error: Connection reset by peer

2018-05-15

[10:49:46] FLeiXiuS: has joined #RubyOnRails
[10:50:01] FLeiXiuS: Do you need x-sendfile-accel if you're using passenger+nginx?

2018-05-09

[19:39:15] FLeiXiuS: has joined #RubyOnRails
[19:40:38] FLeiXiuS: I have a polymorphic association with Visitors and Misconducts. When creating a new visitor, I get a no route error on ```new_visitor_misconduct_path(@visitor)``` because params[:visitor_id] is nil.
[21:43:02] FLeiXiuS: Read error: Connection reset by peer

2018-04-20

[06:30:56] FLeiXiuS: Quit: Leaving

2018-04-19

[20:17:35] FLeiXiuS: has joined #RubyOnRails
[20:18:24] FLeiXiuS: What's the best approach for handling static files like user avatars and file attachments in prod? I want these to be behind my rails authentication. Tips for prod / dev?
[21:15:36] FLeiXiuS: mlt-, I think I have 2 issues here. I want pictures to be secure with cancan and attachments to be handled by X-Send-File
[21:17:08] FLeiXiuS: mlt-, I want to display them versus triggering a 'download'
[21:18:32] FLeiXiuS: mlt-, have my babies.
[21:18:38] FLeiXiuS: Thanks I think that's what I was confused about.
[21:19:08] FLeiXiuS: Now I have to create a controller method for displaying images and verifying perms.
[21:20:57] FLeiXiuS: Attachments can be photos in some cases. But I want to display user avatars for instance.
[21:21:48] FLeiXiuS: File meaning the Mime type?
[21:22:30] FLeiXiuS: Pictures are attachments. Pictures can be download and displayed in some instances.
[21:22:37] FLeiXiuS: I want that to be handled in PROD via Nginx.
[21:22:44] FLeiXiuS: Oh yah for sure!
[22:19:17] FLeiXiuS: Radar, Private offline network, no internet access.

2018-04-04

[19:15:33] FLeiXiuS: has joined #RubyOnRails
[19:15:52] FLeiXiuS: I have a method in my model, fullname. It has self.f_name.capitalize under it.
[19:16:13] FLeiXiuS: Im getting a no method error, capitalize for User.
[19:16:49] FLeiXiuS: self.f_name.capitalize works in the irb debug window.
[19:18:30] FLeiXiuS: devpolish, https://pastebin.com/1nzka3L8
[19:18:38] FLeiXiuS: Fairly simple lol...not sure what the deal is.
[19:18:52] FLeiXiuS: f_name and l_name are both strings.
[19:20:06] FLeiXiuS: yebyen, Webrick has the built in web console
[19:20:26] FLeiXiuS: self.l_name.class => String
[19:21:13] FLeiXiuS: Sec - I'll get it
[19:24:17] FLeiXiuS: Hrm - restarting webrick did the trick.
[19:24:28] FLeiXiuS: I thought for sure I did that already, no idea.
[21:55:27] FLeiXiuS: Read error: Connection reset by peer

2017-11-09

[21:38:48] FLeiXiuS: has joined #RubyOnRails
[21:39:22] FLeiXiuS: I have a DB handler setup like this, http://imnithin.in/multiple-database.html. However, whenever my database goes offline, the connect never resets.
[22:04:06] FLeiXiuS: Quit: Page closed

2017-09-07

[07:16:07] FLeiXiuS: Read error: Connection reset by peer

2017-09-06

[15:06:37] FLeiXiuS: has joined #RubyOnRails

2017-03-28

[09:33:30] FLeiXiuS: Read error: Connection reset by peer
[21:07:31] FLeiXiuS: has joined #RubyOnRails
[21:07:55] FLeiXiuS: Why is it that gem install sqlite3 works, but bundle install --local fails. Using the exact same gem file.
[21:08:18] FLeiXiuS: Driving me crazy
[21:08:39] FLeiXiuS: I blame windows ruby.
[21:12:30] FLeiXiuS: BrucePerens, I thing its mswin vs mwing
[21:12:43] FLeiXiuS: Just gotta do the debugging
[22:24:24] FLeiXiuS: Ping timeout: 260 seconds
[22:31:34] FLeiXiuS: has joined #RubyOnRails
[23:49:49] FLeiXiuS: Remote host closed the connection

2017-03-27

[17:03:23] FLeiXiuS: has joined #RubyOnRails

2017-03-24

[06:19:34] FLeiXiuS: has joined #RubyOnRails
[06:19:34] FLeiXiuS: Changing host
[06:19:34] FLeiXiuS: has joined #RubyOnRails
[07:03:21] FLeiXiuS: Ping timeout: 268 seconds

2017-03-22

[08:12:45] FLeiXiuS: Read error: Connection reset by peer

2017-03-21

[17:00:25] FLeiXiuS: has joined #RubyOnRails
[17:00:25] FLeiXiuS: Changing host
[17:00:25] FLeiXiuS: has joined #RubyOnRails

2017-03-20

[15:50:05] FLeiXiuS: has joined #RubyOnRails
[17:27:35] FLeiXiuS: Ping timeout: 246 seconds

2017-03-18

[01:09:49] FLeiXiuS: Read error: Connection reset by peer

2017-03-17

[18:07:24] FLeiXiuS: has joined #RubyOnRails
[18:07:24] FLeiXiuS: Changing host
[18:07:24] FLeiXiuS: has joined #RubyOnRails

2017-03-15

[00:25:31] FLeiXiuS: Quit: Ex-Chat
[00:25:43] FLeiXiuS: has joined #RubyOnRails
[00:26:19] FLeiXiuS: Remote host closed the connection
[21:37:36] FLeiXiuS: has joined #RubyOnRails
[21:37:36] FLeiXiuS: Changing host
[21:37:36] FLeiXiuS: has joined #RubyOnRails
[21:42:52] FLeiXiuS: Quit: Ex-Chat

2017-03-14

[20:24:37] FLeiXiuS: has joined #RubyOnRails

2017-03-07

[20:51:24] FLeiXiuS: has joined #RubyOnRails
[22:38:25] FLeiXiuS: Ping timeout: 260 seconds

2016-07-22

[11:35:55] FLeiXiuS: has joined #RubyOnRails
[11:36:27] FLeiXiuS: Is this still accurate regarding hidden fields and nested attributs? http://rubyflare.tumblr.com/post/54967114271/hidden-fields-generated-by-fieldsfor-helper
[11:37:11] FLeiXiuS: I think I'm asking the wrong question.
[11:39:47] FLeiXiuS: sevenseacat, With nested attributes, rails is automatically adds the ID mappings when using fields_for. Yay for reading the docs.
[11:40:01] FLeiXiuS: Wow that grammar.
[11:40:32] FLeiXiuS: I needed it to *not* do that as it's generated them in the wrong place.
[11:42:08] FLeiXiuS: I have my nested attributes separated by containers in HTML. The fields_for was creating inputs outside of the container and it was breaking a few plugins.
[12:46:02] FLeiXiuS: Quit: Ex-Chat

2016-06-29

[05:04:14] FLeiXiuS: has joined #RubyOnRails
[05:04:18] FLeiXiuS: has joined #RubyOnRails
[05:04:18] FLeiXiuS: Changing host
[05:04:43] FLeiXiuS: Do before_actions get called when validations fail and a render :action is called?
[05:07:06] FLeiXiuS: sevenseacat, Thanks, trying to find a way to not duplicate too much code
[06:48:47] FLeiXiuS: snoobydoo, add -b 0.0.0.0 to your rails server
[06:57:07] FLeiXiuS: snoobydoo, I dont think you understand what we were trying to tell you to do
[07:07:48] FLeiXiuS: I'm pretty sure I told him how to mak eit bind to all interfaces earlier
[07:44:17] FLeiXiuS: How are you guys handling jquery validations on nested form attributes?
[07:44:37] FLeiXiuS: I should mention dynamic nested form *
[07:45:15] FLeiXiuS: And by nested, I mean nested attributes :-P
[07:46:23] FLeiXiuS: Should I have asked the men in here instead ;-)
[07:46:31] FLeiXiuS: The manliest of men.
[07:47:41] FLeiXiuS: Let's ask another question - since I'd rather keep it server side.
[07:48:19] FLeiXiuS: sevenseacat, is that really how you interpreted that sentence?
[07:49:29] FLeiXiuS: sevenseacat, I'm actually disappointed your fonts don't already do that.
[07:49:45] FLeiXiuS: Shame. Shame.
[07:49:53] FLeiXiuS: For the GOT fans ^
[07:51:35] FLeiXiuS: Women specifically have better precision at an earlier age.
[07:51:55] FLeiXiuS: It has somethng to do with left/right brain connections, etc etc,
[07:52:09] FLeiXiuS: Men over time develope it but by that time we've already induced a bad habbit
[09:49:59] FLeiXiuS: Remote host closed the connection

2016-06-23

[09:01:51] FLeiXiuS: has joined #RubyOnRails
[09:01:56] FLeiXiuS: Changing host
[09:01:57] FLeiXiuS: has joined #RubyOnRails
[09:02:54] FLeiXiuS: When using .where.not(foo: 'bar') - why is it not listing records found where foo is nil? http://pastie.org/10887526
[09:08:55] FLeiXiuS: Interesting .
[09:09:06] FLeiXiuS: Guess I'll approach it differently.
[10:02:47] FLeiXiuS: Remote host closed the connection

2016-06-20

[04:29:55] FLeiXiuS: has joined #RubyOnRails
[04:34:41] FLeiXiuS: Is there a way to have a nested route within without having an object requirement in the URL? http://pastie.org/10883592 simple example
[04:39:51] FLeiXiuS: sevenseacat, Hrm - my routing foo is awful. Let me review the docs.
[04:44:53] FLeiXiuS: sevenseacat, exactly what I was looking for. Thank you.
[04:48:55] FLeiXiuS: Quit: Ex-Chat
[04:49:10] FLeiXiuS: has joined #RubyOnRails
[08:17:20] FLeiXiuS: Remote host closed the connection

2016-05-04

[05:16:44] FLeiXiuS: Remote host closed the connection

2016-05-03

[05:46:45] FLeiXiuS: has joined #RubyOnRails
[05:46:53] FLeiXiuS: has joined #RubyOnRails
[05:46:53] FLeiXiuS: Changing host
[05:47:28] FLeiXiuS: When using javascript in an actions view, is that javascript loaded and execued at page load when turbolinks is enabled?
[05:47:42] FLeiXiuS: It doesnt appear to be... thats why I'm asking.
[05:48:58] FLeiXiuS: sevenseacat, Doh - let me check the cache.
[05:52:40] FLeiXiuS: sevenseacat, Yep twas my browser.
[06:00:40] FLeiXiuS: Remote host closed the connection
[06:04:44] FLeiXiuS: has joined #RubyOnRails
[06:04:57] FLeiXiuS: has joined #RubyOnRails
[06:04:57] FLeiXiuS: Changing host
[06:10:19] FLeiXiuS: I'm trying to load AJAX content after the page loads. The correct pages are requested from webrick and I see the /url.js being called. In the browser I see the response coming back as OK. However, the success callback isnt being fired from the $.ajax https://gist.github.com/anonymous/c2992129625205a25fac8f523340fb09
[06:10:39] FLeiXiuS: I should mention that neither is the failed.
[06:24:38] FLeiXiuS: sevenseacat, The response is the HTML in _index.html.erb
[06:25:01] FLeiXiuS: Im not understanding how the success callback is not firing for the $.ajax
[06:27:19] FLeiXiuS: sevenseacat, it's rendering an html parital from the js.erb using escape_javascript(render blah )
[06:27:55] FLeiXiuS: I got your girl ;-) one second.
[06:29:24] FLeiXiuS: s/your/you doh!
[06:30:03] FLeiXiuS: https://gist.github.com/anonymous/af2c6bf8f88f6f3804beb16e01365a23
[06:30:11] FLeiXiuS: sevenseacat, ^
[06:31:08] FLeiXiuS: alert('woohoo')
[06:31:15] FLeiXiuS: And console.logs
[06:32:29] FLeiXiuS: Very true - but I promise it was verified. The success callback has an html replace which should overview everything.
[06:32:57] FLeiXiuS: The browser shows only the layout up until the <% yield %>
[06:33:22] FLeiXiuS: The <%= yield %> renders nothing until its loaded via the clients ajax. I'll insert a pretty spinnder once its loading.
[06:33:50] FLeiXiuS: Very true, the selector is on the page.
[06:34:55] FLeiXiuS: In the console I see a 200 OK for the request and I see the 'Loading page...'
[06:35:09] FLeiXiuS: I added console.logs in the success - none of them are displayed.
[06:35:39] FLeiXiuS: Maybe I misread the question?
[06:37:20] FLeiXiuS: https://gist.github.com/anonymous/33eefe390d0d97955b0a572d60e16e3b
[06:38:15] FLeiXiuS: error is deprecated, fail() is replacing it
[06:40:29] FLeiXiuS: Doh - that may be it.
[06:40:42] FLeiXiuS: I read that fail was replacing .error()
[06:40:47] FLeiXiuS: But maybe i read that wrong.
[06:42:12] FLeiXiuS: So error callback is getting called.
[06:43:14] FLeiXiuS: Hrm, how is error firing with a STATUS OK 200?
[06:43:26] FLeiXiuS: Object {readyState: 4, responseText: "<div>I am legend<\/div>", status: 200, statusText: "OK"}
[06:43:49] FLeiXiuS: When displaying the data from error: function(data)
[06:46:38] FLeiXiuS: https://gist.github.com/anonymous/e5a1c1450409ca0b17437e7b5df66433
[06:46:58] FLeiXiuS: You're suggestion that its not valid JS sounds correct.
[06:47:41] FLeiXiuS: That's the output from the error arguments in console
[06:48:37] FLeiXiuS: OH - those args. Sorry I thought you meant the object arguments data response
[06:50:13] FLeiXiuS: sevenseacat, and its a parse error. Doh.
[06:51:15] FLeiXiuS: sevenseacat, thanks for the patience. Figured the response could be whatever so long as the success: callback handled it. Turns out its required to be JS
[06:51:38] FLeiXiuS: sevenseacat, Looking at that now...
[06:54:08] FLeiXiuS: sevenseacat, Doh - datatype it was.
[06:54:30] FLeiXiuS: sevenseacat, Thanks so much - I blame the fail (pun intended)
[09:19:23] FLeiXiuS: Quit: Ex-Chat
[20:03:29] FLeiXiuS: has joined #RubyOnRails
[20:03:37] FLeiXiuS: has joined #RubyOnRails
[20:03:37] FLeiXiuS: Changing host
[20:04:05] FLeiXiuS: When using SAML, are you always redirected to the IDPs login?

2016-04-22

[07:45:31] FLeiXiuS: has joined #RubyOnRails
[07:45:52] FLeiXiuS: Do before_save callbacks happen when there is no UPDATE, due to no changes
[07:46:45] FLeiXiuS: I would assume yes, but they're not firing for me.
[07:46:50] FLeiXiuS: So thats why I asked the question.
[07:47:07] FLeiXiuS: quazimodo, you're not the one.
[08:51:37] FLeiXiuS: Remote host closed the connection