ipstatic

Activity Graph

Page 1 of 1

2018-05-06

[12:36:12] ipstatic: Ping timeout: 260 seconds

2018-04-25

[12:25:55] ipstatic: *.net *.split
[12:27:35] ipstatic: has joined #RubyOnRails
[15:01:26] ipstatic: *.net *.split
[15:03:02] ipstatic: has joined #RubyOnRails

2017-07-29

[00:06:29] ipstatic: has left #RubyOnRails: ("Bye")

2017-07-28

[14:54:44] ipstatic: has joined #RubyOnRails
[14:55:57] ipstatic: Is it still recommended to use an admin namespace in an app? Or just use Authorization to gate specific admin actions on the same controller?

2015-10-12

[15:45:30] ipstatic: has left #RubyOnRails: ("Bye")
[15:45:51] ipstatic: has left #ruby: ("Bye")

2015-10-02

[16:50:16] ipstatic: I have records with start and end date columns. I am trying to find records where the start and end dates are between a given time. For some reason I am having trouble coming up with the query to perform this. Anyone have any pointers?
[16:59:07] ipstatic: @smathy: find records where a given date falls between the start/end dates
[17:02:01] ipstatic: @smathy: my end goal is to find records that overlapping in the same 1 minute increments. I have call records and would like to know the number of concurrent calls for any given minute

2015-09-19

[14:32:29] ipstatic: Ping timeout: 272 seconds
[14:33:41] ipstatic: has joined #ruby
[14:33:41] ipstatic: has joined #RubyOnRails

2015-09-18

[01:31:31] ipstatic: has joined #RubyOnRails
[01:31:32] ipstatic: has joined #ruby

2015-09-16

[00:21:45] ipstatic: Ping timeout: 264 seconds

2015-09-03

[20:33:06] ipstatic: Ping timeout: 250 seconds
[20:37:24] ipstatic: has joined #ruby
[20:37:24] ipstatic: has joined #RubyOnRails
[20:45:25] ipstatic: Ping timeout: 264 seconds
[20:50:25] ipstatic: has joined #ruby
[20:50:25] ipstatic: has joined #RubyOnRails

2015-08-22

[14:11:16] ipstatic: Ping timeout: 240 seconds
[14:12:32] ipstatic: has joined #ruby
[14:12:32] ipstatic: has joined #RubyOnRails

2015-08-13

[07:41:28] ipstatic: *.net *.split
[07:43:00] ipstatic: has joined #ruby
[07:43:07] ipstatic: has joined #RubyOnRails
[07:45:51] ipstatic: Ping timeout: 265 seconds
[07:51:50] ipstatic: has joined #ruby
[07:51:50] ipstatic: has joined #RubyOnRails

2015-08-05

[01:19:11] ipstatic: has joined #ruby
[01:21:06] ipstatic: is there a way to operate on the assignment of a variable in a .each block? For example I am reading a file line by line and would love to run .strip on the assignment of line so I don't have to inside the block. file.each |line.strip| vs file.each |line|
[01:22:49] ipstatic: centrx: heh, why didn't I think of that

2015-08-04

[08:35:13] ipstatic: *.net *.split
[08:37:41] ipstatic: has joined #RubyOnRails

2015-07-04

[02:10:39] ipstatic: Ping timeout: 252 seconds
[02:11:34] ipstatic: has joined #RubyOnRails

2015-06-21

[00:05:40] ipstatic: has joined #RubyOnRails

2015-06-20

[21:47:14] ipstatic: Ping timeout: 246 seconds

2015-03-06

[03:57:31] ipstatic: is there anything else I have to do in a Rails 4.2 project to enabled rake test:profile other than add rails-perftest and ruby-prof to my Gemfile?
[03:57:49] ipstatic: I have added both and do not see that rake task listed with rake -T
[04:00:18] ipstatic: Radar: when I run bundle exec rake test:profile, it almost immediately returns to an empty prompt. Am I missing a config file or something?

2015-02-23

[20:36:23] ipstatic: is there a way for me to have the rails logger prepend the same ActiveJob information at the beginning of the string as the system messages do? For example: [ActiveJob] [JobClass] [UUID]. When I do a Rails.logger.error "blah" I only get blah and not the associated information.

