Activity Graph

Page 1 of 5 | Next »


[23:52:24] MEATCHICKEN: has joined #RubyOnRails


[07:14:56] MEATCHICKEN: Read error: Connection reset by peer



[18:54:26] MEATCHICKEN: *.net *.split
[19:13:42] MEATCHICKEN: has joined #RubyOnRails
[19:13:43] MEATCHICKEN: has joined #ruby


[09:07:00] MEATCHICKEN: Ping timeout: 246 seconds
[09:07:25] MEATCHICKEN: has joined #ruby
[09:07:25] MEATCHICKEN: has joined #RubyOnRails


[03:20:01] MEATCHICKEN: has joined #RubyOnRails
[03:20:07] MEATCHICKEN: What's the best way to do automatic deployment?
[03:20:10] MEATCHICKEN: After I push to master
[03:25:08] MEATCHICKEN: what about easy-deployment? I guess capistrano?


[15:00:33] MEATCHICKEN: Ping timeout: 240 seconds
[22:05:28] MEATCHICKEN: has joined #ruby
[22:05:33] MEATCHICKEN: where is the docs for the super method?
[22:05:41] MEATCHICKEN: I am seeing a usage of super that is block form
[22:06:02] MEATCHICKEN: super {|x| x.whatever }
[22:06:06] MEATCHICKEN: what does that mean?
[22:08:01] MEATCHICKEN: what does the block form do then?
[22:08:11] MEATCHICKEN: it doesn't state it on the docs website
[22:09:42] MEATCHICKEN: that makes sense


[17:51:35] MEATCHICKEN: has joined #RubyOnRails


[07:17:03] MEATCHICKEN: Ping timeout: 240 seconds


[17:18:52] MEATCHICKEN: Having trouble stubbing a service
[17:19:20] MEATCHICKEN: I have a method in my model that instantiates a new service - how can I make the service return a fake value with rspec/
[17:21:03] MEATCHICKEN: has joined #RubyOnRails
[17:21:23] MEATCHICKEN: Trying to stub a service that is instantiated in a model method
[17:21:33] MEATCHICKEN: How can I make one of the service's methods return a defined value?
[17:22:01] MEATCHICKEN: I've tried allow(Service).to receive(:method).and_return(value)
[17:24:49] MEATCHICKEN: cnk, it just doesn't return the expected value


[02:20:46] MEATCHICKEN: Read error: Connection reset by peer
[16:59:54] MEATCHICKEN: has joined #ruby
[17:00:15] MEATCHICKEN: How can I find a unique integer in an array of integers with duplicates
[17:09:52] MEATCHICKEN: jhass, is that efficient? I'm trying to look for one with linear time


[21:54:34] MEATCHICKEN: Ping timeout: 240 seconds
[21:55:05] MEATCHICKEN: has joined #ruby


[19:58:51] MEATCHICKEN: has joined #ruby
[19:58:56] MEATCHICKEN: What does @@ mean/
[19:59:08] MEATCHICKEN: class variable?
[19:59:29] MEATCHICKEN: Shared by all instances of the class/


[01:35:15] MEATCHICKEN: has joined #RubyOnRails
[01:35:15] MEATCHICKEN: has joined #ruby
[03:47:07] MEATCHICKEN: Ping timeout: 260 seconds


[07:11:57] MEATCHICKEN: Ping timeout: 246 seconds


[07:30:21] MEATCHICKEN: has joined #RubyOnRails
[07:30:23] MEATCHICKEN: has joined #ruby


[00:21:52] MEATCHICKEN: Quit: Leaving


[05:09:44] MEATCHICKEN: Ping timeout: 244 seconds
[05:10:35] MEATCHICKEN: has joined #RubyOnRails


[09:11:06] MEATCHICKEN: Ping timeout: 272 seconds
[09:12:03] MEATCHICKEN: has joined #RubyOnRails


[17:53:11] MEATCHICKEN: has joined #RubyOnRails
[17:53:24] MEATCHICKEN: is there a difference between include ActionView and include ActionView::RecordIdentifier?
[17:53:35] MEATCHICKEN: Shouldn't include ActionView include all of the submodules?


[04:05:54] MEATCHICKEN: Quit: Leaving


[06:35:49] MEATCHICKEN: Ping timeout: 260 seconds
[06:36:24] MEATCHICKEN: has joined #RubyOnRails
[06:36:24] MEATCHICKEN: has joined #ruby
[06:41:04] MEATCHICKEN: Ping timeout: 260 seconds
[06:43:02] MEATCHICKEN: has joined #RubyOnRails
[06:43:02] MEATCHICKEN: has joined #ruby


