_3dwardsharp

Activity Graph

Page 1 of 3 | Next »

2019-02-17

[01:30:21] _3dwardsharp: has joined #RubyOnRails

2018-06-18

2018-06-17

[23:58:19] _3dwardsharp: has joined #RubyOnRails

2018-05-07

[02:52:13] _3dwardsharp: has joined #RubyOnRails
[05:50:20] _3dwardsharp: what version of rails are you using?

2018-05-01

[00:38:51] _3dwardsharp: Ping timeout: 256 seconds
[01:32:20] _3dwardsharp: has joined #RubyOnRails
[02:44:48] _3dwardsharp: Widget.joins(:tasks).where(soup_id: 445).order(created_at: :desc).limit(3) ?
[02:52:59] _3dwardsharp: aress190 wut? i don't understand
[03:02:27] _3dwardsharp: mmm, really? Widget.joins(:tasks).where(soup_id: 445).order(created_at: :desc).limit(3).first.tasks ?
[03:03:45] _3dwardsharp: .includes(:tasks) if you want to eager load
[03:03:47] _3dwardsharp: http://guides.rubyonrails.org/active_record_querying.html
[03:06:24] _3dwardsharp: so you're saying you don't have a .tasks association? does Widgets belong_to :tasks?
[03:07:19] _3dwardsharp: sorry, i mean Tasks would need to belong_to :widgets
[03:08:28] _3dwardsharp: or, yeah, however you wanted to association to go...
[03:12:12] _3dwardsharp: sooo Widget.where(soup_id: 445).first.task ?
[03:16:10] _3dwardsharp: innocent question: why?
[03:21:03] _3dwardsharp: ...select as? but seriously, why is the extra query a problem?
[03:26:22] _3dwardsharp: .eager_load() or .preload() then?
[03:28:22] _3dwardsharp: dunno tho, using another gem to avoid an extra query seems :/
[03:40:02] _3dwardsharp: ...wait, so why not .includes(:task)?
[03:40:04] _3dwardsharp: ACTION shrugz
[03:51:09] _3dwardsharp: so .map em? Widget.joins(:task).includes(:task).where(...).map{|w| {widget: w, task: w.task} }

2018-04-30

[21:07:24] _3dwardsharp: has joined #RubyOnRails

2018-04-26

[02:17:22] _3dwardsharp: has joined #RubyOnRails
[21:51:52] _3dwardsharp: has joined #RubyOnRails

2018-04-25

[21:33:12] _3dwardsharp: has joined #RubyOnRails
[23:18:05] _3dwardsharp: Ping timeout: 240 seconds

2018-04-23

[00:57:09] _3dwardsharp: Ping timeout: 260 seconds
[01:54:33] _3dwardsharp: has joined #RubyOnRails

2018-04-22

[20:06:07] _3dwardsharp: has joined #RubyOnRails

2018-04-20

[01:19:04] _3dwardsharp: has joined #RubyOnRails
[02:57:46] _3dwardsharp: Ping timeout: 256 seconds

2018-04-17

[03:23:09] _3dwardsharp: Ping timeout: 264 seconds

2018-04-16

[21:54:12] _3dwardsharp: has joined #RubyOnRails

2018-04-15

[21:11:25] _3dwardsharp: has joined #RubyOnRails

2018-04-12

2018-04-11

[20:05:51] _3dwardsharp: has joined #RubyOnRails

2018-04-10

[00:15:57] _3dwardsharp: Ping timeout: 240 seconds
[00:25:13] _3dwardsharp: has joined #RubyOnRails

2018-04-09

[00:50:14] _3dwardsharp: maybe .unscope(:limit) ?
[02:49:57] _3dwardsharp: Ping timeout: 240 seconds
[03:01:35] _3dwardsharp: has joined #RubyOnRails
[06:18:57] _3dwardsharp: Ping timeout: 268 seconds
[20:53:11] _3dwardsharp: has joined #RubyOnRails
[23:12:24] _3dwardsharp: Ping timeout: 260 seconds
[23:17:45] _3dwardsharp: has joined #RubyOnRails

