« Back to channel list

#RubyOnRails - 29 June 2016

« Back 1 day Forward 1 day »
[00:03:08] croberts: has joined #RubyOnRails
[00:04:02] blackmesa: has joined #RubyOnRails
[00:08:21] jmignault: has joined #RubyOnRails
[00:11:24] jenrzzz: has joined #RubyOnRails
[00:11:24] Hobogrammer: has joined #RubyOnRails
[00:12:17] dannyh: has joined #RubyOnRails
[00:15:45] Axilla: has joined #RubyOnRails
[00:16:14] l4v2: has joined #RubyOnRails
[00:17:10] djbkd: has joined #RubyOnRails
[00:21:11] macsteps: has joined #RubyOnRails
[00:23:23] dannyh: has joined #RubyOnRails
[00:23:30] tego101: has joined #RubyOnRails
[00:24:14] tego101: has joined #RubyOnRails
[00:24:38] B1n4r10: has joined #RubyOnRails
[00:24:44] joaumg: has left #RubyOnRails: ("WeeChat 1.0.1")
[00:39:07] nettoweb: has joined #RubyOnRails
[00:39:22] macsteps: has joined #RubyOnRails
[00:40:17] dc4: has joined #RubyOnRails
[00:42:39] evansbee: has joined #RubyOnRails
[00:50:31] hahuang61: has joined #RubyOnRails
[00:53:47] SteenJobs: has joined #RubyOnRails
[00:53:52] dc4: has joined #RubyOnRails
[00:54:57] diegoviola: has joined #RubyOnRails
[00:55:52] dannyh: has joined #RubyOnRails
[00:56:46] banisterfiend: has joined #RubyOnRails
[00:56:46] banisterfiend: has joined #RubyOnRails
[00:58:41] whathappens: has joined #RubyOnRails
[00:59:00] banisterfiend: has joined #RubyOnRails
[00:59:44] banisterfiend: has joined #RubyOnRails
[01:00:17] arnonhongklay: has joined #RubyOnRails
[01:01:10] jhack: has joined #RubyOnRails
[01:04:16] jenrzzz: has joined #RubyOnRails
[01:05:32] one_zero: has joined #RubyOnRails
[01:06:27] pilne: has joined #RubyOnRails
[01:10:24] Ropeney: has joined #RubyOnRails
[01:11:45] webdestroya: has joined #RubyOnRails
[01:12:00] rubyonrailed: has joined #RubyOnRails
[01:12:43] B1n4r10: has joined #RubyOnRails
[01:13:28] asheinfeld: has joined #RubyOnRails
[01:17:09] sevenseacat: has joined #RubyOnRails
[01:17:57] User458764: has joined #RubyOnRails
[01:18:28] diegoviola: has joined #RubyOnRails
[01:18:45] DoctorMonocular: has anyone looked at the mbox format?
[01:18:56] DoctorMonocular: I just downloaded a gmail archive in the mbox format they provide
[01:19:02] adam12: Sure, before jumping ship to Maildir a decade+ ago :)
[01:19:20] DoctorMonocular: which looks like a plain text and everything, but also all the from addresses are weird
[01:19:27] DoctorMonocular: they aren't real, they are all like 3324523452352345@xxx
[01:19:32] DoctorMonocular: like they are deliberately cleaned
[01:19:48] adam12: That's abnormal, afaik
[01:20:36] Oliphaunte: has joined #RubyOnRails
[01:20:48] Guest_: has joined #RubyOnRails
[01:21:43] DoctorMonocular: ah ok, wait, the mobx file has the addresses, the mbox gem I'm using to parse the file is maybe to blame
[01:22:20] jmignault: has joined #RubyOnRails
[01:22:36] DoctorMonocular: yeah, the headers have those weird ones @xxx, but the data is still there with the correct info, I think the gem just does it wrong
[01:22:56] DoctorMonocular: which is inconvenient, since now I have to manually parse this shit :(
[01:24:19] pilne: has joined #RubyOnRails
[01:27:03] crystal77: has joined #RubyOnRails
[01:28:17] crystal77: has joined #RubyOnRails
[01:34:20] evansbee: has joined #RubyOnRails
[01:36:41] adam12: DoctorMonocular: Can you fork it and fix the regexp?
[01:36:53] adam12: DoctorMonocular: What gem is it?
[01:37:07] DoctorMonocular: eh, I've already done well enough parsing it manually with a sort of clever regex string scan thing
[01:37:13] DoctorMonocular: mbox is the gem's name
[01:37:33] DoctorMonocular: the problem with the regex is that I lose the ability to filter by sent date as easily
[01:37:39] DoctorMonocular: also have to do that manually
[01:42:48] d08z: has joined #RubyOnRails
[01:44:04] d08z: hi, lets say i have a Country model and a City model, which belongs_to country... What happens if i do this: c = City.new; c.country_id = 42; <-- does assigning the foreign key will automagically create the c.country association?
[01:46:56] sevenseacat: try it and see
[01:47:17] d08z: ...im on my cell
[01:47:30] d08z: on the bus
[01:47:45] sevenseacat: then try it when you get access to a computer :)
[01:47:56] d08z: well do you knwo the answer?
[01:48:23] d08z: ok and you wont tell me because ... ?
[01:48:45] sevenseacat: because its something simple you can try for yourself and teach yourself the answers
[01:48:51] sevenseacat: instead of always relying on others
[01:49:04] d08z: im willing to pay in bitcoins
[01:50:37] whathappens: has joined #RubyOnRails
[01:52:27] sevenseacat: d08z: !rule12
[01:52:27] helpa: d08z: Do not PM members of the channel without first asking if that is OK.
[01:52:41] sevenseacat: d08z: I wrote a book teaching Rails, you're welcome to purchase it.
[01:52:46] 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
[01:55:16] jmignault: has joined #RubyOnRails
[01:56:27] whathappens: has joined #RubyOnRails
[01:57:02] B1n4r10: has joined #RubyOnRails
[01:57:30] SteenJobs: yikes. building the ability for payments to be charged/made in installations is not as quick as i thought it would be
[01:57:56] Rodya_: has joined #RubyOnRails
[01:58:10] sevenseacat: guess d08z didn't want to pay actual money after all
[02:00:06] adam12: That rule12 looks handy
[02:00:09] adam12: I'll have to remember that
[02:00:14] adam12: Is there a list of commands somewhere?
[02:01:47] nofxx: SteenJobs, it's installations or installments? english not my mother tongue
[02:02:16] SteenJobs: totally meant installments haha
[02:02:34] SteenJobs: i’ve been using both those words frequently enough that i switched them ha
[02:02:52] nofxx: SteenJobs, haha, good... it's correct in our system here =D
[02:03:24] nofxx: there's installment and recurrence... the later being the boring one
[02:03:41] nofxx: diff: you can chancel parcel value in recurrent
[02:03:47] nofxx: change parcel*
[02:03:59] SteenJobs: yea, recurrence stripe handles anyway and would be simple to do
[02:04:32] SteenJobs: i was gonna use stripe subscriptions to do installments, but we’re handling managed accounts, so payments between two third parties, and you can’t supply an account for the destination parameter with managed accounts
[02:06:06] dnrce: has joined #RubyOnRails
[02:07:17] dnrce: has joined #RubyOnRails
[02:12:55] dnrce: has joined #RubyOnRails
[02:14:48] dnrce_: has joined #RubyOnRails
[02:17:56] agent_white: has joined #RubyOnRails
[02:19:29] agent_white: Evenin' folks
[02:22:23] Parker0: has joined #RubyOnRails
[02:24:02] eserror: has joined #RubyOnRails
[02:24:12] okdas: has joined #RubyOnRails
[02:24:12] okdas: has joined #RubyOnRails
[02:26:45] Rodya_: has joined #RubyOnRails
[02:26:45] rafaelfranca: has joined #RubyOnRails
[02:28:31] chouhoulis: has joined #RubyOnRails
[02:37:01] AdamOnRails: has joined #RubyOnRails
[02:38:27] arthurl: has joined #RubyOnRails
[02:38:27] AdamOnRails: So today's question is.... I have Site has many Products through Shortlisted_Products. Shortlisted_Products has an attribute "foobar." How do access that attribute through my Site model?
[02:38:41] AdamOnRails: Eg. I want to do like @site.products.foobar
[02:38:56] nertzy: has joined #RubyOnRails
[02:39:08] AdamOnRails: I'm missing something.
[02:39:16] sevenseacat: yes - you cannot do that
[02:39:42] sevenseacat: you would want to access the variable on each of @site.shortlisted_products
[02:41:09] SteenJobs: why not @site.products.first.foobar?
[02:41:12] SteenJobs: or .second, etc.
[02:41:29] sevenseacat: because the attribute is on the join model, not the product
[02:41:58] SteenJobs: oh yea i read that as Products
[02:42:07] SteenJobs: i guess i assumed the join model would only have FKs
[02:42:15] AdamOnRails: thought that might be the case, cheers!
[02:42:28] sevenseacat: if it only has FKs, theres no need for it to exist - use habtm instead
[02:42:54] SteenJobs: well some times you would still need thru no?
[02:43:10] sevenseacat: if you want t o have data on the joining model
[02:43:48] SteenJobs: like i have a Portfolio class which has_many visual_styles, but the user can only add visual_styles to their Portfolio from a prepopulated list of visual_style_options
[02:44:10] SteenJobs: i guess you could use habtm there too
[02:44:35] AdamOnRails: What good is having attributes on the join model if I can't access them through the parent models?
[02:44:42] SteenJobs: hmm. i wonder why i did that. considering i just used habtm for a new model.
[02:44:52] AdamOnRails: Thought that was the whole idea of a join model with has-many / through
[02:45:18] sevenseacat: well the attributes on the join model are for the specific combination of models on either side of the association
[02:45:20] pvertenten: has joined #RubyOnRails
[02:45:26] sevenseacat: so accessing them from either one of the sides doesnt make much sense
[02:46:02] arooni-mobile: has joined #RubyOnRails
[02:46:29] sevenseacat: otherwise you'd have to do something like @site.products.shortlisted_products.find_by(site_id: @site).foobar
[02:46:31] arooni-mobile: has left #RubyOnRails: ()
[02:46:38] sevenseacat: (which is pretty obviously silly)
[02:49:04] sevenseacat: actually no that wouldnt even work
[02:49:13] sevenseacat: it would have to be even crazier
[02:50:31] AdamOnRails: does find_by return a single object OR an array, depending on what it finds?
[02:50:55] sevenseacat: find_by only ever returns one object (or nil)
[02:51:15] wethu: has joined #RubyOnRails
[02:51:19] sevenseacat: `where` will always return an array, but it may be empty or have only one element
[02:51:34] sevenseacat: (well, it returns an AR::Relation, but thats array-like)
[02:51:35] AdamOnRails: Yup, sweet. I've been using .where().first..... seemed dumb haha
[03:04:33] mozzarella: has joined #RubyOnRails
[03:07:45] justrohu: has joined #RubyOnRails
[03:09:42] Oliphaunte: has joined #RubyOnRails
[03:11:06] Parker0: has joined #RubyOnRails
[03:11:09] DoctorMonocular: has joined #RubyOnRails
[03:14:02] B1n4r10: has joined #RubyOnRails
[03:14:11] spion: has joined #RubyOnRails
[03:16:38] PotatoChipz: has joined #RubyOnRails
[03:18:29] dc4: has joined #RubyOnRails
[03:20:01] braincrash: has joined #RubyOnRails
[03:21:18] k3rn31: has joined #RubyOnRails
[03:27:24] Oliphaunte: has joined #RubyOnRails
[03:28:45] mozzarella: has joined #RubyOnRails
[03:30:08] PotatoChipz: has joined #RubyOnRails
[03:35:04] wethu: has joined #RubyOnRails
[03:35:29] jyraff: has joined #RubyOnRails
[03:39:54] wldcordeiro: has joined #RubyOnRails
[03:45:02] wethu: has joined #RubyOnRails
[03:48:02] crankharder: has joined #RubyOnRails
[03:52:09] rubyonrailed: has joined #RubyOnRails
[03:57:46] PotatoChipz: has joined #RubyOnRails
[03:59:17] banisterfiend: has joined #RubyOnRails
[04:00:24] DoctorMonocular: has joined #RubyOnRails
[04:02:54] duncannz: has joined #RubyOnRails
[04:03:37] duncannz: has joined #RubyOnRails
[04:03:53] workmad3: has joined #RubyOnRails
[04:04:38] duncannz: has joined #RubyOnRails
[04:04:46] Guest_: has joined #RubyOnRails
[04:05:18] quazimodo: has joined #RubyOnRails
[04:07:43] jeromelanteri: jhass, yes, i better understand devise and mailing protocol needs. But an other question you may know the answer i think: i would like to use dkim/spf/dmarc for have my email messages sended to not fall in spam mails boxes. But i think it should be not possible (because of keys regenerations) to use together: letsencrypt and DKIM technologies. Does that thinking is correct ?
[04:08:48] zave: has joined #RubyOnRails
[04:09:37] agent_white: has joined #RubyOnRails
[04:10:02] djbkd: has joined #RubyOnRails
[04:10:42] Oliphaunte: has joined #RubyOnRails
[04:14:00] Oliphaun_: has joined #RubyOnRails
[04:16:29] PotatoChipz: has joined #RubyOnRails
[04:17:12] roamingdog: has joined #RubyOnRails
[04:19:16] jyraff: has joined #RubyOnRails
[04:23:15] quazimodo: has joined #RubyOnRails
[04:24:47] emiltin: has joined #RubyOnRails
[04:33:10] Devalo: has joined #RubyOnRails
[04:35:43] alfiemax: has joined #RubyOnRails
[04:37:37] AntiSpamMeta: has joined #RubyOnRails
[04:43:44] PotatoChipz: has joined #RubyOnRails
[04:45:01] SteenJobs: has joined #RubyOnRails
[04:54:21] rubyonrailed: has joined #RubyOnRails
[04:56:30] jmignault: has joined #RubyOnRails
[04:56:48] k3rn31: has joined #RubyOnRails
[04:59:49] Oliphaunte: has joined #RubyOnRails
[05:04:14] FLeiXiuS: has joined #RubyOnRails
[05:04:18] FLeiXiuS: has joined #RubyOnRails
[05:04:43] FLeiXiuS: Do before_actions get called when validations fail and a render :action is called?
[05:05:43] arnonhongklay: has joined #RubyOnRails
[05:07:06] FLeiXiuS: sevenseacat, Thanks, trying to find a way to not duplicate too much code
[05:14:18] SteenJobs: has joined #RubyOnRails
[05:16:46] dc4: has joined #RubyOnRails
[05:22:30] gusrub: has joined #RubyOnRails
[05:25:57] rvanlieshout: has joined #RubyOnRails
[05:33:15] pawnbox: has joined #RubyOnRails
[05:33:47] pawnbox: has joined #RubyOnRails
[05:39:16] DoctorMonocular: has joined #RubyOnRails
[05:45:17] partialTerror: has joined #RubyOnRails
[05:45:44] xall: has joined #RubyOnRails
[05:45:46] Hyuk: has joined #RubyOnRails
[05:46:49] joowh85: has joined #RubyOnRails
[05:54:13] alfiemax: has joined #RubyOnRails
[05:56:42] Leepoff: has joined #RubyOnRails
[05:57:24] Dimik: has joined #RubyOnRails
[05:58:16] arnonhongklay: has joined #RubyOnRails
[06:01:09] arnonhongklay: has joined #RubyOnRails
[06:04:40] upsell5: has joined #RubyOnRails
[06:06:35] rafaelfranca: has joined #RubyOnRails
[06:06:50] xploshioon: has joined #RubyOnRails
[06:08:29] jbd70: has joined #RubyOnRails
[06:09:01] AnoHito: has joined #RubyOnRails
[06:10:02] pollardj: has joined #RubyOnRails
[06:10:37] pawnbox: has joined #RubyOnRails
[06:12:37] yfeldblum: has joined #RubyOnRails
[06:14:48] xall: has joined #RubyOnRails
[06:14:53] banjara: has joined #RubyOnRails
[06:15:13] Hyuk: has joined #RubyOnRails
[06:16:04] ur5us: has joined #RubyOnRails
[06:18:15] rubyonrails902: has joined #RubyOnRails
[06:21:35] solars: has joined #RubyOnRails
[06:26:58] dminca: has joined #RubyOnRails
[06:30:17] harfangk: has joined #RubyOnRails
[06:31:55] netzfisch: has joined #RubyOnRails
[06:33:03] conta: has joined #RubyOnRails
[06:36:57] rubyonrailed: has joined #RubyOnRails
[06:39:49] dionysus69: has joined #RubyOnRails
[06:45:42] snoobydoo: has joined #RubyOnRails
[06:46:00] GoranPavlovic: has joined #RubyOnRails
[06:47:44] snoobydoo: Has anyone come across this weird issue where http://localhost works and http://<LocalIP> doesnt work? I know this isn't a rails issue - just wondering if anybody has encountered this before
[06:48:04] alfiemax: what is local ip?
[06:48:36] sevenseacat: I'd be surprised if your ISP opened your local IP
[06:48:37] snoobydoo: The LAN IP that my router assigns to my computer eg: 192.168.x.x
[06:48:47] FLeiXiuS: snoobydoo, add -b to your rails server
[06:48:54] joowh85: has joined #RubyOnRails
[06:49:12] Pazician: has joined #RubyOnRails
[06:49:12] Pazician: has joined #RubyOnRails
[06:50:32] DoubleMalt: has joined #RubyOnRails
[06:50:39] snoobydoo: FLeiXiuS: That doesn't help because - I'm trying to connect to my dev server from an iOS app on the phone, and i can't use localhost there - so I've to stick to the LAN IP which doesn't seem to work
[06:51:32] sevenseacat: ACTION tilts head to the side
[06:51:44] pawnbox: has joined #RubyOnRails
[06:51:59] tego101: has joined #RubyOnRails
[06:52:05] sevenseacat: ACTION tries tilting head the other way
[06:52:36] snoobydoo: ACTION wonders if his english is that bad
[06:53:01] sevenseacat: so, does your router allow connections on port 80?
[06:53:36] joowh85: rails s -b
[06:55:03] sevenseacat: snoobydoo: if you're going to reject suggestions, please provide useful feedback
[06:55:23] sevenseacat: 'doesn't work' also needs some elaboration
[06:56:04] l4v2: has joined #RubyOnRails
[06:56:07] snoobydoo: sevenseacat: It doesn't allow connections on port 80. By 'doesn't work' I mean I get a Could not connect to server error
[06:57:07] FLeiXiuS: snoobydoo, I dont think you understand what we were trying to tell you to do
[06:57:32] joowh85: snoobydoo: Are you running a app on non-root user?
[06:58:09] rvanlieshout: snoobydoo: are you trying to use this for production services?
[06:58:53] joowh85: snoobydoo: Maybe this will help. http://serverfault.com/questions/112795/how-can-i-run-a-server-on-linux-on-port-80-as-a-normal-user
[06:59:11] rvanlieshout: if so, don't use 'rails server'
[06:59:26] dminuoso: has joined #RubyOnRails
[06:59:34] arBmind: has joined #RubyOnRails
[06:59:50] snoobydoo: Okay. Let me explain again: I have a rails server running on localhost - which works. I'm trying to make an iOS app talk to my dev server before deploying it to make sure it works. But unfortunately, I cannot use 'localhost' on the app as it refers to the local machine (the app in this case), so I'm trying to use the Local LAN IP(192.168.x.x) because both my phone and computer are on the same
[06:59:57] snoobydoo: network - so I assume that would work
[07:00:20] sevenseacat: so did you try the suggestions that were provided?
[07:00:28] helpa: http://i.imgur.com/tyViD.gif
[07:00:36] KevinSjoberg: has joined #RubyOnRails
[07:00:43] sevenseacat: or did you just want to explain why they wouldnt work without trying them
[07:01:18] dc4: has joined #RubyOnRails
[07:01:50] snoobydoo: joowh85: Yes, I'm running it as a non-root user on the laptop. Also, thanks for the link, let me look that up!
[07:02:18] d0nn1e: has joined #RubyOnRails
[07:03:23] dminuoso: snoobydoo: a) make sure you don't bind your webserver to localhost and b) make sure the computer with the webservers firewall is configured properly (if any)
[07:04:39] dminuoso: Oh, I just realized I might have stepped on a mine right there..
[07:04:46] snoobydoo: dminuoso: Thanks! How do I make sure the webserver doesn't bind to localhost? When I do `rails s` it automatically binds it to localhost, or am I getting this wrong? Also, I've tried turning off the firewall and that doesnt seem to help
[07:05:44] comrad: has joined #RubyOnRails
[07:05:47] dminuoso: snoobydoo: That assumption is entirely correct.
[07:06:09] dminuoso: snoobydoo: You can either configure rails to listen on all interfaces, or just on a specific ip address.
[07:06:16] sevenseacat: dminuoso: no no, continue :D
[07:06:20] sevenseacat: ACTION sees where this is going
[07:07:29] pawnbox: has joined #RubyOnRails
[07:07:40] aganov: has joined #RubyOnRails
[07:07:48] FLeiXiuS: I'm pretty sure I told him how to mak eit bind to all interfaces earlier
[07:08:15] dminuoso: You did indeed, though I think it might have been more helpful to point him to: rails s -h
[07:08:31] dminuoso: If you don't know the details, a -b might seem rather magical.
[07:08:48] dan: has joined #RubyOnRails
[07:09:36] User458764: has joined #RubyOnRails
[07:09:50] snoobydoo: Thanks dminuoso. I didn't really understand what -b did. I'm going to try and see if that works.
[07:10:18] dminuoso: snoobydoo: Hint by the way, localhost just means usually, which is your loopback address (not available the the outside world)
[07:10:38] sevenseacat: "it doesnt help" "did you try it" "no"
[07:10:53] finnnnnnnnnnn: has joined #RubyOnRails
[07:11:01] dminuoso: sevenseacat: You seem to need a massage. :-)
[07:11:11] sevenseacat: are you volunteering?
[07:11:38] mark_661: has joined #RubyOnRails
[07:12:00] Leepoff: has joined #RubyOnRails
[07:12:04] snoobydoo: dminuoso: Sadly, I know that. All, and localhost work. I was just trying to connect to the server from the app (which is on the same local network as the server is)
[07:12:17] snoobydoo: Anyway, thanks you guys. I'll figure it out!
[07:13:17] srinidhi: has joined #RubyOnRails
[07:13:21] blackhuey: has joined #RubyOnRails
[07:15:00] dminuoso: sevenseacat: I'm not sure you would want me as your masseur. I have a tendency to apply joint locks and triangle chokes when interacting with people.
[07:16:10] snoobydoo: So, I did `rails server -b 192.168.x.x` and that worked. Thanks again, dminuoso!
[07:16:37] srinidhi: has joined #RubyOnRails
[07:16:53] liquid-silence: has joined #RubyOnRails
[07:19:02] Synthead: has joined #RubyOnRails
[07:21:21] exadeci: has joined #RubyOnRails
[07:21:26] harfangk: has joined #RubyOnRails
[07:21:32] Synthead: has joined #RubyOnRails
[07:25:02] alfiemax: quick question
[07:25:12] alfiemax: https://gist.github.com/alfie-max/45aab2f77e4ffc1144abfc79d30e9184
[07:25:23] alfiemax: this is for my rails api app
[07:26:04] alfiemax: but whatever i seem to try, the rules field which is an array is not returned in the response
[07:26:56] dminuoso: alfiemax: If you would like us to understand the problem you have to gist more than that.
[07:27:05] dminuoso: All I see is a random method with absolutely no context how it is used.
[07:27:08] alfiemax: what more would you requre?
[07:27:33] sevenseacat: that looks like strong parameters syntax which i dont think is the same as what as_json uses
[07:28:00] alfiemax: hmm, i thought it was the same
[07:28:00] ejnahc: has joined #RubyOnRails
[07:28:01] dminuoso: alfiemax: Anything that shows what you are doing.
[07:28:10] dminuoso: Controllers and all related and used parts would be a great start.
[07:29:07] sevenseacat: alfiemax: what is `rules`?
[07:29:18] alfiemax: an array or string,
[07:29:42] alfiemax: nvm, fixed it
[07:30:12] alfiemax: problem was that, since it was an array field, it should be passed as the last one.
[07:30:29] alfiemax: and it was no longer the last one because i was merging other fields
[07:31:12] xall: has joined #RubyOnRails
[07:31:56] Ergo: has joined #RubyOnRails
[07:32:11] edwinvdgraaf: has joined #RubyOnRails
[07:35:52] agit0: has joined #RubyOnRails
[07:37:23] pawnbox: has joined #RubyOnRails
[07:40:00] darutoko: has joined #RubyOnRails
[07:41:03] PotatoChipz: has joined #RubyOnRails
[07:43:48] ngw: has joined #RubyOnRails
[07:44:02] dannyguk: has joined #RubyOnRails
[07:44:17] FLeiXiuS: How are you guys handling jquery validations on nested form attributes?
[07:44:37] FLeiXiuS: I should mention dynamic nested form *
[07:45:10] rvanlieshout: i don't use client side validations
[07:45:15] FLeiXiuS: And by nested, I mean nested attributes :-P
[07:45:20] sevenseacat: no idea how guys handle things like that
[07:45:23] rvanlieshout: cause you'll always need server side too.. and don't want to have them in there twice
[07:45:31] dminuoso: sevenseacat: Do you think it's a gender issue?
[07:45:40] ur5us: has joined #RubyOnRails
[07:45:42] sevenseacat: maybe, I don't know
[07:45:56] sevenseacat: seems oddly specific to ask how guys handle the problem
[07:46:23] FLeiXiuS: Should I have asked the men in here instead ;-)
[07:46:31] FLeiXiuS: The manliest of men.
[07:46:39] sevenseacat: well if you like
[07:47:41] FLeiXiuS: Let's ask another question - since I'd rather keep it server side.
[07:47:43] sevenseacat: the point was more than there's not really a point to using gendered language
[07:48:05] sevenseacat: I mean, guys would handle coding problems the same as girls and any other gender also
[07:48:17] dminuoso: sevenseacat: That is an assumption!
[07:48:19] FLeiXiuS: sevenseacat, is that really how you interpreted that sentence?
[07:48:50] dminuoso: sevenseacat: Luckily programming code is typed with keyboards, otherwise your code would look very girly with loops on the G's. :-)
[07:48:51] sevenseacat: dminuoso: hmm, you're right
[07:48:52] alfiemax: has joined #RubyOnRails
[07:49:04] sevenseacat: and love hearts dotting the i's
[07:49:29] FLeiXiuS: sevenseacat, I'm actually disappointed your fonts don't already do that.
[07:49:45] FLeiXiuS: Shame. Shame.
[07:49:53] FLeiXiuS: For the GOT fans ^
[07:50:05] Pazician: has joined #RubyOnRails
[07:50:05] Pazician: has joined #RubyOnRails
[07:50:37] triangles: has joined #RubyOnRails
[07:50:44] dminuoso: sevenseacat: Honestly, that is one thing I have never understood, why girls usually have a distinctly different handwriting.
[07:51:02] sevenseacat: everyone has different handwriting
[07:51:28] sevenseacat: better question might be, why do tradespeople and doctors always have freaking terrible handwriting
[07:51:32] dminuoso: If you go to school it is very easy to recognize a girls handwriting more often than not though.
[07:51:35] FLeiXiuS: Women specifically have better precision at an earlier age.
[07:51:55] FLeiXiuS: It has somethng to do with left/right brain connections, etc etc,
[07:52:09] FLeiXiuS: Men over time develope it but by that time we've already induced a bad habbit
[07:53:24] Leepoff: has joined #RubyOnRails
[07:55:37] Pazician: has joined #RubyOnRails
[07:55:38] solars: has joined #RubyOnRails
[07:56:40] dminuoso: sevenseacat: My current theory is that it has got to do with education, how a girl learns to fit into the role of a unicorn riding princess with pink dresses - and such storybooks are probably more likely to depict such handwriting.
[07:56:57] dminuoso: (And then it's kids just copying what they see)
[07:57:16] dminuoso: Or girls just have a "girly typewriting gene"
[07:57:29] evansbee: has joined #RubyOnRails
[08:02:28] adre: has joined #RubyOnRails
[08:03:34] liquid-silence: has joined #RubyOnRails
[08:03:49] dc4: has joined #RubyOnRails
[08:08:34] nickjj: has joined #RubyOnRails
[08:11:08] jsrn: has joined #RubyOnRails
[08:11:34] alfiemax: has joined #RubyOnRails
[08:12:03] edwinvdgraaf: has joined #RubyOnRails
[08:12:43] ahtik: has joined #RubyOnRails
[08:16:40] lxsameer: has joined #RubyOnRails
[08:17:14] liquid-silence: has joined #RubyOnRails
[08:19:19] ych: has joined #RubyOnRails
[08:24:44] SteenJobs: has joined #RubyOnRails
[08:26:12] weckl: has joined #RubyOnRails
[08:26:52] weckl: has joined #RubyOnRails
[08:27:28] weckl: has joined #RubyOnRails
[08:28:05] weckl: has joined #RubyOnRails
[08:28:40] weckl: has joined #RubyOnRails
[08:29:19] weckl: has joined #RubyOnRails
[08:29:52] weckl: has joined #RubyOnRails
[08:30:28] weckl: has joined #RubyOnRails
[08:31:31] weckl: has joined #RubyOnRails
[08:32:03] mikecmpbll: has joined #RubyOnRails
[08:32:05] weckl: has joined #RubyOnRails
[08:33:54] kitsuneyo: has joined #RubyOnRails
[08:36:31] harfangk: has joined #RubyOnRails
[08:40:35] JamieD: has joined #RubyOnRails
[08:41:45] liquid-silence: has joined #RubyOnRails
[08:42:18] snowy: has joined #RubyOnRails
[08:42:28] arBmind: has joined #RubyOnRails
[08:46:03] yfeldblum: has joined #RubyOnRails
[08:47:10] jenrzzz: has joined #RubyOnRails
[08:52:26] kitsuneyo: are the values of a boolean field true and false, or 0 and 1?
[08:52:40] ayonkhan: has joined #RubyOnRails
[08:52:41] kitsuneyo: this article says 0 and 1, but a comment says that doesn't work: https://github.com/rails/rails/issues/18868
[08:52:49] defsdoor: has joined #RubyOnRails
[08:53:00] kitsuneyo: ehh wrong link, this one: http://www.larshaendler.com/2015/10/28/add-boolean-column-with-default-to-existing-table/
[08:53:13] dminuoso: kitsuneyo: That depends on your database adapter.
[08:53:17] Guest_: has joined #RubyOnRails
[08:53:22] JamieD: has joined #RubyOnRails
[08:53:28] edwinvdgraaf: has joined #RubyOnRails
[08:53:30] kitsuneyo: dminuoso, i see, sounds awkward
[08:53:45] dminuoso: kitsuneyo: Well, some databases may not even have boolean fields - for example Oracle.
[08:53:49] kitsuneyo: i'm using pg
[08:54:23] dminuoso: kitsuneyo: You linked an issue regarding mysql2 :-)
[08:54:41] kitsuneyo: lol yeah i said that was the wrong link
[08:54:53] dminuoso: Oh, didn't spot that.
[08:55:18] B1n4r10: has joined #RubyOnRails
[08:55:21] kitsuneyo: but i guess 0 is gonna be fine, i like the sound of false better
[08:55:46] dminuoso: kitsuneyo: just create a boolean column and see what it creates. :-)
[08:56:03] dminuoso: kitsuneyo: Such things are better just tried out than asked.
[08:56:11] kitsuneyo: yeah i guess you're right
[08:56:25] kitsuneyo: i'll just set it default: false and hope it works
[08:56:38] dminuoso: Well don't hope - try it out.
[08:57:23] fox_mulder_cp: ooh. last centos6 and openvz kernel - epic. ~18 nodes don't carefully rebooted
[08:58:25] kitsuneyo: i think this goes for a lot of people in the channel, sometimes i just want to ask someone who knows since i'm learning this myself... 99% of stuff i try out myself and i appreciate the help i get here
[08:58:48] kitsuneyo: seemed to work with false anyway
[08:59:10] sevenseacat: kitsuneyo: asking for confirmation of something you've tried is one thing, asking trivial questions that you can answer yourself is another
[08:59:26] kitsuneyo: sevenseacat, it's a chat channel not a paid help desk
[08:59:28] sevenseacat: this isn't the first time this has been suggested to you
[09:00:20] sevenseacat: you're absolutely right, it's not a help desk
[09:00:33] emiltin: has joined #RubyOnRails
[09:00:50] sevenseacat: we don't get paid to sit here and answer easily googleable things
[09:00:54] kitsuneyo: you know the difference between a help desk and this? on a help desk, the staff are obliged to answer. you aren't
[09:00:58] kitsuneyo: i had googled it
[09:01:13] sevenseacat: kitsuneyo: i'll keep it in mind for future :)
[09:01:37] kitsuneyo: you should, you might get needlessly irritated less often
[09:02:55] marr: has joined #RubyOnRails
[09:05:25] beast: has joined #RubyOnRails
[09:07:14] artto: has joined #RubyOnRails
[09:09:39] TheMonster: While trying to include attributes of a nested model in JSON, I used :include => :nested_model, can I have the attribute that shows that model :nested_model_attributes instead of :nested_model ? I want the update and get to be using same JSON format
[09:09:49] fox_mulder_cp: kitsuneyo: programming = creative, experiments, such as singers, photographers.. programming as a minecraft - create, test, share/sell...
[09:12:08] antgel: has joined #RubyOnRails
[09:13:39] kitsuneyo: fox_mulder_cp ok
[09:14:24] kitsuneyo: i guess i am in the second camp when it's better to start in the first
[09:14:35] dionysus69: has joined #RubyOnRails
[09:19:01] rafaelfranca: has joined #RubyOnRails
[09:20:42] TheMonster: Solved my problem, not sure it's the best way but let me say it anyways: instead of :include I used :methods => :nested_model_attributes and defined nested_model_attributes to return nested_model
[09:20:46] patrick_star: has joined #RubyOnRails
[09:22:54] pawnbox: has joined #RubyOnRails
[09:24:12] futilegames: has joined #RubyOnRails
[09:24:35] naftilos76: has joined #RubyOnRails
[09:24:45] jenrzzz: has joined #RubyOnRails
[09:24:45] jenrzzz: has joined #RubyOnRails
[09:25:06] mozzarella: has joined #RubyOnRails
[09:25:33] futilegames: has joined #RubyOnRails
[09:28:42] harfangk: has joined #RubyOnRails
[09:30:28] jmignault: has joined #RubyOnRails
[09:31:47] jenrzzz: has joined #RubyOnRails
[09:33:29] raidiant: has left #RubyOnRails: ()
[09:36:58] hahuang65: has joined #RubyOnRails
[09:37:56] jenrzzz: has joined #RubyOnRails
[09:37:56] jenrzzz: has joined #RubyOnRails
[09:49:35] harfangk: has joined #RubyOnRails
[09:55:47] kitsuneyo: has joined #RubyOnRails
[09:55:58] User458764: has joined #RubyOnRails
[09:58:24] evansbee: has joined #RubyOnRails
[10:06:33] quazimodo: has joined #RubyOnRails
[10:08:35] tvw: has joined #RubyOnRails
[10:08:41] quazimodo: has joined #RubyOnRails
[10:08:43] quazimod1: has joined #RubyOnRails
[10:09:08] quazimodo: has joined #RubyOnRails
[10:10:20] Circuit8: has joined #RubyOnRails
[10:11:04] User458764: has joined #RubyOnRails
[10:13:01] artto: has joined #RubyOnRails
[10:13:09] Detch: has joined #RubyOnRails
[10:13:44] jyraff: has joined #RubyOnRails
[10:14:25] Tempesta: has joined #RubyOnRails
[10:16:57] fujinuma: how can I send/use a value to public/widget.js file?
[10:17:06] fujinuma: for example; <%= @site.secret %>
[10:17:47] fujinuma: I'm writing a web widget but I don't know how to inject site secret inside a file in public directory.
[10:19:27] jenrzzz: has joined #RubyOnRails
[10:19:27] jenrzzz: has joined #RubyOnRails
[10:19:58] artto: has joined #RubyOnRails
[10:20:36] fujinuma: I have something like this: http://localhost:3000/widget.js?secret=20517c13e7204945a64c5b8ac567f8a96b7a7290
[10:20:42] rickmasta: has joined #RubyOnRails
[10:20:49] fujinuma: how can I get secret inside javascript file?
[10:22:12] DoubleMalt: has joined #RubyOnRails
[10:24:00] harfangk: has joined #RubyOnRails
[10:26:04] artto_: has joined #RubyOnRails
[10:26:48] tbuehlmann: um, if you inject the secret, it's no more a secret because the client can read it
[10:27:26] dionysus69: my table is called admin_users and I cannot create object called AdminUser from console, any ideas?
[10:27:44] dionysus69: says NameError: uninitialized constant AdminUser
[10:28:08] sevenseacat: dionysus69: what your table is called is irrelevant - what is your model called?
[10:28:35] umdstu: has joined #RubyOnRails
[10:29:17] dionysus69: ohh its Admin::User
[10:29:25] emiltin: has joined #RubyOnRails
[10:29:31] dionysus69: it is namespaced ! :)
[10:29:40] sevenseacat: then thats how you instantiate it
[10:30:04] dionysus69: ok thanks :) I had forgotten model was also namespaced
[10:31:07] inder: has joined #RubyOnRails
[10:31:45] inder: can i create new app in rails 5, is it stable
[10:32:05] universa1: inder: yes, mostly
[10:33:41] dionysus69: inder: you will have trouble with certain gems though
[10:37:00] jmignault: has joined #RubyOnRails
[10:39:10] artto: has joined #RubyOnRails
[10:40:17] allcentury: has joined #RubyOnRails
[10:41:57] inder: may i konw the gems @dionysus69
[10:42:20] dionysus69: active admin for example, but I stopped using it anyways... its a waste
[10:43:10] dionysus69: but most of the gems are fine, if you are using some sketchy gem you should check it out with rails 5 before migrating to 5
[10:44:06] B1n4r10: has joined #RubyOnRails
[10:44:57] sevenseacat: its hard to have concrete support for rails 5 before rails 5 comes out.
[10:45:00] inder: what is best gem for admin dashboard
[10:45:06] JamieD: has joined #RubyOnRails
[10:46:43] joowh85: has joined #RubyOnRails
[10:48:15] rodfersou: has joined #RubyOnRails
[10:48:21] harfangk: has joined #RubyOnRails
[10:49:40] universa1: inder: write your own (generator)
[10:50:32] dc4: has joined #RubyOnRails
[10:53:58] GodFather: has joined #RubyOnRails
[10:54:12] pacMakaveli: has joined #RubyOnRails
[10:54:21] comrad: has joined #RubyOnRails
[10:59:00] comrad: has joined #RubyOnRails
[10:59:05] GodFather: has joined #RubyOnRails
[10:59:41] joowh85: has joined #RubyOnRails
[10:59:46] AlexJakeGreen: has joined #RubyOnRails
[11:02:08] dminuoso: has joined #RubyOnRails
[11:02:14] artto: has joined #RubyOnRails
[11:05:24] GodFather_: has joined #RubyOnRails
[11:10:16] artto: has joined #RubyOnRails
[11:10:30] arnonhongklay: has joined #RubyOnRails
[11:11:11] AimlessRAven: has joined #RubyOnRails
[11:11:28] AimlessRAven: when i need to style my kaminari paginators, i need to do rails g kaminari:config and there i can add styles ?
[11:11:31] AimlessRAven: is this a right way
[11:12:55] universa1: AimlessRaven: what do the kaminari docs say about that?
[11:14:02] ustrajunior: has joined #RubyOnRails
[11:14:59] hahuang65: has joined #RubyOnRails
[11:15:38] jmignault: has joined #RubyOnRails
[11:17:41] arnonhongklay: has joined #RubyOnRails
[11:19:05] kitsuneyo: has joined #RubyOnRails
[11:19:49] nettoweb: has joined #RubyOnRails
[11:21:21] GodFather: has joined #RubyOnRails
[11:21:26] bonswouar: has joined #RubyOnRails
[11:26:17] Macaveli: has joined #RubyOnRails
[11:30:50] artto: has joined #RubyOnRails
[11:31:48] AimlessRAven: universa1: yeah ill made it
[11:31:59] JamieD: has joined #RubyOnRails
[11:32:59] AmiMoench: has joined #RubyOnRails
[11:36:47] edwinvdgraaf: has joined #RubyOnRails
[11:37:24] quazimodo: has joined #RubyOnRails
[11:51:02] arnonhongklay: has joined #RubyOnRails
[11:54:16] emiltin: has joined #RubyOnRails
[11:55:14] conta: Does anyone have experience running rails 4 app on Windows Server (2012)?
[11:55:48] rvanlieshout: conta: with or without a virtual machine? :)
[11:56:26] conta: well, actually no idea. my boss is asking me to consider possibilities. I have no exp. at all
[11:57:06] pacMakaveli: Waste of money and time
[11:57:10] rvanlieshout: if you have no experience with this, don't consider it
[11:57:12] artto: has joined #RubyOnRails
[11:57:21] pacMakaveli: If you must, run it in a virtual machine or linux/osx directly
[11:57:21] rvanlieshout: runnig this on windows is not going to be easy or community supported
[11:57:59] conta: we have windows server that my boss wanna use
[11:58:01] pvertenten: has joined #RubyOnRails
[11:58:03] universa1: no clue how well supported docker is on windows server
[11:58:10] rvanlieshout: conta: that's not how this works
[11:58:13] rvanlieshout: is your boss the sysadmin?
[11:58:33] adre: has joined #RubyOnRails
[11:58:35] conta: well.. we are small company, so kinda.
[11:58:50] conta: but noone has experience to be called so
[11:59:05] rvanlieshout: then slap him in the face and tell him to wake up
[11:59:10] evansbee: has joined #RubyOnRails
[11:59:14] rvanlieshout: you don't have knowledge within your company about this
[11:59:22] rvanlieshout: then don't choose a not widely supported method
[11:59:44] JamieD: has joined #RubyOnRails
[12:00:24] conta: yeah, I was thinking about to find some list of gems that sucks on Windows and see if we are using any
[12:01:14] rvanlieshout: why this urge to run it on windows?
[12:03:04] conta: I guess money ;] we have win server for some reason already
[12:03:24] rvanlieshout: and can run virtual machines without any costs
[12:03:29] conta: should not be problem to persuade him not to run win-app. I'll look into some virtualization
[12:03:55] rvanlieshout: plus not having the knowledge will eventually cost you way more in terms of time you'll need to invest
[12:03:59] rvanlieshout: and keep investing
[12:04:20] sergio_101: has joined #RubyOnRails
[12:05:24] xhoy: is this still the best way to validate if a field is filled with a valid date?: http://stackoverflow.com/questions/2955830/checking-to-see-if-a-string-is-a-valid-date-ruby-on-rails
[12:06:05] arnonhongklay: has joined #RubyOnRails
[12:06:28] xhoy: ? (some how i would think that rails can do a check if it is a valid date? )
[12:08:28] srinidhi: has joined #RubyOnRails
[12:08:34] dminuoso: xhoy: No need for Rails to provide such functionality if Ruby already ships it.
[12:08:52] dminuoso: xhoy: Date::valid_date?
[12:10:26] harfangk: has joined #RubyOnRails
[12:10:49] artto: has joined #RubyOnRails
[12:11:38] AimlessRAven: https://gist.github.com/anonymous/a5e1272d94031c9587f8b76a62690894
[12:11:38] blackmesa: has joined #RubyOnRails
[12:11:47] AimlessRAven: why my remove button redirect me to show action
[12:11:52] AimlessRAven: in this format
[12:12:03] rvanlieshout: what remove button?
[12:12:25] AimlessRAven: rvanlieshout: https://gist.github.com/anonymous/a5e1272d94031c9587f8b76a62690894
[12:12:36] AimlessRAven: sorry wrong paste w8
[12:13:11] xhoy: mm dminuoso then i stil l need to cast it, i have html5 form with a date_field, that outputs a "2016-06-29" string, that does get stored in the DB when valid, but just simple gets ignored if not valid. I would love to get a response in my view when i entered something stupid. Now i need to Date.valid_date?("2016-06-12".split("-"))
[12:13:14] AimlessRAven: rvanlieshout: https://gist.github.com/anonymous/1b18d8da2676b4474a45c49997afdb33
[12:13:21] xhoy: isn't that something rails could do?
[12:13:21] AimlessRAven: here is my button, and he go to show action in this format
[12:13:53] xhoy: AimlessRaven: the "remove" should be 1 tab extra?
[12:14:32] dminuoso: xhoy: Casting? I think you may be talking about the wrong language.
[12:14:46] dminuoso: xhoy: While I have been known to use Fiddle to actually cast objects from one class to another, I do not think that its what you meant.
[12:14:49] rvanlieshout: AimlessRaven: check your js log when you click that link
[12:15:02] rvanlieshout: and check the app log for the request
[12:15:03] xhoy: dminuoso: well it is a string that needs to be a "date"
[12:15:30] dminuoso: xhoy: By what format?
[12:15:36] xhoy: dminuoso: "2016-06-12".split("-") => array ?
[12:15:54] dminuoso: xhoy: I meant, you said "valid date". That just means that the numbers make sense in a Date sense.
[12:16:16] xhoy: yeah sorry :)
[12:16:59] quazimodo: has joined #RubyOnRails
[12:17:16] xhoy: so i have a form, that i like to submit :) this gives me a "dateString" ("2016-06-29") i would like my model to check if it can be stored in a Date field in DB. SO i need somehow to check if i can see if its a valid 'dateString'
[12:17:30] dminuoso: xhoy: If you have some custom format, then yes you must also provide your custom deserializer.
[12:17:44] xhoy: well its de rails form default
[12:17:56] xhoy: but users can input random stuff in the view
[12:18:00] dminuoso: xhoy: That is likely to be iso8601 conform
[12:18:03] umdstu: where would be the appropriate location to call a method on each result in a relation? i need to potentially filter out some of the records
[12:18:07] rvanlieshout: xhoy: 14:08 < dminuoso> xhoy: Date::valid_date?
[12:18:39] umdstu: instead of calling .each on the set and putting ones that the method OKs into a new array
[12:18:40] xhoy: rvanlieshout: Date.valid_date?("2016-06-12".split("-")) << is the 'shortest' option then?
[12:18:47] dminuoso: xhoy: why do you think a date would not be valid?
[12:18:56] xhoy: dminuoso: since its a input field in a form
[12:19:00] dminuoso: xhoy: Note that if you parse a date into a Date object, Ruby will reject invalid dates.
[12:19:00] rvanlieshout: Date.parse then?
[12:19:05] ych: has joined #RubyOnRails
[12:19:06] rvanlieshout: i wouldn't try to parse it yourself
[12:19:36] dminuoso: xhoy: Date.iso8601(str)
[12:19:40] dminuoso: Next customer.
[12:20:31] xhoy: dminuoso: that gives the same issues as the stackquestion :)
[12:20:32] mrbubbles: has joined #RubyOnRails
[12:20:46] dminuoso: xhoy: What issues?
[12:20:51] xhoy: where i need to rescue it :)
[12:21:06] xhoy: that is why i asked if there was something "new" or "beter" since this feels a bit weird :)
[12:21:11] xhoy: http://stackoverflow.com/questions/2955830/checking-to-see-if-a-string-is-a-valid-date-ruby-on-rails <<
[12:21:13] artto: has joined #RubyOnRails
[12:21:20] universa1: hmm, if you assign it to a date/datetime column, rails will automatically parse it anyways?
[12:21:42] adre: has joined #RubyOnRails
[12:21:45] dminuoso: xhoy: Exceptions are not bad.
[12:21:46] xhoy: universa1: yeah but it will not return an error IF its an invalid string like "2016-01-aa"
[12:21:51] mrbubbles: hey folks, I have a rails project "myproject". I was going away for a bit so I copied "myproject" folder onto an SD card and did a load of stuff. When I got back I renamed the "myproject" on my desktop to "myproject-old" and then moved the newer "myproject" in it's place. HOWEVER when I am in the new "myproject" folder and generate a migration, it appears in the migrate folder of the old "myproject-old"
[12:21:51] mrbubbles: folder. Is thre a setting I need to update?
[12:21:56] nettoweb: has joined #RubyOnRails
[12:21:56] dminuoso: xhoy: Stop using mysql then.
[12:22:39] rodfersou: has joined #RubyOnRails
[12:23:11] xhoy: dminuoso: well, rails should do all validations :), AND when you try to store a string in an INT you get a nice error screen (not a simple error in the view)
[12:23:33] xhoy: so when mysql gives an error you get an 500 or something
[12:23:54] xhoy: so i still should capture it in my model to return a nice redbox that says invalid input
[12:24:08] xhoy: BUT it seems there isn't a beter /shorter way of doing this at this moment :)
[12:24:15] xhoy: so thank you all
[12:25:08] dminuoso: xhoy: Rails should not do your databases job and enforce data consistency.
[12:25:08] hardtail: has joined #RubyOnRails
[12:25:18] xhoy: dminuoso: myt data is consistend
[12:25:33] xhoy: dminuoso: but my database doesn't display nice error messages
[12:25:34] dminuoso: xhoy: "2016-01-aa" is not a consistent date.
[12:25:36] dminuoso: It is a very broken date.
[12:25:47] xhoy: yeah so it doesn't get stored
[12:25:58] xhoy: and it should draw me a nice box in the view with an error " invalid" date
[12:26:10] dminuoso: xhoy: Well that is a good argument at least. ;-)
[12:26:36] sevenseacat: https://github.com/adzap/validates_timeliness may interest you
[12:26:40] dminuoso: xhoy: Just do it like we discussed. Its fine to rely on a parse exception.
[12:26:45] xhoy: dminuoso: but it doesn't draw me the box :)
[12:26:54] xhoy: dminuoso: yeah i will :)
[12:26:56] arnonhongklay: has joined #RubyOnRails
[12:27:32] mrbubbles: grr this is infuriating :)
[12:27:39] dminuoso: xhoy: As long as exceptions remain the exceptional (pun intended) case in your code they are fine.
[12:27:45] xhoy: i still think rails should have a validate_date just like it has a numericality length etc :)
[12:27:58] dminuoso: xhoy: The problem is locales and different formats.
[12:28:05] ldnunes: has joined #RubyOnRails
[12:28:06] xhoy: well there is a to_date function for a string
[12:28:19] sevenseacat: or not, suit yourself
[12:28:25] xhoy: so there should be something can_do_a_to_date/string/int
[12:28:31] xhoy: with a true/false
[12:28:37] xhoy: sevenseacat: ofcz :)
[12:29:00] dminuoso: sevenseacat: So have you gotten that massage already?
[12:29:15] sevenseacat: dminuoso: no, but i did just eat some cake so I'm feeling much better.
[12:32:27] pawnbox: has joined #RubyOnRails
[12:32:54] B1n4r10: has joined #RubyOnRails
[12:33:24] solars: has joined #RubyOnRails
[12:34:03] umdstu: how would i call a method on each of these searches before passing off to view? `searches = current_user.image_groups.order(‘name asc’).to_json(include: { image: {only: [:name, :id]}}, methods: not_deleted)`
[12:34:13] umdstu: or rather, where
[12:35:48] denym_: has joined #RubyOnRails
[12:37:21] mrbubbles: Ah I just had to reset my binstubs :)
[12:38:22] dminuoso: umdstu: Decorators/presenters seem to be a great place for such things.
[12:38:36] dionysus69: has joined #RubyOnRails
[12:40:15] Fernando-Basso: has joined #RubyOnRails
[12:42:18] Ropeney: has joined #RubyOnRails
[12:43:45] yardenbar: has joined #RubyOnRails
[12:46:25] ahtik: has joined #RubyOnRails
[12:46:36] l4v2: has joined #RubyOnRails
[12:47:21] umdstu: the json isn’t being used in rails though, being sent to an angular UI
[12:47:28] umdstu: dminuoso:
[12:52:45] AzaToth: has joined #RubyOnRails
[12:54:25] dc4: has joined #RubyOnRails
[12:55:21] Axilla: has joined #RubyOnRails
[12:56:13] skroon: with Rake.application[:hello].invoke i'm trying to execute a rake task... which is going fine, but only the first invocation... the second time i'm just getting nil. Anyone that might know what i'm doing wrong here?
[12:57:47] dminuoso: umdstu: So?
[12:58:12] arnonhongklay: has joined #RubyOnRails
[12:58:19] dminuoso: umdstu: You have the need to take data, and prepare it for some kind of presentation (whether its to be stuffed inside a HTML view later or just some JSON object is of littl relevance)
[13:01:51] arnonhongklay: has joined #RubyOnRails
[13:02:31] aegis3121: has joined #RubyOnRails
[13:02:38] artto: has joined #RubyOnRails
[13:04:33] upsell5: has joined #RubyOnRails
[13:05:19] aegis3121: has joined #RubyOnRails
[13:07:02] ramortegui: has joined #RubyOnRails
[13:08:24] umdstu: dminuoso: then i misunderstood what you meant by decorators
[13:08:32] umdstu: time for some internetting
[13:09:02] diegoviola: has joined #RubyOnRails
[13:09:22] dminuoso: umdstu: Note you probably dont need a fully loaded decorator gem if its just a small use case. A simple POR class will be fine. :)
[13:09:34] dminuoso: Or even a module.
[13:10:30] umdstu: right, that sounds overkill. thanks for the tip
[13:11:11] evansbee: has joined #RubyOnRails
[13:11:53] kitsuneyo: has joined #RubyOnRails
[13:12:23] dblessing: has joined #RubyOnRails
[13:13:36] mdw: has joined #RubyOnRails
[13:19:19] pawnbox: has joined #RubyOnRails
[13:20:17] roamingdog: has joined #RubyOnRails
[13:23:08] allcentury: has joined #RubyOnRails
[13:24:53] jlebrech: has joined #RubyOnRails
[13:25:09] jlebrech: how can i access the request object from a model?
[13:25:39] sevenseacat: you really, really don't.
[13:26:04] jlebrech: alternative?
[13:26:11] adam12: jlebrech: usecase?
[13:26:13] rvanlieshout: jlebrech: it doesn't match how you should use MVC
[13:26:14] sevenseacat: depends why you want to do it
[13:26:52] jlebrech: i'm creating a unique per user id for use in a third party api
[13:27:09] jlebrech: a unique key
[13:27:59] jlebrech: sevenseacat: it's not that "you don't", I bloody can't and it's anoying
[13:27:59] sevenseacat: okay, and why does that require accessing the request in a model
[13:28:37] jlebrech: I need to get user agent and ip from within a model without using another gem
[13:28:55] rvanlieshout: jlebrech: i'm afraid sevenseacat is right. it's you don't
[13:28:56] rvanlieshout: not you can't
[13:29:17] sevenseacat: jlebrech: pass them into the model
[13:29:24] rvanlieshout: that's a task for the controller
[13:29:26] adre: has joined #RubyOnRails
[13:29:49] jlebrech: that was my last choise
[13:29:59] augustao: has joined #RubyOnRails
[13:30:36] jlebrech: more spaghetti code
[13:30:46] rvanlieshout: only if you make it spaghetti code
[13:31:05] rvanlieshout: accessing request context from witin a model would violate it's context
[13:31:22] augustao: i'm having some trouble with the asset pipeline
[13:31:27] jlebrech: well I just wanted a singleton class that could generate an id with useragent and ip in it.
[13:31:42] augustao: i've precompiled my assets, and while the css/js works just fine, images do not
[13:31:51] mikecmpbll: i wish there was a easy way to get a dummy view context, with all the helpers and everything accessible from the view
[13:31:55] maucar: has joined #RubyOnRails
[13:31:57] augustao: the problem is that i'm running the app under a relative url
[13:32:02] mikecmpbll: doing some seriously dodgy hacking at present :p
[13:32:02] evansbee: has joined #RubyOnRails
[13:32:11] Oliphaunte: has joined #RubyOnRails
[13:32:16] augustao: and i see that the images are served, but the request bypasses the relative root
[13:32:17] rvanlieshout: jlebrech: such stuff shouldn't be in the model
[13:32:19] augustao: what could i do?
[13:32:25] rvanlieshout: move that to a service or something simila
[13:32:32] rvanlieshout: there you can have the request context
[13:32:56] adam12: jlebrech: Have the class, pass in the request object. It's very common, and likely less brittle.
[13:33:22] jlebrech: adam12: i'm gonna just have to do that
[13:33:49] adam12: jlebrech: When you are testing, you might have a struct that quacks like the request object, so you can test your unique ID generation. It's easier to pass in a struct than to start stubbing and mocking `request`.
[13:34:14] Ropeney: has joined #RubyOnRails
[13:34:14] jlebrech: pass the request object and then build the string in every model that i pass it to. or build the string then pass it?
[13:34:39] adam12: Well, I would build the string and then pass it to the model.
[13:34:41] rickmasta: has joined #RubyOnRails
[13:34:56] adam12: user = User.new; user.unique_id = UniqueID.generate(request); user.save
[13:34:57] mikecmpbll: jlebrech : sounds ideal for a service object that encapsulates all this logic. think someone already suggested that though
[13:35:06] jlebrech: build it from application helper, then pass it :)
[13:35:46] adam12: I know it sounds like it belongs in the model, but only as far as being persisted. Generate it outside, pass it in.
[13:35:58] jlebrech: i'll do it that way, but it annoys me a bit that a tiny feature requires code in 3 files
[13:36:22] mikecmpbll: the price you pay for having sane MVC
[13:36:30] sevenseacat: when the feature is a cross-cut of the entire stack, is what happens
[13:36:34] adam12: Well you can stick it in the model if it really bothers you, but that's how OO happens. Lots of objects that collaborate.
[13:37:19] roamingdog: has joined #RubyOnRails
[13:37:47] jlebrech: is there another design pattern where you insert behaviour into an application? (not DI)
[13:39:03] diego2: has joined #RubyOnRails
[13:39:17] diego2: has joined #RubyOnRails
[13:40:31] jlebrech: I have to pass this string a second time :(
[13:40:47] jlebrech: in every class I use
[13:41:19] jlebrech: every apicall needs this string
[13:41:19] adam12: jlebrech: Can you share some code? Maybe it will give us a better idea.
[13:42:06] sevenseacat: is this string not saved with the respective model that uses it?
[13:43:46] jlebrech: I has 10 classes that make api calls and they will need this string to pin the useragent in the api that i'm using.
[13:44:03] jlebrech: these classes use a helper class to call the api
[13:44:13] rvanlieshout: let those classes use a singleton instance to call the api
[13:45:19] jlebrech: can I pass my string to that singleton from the application_controller before filter?
[13:45:33] Moeh: has joined #RubyOnRails
[13:45:58] mikecmpbll: mind threadsafety tho
[13:46:13] adre: has joined #RubyOnRails
[13:46:46] workmad3: has joined #RubyOnRails
[13:47:08] Moeh: Hey guys, I updated from rails 5 beta2 to rc2 today and it seems that skip_before_action :authenticate! in my SessionsController does not work anymore. In beta2 the action was skipped (as intended, because the user is not logged in before login), now it seems that the action is invoked.
[13:47:24] jlebrech: that one feature that changes the whole code base :(
[13:47:30] FCser: has joined #RubyOnRails
[13:47:44] rvanlieshout: true, a singleton is not threadsafe, use Thread.current to store such data, jlebrech
[13:48:04] mikecmpbll: personally i'd just pass it to wherever it's needed
[13:48:52] fmcgeough: has joined #RubyOnRails
[13:52:03] artto: has joined #RubyOnRails
[13:54:01] lupine: "I know, I'll use thread-local variables"
[13:54:04] lupine: said hardly anyone ever
[13:55:46] hardtail: rebecca how are ya? man I haven’t been here in ages
[13:55:51] GodFather: has joined #RubyOnRails
[13:56:07] arthurl: has joined #RubyOnRails
[13:56:25] roamingdog: guess that's one way to address all. guys + rebecca
[13:57:00] helpa: 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?
[13:57:11] dminuoso: Do I get a point for trying?
[13:57:18] sevenseacat: a point and a half.
[13:57:25] mikecmpbll: dminuoso : !cookie
[13:57:25] helpa: dminuoso : Congratulations! You have earned a delicious, fresh-made cookie. :)
[13:57:27] Moeh: It seems that the cause of the problems is that parameters are filtered out. If I put a breakpoint in the action I can see that params only contains controller and action but none of the actual parameters. Even though they are included in the request.
[13:57:50] sevenseacat: Moeh: got some code, logs, etc. so we can get some info about the problem? the description is kind of vague
[13:58:13] dminuoso: Moeh: Though thumbs up that you have actually actively debugged into the action. :-)
[13:58:22] Moeh: Sure, will create a gist
[14:00:00] hardtail: @roamingdog lol xD
[14:00:41] Leepoff: has joined #RubyOnRails
[14:00:45] hardtail: I’ll just say hello everyone from now on to sound less like a jackass
[14:00:59] Moeh: https://gist.github.com/Maarius/780a67ff21054600123aa2c93e924037 I hope this is enough to understand my problem
[14:01:01] asheinfeld: has joined #RubyOnRails
[14:02:51] sevenseacat: Moeh: it's not really - is that data in the body of the request, not in the params?
[14:03:49] dminuoso: Moeh: Your log though clearly show that your params do not contain what you require them to.
[14:04:56] AntiSpamMeta: has joined #RubyOnRails
[14:05:24] Moeh: http://imgur.com/zl6T910
[14:05:31] Moeh: Here is the request as seen in the browser
[14:08:05] Moeh: The weird thing is that this exact code works in rails 5 beta 1. Just verified by downgrading.
[14:08:09] dminuoso: Moeh: Use to_h to interactively look at the params.
[14:08:14] dminuoso: Inspect may not do what you expect it to.
[14:08:24] rubyonrailed: has joined #RubyOnRails
[14:08:46] agent_white: has joined #RubyOnRails
[14:08:53] agent_white: has joined #RubyOnRails
[14:09:13] aldodelgado: has joined #RubyOnRails
[14:09:20] dminuoso: Moeh: Are you running on edge?
[14:09:53] Moeh: I put "gem 'rails', '5.0.0.rc2'" in my Gemfile and did 'bundle update'.
[14:10:02] Moeh: idk if that means I am on edge?
[14:10:25] dminuoso: edge just means you're running on the master branch
[14:10:43] Moeh: Then no, not for rails itself. For some of the gems we do
[14:10:56] dminuoso: dminca: Though, inspect should still print out the get/post parameters
[14:11:17] jjg: has joined #RubyOnRails
[14:11:20] dminuoso: dminca: Do me a favour, what does params.class print?
[14:11:37] jjg: hi folks, I have a Rails5 API working well, but when a colleague attempted to setup the system, none of the database sequences are included in schema.rb. how do I ensure the indexes are created when bootstrapping the app on a fresh system?
[14:11:42] Moeh: dminuoso: You meant me? :)
[14:11:45] dminuoso: dminca: also include the full log for the request please.
[14:11:47] dminuoso: Moeh: Oh yeah.
[14:11:52] dminuoso: On all accounts.
[14:12:15] dminuoso: jjg: What database adapter are you using?
[14:12:17] sevenseacat: I don't know what the chrome inspector considers to be a 'payload'
[14:12:24] jjg: sevenseacat: postgresql
[14:12:28] sevenseacat: again, is it the request body, or actual params
[14:12:38] dminuoso: sevenseacat: Just that. HTTP payload. :-)
[14:12:51] dminuoso: Oh the request body.
[14:12:55] dminuoso: Sorry about the confusion.
[14:13:04] sevenseacat: then of course params won't include them
[14:14:07] dminca: dminuoso why are you quoting me?
[14:14:15] dminuoso: dminca: I have no idea how that happened. Pardon me.
[14:14:24] dminuoso: sevenseacat: Why?
[14:15:02] Moeh: dminuoso: Just updated the gist
[14:15:06] Moeh: Thanks for your help!
[14:15:53] dminuoso: Moeh: Im not seeing any parameters there.
[14:16:09] sevenseacat: http://stackoverflow.com/questions/14551194/how-are-parameters-sent-in-an-http-post-request
[14:16:27] sevenseacat: if you're sending json data, its not surprising they're not getting interpreted as params
[14:16:46] artto: has joined #RubyOnRails
[14:18:00] Moeh: But how is it possible that it works fine with rails 5 beta 2 and not in rc2? Any idea where I can start looking for the cause of this?
[14:18:06] Oliphaunte: has joined #RubyOnRails
[14:18:11] Moeh: Sorry, beta 1
[14:18:56] dminuoso: Moeh: Possibly because they added support for json in form data?
[14:19:08] dminuoso: Presumably I mean.
[14:19:24] sevenseacat: I don't think it would have ever worked
[14:19:44] dminuoso: Moeh: http://edgeguides.rubyonrails.org/api_app.html
[14:19:52] dminuoso: Indeed it is a feature to accomodate JSON apis in rails 5.
[14:20:22] Moeh: sevenseacat: Well, if I check out the previous Gemfile, run bundle and change nothing else, the code runs absolutely fine.
[14:20:38] sevenseacat: i dont know what the previous Gemfile is
[14:20:38] pvertenten: has joined #RubyOnRails
[14:20:43] dminuoso: Moeh: Why that particular feature might not be working in one rails 5 version but another you have to ask on the mailing lists.
[14:20:45] rafaelfranca: has joined #RubyOnRails
[14:20:45] rafaelfranca: has joined #RubyOnRails
[14:20:47] sevenseacat: and I don't know what "fine" means
[14:21:40] B1n4r10: has joined #RubyOnRails
[14:21:50] hardtail: very broad question here. I am coming back into Rails projects, should I be using Rails 5 Beta?
[14:22:16] dminuoso: Moeh: But if you really care, you can simply diff the tags 5.0.0.rc2 against 5.0.0.beta4 - then you can see the differences
[14:22:23] sevenseacat: hardtail: no.
[14:22:52] hardtail: sevenseacat: ok thanks. still too early I guess?
[14:23:04] sevenseacat: hardtail: well if you have to use Rails 5, use rc2
[14:23:10] sevenseacat: but I wouldn't recommend it, no
[14:23:50] hardtail: ok, thank you!
[14:24:37] skroon: i'm using paperclip with fog, but the url generation is so slow... is there a way to speed up the URL lookup?
[14:25:21] jmarchello: has joined #RubyOnRails
[14:25:23] Moeh: sevenseacat: This is the log for rails 5.0.0.beta1: https://gist.github.com/Maarius/780a67ff21054600123aa2c93e924037#file-rails-5-0-0-beta1
[14:26:29] Moeh: This line is interesting: 5.0.0.beta1 Processing by UsersController#forgot_password as JSON 5.0.0.rc2: Processing by UsersController#forgot_password as application/vnd.api+json
[14:27:10] sevenseacat: and what does chrome say the "payload" is for the beta1 one?
[14:28:12] Moeh: Same as before: {"data":{"attributes":{"email":"moeh@company.com"}}}
[14:28:33] Moeh: Or do you want to see the screen with the headers?
[14:28:59] eserror: has joined #RubyOnRails
[14:29:17] sevenseacat: yes, to see if there's anything different
[14:29:42] pawnbox: has joined #RubyOnRails
[14:30:23] sypheren: has joined #RubyOnRails
[14:31:27] GodFather: has joined #RubyOnRails
[14:32:29] harfangk: has joined #RubyOnRails
[14:32:47] Moeh: http://imgur.com/1pjPOsq
[14:33:45] rubyonrailed: has joined #RubyOnRails
[14:34:09] dblessing: has joined #RubyOnRails
[14:34:52] Hobogrammer: has joined #RubyOnRails
[14:34:58] workmad3: has joined #RubyOnRails
[14:35:50] tvon: has joined #RubyOnRails
[14:35:51] Sylario: has joined #RubyOnRails
[14:36:47] Sylario: I am not familiar with this version of capistrano, and it does not restart app after a deploy : https://gist.github.com/bsylvain/af4dd184ac2ea2bf9e02506031e9dff2
[14:36:54] adavia: has joined #RubyOnRails
[14:36:56] Moeh: sevenseacat: I think I found the issue. See https://gist.github.com/Maarius/780a67ff21054600123aa2c93e924037#file-mime_types-rb This piece of code we had commented out for 5.0.0.beta1 because otherwise the parameters were filtered out. Now I uncommented it and tried again with 5.0.0.rc2 and now the params are not filtered out anymore and the code works fine again.
[14:37:36] Moeh: Puuh, that was not really obvious.. But I guess has to be expected when you use beta versions :/ Anyway, thanks a lot for taking the time and helping out.
[14:38:52] tvw: has joined #RubyOnRails
[14:39:23] jjg: I have a Rails5 API working well on postgres, but when a colleague attempted to setup the system, none of the database sequences are included in schema.rb. how do I ensure the indexes are created when bootstrapping the app on a fresh system?
[14:39:55] jjg: when I created the app from scratch, the indexes were created, so seems like rails doesn’t create schema.rb with them included
[14:40:33] sevenseacat: the database sequences, as in for the primary keys and the like? they dont need to be in schema.rb
[14:40:36] DaniG2k: has joined #RubyOnRails
[14:40:57] jjg: sevenseacat: they aren’t being created with db:setup
[14:41:06] jjg: sevenseacat: I’ve never had this issue before either
[14:41:11] DaniG2k: anyone know of a good job portal for the US?
[14:41:20] DaniG2k: particularly jobs in NYC or San Fran
[14:41:33] centrx: has joined #RubyOnRails
[14:41:36] DaniG2k: I want to try getting a job as a Rails dev in the US
[14:41:47] sevenseacat: jjg: so... what does your db havefor the fk it creates?
[14:41:47] jahbrews1i: has joined #RubyOnRails
[14:42:40] jjg: sevenseacat: on the “new” system, it just has id - integer - not null .. my database has “not null default nextval('users_id_seq'::regclass)”
[14:43:04] chouhoulis: has joined #RubyOnRails
[14:43:05] jjg: so when our database seeds are being created, there is a constraint violation on the id, because the sequence isn’t setup
[14:43:09] sevenseacat: so it doesnt set up the autoincrementing id at all? thats really weird
[14:43:14] jjg: correct!
[14:43:15] jjg: so weird
[14:43:24] shinnya: has joined #RubyOnRails
[14:44:01] Oliphaunte: has joined #RubyOnRails
[14:44:13] sevenseacat: jjg: how are you creating the table in your migration?
[14:45:06] jjg: my colleague is going to post a gist link with the table migration
[14:46:04] jahbrews1i: here is the gist: https://gist.github.com/JahBrewski/9901ddd03743665079607078a02d7c11
[14:46:37] jjg: sevenseacat: ^^
[14:47:10] sevenseacat: hmm, nothing out of the ordinary
[14:47:44] jahbrews1i: sevenseacat: nope.. I've never had this issue before. The rails code all seems fine.
[14:49:03] ezebe: has joined #RubyOnRails
[14:51:34] joelwallis: has joined #RubyOnRails
[14:51:59] ezebe: hi all, i'm having a funny error I don't understand with javascript - i have passed it a path to submit an ajax request using a TagHelper in the view, but when it uses it, is turns half the route to "undefined". I am expecting the route to be /users/user_id/bookings but for some reason it's giving me users/user_id/undefined
[14:52:36] ezebe: after getting the appropriate user_id correct. why is it losing the second half of the path?
[14:53:02] jjg: sevenseacat: so strange, it works in heroku, too. the difference is I’m on Ubuntu 14 and he’s on 16 .. my postgres is 9.4, his is 9.5 .. we are going to fireup a new VM and try with the same database version
[14:53:15] JamieD: has joined #RubyOnRails
[14:53:35] Papierkorb: How does one write good controller tests in terms of permission checks? For example, my FilesController has a route like 'permissions', which to access the user has to be either an admin OR have the read+acl permissions. Should I now have test cases for those two plus guests, user without any permissions, user with only read and user with only acl permissions?
[14:56:48] dc4: has joined #RubyOnRails
[14:59:10] jahbrews1i: sevenseacat: Yeah, going to try that now. Seems crazy though. Any idea why those sequences aren't working?
[15:01:16] epochwolf: In rails 3.2 with the asset pipeline off, how would I change image_path to link to /pictures instead of /images ?
[15:02:05] sevenseacat: asset pipeline... off....
[15:02:26] epochwolf: sevenseacat: legacy application, please don't judge.
[15:02:45] epochwolf: The rails 4 upgrade will have the asset pipeline on but that's a month away.
[15:03:12] epochwolf: I am required to rename the images folder to something the McAfee security scanner won't bitch about.
[15:03:36] epochwolf: I have no choice other than doing it or quitting my job. I happen to like my paycheck.
[15:03:47] sevenseacat: nah not judging
[15:04:04] sevenseacat: looks like the mappings are defined in a constant called ASSET_PUBLIC_DIRECTORIES in ActionView::Helpers::AssetUrlHelper
[15:04:07] bruce_lee: has joined #RubyOnRails
[15:04:21] epochwolf: Thanks, I'll dig around.
[15:04:29] tbuehlmann: the McAfee.. security scanner?
[15:04:34] tbuehlmann: what am I reading?
[15:04:56] pwnd_nsfw: has joined #RubyOnRails
[15:04:57] epochwolf: tbuehlmann: PCI bullshit in a company with a paranoid CEO who hasn't learned jack shit about computers in 20 years.
[15:05:03] Papierkorb: tbuehlmann: reminds me of the "how to uninstall mcafee" video by McAfee himself
[15:05:17] sevenseacat: and the filename is generated by compute_asset_path in that same module
[15:05:25] irubnich: has joined #RubyOnRails
[15:05:30] epochwolf: sevenseacat: bless you, for you are amazing and awesome.
[15:05:45] epochwolf: And I am lazy. :)
[15:06:09] sevenseacat: all good, i learned things from my dash spelunking too :P
[15:06:20] theod: has joined #RubyOnRails
[15:10:05] rodfersou: has joined #RubyOnRails
[15:10:32] epochwolf: sevenseacat: looks like ASSET_PUBLIC_DIRECTORIES is Rails 4 only.
[15:10:57] prithaj: has joined #RubyOnRails
[15:13:05] blackmesa: has joined #RubyOnRails
[15:15:26] Sylario: I asked for my deployment problem on stack overflow : http://stackoverflow.com/questions/38103681/capistrano-3-does-not-restart-my-rails-app-after-deployment
[15:21:22] disgrntld: has joined #RubyOnRails
[15:23:27] jlebrech: sylario: set :passenger_restart_with_touch, true ?
[15:25:30] Sylario: jlebrech: does not seems to exist
[15:25:38] dblessing: has joined #RubyOnRails
[15:25:53] jlebrech: sylario: gem 'capistrano-passenger'
[15:26:23] Sylario: i need a gem to restart a rails app ?
[15:27:52] aissar: has joined #RubyOnRails
[15:28:10] jlebrech: it's all split up into separate gems
[15:28:34] jlebrech: can you currently restart with touch tmp/restart.txt ?
[15:28:48] Sylario: so the manual touch from 2 has been replaced by another GEM :/
[15:29:05] dionysus69: has joined #RubyOnRails
[15:29:09] l4v2: has joined #RubyOnRails
[15:29:17] Sylario: thx, i think i'll finally switch to ansible
[15:29:38] arnonhongklay: has joined #RubyOnRails
[15:30:22] epochwolf: sevenseacat: "/images/" is hard coded in image_tag in Rails 3.2 :(
[15:30:56] epochwolf: source.present? ? asset_paths.compute_public_path(source, 'images') : ""
[15:30:58] zave: has joined #RubyOnRails
[15:33:02] tvw: has joined #RubyOnRails
[15:33:22] roamingdog: has joined #RubyOnRails
[15:35:12] alfiemax: has joined #RubyOnRails
[15:35:47] webnanners: When would you use the ApplicationController.render method?
[15:36:09] davidw: has joined #RubyOnRails
[15:36:17] sevenseacat: when rendering a template other than the default from an action
[15:38:06] webnanners: What's an example of that?
[15:38:22] webnanners: Like injecting rendered templates ?
[15:39:00] sevenseacat: http://guides.rubyonrails.org/getting_started.html#adding-some-validation see the controller
[15:41:24] tbuehlmann: webnanners: one example would be using actioncable and rendering a partial in order to add some markup to the page
[15:41:59] webnanners: Wouldn't you want to just send data though? And then use javascript to add the data?
[15:43:01] tbuehlmann: depends on the application, often times it's just handy to send the rendered html
[15:43:20] webnanners: Hmm okay interesting.
[15:43:34] B1n4r10: has joined #RubyOnRails
[15:44:50] kitsuneyo: has joined #RubyOnRails
[15:45:04] douglascorrea: has joined #RubyOnRails
[15:45:55] speakingcode: has joined #RubyOnRails
[15:47:21] roamingdog: has joined #RubyOnRails
[15:47:44] diegoviola: has joined #RubyOnRails
[15:48:05] roamingdog: has joined #RubyOnRails
[15:49:24] nettoweb: has joined #RubyOnRails
[15:49:26] acovrig: has joined #RubyOnRails
[15:50:19] acovrig: I have a rails app (API, no web interface) that uses devise, I’d like to have oauth, I got oauth working for Google,Facebook,and Twitter; how do I use my API w/oauth? I can login w/those providers in the web interface
[15:52:11] workmad3: has joined #RubyOnRails
[15:52:53] aegis3121: has joined #RubyOnRails
[15:53:02] mikecmpbll: acovrig : you want your API to be an auth provider?
[15:53:22] acovrig: mikecmpbll: no, I want to be able to login to my API w/an auth provider (AKA google)
[15:53:33] mikecmpbll: acovrig : oh, look at omniauth.
[15:53:35] acovrig: I can login on the web interface, but am unsure how to login via the API
[15:53:52] acovrig: yea, I have omniauth and it works for the web interface (all but windowslive but that’s a separate issue)
[15:54:05] aegis3121: has joined #RubyOnRails
[15:54:42] mikecmpbll: oh right. your original question was really lacking :p. i actually have no idea, i'm afraid.
[15:54:46] tvon: has joined #RubyOnRails
[15:55:12] acovrig: yea, I tried login in w/facebook, then using that GET request in the API and I get a 302 to the login page
[15:57:25] acovrig: the app dev used Azure last and said they provide a API for auth he can use in the (mobile) app but admin. would rather use rails than azure due to hosting prices
[15:58:42] polishdub: has joined #RubyOnRails
[16:00:01] dminuoso: has joined #RubyOnRails
[16:00:37] blackmes1: has joined #RubyOnRails
[16:01:33] douglascorrea: has joined #RubyOnRails
[16:05:34] tvw: has joined #RubyOnRails
[16:08:46] whathappens: has joined #RubyOnRails
[16:09:18] diegoviola: has joined #RubyOnRails
[16:10:23] whathapp_: has joined #RubyOnRails
[16:12:16] [Butch]: has joined #RubyOnRails
[16:12:35] B1n4r10: has joined #RubyOnRails
[16:15:05] rubyonrailed: has joined #RubyOnRails
[16:17:18] DaniG2k: has joined #RubyOnRails
[16:29:10] artto: has joined #RubyOnRails
[16:30:00] arthurl: has joined #RubyOnRails
[16:31:33] roamingdog: has joined #RubyOnRails
[16:32:23] macsteps: has joined #RubyOnRails
[16:36:27] VeryBewitching: has joined #RubyOnRails
[16:37:46] Hardtail_: has joined #RubyOnRails
[16:43:13] nettoweb: has joined #RubyOnRails
[16:44:17] manfrin_: has joined #RubyOnRails
[16:46:35] tvon: has joined #RubyOnRails
[16:46:46] svankmajer: has joined #RubyOnRails
[16:46:54] tvon: Q: Is a random secret_key_base a better fallback than a blank one? What are the implications of the secret_key_base not being set in production?
[16:47:12] VeryBewitching: tvon: I'm not sure your application will start
[16:47:20] tvon: e.g., the docs say to use ENV['SECRET_KEY_BASE'], so if it is not set (or set incorrectly) then it'll be blank. Should there be an "|| SecureRandom.hex" there?
[16:47:28] tvon: @VeryBewitching: hmm, I can get a console with it being blank
[16:47:34] tvon: ACTION can't stop using @ now
[16:47:43] tvon: Stupid slack/hipchat/everything
[16:48:14] VeryBewitching: tvon: I'm pretty sure the key has to be defined in the YAML file, even if blank.
[16:48:20] svankmajer: Hello everyone. What tools have you used to work with (tagged) Rails logs? I want to filter/sort them out, and I'm having a bad time.
[16:49:32] tvon: VeryBewitching: Yeah, it's defined, but if the env var is not set it'll be blank and I don't know the implications of that.
[16:49:35] VeryBewitching: Q: Trying to implement a Trailblazer operation and representer to supply supporting data to my application using Roar::JSON::HAL, but the only examples I've been able to find require some kind of root model to be used, has anyone had to do this before? I want a JSON object like {"room_types":[{...},{...}],"basement_types":[{...},{...}]}
[16:50:07] VeryBewitching: tvon: http://stackoverflow.com/questions/25426940/what-is-the-use-of-secret-key-base-in-rails-4
[16:52:48] Leepoff: has joined #RubyOnRails
[16:54:12] tvon: VeryBewitching: That sheds some light, thanks
[16:54:42] yardenbar: has joined #RubyOnRails
[16:56:07] Hyuk: has joined #RubyOnRails
[16:57:35] acovrig: I’m making an API-only Rails App, is ther a specific gem that is recomended or just rails itself?
[16:58:21] douglascorrea: has joined #RubyOnRails
[16:58:29] Hardtail_: has joined #RubyOnRails
[16:58:40] netzfisch: has joined #RubyOnRails
[17:01:23] harfangk: has joined #RubyOnRails
[17:02:43] JimsGems: has joined #RubyOnRails
[17:03:04] tvon: VeryBewitching: FWIW, it does error if it is not set. Console works fine because it doesn't hit that code, web UI throws error.
[17:03:37] pilne: has joined #RubyOnRails
[17:03:39] VeryBewitching: tvon: That makes sense.
[17:03:57] tvon: acovrig: rails-api perhaps
[17:03:59] JimsGems: I need to make a draggable inventory with JS and I'm not sure how to implement jqueryui in Rails 4
[17:05:01] Alek: has joined #RubyOnRails
[17:05:39] rubyonrails701: has joined #RubyOnRails
[17:08:15] artto: has joined #RubyOnRails
[17:08:17] Devalo: has joined #RubyOnRails
[17:08:37] jimbo: has joined #RubyOnRails
[17:09:09] tvon: has joined #RubyOnRails
[17:09:23] pawnbox: has joined #RubyOnRails
[17:09:27] jimbo: sorry I got disconnected - Looking for draggeable inventory jquery w rails 4
[17:09:29] macsteps: has joined #RubyOnRails
[17:09:34] Hardtail_: has joined #RubyOnRails
[17:09:52] aldodelgado: has joined #RubyOnRails
[17:11:21] jimbo: you know I can hear y'all thinking
[17:11:56] cnk: has joined #RubyOnRails
[17:13:02] Guest42724: has joined #RubyOnRails
[17:13:33] mikecmpbll: has joined #RubyOnRails
[17:13:50] Guest42724: Has anyone ever tried to render a static application through fastly CDN using rails as proxy?
[17:14:19] Oliphaunte: has joined #RubyOnRails
[17:15:22] Guest42724: looking for resources, im a little lost on how to start
[17:17:34] jimbo: Come on, somebody msut know jquery? ...
[17:18:07] douglascorrea: has joined #RubyOnRails
[17:18:47] hahuang61: has joined #RubyOnRails
[17:19:49] Guest42724: anyone there?
[17:20:40] jimbo: Guset42724 - I can't help u. I been all over the internet like a rash w mi own problems
[17:20:59] Guest42724: hey Jim__ has anyone responded to you? Does it seem anyone else is participating?
[17:21:03] MEATCHICKEN: has joined #RubyOnRails
[17:21:08] Guest42724: i haven't used irc for a long time
[17:21:23] MEATCHICKEN: Trying to stub a service that is instantiated in a model method
[17:21:33] MEATCHICKEN: How can I make one of the service's methods return a defined value?
[17:21:57] jimbo: VeryBewitching: yes?
[17:22:01] MEATCHICKEN: I've tried allow(Service).to receive(:method).and_return(value)
[17:22:18] VeryBewitching: Jim__: When you're asking a question about jQuery, best to ask in the #jquery channel
[17:22:18] DoubleMalt: has joined #RubyOnRails
[17:22:34] moresilenter: has joined #RubyOnRails
[17:22:58] evansbee: has joined #RubyOnRails
[17:23:03] jimbo: VeryBewitching: but I wanna make it run in rails. JS is easy enough
[17:23:04] moresilenter: hey all! quick question: is there a way I can only advance my migrations to a specific one after "rake db:drop db:create"?
[17:23:29] VeryBewitching: Jim__: Do you have a specific question about Rails?
[17:23:46] cnk: meatchicken: that looks fine. error message?
[17:23:47] VeryBewitching: Jim__: Then ask your specific question :)
[17:24:18] cnk: moresilenter: yes - pass the VERSION=#### param to rake db:migrate
[17:24:44] jimbo: how do I set up jquery to act upon my show.html.erb so as it will render and refresh. (i think)
[17:24:49] MEATCHICKEN: cnk, it just doesn't return the expected value
[17:25:15] moresilenter: cnk: you are my hero
[17:25:18] jimbo: VeryBewitching: I jsut thought you'd tell me how to setup jquery and that would be it
[17:25:28] moresilenter: is there a place I can go to find documentation about this type of thing?
[17:26:06] cnk: guides.rubyonrails.org
[17:26:09] VeryBewitching: Jim__: So you have a jQuery question then... jQuery is available in any app created by rails new <app>
[17:26:32] VeryBewitching: Jim__: You don't have to set it up.
[17:26:34] moresilenter: oh duh, it says it right there. thanks
[17:26:37] jimbo: so jquery.ui is also?
[17:27:02] jimbo: i was trying some jsfiddles..
[17:27:07] VeryBewitching: https://github.com/joliss/jquery-ui-rails
[17:27:15] VeryBewitching: Google is your friend.
[17:27:55] jimbo: yeah but he/she/it confuses me and gives wrong advice. Im not sure i trust he/she/it
[17:28:23] jimbo: thanks 4 the link. i check it out an come back
[17:39:40] dc4: has joined #RubyOnRails
[17:41:42] aegis3121: has joined #RubyOnRails
[17:42:54] aegis3121: has joined #RubyOnRails
[17:43:44] rafaelfranca: has joined #RubyOnRails
[17:44:39] arBmind: has joined #RubyOnRails
[17:46:35] l4v2: has joined #RubyOnRails
[17:46:45] jimbo: VeryBewitching: i went through the steps and that it? i can write js now?
[17:46:57] hardtail: has joined #RubyOnRails
[17:47:14] blackmes1: has joined #RubyOnRails
[17:47:32] agit0: has joined #RubyOnRails
[17:48:02] hahuang65: has joined #RubyOnRails
[17:48:38] adre: has joined #RubyOnRails
[17:48:57] djbkd: has joined #RubyOnRails
[17:50:13] mfelgenhauer: has joined #RubyOnRails
[17:52:25] jimbo: shine on you crazy diamonds
[17:52:27] macsteps: has joined #RubyOnRails
[17:59:10] edwinvdgraaf: has joined #RubyOnRails
[18:01:29] Oliphaunte: has joined #RubyOnRails
[18:02:20] jimbo: has joined #RubyOnRails
[18:02:42] jimbo: VeryBewitching: Hello. Not working
[18:03:14] Markhor1991: has joined #RubyOnRails
[18:03:19] jimbo: VeryBewitching: couldn't find file 'jquery.ui.draggable' with type 'application/javascript'
[18:04:04] VeryBewitching: /= require jquery-ui/draggable
[18:04:13] VeryBewitching: Err... //= require jquery-ui/draggable
[18:04:51] arup_r: has joined #RubyOnRails
[18:04:59] futilegames: has joined #RubyOnRails
[18:05:10] jimbo: thats what i put in but previous to that i got : couldn't find file 'jquery.ui.draggable' with type 'application/javascript'
[18:05:13] jmignault: has joined #RubyOnRails
[18:05:38] hardtail: has joined #RubyOnRails
[18:05:47] jimbo: i mean : couldn't find file 'jquery.ui.core' with type 'application/javascript'
[18:06:15] arup_r: Hi, Need a small suggestion. I am creating a small gem. But I want to keep it local in my rails app and use it. I don't want to publish it. How should I proceed? Any pointers or links?
[18:06:47] jtd: has joined #RubyOnRails
[18:07:04] dminuoso: arup_r: dont publish it then.
[18:07:06] dminuoso: Whats the issue?
[18:07:21] arup_r: ok, so where should I keep in Rails app?
[18:07:22] tbuehlmann: arup_r, in your Gemfile: `gem 'your_gem', path: '/your/path/to/the/gem'`
[18:07:33] jimbo: VeryBewitching: I installed the gem, if that helps
[18:07:36] arup_r: thanks tbuehlmann
[18:07:37] rogue_koder: has joined #RubyOnRails
[18:07:53] VeryBewitching: jim__: No, it doesn't. You have supplied any code, you just say "It's not working"
[18:07:59] helpa: jim__: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[18:07:59] dminuoso: arup_r: I just stash my private gems on a private github repository for ease of deployment.
[18:08:37] jimbo: ok. u want application.css & .js and the gemfile right/
[18:08:40] arup_r: dminuoso:
[18:08:54] AmiMoench: has joined #RubyOnRails
[18:10:21] jimbo: https://gist.github.com/anonymous/7840b103ceaaded2954dad800e959c92
[18:10:46] jimbo: VeryBewitching: Any joy?
[18:10:57] VeryBewitching: jim__: I just looked at it.
[18:11:05] VeryBewitching: If you want fast responses during the work day, get out your wallet
[18:12:01] jimbo: VeryBewitching: sorry
[18:12:03] VeryBewitching: jim__: You haven't used the gem properly
[18:12:13] VeryBewitching: Read this page: https://github.com/joliss/jquery-ui-rails
[18:12:59] jimbo: VeryBewitching: ok that's what i followed
[18:13:51] jimbo: i should have put in a version no. ?
[18:14:02] King_Rex: has joined #RubyOnRails
[18:14:31] VeryBewitching: jim__: Is //= require jquery.ui.datepicker correct?
[18:15:00] VeryBewitching: Or should it be //= require jquery-ui/datepicker ?
[18:15:32] jimbo: the other lines use dots?
[18:16:29] joowh85: has joined #RubyOnRails
[18:16:33] jimbo: VeryBewitching: i think it's ok..
[18:17:08] VeryBewitching: jim__: OK, if you think it's OK then you don't need any further assistance.
[18:17:31] jimbo: no man. Im boned here. i dunno
[18:18:03] Darmani: has joined #RubyOnRails
[18:18:04] VeryBewitching: jim__: You're going to have to learn something during this process.
[18:18:43] jimbo: ok. agreed. But isen't it the widgets that have that syntax
[18:21:06] VeryBewitching: jim__: Last time I'm going to post this link https://github.com/joliss/jquery-ui-rails
[18:21:14] netzfisch: has joined #RubyOnRails
[18:21:19] VeryBewitching: Read that, all the way through, then implement it in your application.js as they suggest
[18:21:35] jimbo: u r right. i was working off the older link u gave
[18:22:05] pablo-dinella: has joined #RubyOnRails
[18:22:27] VeryBewitching: It's been the same link each time.
[18:22:37] VeryBewitching: I count three times pasted in my log.
[18:23:23] jetpackjoe: has joined #RubyOnRails
[18:24:29] chouhoulis: has joined #RubyOnRails
[18:25:27] Hyuk: has joined #RubyOnRails
[18:27:15] jimbo: VeryBewitching: It works!! Thank you.
[18:27:34] defsdoor: has joined #RubyOnRails
[18:31:37] dannyguk: has joined #RubyOnRails
[18:32:22] jyraff: has joined #RubyOnRails
[18:34:18] xall: has joined #RubyOnRails
[18:34:53] marr: has joined #RubyOnRails
[18:35:21] emiltin: has joined #RubyOnRails
[18:35:48] dopamean_: has joined #RubyOnRails
[18:39:30] jimbo: i buy u a beer if i cud
[18:44:40] Dimik: has joined #RubyOnRails
[18:45:29] mdw: has joined #RubyOnRails
[18:47:46] kies: has joined #RubyOnRails
[18:50:04] nettoweb: has joined #RubyOnRails
[18:52:45] ma489: has joined #RubyOnRails
[18:53:33] Oog: has joined #RubyOnRails
[18:53:50] Oog: are around filters nested so if i add one existing ones still happen?
[19:01:32] phredus_: has joined #RubyOnRails
[19:02:16] manfrin_: has joined #RubyOnRails
[19:02:21] marahin: has joined #RubyOnRails
[19:02:46] universa1: has joined #RubyOnRails
[19:04:22] yfeldblum: has joined #RubyOnRails
[19:04:32] SebastianThorn: has joined #RubyOnRails
[19:05:11] arnonhongklay: has joined #RubyOnRails
[19:08:02] icedragon: has joined #RubyOnRails
[19:14:59] DoctorMonocular: has joined #RubyOnRails
[19:16:05] jgpawletko: has joined #RubyOnRails
[19:17:04] artto: has joined #RubyOnRails
[19:17:11] blackmes1: has joined #RubyOnRails
[19:17:45] jsrn: has joined #RubyOnRails
[19:18:20] deur-: has joined #RubyOnRails
[19:19:13] mikecmpbll: has joined #RubyOnRails
[19:19:51] thomasfedb: has joined #RubyOnRails
[19:20:02] xall: has joined #RubyOnRails
[19:20:10] edwinvdgraaf: has joined #RubyOnRails
[19:20:29] mfelgenhauer: has joined #RubyOnRails
[19:20:37] thomasfedb: Having a hard time getting a rails engine to require files from lib/gemname/
[19:20:48] thomasfedb: Works fine with app/models/gemname
[19:21:26] xall: has joined #RubyOnRails
[19:22:38] pvertenten_: has joined #RubyOnRails
[19:22:38] emilkarl: has joined #RubyOnRails
[19:24:00] agit0: has joined #RubyOnRails
[19:24:12] xall: has joined #RubyOnRails
[19:25:00] pawnbox_: has joined #RubyOnRails
[19:25:51] srinidhi: has joined #RubyOnRails
[19:26:27] xall: has joined #RubyOnRails
[19:26:29] AmiMoench: has joined #RubyOnRails
[19:27:28] aegis3121: has joined #RubyOnRails
[19:27:35] King_Rex: has joined #RubyOnRails
[19:27:59] pLaToOn: has joined #RubyOnRails
[19:28:22] qejk: has joined #RubyOnRails
[19:28:25] Fernando-Basso: has joined #RubyOnRails
[19:28:45] aegis3121: has joined #RubyOnRails
[19:31:49] pvertenten: has joined #RubyOnRails
[19:32:40] Akuma: has joined #RubyOnRails
[19:32:53] jottr: has joined #RubyOnRails
[19:33:12] xall: has joined #RubyOnRails
[19:34:20] nettoweb: has joined #RubyOnRails
[19:35:44] xall: has joined #RubyOnRails
[19:37:08] Devalo: has joined #RubyOnRails
[19:40:33] artto: has joined #RubyOnRails
[19:40:55] xall: has joined #RubyOnRails
[19:44:09] evansbee: has joined #RubyOnRails
[19:44:13] dminuoso: thomasfedb: That is quite a nice technical description.
[19:44:19] futilegames: has joined #RubyOnRails
[19:44:35] dminuoso: Wish more people would present their problems in such a concise gist with those error messages.
[19:45:23] nettoweb: has joined #RubyOnRails
[19:45:38] rodfersou: has joined #RubyOnRails
[19:47:21] hardtail: has joined #RubyOnRails
[19:47:50] thomasfedb: dminuoso, no worries
[19:56:18] xall: has joined #RubyOnRails
[19:57:38] manfrin`_: has joined #RubyOnRails
[19:57:56] whathappens: has joined #RubyOnRails
[19:58:07] dionysus69: has joined #RubyOnRails
[19:59:11] macsteps: has joined #RubyOnRails
[20:00:10] xall: has joined #RubyOnRails
[20:01:05] mfelgenhauer: has joined #RubyOnRails
[20:02:07] boshhead: has joined #RubyOnRails
[20:03:43] jtong: has joined #RubyOnRails
[20:04:25] dannyguk: has joined #RubyOnRails
[20:06:33] djbkd: has joined #RubyOnRails
[20:10:57] jenrzzz: has joined #RubyOnRails
[20:10:57] jenrzzz: has joined #RubyOnRails
[20:11:09] DoctorMonocular: has joined #RubyOnRails
[20:14:17] mcap: has joined #RubyOnRails
[20:14:59] a1fa: has joined #RubyOnRails
[20:15:44] asheinfeld: has joined #RubyOnRails
[20:16:52] a1fa: hey guys, i have a link_to some_path, remote: true.. some.js.erb conatains alert 'test'; in the log i see the page being rendered, but no alert gets generated on screen
[20:17:09] a1fa: no errors in console
[20:18:44] yardenbar: has joined #RubyOnRails
[20:19:19] aldodelgado: has joined #RubyOnRails
[20:21:09] neanderslob: has joined #RubyOnRails
[20:21:15] aldodelgado: Question? Looking to add logic to move a record from one table to another and build an association between the two. I already created the assocaition in the models. However the logic I created to handle the move is just a method defiened in the controller which does find or initialize by on the assocaited model. Is this the best way of handling this type of action or just this logic be moved into the model?
[20:21:52] xall: has joined #RubyOnRails
[20:22:14] cnk: a1fa: what does the network tab say is being returned from that link?
[20:22:37] cnk: Are you seeing the JS you expect returned? and then it's just not executing? or is not being returned
[20:23:24] a1fa: let me double check
[20:23:28] cnk: aldodelgado: do you have existing records? if so, I would move them in your migration
[20:23:46] aldodelgado: cnk: yes but this would be a user action
[20:23:55] cnk: as for where to initialize... up to you
[20:24:01] JamieD: has joined #RubyOnRails
[20:25:10] fox_mulder_cp: hi. i find manual how to make self temporary admin rights. but how to i can 'downgrade' to some unprivileged site user for viewing site 'as this user' sitepoint.com/straightforward-rails-authorization-with-pundit
[20:25:22] a1fa: cnk: odd.. 401 on the network side
[20:25:48] a1fa: doh. my session expired
[20:25:51] a1fa: let me try one more time
[20:26:10] xall: has joined #RubyOnRails
[20:26:32] a1fa: 200 ok, the network side. so i am guessing. js is not getting executed
[20:28:13] a1fa: i think i know why
[20:28:30] a1fa: should i've have specified format in link_to?
[20:30:06] fox_mulder_cp: a1fa: u want 'pdf' ad end of, as example?
[20:30:20] fox_mulder_cp: plz wait, i search my code
[20:30:46] a1fa: hm, it didnt care about :format => :js
[20:30:50] fox_mulder_cp: link_to ' PDF', article_path(article, :format => 'pdf')
[20:30:58] a1fa: yeah thats how i have it
[20:31:03] a1fa: but it didnt get executed
[20:31:43] a1fa: link_to edit_ticket_path(ticket.id,:format => :js), remote: true
[20:32:01] a1fa: edit.js.erb contains alert 'test';
[20:32:41] jtong: has joined #RubyOnRails
[20:33:11] a1fa: do i need to add <script> inside also?
[20:34:33] a1fa: lol no :(
[20:36:13] xall: has joined #RubyOnRails
[20:36:34] ur5us: has joined #RubyOnRails
[20:38:31] maucar: has joined #RubyOnRails
[20:39:53] jhack: has joined #RubyOnRails
[20:41:23] DoubleMalt: has joined #RubyOnRails
[20:41:47] dc4: has joined #RubyOnRails
[20:44:18] snowy: has joined #RubyOnRails
[20:45:24] dminuoso: has joined #RubyOnRails
[20:46:11] Darmani: I don't know how to display my shirt variables. I want the index to have a link to my show action which displays each shirt individually.
[20:46:11] Darmani: https://gist.github.com/mfifth/878c6e3d8428606223345f36473704de
[20:46:22] Darmani: If anyone can help I'd appreciate it ^^
[20:47:34] eljimador: has joined #RubyOnRails
[20:47:34] B1n4r10: has joined #RubyOnRails
[20:47:57] Renaud: has joined #RubyOnRails
[20:51:41] capin: Darmani: FYI, if my memory serves me correctly you want the "root" route at the very bottom of your routes file
[20:52:12] fox_mulder_cp: Darmani: i'm skip 'r' in 'shirt'....
[20:52:28] fox_mulder_cp: capin: root route must be at end of route.rb?
[20:52:57] Darmani: fox_mulder_cp: ?
[20:53:18] cnk: Darmani: you need to loop over a shirts array
[20:53:45] cnk: so shirts_controller needs to have @shirts = Shirt.all
[20:54:08] cnk: and then you can loop in index.html OR use a partial
[20:54:28] Darmani: cnk: A partial?
[20:54:45] cnk: What book are you using to learn Rails?
[20:54:49] a1fa: what else should i look into in order to determine why js code is not executing followed by link_to remote: true
[20:55:28] Darmani: cnk: I'm not using a book. I've read several. They all seem to teach the same basic understanding of Rails.
[20:55:38] cnk: a1fa: this blog post may help http://cynthiakiser.com/blog/2015/03/12/rails-ajax-options/
[20:55:55] cnk: OK so look up partials in one of those books
[20:55:59] jtong: has joined #RubyOnRails
[20:56:37] Darmani: cnk: Oh I know what a partial is. I'm just not sure what you had in mind exactly.
[20:56:40] capin: Darmani: if you have read several books, ...then surely you know what a partial is ;)
[20:56:41] workmad3: has joined #RubyOnRails
[20:57:09] cnk: the most common use of a partial is to render individual items in a loop
[20:57:39] a1fa: hm, nothing rings bells
[20:57:53] cnk: what I had in mind was render :partial @collection = @shirts
[20:57:54] a1fa: unless i add format.js { render js: }
[20:58:03] a1fa: should that even go in get action?
[20:58:10] Darmani: cnk: I think that might be what I need.
[20:58:11] Axilla: has joined #RubyOnRails
[20:58:12] a1fa: isnt that automatic followed by format?
[20:58:34] cnk: I thnk so
[20:58:47] cnk: and you see from the logs that your js.erb is getting rendered
[20:58:56] Darmani: cnk: I tried to just loop through the items with a @shirts variable. But then my view got messed up by rendering all of my images more than once.
[20:59:01] cnk: you confirmed the output using yoru browser's network tab, right?
[20:59:07] naftilos76: has joined #RubyOnRails
[20:59:17] cnk: so it must be that the format / headers are not correct
[20:59:34] a1fa: should i add that in controller?
[21:00:12] Renaud: has joined #RubyOnRails
[21:00:23] capin: a1fa: have you tried a different browser? sometimes certain browsers don't permit JS alerts
[21:00:38] a1fa: its chrome
[21:00:41] a1fa: have not tried ffox
[21:00:45] Renaud: has left #RubyOnRails: ()
[21:00:53] a1fa: it does. i use it all the tim
[21:01:01] manfrin_: has joined #RubyOnRails
[21:01:06] cnk: Darmani: https://www.railstutorial.org/book/updating_and_deleting_users#sec-users_index
[21:01:29] capin: couldn't hurt to try a different browser :l
[21:02:11] AmiMoench: has joined #RubyOnRails
[21:03:45] Darmani: cnk: let me show you something, hang on.
[21:04:00] khelair: has joined #RubyOnRails
[21:04:09] khelair: I'm having a ridiculous question here. I'm working on a machine freshly installed with ruby 2.x and assorted tools. I just got the mysql & mysql2 gems installed, and I was hoping they'd fix my problem
[21:04:14] khelair: problem being that sqllite is the only database whose configuration examples I'm seeing in the database.yml file
[21:04:22] khelair: which is hampering my ability to follow the example in the ruby for rails book that I'm trying to learn from right now
[21:04:31] khelair: anybody have any suggestions or pointers to helpful information? thanks in advance
[21:04:53] Darmani: cnk: This is what I have. Like right now. https://gist.github.com/mfifth/878c6e3d8428606223345f36473704de
[21:04:54] khelair: I know I can change the database.yml file, but how do I get it to be pre-configured for mysql and sqlite or whatever like I've seen on the last server I was using?
[21:05:10] dannyguk: has joined #RubyOnRails
[21:05:13] Darmani: cnk: This is a live version of the website I am trying to make.
[21:05:13] Darmani: https://tshirtshop-mfifth.c9users.io/
[21:05:19] a1fa: cnk: response header is correct text/javascript
[21:05:48] Darmani: I have a loop, I just don't know why the same images keep getting rendered more than once.
[21:09:17] a1fa: in network tab, the script shows up as "xhr"
[21:09:20] a1fa: instead of script
[21:11:17] capin: Darmani: just some words of wisdom that have been bestowed upon me by fellow IRC users, you shouldn't run your rails app in dev mode on a prod box, that's what the prod env is for ;)
[21:12:08] Darmani: capin: thanks. I'll keep that in mind.
[21:12:37] B1n4r10: has joined #RubyOnRails
[21:13:40] a1fa: i think i got it working
[21:13:49] nofxx: Only customization for #url_for in activemodel is #to_param? Isn't possible to change the 'show' link?
[21:13:52] khelair: got past my mysql configuration problem
[21:14:44] rafaelfranca: has joined #RubyOnRails
[21:14:45] nofxx: eg: class Post -> posts_path() , how to change?
[21:15:36] khelair: was there a $TOP_RAILS_DIR/script directory with the rails versions that went with ruby 1.x that now doesn't exist in rails 4.x with ruby 2.x?
[21:15:53] khelair: trying to figure out if this text I'm learning from is outdated or not here
[21:15:57] pur3eval: hi, is there a way to get the xml content of the soap envelope from savon2 requests??
[21:15:58] nofxx: khelair, yup.. its 'bin' now
[21:16:11] khelair: thanks, nofxx
[21:16:28] nofxx: khelair, check 'rails g' there's one task tehre to re-generate bin/
[21:16:44] khelair: is there any reason to stick with a 1.x version of ruby as opposed to 2.x? curious as to whether or not there's a python 3.x style issue going on here or not
[21:17:08] nofxx: khelair, nope, just go 2, only happiness
[21:17:19] khelair: many thanks :)
[21:18:02] havenwood: khelair: 2.3.1 or bust
[21:18:47] asheinfeld: has joined #RubyOnRails
[21:19:37] khelair: gotcha. looks like I need to find a new text to learn from, too. the one I've got is pretty outdated. any suggestions?
[21:20:40] davidw: has joined #RubyOnRails
[21:21:25] nofxx: khelair, chris pine's learn to program, free and online
[21:21:48] khelair: ACTION bows
[21:23:35] cnk: a1fa: so what was the issue?
[21:23:52] nofxx: khelair, but there's really very few changes... only really big is new hash syntax: { a: 1 } , with 1.x you need to do: { :a => 1 }
[21:24:23] nofxx: khelair, and 2.x accepts both of course, so... no update problems
[21:25:36] cnk: Darmani: when you put int the loop, then you only need one copy of the div to display a shirt
[21:25:47] cnk: you don't need the rows of rows
[21:26:20] Darmani: Is that what's happening?
[21:26:40] cnk: the point of loops is so you don't have to write allllllllll the chunks
[21:27:01] cnk: if you want rows of 4, I wouldn't do it with a div wrapping 4'ss
[21:27:15] cnk: I would do individual chunks and then use flexbox css to flow them into rows
[21:27:54] Darmani: cnk: okay..
[21:28:19] Darmani: Thanks for telling me. I really didn't know why this was happening to be honest.
[21:29:54] arBmind: has joined #RubyOnRails
[21:34:13] nettoweb: has joined #RubyOnRails
[21:35:26] mfelgenhauer: has joined #RubyOnRails
[21:40:10] d0nn1e: has joined #RubyOnRails
[21:40:30] JamieD: has joined #RubyOnRails
[21:42:41] davidw: has joined #RubyOnRails
[21:43:20] arnonhongklay: has joined #RubyOnRails
[21:46:23] asheinfeld: has joined #RubyOnRails
[21:46:40] dminuoso: has joined #RubyOnRails
[21:49:23] dc4: has joined #RubyOnRails
[21:50:53] jmignault: has joined #RubyOnRails
[21:53:43] blackmes1: has joined #RubyOnRails
[21:55:24] whathapp_: has joined #RubyOnRails
[21:55:59] jtong: has joined #RubyOnRails
[21:56:46] jtong: has joined #RubyOnRails
[21:57:33] workmad3: has joined #RubyOnRails
[21:59:34] Fernando-Basso: I have models in the global namespace. Controllers and other things in the admin and public namespaces. When I try to run tests for admin/foo_controller, it fails because it is trying to find the admin_foos table. How should I proceed?
[22:00:43] Fernando-Basso: I guess in the setup method in the controller test I should somehow tell it to use the foo model, not admin/foo, but how? (assuming that is my problem)
[22:01:46] chipotle: has joined #RubyOnRails
[22:02:39] Darmani: quick question guys,
[22:02:59] Darmani: How do I attach an image to an object in Rails?
[22:03:15] jgpawletko: has joined #RubyOnRails
[22:05:12] fox_mulder_cp: Darmani: carrierwave gem
[22:06:03] Darmani: fox_mulder_cp: But the thing is I don't need users to upload anything. I just want to add images to the products I'm listing.
[22:06:06] Darmani: Does it work for that?
[22:06:12] axl_: has joined #RubyOnRails
[22:06:28] jmignault: has joined #RubyOnRails
[22:08:19] jgpawletko_: has joined #RubyOnRails
[22:08:52] macsteps: has joined #RubyOnRails
[22:08:53] Axilla: has joined #RubyOnRails
[22:09:09] fox_mulder_cp: Darmani: oh, u may add images by your hands.. tons of images...
[22:09:39] gambl0re: has joined #RubyOnRails
[22:10:14] fox_mulder_cp: product descrtiption in my wife's job (content manager) contains from 5 to 20 images per ONE position :)
[22:10:25] adam12: Darmani: All of them will work for what you need. I prefer Dragonfly, but Paperclip and Carrierwave are both popular in here.
[22:10:51] Darmani: Dragonfly...
[22:10:55] fox_mulder_cp: adam12: oh no, no gems, only hard working by hands ))
[22:12:04] adam12: Darmani: You don't have to use the file upload capabilities. For Dragonfly at least, you can just assign by path to file in a string or a file object.
[22:12:29] Darmani: adam12: Is it possible to just link to the image url?
[22:12:34] DoctorMonocular: has joined #RubyOnRails
[22:12:39] adam12: Sure. Is it stored offsite?
[22:12:42] adam12: (the image)
[22:12:47] Darmani: adam12: Mhm
[22:12:54] fox_mulder_cp: Darmani: uploaded images stored in publicly area
[22:13:05] fox_mulder_cp: in sql stored only names/pathes
[22:13:18] fox_mulder_cp: no blobs in sql
[22:13:46] fox_mulder_cp: good night, my tens of commits make me sleepy ))
[22:14:44] asheinfeld: has joined #RubyOnRails
[22:15:40] jgt: has joined #RubyOnRails
[22:15:51] pwnd_nsfw: has joined #RubyOnRails
[22:15:54] superlou: has joined #RubyOnRails
[22:16:22] Rodya_: has joined #RubyOnRails
[22:20:31] pilne: has joined #RubyOnRails
[22:22:46] jgpawletko: has joined #RubyOnRails
[22:25:32] siaw23: has joined #RubyOnRails
[22:26:14] duncannz: has joined #RubyOnRails
[22:26:26] siaw23: has joined #RubyOnRails
[22:27:03] duncannz: has joined #RubyOnRails
[22:27:58] duncannz: has joined #RubyOnRails
[22:29:59] Rodya_: has joined #RubyOnRails
[22:30:20] futilegames: has joined #RubyOnRails
[22:32:54] axl_: has left #RubyOnRails: ()
[22:38:24] AmiMoench: has joined #RubyOnRails
[22:38:42] jottr: has joined #RubyOnRails
[22:40:10] l4v2: What is the qualifications for a senior level programmer?
[22:45:34] maucar: has joined #RubyOnRails
[22:46:03] pragmatism: has joined #RubyOnRails
[22:47:23] dminuoso: has joined #RubyOnRails
[22:47:46] wethu: has joined #RubyOnRails
[22:50:47] Radar: GOOD MORNING
[22:50:57] Radar: l4v2: 1. They don't ask questions like that.
[22:51:41] l4v2: Radar, all of these jobs I’m applying to use that as a posting title
[22:51:58] Radar: l4v2: How many years experience in Ruby do you have?
[22:53:17] l4v2: Radar, I graduated in December, I used it for a small final project, and have been learning a lot about that and Rails everyday since I graduated.
[22:53:36] havenwood: l4v2: How many of these colors are you comfy with?: https://dgosxlrnzhofi.cloudfront.net/custom_page_images/64/page_images/Rails_Competencies.png?1386276348
[22:53:37] Radar: l4v2: < 5 years experience != senior
[22:54:07] l4v2: So how am I ever going to get my first Ruby on Rails job?
[22:54:14] c355E3B: has joined #RubyOnRails
[22:54:16] pragmatism: Apply as an intern or a junior engineer.
[22:54:17] acovrig: has joined #RubyOnRails
[22:54:23] l4v2: Not much for non senior roles
[22:54:37] acovrig: Has anyone used an oauth, say Facebook for a Rails API app?
[22:54:47] pragmatism: acovrig Yup, check out Devise.
[22:54:58] Radar: acovrig: devise + omniauth
[22:55:00] pragmatism: There are some gems that just focus on single OAuth providers as well.
[22:55:34] acovrig: pragmatism, for *API* though? I can do omniauth via a browser, but how do I login via the API?
[22:55:49] gremly: has joined #RubyOnRails
[22:56:09] pragmatism: So you have a Rails-based API you want to authenticate for using FB's OAuth?
[22:56:15] acovrig: pragmatism, yes
[22:56:49] pragmatism: acovrig I'll save you the google... http://stackoverflow.com/questions/19989391/authenticate-user-using-omniauth-and-facebook-for-a-rails-api
[22:56:51] acovrig: I have devise working with omniauth for several providers in the web interface, but don't know how to hit the API for omniauth
[22:57:09] pragmatism: Haven't used Devise for an API app, apologies.
[22:57:47] acovrig: pragmatism, yea, I saw that page; the appdev said w/ Azure he hit an auth api w/2 args: the provider and the token and it auth'd him, I'm not sure how to provide that
[22:58:51] acovrig: I'm not sure how to implement the SO post either...
[23:02:02] acovrig: Actually, looking at the post again in more depth, I may actually be able to do this, thanks
[23:03:59] pragmatism: Sorry for the lag, good luck! Come back with questions!
[23:04:37] hahuang61: has joined #RubyOnRails
[23:11:30] pilne: has joined #RubyOnRails
[23:12:27] l4v2: Any one have an opening for a Junior developer. I will move to wherever.
[23:14:40] baweaver: l4v2: Thoughtbot, Pivotal Labs, Hashrocket, and a few others tend to have Junior programs in multiple areas.
[23:15:01] speakingcode: has joined #RubyOnRails
[23:15:02] baweaver: though they'll all likely want sample code on git
[23:15:07] l4v2: Thanks bweaver
[23:15:34] baweaver: past that, I think it was Trilobyte in SF that applies you to a ton of startups
[23:16:08] baweaver: Underdog, Mirror Placement, and Cyber Coders tend to be active as well.
[23:16:22] baweaver: that, and relentlessly hound any jobs board you can find.
[23:16:42] baweaver: but truth of the matter is you're going to face a lot of rejection
[23:17:06] baweaver: chalk it up to a lesson learned and keep moving, because intro jobs can be hellish.
[23:17:48] baweaver: Cerner and Epic tend to hire straight from College with lower barriers of entry, but tend to very heavily limit career growth. Then again 1-2 years experience is enough to break the Junior curse.
[23:17:51] dalbusch1t: has joined #RubyOnRails
[23:18:20] baweaver: though the biggest piece of advice is to work on attitude. That'll absolutely get you killed.
[23:23:00] tossup: has joined #RubyOnRails
[23:23:55] macsteps: has joined #RubyOnRails
[23:28:08] pawnbox: has joined #RubyOnRails
[23:29:58] jrandm: has joined #RubyOnRails
[23:34:25] macsteps: has joined #RubyOnRails
[23:34:35] jmignault: has joined #RubyOnRails
[23:34:50] workmad3: has joined #RubyOnRails
[23:35:07] jhack: has joined #RubyOnRails
[23:35:24] jahbrewski: has joined #RubyOnRails
[23:39:31] moei: has joined #RubyOnRails
[23:41:57] jhack: has joined #RubyOnRails
[23:48:09] dminuoso: has joined #RubyOnRails
[23:48:55] acovrig: has joined #RubyOnRails
[23:49:30] ensyde: has joined #RubyOnRails
[23:50:28] pvertenten: has joined #RubyOnRails
[23:56:59] jtong: has joined #RubyOnRails
[23:57:42] jmignault: has joined #RubyOnRails