[05:50:05] MEATCHICKEN: User has an address. Address has validations. User editing himself will fail because the edit screen allows address unless they fill out the entire fails
[05:50:08] MEATCHICKEN: what is the best pattern for this?
[05:50:12] MEATCHICKEN: Just take out the address validations?
[05:50:46] MEATCHICKEN: Radar, user signup doesn't set an initial address
[05:50:53] MEATCHICKEN: so they are empty when first navigating to the edit
[05:51:04] MEATCHICKEN: Would the right answer be to add address to user signup?
[05:51:18] MEATCHICKEN: Or to remove address validations?
[05:51:23] MEATCHICKEN: I guess that would be a business answer
[05:52:55] MEATCHICKEN: kevr, that's the thing - empty address strings are invalid to presence validations
[05:53:06] MEATCHICKEN: I suppose it isn't a technical issue as I know how to solve it - just looking for thoughts
[11:30:09] MEATCHICKEN: Read error: Connection reset by peer
[15:51:55] MEATCHICKEN: has joined #RubyOnRails
[15:52:27] MEATCHICKEN: To clarify - to ensure that a method is called in rspec. I write -> expect(obj).to receive(:method), correct?
[16:14:57] MEATCHICKEN: has joined #ruby
[16:15:25] MEATCHICKEN: Object.where.overlap <- how can I be sure that overlap is called with rspec?
[16:16:02] MEATCHICKEN: .where returns a very specific object - my first thought would be to expect(obj.where).to receive(:method)
[16:18:24] MEATCHICKEN: jhass, overlap is not implemented in userland - it is in 3rd party
[16:18:31] MEATCHICKEN: I shouldn't have to test it?
[16:18:46] MEATCHICKEN: userland is not the right word
[16:18:53] MEATCHICKEN: it is in a gem*
[16:19:14] MEATCHICKEN: That's a nice solution though, jhass. Thanks! I've never had to use doubles until now
[16:23:56] MEATCHICKEN: c_nick, diff file_a file_b


[17:36:00] MEATCHICKEN: has joined #ruby
[17:36:16] MEATCHICKEN: Does anyone here know how to use rspec spies/doubles?
[17:36:34] MEATCHICKEN: I've googled/stackoverflow'd and it just doesn't make as much sense as jasmine spies from js
[17:39:20] MEATCHICKEN: How do you do it, tubbo ?
[17:39:45] MEATCHICKEN: whatever being the object right?
[17:39:49] MEATCHICKEN: what if I'm in an it block?
[17:40:04] MEATCHICKEN: allow(object).to receive(:method) { return value }?
[17:40:34] MEATCHICKEN: okay that's where I get confused
[17:40:41] MEATCHICKEN: what's a mock object then? lol
[17:41:25] MEATCHICKEN: I don't see the usefulness of a mock object/double
[17:41:32] MEATCHICKEN: a stub can be extremely helpful though
[17:41:41] MEATCHICKEN: I can check that the method is called and with certain args
[17:43:52] MEATCHICKEN: I haven't had to use that sort of dependency injection where I pass an object another object
[17:43:59] MEATCHICKEN: I can see the use-case for it now though
[17:45:38] MEATCHICKEN: Do you mean you have a function called loadTileInfo?
[17:45:59] MEATCHICKEN: you wouldn't use js functions in a controller


[02:16:57] MEATCHICKEN: I have an after_create callback that creates a bunch of children for a model
[02:17:07] MEATCHICKEN: Each child is using an SQL query(separate)
[02:17:11] MEATCHICKEN: is there a way to optimize?
[02:17:17] MEATCHICKEN: Make it use one query/transaction?
[22:01:17] MEATCHICKEN: I have an array of rows with coordinates [0,0] [1,0], [2,0], [0,1]
[22:01:22] MEATCHICKEN: how do I order it by row?
[22:01:32] MEATCHICKEN: so [0,0], [1,0] etc
[22:01:49] MEATCHICKEN: currently it goes [0,0][0,1] as expected
[22:01:54] MEATCHICKEN: but that traverses by column
[22:03:29] MEATCHICKEN: weaksauce, can you provide a sample? what do you mean weighting?
[22:03:38] MEATCHICKEN: dynamic amount of columns
[22:03:48] MEATCHICKEN: context, I can do that
[22:04:03] MEATCHICKEN: but this is in context of rails - so define <=> in the model?
[22:04:07] MEATCHICKEN: Is there a way to do it in sql?
[22:07:50] MEATCHICKEN: context, it was simple
[22:08:00] MEATCHICKEN: sort by y coordinate, then x coordinate
[22:08:10] MEATCHICKEN: .order(:y,:x)


