« Back to channel list

#RubyOnRails - 14 June 2016

« Back 1 day Forward 1 day »
[00:01:01] edwinvdgraaf: has joined #RubyOnRails
[00:01:03] snguyen: has joined #RubyOnRails
[00:02:50] snguyen: i'm trying to connect to a second database in my rails app, and i wanted to load a new rake task to go along with it. my config/database.yml has some erb tags. any idea on how to load it correctly? :)
[00:03:03] snguyen: http://pastie.org/10875698
[00:03:08] dblessing: has joined #RubyOnRails
[00:04:16] B1n4r10: has joined #RubyOnRails
[00:05:28] sonofdirt: has joined #RubyOnRails
[00:06:45] Rodya_: has joined #RubyOnRails
[00:07:36] Darmani: Radar: I have no idea where to put the binding pry lol
[00:07:40] Darmani: https://gist.github.com/mfifth/5f3b8edf3510380ce9995ba0a64d2da4#file-conversations_controller-rb-L6
[00:07:48] jancel: has joined #RubyOnRails
[00:07:59] Radar: [09:42:32] <Radar> put a binding.pry above the Conversation.between and pull the values out of that somehow
[00:08:28] Darmani: Radar: But the @conversation shows up as nil...
[00:08:45] Darmani: I tried that first.
[00:09:15] Radar: Darmani: Did you get the values of those parameters yet?
[00:09:30] pydave6367: has joined #RubyOnRails
[00:09:37] Darmani: Radar: No... I can't
[00:10:05] Darmani: Radar: Because the @conversation shows up as "nil".
[00:11:45] Radar: Darmani: Go into the Pry console.
[00:11:47] Radar: Darmani: Type.
[00:11:52] Radar: params[:sender_id]
[00:11:53] Radar: See the value
[00:11:55] Radar: Then type
[00:11:58] Radar: params[:recipient_id]
[00:12:00] Radar: See the value
[00:12:03] Radar: Report both values to me.
[00:13:22] Darmani: Radar: https://gist.github.com/mfifth/5f3b8edf3510380ce9995ba0a64d2da4#file-binding-pry
[00:13:35] Radar: Darmani: Now what is params?
[00:13:55] Darmani: Um... The parameters?
[00:14:24] Radar: What is the value of params?
[00:14:47] Darmani: Radar: "nil"?
[00:14:56] Radar: Darmani: In the pry console
[00:14:59] Radar: Darmani: Type params
[00:15:00] Radar: Darmani: hit entert
[00:15:04] Radar: Darmani: Show me the value.
[00:15:25] Radar: DanByc: your issue is because your Admin::StatesController does not inherit from Admin::ApplicationController.
[00:15:36] Markhor1991: has joined #RubyOnRails
[00:15:44] Radar: DanByc: The Admin::ApplicationController skips the verify_policy_scoped callback which is added in ApplicationController.
[00:16:08] DanByc: wow let me link that real quick
[00:16:11] Darmani: Radar: https://gist.github.com/mfifth/5f3b8edf3510380ce9995ba0a64d2da4#file-binding-pry
[00:16:20] manfrin: has joined #RubyOnRails
[00:16:30] Darmani: Radar: I actually didn't know params did that.
[00:16:51] Radar: Ok, so there is no :sender_id key in the params hash.
[00:17:13] Radar: There is a :conversation key, and inside the Hash assigned to that key (as the value) is :recipient_id
[00:17:26] Radar: So instead of params[:sender_id], it should probably be current_user.id
[00:17:32] Radar: To get the recipient id, you would do something like...
[00:17:53] Radar: recipient = Recipient.find_by(email: params[:conversation][:recipient]), and then you can get at the ID with recipient.id
[00:18:50] Darmani: Radar: Let me think about what you just said. Give me a sec lol
[00:19:17] DanByc: Radar you god damn genius you
[00:19:24] DanByc: thanks again
[00:21:31] macsteps: has joined #RubyOnRails
[00:23:23] dannyguk: has joined #RubyOnRails
[00:23:29] twilling: has joined #RubyOnRails
[00:27:46] sevenseacat: has joined #RubyOnRails
[00:28:03] uxp: has joined #RubyOnRails
[00:28:13] tildes_: has joined #RubyOnRails
[00:28:55] DanByc: has joined #RubyOnRails
[00:29:11] DanByc: Hello Radar, I had just one more quick question for you
[00:29:21] Radar: Hi agaiun
[00:29:26] DanByc: What does the -m mean in a github commit?
[00:29:36] Radar: DanByc: It specifies the message for the commit.
[00:30:12] DanByc: are there other commands you would use in place of that ever?
[00:31:01] davidcelis: has joined #RubyOnRails
[00:31:01] davidcelis: has joined #RubyOnRails
[00:31:15] greenhat|: has joined #RubyOnRails
[00:31:29] mwlang: has joined #RubyOnRails
[00:31:46] Radar: No, not really.
[00:32:23] DanByc: ok cool, I was just wondering. Thanks again, chapter 10 was driving me insane
[00:32:47] Radar: You're making good progress through the book :)
[00:32:54] Darmani: Radar: https://gist.github.com/mfifth/5f3b8edf3510380ce9995ba0a64d2da4#file-conversations_controller-rb
[00:33:50] Radar: Darmani: https://gist.github.com/mfifth/5f3b8edf3510380ce9995ba0a64d2da4#file-conversations_controller-rb-L10 No.
[00:33:56] Radar: Darmani: current_user.id is not a param value
[00:34:17] DanByc: There is so much in it, I've never done a tutorial this in-depth before. Feel like I'm taking a college class all over again
[00:34:17] Radar: Darmani: This should be done before both the if and the else: https://gist.github.com/mfifth/5f3b8edf3510380ce9995ba0a64d2da4#file-conversations_controller-rb-L16-L17
[00:34:35] deur-: has joined #RubyOnRails
[00:34:57] Darmani: Radar: wat. Don't I have to check if there's an existing conversation first?
[00:35:21] diegoaguilar: has joined #RubyOnRails
[00:36:00] tildes: has joined #RubyOnRails
[00:36:32] flashpoint9: has joined #RubyOnRails
[00:37:08] IanMalcolm: has joined #RubyOnRails
[00:37:24] Oliphaunte: has joined #RubyOnRails
[00:41:19] Ropeney: has joined #RubyOnRails
[00:41:21] flashpoint9: has joined #RubyOnRails
[00:42:45] jancel: has joined #RubyOnRails
[00:44:43] Radar: Darmani: How are you going to do that if you don't have the recipient's ID?
[00:45:31] Darmani: Radar: https://gist.github.com/mfifth/5f3b8edf3510380ce9995ba0a64d2da4#file-conversations_controller-rb
[00:46:26] Radar: https://gist.github.com/mfifth/5f3b8edf3510380ce9995ba0a64d2da4#file-conversations_controller-rb-L14 You don't have a recipient_id at this pooint
[00:46:38] Radar: https://gist.github.com/mfifth/5f3b8edf3510380ce9995ba0a64d2da4#file-conversations_controller-rb-L8-L10
[00:46:44] Radar: What is this code doing in the index action
[00:46:53] Radar: Darmani: Are you tired? Do you need to rest? What's up today?
[00:47:23] Darmani: Radar: yeah... I'm kind of tired....
[00:47:47] Radar: Ok, so take a break for an hour and then come back.
[00:47:58] wd40s: has joined #RubyOnRails
[00:48:15] Darmani: I'll be back.
[00:49:34] Axsuul: has joined #RubyOnRails
[00:55:47] Guest_: has joined #RubyOnRails
[01:00:24] ksoze: has joined #RubyOnRails
[01:00:49] twilling: has joined #RubyOnRails
[01:08:18] norc_: has joined #RubyOnRails
[01:09:00] moeabdol: has joined #RubyOnRails
[01:10:57] tildes: has joined #RubyOnRails
[01:16:00] ravster: has joined #RubyOnRails
[01:16:57] gr33nw00d: has joined #RubyOnRails
[01:16:57] leira: has left #RubyOnRails: ()
[01:18:37] roamingdog: has joined #RubyOnRails
[01:18:50] elton: has joined #RubyOnRails
[01:19:58] mwlang: is request.env["HTTP_REFERER"] set for HTTPS requests?
[01:20:22] sonofdirt: has joined #RubyOnRails
[01:20:27] SteenJobs: has joined #RubyOnRails
[01:24:07] dannyguk: has joined #RubyOnRails
[01:24:44] maxz: has joined #RubyOnRails
[01:27:49] Markhor1991: ok trying to understand it some more..based on a "rake routes" error message, do all routes have to specify a controller? i was trying to "match" the empty route (root) to a specific item. but it gave an error message of undefined controller.
[01:28:44] sevenseacat: Markhor1991: can we see your code and the error?
[01:29:11] pwnd_nsfw`: has joined #RubyOnRails
[01:29:29] Markhor1991: yes, of course, i can post it. will pastebin suffice?
[01:30:28] sevenseacat: no. please use gist or pastie.
[01:30:48] B1n4r10: has joined #RubyOnRails
[01:33:18] Markhor1991: ok i did it odd. this was my first of two attempts. this one says it has no :action http://pastie.org/10875773
[01:33:21] dblessing: has joined #RubyOnRails
[01:33:26] flashpoint9: For rails do we use factory_girl, factory_girl_rails, or both?
[01:33:39] flashpoint9: Never used fg before at all
[01:33:48] flashpoint9: So please pardon my nubness
[01:34:22] sevenseacat: Markhor1991: `match "users#view", :to => "index" ` this line doesnt make any sense
[01:34:33] sevenseacat: the first part is the URL you want to match
[01:34:46] sevenseacat: eg: `match "/something"`
[01:35:22] sevenseacat: flashpoint9: factory_girl_rails has helper methods to integrate factory_girl into rails, and it has rails as a dependency
[01:35:32] sevenseacat: it also has fg as a dependency
[01:35:40] sevenseacat: so use that if you're combining the two :)
[01:35:50] B1n4r10_: has joined #RubyOnRails
[01:36:01] flashpoint9: sevenseacat: sweet, I figured the rails one was the way to go just didnt want to crawl up the wrong tree to long
[01:36:13] Markhor1991: i think i get it. the match uses directory.
[01:36:57] sevenseacat: routing is about linking URLs and the controller actions that handle them - that line, well, I don't know what it's trying to do
[01:37:07] sevenseacat: the other two are okay
[01:37:32] Markhor1991: nor do i. i know what i want it to do. i want the root option to go to the user's view (this is temporary) but the web url to appear as /index
[01:38:46] sevenseacat: seems odd. but okay. then you would have something like `get "index" => "users#view` though "view" is also a weird name for a controller action
[01:38:53] jenrzzz: has joined #RubyOnRails
[01:38:53] jenrzzz: has joined #RubyOnRails
[01:40:21] Markhor1991: how is it a weird name for a controller action? and i'm assuming all views are based on controller actions. the name in rails is still odd to me, as is my laptop touchpad screwing up my messages. and hello Radar
[01:40:32] Markhor1991: naming standards/conventions darn
[01:40:53] Radar: Markhor1991: what does this "view" action do?
[01:41:16] Markhor1991: view would be..profile information and summary.
[01:41:39] Radar: I would call it "profile" then
[01:41:46] Radar: and it would go to the profile action of the UsersController
[01:41:59] sevenseacat: or be a singular resource in its own right :)
[01:43:10] Markhor1991: this is where i got hung up last time i tried to learn RoR. ok..a singular resource how, what makes a "singular resource", when dealing with models and controllers?
[01:43:52] sevenseacat: from a logged in user's perspective, there's only one profile they're going to be managing in the system - their own
[01:44:00] rafaelfranca: has joined #RubyOnRails
[01:44:08] sevenseacat: whereas they could have multiple posts, comments, whatever your app is, all identified with an ID
[01:44:25] sevenseacat: http://guides.rubyonrails.org/routing.html#singular-resources
[01:45:58] binaryplease1: has joined #RubyOnRails
[01:46:27] jenrzzz: has joined #RubyOnRails
[01:47:16] Dios: has joined #RubyOnRails
[01:47:27] ekinmur: has joined #RubyOnRails
[01:47:55] twilling: has joined #RubyOnRails
[01:48:07] Markhor1991: ok thanks. let me see if that sinks in or not.
[01:49:33] sevenseacat: its the difference between something like /profile/edit and /posts/2/edit
[01:49:54] sevenseacat: if you've got any questions, holler :)
[01:52:12] SteenJobs: has joined #RubyOnRails
[01:55:21] dannyh: has joined #RubyOnRails
[01:55:55] jstransky: has joined #RubyOnRails
[01:56:10] sevenseacat: Osmosis311: good morning
[01:56:32] Osmosis311: First time here....are people allowed to post rails questions here?
[01:56:48] sevenseacat: absolutely :)
[01:56:59] sevenseacat: we do what we can to help people out with their rails issues
[01:57:30] Osmosis311: cool! so i'm very new to rails, trying to add some features to an internal system at my company, and i'm having trouble with an rspec test
[01:58:53] jancel: has joined #RubyOnRails
[02:01:56] Markhor1991: thanks for the patience sevenseacat. i got it going where i want with the url as desired. site.com/profile is users#show for now, will change to a profile one time use later. it looks and works as desired. rails is a bit harder than other languages i've tried
[02:02:28] Osmosis311: I'm creating a new activerecord object, saving data to it through a controller method, and then checking the saved data in the test, but the data was never changed
[02:02:42] lightt: has joined #RubyOnRails
[02:02:56] Markhor1991: are you sure the ActiveRecord was migrated, so it actually exists?
[02:03:00] Osmosis311: im creating the activerecord object in the test, and then passing in the ID of that newly created object to the controller method
[02:03:06] Osmosis311: hmm...how would i know?
[02:03:15] Markhor1991: rake db::migrate
[02:03:47] Osmosis311: oh, the data structure (underlying table) is definitely there, im creating a new record (object) for that table
[02:05:19] hutch: has joined #RubyOnRails
[02:06:09] pawnbox: has joined #RubyOnRails
[02:07:59] Oliphaunte: has joined #RubyOnRails
[02:08:04] sevenseacat: Osmosis311: can we see the code you're looking at? if you're changing the data in the controller, you may need to reload it in the test to see the changes picked up
[02:09:25] moeabdol: has joined #RubyOnRails
[02:10:10] Osmosis311: require 'spec_helper'
[02:10:10] Osmosis311: describe Api::BrowserController, :db do
[02:10:10] Osmosis311: describe 'add new browser' do
[02:10:12] Osmosis311: it 'should add a new browser entry' do
[02:10:14] Osmosis311: ad_unit = AdUnit.create!
[02:10:16] Osmosis311: post 'add_browser', :id => ad_unit.id, :entry => 'test_browser'
[02:10:18] Osmosis311: expect(ad_unit.browser_list).to include('test_browser')
[02:10:20] Osmosis311: ad_unit.destroy!
[02:10:27] dblessing: has joined #RubyOnRails
[02:11:00] sevenseacat: in the future, we'd prefer if you shared code via a paste service such as http://gist.github.com or http://pastie.org :)
[02:11:27] sevenseacat: yeah you might need to reload ad_unit to get any changes that have been made to it by that action
[02:11:33] Osmosis311: http://pastie.org/private/tuquqbedbz3t81kvsljq
[02:11:38] sevenseacat: eg. ad_unit.reload.browser_list
[02:11:52] Osmosis311: hmm...i never saw that command before
[02:12:00] Osmosis311: let me try that
[02:12:00] sevenseacat: it just reloads the record from the database
[02:12:39] sevenseacat: because your instance in memory doesnt get changed if external threads (such as the controller action) make any changes to the database record
[02:12:45] Leepoff: has joined #RubyOnRails
[02:17:51] h7br1x: has joined #RubyOnRails
[02:19:27] jenrzzz: has joined #RubyOnRails
[02:19:55] Osmosis311: has joined #RubyOnRails
[02:20:06] fox_mulder_cp: has joined #RubyOnRails
[02:20:56] Osmosis311: has joined #RubyOnRails
[02:21:21] ur5us: has joined #RubyOnRails
[02:24:50] dannyguk: has joined #RubyOnRails
[02:27:25] Ericx2x: has joined #RubyOnRails
[02:30:08] jancel: has joined #RubyOnRails
[02:31:08] twilling: has joined #RubyOnRails
[02:32:57] hahuang61: has joined #RubyOnRails
[02:32:58] tjbiddle: has joined #RubyOnRails
[02:35:53] jenrzzz: has joined #RubyOnRails
[02:38:23] SteenJobs: has joined #RubyOnRails
[02:39:47] elton: has joined #RubyOnRails
[02:46:06] allcentury: has joined #RubyOnRails
[02:46:24] dblessing: has joined #RubyOnRails
[02:50:55] justrohu: has joined #RubyOnRails
[02:51:58] codeurge: has joined #RubyOnRails
[02:54:04] safetypin: has joined #RubyOnRails
[02:54:23] Hobogrammer: has joined #RubyOnRails
[02:56:23] Rodya_: has joined #RubyOnRails
[02:58:45] mostlybadfly: has joined #RubyOnRails
[03:00:53] jenrzzz: has joined #RubyOnRails
[03:02:41] justrohu: has joined #RubyOnRails
[03:04:34] jancel: has joined #RubyOnRails
[03:04:39] chipotle: has joined #RubyOnRails
[03:07:03] dblessing: has joined #RubyOnRails
[03:11:48] braincrash: has joined #RubyOnRails
[03:16:56] ravster: has joined #RubyOnRails
[03:18:37] lightt: has joined #RubyOnRails
[03:20:53] k3rn31: has joined #RubyOnRails
[03:25:38] dannyguk: has joined #RubyOnRails
[03:31:23] der-landgraf: has joined #RubyOnRails
[03:33:14] glasz_: has joined #RubyOnRails
[03:33:29] mwlang: has joined #RubyOnRails
[03:33:58] phredus: has joined #RubyOnRails
[03:35:57] B1n4r10: has joined #RubyOnRails
[03:36:25] Markhor1991: good job laptop touch pad, clicking when im not touching. ok to retype my message, beyond the scope of Rails dev, but does anyone know of any planning tools for websites? the heirarchy in rails, of views as part of controllers, is going to get a bit much.
[03:37:30] Rodya_: has joined #RubyOnRails
[03:37:48] edwinvdgraaf: has joined #RubyOnRails
[03:37:48] yfeldblum: has joined #RubyOnRails
[03:37:54] Leepoff: has joined #RubyOnRails
[03:38:25] sevenseacat: not sure what kind of tool you're looking for
[03:40:32] kgrz: has joined #RubyOnRails
[03:40:49] jenrzzz: has joined #RubyOnRails
[03:43:10] Markhor1991: ever seen an ERD program? that's what i had in mind. though anything beyond a simple "This file belongs to this directory" would be an improvemen
[03:43:43] sevenseacat: sure, there are heaps of programs to draw ERD diagrams - there are even gems such as rails-erd or railroady to draw them from your existing app
[03:44:51] Markhor1991: huh? you mean someone thought ahead of me? heh. i'll give it a shot..thanks. now to figure out if aptana studio can use it
[03:46:26] dblessing: has joined #RubyOnRails
[03:48:32] allcentury: has joined #RubyOnRails
[03:53:01] tjbiddle: has joined #RubyOnRails
[03:54:09] Leepoff: has joined #RubyOnRails
[03:54:36] ksoze: has joined #RubyOnRails
[03:57:32] moeabdol: has joined #RubyOnRails
[04:02:57] Oliphaunte: has joined #RubyOnRails
[04:04:32] Rodya_: has joined #RubyOnRails
[04:06:53] dblessing: has joined #RubyOnRails
[04:09:19] allcentury: has joined #RubyOnRails
[04:10:05] elton: has joined #RubyOnRails
[04:10:18] kknight: has joined #RubyOnRails
[04:10:45] agent_white: has joined #RubyOnRails
[04:11:38] kknight: hello if i want to add new static page in my rails app. Its better to be done in adding new methods in previous controller or make new controller
[04:12:07] stardiviner: has joined #RubyOnRails
[04:13:58] pawnbox: has joined #RubyOnRails
[04:15:01] agent_white: Evenin' folks
[04:15:54] Markhor1991: good evening to you
[04:24:12] fsosowp: has joined #RubyOnRails
[04:25:30] fsosowp: has joined #RubyOnRails
[04:26:21] dannyguk: has joined #RubyOnRails
[04:28:07] segy: has joined #RubyOnRails
[04:29:19] Markhor1991: ok good night to all. finally learning rails. its kinda sinking in
[04:30:22] kknight: hello if i want to add new static page in my rails app. Its better to be done in adding new methods in previous controller or make new controller
[04:32:28] diegoaguilar: has joined #RubyOnRails
[04:35:08] Coldblackice: has joined #RubyOnRails
[04:39:16] wd40s_: has joined #RubyOnRails
[04:40:07] hahuang61: has joined #RubyOnRails
[04:44:06] upsell5: has joined #RubyOnRails
[04:46:21] Efffe: has joined #RubyOnRails
[04:46:54] dblessing: has joined #RubyOnRails
[04:49:54] pawnbox: has joined #RubyOnRails
[04:52:06] Efffe: has left #RubyOnRails: ()
[04:55:58] jenrzzz: has joined #RubyOnRails
[04:58:30] snoobydoo: has joined #RubyOnRails
[05:02:40] Oliphaunte: has joined #RubyOnRails
[05:07:23] djj: has joined #RubyOnRails
[05:10:22] roamingdog: has joined #RubyOnRails
[05:10:37] Niham: has joined #RubyOnRails
[05:16:59] dionysus69: has joined #RubyOnRails
[05:17:49] ravster: has joined #RubyOnRails
[05:19:42] pawnbox: has joined #RubyOnRails
[05:20:29] zave: has joined #RubyOnRails
[05:21:09] edwinvdgraaf: has joined #RubyOnRails
[05:21:45] shinnya: has joined #RubyOnRails
[05:24:10] njero: has joined #RubyOnRails
[05:24:45] B1n4r10: has joined #RubyOnRails
[05:26:50] tildes: has joined #RubyOnRails
[05:27:05] dannyguk: has joined #RubyOnRails
[05:31:13] Dimik: has joined #RubyOnRails
[05:32:40] Niham: has joined #RubyOnRails
[05:33:20] angeloc: has joined #RubyOnRails
[05:36:52] angeloc: has joined #RubyOnRails
[05:36:57] emilkarl: has joined #RubyOnRails
[05:38:02] angeloc: has joined #RubyOnRails
[05:39:18] thehardikjoshi_: has joined #RubyOnRails
[05:40:33] allcentury: has joined #RubyOnRails
[05:44:32] thehardikjoshi_: has joined #RubyOnRails
[05:45:19] axxyhtrx: has joined #RubyOnRails
[05:45:43] moeabdol: has joined #RubyOnRails
[05:55:16] armyriad: has joined #RubyOnRails
[05:58:33] arup_r: has joined #RubyOnRails
[06:00:07] DoubleMalt: has joined #RubyOnRails
[06:02:46] emilkarl: has joined #RubyOnRails
[06:05:16] der-landgraf: has joined #RubyOnRails
[06:11:06] yfeldblum: has joined #RubyOnRails
[06:13:01] hahuang61: has joined #RubyOnRails
[06:14:17] der-landgraf: has joined #RubyOnRails
[06:19:36] jancel: has joined #RubyOnRails
[06:19:51] agit0: has joined #RubyOnRails
[06:22:35] dionysus69: I used globalize gem to create translate optimized tables, it tells me to "NOTE: Make sure you drop the translated columns from the parent table after all your data is safely migrated." what does this mean?
[06:23:48] Axsuul: has joined #RubyOnRails
[06:24:15] dionysus69: for example in one table I only have 1 column which is translated. does this mean I drop whole table or still only the translated column?
[06:25:42] gr33nw00d: has joined #RubyOnRails
[06:26:46] gr33nw00d: Guys, I'm having very unpredictable email sending success with deliver_later on my dev machine using Rails 5
[06:27:11] gr33nw00d: I'm sending email in a loop to 2 users. Often times both emails will be sent, other times and more often only 1 is sent
[06:27:20] gr33nw00d: is deliver_later reliable in development env?
[06:27:51] dannyguk: has joined #RubyOnRails
[06:28:05] sevenseacat: sure. got some code we can see, or something to demonstrate the problem? :)
[06:28:44] matthewd: gr33nw00d: !guys
[06:28:44] helpa: gr33nw00d: We're not all guys here - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
[06:29:10] gr33nw00d: Sorry about that folks
[06:29:22] gr33nw00d: I'll try and watch that - bad habit
[06:30:05] matthewd: How are you judging whether the emails are sent? Could you just be racing the delivery?
[06:30:18] gr33nw00d: I'm using mailcatcher with smtp on localhost:2025
[06:30:24] gr33nw00d: One moment, pastebin incoming
[06:30:46] gr33nw00d: Here's my NotifcationService
[06:30:47] gr33nw00d: http://pastebin.com/yVX8D77W
[06:30:57] gr33nw00d: Oh god, strike 2 -.-
[06:31:14] Radar: dionysus69: Just the column
[06:31:31] gr33nw00d: Here is the pastie -> http://pastie.org/10875943
[06:31:32] Radar: dionysus69: like if you're translating a "title" column, you would just remove that one column. Not the whole table.
[06:31:47] Radar: Why have a blank initialize method?
[06:32:08] gr33nw00d: I was going to put something in it but decided not to
[06:32:35] gr33nw00d: Just left it there, thinking that it's inert. The method in question is match_schedule_changed()
[06:32:47] Radar: I don't see a deliver_later call there
[06:33:41] gr33nw00d: This loop creates 2 Notifications. here is the notification.rb model -> http://pastie.org/10875945
[06:34:08] Radar: All seems fine to me.
[06:34:19] gr33nw00d: And finally, the NotificationMailer -> http://pastie.org/10875946
[06:35:00] AzaToth: has joined #RubyOnRails
[06:35:01] gr33nw00d: So in my database, consistently, both new Notifications are being created as expected, however seemingly randomly either 1, 2, or 0 emails will be set
[06:35:10] gingray: has joined #RubyOnRails
[06:35:24] bruce_lee: has joined #RubyOnRails
[06:35:29] Tref: has joined #RubyOnRails
[06:38:06] matthewd: gr33nw00d: I'd start with the Advanced Debugging Technique of sticking a `puts` inside new_notification
[06:38:33] matthewd: Is there anything in the log? I don't remember whether AM logs anything by default
[06:39:50] Terens1: has joined #RubyOnRails
[06:40:02] Radar: matthewd: It should at least tell you an email was delivered.
[06:40:05] Terens1: Does foundation email works with rails ?
[06:40:13] Terens1: Or it should be manually compiled
[06:42:13] matthewd: gr33nw00d: Also, have you configured ActiveJob? Which queue adapter is in use? (are you on 4.2, or future-5.0?)
[06:42:23] gr33nw00d: @matthewd hmmm, so the first time I run it. It logs and runs both times, but the subsequent times it only runs once
[06:42:49] gr33nw00d: matthewd I have not configured ActiveJob, it is using the default adapter, whatever that is. I'm on rails 5.0 RC1
[06:42:58] matthewd: Are you sure it's still creating two new records on those subsequent runs?
[06:43:15] darutoko: has joined #RubyOnRails
[06:43:49] gr33nw00d: there are 4 rows, and 3 emails
[06:44:02] emilkarl: has joined #RubyOnRails
[06:44:31] arBmind: has joined #RubyOnRails
[06:45:14] der-landgraf: has joined #RubyOnRails
[06:45:42] gr33nw00d: https://cloudup.com/cWzubUMfO_L <- as you can see, there is 1 email in mailcatcher, and the log appears once, however the database has 2 new rows
[06:45:55] matthewd: Okay, work backwards, I guess... new_notification only gets invoked 3 times.. what about send_email_notification ?
[06:46:11] tvw: has joined #RubyOnRails
[06:46:27] snguyen: has joined #RubyOnRails
[06:47:09] gr33nw00d: send_email_notification is triggered 2x as expected
[06:47:11] gr33nw00d: https://cloudup.com/c5w6WdSqCpK
[06:47:12] Sashimi: has joined #RubyOnRails
[06:47:29] mytrile: has joined #RubyOnRails
[06:48:48] gr33nw00d: Hmmm, yes it seems that this behaviour is consistent at least
[06:49:05] matthewd: That's... surprising
[06:49:08] gr33nw00d: NotificationMailer.new_notification(self).deliver_later is being called twice, but it only runs once
[06:49:17] gr33nw00d: I know, this is honestly the most confusing bug of this project for me
[06:50:02] matthewd: Out of curiosity, try switching ActiveJob to the :inline queue adapter
[06:50:26] Ergo^: has joined #RubyOnRails
[06:51:07] dionysus69: Radar: ok I did drop all the translated columns, but I now I hit another problem. I am using rails admin, how do I update controllers so rails_admin can handle multiple locales?
[06:52:54] helpa: Please do not use active_admin, rails_admin or any other gems to build your admin interfaces. Instead, build it yourself. This will lead you to a safe path of understanding of the code, rather than to the Hell that is those gems.
[06:53:27] dionysus69: ye that will take some time :D
[06:54:32] tjbiddle: has joined #RubyOnRails
[06:56:00] gr33nw00d: @matthewd :inline queue adapter fixes the issue, so does using .deliver_now
[06:56:36] gr33nw00d: My curiosity is not satisfied though! Does rails support queues out of the box in a development environment, or do I need to use a queue adapter?
[06:57:05] matthewd: You're always using a queue adapter; the default (as of 5.0) is :async
[06:58:26] comrad: has joined #RubyOnRails
[07:00:40] dannyguk: has joined #RubyOnRails
[07:01:11] dionysus69: is it hard to add totally new locale to rails? there is no georgian(ka) locale at all so I wondered maybe I could add it. thing is that georgian has its own writing system, does it make it harder?
[07:01:17] arup_r: but what was wrong with `async`, I am trying to follow. :)
[07:01:44] sevenseacat: its own writing system? is it that different from every other writing system out there?
[07:02:32] solars: has joined #RubyOnRails
[07:03:08] gr33nw00d: arup_r I'm not sure - it's being unpredictable and not completing jobs
[07:03:23] gr33nw00d: I would be happy with async but it's not working as expected
[07:03:44] arup_r: hm, I got your point, which is my point too.
[07:03:57] SteenJobs: has joined #RubyOnRails
[07:04:33] neanderslob: has joined #RubyOnRails
[07:04:43] emilkarl: has joined #RubyOnRails
[07:05:16] gr33nw00d: is it possible to look into the inner workings of async queue, ie. to see the jobs?
[07:05:42] tjbiddle: has joined #RubyOnRails
[07:06:13] lightt: has joined #RubyOnRails
[07:07:34] dionysus69: sevenseacat: yes its different, https://en.wikipedia.org/wiki/Georgian_scripts
[07:08:15] dionysus69: will i not able to add locale myself? given that so far I have done no documentation addition so far
[07:10:20] Tref: has joined #RubyOnRails
[07:10:48] sevenseacat: dionysus69: https://github.com/svenfuchs/rails-i18n might be worth a look through
[07:11:13] sevenseacat: it might be just as simple as making your own yml file with the right root key
[07:12:38] dionysus69: ok thanks sevenseacat :)
[07:13:20] sevenseacat: ka isnt a language code in the rails-i18n gem, but it is in the iso gem as a valid locale code
[07:13:46] sevenseacat: also, https://github.com/svenfuchs/rails-i18n/issues/570
[07:14:09] sevenseacat: though that uses ge, not ka
[07:14:30] sevenseacat: the yaml file might be a good starting point though ;0
[07:16:05] ferr1: has joined #RubyOnRails
[07:18:32] lxsameer: has joined #RubyOnRails
[07:18:33] ravster: has joined #RubyOnRails
[07:19:23] allcentury: has joined #RubyOnRails
[07:19:24] gr33nw00d: I think I'll switch to delayed_job
[07:19:37] DoubleMalt: has joined #RubyOnRails
[07:19:38] Radar: What were you using before?
[07:19:54] aganov: has joined #RubyOnRails
[07:19:55] gr33nw00d: the default: async
[07:20:24] Radar: gr33nw00d: I would recommend looking at Sidekiq.
[07:20:37] Radar: Depends on your use cases for it too
[07:20:39] dionysus69: sevenseacat: I added an empty yml file but I am planning on saving info in db which I already setup using globilize gem. adding an empty yml file resolved unknown locale code error at least
[07:21:15] gr33nw00d: radar - the use case is super minimal, just sending async email
[07:21:25] gr33nw00d: I'd prefer not to have to setup redis or complicate my dev environment
[07:21:45] Radar: then delayed_job will be fine for you
[07:22:13] gr33nw00d: I have starred sidekiq. Thank you for your suggestion
[07:22:27] gr33nw00d: and matthewd, thank you as well for your help
[07:23:39] fsosowp: has joined #RubyOnRails
[07:24:00] swap: has joined #RubyOnRails
[07:24:04] matthewd: gr33nw00d: Thanks for the question! I'll have to work out why async is misbehaving for you.
[07:25:37] swap: has left #RubyOnRails: ("WeeChat 1.3")
[07:26:53] antgel: has joined #RubyOnRails
[07:27:22] alfiemax: has joined #RubyOnRails
[07:27:49] lightt: has joined #RubyOnRails
[07:28:53] gr33nw00d: Hmm, yep delayed_job fixed it...
[07:29:16] gr33nw00d: i'm testing with rails console and seeing how many db entries and how many emails with 50.times {|n| Notification.create({user_id: 1, title: 'test', url: 'http://google.com' }) }
[07:30:02] TvL2386: has joined #RubyOnRails
[07:31:37] gingray: has joined #RubyOnRails
[07:32:16] guidocalvano: has joined #RubyOnRails
[07:33:29] arathald: hi everyone.
[07:33:50] moeabdol: has joined #RubyOnRails
[07:34:08] njero: has joined #RubyOnRails
[07:34:26] arathald: Anyone know of a client-side (JS) syntax highlighting library that has support for slim? I wish people would name their languages things that are easier to google :P
[07:34:45] ur5us: has joined #RubyOnRails
[07:35:32] arathald: I was looking at highlight.js, but no slim support (though I may be able to add it if I can figure out how to add intentation levels properly). There's also Rouge, whcih has support for everything I'd want, but isn't client side so might be harder to highlight interactively
[07:37:34] nighttime: has joined #RubyOnRails
[07:40:45] universa1: arathald: you probably have more luck in #js ;)
[07:41:08] AimlessRAven: has joined #RubyOnRails
[07:41:16] AimlessRAven: hi all, what is marker clusterer
[07:41:19] AimlessRAven: what this mean
[07:41:35] arathald: potentially, but I try to avoid language specific channels that I don't know :P
[07:41:37] universa1: AimlessRaven: context?!
[07:41:55] universa1: arathald: you have a js question, trying a js channel sounds reasonable to me ;)
[07:42:10] arathald: plus slim is mostly used in ruby, so I thought someone here might know
[07:42:15] sevenseacat: every time I have to mess with i18n in simple form, it takes forever to figure out what the right i18n key is ;_;
[07:42:33] arathald: universa1: sure, but they're often... not very nice
[07:42:43] kgrz: has joined #RubyOnRails
[07:42:45] universa1: sevenseacat: ;) but this is true for me although for the default rails i18n stuff ;)
[07:42:53] arathald: I'll try there, and ragequit if they get all bothered :)
[07:42:55] universa1: s/although/also/
[07:43:17] universa1: arathald: ;) yeah, i only implemented server-side syntax highlighting using pygments
[07:43:55] arup_r: has joined #RubyOnRails
[07:44:32] arathald: yeah, rouge is compatible with pygments, but 100% ruby. I wanted to do something interactive, for a code editor in our CMS.
[07:44:54] arathald: I'm not sure I want to be making calls back to the server so often for that
[07:45:15] arathald: wow, #js and ##js are tiny
[07:45:22] universa1: arathald: maybe look at gitlab, not sure if they have slim highglighting support
[07:45:29] universa1: arathald: #javascript ? ;)
[07:45:55] arathald: ah, ##javascript
[07:45:58] universa1: arathald: and if they do it on the clientside
[07:47:16] qejk: has joined #RubyOnRails
[07:55:19] alfiemax: has joined #RubyOnRails
[07:56:20] GoranPavlovic: has joined #RubyOnRails
[07:58:32] GoranPavlovic: /msg NickServ VERIFY REGISTER GoranPavlovic lfxhjdzsjtto
[07:58:57] alfiemax: GoranPavlovic, You are verified - NickServ
[07:59:00] konsolebox: has joined #RubyOnRails
[08:04:47] tvw: has joined #RubyOnRails
[08:05:51] fox_mulder_cp: GoranPavlovic: space before leading slash - bad practice and way to publish your password for third persons $)
[08:06:51] artto: has joined #RubyOnRails
[08:07:03] defsdoor: has joined #RubyOnRails
[08:10:41] guidocalvano: has joined #RubyOnRails
[08:12:02] bonswouar: has joined #RubyOnRails
[08:12:11] adre: has joined #RubyOnRails
[08:12:45] dannyguk: has joined #RubyOnRails
[08:13:59] pavgogi: has joined #RubyOnRails
[08:19:01] workmaster2n: has joined #RubyOnRails
[08:19:14] arup_r: can 2 people use same password? :D
[08:22:07] snowy: has joined #RubyOnRails
[08:22:30] snowy: has joined #RubyOnRails
[08:23:06] edwinvdgraaf: has joined #RubyOnRails
[08:23:41] Dbugger: has joined #RubyOnRails
[08:23:44] Dbugger: Jello fellas
[08:24:09] staticfox`: has joined #RubyOnRails
[08:24:23] edwinvdg_: has joined #RubyOnRails
[08:25:21] Dbugger: I have a filter that makes this: "session[:whateves] = @item.id" every time. I was wondering.. is it worth it to make it like this? "session[:whateves] = @item.id if session[:whateves] == @item.id"
[08:25:33] jgt1: has joined #RubyOnRails
[08:25:54] Dbugger: is it worth making the comparing, or is it as expensive as simply writing?
[08:26:21] GoranPavlovic: has joined #RubyOnRails
[08:26:39] alfiemax: dbugger, you are trying to assign if both are already the same? why would you want to do that?
[08:28:04] Dbugger: sorry, I wrote it wrong. I meant "!="
[08:31:19] hd1: has joined #RubyOnRails
[08:31:37] GoranPavlovic: Hi, i am new in ruby on rails development and have some questions
[08:31:50] hd1: is FactoryGirl + rspec still the recommended test suite for rails?
[08:32:03] hd1: GoranPavlovic: ask away
[08:32:09] tbuehlmann: hd1: depends on who you ask. I'm totally okay with them
[08:32:53] kgrz: has joined #RubyOnRails
[08:33:01] mdw: has joined #RubyOnRails
[08:33:22] hd1: tbuehlmann: I have a model Post and a file spec/factories/post.rb, when I run rspec spec, it gives "factory not registered"
[08:33:44] GoranPavlovic: How to disable uglify and minify of assets (javascript) for debugging purposes in development environment?
[08:37:27] sypheren: has joined #RubyOnRails
[08:40:22] stardiviner: has joined #RubyOnRails
[08:41:43] snoobydoo: has joined #RubyOnRails
[08:41:47] tjbiddle: has joined #RubyOnRails
[08:42:03] mdw: has joined #RubyOnRails
[08:42:15] sevenseacat: hd1: have you defined a factory in that file?
[08:42:44] sevenseacat: GoranPavlovic: in your config/environments/development.rb, you'll find a setting for config.assets.debug - turn it to true
[08:42:57] hd1: sevenseacat: I'd like to think so
[08:43:02] kgrz: has joined #RubyOnRails
[08:43:04] sevenseacat: hd1: can you gist the file? :)
[08:43:24] hd1: sevenseacat: in a sec
[08:43:58] hd1: https://gist.github.com/hdiwan/b3eb599b2368f3dca8b388551aa68855
[08:44:12] hd1: sevenseacat ^^^^
[08:44:21] sevenseacat: hd1: it should be factory :post, not factory :Post
[08:44:27] blackmesa: has joined #RubyOnRails
[08:44:36] sevenseacat: the syntax is also wrong inside the factory
[08:44:57] sevenseacat: see https://github.com/thoughtbot/factory_girl/blob/master/GETTING_STARTED.md#defining-factories
[08:45:44] moeabdol: has joined #RubyOnRails
[08:45:50] _Sypheren: has joined #RubyOnRails
[08:46:18] dblessing: has joined #RubyOnRails
[08:47:28] _Sypheren_: has joined #RubyOnRails
[08:47:50] kies: has joined #RubyOnRails
[08:48:10] hd1: https://gist.github.com/hdiwan/b3eb599b2368f3dca8b388551aa688?55 am I a soddin' moron
[08:48:15] wldcordeiro: has joined #RubyOnRails
[08:48:25] hd1: https://gist.github.com/hdiwan/b3eb599b2368f3dca8b388551aa68855 am I a soddin' moron?
[08:48:28] moeabdol: has joined #RubyOnRails
[08:50:14] GoranPavlovic: I have this assets configuration in config file config.assets.debug = true config.assets.compress = false and config.assets.cache_store = :null_store, also i do rake assets:clean RAILS_ENV=development --trace, rake assets:precompile RAILS_ENV=development --trace but have minified assets, what i am doing wrong?
[08:50:44] pawnbox: has joined #RubyOnRails
[08:50:57] sevenseacat: hd1: looks okay to me now.
[08:51:13] FastJack: has joined #RubyOnRails
[08:51:23] sevenseacat: GoranPavlovic: you should never precompile your assets in development
[08:51:36] sevenseacat: its not necessary to do and will just cause you headaches
[08:52:27] rbr: has joined #RubyOnRails
[08:53:37] GoranPavlovic: what i need to do? To clean precompiled files and serve without asset compiling?
[08:53:59] sevenseacat: rake assets:clean will remove any precompiled assets
[08:54:12] sevenseacat: in development, they will be generated on request, and not cached
[08:57:05] kitsuneyo: has joined #RubyOnRails
[08:58:05] rbr: you might need rake assets:clobber
[08:58:26] GoranPavlovic: Ok, i do clean, and serve, assets are also minified, should i remove content from public directory?
[08:58:45] GoranPavlovic: is content on public directory automatically generated?
[08:59:00] GoranPavlovic: i will try now
[08:59:07] sevenseacat: you should have nothing in public/assets, thats what rake assets:clean is for, to remove them
[09:00:12] _Sypheren: has joined #RubyOnRails
[09:00:24] GoranPavlovic: rake assets:clean Working
[09:00:27] GoranPavlovic: Thansk a lot :)
[09:01:21] hd1: has joined #RubyOnRails
[09:02:10] hd1: my tab crashed
[09:02:19] B1n4r10: has joined #RubyOnRails
[09:02:55] arup_r: has joined #RubyOnRails
[09:03:46] Oliphaunte: has joined #RubyOnRails
[09:04:42] alfiemax: has joined #RubyOnRails
[09:06:46] hd1: now am getting "uninitialized constant FactoryGirl" -- https://gist.github.com/hdiwan/b3eb599b2368f3dca8b388551aa68855
[09:06:53] hd1: ACTION frowns
[09:09:11] Radar: Is the gem in the Gemfile>
[09:09:22] hd1: Radar, aye
[09:11:29] elton: has joined #RubyOnRails
[09:15:04] Kedare: has joined #RubyOnRails
[09:16:45] tvw: has joined #RubyOnRails
[09:19:32] ravster: has joined #RubyOnRails
[09:20:29] kgrz: has joined #RubyOnRails
[09:22:18] hd1: Radar: any other ideas?
[09:22:49] allcentury: has joined #RubyOnRails
[09:23:08] dblessing: has joined #RubyOnRails
[09:26:29] artto: has joined #RubyOnRails
[09:26:37] sevenseacat: factory_girl, or factory_girl_rails ?
[09:26:48] hd1: sevenseacat: factory_girl_rails
[09:26:58] sevenseacat: where is it in your Gemfile? which group?
[09:27:13] hd1: gem 'factory_girl_rails', '~> 4.0', require: false
[09:27:40] sevenseacat: remove the require: false
[09:27:43] hd1: sevenseacat: group :development, :test
[09:28:42] Ergo^: has joined #RubyOnRails
[09:30:10] hd1: no difference
[09:32:04] sevenseacat: okay. show the complete output of what you're seeing, with your Gemfile, and your rails_helper file
[09:36:40] Ergo: has joined #RubyOnRails
[09:38:32] workmad3: has joined #RubyOnRails
[09:39:08] Ropeney: has joined #RubyOnRails
[09:40:36] fsosowp: has joined #RubyOnRails
[09:41:12] acosonic: has joined #RubyOnRails
[09:41:51] acosonic: sevenseacat: hi, remember me? So I finished a book on Redmine :D
[09:42:04] fsosowp: has joined #RubyOnRails
[09:42:19] acosonic: sevenseacat: I remember you telling me "I'm not touching that project with 7 foot long stick" :D when I was asking questions here
[09:44:15] FooMunki: has joined #RubyOnRails
[09:46:01] AimlessRAven: has joined #RubyOnRails
[09:46:04] c355E3B: has joined #RubyOnRails
[09:46:07] AimlessRAven: https://gist.github.com/anonymous/642bf3caeabdbb2bc146232908775114
[09:46:12] AimlessRAven: how to include ransack here..
[09:46:18] AimlessRAven: something went wrong
[09:46:24] sevenseacat: acosonic: indeed :)
[09:46:49] acosonic: sevenseacat: if someone wants I can patch him/her to a client from Czech republic wants some changes done to some plugin :)
[09:48:19] Circuit8: has joined #RubyOnRails
[09:49:49] hd1: has joined #RubyOnRails
[09:50:14] allcentury: has joined #RubyOnRails
[09:50:38] marr: has joined #RubyOnRails
[09:53:45] Niham: has joined #RubyOnRails
[09:53:54] arBmind: has joined #RubyOnRails
[09:54:05] guidocalvano_: has joined #RubyOnRails
[09:55:57] jancel: has joined #RubyOnRails
[09:56:39] rafaelfranca: has joined #RubyOnRails
[09:58:01] Oliphaunte: has joined #RubyOnRails
[10:03:18] Oliphaunte: has joined #RubyOnRails
[10:04:41] ghr: has joined #RubyOnRails
[10:10:08] ghr: user.comments.group("DATE_TRUNC('month', created_at)").count should work, according to http://stackoverflow.com/a/12529783/387558
[10:10:10] ghr: getting a ActiveRecord::StatementInvalid: PG::GroupingError: ERROR: column "comments.created_at" must appear in the GROUP BY clause or be used in an aggregate function
[10:14:04] qejk: has joined #RubyOnRails
[10:15:05] workmaster2n: has joined #RubyOnRails
[10:22:35] darutoko-: has joined #RubyOnRails
[10:25:41] DoubleMalt: has joined #RubyOnRails
[10:25:55] edwinvdgraaf: has joined #RubyOnRails
[10:25:58] mikecmpbll: has joined #RubyOnRails
[10:26:42] allcentury: has joined #RubyOnRails
[10:31:08] Circuit8: has joined #RubyOnRails
[10:32:23] jsrn: has joined #RubyOnRails
[10:36:02] njero: has joined #RubyOnRails
[10:40:25] Hyuk: has joined #RubyOnRails
[10:42:41] edwinvdg_: has joined #RubyOnRails
[10:44:38] srinidhi: has joined #RubyOnRails
[10:47:14] dblessing: has joined #RubyOnRails
[10:49:22] Pumukel: has joined #RubyOnRails
[10:51:07] B1n4r10: has joined #RubyOnRails
[10:52:08] alotofnoodles: has joined #RubyOnRails
[10:53:50] phredus_: has joined #RubyOnRails
[10:56:50] rodfersou: has joined #RubyOnRails
[10:57:13] k3rn31: has joined #RubyOnRails
[10:58:15] edwinvdgraaf: has joined #RubyOnRails
[11:00:42] axxyhtrx: has joined #RubyOnRails
[11:05:27] Ericx2x: has joined #RubyOnRails
[11:08:20] pawnbox: has joined #RubyOnRails
[11:08:21] arup_r: has joined #RubyOnRails
[11:09:48] pawnbox: has joined #RubyOnRails
[11:11:43] k3rn31: has joined #RubyOnRails
[11:12:06] elton: has joined #RubyOnRails
[11:13:24] Ericx2x: has joined #RubyOnRails
[11:16:25] DoubleMalt: has joined #RubyOnRails
[11:17:59] blackmesa: has joined #RubyOnRails
[11:20:13] hardtail: has joined #RubyOnRails
[11:20:17] ravster: has joined #RubyOnRails
[11:21:50] Hyuk: has joined #RubyOnRails
[11:24:12] nettoweb: has joined #RubyOnRails
[11:28:07] ldnunes: has joined #RubyOnRails
[11:34:11] rbr: ghr: can you show us the generated SQL?
[11:35:03] ghr: rbr just found a way to fix it:
[11:35:05] ghr: user.comments.group("DATE_TRUNC('month', created_at)").reorder("date_trunc_month_created_at").count
[11:35:25] adre: has joined #RubyOnRails
[11:36:45] crameth: has joined #RubyOnRails
[11:37:28] crameth: has joined #RubyOnRails
[11:39:35] dionysus69: has joined #RubyOnRails
[11:41:07] guidocalvano: has joined #RubyOnRails
[11:41:40] alotofnoodles: has joined #RubyOnRails
[11:45:06] darutoko: has joined #RubyOnRails
[11:46:52] rbr: ghr: by any chance you had a default_scope on comments?
[11:48:25] dblessing: has joined #RubyOnRails
[11:51:30] ghr: rbr ah, no default scope as such but default order on the assoc (has_many :comments, :order => 'created_at desc')
[11:52:37] bruce_lee: has joined #RubyOnRails
[11:53:02] Ropeney: has joined #RubyOnRails
[11:58:31] adre: has joined #RubyOnRails
[12:00:10] axxyhtrx: has joined #RubyOnRails
[12:04:13] Oliphaunte: has joined #RubyOnRails
[12:07:48] sergio_101: has joined #RubyOnRails
[12:10:48] blackmesa: has joined #RubyOnRails
[12:11:26] guidocalvano: has joined #RubyOnRails
[12:13:29] truenito: has joined #RubyOnRails
[12:14:46] pydave6367: has joined #RubyOnRails
[12:17:38] Akuma: has joined #RubyOnRails
[12:18:07] Hyuk: has joined #RubyOnRails
[12:18:46] voidDotClass: has joined #RubyOnRails
[12:18:58] voidDotClass: How do I set foreign key checks to 0 in a migration which deletes a table
[12:20:06] njero: voidDotClass, why don't you just set it to 0 with raw sql
[12:20:32] voidDotClass: n_e_o, cuz i dont want my rails migrations to break?
[12:20:53] njero: how would it break?
[12:21:49] tknz: has joined #RubyOnRails
[12:22:16] njero: you mean abt schema?
[12:24:53] voidDotClass: n_e_o, yeah, i need to be able to run some migrations on dev and prod
[12:26:27] njero: voidDotClass, do you have same db type for prod and dev?
[12:26:44] njero: why don't you change schema dump to sql?
[12:29:10] tjbiddle: has joined #RubyOnRails
[12:29:27] edwinvdgraaf: has joined #RubyOnRails
[12:34:20] jas02: has joined #RubyOnRails
[12:35:28] blackmesa: has joined #RubyOnRails
[12:35:30] phredus__: has joined #RubyOnRails
[12:36:46] rbr: ghr: Heh ok, I suspected something like that ;)
[12:39:56] B1n4r10: has joined #RubyOnRails
[12:40:28] bbrowning: has joined #RubyOnRails
[12:42:44] sevenseacat: has joined #RubyOnRails
[12:44:02] Oliphaunte: has joined #RubyOnRails
[12:45:54] augcesar: has joined #RubyOnRails
[12:47:32] bool_: has joined #RubyOnRails
[12:48:34] phredus: has joined #RubyOnRails
[12:51:50] flashpoint9: has joined #RubyOnRails
[12:52:32] chouhoulis: has joined #RubyOnRails
[12:55:01] tjbiddle: has joined #RubyOnRails
[12:57:11] mdw: has joined #RubyOnRails
[12:57:56] Oliphaunte: has joined #RubyOnRails
[13:00:58] pwnd_nsfw: has joined #RubyOnRails
[13:01:38] phredus: has joined #RubyOnRails
[13:01:45] fmcgeough: has joined #RubyOnRails
[13:01:55] dblessing: has joined #RubyOnRails
[13:02:13] pawnbox: has joined #RubyOnRails
[13:06:12] ramortegui: has joined #RubyOnRails
[13:08:24] pawnbox: has joined #RubyOnRails
[13:12:04] ravster: has joined #RubyOnRails
[13:12:48] elton: has joined #RubyOnRails
[13:13:49] aegis3121: has joined #RubyOnRails
[13:14:26] Malgorath: has joined #RubyOnRails
[13:15:03] Ropeney: has joined #RubyOnRails
[13:15:29] Malgorath: I been googling and can't seem to find the answer to a question. Does a rails engine have to be created with --mountable to use routes from the engine? If not can someone help me find a link on how to get it to work as my routes seem to be completely ignored in config/routes.rb
[13:19:14] axxyhtrx: has joined #RubyOnRails
[13:19:19] pwnd_nsfw`: has joined #RubyOnRails
[13:20:12] edwinvdg_: has joined #RubyOnRails
[13:20:21] agit0: has joined #RubyOnRails
[13:21:03] voidDotClass: n_e_o, there's no schema dump, i'd like to migrate via rake db:migrate
[13:21:21] Niham: has joined #RubyOnRails
[13:25:13] Malgorath: nvm, figured out how to merge the routes
[13:25:55] allcentury: has joined #RubyOnRails
[13:28:12] ekinmur: has joined #RubyOnRails
[13:29:06] voidDotClass: Is this the correct way to add a decimal column to a migration? t.decimal :size, precision: 5, scale: 2
[13:31:01] yellow5: has joined #RubyOnRails
[13:32:05] Ergo^: has joined #RubyOnRails
[13:32:35] jancel: has joined #RubyOnRails
[13:32:52] Sashimi: has joined #RubyOnRails
[13:35:57] rbr: voidDotClass: yup
[13:36:18] xlegoman: has joined #RubyOnRails
[13:38:05] arup_r: has joined #RubyOnRails
[13:41:02] codeurge: has joined #RubyOnRails
[13:42:51] dionysus69: I can see 4 different language data does actually exist in the db but when I switch locale and I list object, the values are nil. can anyone suggest me anything? I am using globalize gem !
[13:43:39] startupality: has joined #RubyOnRails
[13:44:08] sevenseacat: dionysus69: without code, no-one can help you
[13:47:23] dionysus69: https://gist.github.com/anonymous/24be3f674d1aa801f1e443a4f855f6d4
[13:47:27] dionysus69: seed and routes files
[13:47:33] SteenJobs: has joined #RubyOnRails
[13:47:46] dionysus69: class ProductSerializer < ActiveModel::Serializer
[13:47:46] dionysus69: attributes :id, :name, :ptype, :ptype2, :sdescription, :description, :image
[13:47:46] dionysus69: one of the serializers
[13:50:03] dionysus69: AboutSection.first.aboutsectionheading > "about1"
[13:50:14] dionysus69: I18n.locale = :ka
[13:50:20] dionysus69: AboutSection.first.aboutsectionheading > nil
[13:50:54] jsrn: has joined #RubyOnRails
[13:51:56] Sashimi: has joined #RubyOnRails
[13:52:30] pwnd_nsfw: has joined #RubyOnRails
[13:53:31] JakFrist: has joined #RubyOnRails
[13:54:46] snoobydoo: has joined #RubyOnRails
[13:56:00] diegoaguilar: has joined #RubyOnRails
[13:58:01] dionysus69: anyways what other solution can I use for multi language sites? I am giving up on globalize gem. any other gem suggestions?
[14:00:31] qejk: has joined #RubyOnRails
[14:00:57] sevenseacat: I think you're misunderstanding the globalize gem
[14:01:39] sevenseacat: that seeds file is creating 4x19=76 products, not the same 19 products with localized versions
[14:02:02] sevenseacat: same thing for sections, etc.
[14:02:57] sevenseacat: you need to update the same products after you change locale, not create all new ones
[14:03:52] sevenseacat: https://github.com/globalize/globalize#model-translations
[14:04:27] dionysus69: this being an example ? post.attributes = { title: 'גלובאלייז2 שולט!', locale: :he }
[14:04:50] sevenseacat: that would update the attributes of an existing post, yes
[14:04:59] sevenseacat: but not setting the locale like that, no
[14:05:12] sevenseacat: though I guess that would work
[14:05:32] dionysus69: will try that first creating object and then updating like that
[14:06:23] gingray: has joined #RubyOnRails
[14:06:31] sevenseacat: great. in the future, remember that the documentation is your friend :)
[14:07:48] dionysus69: I read so many things that I got totally twisted. that what happens to me when I enter large new chapter and I get blocked on every lil detail
[14:08:56] sevenseacat: then you step back and break the problem down, instead of throwing everything you've done away to start again with something else
[14:11:22] diegoviola: has joined #RubyOnRails
[14:11:31] jhack: has joined #RubyOnRails
[14:12:47] pawnbox: has joined #RubyOnRails
[14:13:34] jhack_: has joined #RubyOnRails
[14:14:55] eljimbo: has joined #RubyOnRails
[14:16:01] macsteps: has joined #RubyOnRails
[14:16:30] Oliphaunte: has joined #RubyOnRails
[14:19:41] arup_r: has joined #RubyOnRails
[14:21:20] flashpoint9: has joined #RubyOnRails
[14:22:34] alfiemax: has joined #RubyOnRails
[14:23:18] pawnbox: has joined #RubyOnRails
[14:23:38] dionysus69: this is how I update parameters now but still shows null https://gist.github.com/anonymous/34f5fcd3e69efa3785296e229183aaa1
[14:23:39] agent_white: has joined #RubyOnRails
[14:25:02] jord-n: has joined #RubyOnRails
[14:25:08] alfiemax: dionysus69, what shows null?
[14:25:37] dionysus69: I18n.locale = :ka
[14:25:38] dionysus69: AboutSection.first.aboutsectionheading
[14:25:39] alfiemax: does the record get saved? or does the transaction get rollback ?
[14:25:45] dionysus69: results in null while en locale doesnt
[14:26:07] dionysus69: dunno this is how I update attributes I ll post my whole seeds file
[14:26:19] alfiemax: what is the output of `productSection1.errors`
[14:26:33] dionysus69: https://gist.github.com/anonymous/ff51be1822c46c82cbb25eed43818a67
[14:26:38] alfiemax: i.e after you execute the create statement
[14:28:14] mgilles: has joined #RubyOnRails
[14:28:43] B1n4r10: has joined #RubyOnRails
[14:30:11] rafaelfranca: has joined #RubyOnRails
[14:30:11] rafaelfranca: has joined #RubyOnRails
[14:30:14] dionysus69: doesnt have any errors
[14:31:40] dionysus69: #<ActiveModel::Errors:0x00000004b4e188 @base=#<ProductSection id: 5, created_at: "2016-06-14 14:31:08", updated_at: "2016-06-14 14:31:08">, @messages={}, @details={}> after productSection1 = ProductSection.create(productsectionheading: "Bottled")
[14:32:52] JesseH2: has joined #RubyOnRails
[14:33:29] edwinvdgraaf: has joined #RubyOnRails
[14:34:21] enkristoffer: has joined #RubyOnRails
[14:35:15] safetypin: has joined #RubyOnRails
[14:37:10] adavia: has joined #RubyOnRails
[14:37:29] blindMoe: has joined #RubyOnRails
[14:38:59] blindMoe: When using: Order.where(order_id: id).first_or_create do |order| It never seems to return the first entry when one exists. If it does not exist then the block is called and one is created but if it already exists it skips the block completely. Is this normal behavior? I feel like I am missing something simple but I am not seeing it
[14:39:47] alfiemax: blindMoe, Your orders table has order_id field?
[14:40:20] blindMoe: alfiemax: well the fields are named a bit differently but yes it does.. and no it is not the primary key
[14:40:29] blindMoe: I switched the names for the pasted example
[14:41:28] blindMoe: let's just say for the example it is: Order.where(foo: bar).first_or_create do |order|
[14:41:28] elton: has joined #RubyOnRails
[14:41:52] alfiemax: what do you get when you try that in the console `Order.where(foo: bar).first_or_create`
[14:43:02] jas02: has joined #RubyOnRails
[14:43:39] tjbiddle: has joined #RubyOnRails
[14:44:48] blindMoe: well I get an Uninitialized Constant: Order so I imagine I need to load the modules or something ( really new to rails console )
[14:45:26] alfiemax: would be helpful if you can show the stack trace
[14:45:27] startupality: has joined #RubyOnRails
[14:46:04] blindMoe: well no errors are thrown in the log when it is called. I have some logger statements running to let me know what it is doing and it simply skips that block
[14:46:07] prithaj: has joined #RubyOnRails
[14:46:46] alfiemax: ok, `Order` is your model name?
[14:47:11] alfiemax: what does `Order.first` return ?
[14:47:32] agent_white: has joined #RubyOnRails
[14:47:39] blindMoe: in the console: NameError: uninitialized constant Order
[14:47:45] context: app/models/order.rb says: class Order ?
[14:47:48] blindMoe: really odd since it works just fine in the app
[14:47:50] blindMoe: yes it does
[14:47:54] enkristoffer: has joined #RubyOnRails
[14:47:57] context: try: reload!
[14:48:22] blindMoe: I use the Order model quite a bit.... and like I said it actually creates an order if no match exists.. it just never updates
[14:48:24] context: how did you start your console
[14:48:59] shinnya: has joined #RubyOnRails
[14:49:05] context: irb != rails console.
[14:49:07] blindMoe: yeah.. doing it wrong :)
[14:49:10] alfiemax: blindMoe, start your console using `rails c`
[14:49:14] blindMoe: just realized that it isn't the same as the rails console
[14:49:16] blindMoe: sorry about that
[14:49:49] blindMoe: hrmmm so in the console it returns the record
[14:50:11] blindMoe: odd that it doesn't in the app with the exact same code
[14:51:32] DoubleMalt: has joined #RubyOnRails
[14:51:49] pawnbox: has joined #RubyOnRails
[14:52:32] Majadon: has joined #RubyOnRails
[14:54:09] SteenJobs: has joined #RubyOnRails
[14:55:45] context: blindmoe: then your app is doing something wrong
[14:55:53] context: wrong/different than what you are doing in the console
[14:56:38] blindMoe: context: yeah I am trying to break it down to see ... seriously running that exact line with the block but going to break the statement apart and do a where() then check to see if it exists and see if that changes anything
[14:57:12] sypheren: has joined #RubyOnRails
[14:58:39] pawnbox: has joined #RubyOnRails
[14:59:38] SteenJobs: has joined #RubyOnRails
[15:03:54] context: pastie the line thats failing
[15:04:09] context: blindmoe: its very most likely a variable is not what you think it is.
[15:04:28] context: so print all the variables you are using and validate that they are in fact what you think they are
[15:04:46] edwinvdg_: has joined #RubyOnRails
[15:05:02] blindMoe: context: That is essentially what I am doing but since that block is skipped the order variable is never set and I cannot print it when updating ( works fine on create )
[15:05:28] blindMoe: not sure why there would be a difference between update or create within the block
[15:09:03] aegis3121: has joined #RubyOnRails
[15:10:08] andywww: has joined #RubyOnRails
[15:10:30] andywww: wondered if i could get a hand on a regex query please?
[15:10:33] andywww: https://gist.github.com/anonymous/b9d64550ea2e85af374afa1601bc6d1f
[15:13:31] context: blindmoe: im not sure i understand what you are saying
[15:13:38] maucar: has joined #RubyOnRails
[15:13:52] andywww: the regex isn’t matching the word players
[15:14:10] context: dont you want s?
[15:14:24] andywww: sorry one minute let me explain
[15:14:35] context: i mean 's?' not 's*'
[15:14:40] context: but ive never touched regex in a database
[15:14:47] context: that just sounds amazingly scary
[15:14:50] andywww: i need to match player, players, player’s
[15:15:30] edwinvdgraaf: has joined #RubyOnRails
[15:16:14] dionysus69: has joined #RubyOnRails
[15:18:37] andywww: Manager.last.tweets.where("body ~ ?", "#{"player"}[\']*[s]*").size
[15:19:27] guidocalvano: has joined #RubyOnRails
[15:20:06] nettoweb: has joined #RubyOnRails
[15:20:54] andywww: https://gist.github.com/anonymous/5775bacbbb539d78f7dba33b26dcad7e
[15:21:39] andywww: it doesn’t like the word boundaries
[15:22:01] Cervajz: has joined #RubyOnRails
[15:22:10] jancel: has joined #RubyOnRails
[15:22:15] edwinvdg_: has joined #RubyOnRails
[15:23:05] Cervajz: has joined #RubyOnRails
[15:23:11] sergio_101: has joined #RubyOnRails
[15:23:32] tjbiddle: has joined #RubyOnRails
[15:28:03] disgrntld: has joined #RubyOnRails
[15:29:36] mustmodify: has joined #RubyOnRails
[15:31:54] mustmodify: Using resque, I spin up something like 4k jobs. Once those are done I want to add some other jobs to re-process that work. Like getting averages, etc. Is that an anti-pattern? Or what's a good way to make sure that second sequence happens? Should I be creating a cron job to just watch that queue for 0?
[15:39:00] d0nn1e: has joined #RubyOnRails
[15:39:23] xpl0iter: has joined #RubyOnRails
[15:39:31] xpl0iter: Hi, I am trying to do the sign up part of a website. Now I need to create a UUID and add it to the params which will be saved to the db. How do I do this
[15:42:07] chouhoulis: has joined #RubyOnRails
[15:42:22] macsteps: has joined #RubyOnRails
[15:42:33] alfiemax: has joined #RubyOnRails
[15:42:47] tjbiddle_: has joined #RubyOnRails
[15:43:44] dblessing: has joined #RubyOnRails
[15:45:02] chouhoulis: has joined #RubyOnRails
[15:45:53] mdw: has joined #RubyOnRails
[15:50:12] flashpoint9: has joined #RubyOnRails
[15:52:53] dionysus69: scope "/:locale" , locale: /en|ka|ru|zh/ do
[15:52:53] dionysus69: resources :about_sections
[15:52:53] dionysus69: what else do I need to make this work? app is not pulling data based on locale from db, it is english in all 4 cases. Is there anything else I need to do except of changeing route file? I am using globalize gem
[15:52:56] davidw: has joined #RubyOnRails
[15:54:34] dblessing: has joined #RubyOnRails
[15:58:03] whathappens: has joined #RubyOnRails
[15:59:18] dblessing: has joined #RubyOnRails
[16:00:16] tjohnson: has joined #RubyOnRails
[16:01:12] chipotle: has joined #RubyOnRails
[16:02:26] chipotle: has joined #RubyOnRails
[16:04:27] sk0r: has joined #RubyOnRails
[16:06:05] marr: has joined #RubyOnRails
[16:07:03] cnk: has joined #RubyOnRails
[16:08:11] arup_r: xpl0iter: using AR callback/hook. probably before_create hook
[16:08:29] allcentury: question, say I have a controller and I want to use some custom classes to handle specific scenarios within that controller. I'm finding that I have to pass in the session, params, request and response each time to each of these classes. The trouble, while i'm inheriting from ApplicationController I'm not able to use redirect_to or other ActionController::Base methods like I'd hope. Am I doing this
[16:08:31] allcentury: wrong? Does rails have a good way for me to extend ActionController?
[16:09:51] mustmodify: allcentury: yes, you're probably doing it wrong. Please list several scenarios you want to use for the same action.
[16:09:54] hahuang61: has joined #RubyOnRails
[16:09:57] mustmodify: and then I can give you some direction.
[16:10:17] Leepoff: has joined #RubyOnRails
[16:10:26] allcentury: Sure, let me type it up
[16:11:43] elton: has joined #RubyOnRails
[16:13:32] dblessing: has joined #RubyOnRails
[16:14:11] allcentury: mustmodify: here's what I'm doing: https://gist.github.com/allcentury/8dc732fda38ea8b246d69dd3519cd678
[16:16:18] dblessing: has joined #RubyOnRails
[16:17:29] B1n4r10: has joined #RubyOnRails
[16:18:11] dblessing: has joined #RubyOnRails
[16:22:27] xpl0iter: arup_r, thanks, but my concern was how to add the that to the params?
[16:23:00] arup_r: xpl0iter: I thought it should be backend, but if it is frontend, you can place field in the form?
[16:23:46] dblessing: has joined #RubyOnRails
[16:25:14] xpl0iter: arup_r, its backend. But I am just beigining in rails. and I am not able to find how to add this item to the params so that it will be saved to the db along with fields from the form
[16:26:04] zave: has joined #RubyOnRails
[16:26:29] arup_r: yes, I meant, I thought you want to autogenerate the UUID when u try to create a user each time. But if you want it in params, you have to place field in the same form, where u are asking user details and then saving to DB, make sense? :)
[16:26:34] arup_r: xpl0iter: ^
[16:26:45] mustmodify: allcentury: Sorry, I forgot about your question. Let me look.
[16:28:07] ksoze: has joined #RubyOnRails
[16:28:15] mustmodify: For this situation, you want modules instead of a class. And then you want to include that module in your controller.
[16:29:25] Cervajz: has joined #RubyOnRails
[16:29:25] Cervajz: has joined #RubyOnRails
[16:29:41] allcentury: thanks for looking mustmodify
[16:30:36] xpl0iter: arup_r, so there is no way to generate the UUID and save it along with the data from the form?
[16:31:00] xpl0iter: I mean except doing it in the form?
[16:32:06] arup_r: yes, why not, can U show your current code for creating? I will edit there, so that u see what I mean.. :)
[16:32:24] smathy: has joined #RubyOnRails
[16:33:56] mustmodify: allcentury: https://gist.github.com/mustmodify/fdb434d80fa3220e33f48dbb339b304a
[16:35:36] workmad3: xpl0iter: you could always merge a UUID into the hash you're passing in your `create` action too, if it's something you're generating and don't want users to touch
[16:35:41] iamayam: has joined #RubyOnRails
[16:38:30] arup_r: ^ yes that's a way
[16:41:13] dblessing: has joined #RubyOnRails
[16:41:36] whathapp_: has joined #RubyOnRails
[16:42:15] xpl0iter: workmad3, so I would just give it like params[:id] = SecureRandom.uuid?
[16:42:34] flashpoint9: has joined #RubyOnRails
[16:43:39] pwnd_nsfw`: has joined #RubyOnRails
[16:44:58] manfrin: has joined #RubyOnRails
[16:46:02] cnk: has joined #RubyOnRails
[16:47:48] Coldblackice: has joined #RubyOnRails
[16:47:56] dblessing: has joined #RubyOnRails
[16:48:11] dionysus69: how do I do if defined locales not found then set to default? here is an example of how I set locale in application atm I18n.locale = params[:locale] || I18n.default_locale
[16:49:01] pilne: has joined #RubyOnRails
[16:49:28] moeabdol: has joined #RubyOnRails
[16:49:30] definiv: has joined #RubyOnRails
[16:54:43] B1n4r10: has joined #RubyOnRails
[16:56:58] aegis3121: has joined #RubyOnRails
[16:57:51] alfiemax: has joined #RubyOnRails
[16:58:44] mikecmpbll: has joined #RubyOnRails
[16:59:02] tbuehlmann: dionysus69: you could check whether params[:locale] is in I18n.available_locales
[17:00:34] choke: has joined #RubyOnRails
[17:01:02] dionysus69: hmm thanks will try implement that :)
[17:01:36] crdpink: has joined #RubyOnRails
[17:02:19] Zackio: has joined #RubyOnRails
[17:03:04] blackmesa: has joined #RubyOnRails
[17:03:14] JakFrist: has joined #RubyOnRails
[17:04:09] Circuit8: Hey guys, just checking if people have had success using paperclip + amazon aws-sdk with Rails 5 rc1?
[17:07:25] hahuang61: has joined #RubyOnRails
[17:07:26] yellow5: has joined #RubyOnRails
[17:10:40] dstarh: has joined #RubyOnRails
[17:11:50] jancel: has joined #RubyOnRails
[17:15:29] dblessing: has joined #RubyOnRails
[17:16:35] ksoze: has joined #RubyOnRails
[17:18:27] dblessing: has joined #RubyOnRails
[17:19:01] enkristoffer: has joined #RubyOnRails
[17:19:05] [Butch]: has joined #RubyOnRails
[17:21:03] mdw: has joined #RubyOnRails
[17:21:10] hutch: Hi guys, I am having the hardest time getting rails on heroku to log to STDOUT - anyone attempted this before ?
[17:22:25] mustmodify: has left #RubyOnRails: ()
[17:23:20] norc_: hutch, instead of asking whether "anyone has attempted this" - describe your problem and show us what you have done so far.
[17:25:28] Circuit8: norc_: Hey norc, I think I was talking to you the other day about using Draper with rails 5?
[17:25:41] Circuit8: norc_: Just wondering what you did to make it work
[17:25:48] norc_: Circuit8, pure magic.
[17:25:59] Circuit8: norc_: haha
[17:26:47] Circuit8: norc_: I've figured out all my other gem dependencies are fine, its just I'm getting that `cannot load such file -- active_model/serializers/xml (LoadError)`
[17:26:52] Circuit8: norc_: when I try to run the generator
[17:27:04] norc_: Circuit8, mind my asking.
[17:27:13] norc_: Circuit8, have you even bothered think about googling for this?
[17:27:19] replay: has joined #RubyOnRails
[17:29:11] arup_r: has joined #RubyOnRails
[17:29:32] Circuit8: norc_: point taken
[17:31:22] dblessing: has joined #RubyOnRails
[17:34:05] Oliphaunte: has joined #RubyOnRails
[17:34:09] dblessing: has joined #RubyOnRails
[17:34:23] deur-: has joined #RubyOnRails
[17:35:36] VeryBewitching: has joined #RubyOnRails
[17:36:56] VeryBewitching: Does anyone know of a way that I can configure Rails to compile .haml files in the assets folder for me? A developer on my team is setting up Angular templates and he'd prefer to use HAML to mark them up.
[17:38:41] cnk: shoot him?
[17:39:00] norc_: VeryBewitching, haml_coffee_assets?
[17:39:25] norc_: VeryBewitching, but I recommend you heed cnk's advice.
[17:39:28] VeryBewitching: norc_: No, just .html.haml files used as templates. Right now he's concocted a solution, but I don't like how it's doing this.
[17:39:44] VeryBewitching: cnk: We want to reuse the templates in an Ionic app.
[17:40:22] VeryBewitching: Can I just add the path he created in assets to the pipeline?
[17:41:03] norc_: VeryBewitching, no.
[17:41:13] norc_: not unless you want the HAML actually processed. ;-)
[17:41:14] Ergo^: has joined #RubyOnRails
[17:41:36] norc_: VeryBewitching, https://github.com/carezone/haml_assets -- look at the implementation it is a very simplistic Rails engine.
[17:41:58] VeryBewitching: This is what he's done: https://gist.github.com/bewitchingme/79dc2bbccada6da9350136c66e24edad
[17:42:37] hahuang61: has joined #RubyOnRails
[17:42:37] lxsameer: has joined #RubyOnRails
[17:42:51] ksoze: has joined #RubyOnRails
[17:43:11] aegis3121: has joined #RubyOnRails
[17:43:14] VeryBewitching: I don't feel comfortable with this solution, he implemented this after reading an SO post regarding a Rails 3 app
[17:45:02] hutch: norc_: apologies, let me put together a better question
[17:45:46] Leepoff: has joined #RubyOnRails
[17:46:39] VeryBewitching: norc_: haml_assets seems like it'll do the trick, gonna try that out.
[17:46:48] norc_: VeryBewitching, don't blindly use it though - it is old.
[17:47:02] norc_: VeryBewitching, read the code (it is very small) and roll your own based on it.
[17:47:44] dblessing: has joined #RubyOnRails
[17:48:10] kgrz: has joined #RubyOnRails
[17:49:01] adre: has joined #RubyOnRails
[17:49:27] norc_: VeryBewitching, or third alternative: Roll your own and shoot your colleague.
[17:49:49] VeryBewitching: norc_: Ya, I'm leaning that way for more than one reason on this project.
[17:52:08] jancel: has joined #RubyOnRails
[17:52:50] Osmosis311: has joined #RubyOnRails
[17:54:37] Dreamer3: has joined #RubyOnRails
[17:56:37] VeryBewitching: norc_: Hah, found this https://github.com/pitr/angular-rails-templates
[17:56:52] Dreamer3: has joined #RubyOnRails
[17:57:37] hutch: I am trying to configure a rails application which uses daily schedule rake tasks. I am trying to get this to log ot STDOUT on heroku with no success. I have the rails_12factor gem installed, log_level = :debug, and the following line in my production.rb file: config.logger = Logger.new(STDOUT)
[17:57:46] hutch: Anyone able to provide insight on this ?
[17:59:05] Dreamer3: has joined #RubyOnRails
[18:01:40] meoblast001: has joined #RubyOnRails
[18:02:30] dblessing: has joined #RubyOnRails
[18:06:56] Ergo^: has joined #RubyOnRails
[18:08:30] solars: has joined #RubyOnRails
[18:09:20] [Butch]_: has joined #RubyOnRails
[18:13:00] gingray: has joined #RubyOnRails
[18:14:58] xlegoman: has joined #RubyOnRails
[18:15:08] DoctorMonocular: has joined #RubyOnRails
[18:15:43] robot: has joined #RubyOnRails
[18:15:43] iceden: has left #RubyOnRails: ("Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is")
[18:15:45] chipotle: has joined #RubyOnRails
[18:16:44] DoctorMonocular: dionysus69: you can add a locale, and it seems like it'll work in this case because you really just need a font for the georgian alphabet, then it's basically normal (from my cursory glance at the wiki page)
[18:16:48] Dimik: has joined #RubyOnRails
[18:16:56] DoctorMonocular: it'd be similar to a greek locale
[18:17:37] iceden: has joined #RubyOnRails
[18:18:32] Markhor1991: has joined #RubyOnRails
[18:19:33] dionysus69: I needed to add this block scope '(:locale)', locale: /en|ka|ru|zh/ do
[18:19:33] dionysus69: to the routes
[18:20:30] dionysus69: globalize gem documentation is vague in some parts in my opinion thats why I took couple hours to figure out working solution
[18:22:06] DoctorMonocular: yeah looks right :)
[18:22:15] DoctorMonocular: you can try to improve the documentation and submit a PR
[18:22:20] DoctorMonocular: if you felt so inclined
[18:22:56] Markhor1991: good afternoon all
[18:23:46] kgrz: has joined #RubyOnRails
[18:24:28] blindMoe: has joined #RubyOnRails
[18:29:07] whathapp_: has joined #RubyOnRails
[18:31:24] yos7ph: has joined #RubyOnRails
[18:33:54] yos7ph: has joined #RubyOnRails
[18:34:01] arup_r: has joined #RubyOnRails
[18:35:53] dionysus69: any ideas how can I pass an i18n.locale.to_s to the ember app ? what is a conventional approach?
[18:37:07] norc_: dionysus69, argument passing is a helpful technique of transporting data from one part to another.
[18:37:35] norc_: dionysus69, on a serious note - be more specific.
[18:39:49] dionysus69: I have an api with i18n domain/[locale]/someRoute, wondering how I can get it working alongside an ember app. I installed i18n on ember app too but that one looks much more complicated than the rails side
[18:39:50] jenrzzz: has joined #RubyOnRails
[18:39:50] jenrzzz: has joined #RubyOnRails
[18:41:54] diegoviola: how can I do this without passing in room_id too many times? https://gist.github.com/diegoviola/eeb56886655ce66e178480903623b3fc resources bookings is a nested resource of rooms
[18:42:03] xlegoman: has joined #RubyOnRails
[18:43:39] B1n4r10: has joined #RubyOnRails
[18:47:39] jenrzzz: has joined #RubyOnRails
[18:48:55] manfrin: has joined #RubyOnRails
[18:49:14] ivanskie: has joined #RubyOnRails
[18:51:06] SteenJobs: has joined #RubyOnRails
[18:51:59] norc_: diegoviola, this would be a great example for strong params the way that rails generates them in controllers.
[18:52:38] norc_: diegoviola, or both private functions that rails generates.
[18:52:53] diegoviola: can you give me an example please?
[18:54:20] norc_: diegoviola, use: rails g scaffold foobar
[18:54:30] norc_: (use rails d scaffold foobar to clean up afterwards)
[18:54:33] norc_: And look at the controller.
[18:54:35] yfeldblum: has joined #RubyOnRails
[18:54:45] ksoze: has joined #RubyOnRails
[18:54:47] jancel: has joined #RubyOnRails
[18:55:05] norc_: diegoviola, note Im not suggesting you use the generators, but its easier if you just look at the code yourself. :)
[18:56:57] Darmani: has joined #RubyOnRails
[19:00:33] atrius: has joined #RubyOnRails
[19:05:36] jgt1: has joined #RubyOnRails
[19:08:24] _underscore_: Active record question: rooms has_many people has_many phone_numbers Can I use ActiveRecord to pull a list of all the phone numbers that belong to a room though people, do I need to break out the SQL?
[19:08:40] Osmosis311: has joined #RubyOnRails
[19:09:05] _underscore_: Or did I just answer my own question and need to create an association between room and phone_numbers using through?
[19:09:17] Markhor1991: has joined #RubyOnRails
[19:09:29] jstransky: has joined #RubyOnRails
[19:12:40] brettu: has joined #RubyOnRails
[19:13:06] alfiemax: has joined #RubyOnRails
[19:15:53] moeabdol: has joined #RubyOnRails
[19:17:57] blackmesa: has joined #RubyOnRails
[19:18:27] _underscore_: So, adding has_many phone_numbers, through: :people to rooms worked... But is there a more dynamic was to do this without having to hard code has_many
[19:21:54] acovrig: has joined #RubyOnRails
[19:22:39] dblessing: has joined #RubyOnRails
[19:22:44] acovrig: I’m having a strange issue: I do a GET and I get a 500 StatementInvalid Mysql::Error; but if I do the *exact* same call again I don’t get the 500...
[19:28:44] choke: has joined #RubyOnRails
[19:31:08] norc_: acovrig, more debug information please. The code for: a) the route, b) the controller and c) the full log for the request nicely wrapped into one of those github gists.
[19:33:15] manfrin_: has joined #RubyOnRails
[19:33:34] acovrig: norc_: https://gist.github.com/acovrig/4b869c1c268a51bf01cd307641b3bb37
[19:34:47] eljimbo: has joined #RubyOnRails
[19:35:13] norc_: acovrig, can you include a complete stack trace on that?
[19:35:30] acovrig: norc_: how do I do that?
[19:35:42] norc_: acovrig, can you easily provoke the error?
[19:36:11] acovrig: norc_: no, it seems random
[19:36:30] norc_: acovrig, well next time you get the error page from Rails, click on "Full stack trace"
[19:36:47] acovrig: norc_: that could be interesting, this is an API, not a web-interface
[19:36:50] norc_: That way you get the entire call stack that lead up to the exception thrown, which might help understand why it was emitted.
[19:37:20] macsteps: has joined #RubyOnRails
[19:38:23] norc_: acovrig, I think setting Rails.backtrace_cleaner.remove_silencers! in an initializer should be enough to get the stack trace in your logger.
[19:38:50] norc_: acovrig, until we know what threw the exception its impossible to tell the cause for this.
[19:39:12] acovrig: norc_: I just rake db:drop db:create db:migrate db:seed and hit it and it worked just fine...
[19:39:24] edwinvdgraaf: has joined #RubyOnRails
[19:39:30] norc_: acovrig, well you did say it happened randomly..
[19:40:58] ekinmur: has joined #RubyOnRails
[19:41:12] norc_: acovrig, mm you could try looking into your MySQL log
[19:42:32] FCser: has joined #RubyOnRails
[19:44:24] tildes: has joined #RubyOnRails
[19:45:19] Leepoff: has joined #RubyOnRails
[19:46:31] whathappens: has joined #RubyOnRails
[19:47:12] sebstrax: has joined #RubyOnRails
[19:48:45] Spami: has joined #RubyOnRails
[19:51:27] apotry: has joined #RubyOnRails
[19:51:34] sonofdirt: has joined #RubyOnRails
[19:51:38] VeryBewitching: I'm trying to make use of friendly_id 5.1, have configured my model like so https://gist.github.com/bewitchingme/7156f5b3a315e7cccd9cdb0300030198 but the slug is never generated
[19:51:51] rafaelfranca: has joined #RubyOnRails
[19:52:53] blindMoe: has joined #RubyOnRails
[19:55:19] theery: has joined #RubyOnRails
[19:57:14] Dreamer3: has joined #RubyOnRails
[19:57:19] Dreamer3_: has joined #RubyOnRails
[19:57:35] Jasaka: has joined #RubyOnRails
[19:59:20] lxsameer: has joined #RubyOnRails
[19:59:40] Dreamer3_: has joined #RubyOnRails
[20:01:28] Oliphaunte: has joined #RubyOnRails
[20:02:33] DoctorMonocular: has joined #RubyOnRails
[20:03:39] rueben: has joined #RubyOnRails
[20:04:24] flashpoint9: has joined #RubyOnRails
[20:07:10] roamingdog: has joined #RubyOnRails
[20:08:16] sameerynho: has joined #RubyOnRails
[20:11:43] lightt: has joined #RubyOnRails
[20:11:55] arBmind: has joined #RubyOnRails
[20:13:02] hahuang62: has joined #RubyOnRails
[20:13:03] alfiemax: has joined #RubyOnRails
[20:15:29] ur5us: has joined #RubyOnRails
[20:16:15] choke: has joined #RubyOnRails
[20:16:55] jenrzzz: has joined #RubyOnRails
[20:16:55] jenrzzz: has joined #RubyOnRails
[20:18:43] smathy: _underscore_, has_many :through is the way.
[20:22:17] srinidhi: has joined #RubyOnRails
[20:22:17] crystal77: has joined #RubyOnRails
[20:24:21] FooMunki: has joined #RubyOnRails
[20:26:18] jgt1: has joined #RubyOnRails
[20:26:21] rueben: has joined #RubyOnRails
[20:32:40] VeryBewitching: Does anyone know of an alternative to friendly_id?
[20:33:08] jhack: has joined #RubyOnRails
[20:35:47] pawnbox: has joined #RubyOnRails
[20:36:03] adma: has joined #RubyOnRails
[20:36:15] lightt: has joined #RubyOnRails
[20:37:20] flashpoint9: has joined #RubyOnRails
[20:42:32] dblessing: has joined #RubyOnRails
[20:49:10] ksoze: has joined #RubyOnRails
[20:49:12] dannyguk: has joined #RubyOnRails
[20:50:44] dblessing: has joined #RubyOnRails
[20:51:30] JakFrist: has joined #RubyOnRails
[20:53:29] polyidus: has joined #RubyOnRails
[20:53:39] macsteps: has joined #RubyOnRails
[20:55:42] B1n4r10: has joined #RubyOnRails
[20:56:50] moeabdol: has joined #RubyOnRails
[20:57:03] dblessing: has joined #RubyOnRails
[20:58:08] manfrin: has joined #RubyOnRails
[20:59:04] mello: has joined #RubyOnRails
[21:00:38] mello: hey, im using act_as_commentable_with_threading and was wondering is it possible to add comments to a post that are shown in the index view? Im trying to figure out how to achive this without the need to do find params id
[21:02:02] mdw: has joined #RubyOnRails
[21:02:29] thejoecarroll: has joined #RubyOnRails
[21:06:42] dblessing: has joined #RubyOnRails
[21:07:24] solars: has joined #RubyOnRails
[21:11:29] dblessing: has joined #RubyOnRails
[21:12:23] whathappens: has joined #RubyOnRails
[21:13:21] elton: has joined #RubyOnRails
[21:14:24] melonstorm: has joined #RubyOnRails
[21:16:05] jgt1: has joined #RubyOnRails
[21:20:50] yfeldblum: has joined #RubyOnRails
[21:20:56] chintanparikh: has joined #RubyOnRails
[21:21:01] dblessing: has joined #RubyOnRails
[21:22:04] taxen: has joined #RubyOnRails
[21:24:15] choke: has joined #RubyOnRails
[21:24:29] taxen: I'm trying to deploy my first rails app to my ubuntu server (running nginx + unicorn)... I've setup everything but only get a "we're sorry but something went wrong" error when visiting the IP... Where do I start troubleshooting this?
[21:25:07] dblessing: has joined #RubyOnRails
[21:25:31] taxen: I've checked in log/unicorn.log but no error there
[21:25:41] deur-: has joined #RubyOnRails
[21:26:32] fox_mulder_cp: taxen: see app log, app server console, nginx logs
[21:26:54] iamvery: has joined #RubyOnRails
[21:27:00] fox_mulder_cp: may be u can't define some keys, such as secure or not compile assets
[21:27:13] norc_: taxen, check the rails log.
[21:27:15] norc_: taxen, not the unicorn log.
[21:27:24] taxen: norc_ where is it located?
[21:27:31] norc_: taxen, how should I know?
[21:27:43] taxen: where is it normally located? :)
[21:27:48] taxen: (complete noob here)
[21:27:52] norc_: taxen, that depends on your configuration and set up.
[21:27:58] xlegoman: has joined #RubyOnRails
[21:28:06] norc_: taxen, http://guides.rubyonrails.org/debugging_rails_applications.html
[21:28:09] norc_: taxen, read it and love it,.
[21:29:23] roamingdog: taxen: do read, but rails log is /log/production.log if you're in production env
[21:29:25] lightt: has joined #RubyOnRails
[21:29:43] claytonzaugg: has joined #RubyOnRails
[21:30:41] roamingdog: using paper_trail i can get versions for a model instance, how do i get all versions for the model class?
[21:30:49] taxen: roamingdog: only a few entries from when I ran db:migrate there
[21:31:47] roamingdog: taxen: if you get the rails 'i'm sorry ...something went wrong', there almost certainly would be an error in the rails log
[21:32:07] roamingdog: taxen: are there other log files in there?
[21:32:42] taxen: roamingdog: yeah, it's strange... there's production.log and unicorn.log
[21:32:54] taxen: as well as development.log and test.log, but those are empty
[21:33:08] taxen: strange that there's no error in production.log I mean
[21:33:18] roamingdog: ok, that's what i was going to have you check. yes strange, that
[21:33:24] roamingdog: how about nginx.log?
[21:34:10] diegoaguilar: has joined #RubyOnRails
[21:34:25] taxen: roamingdog: /var/log/nginx/nginx_error.log is empty
[21:35:08] roamingdog: oh dear, sure you're in the right directory, where your app is?
[21:35:29] taxen: please bear with me
[21:35:52] taxen: my rails app is in /home/username/
[21:36:04] taxen: (running ubuntu)
[21:36:46] mikecmpbll: has joined #RubyOnRails
[21:36:47] dblessing: has joined #RubyOnRails
[21:37:03] roamingdog: taxen: i dunno then - if me, i'd put a guaranteed error in application_controller.rb and refresh the page then check production.log
[21:37:04] taxen: roamingdog: ok, I found something in /var/log/nginx/error.log
[21:37:18] taxen: 2016/06/14 18:08:46 [notice] 16439#0: using inherited sockets from "6;"
[21:37:18] taxen: 2016/06/14 22:36:05 [notice] 29120#0: signal process started
[21:37:27] taxen: that's all
[21:37:56] flashpoint9: has joined #RubyOnRails
[21:38:30] haaj: has joined #RubyOnRails
[21:38:39] Radar: GOOD MORNING
[21:39:21] srinidhi1: has joined #RubyOnRails
[21:39:39] alfiemax: Good Morning :)
[21:39:47] dblessing: has joined #RubyOnRails
[21:39:50] alfiemax: hi everyone
[21:39:58] roamingdog: ah Radar, dare i repeat my whilom question? using paper_trail i can get versions for a model instance, how do i get all versions for the model class?
[21:40:01] alfiemax: got a question
[21:40:15] Radar: roamingdog: .versions?
[21:40:40] alfiemax: is it possible to have conditional associations? like User has many reports only if user role is admin
[21:41:19] alfiemax: afaik, associations are loaded when the model is loaded
[21:41:52] roamingdog: nope, get undefined
[21:42:29] alfiemax: i've googled for this, but all i've found is scoped associations, like `has_many :orders, -> { where processed: true }` which is not at all related to what i'm looking for
[21:42:29] Radar: roamingdog: !shrug
[21:42:29] helpa: roamingdog: ¯\_(ツ)_/¯ Sorry, Radar is not able to help you any further as they do not know.
[21:43:04] Radar: roamingdog: https://github.com/airblade/paper_trail#1c-basic-usage
[21:43:21] Radar: roamingdog: Oh, it's for the model class? Not possible, probably.
[21:43:25] Radar: Why would you even want that?
[21:44:00] roamingdog: Radar: i'm tasked with recreating functionality from an old app that uses rails_admin to show history. for index page in admin area.
[21:44:51] Fallopiantubing: has joined #RubyOnRails
[21:45:00] baweaver: you'd have to implement a history type system or changelog
[21:45:01] Synthead: can I use multiple around_filters?
[21:45:13] helpa: Why don't you try it and find out for yourself?
[21:45:33] roamingdog: Radar: looks like rails_admin just iterates over instances
[21:45:40] Radar: Seems lightly.
[21:45:47] Synthead: what about ActiveJob and around_perform?
[21:45:48] Radar: brain is still booting this AM
[21:45:57] Radar: Synthead: see above
[21:45:59] Synthead: I am defining an around_perform but it doesn't seem to be used
[21:46:03] dblessing: has joined #RubyOnRails
[21:46:19] Radar: Synthead: !rule0
[21:46:19] helpa: Synthead: Show rather than tell. Explaining your problem with code, stacktraces or errors is always preferred to explaining it with just text. Show us what's happening, rather than telling us. Put the code on https://gist.github.com and then give us the HTTP link to the Gist.
[21:46:24] baweaver: how do you know it's not used?
[21:46:38] Synthead: in a concern, I have included do; around_perform do |filters, block|; binding.pry; end; end
[21:46:42] baweaver: remember that AJ logs to the Job / redis queue
[21:46:48] Ergo: has joined #RubyOnRails
[21:46:58] Radar: Synthead: Steps to reproduce in a new app.
[21:47:00] hd1: has joined #RubyOnRails
[21:47:00] Synthead: I am including the concern in my job and it doesn't seem to run
[21:47:01] baweaver: it probably is stopping
[21:47:13] baweaver: just remember that job servers run aside
[21:47:37] baweaver: so if you happen to have that running, you're going to need remote pry
[21:47:47] Synthead: baweaver: yeah I'm running sidekiq in the foreground and I don't see pry
[21:48:03] baweaver: Kill and restart the workers
[21:48:06] Synthead: baweaver: I can definitely get into pry sessions in sidekiq
[21:48:08] baweaver: they keep code
[21:48:11] Radar: Fallopiantubing: hello
[21:48:11] Synthead: baweaver: already tried
[21:48:17] Radar: [07:46:58] <Radar> Synthead: Steps to reproduce in a new app.
[21:48:21] hd1: https://gist.github.com/hdiwan/b3eb599b2368f3dca8b388551aa68855 anyone see anything untoward here?
[21:48:43] Radar: hd1: you're using :Post when you should be using :post.
[21:48:52] Synthead: baweaver: if I mode the pry bit to be right after "included do", sidekiq drops to a pry console right when it fires up as expected
[21:49:24] Synthead: I should be able to run multiple around_performs, though, right?
[21:49:38] baweaver: Not sure, AJ is finnicky at best
[21:49:44] Synthead: I am trying it, and I am "seeing" a "no," but I feel like there's something hokey in my code instead
[21:50:09] baweaver: Use inheritance
[21:50:17] Synthead: baweaver: in what way?
[21:50:31] baweaver: define a base job and then mixin other behavior as you need it
[21:51:00] Fallopiantubing: Im very new to rails, like I just installed, can any of you recommend a good tutorial to help me along?
[21:51:07] helpa: Rails 4 in Action - http://manning.com/bigg2 - An excellent book combining Rails and TDD/BDD development. Written by Rebecca Skinner, Steve Klabnik, Ryan Bigg, Yehuda Katz
[21:51:32] Synthead: baweaver: that's what I'm doing with concerns now
[21:51:37] Radar: Fallopiantubing: ^ that's the best book on Rails that I've ever written.
[21:51:44] Synthead: I thought it would be a good idea to put exception handling in around_perform blocks
[21:51:48] Radar: Synthead: Do you have me on ignore?
[21:51:58] Fallopiantubing: sorry radar lol
[21:52:20] Radar: Synthead: Rightio.
[21:52:47] Synthead: Fallopiantubing: got some ruby chops?
[21:53:45] Fallopiantubing: ive gone over a few tutorials with ruby so im trying to catch up on both
[21:53:48] Synthead: Fallopiantubing: might try tryruby.org
[21:53:52] roamingdog: Radar: fyi, got it: PaperTrail::Version.where(item_type: 'Contact').each do |version| easy peasy
[21:54:07] Radar: roamingdog: Neat :)
[21:54:17] roamingdog: one less shrug you'll have in your future
[21:54:23] Fallopiantubing: im currently going to school for graphic design and web design and im really interested in the dev side
[21:54:34] Synthead: Fallopiantubing: no doubt :)
[21:54:52] Fallopiantubing: gotta follow that paper trail =)
[21:54:56] baweaver: Do note though you're probably going to get odd reactions on that nick
[21:55:17] Fallopiantubing: lol ya well nothing came to mind intially so i went for my gamer tag lol
[21:55:17] roamingdog: baweaver: my reaction is, she's female
[21:55:27] srinidhi: has joined #RubyOnRails
[21:55:30] baweaver: ACTION shrugs
[21:55:30] Synthead: tis the internet
[21:56:02] baweaver: I tend not to care unless it's explicitly offensive.
[21:56:14] baweaver: as you were
[21:56:23] Synthead: has joined #RubyOnRails
[21:56:32] baweaver: ACTION needs to not use british turns of phrase
[21:56:42] nettoweb: has joined #RubyOnRails
[21:57:35] startupality: has joined #RubyOnRails
[21:57:55] Leepoff: Hello all, quick question. How does this resolve a gem version (two versions listed for one gem): gem 'bootstrap-sass', '~> 3.3', '>= 3.3.6’?
[21:58:01] lictor36: has joined #RubyOnRails
[21:58:50] jhass: Leepoff: all restrictions must be met
[21:58:54] dblessing: has joined #RubyOnRails
[21:59:06] jhass: so in this case >= 3.36 and < 3.4.0
[22:00:42] Leepoff: ahh that makes sense, thanks jhass
[22:01:08] startupality: has joined #RubyOnRails
[22:01:21] jhass: (technically this puts three "simple" restrictions in place, >= 3.3.0, >= 3.3.6, < 3.4.0, but of course >= 3.3.0 gets irrelevant through >= 3.3.6)
[22:02:11] eljimbo: has joined #RubyOnRails
[22:02:15] flashpoint9: has joined #RubyOnRails
[22:02:25] crystal77: has joined #RubyOnRails
[22:02:26] Leepoff: If the version 3.3.6 didn’t exist in this case, with the install error out?
[22:02:59] macsteps: has joined #RubyOnRails
[22:03:00] voidDotClass: has joined #RubyOnRails
[22:03:53] jhass: mh, likely but you can't say it like this
[22:04:07] jhass: in theory 3.3.7 can exist without 3.3.6 ever having existed
[22:04:14] jhass: or 3.3.6 could have been yanked
[22:05:32] dblessing: has joined #RubyOnRails
[22:06:23] Leepoff: right, good to know! I’m not at a point where I need this precise of version control, but can see where this would be useful
[22:15:15] polyidus: has joined #RubyOnRails
[22:19:21] melonstorm: has joined #RubyOnRails
[22:23:38] whathapp_: has joined #RubyOnRails
[22:23:59] Fallopiantubing: ACTION slaps Fallopiantubing around a bit with a large trout
[22:26:23] Darmani: has joined #RubyOnRails
[22:27:01] chintanparikh1: has joined #RubyOnRails
[22:28:37] ksoze: has joined #RubyOnRails
[22:28:41] jhack: has joined #RubyOnRails
[22:30:59] Darmani: Hi everyone ^^
[22:31:12] nettoweb: has joined #RubyOnRails
[22:31:45] jancel: has joined #RubyOnRails
[22:33:56] alotofnoodles: has joined #RubyOnRails
[22:34:53] allcentury: has joined #RubyOnRails
[22:38:31] havenwood: Darmani: hi!
[22:38:34] lightt: has joined #RubyOnRails
[22:38:55] Darmani: havenwood: hey man ^^
[22:38:59] Radar: hello Darmani
[22:39:07] Radar: Darmani: Did you have a good rest?
[22:39:24] Darmani: Radar: Haha yeah I did.
[22:42:21] startupality: has joined #RubyOnRails
[22:44:39] Sashimi: has joined #RubyOnRails
[22:44:53] macsteps: has joined #RubyOnRails
[22:45:32] Darmani: Radar: If you have time, let me know if you can help me with that problem from yesterday.
[22:45:44] Radar: Darmani: Do you have the code in a repository somewhere?
[22:46:06] Darmani: yeah it's on github hang on..
[22:46:52] Markhor1991: has joined #RubyOnRails
[22:47:26] Darmani: Radar: Actually that commit is a little behind the one I'm working on, let me update a few things real quick.
[22:47:51] tvw: has joined #RubyOnRails
[22:48:37] nettoweb: has joined #RubyOnRails
[22:50:06] pwnd_nsfw: has joined #RubyOnRails
[22:50:24] Radar: Markhor1991: hello again :)
[22:51:06] Darmani: Radar: Okay, this should be fully updated.
[22:51:07] Darmani: https://github.com/mfifth/forum
[22:51:30] Darmani: Radar: It's not the master branch, it's the one titled "messaging feature"
[22:51:44] Radar: Will take a look in a moment.
[22:52:04] Darmani: Sure take your time ^^
[22:54:24] Radar: Darmani: The form here: https://github.com/mfifth/forum/blob/messaging_feature/app/views/conversations/index.html.erb#L21-L25
[22:54:40] Radar: Darmani: Will submit the value of that text field to the `create` action as params[:conversation][:recipient]
[22:55:15] elementaru: has joined #RubyOnRails
[22:55:26] Darmani: Radar: Okay..
[22:56:38] Radar: Therefore the `create` action could be this: https://gist.github.com/radar/94dee29adb61a563b45b2546a01d3669
[22:59:27] Darmani: Radar: Let me implement that real quick ^^
[23:00:24] tildes: has joined #RubyOnRails
[23:04:47] jancel: has joined #RubyOnRails
[23:04:58] Radar: take your time :)
[23:05:04] Radar: Do you understand all of the code?
[23:06:38] Darmani: Radar: yeah it's straightforward.
[23:07:42] Darmani: Radar: https://gist.github.com/mfifth/c4ed74336aca3abbbe4df4044466d78e
[23:07:58] Radar: Is that what I typed
[23:08:54] Darmani: Not exactly..
[23:09:38] Darmani: Radar: https://gist.github.com/mfifth/c4ed74336aca3abbbe4df4044466d78e
[23:09:56] Radar: I don't know how you accomplished that one.
[23:10:33] Darmani: Radar: Haha me neither. But if I delete all my code and just leave "create" the way you structured it that's what I get :s
[23:10:41] jgt2: has joined #RubyOnRails
[23:11:51] Radar: Darmani: Commit + push that to GItHub please. I'll take a look
[23:12:39] Wingar: has joined #RubyOnRails
[23:12:51] Wingar_: has joined #RubyOnRails
[23:14:05] Darmani: Radar: done
[23:14:06] Darmani: https://github.com/mfifth/forum/tree/messaging_feature
[23:14:13] elton: has joined #RubyOnRails
[23:16:36] Markhor1991: ok I used the terminal to create a model, and got the model file open. do i add my fields to the model, or dig and add them to a migrate file?
[23:16:43] Wingar: has joined #RubyOnRails
[23:17:44] hahuang62: has joined #RubyOnRails
[23:21:12] SteenJobs: has joined #RubyOnRails
[23:22:30] lightt: has joined #RubyOnRails
[23:22:48] Markhor1991: ok i found the migration file, yeah the stuff to be added to the record belongs there.
[23:24:11] quazimodo: has joined #RubyOnRails
[23:24:55] Darmani: Markhor1991: When you create a model in the terminal a corresponding migration is made as well. That's where you can add fields.
[23:25:33] Markhor1991: alright, thanks. cool. getting there.
[23:25:59] Radar: Darmani: Look at the logs...
[23:26:02] Radar: Redirected to http://localhost:3000/conversations/%23%3CConversation::ActiveRecord_Relation:0x007fcbe30ca4c0%3E/messages
[23:26:10] Radar: This is from the `create` action
[23:26:38] Darmani: Radar: From the messages controller right?
[23:26:50] Radar: The create action in the ConversationsController
[23:27:03] Radar: Darmani: My guess is because https://github.com/mfifth/forum/blob/messaging_feature/app/controllers/conversations_controller.rb#L11 returns an array of conversations, rather than just a single one.
[23:27:19] Osmosis311: has joined #RubyOnRails
[23:28:01] Darmani: Radar: An array of conversations... That's strange.
[23:28:15] Radar: Not really.
[23:28:55] Darmani: Radar: Well it should either create a new one or retrieve the old one..
[23:29:45] jancel: has joined #RubyOnRails
[23:34:19] dalbuschat: has joined #RubyOnRails
[23:34:35] Leepoff: has joined #RubyOnRails
[23:36:05] Darmani: Radar: https://gist.github.com/mfifth/c4ed74336aca3abbbe4df4044466d78e
[23:36:16] Darmani: It looks like it actually retrieves an object
[23:36:34] Radar: Darmani: As I said before, it's because the create action is returning an array of conversations for Conversation.between
[23:37:32] Darmani: Radar: Ah okay. At least that points me in the right direction ^^
[23:39:38] lightt: has joined #RubyOnRails
[23:40:00] alotofnoodles: has joined #RubyOnRails
[23:41:13] Cohedrin: has joined #RubyOnRails
[23:42:13] startupality: has joined #RubyOnRails
[23:42:53] phrozen77: has joined #RubyOnRails
[23:47:48] Markhor1991: has joined #RubyOnRails
[23:50:00] polyidus: has joined #RubyOnRails