2015-02-15

[23:16:01] ipstatic: can I use assert_enqueued_with inside a controller test?
[23:16:21] ipstatic: when I try, I get the following error: NoMethodError: undefined method `assert_enqueued_with' for #<PostsControllerTest

2014-12-13

[14:03:40] ipstatic: Is there a way to use a fixture that isn't associated with a table/database?

2014-12-12

[02:16:00] ipstatic: I am trying to create a controller test for my Sessions controller and I am trying to test the :create method, however I am getting the following error: ActionController::UrlGenerationError: No route matches {:action=>"create", :controller=>"sessions"}
[02:16:17] ipstatic: Here are my routes: https://gist.github.com/ipstatic/359cde3c302a13a22eee
[02:17:25] ipstatic: and I added my test file as well
[02:22:36] ipstatic: crankharder: ah, thank you! I added provider: 'facebook' and it worked like a charm
[02:22:59] ipstatic: except I need to now set the request.env parameter
[02:26:29] ipstatic: Woolly: I have tried this: @request.env['omniauth.auth'] = OmniAuth.config.mock_auth[:facebook] but @request.env is still nil when I echo it out
[02:28:38] ipstatic: Woolly: so @request is getting set properly in my test, however test unit isn't passing that environment variable to the controller
[02:28:53] ipstatic: if I echo out env in the controller I just get {}
[02:36:13] ipstatic: rhizome: I am using omniauth with Facebook oauth
[02:37:43] ipstatic: Woolly: that didn't fix anything however if I echo out the request variable from the controller I see omniauth.auth set somewhere in that soup
[02:38:25] ipstatic: Woolly: Thank you for your help, I think I am knocking on the door
[03:09:44] ipstatic: Woolly: If I use ActionDispatch::IntegrationTest my tests work, so it must be something with ActionController::TestCase and setting the @request variables

2014-11-12

[02:23:46] ipstatic: Does anyone know how to log the current user_id with log_tags in rails 4? Everything I am seeing is using cookies or cookie_jar and in rails 4 that is encrypted and I cannot find a way to get at the info
[02:24:57] ipstatic: sevenseacat: http://stackoverflow.com/questions/9582200/add-session-id-to-each-log-in-rails
[02:27:38] ipstatic: so I have the subdomain and UUID going great, I just want to know which user is making the request as well in case there are issues

2014-10-11

[01:40:15] ipstatic: How can I return an array of only the parent objects? I have a model UserReport which belongs to User, and I would like to find certain UserReports but return their User objects instead of the actual UserReport object
[01:57:55] ipstatic: wethu: ah, thank you, should have thought of that yself
[01:59:23] ipstatic: was trying to use something built into AR and forgot about plain ruby :)
[02:04:36] ipstatic: wethu: ahh, I'll have to give that a shot
[02:06:56] ipstatic: wethu: cool, I'll play with it, I at least have something working with the map
[02:07:13] ipstatic: Cache_Money: I use Linode
[02:22:28] ipstatic: wethu: that doesn't appear to allow me to use where clauses on the UserRecord class, for the series of Ids I used .uniq to knock that down
[02:23:02] ipstatic: wethu: User.where(id: UserReport.where('created_at >= ?', Time.now - 30.days).pluck(:user_id).uniq)

2014-08-31

[12:24:26] ipstatic: is there any reason why ActionMailer::Base.deliveries would be empty in a test environment? I am trying to make sure a POST action will send an email after a user is created, and the test log file shows it was sent: NotificationMailer#moderate: processed outbound mail in 1.7ms. However in my rspec test the ActionMailer::Base.deliveries array is empty and fails my test

2014-08-30

[19:50:27] ipstatic: For mailers, do most of you just use one mailer and use different methods or do you create a mailer per controller, even if each may only use one method?
[19:51:21] ipstatic: I am wondering if I should just create a NotifiationsMailer instead of one for Users Posts etc

2014-08-03

[12:41:29] ipstatic: I am using coffescript and Turbolinks and I am trying to call a function I defined in application.js inside a view. I have bound the function to window.requestTimer and can call it from the browser console. However when I call it from the page, I get "ReferenceError: Can't find variable: prayerRequestTimer" in the console. Any ideas?

2014-05-13

[01:05:57] ipstatic: I have a Users model where I need to save the information both the database (ActiveRecord) and to an API (ActiveResource). What would be the best way to accomplish this? Should I just add another users model (maybe called user_api) that is for ActiveResource and use observers to make the call after the save to the database?
[01:13:15] ipstatic: Radar: what would you advise using?
[01:13:27] ipstatic: I just need to GET/POST some data
[01:13:52] ipstatic: Radar: do you have a good example? I always get lost writing the boiler plate stuff like config initializers etc
[01:14:33] ipstatic: rhizome: Where would you put the .save action for that? inside the Users controller?
[01:15:16] ipstatic: Radar: it appears I would need to create my own methods like find and all?
[01:16:08] ipstatic: Radar: I control both end points, and the other end is another rails app
[01:18:49] ipstatic: Radar: thanks for your help, I might have to go the HTTParty route.
[13:27:24] ipstatic: Does anyone have experience with ActiveLdap and Rails engines? When I try to run either my tests or console for a model, I get the following error: ActiveLdap::ConnectionNotSetup

2014-04-28

[18:15:33] ipstatic: lethjakman: I am sorry, the return value of what?
[18:16:11] ipstatic: lethjakman: no worries

2014-04-25

[17:05:19] ipstatic: anyone here have experience with activeldap? Trying to test group membership and seeing some weird issues in regards to include?/member? https://gist.github.com/ipstatic/e164a2c511a9e3ee1994

2014-04-02

[20:43:15] ipstatic: anyone here have experience with ActiveLDAP and FactoryGirl?
[20:43:38] ipstatic: trying to setup tests for ActiveLDAP with Rspec and FactoryGirl and get this error: "cannot load such file -- net/ldap"

2013-10-06

[13:30:48] ipstatic: Does anyone have experience with Nginx being slow on sending files to the browser with send_file (the file size is ~63MB). After clicking the download link, it takes around 60 - 90s before the download starts.

2013-09-26

[18:19:42] ipstatic: I have a render text: 'Hello World' in my controller and the action is complaining about a missing template, how can I skip the template?
[18:21:05] ipstatic: fryguy: https://gist.github.com/ipstatic/06141313304237a19ef5
[18:26:01] ipstatic: fryguy: While pasting my code I saw where I had the render statement inside a each block, thanks for your help!

2013-09-25

[18:28:14] ipstatic: I have a render statement that does not work when I use the collection parameter. This works: render apps, as: :application, but this (which should render the same view) does not: render "applications/application", collection: apps, as: :application
[19:01:52] ipstatic: is there way to keep the spacing for a render block? For instance the first item in my render collection will be indented properly, but others are not
[19:08:10] ipstatic: jstrong: https://gist.github.com/ipstatic/dcb3af1635b8eaea3019
[19:11:03] ipstatic: jstrong: yes
[19:11:26] ipstatic: jstrong: is there something like jbuilder for Yaml?
[19:11:55] ipstatic: jstrong: well I guess I could do that, but I have other views for this same variable
[19:12:29] ipstatic: jstrong: the problem is I need to mess with the data first, collect all the apps of a certain type and only pass a few of their params
[19:13:11] ipstatic: jstrong: gotcha. I will build it in the controller then and use a processor
[19:14:01] ipstatic: jstrong: nah, I can do it in the controller and use to_yaml
[19:14:11] ipstatic: jstrong: I was just trying to avoid it :)

2013-09-11

[20:12:45] ipstatic: How can I do custom SQL for a scope in Rails 4? I have the following: has_and_belongs_to_many :hosted_by, conditions: ["device_devices.relationship = ?", 'Hosted by'] and I cannot figure out how to use the new syntax

2013-09-06

[01:21:07] ipstatic: Anyone had issues with ActiveResource not serializing properly with a custom get method?
[01:21:27] ipstatic: Device.all serializes properly, Device.get(:virtual) returns the proper JSON but it isn't serialized

2013-09-01

[13:26:30] ipstatic: So I have an externally controlled MySQL database that I am trying to get a list of devices from. In this table there is a device_id column and versions column. A device (device_id) can have multiple versions. So if there is 2 versions, there is 2 entries with the same device_id. I am trying to get a unique listing back of all devices based on the version, but I need the latest version returned.
[13:26:43] ipstatic: I am using group(:device_id) but that does not always select the latest version

2013-08-19

[19:25:20] ipstatic: can you not use a content_tag block with HTTP streaming?

2013-08-17

[12:05:19] ipstatic: I am trying to test a before_create method with rspec and I am not getting the results I expect. Can someone take a look and tell me what I am doing wrong? https://gist.github.com/ipstatic/3b87dbea1fdc5bbaf947
[12:15:23] ipstatic: ljarvis: do you mean does it work?
[12:16:29] ipstatic: ljarvis: correct, it would not pass if the Jenkins client returns a duplicate name error
[12:16:52] ipstatic: the actual method works, I just want to make sure the before_create callback is actually called
[12:20:56] ipstatic: ljarvis: https://gist.github.com/ipstatic/1c5f599a00a3cb07fdf0
[12:23:33] ipstatic: ljarvis: I also included the other specs that test the actual create_jenkins_job method

2013-08-13

[13:47:13] ipstatic: Anyone have any suggestions on how to model the relationship for this? I have a Versions and Environments table. Only one version can be in any environment at one time, but the same version can be in all environments if so desired. It is almost as if Version has_many Environments but Environments has_one Version. Should Environment just belong_to Version instead?

2013-08-12

[19:27:16] ipstatic: Anyone here use RSpec with nested resources?
[19:28:09] ipstatic: No route matches {:app=>"1", :id=>"6", :version=>{:name=>"0.0.1", :branch=>"master", :commit=>nil}, :controller=>"versions", :action=>"update"}
[19:28:09] ipstatic: madnificent: I get this error: ActionController::UrlGenerationError:
[19:28:18] ipstatic: let me build a gist for you
[19:28:52] ipstatic: batasrki: put :update, {app: @app, id: @version, version: FactoryGirl.attributes_for(:version)}
[19:30:13] ipstatic: madnificent: how do I add the information about the parent?
[19:31:29] ipstatic: No route matches {:app_id=>#<Version id: 6, name: "0.0.1", branch: "master", commit: nil, app_id: 1, created_at: "2013-08-12 19:30:57", updated_at: "2013-08-12 19:30:57">, :id=>nil, :controller=>"versions", :action=>"show", :format=>nil} missing required keys: [:id]
[19:31:29] ipstatic: madnificent: I just have this one nest. Here is what I get when I do app_id
[19:31:55] ipstatic: put :update, {app_id: @app, id: @version, version: FactoryGirl.attributes_for(:version)}
[19:33:17] ipstatic: madnificent: right, so why is the dynamic builder screwing it up? put :update, {app_id: @app, id: @version, version: FactoryGirl.attributes_for(:version)}
[19:35:21] ipstatic: madnificent: put :update, {app_id: @version.app.id, id: @version.id, version: FactoryGirl.attributes_for(:version)} gives me this: No route matches {:app_id=>#<Version id: 6, name: "0.0.1", branch: "master", commit: nil, app_id: 1, created_at: "2013-08-12 19:34:36", updated_at: "2013-08-12 19:34:36">, :id=>nil, :controller=>"versions", :action=>"show", :format=>nil} missing required keys: [:id]
[19:36:55] ipstatic: madnificent: the guide I followed had it in there for the put, do I not need to do that? I am attempting to test changing parameters
[19:38:10] ipstatic: madnificent: right, the other tests work, it is just the PUTs that are breaking (and actually just the ones that have valid data. The ones that have invalid data work)
[19:39:02] ipstatic: param not found: version
[19:39:02] ipstatic: ActionController::ParameterMissing:
[19:39:02] ipstatic: madnificent: also if I leave off the version param I get this: Failure/Error: put :update, {app_id: @version.app.id, id: @version.id}

2013-07-24

[18:30:07] ipstatic: how can I dynamically build the hash? that is required for first_or_create? I tried using this code but it doesn't work: Hash[columns.collect { |c| [c, @device[c]]}]