[18:10:29] MEATCHICKEN: Is there an event for when a cached value is selected from a text input


[17:03:06] MEATCHICKEN: has joined #RubyOnRails
[17:03:14] MEATCHICKEN: Something is clearing my flash
[17:03:19] MEATCHICKEN: andI can't be certain what it is


[21:19:03] MEATCHICKEN: has joined #RubyOnRails
[21:19:32] MEATCHICKEN: when we call render in a view
[21:19:40] MEATCHICKEN: what is self that is receiving render?
[21:22:21] MEATCHICKEN: smathy, it appears to be an anonymous class lol
[21:22:40] MEATCHICKEN: My team made the awful decision to pick trailblazer in this project
[21:22:47] MEATCHICKEN: and all I am trying to do is render a partial
[21:23:05] MEATCHICKEN: Trail blazer is intercepting calls to render thus I am trying to call the rails render
[21:24:50] MEATCHICKEN: smathy, yeah I'm in a trb cell template
[21:25:05] MEATCHICKEN: smathy, I'll take a look at cells 4.1 - I'll be able to render partials normally?
[21:30:26] MEATCHICKEN: I'll debate whether it is "the way" to do it after a quick prototype
[21:30:54] MEATCHICKEN: debate with myself ofc lol
[21:31:04] MEATCHICKEN: "::ActionController" - you're preceding actioncontroller with ::
[21:31:06] MEATCHICKEN: what does that mean?
[21:32:25] MEATCHICKEN: pipework, wouldn't ActionController by itself suffice?
[21:32:44] MEATCHICKEN: or would that try to reference ActionController from the current scope
[23:32:54] MEATCHICKEN: Ping timeout: 260 seconds


[06:49:59] MEATCHICKEN: Quit: Leaving


[05:32:33] MEATCHICKEN: Ping timeout: 240 seconds
[06:21:15] MEATCHICKEN: has joined #RubyOnRails


[20:20:11] MEATCHICKEN: has joined #RubyOnRails
[20:20:24] MEATCHICKEN: I have an env variable that a class needs as a constant
[20:20:38] MEATCHICKEN: best way to access it?
[20:20:49] MEATCHICKEN: Does env have a huge performance cost because it calls out to shell?
[20:25:09] MEATCHICKEN: Papierkorb, thanks


[17:50:38] MEATCHICKEN: How do I redirect to sign-up page when user is not authenticated [devise]
[17:50:56] MEATCHICKEN: I tried overriding authenticate_user filter and it resulted in a loop
[17:51:42] MEATCHICKEN: I want to customize that behaviour - I've looked at all the Stackoverflows
[17:52:50] MEATCHICKEN: A non-logged in user will be redirected to signup instead of signin
[17:52:55] MEATCHICKEN: devise default is signin
[17:53:55] MEATCHICKEN: I've tried rewriting it like so
[17:53:56] MEATCHICKEN:
[17:54:01] MEATCHICKEN: but it results in a loop
[17:54:11] MEATCHICKEN: I am guessing because the registration page
[17:54:16] MEATCHICKEN: runs the filter too
[17:54:51] MEATCHICKEN: Quit: Leaving


[22:41:10] MEATCHICKEN: has joined #RubyOnRails
[22:41:17] MEATCHICKEN: I have a route that is being hit twice upon navigating to it
[22:41:25] MEATCHICKEN: shows up twice in the logs
[22:41:29] MEATCHICKEN: what could be wrong?


[18:50:54] MEATCHICKEN: has joined #RubyOnRails
[18:51:04] MEATCHICKEN: Is there a way to access (this) in a js.erb file?
[18:51:18] MEATCHICKEN: I need to append to a certain div but it has to be scoped
[18:58:26] MEATCHICKEN: pipework, that's a good idea. you should write that into the docs somewhere
[18:58:39] MEATCHICKEN: Using dynamic js to take advantage of built-in remote forms
[19:27:59] MEATCHICKEN: Ping timeout: 250 seconds