2018-04-08

[03:38:15] _3dwardsharp: has joined #RubyOnRails
[22:07:40] _3dwardsharp: has joined #RubyOnRails

2018-04-07

[23:40:03] _3dwardsharp: has joined #RubyOnRails

2017-04-08

[00:23:39] _3dwardsharp: Ping timeout: 246 seconds

2017-04-07

[22:07:14] _3dwardsharp: has joined #RubyOnRails

2017-04-06

[22:31:24] _3dwardsharp: has joined #RubyOnRails

2017-03-26

[11:33:00] _3dwardsharp: has joined #RubyOnRails

2017-03-23

[04:12:10] _3dwardsharp: has joined #RubyOnRails

2017-03-21

[00:21:33] _3dwardsharp: has joined #RubyOnRails

2017-03-20

[02:15:16] _3dwardsharp: has joined #RubyOnRails
[12:00:26] _3dwardsharp: adac: gem install nokogiri
[12:00:42] _3dwardsharp: (or run bundle install, like it tells you to :P)
[12:02:48] _3dwardsharp: do you really need rvm?
[12:37:34] _3dwardsharp: adac: have you started a rails console before?
[12:39:12] _3dwardsharp: can you gist your Gemfile?
[12:43:12] _3dwardsharp: are you sure bundle install is running completely?
[12:44:01] _3dwardsharp: at that version?
[12:45:12] _3dwardsharp: does your Gemfile.lock have that version?
[12:47:56] _3dwardsharp: adac, that's gonna take a while :/
[12:48:59] _3dwardsharp: okay, are you using a specific ruby version?
[12:49:47] _3dwardsharp: also, plz post your Gemfile on gist

2017-03-19

[02:34:10] _3dwardsharp: has joined #RubyOnRails
[05:27:41] _3dwardsharp: has joined #RubyOnRails
[10:30:03] _3dwardsharp: coldfront scope :with_the_hour, -> { where(start_date: (Time.now - 1.hour)..(Time.now + 1.hour)) }
[11:30:06] _3dwardsharp: Ping timeout: 240 seconds

2017-03-18

[00:02:25] _3dwardsharp: amperry: is work_orders in your schema.rb?
[00:03:36] _3dwardsharp: what do you mean by "created manually"?
[00:04:59] _3dwardsharp: ...and you put the entry in schema.rb yourself?
[00:06:43] _3dwardsharp: why would you not write a migration?
[00:09:46] _3dwardsharp: huh, it seems like you are getting more bugs otherwise ;)
[01:49:44] _3dwardsharp: has joined #RubyOnRails
[07:21:56] _3dwardsharp: Ping timeout: 246 seconds
[07:46:21] _3dwardsharp: has joined #RubyOnRails

2017-03-17

[08:11:49] _3dwardsharp: has joined #RubyOnRails
[09:42:59] _3dwardsharp: rgr uh, you can you either/both/none
[09:43:37] _3dwardsharp: no, that's rvm's thing
[09:45:05] _3dwardsharp: rgr, 1) close your web browser 2) open your terminal, start irb
[09:45:33] _3dwardsharp: dminuoso well, sure :D
[09:45:48] _3dwardsharp: rvm gemset's gonna blow yr mind!
[09:46:15] _3dwardsharp: i got no shade for rvm
[09:46:49] _3dwardsharp: that's totally real! it can be a bear to get started with
[09:48:35] _3dwardsharp: yeah, docker, like rvm, is great until it's not, lolol
[09:49:57] _3dwardsharp: hey! i'm not here to argue for rvm or docker! both are super useful. but there's nuance to every tool
[10:11:12] _3dwardsharp: *sigh* and then i find this: https://gist.github.com/edwardsharp/01d35947ffea615546bea4050f09c5d3
[10:13:57] _3dwardsharp: like query params?
[10:14:52] _3dwardsharp: uri_without_param ?
[10:15:46] _3dwardsharp: ACTION def look; self.class.look(self); end
[10:42:05] _3dwardsharp: no, rails likely would not generate the next key (integer?) value itself
[11:42:24] _3dwardsharp: .create will call .save itself, no need for you to call save
[11:46:57] _3dwardsharp: irc: we're here to make google'ing easy'r...
[22:05:27] _3dwardsharp: has joined #RubyOnRails

