SeanLazer

Activity Graph

Page 1 of 3 | Next »

2016-07-20

[18:05:32] SeanLazer: has joined #RubyOnRails
[18:36:21] SeanLazer: Quit: SeanLazer

2016-06-20

[15:44:18] SeanLazer: has joined #RubyOnRails
[19:21:54] SeanLazer: Quit: SeanLazer

2016-05-20

[15:02:26] SeanLazer: has joined #RubyOnRails
[15:04:24] SeanLazer: does anyone know how to stub out routing constraints or pre-set routing constraints when testing controllers? i have a couple of constraints that do role checks on my users, i just want to stub them to return true or false so i can test the underlying controllers
[15:05:00] SeanLazer: i tried WorkerRouteConstraint.any_instance.stubs(matches?: true) in my setup method but it didn't seem to do anything
[15:20:04] SeanLazer: does anyone know how to manage routing constraints when testing rails controllers?
[16:03:21] SeanLazer: i have a weird integration test thing going on
[16:03:29] SeanLazer: i'm doing get '/' and assert_response :success
[16:03:39] SeanLazer: but i'm getting Expected response to be a <2XX: success>, but was a <302: Found> redirect to <http://www.example.com/>
[16:04:07] SeanLazer: i don't know where www.example.com is coming from, and i don't know why it's telling me that get '/' is redirecting to, functionally, '/'
[16:35:32] SeanLazer: smathy: Yeah, there is some auth in the setup for the test, maybe that redirect is causing the test case to fail even though i'm also running get '/'?
[16:36:04] SeanLazer: i think maybe i'll give this a try with capybara since i know how to be more specific about what i want there
[17:44:47] SeanLazer: swinner: i still use haml
[19:56:33] SeanLazer: Ping timeout: 240 seconds

2016-05-05

[14:17:43] SeanLazer: has joined #RubyOnRails
[16:14:44] SeanLazer: Quit: SeanLazer

2016-05-04

[01:53:57] SeanLazer: Quit: SeanLazer
[12:52:19] SeanLazer: has joined #RubyOnRails
[20:44:19] SeanLazer: Quit: SeanLazer

2016-05-03

[00:59:05] SeanLazer: has joined #RubyOnRails
[01:08:46] SeanLazer: Quit: SeanLazer
[01:10:25] SeanLazer: has joined #RubyOnRails
[01:18:55] SeanLazer: Quit: SeanLazer
[01:20:37] SeanLazer: has joined #RubyOnRails
[13:05:10] SeanLazer: Quit: SeanLazer
[13:08:07] SeanLazer: has joined #RubyOnRails
[15:45:20] SeanLazer: Quit: SeanLazer
[15:47:04] SeanLazer: has joined #RubyOnRails
[17:31:54] SeanLazer: Quit: SeanLazer
[17:34:42] SeanLazer: has joined #RubyOnRails
[17:36:20] SeanLazer: Client Quit
[17:46:52] SeanLazer: has joined #RubyOnRails
[20:11:38] SeanLazer: Quit: SeanLazer
[20:13:17] SeanLazer: has joined #RubyOnRails

2016-05-02

[01:06:56] SeanLazer: Quit: SeanLazer
[01:43:46] SeanLazer: has joined #RubyOnRails
[12:20:55] SeanLazer: Quit: SeanLazer
[12:45:55] SeanLazer: has joined #RubyOnRails
[18:17:25] SeanLazer: Quit: SeanLazer
[19:49:31] SeanLazer: has joined #RubyOnRails
[21:40:34] SeanLazer: Quit: SeanLazer

2016-04-30

[15:02:50] SeanLazer: has joined #RubyOnRails

2016-04-29

[12:18:32] SeanLazer: Quit: SeanLazer
[13:15:57] SeanLazer: has joined #RubyOnRails
[18:40:55] SeanLazer: is there a way that i can stub or prevent the rendering of templates in my controller tests?
[18:41:24] SeanLazer: i have to do some mocking to test control flow in my action and it's messing with the rendered template. i don't care about the template at all in this test and i don't want to deal with it.
[20:55:39] SeanLazer: Ping timeout: 276 seconds