[00:56:35] MEATCHICKEN: has joined #RubyOnRails
[00:57:52] MEATCHICKEN: Question - so it was only recently that rails introduced foreign key support. What is the difference between using native foreign key support and just using _id as a fk
[00:58:01] MEATCHICKEN: Is it just that the database enforces the referential integrity?
[00:58:41] MEATCHICKEN: So I would call it "transitioning to native foreign keys" if I were to make that change?
[00:58:55] MEATCHICKEN: Is it recommended to make all my non-native fks into native fks?
[01:00:17] MEATCHICKEN: I will take that as a yes
[01:00:19] MEATCHICKEN: Thank you guys
[18:43:57] MEATCHICKEN: has left #RubyOnRails: ("Leaving")


[01:44:44] MEATCHICKEN: Quit: Leaving


[19:04:12] MEATCHICKEN: has joined #ruby
[19:04:20] MEATCHICKEN: What is the ruby equivilent of jasmine spies?
[19:04:31] MEATCHICKEN:
[19:04:39] MEATCHICKEN: In testing with jasmine - I can spy on methods
[19:04:45] MEATCHICKEN: I guess it is called stubbing?
[19:07:12] MEATCHICKEN: Ox0dea, what is the rspec equivilent?


[08:31:12] MEATCHICKEN: When rails throws an ActiveRecord::RecordNotFound exception
[08:31:18] MEATCHICKEN: I am testing for the response code and it isn't 404
[08:31:32] MEATCHICKEN: expect(response.status).to eq(404) fails
[08:34:09] MEATCHICKEN: It is saying 200
[08:41:07] MEATCHICKEN: arup_r, That tail-f tip was really nice
[08:41:13] MEATCHICKEN: unfortunately - it didn't reveal why
[08:41:21] MEATCHICKEN: "Completed 404 Not Found in 3ms"
[08:44:55] MEATCHICKEN: arup_r,
[08:45:26] MEATCHICKEN: Error message - expected the response to have status code 404 but it was 200
[08:45:32] MEATCHICKEN: That's extremely strange
[08:51:32] MEATCHICKEN: arup_r, nice try - but now it is throwing a typical Couldn't find Model error
[09:31:56] MEATCHICKEN: Quit: Leaving


[06:32:30] MEATCHICKEN: Quit: Leaving
[18:32:21] MEATCHICKEN: has joined #RubyOnRails
[18:33:14] MEATCHICKEN: I want to use devise confirmable for mobile user confirmation but it links/requires the user to go to the web application
[18:33:17] MEATCHICKEN: How can I work around this?


[07:34:37] MEATCHICKEN: has joined #RubyOnRails
[07:35:18] MEATCHICKEN: I am unable to write this quer - Review.includes(:reviewer).where(reviewer: {})
[07:35:26] MEATCHICKEN: reviewer being polymorphic
[07:35:30] MEATCHICKEN: is this unsupported?
[07:38:37] MEATCHICKEN: rvanlieshout, any easy work arounds?
[07:42:38] MEATCHICKEN: rvanlieshout, how would I do it in that case?
[07:43:05] MEATCHICKEN: multiple type of users
[07:43:10] MEATCHICKEN: just a regular User
[07:50:03] MEATCHICKEN: rvanlieshout, Will try that thanks
[20:48:48] MEATCHICKEN: I have a survey that needs to be protected. Currently the workflow is that it is guarded by a query parameter token
[20:48:57] MEATCHICKEN: is there a better way to do this?
[20:49:33] MEATCHICKEN: epochwolf, if I did have user accounts?
[20:49:41] MEATCHICKEN: I can create some sort of model that determines who can take the survey?
[20:49:50] MEATCHICKEN: what if I want an easy-mode share link
[20:50:23] MEATCHICKEN: epochwolf, Just as a query parameter? wouldn't that get saved in the browser history?
[20:51:28] MEATCHICKEN: epochwolf, how can I implement that for tons of users? Generate one link for many users
[20:52:23] MEATCHICKEN: epochwolf, fair enough - thanks !


[18:13:28] MEATCHICKEN: Read error: Connection reset by peer


[16:00:09] MEATCHICKEN: bar.first) vs Model.create(foo: bar.first) where foo is a polymorphic belongs_to
[16:00:13] MEATCHICKEN: is this intended?
[16:06:26] MEATCHICKEN: Nvm^ - it was because you can't reference the association directly in a uniqueness validation
[16:06:32] MEATCHICKEN: +10 to reading stack traces
[16:43:45] MEATCHICKEN: Does anyone run devise with a JSON API?
[16:48:04] MEATCHICKEN: I'm getting issues with controller sessions interfering with token authentication
[16:48:13] MEATCHICKEN: I can turn off sessions but I also have a web component for my application
[16:48:49] MEATCHICKEN: The issue being - once the mobile client deletes the token auth - they are still considered signed-in because devise/controller sessions