2017-03-16

[01:25:52] _3dwardsharp: Scriptonaut how are you calling Faraday::Connection.new?
[02:06:26] _3dwardsharp: Ping timeout: 246 seconds
[02:43:51] _3dwardsharp: has joined #RubyOnRails
[03:06:49] _3dwardsharp: oh, well double check your config and initializers
[03:07:41] _3dwardsharp: yea, i saw that...
[03:11:09] _3dwardsharp: Scriptonaut something is probably wrong with your config variables, can you get a connection to work with the console?
[05:39:56] _3dwardsharp: has joined #RubyOnRails
[05:44:00] _3dwardsharp: um, is there a difference between modules in the lib/ dir vs. module (that are POROs) in the app/ dir? like i'm reading that classes/modules from the app/ dir are loaded once, but things from lib/ can get reloaded? i'm getting errors like: "A copy of MyModel has been removed from the module tree but is still active!"
[05:45:04] _3dwardsharp: well, MyModel just as example obj, it wouldn't actually be a rails model, fwiw...
[05:58:41] _3dwardsharp: dminuoso: ah, yes, i do have that to true in development.rb
[06:05:07] _3dwardsharp: yeah, i've been picking up on that loading a reloadable module in a non-reloadable context (e.g. a model class). so trying to figure out how i know if these POROs are one or the other
[06:05:12] _3dwardsharp: yeah, i got some ugly stuff in application.rb but here it is: https://gist.github.com/edwardsharp/90f0f089f87fea74614c74722ea3105d
[06:06:02] _3dwardsharp: i've been pushing things around between app/*/, app/concerns/*/ and lib/*/
[06:07:19] _3dwardsharp: dminuoso right, good point about PORO, i just dealing with a bunch of files that don't really have the best place to live, and app/models/ doesn't seem like the place if it's not an AR-backed model class? i dunno, maybe i'm being stubborn?
[06:10:41] _3dwardsharp: *nod* sorry if this is getting vague. i wish i could share code, but i fear nda implications :( however, can you elaborate more on this reloadable notion? like, how can i know if a class is reloadable or not?
[06:14:47] _3dwardsharp: ACTION reads https://github.com/rails/rails/blob/master/activesupport/lib/active_support/dependencies.rb
[07:52:08] _3dwardsharp: ah yes, nested classes. concerns would be my goto in that case...
[11:05:12] _3dwardsharp: dminuoso collection_singular_ids?
[11:05:54] _3dwardsharp: collection_singular_ids=, rather.

2017-03-15

[02:38:48] _3dwardsharp: has joined #RubyOnRails
[04:21:47] _3dwardsharp: raul782 is the attrs variable changing between .build & .create? if not then just call audit_instance.save?
[04:29:13] _3dwardsharp: hmm, well, why would you want to have a variable ref (audit_instance) when you are using self. references?
[04:30:26] _3dwardsharp: sorry, this doesn't make a lot of sense without the bigger context of what you are hoping to achieve. in essence, you don't need to call .build AND .create
[04:34:07] _3dwardsharp: yikes, all that actually makes me more confused :/
[04:37:03] _3dwardsharp: yeah, don't do that
[04:38:41] _3dwardsharp: just call .save on whatever instance you setup with .build
[04:40:07] _3dwardsharp: well, update the attr(s) on the instance you setup with .build
[04:40:19] _3dwardsharp: no, don't call .build again
[04:42:18] _3dwardsharp: yeah. tho there's probably a more clear way to specify your polymorphic type...
[05:49:43] _3dwardsharp: has joined #RubyOnRails
[09:32:26] _3dwardsharp: fox_mulder_cp do you want to use the SUM() sql function (not rails .count)
[09:46:05] _3dwardsharp: does where('SUM(zone_prices) > 0') work?
[09:46:37] _3dwardsharp: i think COUNT() is also a sql function you can use
[09:47:49] _3dwardsharp: is .having() still in ActiveRecord?
[22:45:55] _3dwardsharp: has joined #RubyOnRails

2017-03-14

[02:22:23] _3dwardsharp: Ping timeout: 246 seconds
[02:29:31] _3dwardsharp: has joined #RubyOnRails
[06:35:10] _3dwardsharp: has joined #RubyOnRails

2017-03-13

[01:54:46] _3dwardsharp: has joined #RubyOnRails
[02:43:26] _3dwardsharp: jnoob22 do you mean @user or current_user instead of User?
[02:45:06] _3dwardsharp: oops, should of read more.
[02:46:21] _3dwardsharp: not sure what options_for_select does for a f.text_field? do you want f.select?
[04:40:27] _3dwardsharp: kiki_lamb sure, use the defaults hash: http://guides.rubyonrails.org/routing.html#defining-defaults
[09:28:00] _3dwardsharp: Andr3as i've used this before: https://vitalets.github.io/x-editable/
[12:08:17] _3dwardsharp: Ping timeout: 260 seconds
[21:39:31] _3dwardsharp: has joined #RubyOnRails
[22:36:49] _3dwardsharp: marahin: well, an important thing to understand is that strong params is about permitting key names, and here you've got integer key names. it make more sense if your data structure was an array of hashes, and not a hash with integer keys...

2017-03-12

[00:27:28] _3dwardsharp: has joined #RubyOnRails
[00:53:58] _3dwardsharp: Nicmavr the file student_controller.rb is expecting to have a class named ProposalController defined, does your file have that?
[00:55:09] _3dwardsharp: what folder is it in?
[00:56:12] _3dwardsharp: well, so then rails is expecting a module named Student
[00:57:29] _3dwardsharp: also, your file is named studen_controller but what you seem to be defining is ProposalController
[00:57:41] _3dwardsharp: so your file should be named proposal_controller.rb
[01:00:02] _3dwardsharp: no worries, well we can either 1) go into a long explanation of the little details of module name spacing in rails or 2) you can just move proposal_controller.rb out of the student directory and into the controllers dir...
[02:51:16] _3dwardsharp: has joined #RubyOnRails
[03:34:50] _3dwardsharp: longtran415 were you able to start your server before? what did you add? did you search your code for "enable!"?
[03:36:54] _3dwardsharp: so all you did was add a gem to your gemfile, bundle, then try to start your server again?
[03:43:47] _3dwardsharp: Ping timeout: 246 seconds
[03:56:16] _3dwardsharp: has joined #RubyOnRails
[05:53:47] _3dwardsharp: has joined #RubyOnRails
[12:38:29] _3dwardsharp: Ping timeout: 260 seconds