2016-04-28

[00:25:50] SeanLazer: has joined #RubyOnRails
[01:31:43] SeanLazer: voidDotClass: has_many :user_schools and has_many :users, through: :user_schools
[01:32:33] SeanLazer: has_many :schools, class_name: 'UserSchool'
[01:32:48] SeanLazer: this is potentially a bad idea though
[01:33:57] SeanLazer: when you come back to this program in six months you'll forget that User#schools actually returns a collection of UserSchools
[01:34:01] SeanLazer: and that will be unpleasant
[01:35:57] SeanLazer: what's the best way to test a supercontroller? should i just set up a mock sub-controller and some fake routes in my test setup?
[01:41:21] SeanLazer: voidDotClass: if you're looking to have an interface that's not as ugly as user.user_schools don't be afraid to give your join tables more expressive names
[01:57:54] SeanLazer: what is the best way to test something that is meant to extended/inherited?
[02:00:08] SeanLazer: sevenseacat: it's a supercontroller, so that makes it a bit trickier
[02:00:22] SeanLazer: looks like the rails team just creates mock controllers right in the test file https://github.com/rails/rails/blob/master/actionpack/test/controller/base_test.rb
[02:01:10] SeanLazer: sevenseacat: it's trickier because traditional rails controller testing means running the actions and testing things like what template gets returned
[02:02:52] SeanLazer: mwlang: that's looking like the best option. i think in this case i'll also have to set up and tear down some routes for the mock class
[02:06:27] SeanLazer: mwlang: cool, thanks, i'll go in that direction
[02:25:01] SeanLazer: Quit: SeanLazer
[13:10:12] SeanLazer: has joined #RubyOnRails

2016-04-27

[01:28:50] SeanLazer: Quit: SeanLazer
[01:30:09] SeanLazer: has joined #RubyOnRails
[02:20:00] SeanLazer: Quit: SeanLazer
[12:46:07] SeanLazer: has joined #RubyOnRails
[20:53:24] SeanLazer: Ping timeout: 260 seconds

2016-04-26

[03:07:35] SeanLazer: has joined #RubyOnRails
[13:09:10] SeanLazer: Quit: SeanLazer
[13:18:45] SeanLazer: has joined #RubyOnRails

2016-04-25

[01:53:08] SeanLazer: has joined #RubyOnRails
[12:26:49] SeanLazer: Quit: SeanLazer
[12:50:47] SeanLazer: has joined #RubyOnRails
[20:42:54] SeanLazer: Quit: SeanLazer

2016-04-24

[14:23:50] SeanLazer: has joined #RubyOnRails
[14:45:50] SeanLazer: Quit: SeanLazer
[17:13:46] SeanLazer: has joined #RubyOnRails
[18:18:55] SeanLazer: Quit: SeanLazer
[18:44:55] SeanLazer: has joined #RubyOnRails
[19:04:05] SeanLazer: Quit: SeanLazer

2016-04-23

[02:18:11] SeanLazer: has joined #RubyOnRails
[04:20:22] SeanLazer: Quit: SeanLazer

2016-04-22

[00:51:01] SeanLazer: Quit: SeanLazer
[00:54:14] SeanLazer: has joined #RubyOnRails
[01:11:03] SeanLazer: Quit: SeanLazer
[03:00:31] SeanLazer: has joined #RubyOnRails
[04:19:40] SeanLazer: Quit: SeanLazer
[12:53:47] SeanLazer: has joined #RubyOnRails
[17:17:54] SeanLazer: Ping timeout: 276 seconds

2016-04-21

[13:13:32] SeanLazer: has joined #RubyOnRails
[17:19:13] SeanLazer: *.net *.split
[17:20:30] SeanLazer: has joined #RubyOnRails

