« Back to channel list

#RubyOnRails - 28 December 2015

« Back 1 day Forward 1 day »
[00:00:54] Intii: has joined #RubyOnRails
[00:02:29] _Tariq: has joined #RubyOnRails
[00:06:34] bensarz: has joined #RubyOnRails
[00:07:27] chouhoulis: has joined #RubyOnRails
[00:07:37] yuung: pontiki, i was trying to create a helper function that does it for me: https://gist.github.com/johnmarinelli/cde642d098359968e3f4 however, in my yaml file, when i try to use create_applicants it gives me some cryptic syntax error
[00:07:48] yuung: i'm assuming it's because yaml isn't parsing the '\n' or something
[00:08:00] yuung: if i could handroll a factory that would be much easier, because I haven't used factorygirl before
[00:08:10] marcdel: has joined #RubyOnRails
[00:08:24] joshkovach: has joined #RubyOnRails
[00:08:29] nunchuck: has joined #RubyOnRails
[00:10:15] bause: has joined #RubyOnRails
[00:11:37] rhizome: use Faker for that
[00:14:20] kies^: has joined #RubyOnRails
[00:14:40] kies: has joined #RubyOnRails
[00:17:34] bradleyprice: has joined #RubyOnRails
[00:17:51] shibabu: has joined #RubyOnRails
[00:21:09] brycesenz: has joined #RubyOnRails
[00:21:43] yuung: so I don't understand how i'm supposed to generate fixtures with factorygirl; i used build() and tried assert_equal 1, Applicant.count but it's 0.
[00:22:06] yuung: googling doesn't really give me clear results for an intro to factorygirl with rails' default tests either :(
[00:23:45] yuung: err - nvm. create() instead of build(). i'll come back when i have questions that are more vague >>
[00:25:19] FailBit: oh boy kernel updates
[00:25:23] FailBit: ACTION splices
[00:25:38] mary5030: has joined #RubyOnRails
[00:26:35] pontiki: yuung: that seems to be going the long way around the block to get some random records for test
[00:27:20] pontiki: you don't generate fixtures with factory girl, you create actual database records
[00:28:24] pontiki: you've read all through this: http://www.rubydoc.info/gems/factory_girl/file/GETTING_STARTED.md
[00:28:40] sankaber: has joined #RubyOnRails
[00:28:41] FailBit: it's like me when I try to write a grammar!
[00:29:49] JoshGlzBrk: has joined #RubyOnRails
[00:30:21] DLSteve: has joined #RubyOnRails
[00:30:54] tubbo: i think i figured some of this out
[00:31:20] tubbo: my stylesheet_link_tag and javascript_include_tag calls on application.html.haml are not respecting the asset host, but the ones at admin/administrate/application.html.erb do
[00:31:22] tubbo: very werid
[00:31:54] atumzin: has joined #RubyOnRails
[00:32:28] atumzin: has joined #RubyOnRails
[00:35:57] brycesenz: has joined #RubyOnRails
[00:37:29] hahuang61: has joined #RubyOnRails
[00:39:34] hightower4: Hey, when rails is searching for a view template, it also searches for :v10, :v9, :v8 etc.. How could I disable search by version?
[00:39:56] hightower4: (and/or where is this configured in the first place?)
[00:48:24] pawnbox: has joined #RubyOnRails
[00:50:53] Yomero2: has joined #RubyOnRails
[00:51:40] chipotle: has joined #RubyOnRails
[00:53:45] brusora: has joined #RubyOnRails
[01:00:45] existensil: has joined #RubyOnRails
[01:05:34] hahuang61: has joined #RubyOnRails
[01:07:17] baweaver: has joined #RubyOnRails
[01:08:13] chouhoulis: has joined #RubyOnRails
[01:11:48] sleungcy: has joined #RubyOnRails
[01:13:32] corioliss: has joined #RubyOnRails
[01:13:50] brycesenz: has joined #RubyOnRails
[01:14:36] rhizome: are those response types defined anywhere?
[01:15:24] Scripore: has joined #RubyOnRails
[01:15:45] brycesenz: has joined #RubyOnRails
[01:15:50] bause: has joined #RubyOnRails
[01:16:11] sleungcy: has joined #RubyOnRails
[01:18:27] pawnbox: has joined #RubyOnRails
[01:23:53] chipotle: has joined #RubyOnRails
[01:27:19] rgrmatt: has joined #RubyOnRails
[01:34:35] Miron_: has joined #RubyOnRails
[01:36:49] Miron_: has joined #RubyOnRails
[01:37:02] nerium: has joined #RubyOnRails
[01:39:20] mary5030: has joined #RubyOnRails
[01:39:55] hightower4: Where would I begin looking if I wanted to keep assets in the database?
[01:40:05] hahuang61: has joined #RubyOnRails
[01:42:26] bause: has joined #RubyOnRails
[01:46:48] blackhuey: has joined #RubyOnRails
[01:48:25] pawnbox: has joined #RubyOnRails
[01:48:25] shibabu: has joined #RubyOnRails
[01:48:31] lessless: has joined #RubyOnRails
[01:50:04] nerium: has joined #RubyOnRails
[01:54:51] dideler: has joined #RubyOnRails
[01:57:18] roshanavand: has joined #RubyOnRails
[01:59:58] brycesenz: has joined #RubyOnRails
[02:00:28] rgrmatt: has joined #RubyOnRails
[02:00:32] stannard: has joined #RubyOnRails
[02:00:59] Scripore: has joined #RubyOnRails
[02:02:36] brycesenz: has joined #RubyOnRails
[02:04:35] bensarz: has joined #RubyOnRails
[02:05:23] mary5030: has joined #RubyOnRails
[02:05:42] syzygy_: has joined #RubyOnRails
[02:05:45] yuung: how can i get the beginning and end of a week, given a string in format 'YY-WW'?
[02:06:11] yfeldblum: has joined #RubyOnRails
[02:08:58] chouhoulis: has joined #RubyOnRails
[02:09:10] gokul: has joined #RubyOnRails
[02:13:24] bause: has joined #RubyOnRails
[02:15:00] rgrmatt: has joined #RubyOnRails
[02:17:20] noodman: has joined #RubyOnRails
[02:21:20] syzygy_: has joined #RubyOnRails
[02:24:11] bause: has joined #RubyOnRails
[02:26:36] KennethS_: has joined #RubyOnRails
[02:28:21] pawnbox: has joined #RubyOnRails
[02:28:46] ElFerna: has joined #RubyOnRails
[02:29:58] one_zero: has joined #RubyOnRails
[02:31:34] Bensas: has joined #RubyOnRails
[02:32:30] rgrmatt: has joined #RubyOnRails
[02:33:54] Feyn: has joined #RubyOnRails
[02:35:40] erichu: has joined #RubyOnRails
[02:37:07] Contigi: has joined #RubyOnRails
[02:42:43] pyemkey: has joined #RubyOnRails
[02:46:16] existensil: yuung: Time.now.beginning_of_week.strftime("%y:%m"); Time.now.end_of_week.strftime("%y:%m")
[02:46:38] existensil: err, wrong format, but that's the idea
[02:48:32] mary5030: has joined #RubyOnRails
[02:52:03] brycesenz: has joined #RubyOnRails
[02:52:06] yuung: existensil, thanks!
[02:55:19] bause: has joined #RubyOnRails
[02:57:53] threeminutemonta: has joined #RubyOnRails
[02:59:30] chipotle: has joined #RubyOnRails
[03:02:12] speakingcode: has joined #RubyOnRails
[03:04:12] erichu: has joined #RubyOnRails
[03:05:16] A124: has joined #RubyOnRails
[03:08:44] pawnbox: has joined #RubyOnRails
[03:09:41] chouhoulis: has joined #RubyOnRails
[03:09:47] johnflux_: has joined #RubyOnRails
[03:09:48] johnflux_: has joined #RubyOnRails
[03:11:44] djbkd: has joined #RubyOnRails
[03:12:23] JakFrist: has joined #RubyOnRails
[03:13:35] Miron_: has joined #RubyOnRails
[03:16:20] kristofferR: has joined #RubyOnRails
[03:18:29] speakingcode: has joined #RubyOnRails
[03:19:29] shibabu: has joined #RubyOnRails
[03:19:55] existensil: has joined #RubyOnRails
[03:20:16] yuung: for some reason, i'm getting an html response with the following setup: https://gist.github.com/johnmarinelli/1617fae143eebb613849
[03:20:28] yuung: anyone see why this is happening?
[03:23:49] ur5us: has joined #RubyOnRails
[03:26:11] bause: has joined #RubyOnRails
[03:34:36] krz: has joined #RubyOnRails
[03:34:44] dideler94: has joined #RubyOnRails
[03:40:12] chipotle: has joined #RubyOnRails
[03:40:38] smathy: has joined #RubyOnRails
[03:40:59] nertzy: has joined #RubyOnRails
[03:45:05] RegulationD: has joined #RubyOnRails
[03:46:53] mices: my route's not working :( https://gist.github.com/mices/217ca88100e3197edc5b
[03:50:36] sevenseacat: has joined #RubyOnRails
[03:52:21] K_r3aPeR: has joined #RubyOnRails
[03:52:44] bause: has joined #RubyOnRails
[03:58:46] pawnbox: has joined #RubyOnRails
[04:00:08] baweaver: has joined #RubyOnRails
[04:01:25] mary5030: has joined #RubyOnRails
[04:01:32] mices: when i click the link on line 22 of application.html.erb NoMethodError in Profiles#new undefined method `profiles_path' https://gist.github.com/mices/217ca88100e3197edc5b
[04:02:02] nerium: has joined #RubyOnRails
[04:04:19] mary5030: has joined #RubyOnRails
[04:10:30] chouhoulis: has joined #RubyOnRails
[04:10:40] brg: has joined #RubyOnRails
[04:11:31] sevenseacat: mices: which part of the error are you having problems with?
[04:14:14] lictor36: has joined #RubyOnRails
[04:14:22] braincrash: has joined #RubyOnRails
[04:14:44] mices: undefined method `profiles_path'
[04:15:41] sevenseacat: so where have you defined a route that matches that name
[04:16:10] mices: new_user_profile GET /users/:user_id/profile/new(.:format) profiles#new
[04:16:26] mices: here's the link <%= link_to 'Profile', new_user_profile_path(@user) %>
[04:16:59] sevenseacat: that doesnt answer the question
[04:17:07] mices: something that troubles me is i'm using devise i tried swapping out current_user for @user and got the same result
[04:17:45] sevenseacat: you have a form_for @profile, which wants to submit to profiles_path
[04:17:46] mices: i didn't ask for that route i dunno where it's coming from the route i requested was new_user_profile_path not profiles_path
[04:18:57] bause: has joined #RubyOnRails
[04:19:36] mices: yea the route doesn't exist
[04:20:28] mices: there's only user/user_id/profile
[04:20:55] sevenseacat: so where should the form submit to?
[04:21:01] sevenseacat: you need to tell your form to do that
[04:23:29] mices: ok i figured it out, i had to add resources :profiles to routes.rb
[04:24:06] mices: the form loaded, i dunno if that means things are right
[04:24:38] mices: what about adding the resource by itself in addition to nested under users
[04:24:49] sevenseacat: you didnt answer my question again.
[04:25:12] mices: the form should submit to profiles#create
[04:26:21] sevenseacat: and what route points to that action?
[04:27:25] mices: POST /profiles(.:format) profiles#create
[04:27:32] tectonic: has joined #RubyOnRails
[04:27:44] sevenseacat: thats after you've added your resources
[04:35:09] bause: has joined #RubyOnRails
[04:37:55] peeja: has joined #RubyOnRails
[04:40:04] roshanavand: has joined #RubyOnRails
[04:46:14] baweaver: has joined #RubyOnRails
[04:48:08] riskish: has joined #RubyOnRails
[04:48:29] pawnbox: has joined #RubyOnRails
[04:49:02] Sawbones: has joined #RubyOnRails
[04:49:09] shibabu: has joined #RubyOnRails
[04:51:51] chipotle: has joined #RubyOnRails
[04:53:23] pawnbox: has joined #RubyOnRails
[04:59:29] mices: sevenseacat: when i look at the page source of the form, i don't see the user id anywhere
[04:59:59] mices: does the create action get the user id from the referrer?
[05:01:20] bause: has joined #RubyOnRails
[05:02:53] tildes: has joined #RubyOnRails
[05:06:39] speaking1ode: has joined #RubyOnRails
[05:06:42] AliasLStoRM: has joined #RubyOnRails
[05:09:02] osiutino: has joined #RubyOnRails
[05:11:12] chouhoulis: has joined #RubyOnRails
[05:11:42] bause: has joined #RubyOnRails
[05:12:24] the_nick_me: has joined #RubyOnRails
[05:16:10] sevenseacat: if its not in the URL, it doesnt get it.
[05:16:18] sevenseacat: (or in the params)
[05:17:45] baweaver: has joined #RubyOnRails
[05:23:52] Megamos: has joined #RubyOnRails
[05:26:06] Cervajz: has joined #RubyOnRails
[05:29:30] agoldboi: has joined #RubyOnRails
[05:29:49] Cervajz_: has joined #RubyOnRails
[05:33:43] qejk: has joined #RubyOnRails
[05:37:31] Yomero3: has joined #RubyOnRails
[05:39:25] The_Phoenix: has joined #RubyOnRails
[05:40:06] DavidDudson: has joined #RubyOnRails
[05:41:52] pawnbox: has joined #RubyOnRails
[05:42:45] bause: has joined #RubyOnRails
[05:49:27] Megamos: has joined #RubyOnRails
[05:53:32] bause: has joined #RubyOnRails
[06:04:21] bause: has joined #RubyOnRails
[06:08:15] shinnya: has joined #RubyOnRails
[06:12:01] chouhoulis: has joined #RubyOnRails
[06:14:36] baweaver: has joined #RubyOnRails
[06:15:45] baweaver: has joined #RubyOnRails
[06:17:39] lessless: has joined #RubyOnRails
[06:20:31] pyemkey: has joined #RubyOnRails
[06:20:35] shibabu: has joined #RubyOnRails
[06:26:53] hahuang61: has joined #RubyOnRails
[06:28:49] kknight: has joined #RubyOnRails
[06:29:31] kknight: m making a app in which i want to integrate a claender can i do it directly by adding gems
[06:30:37] pontiki: search rubygems
[06:30:41] bause: has joined #RubyOnRails
[06:31:03] kknight: i have searched gems found what to do next?
[06:31:19] pontiki: what did you find?
[06:31:26] helpa: http://i.imgur.com/m9m3wr9.gif
[06:33:55] lxsameer: has joined #RubyOnRails
[06:34:47] pontiki: is that the gem you've chosen?
[06:34:54] kknight: no not now
[06:35:17] kknight: there are also one another simple_calendar
[06:35:21] kknight: simple_calendar
[06:35:32] pontiki: is that the gem you've chosen?
[06:38:38] lemur: has joined #RubyOnRails
[06:39:08] pontiki: then read the README and other associated documentation
[06:39:17] sevenseacat: so what problems are you having when using the gem?
[06:40:41] tildes: has joined #RubyOnRails
[06:43:57] pawnbox: has joined #RubyOnRails
[06:55:27] norc: has joined #RubyOnRails
[06:56:49] norc: Hi. Im using the postgresql adapter. I have some wrong query generation (which is beyond the scope of my question here), which leads to an extremely exhaustive query on the database side.
[06:57:11] norc: Now because Im impatient, I decided to interrupt the server with CRTL+C.
[06:57:17] bause: has joined #RubyOnRails
[06:57:52] norc: Which completely hung up. After sending a SIGKILL to the rails process I got this: https://gist.github.com/anonymous/471827dc5ded03c528d3
[06:58:31] norc: (The adapter timeout is not met because it is actually busy transferring data)
[07:01:06] tagrudev: has joined #RubyOnRails
[07:01:16] norc: pontiki: What do you mean?
[07:01:56] pontiki: i don't know what you're telling us. i know all the words, but i don't know what all that means.
[07:02:18] solars: has joined #RubyOnRails
[07:02:19] tectonic: has joined #RubyOnRails
[07:02:38] marcdel: has joined #RubyOnRails
[07:05:22] pontiki: i'm not twitting you; you're about 10 times smarter than i am at this; i just don't know if there's something you're looking for?
[07:08:20] Axy: has joined #RubyOnRails
[07:08:20] Axy: has joined #RubyOnRails
[07:10:35] Intii: has joined #RubyOnRails
[07:11:36] Intii: Hi everyone I'm looking to do something like STI but instead I want to have a base model called Venue and then two subtypes of venues one that will be stored in the database and another that will be fetched via a 3rd party api. What would be the best way to do this?
[07:12:37] pawnbox: has joined #RubyOnRails
[07:12:42] ur5us: has joined #RubyOnRails
[07:12:42] chouhoulis: has joined #RubyOnRails
[07:15:56] Symbiosisz2: has joined #RubyOnRails
[07:17:48] pawnbox_: has joined #RubyOnRails
[07:20:06] SteenJobs: has joined #RubyOnRails
[07:21:57] pontiki: do the two models present the same interface to their callers?
[07:23:08] thejamespinto: has joined #RubyOnRails
[07:25:20] comrad: has joined #RubyOnRails
[07:34:40] tetraktys: has joined #RubyOnRails
[07:39:13] tetraktys: has joined #RubyOnRails
[07:45:49] KennethSteel: has joined #RubyOnRails
[07:48:19] nyaa: has joined #RubyOnRails
[07:51:32] agoldboi: has joined #RubyOnRails
[07:52:45] juddey: has joined #RubyOnRails
[07:54:12] cina: has joined #RubyOnRails
[07:55:20] johnflux_: has joined #RubyOnRails
[07:57:09] mark2: has joined #RubyOnRails
[07:59:20] cina: Timezone on my server (running MySQL and Rails) is set to -0500. I want Rails to save and display timezones in +0100. I set "config.time_zone" but I still have to do "Time.zone.now". My problem is that "Time.now" still in -0500 timezone. I need to do "Time.zone.now" to get +0100 time. Is there anyway I could tell Rails so the output of Time.now be the same as Time.zone.now?
[08:00:35] cina: Or should I change the server timezone?
[08:00:53] gizmore: has joined #RubyOnRails
[08:01:10] constantinexvi: has joined #RubyOnRails
[08:01:12] epochwolf: has joined #RubyOnRails
[08:01:13] dlitz: has joined #RubyOnRails
[08:04:43] cschneid: has joined #RubyOnRails
[08:05:47] lsone: has joined #RubyOnRails
[08:06:39] jgt1: has joined #RubyOnRails
[08:07:46] Juanchito: has joined #RubyOnRails
[08:10:59] darutoko: has joined #RubyOnRails
[08:13:26] chouhoulis: has joined #RubyOnRails
[08:15:13] juddey: has joined #RubyOnRails
[08:16:34] MaDErroR123: has joined #RubyOnRails
[08:18:21] MaDErroR_: has joined #RubyOnRails
[08:19:21] roshanavand: has joined #RubyOnRails
[08:19:52] roshanavand: has joined #RubyOnRails
[08:21:54] zanzarel: has joined #RubyOnRails
[08:22:33] pyemkey: has joined #RubyOnRails
[08:23:01] norc: cina: Databases should really store any time information either with TZ information (not sure whether MySQL has an equivalent to WITH TIME ZONE) or in UTC.
[08:23:08] norc: Anything else will just give you headaches in the long run.
[08:24:21] moeabdol: has joined #RubyOnRails
[08:25:41] norc: cina: Have you restarted the server since you made the change to config.time_zone?
[08:26:15] blackmesa: has joined #RubyOnRails
[08:27:00] sevenseacat: UTC all the way.
[08:27:16] norc: Also, the MySQL adapter for AR enforces conversion from and to whatever Rails has set to config.time_zone.
[08:27:18] cina: norc: thanks! My Rails migrations created "datetime" columns without timezone information. This is really confusing I think I will change the OS timezone
[08:27:21] norc: On each query, you cannot override that.
[08:27:37] matthewd: cina: Use Time.current instead of Time.now
[08:27:38] sevenseacat: dont change the server timezone - just set your Rails app to the correct timezone.
[08:28:54] norc: sevenseacat: Ive been quite happy with TIMESTAMP WITH TIME ZONE though, since it does not work by convention (assuming its stored in UTC).
[08:29:10] norc: It simply enforces the tz information.
[08:29:13] sevenseacat: you'll be fighting with Rails then
[08:29:50] norc: Haven't had an issue yet any my application has survived 2 daylight savings. :)
[08:30:27] cina: sevenseacat: my OS is -0500, I set config.time_zone to "Paris". My problem is Time.now, and also that when I use MySQL "GROUP BY HOUR(created_at)" it uses the -0500 timezone :(
[08:30:46] norc: cina: I don't believe you.
[08:31:10] sevenseacat: norc: a little harsh, dont you think?
[08:31:11] cina: oops, which part?
[08:33:10] norc: sevenseacat: Okay I might have to differentiate slightly.
[08:33:12] norc: sevenseacat: https://github.com/rails/rails/blob/master/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb#L143
[08:33:19] roshanavand: has joined #RubyOnRails
[08:33:20] norc: I just remember this really nasty ugly line there.
[08:34:00] pawnbox: has joined #RubyOnRails
[08:35:51] Axsuul: has joined #RubyOnRails
[08:38:00] baweaver: has joined #RubyOnRails
[08:39:33] cina: I am using Rails 4, it looks like group("HOUR(created_at)") uses created_at hours as they are in the database ("datetime" has no timezone), which is in OS timezone, so my config.time_zone="Paris" in config/application.rb is ignored. The only time I see created_at in Paris timezone is in fetched records (e.g. User.first.created_at).
[08:39:46] matthewd: cina: As I said, don't use Time.now -- it is, by design, in the OS timezone
[08:40:05] matthewd: Time.current is in the Rails configured timezone, which is what you want
[08:40:23] cina: matthewd: I see, thanks!
[08:41:15] tetraktys: has joined #RubyOnRails
[08:43:02] pawnbox: has joined #RubyOnRails
[08:44:39] pyemkey: has joined #RubyOnRails
[08:44:58] the_nick_me: has joined #RubyOnRails
[08:47:02] Pazician: has joined #RubyOnRails
[08:47:02] Pazician: has joined #RubyOnRails
[08:50:01] shibabu: has joined #RubyOnRails
[08:52:28] ewnd9: has joined #RubyOnRails
[08:54:09] yashinbasement: has joined #RubyOnRails
[08:57:48] proggR: has joined #RubyOnRails
[08:58:29] nerium: has joined #RubyOnRails
[09:03:44] steffkes: has joined #RubyOnRails
[09:06:18] jgt2: has joined #RubyOnRails
[09:07:01] FernandoBasso: has joined #RubyOnRails
[09:14:13] chouhoulis: has joined #RubyOnRails
[09:17:47] edwinvdgraaf: has joined #RubyOnRails
[09:22:15] marr: has joined #RubyOnRails
[09:22:48] roshanavand: has joined #RubyOnRails
[09:24:56] thejamespinto: has joined #RubyOnRails
[09:26:13] MaDErroR123: has joined #RubyOnRails
[09:27:50] Guest8379: has joined #RubyOnRails
[09:28:22] Guest8379: has left #RubyOnRails: ()
[09:39:44] blackmesa: has joined #RubyOnRails
[09:43:29] vasilakisFiL: has joined #RubyOnRails
[09:44:23] vasilakisFiL: ok let's say that we increase heroku dynos and/or puma workers and db connections go up to 400.. (serving a JSON API) is that a good idea? or is it a better idea to shard the db ?
[09:44:31] _seb: has joined #RubyOnRails
[09:45:12] dionysus69: has joined #RubyOnRails
[10:04:24] DoubleMalt: has joined #RubyOnRails
[10:06:47] jgt3: has joined #RubyOnRails
[10:07:44] rahul_j: has joined #RubyOnRails
[10:07:46] roshanavand: has joined #RubyOnRails
[10:08:37] jgt4: has joined #RubyOnRails
[10:10:22] mdw: has joined #RubyOnRails
[10:13:06] xcesariox: has joined #RubyOnRails
[10:14:59] chouhoulis: has joined #RubyOnRails
[10:15:40] johnflux_: has joined #RubyOnRails
[10:15:40] johnflux_: has joined #RubyOnRails
[10:26:36] sandstrom: has joined #RubyOnRails
[10:29:07] robbyoconnor: has joined #RubyOnRails
[10:32:09] SteenJobs: has joined #RubyOnRails
[10:33:15] ElFerna: has joined #RubyOnRails
[10:38:41] rahul_j: has joined #RubyOnRails
[10:39:18] pawnbox: has joined #RubyOnRails
[10:40:51] arBmind: has joined #RubyOnRails
[10:42:43] PedramT: has joined #RubyOnRails
[10:44:53] defsdoor: has joined #RubyOnRails
[10:45:12] agit0: has joined #RubyOnRails
[10:46:00] robbyoconnor: has joined #RubyOnRails
[10:49:28] rahul_j: has joined #RubyOnRails
[10:52:15] robbyoconnor: has joined #RubyOnRails
[10:53:11] shibabu: has joined #RubyOnRails
[10:55:47] arBmind1: has joined #RubyOnRails
[10:56:47] zanzarel: has left #RubyOnRails: ()
[10:59:29] tvw: has joined #RubyOnRails
[10:59:51] crdpink2: has joined #RubyOnRails
[11:00:12] quazimodo: has joined #RubyOnRails
[11:00:16] quazimod1: has joined #RubyOnRails
[11:04:33] zorbash: has joined #RubyOnRails
[11:06:16] krz: has joined #RubyOnRails
[11:07:02] roshanavand: has joined #RubyOnRails
[11:07:19] roshanavand: has joined #RubyOnRails
[11:08:51] roshanav_: has joined #RubyOnRails
[11:13:36] qejk: has joined #RubyOnRails
[11:15:41] chouhoulis: has joined #RubyOnRails
[11:16:27] PedramT: has joined #RubyOnRails
[11:17:45] robbyoconnor: has joined #RubyOnRails
[11:18:25] PedramT: has joined #RubyOnRails
[11:22:09] robbyoconnor: has joined #RubyOnRails
[11:22:33] the_nick_me: has joined #RubyOnRails
[11:22:57] meoblast001: has joined #RubyOnRails
[11:24:26] arup_r: has joined #RubyOnRails
[11:26:23] The_Phoenix: has joined #RubyOnRails
[11:26:30] thejamespinto: has joined #RubyOnRails
[11:28:44] PedramT: has joined #RubyOnRails
[11:31:17] AzaToth: has joined #RubyOnRails
[11:40:09] The_Phoenix: has joined #RubyOnRails
[11:47:08] VaibhavRajput: has joined #RubyOnRails
[11:50:41] lubekpl: has joined #RubyOnRails
[11:51:11] moeabdol: has joined #RubyOnRails
[11:53:02] vasilakisFiL: has joined #RubyOnRails
[11:53:40] c355E3B: has joined #RubyOnRails
[11:54:35] tetraktys: has joined #RubyOnRails
[11:55:02] pawnbox: has joined #RubyOnRails
[11:55:33] PedramT: has joined #RubyOnRails
[12:01:15] roshanavand: has joined #RubyOnRails
[12:03:54] futilegames: has joined #RubyOnRails
[12:07:48] PedramT: has joined #RubyOnRails
[12:08:07] blackmesa: has joined #RubyOnRails
[12:08:43] dionysus69: has joined #RubyOnRails
[12:09:08] PedramT: has joined #RubyOnRails
[12:09:55] chridal: Is the after_action executed as part of the request and affects response time, or is it executed after the request is returned?
[12:10:02] ElFerna: has joined #RubyOnRails
[12:10:07] mdw: has joined #RubyOnRails
[12:11:25] PedramT: has joined #RubyOnRails
[12:12:26] the_nick_me: has joined #RubyOnRails
[12:14:34] MaDErroR123: has joined #RubyOnRails
[12:15:25] krz: has joined #RubyOnRails
[12:16:29] chouhoulis: has joined #RubyOnRails
[12:16:53] roshanavand: has joined #RubyOnRails
[12:16:55] PedramT: has joined #RubyOnRails
[12:17:21] robbyoconnor: has joined #RubyOnRails
[12:20:22] PedramT: has joined #RubyOnRails
[12:20:51] pawnbox: has joined #RubyOnRails
[12:22:13] johnflux_: has joined #RubyOnRails
[12:22:13] johnflux_: has joined #RubyOnRails
[12:23:18] sankaber: has joined #RubyOnRails
[12:23:42] roshanav_: has joined #RubyOnRails
[12:26:21] one_zero: has joined #RubyOnRails
[12:26:30] lubekpl: has joined #RubyOnRails
[12:26:35] mdw7: has joined #RubyOnRails
[12:28:46] r0bby_: has joined #RubyOnRails
[12:32:04] lacrymology: has joined #RubyOnRails
[12:32:34] robbyoconnor: has joined #RubyOnRails
[12:33:07] lxsameer: has joined #RubyOnRails
[12:38:33] roshanavand: has joined #RubyOnRails
[12:40:01] shanemcd: has joined #RubyOnRails
[12:40:51] norc: chridal: It is part of the request and can even modify the response.
[12:40:53] stannard: has joined #RubyOnRails
[12:41:25] norc: chridal: Though I think the only real use case for them is logging.
[12:42:28] sevenseacat: has joined #RubyOnRails
[12:42:43] shanemcd: has joined #RubyOnRails
[12:48:25] one_zero: has joined #RubyOnRails
[12:49:53] Scripore: has joined #RubyOnRails
[12:51:16] PedramT: has joined #RubyOnRails
[12:56:04] FCser: has joined #RubyOnRails
[12:56:09] shibabu: has joined #RubyOnRails
[12:58:01] FooMunki: has joined #RubyOnRails
[12:59:31] Jasaka: has joined #RubyOnRails
[13:00:26] vasilakisFiL: has joined #RubyOnRails
[13:01:18] agoldboi: has joined #RubyOnRails
[13:02:59] DoubleMalt: has joined #RubyOnRails
[13:07:31] meoblast001: has joined #RubyOnRails
[13:10:00] lacrymology: has joined #RubyOnRails
[13:11:10] blackmesa: has joined #RubyOnRails
[13:11:12] ql6wlld: has joined #RubyOnRails
[13:16:20] ruid: has joined #RubyOnRails
[13:16:21] ruid: has joined #RubyOnRails
[13:16:51] _Tariq: has joined #RubyOnRails
[13:17:15] chouhoulis: has joined #RubyOnRails
[13:21:41] thejamespinto: has joined #RubyOnRails
[13:22:51] MaDErroR123: has joined #RubyOnRails
[13:24:48] shinnya: has joined #RubyOnRails
[13:26:14] Megamos: has joined #RubyOnRails
[13:30:34] mdw: has joined #RubyOnRails
[13:33:54] one_zero: has joined #RubyOnRails
[13:34:53] arup_r: has joined #RubyOnRails
[13:36:24] PedramT_: has joined #RubyOnRails
[13:40:33] pawnbox: has joined #RubyOnRails
[13:41:06] one_zero: has joined #RubyOnRails
[13:42:19] pawnbox: has joined #RubyOnRails
[13:42:42] doodlehaus: has joined #RubyOnRails
[13:44:05] flashpoint9: has joined #RubyOnRails
[13:44:42] mdw: has joined #RubyOnRails
[13:45:32] arup_r: has joined #RubyOnRails
[13:45:34] atomical: has joined #RubyOnRails
[13:47:01] ElFerna: has joined #RubyOnRails
[13:47:09] Sawbones: has joined #RubyOnRails
[13:48:07] PedramT: has joined #RubyOnRails
[13:50:28] mary5030: has joined #RubyOnRails
[13:52:02] tsmango: has left #RubyOnRails: ()
[13:53:43] stannard: has joined #RubyOnRails
[13:57:04] johnflux_: has joined #RubyOnRails
[13:59:36] MaDErroR123: has joined #RubyOnRails
[14:03:22] puria: has joined #RubyOnRails
[14:07:57] MaDErroR123: has joined #RubyOnRails
[14:11:53] roshanavand: has joined #RubyOnRails
[14:14:14] blackmesa: has joined #RubyOnRails
[14:15:15] chridal: I need to do a view count for everytime someone hits an endpoint, but I don't like the thought of having to do a DB write for every DB read.
[14:15:15] sankaber: has joined #RubyOnRails
[14:15:38] ruurd_: has joined #RubyOnRails
[14:16:02] chridal: One option would be to cache it in Redis and then periodically write it to the DB, but the other issue is that I need it to be reflected rather instantly.
[14:17:41] agoldboi: has joined #RubyOnRails
[14:17:58] chouhoulis: has joined #RubyOnRails
[14:18:15] PedramT: has joined #RubyOnRails
[14:19:44] tetraktys: has joined #RubyOnRails
[14:23:45] roshanav_: has joined #RubyOnRails
[14:24:56] atumzin: has joined #RubyOnRails
[14:26:29] mdw: has joined #RubyOnRails
[14:28:14] shibly: has joined #RubyOnRails
[14:29:30] sankaber: has joined #RubyOnRails
[14:29:53] dllama: has joined #RubyOnRails
[14:30:22] moeabdol: has joined #RubyOnRails
[14:30:59] sankaber: has joined #RubyOnRails
[14:31:00] nerium: has joined #RubyOnRails
[14:32:03] dllama: morning all, hope someone can lend a hand with this, i can't seem to replicate a jenkins test failure locally, can anyone suggest how to get rspec/capybara to run headless locally on osx?
[14:33:06] dllama: i'm thinking it might be a timing issue with my test and wait_for_ajax fires too quickly when running headless as opposed to when i run it locally and it actually waits for the browser
[14:33:44] flashpoint9: I have some json on /objects and on my home page I want to grab that data and throw it in a table, having trouble finding examples in google, can anyone point me in the right direction?
[14:34:48] Encapsulation: has joined #RubyOnRails
[14:35:31] dllama: flashpoint9: are you consuming json or generating json?
[14:36:39] flashpoint9: dllama: i create it in a controller for the index method, so the data just sits on that page /objects as json data, it will never be viewed by a user, I want to just grab data from that page (full of json) and render some of the data on the home page
[14:37:32] dllama: you should have access to the object you're generating
[14:38:20] dllama: can you gist your controller method?
[14:38:50] dllama: if you're generating, you should be able to access it via the variable, can also try JSON.parse your_object
[14:39:14] flashpoint9: I have acess, I just font know how to render the data on the home page, im googling but i think I just dont know the right rails word to google
[14:39:25] dllama: but typically its not advised to put that type of logic in your view
[14:39:34] flashpoint9: I want to display the data in a table on the home page
[14:39:36] dllama: this is in rb?
[14:39:46] dllama: or are you using haml/slim?
[14:39:52] FooMunki: has left #RubyOnRails: ()
[14:40:13] mcr-credil: has joined #RubyOnRails
[14:40:15] flashpoint9: I have no views logic yet, just a controller rendering json on index method, I have another contrller for the home page
[14:40:21] flashpoint9: no haml, no slim
[14:43:43] dllama: https://gist.github.com/mvoloz/f5997c4ff12204b56126 ??? if you're generating the object, that should work
[14:44:33] roshanavand: has joined #RubyOnRails
[14:44:50] dllama: if its purely json, you might need to do JSON.parse @your_object, but again, you wouldn't want to do that in your view, so if you're generating the object as json in your controller, you'd jsut want to render it as a regular object rather than json encoding it,
[14:46:19] rahul_j: has joined #RubyOnRails
[14:47:54] PedramT: has joined #RubyOnRails
[14:49:23] polishdub: has joined #RubyOnRails
[14:49:37] dllama: so anyone else around right now that might suggest how to force capybara to run headless locally?
[14:50:50] matthewd: dllama: What have you tried / searched for?
[14:50:57] matthewd: 30 seconds of Googling found me https://github.com/jnicklas/capybara#selecting-the-driver
[14:51:28] dllama: i was googling for rspec capybara headless locally
[14:51:48] PedramT: has joined #RubyOnRails
[14:53:06] matthewd: .. for which my 3rd result is https://github.com/thoughtbot/capybara-webkit#usage
[14:53:10] cashnguns: has joined #RubyOnRails
[14:53:18] dllama: Capybara.javascript_driver = :selenium already have that in my spec_helper
[14:53:52] matthewd: selenium != headless
[14:53:52] dllama: right,switching it to webkit
[14:53:59] dllama: realized that after i wrote it :/
[14:54:08] matthewd: But perhaps the better question is: how is your CI server running it?
[14:54:42] meoblast001: has joined #RubyOnRails
[14:55:11] stannard: has joined #RubyOnRails
[14:55:55] dllama: CI is running is as headless for sure
[14:56:01] yaymukund: has joined #RubyOnRails
[14:56:18] yaymukund: has left #RubyOnRails: ()
[14:57:04] rahul_j: has joined #RubyOnRails
[14:58:27] shibabu: has joined #RubyOnRails
[14:59:05] tibra: has joined #RubyOnRails
[14:59:32] tibra: has joined #RubyOnRails
[14:59:59] lubekpl: has joined #RubyOnRails
[15:01:54] diegoviola: has joined #RubyOnRails
[15:01:56] diegoviola: has joined #RubyOnRails
[15:02:16] the_nick_me: has joined #RubyOnRails
[15:02:38] roshanav_: has joined #RubyOnRails
[15:03:31] dllama: this is fun, using webkit, it doesn't like the way attributes are being passed in,
[15:05:31] dllama: so now, test failure is totally unrelated to what i was getting from CI. this is going to be a fund ay
[15:09:16] flashpoint9: I still can't find a tutorial that explains and guides me through grabbing a json object from a url an render that data in my view
[15:09:33] flashpoint9: anyone have any clues?
[15:11:08] PedramT: has joined #RubyOnRails
[15:12:25] Scripore: has joined #RubyOnRails
[15:13:06] dllama: flashpoint9: why are you grabbing it from url? you said you're generating it
[15:14:09] adavia: has joined #RubyOnRails
[15:14:16] flashpoint9: dllama: There is a url "/object" which I am generating JSON on, no user goes there its just json data. I want that data on my home page as a table. I want that table to ajax the data from the url "/objects".
[15:14:46] nerium: has joined #RubyOnRails
[15:14:56] dllama: oh, then you need to do that via javascript
[15:15:27] dllama: whether its jquery or what ever $.ajax( )
[15:16:19] dllama: if you plan on using rails as view as well, why not just generate tht object in your controller rather than doing a secondary request on each lod?
[15:16:25] flashpoint9: I cant find any tutorials on this, been googling for hours, every tutorial is slightly different form what i need
[15:16:56] flashpoint9: How do I make the table update from the json
[15:17:04] dllama: via javascript
[15:17:09] flashpoint9: Im just lost on the correct best way to do this
[15:17:13] blackmesa: has joined #RubyOnRails
[15:17:23] flashpoint9: and there are no tutorials i can find that explaina dn guide me through it
[15:17:35] dllama: http://railscasts.com/episodes/340-datatables?view=asciicast
[15:17:45] dllama: the way you want to do it, you need to do it via javascript
[15:18:41] chouhoulis: has joined #RubyOnRails
[15:19:02] flashpoint9: dllama: ive tried a million tutorials like that and none of them work and they all throw tons of different niche errors....
[15:19:25] flashpoint9: its just bloated with lots of stuff i dont need, oh well i guess i have to keep googloing
[15:19:33] dllama: w/o knowing what the errors are, hard to help
[15:19:39] RegulationD: has joined #RubyOnRails
[15:19:49] fox_mulder_cp: no telepathy here
[15:20:13] flashpoint9: they are misc ellaneous errors from bad turorials not worth tracking down
[15:20:39] fox_mulder_cp: flashpoint9: without code we can't help you.
[15:20:45] flashpoint9: I just cant find a simple turorial that guides step by step how to render json
[15:21:24] fox_mulder_cp: flashpoint9: make a new scaffold Class and it views/class see erb.jbuilder file
[15:21:32] fox_mulder_cp: it is a json builder
[15:22:04] flashpoint9: fox_mulder_cp: I already have json, thats not the problem
[15:22:05] fox_mulder_cp: but add to class some properties
[15:22:19] fox_mulder_cp: flashpoint9: and what a problem?
[15:22:57] netzfisch: has joined #RubyOnRails
[15:23:33] thejamespinto: has joined #RubyOnRails
[15:23:57] sevenseacat: so the problem is parsing the json, or building html, or inserting it into the dom, or what?
[15:24:21] sevenseacat: i can see a lot of complaining about existing tutorials that dont exactly solve your problem, but no evidence of what you've tried
[15:24:46] flashpoint9: sevenseacat: There is json on a page i built "/object", i want to grab that json data and load it on the home page
[15:24:57] sevenseacat: yes, i saw that an hour ago.
[15:25:18] B1n4r10: has joined #RubyOnRails
[15:25:18] sevenseacat: now what have you tried, to make that happen?
[15:25:52] flashpoint9: multiple gems, multiple tutorials too numerous to list, id have to pour through hours of search results to list them all hear
[15:26:21] flashpoint9: this was easy in django, not sure why its so hard to accomplish in rails
[15:27:09] mices: ActiveRecord::RecordNotUnique in ProfilesController#create https://gist.github.com/mices/1da1d901e7ca1f386c3e
[15:27:13] sevenseacat: flashpoint9: i mean in terms of actual code.
[15:27:25] sevenseacat: what code do you have, that we can help you with?
[15:27:43] akshat: has joined #RubyOnRails
[15:27:45] sevenseacat: it's likely identical in rails and django, given it's a snippet of javascript
[15:28:24] diego1: has joined #RubyOnRails
[15:28:26] flashpoint9: http://paste.ofcode.org/48kMgbdfypCc4BzUkvRbwm
[15:28:36] flashpoint9: thats it, just a page rendering json
[15:28:40] flashpoint9: nothing fancy
[15:28:57] flashpoint9: ill figure it out on my own, thanks
[15:29:00] diego1: has joined #RubyOnRails
[15:29:09] sevenseacat: so.... i more meant the code you were using to grab that json data and put it on the page
[15:29:16] sevenseacat: because thats what you've been talking about having problems with
[15:29:26] sevenseacat: it should be some pure javascript code, independent of rails or django
[15:30:31] sevenseacat: if you'll figure it out on your own thats fine, but i think its amusing that as soon as someone comes along willing to take the time to help you figure it out, you back the hell off
[15:31:06] mrtomme: has joined #RubyOnRails
[15:31:30] tildes: has joined #RubyOnRails
[15:32:33] nerium: has joined #RubyOnRails
[15:32:59] cyfr0n: has joined #RubyOnRails
[15:35:06] blackmesa: has joined #RubyOnRails
[15:35:11] shibabu: has joined #RubyOnRails
[15:37:53] dllama: flashpoint9: i dont know what gems you have tried, but in order to grab a url and inject it into the dom, its purely javascript, far as rails is concerned, it has served the content and executed all the code in your #index method upon rendering it
[15:38:56] dllama: about 20 minutes ago i believe i said you'd have to do it as an ajax call, $.ajax(), which is handled via javascript,
[15:39:14] sevenseacat: dllama: ah right so it's not just me they've ignored. good to know.
[15:39:32] dllama: the railscast videos are actually extremely helpful,
[15:39:53] dllama: some are a little dated, but the approach has not changed much over the years, as a foundation, 1 of the best resources hands down
[15:40:10] sevenseacat: a lot of them are dated now, but the approaches are similar, even if you cant copy and paste the code anymore
[15:40:33] dllama: flashpoint9: exactly what sevenseacat just said ^^^
[15:40:41] tibra: has joined #RubyOnRails
[15:40:58] dllama: sitting here on pins and needles waiting for jenkins lol
[15:41:21] dllama: hate waiting for tests :/
[15:42:18] dllama: shit, back to the drawing board :/
[15:43:15] syzygy_: has joined #RubyOnRails
[15:45:41] ewnd9: has joined #RubyOnRails
[15:47:17] osiutino: has joined #RubyOnRails
[15:47:50] corioliss: has joined #RubyOnRails
[15:49:14] mostlybadfly: has joined #RubyOnRails
[15:51:12] peeja: has joined #RubyOnRails
[15:52:56] PedramT: has joined #RubyOnRails
[15:53:10] cyfr0n: has joined #RubyOnRails
[15:55:06] erichu: has joined #RubyOnRails
[15:55:56] RegulationD: has joined #RubyOnRails
[15:56:15] benhuda: has joined #RubyOnRails
[15:57:53] FailBit: TIL vim has a wikia http://vim.wikia.com/wiki/Vim_Tips_Wiki
[15:58:57] JakFrist: has joined #RubyOnRails
[16:00:17] ascarter: has joined #RubyOnRails
[16:00:38] krz: has joined #RubyOnRails
[16:01:02] FooMunki: has joined #RubyOnRails
[16:01:16] bdelmas: has joined #RubyOnRails
[16:03:15] mices: i'm trying to redirect to user_profile_path and pass the user object as current_user like this format.html { redirect_to user_profile_path, current_user, notice: 'Profile was successfully created.' } and the result No route matches {:action=>"create", :controller=>"profiles"} missing required keys: [:user_id]
[16:04:01] epochwolf: mices: you want user_profile_path(current_user)
[16:05:06] mices: No route matches {:action=>"create", :controller=>"profiles", :user_id=>nil} missing required keys: [:user_id]
[16:05:22] epochwolf: current_user is nil.
[16:05:48] mices: o sorry, i'm signed out
[16:06:10] epochwolf: If the action doesn't work signed out, you shouldn't be able to access it when signed out.
[16:06:34] gambl0re: has joined #RubyOnRails
[16:07:31] arthurix: has joined #RubyOnRails
[16:08:26] B1n4r10: has joined #RubyOnRails
[16:09:56] The_Phoenix: has joined #RubyOnRails
[16:13:27] B1n4r10_: has joined #RubyOnRails
[16:13:32] lubekpl: has joined #RubyOnRails
[16:13:53] ReCompile: has joined #RubyOnRails
[16:14:42] syzygy_: has joined #RubyOnRails
[16:14:50] mices: epochwolf: how come rails wants the user object and not just the user id, in other words why do i pass current_user to the user_profile_path instead of current_user.id
[16:17:53] chouhoulis: has joined #RubyOnRails
[16:18:04] thejamespinto: has joined #RubyOnRails
[16:20:44] Yomero3: has joined #RubyOnRails
[16:21:16] mices: epochwolf: ActiveRecord::RecordNotFound in ProfilesController#show Couldn't find Profile with 'id'=id from before_action callback set_profile
[16:22:59] rahul_j: has joined #RubyOnRails
[16:23:30] osiutino: has joined #RubyOnRails
[16:23:53] fox_mulder_cp: use devise gem and no write velocycles again
[16:26:18] tibra: has joined #RubyOnRails
[16:26:42] kies^: has joined #RubyOnRails
[16:27:27] FailBit: what the hell are you doing?
[16:27:53] rahul_j: has joined #RubyOnRails
[16:30:46] ReCompile: has joined #RubyOnRails
[16:32:02] mices: this redirect, redirect_to user_profile_path(current_user), causes couldn't find profile with 'id'=
[16:33:01] mices: from set_profile, @profile = Profile.find(params[:id])
[16:33:59] FailBit: missing required keys: [:user_id]
[16:34:25] FailBit: inspect your route definitions
[16:35:29] markelite: has joined #RubyOnRails
[16:36:39] futilegames: has joined #RubyOnRails
[16:36:47] arup_r: has joined #RubyOnRails
[16:42:04] mices: FailBit: i give up https://gist.github.com/mices/85575ebb26b0aa97e773
[16:42:40] jobewan: has joined #RubyOnRails
[16:43:01] tad_chaganty: has joined #RubyOnRails
[16:43:04] tubbo: FailBit: yeah, vim-tips is amazing
[16:44:04] tubbo: mices: user_profile_path needs a profile as well as a user
[16:46:12] mices: tubbo: where will that be available
[16:46:26] mices: at @profile?
[16:47:11] syzygy_: has joined #RubyOnRails
[16:47:25] tubbo: mices: !try
[16:47:25] helpa: mices: Why don't you try it and find out for yourself?
[16:48:29] joshkovach: has joined #RubyOnRails
[16:48:58] mag42c: has joined #RubyOnRails
[16:50:00] tildes: has joined #RubyOnRails
[16:51:22] mices: because it still doesn't work (current_user, @profile) but let me try restarting the server
[16:53:25] tubbo: mices: if you get the same error, then @profile is probably nil. if you want to link to a user's profile, you have to pass the user and the profile. i assume you want to see the profile of the current_user, so if User belongs_to :profile, then current_user.profile should be the object you're looking for.
[16:54:54] mices: you mean if profile belongs_to user right?
[16:55:31] tubbo: mices: well, if that's true then User must has_one :profile, so current_user.profile would look up the inverse relation.
[16:55:43] tubbo: otherwise that method won't be defined at all
[16:56:43] mices: why would current_user.profile look up the inverse relation if user has_one profile
[16:56:55] futilegames: has joined #RubyOnRails
[16:58:10] tubbo: mices: !associations
[16:58:10] helpa: mices: http://guides.rubyonrails.org/association_basics.html - Active Record Association Basics by Mike Gunderloy
[16:58:59] _Tariq: has joined #RubyOnRails
[16:59:24] chouhoulis: has joined #RubyOnRails
[16:59:35] dionysus69: has joined #RubyOnRails
[16:59:51] ElFerna: has joined #RubyOnRails
[17:00:17] tubbo: mices: that should explain in detail how has_one associations work, and why you need them in addition to belongs_to associations. so if Profile belongs_to :user, then User must also has_one :profile, in order for both profile.user and user.profile to work.
[17:00:31] chipotle: has joined #RubyOnRails
[17:02:19] mices: tubbo: that page doesn't describe building links
[17:02:30] mices: or redirects
[17:02:48] lacuna: has joined #RubyOnRails
[17:02:57] Detch: has joined #RubyOnRails
[17:03:00] tubbo: mices: right, but that's not what you asked about. you asked: "why would current_user.profile look up the inverse relation if user has_one profile". that's why i linked to the associations guide.
[17:03:49] mices: yea, sorry i forgot, so you're saying the users profile isn't at user.profile but rather at profile.user
[17:04:54] tubbo: mices: well, it's not that it's "at" that method, it's "at" the row in the database in which it is persisted to disk. that method is just a way of getting to it.
[17:05:20] tubbo: mices: so it's the same Profile at heart, but different methods are accessing it on different objects
[17:05:42] mices: this is twisting me, it's hard for me to accept that it's not the other way
[17:06:01] mices: because everything else seems to be
[17:06:43] tubbo: mices: what do you mean? it's a little hard to understand your problem here. plus, i'm assuming you haven't tried user_profile_path(current_user, current_user.profile) yet.
[17:06:43] mices: because 2 models
[17:07:16] tubbo: mices: really all has_many and has_one do is define a method. it's nothing special.
[17:07:34] mices: an equijoin right?
[17:07:49] tubbo: has_one :profile is just shorthand for def profile; Profile.find_by user_id: id; end
[17:07:57] tubbo: mices: what's an equijoin?
[17:08:07] mices: standard table join
[17:08:32] tubbo: mices: nope, no joins going on here. just a good old-fashioned WHERE condition.
[17:08:37] FailBit: all the relation macros are reflectable
[17:08:43] FailBit: that is what you get from them
[17:09:41] tubbo: FailBit: what do you host on?
[17:09:41] nertzy: has joined #RubyOnRails
[17:09:59] mices: i thought behind the scenes it was actually a `select p.id from users u, profiles p where u.id=p.user_id`
[17:10:09] tubbo: FailBit: like what platform? is it just a VPS?
[17:10:18] tubbo: or are you on AWS
[17:10:23] FailBit: OVH (roubaix)
[17:10:29] jscheel: has joined #RubyOnRails
[17:10:33] FailBit: you could say it's a big VPS
[17:10:54] FailBit: 128GB RAM, Xeon E5-2650 v2 @ 2.60GHz
[17:11:15] FailBit: this costs aroudn 300???/mo
[17:11:29] tubbo: that's a lot
[17:11:43] FailBit: AWS would be far more expensive
[17:12:11] shibabu: has joined #RubyOnRails
[17:12:28] FailBit: not for raw power, but disk storage
[17:12:43] mices: tubbo: yes i tried (current_user, current_user.profile)
[17:12:44] Scripore: has joined #RubyOnRails
[17:12:57] FailBit: 4TB file store + 400GB SSD for OS/database
[17:13:01] tubbo: but if you were on AWS you probably wouldn't just store files directly to an elastic block store or something
[17:13:18] tubbo: you'd use their services for your database, cache and of course S3 for your file storage
[17:13:26] FailBit: using 2TB of files on /data now
[17:13:29] mices: tubbo: you're saying i have to use profile.current_user?
[17:13:38] FailBit: how much does that cost on S3 if we push 30TB/mo
[17:14:19] tubbo: mices: no, current_user.profile, if it's actually defined, would be the correct method, if Use has_one :profile
[17:14:22] FailBit: fucking damn bits/bytes
[17:14:32] tubbo: probably not nothing
[17:14:40] banister: has joined #RubyOnRails
[17:14:43] mices: tubbo: gets me the same result
[17:15:00] tubbo: mices: but you don't get an undefined method error. interesting.
[17:15:18] tubbo: mices: if you didn't get a NoMethodError, that means User must have_one :profile. :) or at least the profile method is defined on the User instance.
[17:15:33] tubbo: mices: so that means that most likely, there's no profile with a user_id equal to your current_user.id
[17:15:39] mices: yea, user has_one :profile
[17:15:57] mices: let me delete from the table and try again
[17:16:06] dopie: has joined #RubyOnRails
[17:17:27] FailBit: tubbo: using S3 would be around $10k per month
[17:18:02] FailBit: so I'll pass on AWS, our site runs fine at $600 per month
[17:18:06] mices: tubbo: it's creating the record in the profiles table with no user_id, it's null
[17:18:27] tubbo: FailBit: i wasn't suggesting that you use AWS, but i'm happy that you went out of your way to do the research because i was honestly curious :)
[17:18:39] tubbo: by no means was i suggesting that *anyone* use AWS unless they really need it
[17:18:49] FailBit: I've actually done the research on AWS before
[17:18:52] FailBit: it's bad, don't use it
[17:18:58] reckoner: has joined #RubyOnRails
[17:19:05] tubbo: works for me
[17:19:18] FailBit: in the same vein, avoid heroku
[17:19:23] tubbo: also works for me
[17:19:47] tubbo: funny story, heroku is built on top of AWS, so if you avoid heroku, you kill 2 birds with 1 stone amirite
[17:19:53] FailBit: that was my point
[17:19:58] reckoner: running your specs with :random is probably slower than not. right?
[17:20:04] FailBit: reckoner: why?
[17:20:08] tubbo: but yeah i really love heroku because it let me launch brother.ly without giving a shit about ops at all.
[17:20:14] tubbo: reckoner: not that i have noticed
[17:20:17] reckoner: i'm operating under that assumption at the moment, but investigating
[17:20:25] FailBit: tubbo: get yourself a $10 VPS, stick it behind CF, and run your appserver from that, you'll thank your wallet later
[17:20:47] FailBit: (this is assuming moderate traffic
[17:20:51] tubbo: FailBit: my wallet would be pretty pissed that i went from $0/month to $10/month in hosting brother.ly ;)
[17:20:53] reckoner: rspec with :random feels slower.
[17:21:07] FailBit: little~no traffic will be whatever with heroku
[17:21:08] kmckelvin: has joined #RubyOnRails
[17:21:17] tubbo: FailBit: also, i am running the app behind cloudfront (however, i can't get my pesky assets to prepend with the host on prod!)
[17:21:34] FailBit: I meant cloudflare, actually
[17:21:36] dopie: has joined #RubyOnRails
[17:22:12] tubbo: actually that's not true, i'm just using rack-cache
[17:22:36] tubbo: but the assets and uploaded files are stored on cloudfront
[17:22:40] reckoner: tubbo. you're also a spree channel alum i think.
[17:22:51] FailBit: cloudfront is too expensive for us
[17:23:12] FailBit: if you are pushing 75TB per month: don't use cloudfront
[17:23:26] FailBit: it's just not worth it
[17:23:28] tubbo: reckoner: haha yeah i used to use it, but i write ecommerce apps for a living...i don't want to deal with that shit on my own :)
[17:24:02] reckoner: tubbo, me too. i remember chatting you up before.
[17:24:05] tubbo: FailBit: yeah, each CDN is good for different things. i remember cloudfront being a little too expensive for my last company to use as our CDN for HLS video streaming
[17:24:35] tubbo: reckoner: i think i remember you as well
[17:25:01] tubbo: i was probably asking how to properly hack Spree to get it to work for an online music store, but i scrapped that idea now that it's so much easier to sell music on your own.
[17:25:11] tubbo: so i'm just gonna pay bandcamp and say fuck it :P
[17:25:33] mices: tubbo: this line @profile = Profile.new(profile_params) is seemingly creating a profile object with no user_id
[17:25:48] tubbo: mices: that would make sense. profile_params most likely doesn't include a :user_id
[17:25:57] FailBit: it shouldn't include a user_id
[17:26:11] FailBit: that would be stupid
[17:26:15] mices: user_profiles_params didn't work either
[17:26:20] tubbo: mices: if you want to ensure that @profile gets assigned to the correct User, why not do @profile = current_user.build_profile(profile_params)?
[17:26:21] agit0: has joined #RubyOnRails
[17:26:22] mices: user_profile_params didn't work either
[17:26:46] FailBit: /quote help ignore
[17:26:50] tubbo: mices: there are a few methods (detailed on the associations guide) that you get as well as the accessor method defined when you do has_one
[17:26:51] tubbo: FailBit: lol
[17:27:03] B1n4r10: has joined #RubyOnRails
[17:27:22] mdw: has joined #RubyOnRails
[17:27:38] tubbo: mices: like create_profile and build_profile, which will do Profile.create and Profile.new, respectively, and automatically assign the user_id in which it came from
[17:27:53] tubbo: so current_user.build_profile will basically do Profile.new user_id: self.id (where self == current_user)
[17:30:41] markh: has joined #RubyOnRails
[17:31:56] mices: tubbo: ty
[17:34:40] mices: tubbo: what if i'd have left out the belongs_to, which i'm not supposed to need because i still have the has_one in the user model, then there'd be no build_profile helper
[17:35:07] arup_r: has joined #RubyOnRails
[17:35:19] osiutino: has joined #RubyOnRails
[17:35:43] osiutino: has joined #RubyOnRails
[17:35:52] tubbo: mices: i think you still want belongs_to, otherwise when you create a User you won't be able to assign a Profile to it
[17:36:30] mdw: has joined #RubyOnRails
[17:36:57] shanemcd: has joined #RubyOnRails
[17:41:40] redeeem: has joined #RubyOnRails
[17:44:07] B1n4r10: has joined #RubyOnRails
[17:46:17] ElFerna: has joined #RubyOnRails
[17:49:17] tectonic: has joined #RubyOnRails
[17:53:29] ElFerna: has joined #RubyOnRails
[17:59:58] gambl0re: has joined #RubyOnRails
[18:02:03] mdw: has joined #RubyOnRails
[18:02:07] DavidDudson: has joined #RubyOnRails
[18:03:14] JoshGlzBrk: has joined #RubyOnRails
[18:04:31] manfrin: has joined #RubyOnRails
[18:07:59] shanemcd: has joined #RubyOnRails
[18:12:00] S1kx: has joined #RubyOnRails
[18:14:03] shibabu: has joined #RubyOnRails
[18:15:28] benhuda: has joined #RubyOnRails
[18:18:03] netzfisch: has joined #RubyOnRails
[18:18:37] jobewan: has joined #RubyOnRails
[18:18:59] fox_mulder_cp: tubbo: eh. now i test zurb on my blogapp... but can't know how add canvas burger button menu in in nav bar :(
[18:19:17] fox_mulder_cp: with other menuitems
[18:19:46] Mediogre: has joined #RubyOnRails
[18:20:37] redeeem: has joined #RubyOnRails
[18:22:18] markh: zurb? that's something i haven't heard in a long time
[18:22:31] redeeem: has joined #RubyOnRails
[18:25:41] fox_mulder_cp: markh: zurb foundation
[18:26:00] markh: yeah, i know what you meant
[18:26:13] markh: i just haven't used foundation in a very long time
[18:26:30] redeeem_: has joined #RubyOnRails
[18:26:46] Tref: has joined #RubyOnRails
[18:26:52] mrchris: has joined #RubyOnRails
[18:27:03] mrchris: Do subclasses also inherit the parents included modules?
[18:27:20] tubbo: fox_mulder_cp: i think this is how you would control that http://foundation.zurb.com/sites/docs/responsive-navigation.html
[18:27:26] tubbo: __chris: yes
[18:27:47] mrchris: tubbo, What am I doing wrong here? http://pastie.org/private/xrvx574jksbnsnecmxe9jg
[18:27:58] mrchris: I put the error at the bottom
[18:28:18] arup_r: has joined #RubyOnRails
[18:28:39] mrchris: line 29 seems to be the issue
[18:28:44] tubbo: __chris: SubChild doesn't inherit from Child or Base, where SomeHelper is included.
[18:28:53] [Butch]: has joined #RubyOnRails
[18:28:53] tubbo: so it's not a subclass
[18:28:59] tubbo: it's just a class nested in another class.
[18:29:19] Tref: hey guys, why does enumerable not have bang methods? Im trying to use map! on a nokogiri node set and im wondering why map is available but not map!
[18:29:41] shanemcd: has joined #RubyOnRails
[18:30:15] tubbo: Tref: those methods are monkey-patched onto the various enumerable objects by way of active_support
[18:30:31] tubbo: it's a rails thing, not a ruby thing, in short..
[18:31:48] mrchris: Thanks tubbo
[18:32:06] RegulationD: has joined #RubyOnRails
[18:34:17] _Tariq: has joined #RubyOnRails
[18:37:03] Sidoniuns: has joined #RubyOnRails
[18:37:29] meoblast001: has joined #RubyOnRails
[18:39:15] yfeldblum: has joined #RubyOnRails
[18:40:53] juddey: has joined #RubyOnRails
[18:43:59] rhizome: has joined #RubyOnRails
[18:44:51] matiaslina: has joined #RubyOnRails
[18:46:57] nick12312: has joined #RubyOnRails
[18:47:04] jobewan: has joined #RubyOnRails
[18:47:22] osiutino: has joined #RubyOnRails
[18:48:56] serious7: has joined #RubyOnRails
[18:48:57] zpe: has joined #RubyOnRails
[18:49:38] serious7: I have found a bug with gemfile/bundle
[18:49:42] serious7: I'm not sure how to deal with it
[18:49:56] rhizome: probably not a bug
[18:50:21] serious7: I try to update my gemfile with a new gem and running bundle install but I get the error "You are trying to install in deployment mode after changing your gemfile. run bundle install elsewhere and add the updated gemfile.lock to version control"
[18:50:27] serious7: i am doing this within a docker container
[18:50:41] serious7: what am i supposed to do?
[18:51:23] serious7: bundle install --no-deployment also does not work
[18:51:34] serious7: and i tried googling this but have found no answer
[18:51:46] rhizome: http://stackoverflow.com/questions/11513623/bundler-you-are-trying-to-install-in-deployment-mode-after-changing-your-gemfil
[18:51:55] rhizome: http://stackoverflow.com/questions/6785626/unable-to-update-gems-on-production-server
[18:52:03] serious7: The thing is I'm not in production
[18:52:04] rhizome: http://stackoverflow.com/questions/32380828/you-are-trying-to-install-in-deployment-mode-after-changing-your-gemfile
[18:52:09] serious7: I have a docker environment thats local
[18:52:14] serious7: how does it know im in "production"
[18:52:49] rhizome: are you using capistrano?
[18:53:09] Axsuul: has joined #RubyOnRails
[18:53:27] serious7: I have looked at those stackoverflow links already before
[18:53:32] serious7: and none of the answers work
[18:53:49] serious7: they say to do bundle install "locally"
[18:53:51] serious7: i am local!
[18:53:55] serious7: im on my docker container
[18:53:57] serious7: on my local machine
[18:54:02] rhizome: eh, i don't know docker, try removing Gemfile.lock and running bundle install
[18:54:15] serious7: i tried that and then the error stays the same but lists all the gems
[18:54:26] serious7: right now it is only listing puma
[18:54:31] serious7: in the output
[18:54:31] rhizome: are you using --deployment?
[18:54:45] serious7: I tried "bundle install --no-deployment" and "bundle install"
[18:55:04] MaDErroR123: has joined #RubyOnRails
[18:55:09] rhizome: here's a thing: https://meta.discourse.org/t/how-can-i-add-a-gemfile-to-the-docker-container/28891
[18:55:26] rhizome: have you successfully got this running before?
[18:56:02] smathy: has joined #RubyOnRails
[18:56:05] serious7: i am dockerizing my friends rails app
[18:56:07] serious7: and it runs
[18:56:10] serious7: i am now trying to add puma
[18:56:14] serious7: and i cant do it
[18:56:17] serious7: thats my current situation
[18:56:32] meoblast001: has joined #RubyOnRails
[18:57:05] serious7: atm the server runs fine in docker environment
[18:57:22] tubbo: serious7: so you did bundle install --deployment locally?
[18:57:22] serious7: if I dont change the gemfile
[18:57:33] serious7: If i do bundle install with no changes to gemfile it will work
[18:57:45] serious7: if I make a change to gemfile it starts to complain and I can't get out of it
[18:58:03] serious7: I have not used --deployment flag
[18:58:46] tubbo: so normally when i've developed rails apps in a docker container, i have a local checkout of the rails app code on my workstation
[18:58:58] serious7: yes i have a local checkout
[18:59:21] tubbo: ok cool, so you added puma to the Gemfile in your local checkout, and then ran `bundle`, and got errors?
[18:59:29] serious7: I dont have rails on my local machine
[18:59:34] serious7: I am doing this all inside docker
[18:59:41] serious7: docker is synced to my host
[18:59:42] tubbo: serious7: that's your problem
[18:59:54] serious7: why would that be a problem
[18:59:56] tubbo: because your docker container was probably built with --deployment, thus you are running into these issues
[19:00:11] serious7: my docker container only has rails
[19:00:12] tubbo: the normal workflow is to run bundle locally and then build the docker container afterward
[19:00:34] serious7: yes but i dont want rails on my host machine (have clean dev environment)
[19:00:37] tubbo: serious7: you don't necessarily need rails to be installed globally, just install ruby and bundler on your local machine
[19:00:51] tubbo: serious7: then change your docker container to not use --deployment and rebuild the container
[19:00:51] serious7: how do i get it to work in docker
[19:01:06] tubbo: not sure if your friend will appreciate that but who knows :D
[19:01:15] serious7: when you mean dont use --deployment
[19:01:17] serious7: what do u mean by that
[19:01:21] ss_much: has joined #RubyOnRails
[19:01:25] serious7: is the container installing rails using --deployment?
[19:01:33] serious7: there is a --deployment version of rails?
[19:01:36] nickjj: you don't need to do it that way btw
[19:01:59] serious7: tbh i dont want to install rails on my host machine because I spent 2 days installing it and it always ran into issues
[19:02:00] tubbo: serious7: this has nothing to do with rails, fwiw. the docker container's gems must have been built using `bundle install --deployment`, so in Dockerfile you should probably change that to just `bundle install`
[19:02:26] serious7: tubbo: The dockerfile has no bundle install. It is empty
[19:02:30] serious7: I am in the console
[19:02:33] serious7: doing bundle install
[19:02:47] tubbo: serious7: it was pretty easy for me. `brew install chruby ruby-install && ruby-install ruby 2.2 && chruby 2.2.2 && rails new ...`
[19:02:59] nickjj: serious7, i have a rails app dockerized and i don't have rails installed locally and it all works great
[19:03:19] serious7: my dockerfile only has the following lines
[19:03:20] serious7: COPY Gemfile /usr/src/app/
[19:03:20] serious7: COPY Gemfile.lock /usr/src/app/
[19:03:25] serious7: it has no bundle install
[19:03:27] serious7: i go into the container
[19:03:29] serious7: and then i run
[19:03:30] serious7: bundle install
[19:03:35] serious7: it is not using --deployment flag
[19:03:38] tubbo: serious7: what's the point of copying Gemfile and Gemfile.lock to your docker if you aren't going to run `bundle install`?
[19:03:44] serious7: im debugging it right now
[19:03:46] serious7: because it fails
[19:03:47] serious7: at bundle install
[19:03:57] nickjj: don't copy in the gemfile.lock
[19:04:02] tubbo: serious7: ^
[19:04:08] serious7: i tried that
[19:04:11] serious7: i only copied gemfile
[19:04:11] tubbo: serious7: also, i found this guide to be ultra-helpful https://robots.thoughtbot.com/rails-on-docker
[19:04:12] nickjj: and then add Gemfile.lock to your .dockerignore
[19:04:15] serious7: and it gives me a different error
[19:04:18] nickjj: and it will work
[19:04:25] serious7: no trust me i tried that
[19:04:29] serious7: i only pushed gemfile
[19:04:34] serious7: it gives me a different error
[19:04:47] nickjj: i have a working copy of this in a published course, it works
[19:04:51] stannard: has joined #RubyOnRails
[19:04:51] serious7: You are trying to install in deployment mode blablabla.. and then it lists ALL the gems
[19:04:54] nickjj: and half a dozen personal projects
[19:05:09] serious7: im pretty sure im missing something basic but i dont know what
[19:05:22] tubbo: serious7: you have a .bundle/ dir in your rails app codebase right?
[19:05:57] serious7: i cant find it
[19:06:00] nickjj: serious7, do this. delete your currently built rails image
[19:06:08] nickjj: then do the steps listed above, and rebuild
[19:06:10] rhizome: you might need ls -a for dotfiles
[19:06:32] serious7: that folder doesnt exist
[19:06:38] rhizome: just sayin
[19:07:15] serious7: i actually followed
[19:07:19] serious7: i just didnt use fig
[19:07:25] serious7: docker compose is the official name
[19:07:32] serious7: but i replaced docker compose with manual docker commands
[19:07:35] tubbo: serious7: yeah, it used to be called fig before docker annexed it
[19:07:48] serious7: yea.... that guide helped me build the app and run it
[19:07:52] tubbo: serious7: i think docker-compose is a way better alternative
[19:08:05] serious7: i am not using docker-compose but i used that guide to get started
[19:08:12] serious7: so i am in this position
[19:08:16] tubbo: serious7: if you truly followed that guide then you should have RUN bundle install in your Dockerfile
[19:08:20] tubbo: but you don't
[19:08:33] serious7: it works if gemfile is not updated
[19:08:36] serious7: if i update gemfile
[19:08:52] serious7: this isnt a docker issue
[19:08:54] serious7: its a rails issue
[19:08:56] serious7: or bundle issue
[19:09:12] rhizome: you scroll a lot
[19:09:14] tibra: has joined #RubyOnRails
[19:09:21] tubbo: it's definitely an issue with how you set this up, because i've done this exact thing before and it worked for me.
[19:09:22] nickjj: it's because a gemfile.lock file is present in your docker image, you simply need to ignore it from .dockerignore
[19:09:23] DoubleMalt: has joined #RubyOnRails
[19:09:39] mrchris: Is it an anti pattern to include and extend the same module in a class?
[19:09:42] serious7: what happens if i delete the lock file
[19:10:04] serious7: and it lists the same error but says all my gems
[19:10:06] serious7: are out of date
[19:10:07] nickjj: but did you rebuild your image afterwards?
[19:10:15] nickjj: because i'm thinking no
[19:10:20] serious7: let me try that
[19:10:24] serious7: i will paste you the output
[19:10:34] tubbo: serious7: !gist it plz :)
[19:10:34] helpa: serious7: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[19:10:37] nickjj: just paste your dockerfile and .dockerignore
[19:10:49] nickjj: er, gist :D
[19:12:30] benhuda: has joined #RubyOnRails
[19:13:50] rhizome: __chris: i would wonder why it's being done, at the very least
[19:13:55] carlosd: has joined #RubyOnRails
[19:14:22] serious7: here is the dockerfile and output when i do docker run
[19:14:23] serious7: http://pastebin.com/TPzGFd7D
[19:14:35] serious7: okay pastie
[19:14:51] Sawbones: has joined #RubyOnRails
[19:14:54] serious7: http://pastie.org/10657692
[19:15:00] serious7: i removed the gemfile.lock
[19:15:09] Trynemjoel: has joined #RubyOnRails
[19:15:11] mrchris: rhizome, I'm using extended to set a instance var that is used with the methods called from include. I don't like it and I'm trying to find another way.
[19:15:19] shibabu: has joined #RubyOnRails
[19:16:18] rhizome: __chris: sounds tightly coupled
[19:16:56] mrchris: Yeah :/ I'm trying to pass around a view_context to a bunch of presenters and their subclasses etc
[19:17:17] nickjj: serious7, remove line 4 in the dockerfile
[19:18:30] serious7: it seems to be working now
[19:18:38] serious7: what was the problem
[19:18:58] rhizome: __chris: maybe another class is in order
[19:19:11] serious7: nickjj: so what is the purpose of the gemfile.lock
[19:19:20] serious7: if i am just ignoring it
[19:19:36] nickjj: serious7, it's supposed to help let you know the exact gem versions used
[19:19:48] serious7: cant that be accomplished with just the gemfile
[19:20:00] serious7: gem 'puma', '2.15.3'
[19:20:08] nickjj: not really, because gemfile.lock accounts for dependencies too
[19:20:23] tubbo: and Gemfile is *supposed* to be used to specify about what version you want, not exact versions of everything.
[19:20:25] nickjj: and if you used something like ~> 2.15 instead, you could have a varied gem version
[19:21:17] nickjj: you could run bundle install from the container and have it write a gemfile.lock file on your workstation if you wanted
[19:21:25] nickjj: since the -w flag
[19:21:30] nickjj: *using the -w flag
[19:21:38] Axsuul: has joined #RubyOnRails
[19:21:53] nickjj: i don't even know how that happened haha
[19:22:50] dopie: has joined #RubyOnRails
[19:23:03] naftilos76: has joined #RubyOnRails
[19:23:55] c355E3B: has joined #RubyOnRails
[19:24:09] serious7: nickjj: i'll try that
[19:24:17] serious7: nickjj, tubbo: thanks
[19:24:18] diegoviola: I have a Correspondence model and I want to say "Show me all correspondences except the ones that matches carrier: 'SED' and department: ['foo', 'bar']"
[19:24:36] diegoviola: what's the ActiveRecord method I'm looking for?
[19:25:28] tubbo: where.not
[19:26:30] StevenXL: has joined #RubyOnRails
[19:26:33] StevenXL: Hi everyone.
[19:26:37] fox_mulder_cp: diegoviola: scope
[19:26:53] StevenXL: I need to use some helpers within a handlebars template.
[19:27:02] StevenXL: How can I include custom helpers in handlebar templates?
[19:27:20] fox_mulder_cp: stevenxl: partial?
[19:27:58] fox_mulder_cp: or template file which named as your class.
[19:28:25] StevenXL: fox_mulder_cp: I'm not following you. The helper is defined in app/helpers/events_helper.rb
[19:28:52] _Tariq: has joined #RubyOnRails
[19:29:03] StevenXL: I have a handlebars template located in app/assets/templates/checkins, with the extension .hbs
[19:29:20] DavidDudson: has joined #RubyOnRails
[19:29:24] fox_mulder_cp: stevenxl: oh. ok
[19:29:29] StevenXL: How would I go about being able to call a helper method like user_avatar(user)?
[19:29:43] StevenXL: I *think* I would have to change the extension to hbs.erb, first
[19:29:49] tubbo: stevenxl: you could try naming it .hbs.erb and doing ERb in it, but i'm not sure if rails helper methods work in assets
[19:29:59] tubbo: stevenxl: <%= your_helper_method %> within the handlebars template
[19:30:14] tubbo: works for routes IIRC
[19:30:40] atomical: has joined #RubyOnRails
[19:30:50] eisi: has joined #RubyOnRails
[19:31:07] StevenXL: tubbo: thanks. Yes, I think I'm going to do that (rename to hbs.erb and use erb). Then, if the helper method is not available, I think I just have to follow these directions:
[19:31:11] StevenXL: http://stackoverflow.com/questions/27575273/handlebar-erb-templates-and-ruby-helpers
[19:31:14] StevenXL: I'll report back
[19:36:13] reckoner: has joined #RubyOnRails
[19:38:02] redeeem: has joined #RubyOnRails
[19:38:30] redeeem: has left #RubyOnRails: ()
[19:38:47] kadoppe: has joined #RubyOnRails
[19:39:12] osiutino: has joined #RubyOnRails
[19:41:40] dionysus70: has joined #RubyOnRails
[19:41:50] MaDErroR123: has joined #RubyOnRails
[19:42:14] IFrank00: has joined #RubyOnRails
[19:43:05] Junaos: has joined #RubyOnRails
[19:43:24] celly: has joined #RubyOnRails
[19:44:32] IFrank00: HI I have a form f.select(:est_hrs, options_for_select('00'..'24'), {}, {class: 'form-control'}) when I edit the record the select down show up with my selected option. what im missing?
[19:45:35] reckoner: Other than not pasting code in the channel...
[19:45:36] Sidoniuns: has joined #RubyOnRails
[19:47:59] IFrank00: reckoner, https://gist.github.com/Frank004/1548d0e2a2310fd9952d
[19:48:54] reckoner: can you restate your question clearly so someone can reply.
[19:49:02] tbuehlmann: has joined #RubyOnRails
[19:49:03] mlitwiniuk: has joined #RubyOnRails
[19:49:03] tbuehlmann: has joined #RubyOnRails
[19:49:03] mrtomme: has joined #RubyOnRails
[19:49:25] zpe: has joined #RubyOnRails
[19:51:56] Sawbones: has joined #RubyOnRails
[19:51:59] IFrank00: when I try to edit the record the value won't show up on the select
[19:52:09] teaearlgraycold: has joined #RubyOnRails
[19:52:43] shanemcd: has joined #RubyOnRails
[19:52:53] teaearlgraycold: I have a JSON file containing my site's navigational layout. How should I load that into my application?
[19:53:10] reckoner: IFrank00 yeah this doesn't look right
[19:53:16] dopie: has joined #RubyOnRails
[19:53:18] teaearlgraycold: I'm thinking of using an initializer, but I wouldn't know how to access it other than making use of a global variable which seems janky
[19:53:26] moeabdol: has joined #RubyOnRails
[19:53:36] fryguy: teaearlgraycold: application_controller before_action
[19:55:12] tibra: has joined #RubyOnRails
[19:55:38] teaearlgraycold: fryguy: I'm doing it in an action already, but I don't want to keep parsing out the same .json file on every page load
[19:56:16] fryguy: probably worthwhile to just parse it once and make a layout file out of it
[19:56:37] reckoner: IFrank00, '00'..'24' is a what?
[19:56:45] reckoner: fix that, and you have your answer.
[19:57:33] markelite: has joined #RubyOnRails
[19:57:43] fryguy: teaearlgraycold: http://guides.rubyonrails.org/layouts_and_rendering.html
[19:58:20] teaearlgraycold: You mean that kind of layout? That's not what I'm doing
[19:58:27] Pazician: has joined #RubyOnRails
[19:58:52] teaearlgraycold: It's just the navigation - it's not the whole layout.
[19:59:08] teaearlgraycold: So like - sets of tabs, and other navigational information
[19:59:33] teaearlgraycold: My controllers pick which tab set to use depending on the action or other contextual informatio
[20:00:02] osiutino: has joined #RubyOnRails
[20:00:09] fryguy: teaearlgraycold: you can nest layouts
[20:00:41] dllama: this is lunacy, been battling the same test for 2 days now, passes locally through selenium and webkit, fails on CI :(
[20:00:53] teaearlgraycold: It's already in there as a partial. I couldn't just take the JSON and make a template out of it, it requires too much logic to parse
[20:01:04] PedramT: has joined #RubyOnRails
[20:02:05] FernandoBasso: has joined #RubyOnRails
[20:02:17] flashpoint9: has joined #RubyOnRails
[20:04:13] roshanavand: has joined #RubyOnRails
[20:05:53] PedramT: has joined #RubyOnRails
[20:09:32] reckoner: teaearlgraycold have you seen https://github.com/gazay/gon
[20:10:31] teaearlgraycold: Oh shit that's cool. Not what I need but that's cool
[20:10:53] marcdel: has joined #RubyOnRails
[20:11:28] reckoner: sorry. i was might've misread the problem.
[20:11:46] reckoner: but yeah, useful.
[20:13:42] yfeldblum: has joined #RubyOnRails
[20:14:17] pawnbox: has joined #RubyOnRails
[20:15:40] Sawbones: has joined #RubyOnRails
[20:17:00] PedramT_: has joined #RubyOnRails
[20:17:04] Pazician: has joined #RubyOnRails
[20:19:41] B1n4r10: has joined #RubyOnRails
[20:20:05] qejk: has joined #RubyOnRails
[20:20:45] Sawbones: has joined #RubyOnRails
[20:21:50] djbkd: has joined #RubyOnRails
[20:22:21] roshanavand: has joined #RubyOnRails
[20:24:38] asam: has joined #RubyOnRails
[20:25:58] marcdel: has joined #RubyOnRails
[20:27:52] Sawbones: has joined #RubyOnRails
[20:29:01] manfrin: has joined #RubyOnRails
[20:32:31] Scripore: has joined #RubyOnRails
[20:32:42] rodfersou: has joined #RubyOnRails
[20:33:47] shanemcd: has joined #RubyOnRails
[20:35:10] benjwadams: has joined #RubyOnRails
[20:36:21] claytonzaugg: has joined #RubyOnRails
[20:36:32] benjwadams: How can I use `select_tag` and `options_from_collection_for_select` within the rails console?
[20:37:17] benjwadams: works fine from erb templates, but do i need to import something (ruby newbie here)
[20:37:23] reckoner: helper.select_tag
[20:38:18] diegoviola: has joined #RubyOnRails
[20:39:01] diegoviola: has joined #RubyOnRails
[20:39:47] benjwadams: reckonner: thanks, where can i find this documented though?
[20:39:49] alex88: has joined #RubyOnRails
[20:40:15] reckoner: here's a good read: https://signalvnoise.com/posts/3176-three-quick-rails-console-tips
[20:40:46] reckoner: also: http://api.rubyonrails.org/classes/Rails/ConsoleMethods.html
[20:41:52] ur5us: has joined #RubyOnRails
[20:43:47] chridal: We're deploying a Rails API on Heroku. Any thoughts on how we can implement a real-time chat?
[20:43:50] roshanavand: has joined #RubyOnRails
[20:43:55] chridal: The consuming devices are iOS devices
[20:44:17] reckoner: redis, active-cable
[20:44:20] Papierkorb: EJabberd, Rails5 (Not released yet)
[20:44:41] baweaver: has joined #RubyOnRails
[20:44:48] chridal: reckoner: Is ActionCable ready though?
[20:44:51] shibabu: has joined #RubyOnRails
[20:44:55] superlou: has joined #RubyOnRails
[20:45:17] chridal: And can I pull it into my Rails 4.2.5 app?
[20:45:34] tectonic: has joined #RubyOnRails
[20:45:40] reckoner: i'm looking now. it might'be been released to beta
[20:45:42] stesind: has joined #RubyOnRails
[20:46:08] reckoner: was just merged 11 days ago
[20:46:13] reckoner: https://github.com/rails/rails/pull/22586
[20:46:57] ElFerna: has joined #RubyOnRails
[20:47:13] bradleyprice: has joined #RubyOnRails
[20:48:25] reckoner: if you go this route, report back. i'd be curious how this goes.
[20:49:08] tubbo: yeah rails 5 is in beta
[20:49:10] chridal: reckoner: Is it possible to use it with 4.2.5 though?
[20:49:32] tubbo: yes, there's a gem called actioncable: https://github.com/rails/actioncable/
[20:49:51] reckoner: that sounds like trouble.
[20:50:03] JoshGlzBrk: has joined #RubyOnRails
[20:50:37] gavit: employments.where(:start_date >= requested_date).where(:end_date => nil).or(:end_date <= requested_date) <- I feel like I need brackets
[20:50:50] tubbo: yeah i'm not sure how far you're gonna get with it. with new rails frameworks it's usually better to just wait until they're released.
[20:51:09] nerium: has joined #RubyOnRails
[20:51:09] MaDErroR123: has joined #RubyOnRails
[20:51:19] tubbo: gavit: are you using squeel?
[20:52:15] chridal: We're deploying in 2 weeks and the alternative is writing a separate microservice as a frontend to Redis. The issue is that it is deployed on Heroku, Redis isn't shared so I'll have to deploy it as a separate app as well.
[20:52:33] chridal: How long do you guys think before Rails 5 is out of beta though?
[20:52:45] tubbo: chridal: it might be more stable to use something like faye, since it's already in production.
[20:54:49] chridal: tubbo: Thanks. Will have a look at that.
[21:02:30] gavit: tubbo: I have several records with start_date and end_date.
[21:03:29] gavit: I now want to search for all records where requested_date >= start_date && (requested_date <= end_date || end_date.nil?)
[21:06:58] mdw: has joined #RubyOnRails
[21:08:01] gaustin: has joined #RubyOnRails
[21:08:12] Pazician: has joined #RubyOnRails
[21:08:18] IFrank00: has joined #RubyOnRails
[21:11:42] osiutino: has joined #RubyOnRails
[21:12:09] akshat: has joined #RubyOnRails
[21:12:33] Axsuul: has joined #RubyOnRails
[21:26:46] Radar: GOOD MORNING
[21:27:40] atomical: has joined #RubyOnRails
[21:27:53] havenwood: Radar: good mornin'
[21:28:09] ritic: has joined #RubyOnRails
[21:28:13] Radar: gavit: .where("start_date <= :requested_date AND (end_date >= :requested_date OR end_date is NULL)", requested_date: requested_date)
[21:28:33] Radar: gavit: Typically: field you're comparing is on the left, value you're comparing it to is on the rihgt.
[21:28:55] Radar: I think I might have my comparison operators backwards because I am pre-breakfast.
[21:28:59] Radar: But you get the idea anyway.
[21:29:30] ritic: is there a debugger similar to byebug that is not just restricted to the scope of the method that it is called in?
[21:29:44] Radar: ritic: !xy
[21:29:44] helpa: ritic: It seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[21:30:17] marcdel: has joined #RubyOnRails
[21:30:21] FooMunki: has joined #RubyOnRails
[21:31:49] Radar: ritic: what exactly are you trying to debug?
[21:31:58] ritic: let me restate: is it possible to trace the execution of a rails app from a particular point through process completion?
[21:32:24] PedramT: has joined #RubyOnRails
[21:33:13] stannard: has joined #RubyOnRails
[21:33:18] ritic: Radar: i've got a rails app that is breaking only in prod and i am trying to determine exactly where that is happening
[21:33:44] Radar: ritic: Can you clone the DB from prod down locally and run the app in production mode and reproduce the issue there?
[21:33:48] slash_nick: ritic: breaking how? 500s?
[21:33:59] pawnbox: has joined #RubyOnRails
[21:34:28] alphaatom: has joined #RubyOnRails
[21:34:53] havenwood: Radar: I think the new `ruby-install --latest ruby` will make a nice addition to your guides when you update for ruby-install 0.6.0!
[21:35:13] ritic: not 500s, but somewhere within a mess of remote api calls
[21:35:17] havenwood: Future-proof.
[21:36:43] ritic: i've tailed the logs, but haven't found anything obvious. i was just wondering if it was possible to step through the execution process
[21:36:56] ritic: i'll look further. thanks for humoring me
[21:37:39] slash_nick: ritic: what indicates to you that something is breaking? (also, i'd try to do as Radar suggested)
[21:38:10] unreal: has joined #RubyOnRails
[21:39:17] benhuda: has joined #RubyOnRails
[21:39:30] smathy: ritic, byebug allows you to step through/into/out of the callstack.
[21:39:48] Radar: havenwood: o rly
[21:40:36] shanemcd: has joined #RubyOnRails
[21:40:40] havenwood: Radar: auto-syncs the latest versions and checksums from the ruby-versions repo :D
[21:40:54] ritic: lemme see what i can find with prod data first
[21:40:56] Radar: havenwood: When's it run that?
[21:41:21] havenwood: Radar: for all Rubies if you `ruby-versions --latest` or yeah `ruby-install --latest ruby` would just fetch for MRI and install the latest.
[21:42:29] havenwood: also `ruby-install ruby-2.3` works now (with the "-") so I don't have to make that error once a month. :P
[21:43:00] dstarh: has joined #RubyOnRails
[21:43:15] havenwood: https://github.com/postmodern/ruby-versions#readme
[21:44:24] havenwood: ^ repo with Ruby metadata so it can be synced without updating the ruby-install tool itself
[21:44:28] lacrymology: has joined #RubyOnRails
[21:45:37] lipoqil: has joined #RubyOnRails
[21:46:23] redeeem: has joined #RubyOnRails
[21:46:38] shibabu: has joined #RubyOnRails
[21:48:51] atomical_: has joined #RubyOnRails
[21:49:01] jottr: has joined #RubyOnRails
[21:51:52] FooMunki: has joined #RubyOnRails
[21:53:08] jottr: has joined #RubyOnRails
[21:53:30] hnanon: has joined #RubyOnRails
[21:54:18] hnanon: How can I force paperclip to not create the partition folders on S3?
[21:54:29] hnanon: I mean the .../000/000/001 folders.
[21:55:35] hnanon: I have my path set to: "/images/:id/:filename"
[22:00:04] Papierkorb: hnanon: why do you want to do that?
[22:04:47] Pazician: has joined #RubyOnRails
[22:06:25] quazimodo: has joined #RubyOnRails
[22:06:51] jottr_: has joined #RubyOnRails
[22:07:33] hnanon: Papierkorb: I never expect to have more than 200 images.
[22:07:49] Papierkorb: hnanon: Why bother changing it?
[22:08:12] hnanon: The folder partitioning is used by Paperclip in case a folder has more than 32,000 attachments.
[22:08:13] Papierkorb: I never used S3, but it would surprise me if they'd charge for each directory you create
[22:08:32] fox_mulder_cp: tubbo: how you set up setting in a foundaion.scss? my rails app have a tonn of error after uncommenting this file (
[22:08:42] hnanon: Papierkorb: I guess I just want a cleaner looking path.
[22:08:49] Papierkorb: hnanon: That's not a reason
[22:09:03] tubbo: fox_mulder_cp: did you use the foundation:install generator?
[22:09:20] hnanon: Well, I have to click through three extra directories to get to my uploads.
[22:09:48] tubbo: Papierkorb: they do not charge for every directory you create
[22:09:58] fox_mulder_cp: tubbo: yes. have a Invalid CSS after "...ody-font-family": expected ")", was ";" error
[22:10:07] Papierkorb: hnanon: The partitioning is there for a reason, and is quite common with tools which control larger amounts of files to fight file system slowdowns [...] ??? If you don't have large amount of files, it doesn't hurt you either
[22:10:19] tubbo: fox_mulder_cp: seems like a syntax error, you should gist the file
[22:10:27] hnanon: I guess you're right, though. I'm wasting my time on something very insignificant...it's just bothering me.
[22:11:05] Papierkorb: hnanon: If it comes to worst, just hack a small script which opens the file by giving it the file id or something
[22:11:12] ewnd9: has joined #RubyOnRails
[22:11:23] fox_mulder_cp: tubbo: default file, i only remove comment '//'
[22:11:44] hnanon: Thanks, Papierkorb. I'll just leave it as-is.
[22:11:45] Smcnaughts: has joined #RubyOnRails
[22:11:56] moei: has joined #RubyOnRails
[22:12:10] tubbo: fox_mulder_cp: what's the line you uncommented?
[22:12:46] moei: has joined #RubyOnRails
[22:13:36] fox_mulder_cp: tubbo: want activate top bar. so uncommented all lines in app/assets/stylesheets/foundation_and_overrides.scss
[22:13:42] fox_mulder_cp: for this block
[22:13:44] tubbo: fox_mulder_cp: ugh
[22:13:55] tubbo: fox_mulder_cp: just post the file to gist dude, stop all this nonsense
[22:17:31] redeeem: has joined #RubyOnRails
[22:17:57] atumzin: has joined #RubyOnRails
[22:18:26] osiutino: has joined #RubyOnRails
[22:19:04] ElFerna: has joined #RubyOnRails
[22:19:55] yfeldblum: has joined #RubyOnRails
[22:22:09] wethu: has joined #RubyOnRails
[22:22:15] MaDErroR123: has joined #RubyOnRails
[22:22:23] lele: has joined #RubyOnRails
[22:22:25] _Tariq: has joined #RubyOnRails
[22:22:45] fox_mulder_cp: tubbo: how to post very long file to gist?
[22:23:08] tubbo: fox_mulder_cp: copy the file contents, paste it into gist, save it, share the link with me
[22:23:13] tubbo: in the chat
[22:23:29] redeeem_: has joined #RubyOnRails
[22:24:51] fox_mulder_cp: tubbo: oh, i think about copy-paste-share script... ~1500 lines
[22:25:12] tubbo: fox_mulder_cp: have you ever posted something to gist before? it doesn't care how big your file is
[22:25:25] _Tariq: has joined #RubyOnRails
[22:25:37] meoblast001: has joined #RubyOnRails
[22:26:46] carlosd: has joined #RubyOnRails
[22:26:54] reckoner: has left #RubyOnRails: ()
[22:28:05] fox_mulder_cp: tubbo: i posted to gist, but copypaste ~1500 lines by hand..
[22:28:52] tubbo: fox_mulder_cp: great. where's the link?
[22:31:24] mloy: has joined #RubyOnRails
[22:32:36] celly: has joined #RubyOnRails
[22:33:14] fox_mulder_cp: tubbo: all uncommended lines here https://gist.github.com/anonymous/098ebff4e966313f0562
[22:33:51] fox_mulder_cp: navbar code now post too
[22:34:40] tubbo: fox_mulder_cp: all i really wanted was the full contents of the file, with comments.
[22:34:46] tubbo: fox_mulder_cp: !ask
[22:34:46] helpa: fox_mulder_cp: How to ask good questions and get great answers: http://www.mikeash.com/getting_answers.html
[22:35:09] tibra: has joined #RubyOnRails
[22:35:35] tubbo: fox_mulder_cp: it's hard to see syntax errors without seeing the full picture, because what you have seems to be a syntax error
[22:35:44] fox_mulder_cp: tubbo: ~1500 lines of default foundation.scss copypaste?
[22:35:59] tubbo: fox_mulder_cp: you act like this is difficult...
[22:36:20] tubbo: fox_mulder_cp: it will be difficult for you to get help in the future if you aren't able to paste full files into gist.
[22:36:28] tubbo: fox_mulder_cp: anyway, i think i see the issue -> $topbar-link-bg-active-hover: scale-color($primary-color, $lightness: -14%);
[22:36:35] tubbo: that doesn't seem right to me
[22:36:57] tubbo: and it's happening right around or on the line that you got an error for
[22:37:21] fox_mulder_cp: tubbo: now tab bar not used menu style -list act only as list
[22:37:47] fox_mulder_cp: https://gist.github.com/anonymous/c85953d380e65ebd118e
[22:41:21] stannard: has joined #RubyOnRails
[22:49:02] sandstrom: has joined #RubyOnRails
[22:51:30] FailBit: https://www.reddit.com/r/privacy/comments/3yinij/entire_us_voter_registration_record_leaks_191/
[22:51:38] nyaa: has joined #RubyOnRails
[22:52:41] uxp: has joined #RubyOnRails
[22:52:49] ElFerna: has joined #RubyOnRails
[22:54:07] sonOfRa: has joined #RubyOnRails
[22:54:10] osiutino: has joined #RubyOnRails
[22:56:10] pawnbox: has joined #RubyOnRails
[23:01:46] _Tariq: has joined #RubyOnRails
[23:05:26] atumzin: has joined #RubyOnRails
[23:05:27] atumzin: has joined #RubyOnRails
[23:05:54] tvw: has joined #RubyOnRails
[23:06:12] derick_skibotn: has joined #RubyOnRails
[23:08:06] claytonzaugg: has joined #RubyOnRails
[23:11:08] nerium: has joined #RubyOnRails
[23:11:23] quazimodo: Should validations on a model validate only the 'local' consistency of the data (for example the format of an email string, presence, etc) or should they go further and validate things that are not immediately in scope, like the associations (eg service belongs to company and employee, then validate the employee_id and company_id represent a company that definitely has that employee) ?
[23:11:51] quazimodo: I can't decide tbh, seems like at the least I should extract it out of the model (as a method) and into a validator class
[23:12:28] atumzin: has joined #RubyOnRails
[23:12:28] atumzin: has joined #RubyOnRails
[23:13:22] Axsuul: has joined #RubyOnRails
[23:14:34] smathy: quazimodo, different people have different views.
[23:15:04] tbuehlmann: quazimodo, I usually validate must-have associations. by that I mean `validates :company, presence: true` rather than checking for the id
[23:16:17] quazimodo: smathy: yeah i'm conflicted
[23:16:31] quazimodo: putting the validation in my model already made my tests somewhat more fragile
[23:18:29] JakFrist: has joined #RubyOnRails
[23:18:32] smathy: tbuehlmann, problem with that is that an invalid Company will not prevent the parent class from being saved.
[23:18:49] smathy: ...so "presence" isn't really that good a check.
[23:19:19] moeabdol: has joined #RubyOnRails
[23:19:31] quazimodo: it seems like persistence at this point has grown complex
[23:19:45] quazimodo: rather than using the 'save' method we need a 'save' entity
[23:20:34] quazimodo: damn validation broke like 25 specs
[23:20:45] tbuehlmann: if it's about parent validity: validates_associated
[23:20:54] tbuehlmann: but I know what you mean
[23:21:14] quazimodo: doesn't seem like it's the concern of the record that the other records are associated
[23:21:18] quazimodo: yet it's important to the system
[23:21:35] quazimodo: maybe the call to 'save' shouldn't be issued in the first place unless that other thing is valid
[23:21:48] smathy: quazimodo, these sorts of limitations in rails associations are part of my motivation for looking at and using trailblazer operations. It's a much more sensible place to put this sort of cross-model domain knowledge.
[23:22:36] quazimodo: i wonder how many people use trailblazer
[23:23:07] smathy: quazimodo, well 230 people have downloaded the latest release :)
[23:23:46] tbuehlmann: I like the idea of ecto's changesets
[23:24:03] quazimodo: more or less I do my best to keep models empytf
[23:24:06] quazimodo: *empty fuck
[23:24:53] smathy: tbuehlmann, they're still bound to a model though right?
[23:25:40] smathy: quazimodo, right, trb operations might align with your approach well then.
[23:26:45] pawnbox: has joined #RubyOnRails
[23:28:40] smathy: tbuehlmann, yeah, so an operation is a different layer to a model, it's really at a sort of domain function layer, so you might have an operation for creating a new employee and it validates that the company is valid, but then another operation for (eg) editing the employee's names and it cares only that the first and last names are present.
[23:28:54] quazimodo: my coworkers do crazy things some times lol
[23:29:21] smathy: quazimodo, ain't no gem can protect you against that ;)
[23:29:27] jottr_: has joined #RubyOnRails
[23:29:32] quazimodo: you know what's caught me though
[23:29:47] Palsson: has joined #RubyOnRails
[23:30:07] quazimodo: having #save so accessible, and rail's convention of calling update or save on every model... some times a model must only be touched by some other interface, the model itself should be considered private i guess
[23:30:13] quazimodo: then I go and touch it
[23:30:47] quazimodo: or someone else goes and touches it
[23:32:52] smathy: Yep, you'd love trb.
[23:36:46] fwaokda: If I have an ActiveJob through Sidekiq, is it possible to execute and run the job through the console where I can see any "puts" statements I've added for debugging?
[23:38:27] baweaver: has joined #RubyOnRails
[23:41:01] VeryBewitching: has joined #RubyOnRails
[23:45:26] atumzin: has joined #RubyOnRails
[23:46:58] Trynemjoel: has joined #RubyOnRails
[23:48:50] shibabu: has joined #RubyOnRails
[23:59:47] sarink: has joined #RubyOnRails
[23:59:55] _Tariq: has joined #RubyOnRails