2017-03-11

[03:11:37] _3dwardsharp: has joined #RubyOnRails
[03:29:44] _3dwardsharp: anyone familiar with shoulda? i've digging into some old tests (circa rails2, ruby 1.8.7) and getting failures because changes applied to an object in one should block are not present in the next should block. i've got a `context` block that contains a `setup` block and a handful of `should` blocks. i'm assuming these tests worked and passed at some point in time. i'm using ruby 2.3.3 now.
[09:40:20] _3dwardsharp: neal http://guides.rubyonrails.org/configuring.html#configuring-action-dispatch
[09:46:15] _3dwardsharp: um, well, if your tests are trying to connect to "#{mock_subdomain}.example.com" then you app needs to respond to "#{mock_subdomain}.example.com"

2017-03-10

[10:54:33] _3dwardsharp: has joined #RubyOnRails
[11:11:23] _3dwardsharp: toomus: use your webserver logs?
[11:20:20] _3dwardsharp: lolol, pls don't

2017-03-09

[04:29:46] _3dwardsharp: has joined #RubyOnRails
[06:54:08] _3dwardsharp: Ping timeout: 246 seconds
[07:27:34] _3dwardsharp: has joined #RubyOnRails

2017-03-08

[06:06:09] _3dwardsharp: has joined #RubyOnRails
[06:30:23] _3dwardsharp: ohhey, so i've got this older, quite large, rails2 app. after a week of upgrade dependency hell i thought "i need to figure out a way to refactor this in smaller bits. oh, right, drb!" so, i put together this prototype: https://gist.github.com/edwardsharp/7ca042e43bdf15cead95b4d8058ad7c6 that is a sort of object proxy (for activerecord models). what projects out there are doing something like this? i remember spork,
[06:30:24] _3dwardsharp: but that's moreso setup for a testing environment
[06:50:06] _3dwardsharp: yeah? yeah, hmm. exploring ways to slice up an otherwise large/long refactor project. keeping workers/tasks in operation seems like an option. so maybe just need to think more about a distributed job queue and less about drb proxy objects...
[07:39:17] _3dwardsharp: Ping timeout: 260 seconds
[07:45:32] _3dwardsharp: has joined #RubyOnRails
[10:28:34] _3dwardsharp: sylario: um, pry, maybe?
[10:51:25] _3dwardsharp: ...did you generate them? rake assets:precompile
[10:58:44] _3dwardsharp: um, i think it tries to do that on every load, or when it thinks the file has changed. but did you run the rake task? if it fails, that should help you
[11:08:08] _3dwardsharp: um, there could be a lot happening where you've got ....
[11:13:00] _3dwardsharp: well you might need to load your schema.rb, dunno what your test case is like
[11:23:17] _3dwardsharp: oh, https://github.com/thoughtbot/factory_girl_rails/issues/74
[14:16:28] _3dwardsharp: Ping timeout: 240 seconds
[14:21:45] _3dwardsharp: has joined #RubyOnRails