2016-04-20

[12:23:09] SeanLazer: Quit: SeanLazer
[12:50:48] SeanLazer: has joined #RubyOnRails
[20:56:18] SeanLazer: Ping timeout: 246 seconds

2016-04-19

[21:20:59] SeanLazer: has joined #RubyOnRails
[21:23:06] SeanLazer: Client Quit
[21:25:11] SeanLazer: has joined #RubyOnRails

2016-04-12

[09:04:19] SeanLazer: Read error: Connection reset by peer
[09:04:36] SeanLazer: has joined #RubyOnRails
[17:49:03] SeanLazer: Quit: SeanLazer
[18:51:58] SeanLazer: has joined #RubyOnRails
[19:04:03] SeanLazer: Ping timeout: 264 seconds

2016-04-11

[14:15:10] SeanLazer: has joined #RubyOnRails
[14:15:31] SeanLazer: Does anyone know how to access path helpers for routes that are outside of my current constraint?
[14:15:47] SeanLazer: Eg. i'm within a subdomain but i want to use a route helper to generate a link back into the "main app"
[14:16:31] SeanLazer: doesn't work, the path helper is unavailable
[14:16:49] SeanLazer: undefined method `new_user_registration_path'
[14:17:57] SeanLazer: Here's the relevant line
[14:17:58] SeanLazer: new_user_registration GET /users/sign_up(.:format) registrations#new
[14:18:22] SeanLazer: i think it's because i'm using constraints though
[14:18:57] SeanLazer: https://gist.github.com/SeanRoberts/55581c18fab89fcc8537e3f3ec4f7339
[14:19:39] SeanLazer: https://gist.github.com/SeanRoberts/55581c18fab89fcc8537e3f3ec4f7339
[14:20:25] SeanLazer: essentially i'm allowing sign-in on to any subdomain
[14:20:29] SeanLazer: but registration can only happen on the main app
[14:20:45] SeanLazer: so from within a subdomain i want to be able to link back to the main app registration page
[14:21:02] SeanLazer: but i don't have access to that path helper because i'm not within the MainAppConstraint
[14:25:07] SeanLazer: No problem, thanks for taking a look!
[14:26:03] SeanLazer: I think you would still have the same eventual issue though, I don't think path helpers that are scoped to one constraint are available in a different constraint
[14:26:09] SeanLazer: I think I'll just have to hardcode the URL
[20:38:49] SeanLazer: Ping timeout: 250 seconds
[22:32:04] SeanLazer: has joined #RubyOnRails

2016-04-10

[04:56:23] SeanLazer: Quit: SeanLazer

2016-04-09

[00:15:19] SeanLazer: has joined #RubyOnRails

2016-04-08

[12:19:20] SeanLazer: Quit: SeanLazer
[12:52:06] SeanLazer: has joined #RubyOnRails
[13:24:28] SeanLazer: Quit: SeanLazer
[13:26:39] SeanLazer: has joined #RubyOnRails
[20:42:42] SeanLazer: Ping timeout: 246 seconds

2016-04-07

[19:46:30] SeanLazer: has joined #RubyOnRails

2016-04-04

[13:00:00] SeanLazer: has joined #RubyOnRails
[15:04:03] SeanLazer: Ping timeout: 264 seconds

2016-04-03

[14:35:17] SeanLazer: has joined #RubyOnRails
[16:22:11] SeanLazer: Quit: SeanLazer
[20:46:11] SeanLazer: has joined #RubyOnRails
[22:58:57] SeanLazer: Quit: SeanLazer

2016-04-01

[00:58:44] SeanLazer: Quit: SeanLazer
[13:02:20] SeanLazer: has joined #RubyOnRails
[21:02:23] SeanLazer: Quit: SeanLazer
[21:07:35] SeanLazer: has joined #RubyOnRails
[21:18:29] SeanLazer: Quit: SeanLazer
[21:49:29] SeanLazer: has joined #RubyOnRails
[23:09:44] SeanLazer: Quit: SeanLazer

2016-03-31

[19:19:36] SeanLazer: has joined #RubyOnRails
[20:55:01] SeanLazer: Quit: SeanLazer
[23:51:19] SeanLazer: Client Quit
[23:51:19] SeanLazer: has joined #RubyOnRails
[23:52:00] SeanLazer: has joined #RubyOnRails
[23:52:53] SeanLazer: Read error: Connection reset by peer
[23:53:05] SeanLazer: has joined #RubyOnRails

2016-03-21

[12:44:58] SeanLazer: has joined #RubyOnRails
[14:13:27] SeanLazer: Quit: SeanLazer

2016-03-19

[01:38:58] SeanLazer: has joined #RubyOnRails
[02:21:36] SeanLazer: Quit: SeanLazer

2016-03-18

[04:10:26] SeanLazer: Quit: SeanLazer
[12:52:11] SeanLazer: has joined #RubyOnRails
[20:37:41] SeanLazer: Ping timeout: 244 seconds

2016-03-17

[13:06:19] SeanLazer: has joined #RubyOnRails

2016-03-16

[12:47:11] SeanLazer: has joined #RubyOnRails
[17:09:13] SeanLazer: Ping timeout: 240 seconds
[20:21:11] SeanLazer: Quit: SeanLazer
[20:22:11] SeanLazer: has joined #RubyOnRails
[20:33:48] SeanLazer: Quit: SeanLazer

2016-03-15

[03:15:33] SeanLazer: Quit: SeanLazer
[03:21:30] SeanLazer: has joined #RubyOnRails
[04:08:26] SeanLazer: Quit: SeanLazer
[12:57:36] SeanLazer: has joined #RubyOnRails
[22:27:53] SeanLazer: Quit: SeanLazer

2016-03-14

[02:10:05] SeanLazer: has joined #RubyOnRails
[02:11:14] SeanLazer: Client Quit
[02:31:04] SeanLazer: has joined #RubyOnRails
[03:55:47] SeanLazer: Quit: SeanLazer
[12:51:09] SeanLazer: has joined #RubyOnRails
[15:05:39] SeanLazer: Ping timeout: 244 seconds
[15:47:02] SeanLazer: Quit: SeanLazer
[17:53:12] SeanLazer: has joined #RubyOnRails
[20:53:14] SeanLazer: Ping timeout: 268 seconds
[21:17:10] SeanLazer: has joined #RubyOnRails
[22:31:40] SeanLazer: Quit: SeanLazer
[22:42:01] SeanLazer: has joined #RubyOnRails

2016-03-13

[13:09:24] SeanLazer: has joined #RubyOnRails
[14:40:18] SeanLazer: Quit: SeanLazer

2016-03-12

[01:16:16] SeanLazer: has joined #RubyOnRails
[01:34:18] SeanLazer: Quit: SeanLazer
[05:01:16] SeanLazer: has joined #RubyOnRails
[07:17:12] SeanLazer: Quit: SeanLazer
[19:30:31] SeanLazer: has joined #RubyOnRails
[20:04:02] SeanLazer: Quit: SeanLazer
[23:22:42] SeanLazer: has joined #RubyOnRails
[23:43:21] SeanLazer: Quit: SeanLazer

2016-03-11

[01:28:14] SeanLazer: does anyone know if there's a way to get a backtrace in sprockets of where a file is being imported or required? i have an error in a CSS file but as far as I know i've removed the @import call for that file
[01:28:34] SeanLazer: i'm wondering if it's being imported or required somewhere else, possibly out of order, causing the error in the first place
[01:31:32] SeanLazer: never mind, someone created an initializer and threw this in: Rails.application.config.assets.precompile += [/.*\.js/,/.*\.css/]
[02:18:02] SeanLazer: Quit: SeanLazer
[03:43:53] SeanLazer: has joined #RubyOnRails
[04:08:01] SeanLazer: Quit: SeanLazer
[13:53:18] SeanLazer: has joined #RubyOnRails
[21:28:42] SeanLazer: Ping timeout: 276 seconds

2016-03-10

[01:29:04] SeanLazer: has joined #RubyOnRails
[01:55:00] SeanLazer: Quit: SeanLazer
[04:32:43] SeanLazer: has joined #RubyOnRails
[04:37:33] SeanLazer: Ping timeout: 276 seconds
[06:33:14] SeanLazer: has joined #RubyOnRails
[06:37:54] SeanLazer: Ping timeout: 246 seconds
[13:40:04] SeanLazer: has joined #RubyOnRails

2016-03-09

[12:27:02] SeanLazer: Ping timeout: 240 seconds
[13:18:24] SeanLazer: Quit: SeanLazer
[13:46:49] SeanLazer: has joined #RubyOnRails
[21:55:47] SeanLazer: Ping timeout: 248 seconds
[22:18:51] SeanLazer: has joined #RubyOnRails
[22:22:21] SeanLazer: Client Quit

2016-03-08

[13:57:57] SeanLazer: Quit: SeanLazer
[13:59:52] SeanLazer: has joined #RubyOnRails

2016-03-07

[14:00:22] SeanLazer: has joined #RubyOnRails
[15:06:06] SeanLazer: does anyone know what the correct procedure is with the apartment gem if i want to move an existing model into the excluded_models list?
[15:06:31] SeanLazer: i'm not sure what i need to do to update the schema
[21:52:00] SeanLazer: Quit: SeanLazer
[22:55:09] SeanLazer: has joined #RubyOnRails

2016-03-05

[03:59:31] SeanLazer: has joined #RubyOnRails
[04:12:27] SeanLazer: does anyone know why request.host would return "localhost" when i'm accessing my app via lvh.me?
[04:13:48] SeanLazer: i'm using webrick and rails5 beta3
[04:13:59] SeanLazer: thanks for checking though!
[04:15:16] SeanLazer: that's a good point though, i should see if it's broken in 4.x
[04:17:29] SeanLazer: yeah, works with 4.2.5.1, crud
[04:20:27] SeanLazer: Radar: ah ha, looks like it's being caused by browser-sync
[04:21:03] SeanLazer: i'm proxying my requests through browser-sync into webrick
[04:21:18] SeanLazer: haha no it's a thing from the javascript world that i've come to rely on
[04:21:34] SeanLazer: but like all things in the javascript world it will be obsolete by the time rails 5 ships
[04:24:27] SeanLazer: yeah i wouldn't recommend it
[04:28:16] SeanLazer: bleh, i feel stupid that i didn't catch this browser-sync thing right away
[04:28:30] SeanLazer: it proxies all requests to localhost:3000, of course it wasn't working right
[04:45:00] SeanLazer: slash_nick: i figured it out, it was unrelated to rails and mainly related to my own incompetence
[05:10:10] SeanLazer: Quit: SeanLazer
[15:02:07] SeanLazer: has joined #RubyOnRails
[20:04:44] SeanLazer: Quit: SeanLazer

2016-03-04

[19:05:20] SeanLazer: but maybe i could write a custom elevator
[19:06:25] SeanLazer: haha that's true
[19:06:45] SeanLazer: the main reason i don't want to use subdomains is because i wanted to prevent requiring unique team names
[19:07:30] SeanLazer: maybe that's stupid though
[19:09:23] SeanLazer: tubbo: Maybe i'll just go subdomain and enforce uniquness
[19:09:55] SeanLazer: tubbo: Have you used the apartment gem? I've written subdomain-based multi-tenant setups a bunch of times from scratch, is apartment worth using?
[19:11:38] SeanLazer: tubbo: yeah most of the apps i've written have been smalltime and not used schemas, just simple like @books = current_tenant.books.where('yadda yadda')
[22:25:18] SeanLazer: Quit: SeanLazer