2016-07-23

[03:47:55] _3dwardsharp: has joined #RubyOnRails
[03:47:55] _3dwardsharp: has joined #spree
[03:50:47] _3dwardsharp: hello. so stumbled across this: https://nvisium.com/blog/2015/06/22/using-rails-5-attributes-api-today-in/ which seems super cool, and i'm trying to implement it. however after i've done such, in the console when i try to load a record i get (Object doesn't support #inspect) which i guess has to do with the LinkList's initialize method.
[04:15:39] _3dwardsharp: ...i think you need to require 'active_support/concern' in concern_test.rb

2016-05-22

[04:32:42] _3dwardsharp: has joined #RubyOnRails
[04:32:42] _3dwardsharp: has joined #spree
[04:33:33] _3dwardsharp: using spree3-0-stable. how do i update the activemerchant gem? need some stuff from ~> 1.59.0
[04:35:31] _3dwardsharp: so, i've got a gem that has activemerchant ~> 1.47.0, but i need to use 1.59.0. i tried to add the dependency to my Gemfile but get this error from bundler "The bundle currently has activemerchant locked at 1.47.0."

2016-05-21

2016-05-20

[03:22:14] _3dwardsharp: has joined #RubyOnRails
[03:22:14] _3dwardsharp: has joined #spree
[15:44:10] _3dwardsharp: has joined #RubyOnRails
[15:44:10] _3dwardsharp: has joined #spree
[19:39:07] _3dwardsharp: has joined #RubyOnRails
[19:39:07] _3dwardsharp: has joined #spree

2016-05-19

[06:40:44] _3dwardsharp: has joined #RubyOnRails
[06:40:44] _3dwardsharp: has joined #spree
[07:42:10] _3dwardsharp: Read error: Connection reset by peer
[17:44:10] _3dwardsharp: has joined #RubyOnRails
[17:44:10] _3dwardsharp: has joined #spree

2016-05-18

[22:54:41] _3dwardsharp: has joined #RubyOnRails
[22:54:41] _3dwardsharp: has joined #spree
[23:56:41] _3dwardsharp: has joined #RubyOnRails
[23:56:41] _3dwardsharp: has joined #spree