« Back to channel list

#RubyOnRails - 06 July 2015

« Back 1 day Forward 1 day »
[00:00:41] Oog: has joined #RubyOnRails
[00:00:53] Oog: is there a time class that has no timezone attached to it?
[00:01:40] Oog: i have a database time field. did o.time=Time.parse('9am') everything was fine until i saved it got converted to UTC and all messed up
[00:02:18] ruurd: Maybe the definition of the database field messes it up.
[00:02:30] ruurd: You want a wall time class right?
[00:02:38] radialneon: has joined #RubyOnRails
[00:02:39] hive-mind: has joined #RubyOnRails
[00:02:42] Oog: i think so?
[00:02:52] thedonkdonk: has joined #RubyOnRails
[00:02:55] Oog: add_column :orders, :shift_start_time, :time
[00:03:26] thedonkdonk: hello! trying to move a CAS app to a new server. getting https://bpaste.net/show/dd192bbebc62
[00:03:35] thedonkdonk: any one spot what I am doing wrong?
[00:03:35] radialneon: has left #RubyOnRails: ()
[00:04:56] drale2k: has joined #RubyOnRails
[00:04:59] sevenseacat: has joined #RubyOnRails
[00:05:36] ruurd: Missing a gem?
[00:05:40] ruurd: iconv maybe?
[00:06:12] wethu: has joined #RubyOnRails
[00:06:37] idd2d: has joined #RubyOnRails
[00:07:06] thedonkdonk: ruurd: https://bpaste.net/show/a3b8ec60a7cd
[00:07:10] thedonkdonk: don't think so
[00:09:10] jenrzzz: has joined #RubyOnRails
[00:12:51] Oog: fixed it with Time.zone.parse
[00:13:17] brain_shim: has joined #RubyOnRails
[00:16:19] joshlegs: pipework! you here? got a question
[00:17:16] jfarmer: has joined #RubyOnRails
[00:17:17] lala: has joined #RubyOnRails
[00:17:19] balr0g: has joined #RubyOnRails
[00:17:34] jesterfraud: has joined #RubyOnRails
[00:18:37] abuzze: has joined #RubyOnRails
[00:19:36] sevenseacat: only you can save them, pipework!
[00:20:09] joshlegs: you're my only hope!
[00:20:57] SteenJobs: has joined #RubyOnRails
[00:23:48] urbanmonk: has joined #RubyOnRails
[00:28:14] alexblom: has joined #RubyOnRails
[00:28:24] Signum: has joined #RubyOnRails
[00:28:24] marr123: has joined #RubyOnRails
[00:28:49] asdfoo: has joined #RubyOnRails
[00:29:07] jxf: has joined #RubyOnRails
[00:29:35] chridal: has joined #RubyOnRails
[00:30:14] skkeeper: has joined #RubyOnRails
[00:30:57] Nuck: has joined #RubyOnRails
[00:36:24] wethu: has joined #RubyOnRails
[00:36:59] Exuma: has joined #RubyOnRails
[00:39:08] urbanmonk: has joined #RubyOnRails
[00:43:25] brain_shim: has joined #RubyOnRails
[00:45:30] therod: has joined #RubyOnRails
[00:47:24] christiandsg: has joined #RubyOnRails
[00:48:28] bf4: has joined #RubyOnRails
[00:49:48] ProLoser: has joined #RubyOnRails
[00:50:30] Moonlight-Angel: has joined #RubyOnRails
[00:51:58] asheinfeld: has joined #RubyOnRails
[00:53:56] asheinfeld: has joined #RubyOnRails
[00:54:46] Radar: joshlegs: I'm sure more than just pipework can help you :)
[00:55:22] joshlegs: Radar: oh, it's a little personal of a question lol. and not rubyonrails related
[00:55:31] Radar: then PM is good
[00:55:31] joshlegs: i just knew he hangs out in here all the time
[00:55:46] joshlegs: Radar: yeah i guess that does make sense huh. forgive me for going full retard
[00:55:49] Radar: He's been idle for the past 4 and a half hours so he's probably not here
[00:55:49] asheinfeld: has joined #RubyOnRails
[00:57:30] SteenJobs: has joined #RubyOnRails
[00:58:13] duncannz: has joined #RubyOnRails
[01:00:06] djbkd: has joined #RubyOnRails
[01:02:23] jesterfraud: just don't ask "guys" to help you :)
[01:02:47] jesterfraud: ACTION sighs
[01:02:53] jesterfraud: I really should check how old that last message is
[01:04:50] frishi: has joined #RubyOnRails
[01:05:03] leonardoajim: has joined #RubyOnRails
[01:05:36] ivanskie: has joined #RubyOnRails
[01:07:11] eggoez: has joined #RubyOnRails
[01:08:18] yash: has joined #RubyOnRails
[01:08:33] asheinfeld: has joined #RubyOnRails
[01:10:41] rickmasta: has joined #RubyOnRails
[01:12:32] Moonlight-Angel: has joined #RubyOnRails
[01:17:39] jdayvie: has joined #RubyOnRails
[01:18:04] choke: has joined #RubyOnRails
[01:18:06] GeorgeKaplan: has joined #RubyOnRails
[01:18:35] canmor: has joined #RubyOnRails
[01:19:50] willharrison: has joined #RubyOnRails
[01:19:57] willharrison: has left #RubyOnRails: ()
[01:20:22] jdayvie: has joined #RubyOnRails
[01:21:15] hardtail: has joined #RubyOnRails
[01:21:48] Jimmybee: has joined #RubyOnRails
[01:22:01] workmad3: has joined #RubyOnRails
[01:22:11] michael_mbp: has joined #RubyOnRails
[01:22:35] Jimmybee: has joined #RubyOnRails
[01:22:35] Jimmybee: has left #RubyOnRails: ()
[01:22:39] bullcitydev: has joined #RubyOnRails
[01:23:30] bmurt: has joined #RubyOnRails
[01:24:14] frishi: has joined #RubyOnRails
[01:24:43] beauby: has joined #RubyOnRails
[01:25:35] idd2d: has joined #RubyOnRails
[01:26:14] bruno-: has joined #RubyOnRails
[01:26:41] earthquake: has joined #RubyOnRails
[01:27:28] bronson: has joined #RubyOnRails
[01:28:03] Exuma: has joined #RubyOnRails
[01:28:16] glennt: has joined #RubyOnRails
[01:28:35] Exuma: Hey, does anyone use Unicorn in production with Rails? I'm trying to find information on the config needed and I see a heroku page but I don't really trust that. Something about requiring pre_fork and so on
[01:28:48] Exuma: in a config file
[01:29:02] Exuma: https://devcenter.heroku.com/articles/rails-unicorn#config
[01:29:12] Exuma: is this still needed or is this outdated? Latest rails, latest nginx, latest unicorn
[01:29:49] fryguy: Exuma: the word "pre_fork" isn't on that page at all, what are you actually referring to?
[01:29:52] sevenseacat: "Last Updated: 16 February 2015 "
[01:30:19] yashinbasement: has joined #RubyOnRails
[01:30:19] Exuma: I meant before_fork
[01:30:34] fryguy: seems pretty relevant to me
[01:31:17] bronson: has joined #RubyOnRails
[01:31:17] sevenseacat: that being said, I don't use unicorn except for testing things out in dev
[01:33:08] fryguy: is there any usecase nowadays where unicorn would be preferred to puma?
[01:33:37] GeorgeKaplan1: has joined #RubyOnRails
[01:33:56] Exuma: If my app is not threadsafe can I still use Puma?
[01:33:59] Exuma: that was the main reason I didnt
[01:34:20] fryguy: you can configure max 1 thread
[01:34:35] rndm: has joined #RubyOnRails
[01:34:49] weaksauce: has joined #RubyOnRails
[01:35:04] bronson_: has joined #RubyOnRails
[01:35:05] Exuma: and this will be more performant than unicorn?
[01:35:19] fryguy: you should test it and see
[01:35:20] hotpancakes: has joined #RubyOnRails
[01:35:22] joshlegs: has left #RubyOnRails: ()
[01:35:31] rndm: I know Exuma -- he's running a top 1000 website
[01:35:42] rndm: preformance is seriously important
[01:36:04] Exuma: er yea its 300MM requests/month
[01:36:11] sevenseacat: top 1000? people rank websites these days?
[01:36:14] Exuma: thats sort of unrelated though because varnish does most of this
[01:36:19] rndm: most of the rails stuff is insulated behind varnish
[01:36:33] Exuma: im sure people at the top rank them. people at the bottom probably dont care :P
[01:37:02] sevenseacat: ouch, nice dig there
[01:37:39] sevenseacat: if you have a 'top 1000' website cant you hire a devops person that knows how to deal with app servers?
[01:38:01] rndm: i didn't mean to derail from the technical aspect of the conversation
[01:38:17] Exuma: The main thing im wondering is just puma vs unicorn. i have used passenger, however getting this into docker is quite a lot of work
[01:38:19] adavia: why i still get undefined method `state' for nil:NilClass even doing <%= @user.profile.state.present? ? @user.profile.state.name : "" %>
[01:38:24] Exuma: plus i have wnated to swtich away from passenger anyway
[01:38:30] Exuma: I just don't know what most people use in production these days
[01:38:34] Exuma: I'd like to try something new
[01:38:36] sevenseacat: adavia: because @user.profile is nil, so you cant call state on it
[01:38:50] rhizome: most people aren't running top-1000 sites, so maybe you're on your own there
[01:38:54] rndm: and the first stage of any good test is information gathering :)
[01:39:28] adavia: sevenseacat: shouldnt be printing "" then?
[01:39:32] rndm: so what's the advantage of puma over unicorn
[01:39:39] rndm: other than "unicorn is old"?
[01:39:56] Exuma: rhizome: I'm genuinely asking input, i'm not looking for drama here. I didnt even say that.
[01:39:56] sevenseacat: adavia: if @user.profile is nil, and you call @user.profile.state, thats like calling nil.state
[01:40:06] pontiki: i still use unicorn
[01:40:11] pontiki: but then, i'm old
[01:40:12] Exuma: secondly people saying i did a 'dig', so is saying 'people rank shit these days???'
[01:40:23] rndm: there's some advice from engine yard that says unicorn is preferred when performance is important
[01:40:25] fryguy: rndm: threading
[01:40:36] rndm: i see, so if the app isn't threadsafe
[01:40:37] rhizome: if you're handling 300MM requests/mo, you have an architect. ask them.
[01:41:00] Exuma: I'm actually the sole developer with 1 buddy, so everyone here is now just acting like a tool
[01:41:02] rndm: architect hasn't tried many of the options :)
[01:41:04] Exuma: when i'm actually asking for help
[01:41:22] sevenseacat: Exuma: easy on the insults, there.
[01:41:23] rhizome: whatever you say
[01:41:28] sevenseacat: calling people tools wont get you far.
[01:41:37] Exuma: neither does being a hypocrite
[01:41:45] rndm: but so if the app isn't threadsafe it's a no-go
[01:42:09] fryguy: rndm: in the default configuratoin, sure, you can configure it to still work with non-threadsafe apps
[01:42:28] sevenseacat: Exuma: I have no interest in arguing with you. I'm just telling you not to insult the people you're asking for help - it makes them less inclined to help you.
[01:42:34] beauby: has joined #RubyOnRails
[01:42:56] yashinbasement: has left #RubyOnRails: ("Leaving")
[01:43:18] yashinbasement: has joined #RubyOnRails
[01:43:58] Exuma: Lets look at the facts. I come in here, asking a sincere question for help. Someone ELSE said that about the top 1000 thing, then you take a sarcastic dig at ME about "oh people rank stuff tehse days??". I gave you a sarcastic answer to your sarcastic question, and then you tell me im taking a dig at oyu, then everyone jumps on the bandwagon
[01:44:09] rhizome: Exuma: what's the name of your site?
[01:44:14] jdayvie: has joined #RubyOnRails
[01:44:24] Exuma: rhizome.com
[01:44:36] sevenseacat: Exuma: last warning.
[01:45:19] sevenseacat: I didn't dig at anyone. I asked if people do rankings of websites these days, because I haven't heard of them. if you somehow took offense to that, then my apologies.
[01:45:30] sevenseacat: even though it wasnt directed at you
[01:46:27] Exuma: Sure, my bad. I was just referring to Comscore (or also possibly alexa.com), which is just a metric used to rank high volume sites to advertisers and such
[01:46:35] pontiki: it's a bit like baseball, innit. people get fascinated by statistics and will measure and rank anything they can
[01:47:02] Exuma: I'm not taking offense to you, I'm more irritated at all the people ganging up on me when I never even said that to begin with.. .but ok moving on
[01:47:53] AntiSpamMeta: has joined #RubyOnRails
[01:48:12] rhizome: single-threaded puma is only good to 200MM/mo, so that sucks.
[01:48:28] rndm: rhizome: i'd actually like to know the answer
[01:48:34] Malgorath: has joined #RubyOnRails
[01:48:42] pontiki: rhizome: sorry, the MM suffix means what? Million?
[01:48:54] rhizome: yes. thousand-thousand
[01:48:55] rndm: if anyone happens to know -- how single threaded scales vs multithreaded
[01:49:07] pontiki: sometimes hopelessly USian
[01:49:12] Exuma: the request count isnt really importatant because its mostly varnish. It's a lot, which is really the important thing. the app isnt thread safe though
[01:49:19] Exuma: so i guess were comparing puma single thread vs unicorn
[01:49:25] fryguy: rndm: know the answer to what?
[01:49:42] rakm: does ruby have a convenience method to decrement integer 'x' over a 'y' steps?
[01:49:48] Nigel_: has joined #RubyOnRails
[01:50:13] fryguy: rakm: you mean like x = x - y?
[01:50:19] rndm: if the performance advantage of puma over unicorn disappears if puma is forced to run single-threaded
[01:50:33] fryguy: rndm: depends on the app and the workload. Benchmark/tst it
[01:51:03] rhizome: "just for like an average app"
[01:51:27] rakm: fryguy: i didn't explain correctly. e.g. going from 5 to 0 in no more than 3 equivalent steps
[01:51:47] AntiSpamMeta: has joined #RubyOnRails
[01:51:47] rakm: and getting the values of the intermediate steps
[01:51:50] rndm: well that's not well-defined. i'm more looking for a map of the bottlnecks or if anyone has some architectural insight here
[01:52:32] fryguy: rndm: benchmark/test it
[01:52:52] rhizome: you can't benchmark premature optimization
[01:53:03] rhizome: for an imaginary app
[01:53:41] barriommx: has joined #RubyOnRails
[01:54:18] rickjames: has joined #RubyOnRails
[01:54:38] fryguy: there's no magic answer here
[01:55:01] rndm: i agree with benchmark/test it
[01:55:37] fryguy: or just use puma since it's what everybody is beginning to recommend nowadays, namely engineyard and heroku
[01:55:46] fryguy: and support for it is becoming increasing better and more prevalent
[01:56:20] rndm: https://blog.engineyard.com/2014/ruby-app-server-arena-pt2
[01:56:23] pontiki: rakm, i can't think of anything offhand that would do what you ask, i looked at Enumerable.
[01:56:34] pontiki: someone over in #ruby might have a better idea, rakm
[01:56:39] rndm: recommends unicorn for speed-sensitive cases
[01:56:55] rndm: it was in seeking insight into this that spurred my original question
[01:56:59] Moonlight-Angel: has joined #RubyOnRails
[01:57:00] one_zero: has joined #RubyOnRails
[01:57:06] rndm: -- or is the article just old?
[01:58:34] krz: has joined #RubyOnRails
[01:58:37] fryguy: it's pretty old
[01:59:18] sevenseacat: ACTION gets popcorn
[01:59:23] sevenseacat: *your* original question?
[01:59:24] Spami: has joined #RubyOnRails
[02:00:20] rndm: ? I stated I was seriously interested...
[02:00:31] rndm: forget it.
[02:00:53] sevenseacat: trying to work out if you and Exuma are the same person, or if you're the buddy
[02:01:04] Exuma: we're not the same person
[02:01:10] Exuma: we're trying to figure out the same problem
[02:01:12] hotpancakes: has joined #RubyOnRails
[02:03:50] charliesome: has joined #RubyOnRails
[02:05:44] war_pigs: has joined #RubyOnRails
[02:06:38] bratsche: has joined #RubyOnRails
[02:06:39] beauby: has joined #RubyOnRails
[02:09:11] hololeap: has joined #RubyOnRails
[02:09:37] asheinfeld: has joined #RubyOnRails
[02:10:07] jfarmer: has joined #RubyOnRails
[02:10:07] frishi: has joined #RubyOnRails
[02:12:40] Oog: has joined #RubyOnRails
[02:13:02] wenqin: has joined #RubyOnRails
[02:13:13] Oog: anyone know with aws beanstalk how i run the rails server inthe worker environment...?
[02:13:55] arooni-mobile__: has joined #RubyOnRails
[02:13:57] arooni-mobile: has joined #RubyOnRails
[02:14:39] wenqin: anybody know whats wrong with my code here: http://stackoverflow.com/questions/31234384/could-not-find-the-source-associations-followed-in-model-relationship
[02:15:18] wenqin: its a self-referential association, of a user following another user
[02:15:43] sevenseacat: wenqin: you have a typo in your code - 'foregin_key' should be 'foreign_key'
[02:16:21] wenqin: wow wow thank you sevenseacat :)
[02:16:49] sevenseacat: also, `michael.follower` doesnt make much sense
[02:17:18] sevenseacat: are you calling `michael.followers` ?
[02:17:21] wenqin: wait why doesn't it make sense? What should i write?
[02:17:42] wenqin: yes its michael.followers, I think i typed there to
[02:18:06] sevenseacat: ok the typo fixes should fix it then
[02:18:17] jdayvie: Hello everyone =)
[02:19:15] jdayvie: Hope everyone is doing well this evening =)
[02:19:24] abuzze: has joined #RubyOnRails
[02:19:35] jdayvie: If anyone has knowledge of Carmen & Devise, please let me know. I have been having issues today trying to make things work =P
[02:20:00] sevenseacat: if you ask a question, people might be able to help you.
[02:20:03] leonardoajim: has joined #RubyOnRails
[02:21:10] jdayvie: Question with Carmen & Devise in detail: http://stackoverflow.com/questions/31232664/subregion-not-updating-or-showing-within-carmen
[02:22:08] sevenseacat: ok, so you likely have a javascript error when you change the country
[02:22:13] sevenseacat: can you check in your js console?
[02:22:36] chouhoulis: has joined #RubyOnRails
[02:23:34] rickmasta: has joined #RubyOnRails
[02:24:08] rickjames: has joined #RubyOnRails
[02:25:25] RickJamesTheThir: has joined #RubyOnRails
[02:25:30] Oog: i cant find anything on rails aws beanstalk worker tier
[02:25:49] RickJamesTheThir: I was needing help with an issue of how some css properties are applied in my rails application.
[02:26:26] RickJamesTheThir: So I have this issue in which if I click on the individual index.html and view it the line-height property is not actually applied but if I view the index.html file by using rails than the line-height is actually applied
[02:26:46] earthquake: has joined #RubyOnRails
[02:26:59] RickJamesTheThir: In this situtation I would actually prefer that the line-height of this element be ignored like it is when not using rails. I'm not sure if it has something to do with the asset pipeline or how the css is served?
[02:27:36] 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?
[02:28:10] beauby: has joined #RubyOnRails
[02:28:12] RickJamesTheThir: ^ lol I didn't mean gender specific it was meant like hey guys
[02:28:25] jdayvie: Hey, sorry!
[02:28:27] jdayvie: I am here =P
[02:28:59] sevenseacat: rickjamesthethir: well now you know :)
[02:29:02] jdayvie: Sevenseacat: That is where my issue is I suppose because I could never understand it correctly.
[02:29:26] sevenseacat: jdayvie: ok do you know how to open the js console?
[02:29:48] RickJamesTheThir: Sevenseacat: are you asking me or jdayvie?
[02:30:06] sevenseacat: I only used one person's name in the question i asked
[02:30:18] sevenseacat: and it wasn't yours rickjamesthethir
[02:30:50] jdayvie: No...not the JS console. At the moment, I remove the JS from the file because there was too much that I had to change and was unsure what to place.
[02:31:04] michael_mbp: has joined #RubyOnRails
[02:31:26] sevenseacat: ok, so there's no possible way it can work then, because the JS is what will call your server to get a list of regions to show, when you change the country
[02:31:42] jdayvie: Okay, so hold on, let me get the code and explain =)
[02:31:42] valetudo: has joined #RubyOnRails
[02:31:43] adavia: wondering why after_ceate is not being fired
[02:31:47] iamse7en: has joined #RubyOnRails
[02:31:49] sevenseacat: jdayvie: great
[02:31:50] jdayvie: (Thank you for taking the time by the way!)
[02:31:57] sevenseacat: adavia: because you're not creating anything?
[02:32:06] iamse7en: can carrierwave gem do avatar uploading by url as well as by file?
[02:32:18] sevenseacat: jdayvie: I've used that same code snippet a few times so I'm pretty good with how it works :)
[02:32:20] sevenseacat: iamse7en: yes.
[02:32:34] iamse7en: cool thx, i'll check out documentation
[02:32:39] jdayvie: Fantastic! Are you okay with me just chatting here with it all or you prefer something like Twitter?
[02:32:46] sevenseacat: iamse7en: that probably would have been a good thing to do *first*.
[02:32:49] sevenseacat: jdayvie: here is fine :)
[02:32:54] adavia: sevenseacat: it was. i did something now which is stop firing the callback
[02:32:58] jdayvie: So here is the code via the gem.
[02:32:59] jdayvie: $('select#order_country_code').change (event) ->
[02:32:59] jdayvie: select_wrapper = $('#order_state_code_wrapper')
[02:32:59] jdayvie: $('select', select_wrapper).attr('disabled', true)
[02:32:59] jdayvie: country_code = $(this).val()
[02:33:00] jdayvie: url = "/orders/subregion_options?parent_region=#{country_code}"
[02:33:00] jdayvie: select_wrapper.load(url)
[02:33:14] Ropeney: sevenseacat: Pretty sure guys is accepted as not being gender specific http://www.collinsdictionary.com/dictionary/english/guys
[02:33:18] chintanparikh: has joined #RubyOnRails
[02:33:24] sevenseacat: a gist for sharing code would have been better, but that's okay for now :)
[02:33:37] jdayvie: Sorry, this is my first time on here, not sure what a gist is =P
[02:33:37] sevenseacat: Ropeney: I'm glad you shared your opinion on that matter.
[02:33:41] helpa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[02:33:59] jdayvie: Okay, thank you. I will read up on that after =)
[02:34:26] jdayvie: So the main problem I have is the URL.
[02:34:35] jdayvie: I know they user order for their Model and mine is User (since I am using Devise).
[02:34:45] TheShaun: has joined #RubyOnRails
[02:34:47] sevenseacat: yeah you'll probably need to customize the select selector, to match your model/field name
[02:34:55] sevenseacat: and possibly the URL
[02:35:56] jdayvie: Im confused =P
[02:36:11] sevenseacat: thats okay :) can you gist the code for your form?
[02:36:25] jdayvie: I know I need to make changes with the DIVs/Model name.
[02:36:36] jdayvie: Hmm, okay...let me look at that link and see.
[02:36:54] testing123: has joined #RubyOnRails
[02:36:56] sevenseacat: its just a place you can share code, with it being easy to read and syntax highlighted andeverything
[02:37:03] sevenseacat: pasting code on IRC is kinda hard to read
[02:37:14] jdayvie: I can see that =P
[02:37:30] jdayvie: Which code would you like me to place there? Model? Controller? Views?
[02:37:37] jdayvie: I have them all up on stack overflow in a post.
[02:38:00] sevenseacat: yeah I saw the SO question
[02:38:28] sevenseacat: ok, so this is a form for a user, and your field name is country, right
[02:38:42] jdayvie: The country works perfectly.
[02:38:58] sevenseacat: so the first line of the js should be changed from 'select#order_country_code' to 'select#user_country'
[02:39:30] sevenseacat: then we should be able to see something in the js console when you change the country selector
[02:39:43] jdayvie: Now I have a silly question.
[02:39:52] adavia: sevenseacat: see something wrong here? https://gist.github.com/adavia/16dc5f128f9c301aa550
[02:39:56] jdayvie: The gemfile wants it in the .coffee file so I should go there?
[02:40:02] jdayvie: Place it in there or just stick with .js
[02:40:20] sevenseacat: jdayvie: if you're just learning, i'd stick with js
[02:40:22] FunkyPajamas: has joined #RubyOnRails
[02:40:32] jdayvie: Yeah, I know zero on coffee. Minimal on JS.
[02:40:36] sevenseacat: arr, that code is in coffeescipt isnt it
[02:40:53] jdayvie: Yeah, thats the problem.
[02:41:01] jdayvie: So I was just going with that, trying to at least and replacing what I needed to.
[02:41:51] growlove: has joined #RubyOnRails
[02:41:52] jdayvie: Oops, sorry. Okay, thank you.
[02:43:15] frishi: has joined #RubyOnRails
[02:43:34] FunkyPajamas: Night everyone.
[02:43:45] jesterfraud: FunkyPajamas night!
[02:43:45] chintanparikh1: has joined #RubyOnRails
[02:43:46] FunkyPajamas: Or morning/afternoon, as the timezone dictates.
[02:43:53] sevenseacat: jdayvie: I used a magic tool to translate it to js https://gist.github.com/sevenseacat/78c503b78ecfc6972860
[02:43:53] FunkyPajamas: :) Hey jester
[02:44:06] sevenseacat: does it make more sense in js form?
[02:44:18] jdayvie: Impressive!
[02:44:20] jdayvie: Let me see...
[02:44:25] jesterfraud: ?ugt FunkyPajamas
[02:44:36] sevenseacat: jesterfraud: no ruboto here
[02:44:50] jdayvie: Yes, but I am ultimately still unsure regarding the URL.
[02:45:08] jdayvie: Mine is literally /users/edit
[02:45:19] sevenseacat: thats cool. so when you added a route for the subregion part, what was it?
[02:45:45] jdayvie: I never did that either because I was unsure what I need to route, additionally since devise has the routes automatically setup.
[02:46:07] sevenseacat: ok, so the last part of https://github.com/jim/carmen-demo-app is that you need to set up a route to render just the subregion part of the page
[02:46:31] sevenseacat: this URL is what gets called with the country you select, so it can get the new HTML for the subregion part
[02:46:38] jesterfraud: sevenseacat :<
[02:46:48] sevenseacat: you can make it /users/subregion_options or something like that
[02:48:18] jdayvie: Right, okay...well that was also the confusion with Devise. Just like the partial that was created, I had to make it within the devise folder because otherwise it was not found. So these should be made in the devise folder too?
[02:48:37] sevenseacat: yeah devise adds a bit of spanner in the works
[02:48:56] jdayvie: Yeah...I think if I didn't have Devise I would have been fine, but alas here I am =P
[02:49:17] seank_: has joined #RubyOnRails
[02:49:21] elektronaut: has joined #RubyOnRails
[02:49:34] drPoggs: has joined #RubyOnRails
[02:49:39] FunkyPajamas: jdayvie I'm also dealing with some Devise stuff right now. It can get pretty crazy. :D
[02:49:51] krz: has joined #RubyOnRails
[02:50:04] jdayvie: Devise is very helpful at first, but then can be a pain to work around I'm learning =P
[02:50:08] sevenseacat: all good, looking up the devise docs on extending controllers
[02:50:45] jdayvie: Should I create a subregion_options file within the devise folder?
[02:51:03] sevenseacat: which devise folder?
[02:51:08] jdayvie: Then just go off that? Issue is still that, it would not be the link.
[02:51:22] jdayvie: It would be under registration.
[02:51:30] jdayvie: Devise/Registration
[02:51:44] sevenseacat: are you looking at views?
[02:51:53] jdayvie: That is where I have the partial.
[02:51:53] sevenseacat: I thought you had set up the view part already
[02:52:21] andhof-mt: has joined #RubyOnRails
[02:52:25] jdayvie: Are we talking about the same file but calling it two different names?
[02:52:36] sevenseacat: I have no idea what file you're talking about
[02:52:42] jdayvie: _subregion_select is what I have in the folder.
[02:52:48] sevenseacat: I'm not talking about any file, I'm reading devise documentation trying to find the right link to give you
[02:53:04] andhof-mt: I made a helper function called parse_url which takes a url param. It's in my pages controller. I'm modifying a view inside the pages controller. How can I call parse_url from my view in ERB?
[02:53:15] andhof-mt: first attempt was <%= parse_youtube(@Lesson.video) %> which didn't work
[02:53:21] jdayvie: Ahh, I was talking about the file you were mentioning earlier.
[02:53:44] sevenseacat: andhof-mt: you need to make it available to your views inside your controller - check the docs for helper_method
[02:54:14] christiandsg: has joined #RubyOnRails
[02:55:00] sevenseacat: jdayvie: so, where exactly are we up to in the process? have we placed the javascript, run it, seen an error?
[02:55:53] GriffinHeart: has joined #RubyOnRails
[02:55:55] Atomic_Work: has joined #RubyOnRails
[02:55:59] andhof-mt: sevenseacat, the helper method docs fixed it. Thank you
[02:56:17] jdayvie: We are at the JS file right now. I just don't know what the URL should be for it.
[02:56:25] jdayvie: Other than that, I changed the JS code.
[02:56:27] thedonkdonk: has left #RubyOnRails: ()
[02:56:36] sevenseacat: dont worry about that for now. let's put it in the page and make sure it works.
[02:56:39] sevenseacat: one step at a time.
[02:56:49] sypheren: has joined #RubyOnRails
[02:56:52] jdayvie: Its saved in there. You mentioned the JS console. How would I enter that?
[02:56:59] Atomic_Work: has left #RubyOnRails: ()
[02:57:10] sevenseacat: what browser are you using?
[02:57:11] Creeves: has joined #RubyOnRails
[02:57:18] Creeves: hey guys, if i want to run every test in my spec/controllers/ directory including subdirectories, would 'rspec spec/controllers/**/*.rb' work as a command?
[02:57:28] jdayvie: I have three different ones up so any but the one my localhost is on is firefox at the moment.
[02:57:36] sevenseacat: Creeves: just `rspec spec/controllers` would be fine.
[02:57:39] jdayvie: Could also use Safari or Chrome.
[02:57:41] Creeves: it doesn't seem to hit the .rb files in the 'controllers' directory, only the ones in a lower
[02:57:48] Creeves: sevenseacat: awesome thanks, ill try that now
[02:58:18] Creeves: hm that didn't match any
[02:58:26] sevenseacat: ok if you go to the developer settings in the firefox hamburger menu, there will be an option for web console
[02:58:33] ur5us: has joined #RubyOnRails
[02:58:59] beauby: has joined #RubyOnRails
[02:59:32] jdayvie: Its open with the console on a signup page.
[03:00:06] bf4: has joined #RubyOnRails
[03:00:16] sevenseacat: cool, leave it open, navigate to your form, and try changing the country select box
[03:00:18] ivanskie: has joined #RubyOnRails
[03:00:54] drale2k: has joined #RubyOnRails
[03:01:30] jdayvie: Did so and nothing changes. Only issue is that its not setup on a https at the moment.
[03:01:40] jdayvie: I suppose that means something in my JS is off?
[03:01:47] sevenseacat: where did you put the js?
[03:02:07] jdayvie: application.js
[03:02:12] jdayvie: I have another section of code in there.
[03:02:56] Creeves: it looks like 'spec/controllers' doesn't seem to match any, 'spec/controllers/*' doesn't match recursively and 'spec/controllers/**/*' doesn't match files directly inside the controllers directory
[03:03:06] sypheren: has joined #RubyOnRails
[03:03:28] jdayvie: https://gist.github.com/Jdayvie/ef5edf2d750d4e10b79c
[03:03:35] jdayvie: Actually hold on...
[03:03:37] sevenseacat: spec/controllers will match spec/controllers and everything inside it.
[03:04:28] jdayvie: https://gist.github.com/Jdayvie/ef5edf2d750d4e10b79c
[03:04:29] Creeves: including inside subdirectories?
[03:04:35] jdayvie: That is everything in my application.js
[03:04:36] sevenseacat: Creeves: yes.
[03:04:40] dented42: has joined #RubyOnRails
[03:05:01] Creeves: hmm okay, i'm running 'bundle exec rspec spec/controllers' but it's not matching any
[03:05:05] Creeves: maybe it's the bash scrript
[03:05:15] sevenseacat: Creeves: do you have any tests inside that folder?
[03:05:42] FunkyPajamas: Creeves, are you getting anything at all from the command (e.g. 0 examples found) or nothing at all?
[03:05:51] sevenseacat: jdayvie: can you change like 34 to `$(document).on("ready page:load", function() {`
[03:05:52] Creeves: yeah i'm getting 0 found
[03:06:02] sevenseacat: Creeves: so your spec files arent correctly named, most likelyt
[03:06:08] sevenseacat: do they end in _spec.rb ?
[03:06:30] Creeves: ahhh nah they don't, that would be it
[03:06:38] Creeves: ill try that out but that's most likely it, cheers
[03:06:46] Creeves: i just named like users.rb etc
[03:07:27] jdayvie: Done - Still the same.
[03:07:57] jdayvie: Wait..hold on =P
[03:08:15] Creeves: yeah that's fixed it, thanks again sevenseacat and FunkyPajamas
[03:08:31] jdayvie: Nope, the same. Still no errors within the console.
[03:08:39] jdayvie: Except the one I mentioned earlier.
[03:08:54] jdayvie: Im sorry but really, really appreciate your help and anything I can do =)
[03:09:27] xcesariox: has joined #RubyOnRails
[03:09:27] sevenseacat: 'one i mentioned earlier'?
[03:09:36] sevenseacat: you didnt mention any JS errors earlier
[03:09:50] jdayvie: "Did so and nothing changes. Only issue is that its not setup on a https at the moment. "
[03:10:03] sevenseacat: oh didnt know that was a js error
[03:10:13] sevenseacat: so you change the select box and nothing appears in your console?
[03:10:19] sevenseacat: or your network tab?
[03:10:20] jdayvie: Its not, its a security but just letting you know =)
[03:10:24] beauby: has joined #RubyOnRails
[03:10:45] workmad3: has joined #RubyOnRails
[03:10:46] jdayvie: Oh wait...stuff going on in my network tab.
[03:10:49] braincras: has joined #RubyOnRails
[03:10:50] jdayvie: Nothing in console.
[03:11:01] annlewis: has joined #RubyOnRails
[03:11:07] wenqin: hey sevenseacat, thanks for helping me earlier but the code still doesn't seem to work. If you look at the feed method in the user model, it still throws a: ActiveRecord::HasManyThroughSourceAssociationNotFoundError: Could not find the source association(s) :follower in model Relationship. Try 'has_many :following, :through => :active_relationships, :source => <name>'. Is it one of ?
[03:11:17] wenqin: https://gist.github.com/wenqinYe/676a3058d3700e98945a
[03:11:41] mary5030: has joined #RubyOnRails
[03:11:51] jdayvie: I have 6 .js files with not modified tags.
[03:11:53] sevenseacat: wenqin: what code are you running to get the error?
[03:12:07] jdayvie: Thought nothing changes when I select a country.
[03:12:09] bin_005: has joined #RubyOnRails
[03:13:13] jdayvie: Well...when I refresh those .js files are listed. Actually going to the page only one Get line successfully appears.
[03:13:15] wenqin: @sevenseacat: in the test: michael = users(:michael), and then: michael.feed
[03:15:58] adavia: sevenseacat: any idea why after_create is not being fired here? https://gist.github.com/adavia/16dc5f128f9c301aa550
[03:16:09] sevenseacat: ACTION implodes from all the requests
[03:16:24] wenqin: adavia i can help, whats the error message?
[03:16:47] jdayvie: Sorry Seven :(
[03:17:01] adavia: wenqin: no errors.. just profile is not being created
[03:17:17] sevenseacat: adavia: you probably have a validation error on your profile.
[03:17:28] sevenseacat: so it's not saving. change the Profile.create to Profile.create! and see if it explodes.
[03:17:49] Radar: sevenseacat: :D
[03:18:07] Radar: wenqin: Stacktrace for the error please.
[03:18:09] sevenseacat: Radar: save meeeeeeeeeeeeee
[03:18:12] Radar: ACTION saves
[03:18:24] christiandsg: has joined #RubyOnRails
[03:18:36] adavia: sevenseacat: is it the inclusion? https://gist.github.com/adavia/16dc5f128f9c301aa550
[03:18:48] Radar: adavia: You tell us
[03:19:02] Radar: adavia: What happens when you call create! instead of create?
[03:19:08] adavia: let me check
[03:19:16] wenqin: stacktrace: https://gist.github.com/wenqinYe/6569c321ddf684df5540
[03:20:02] Radar: wenqin: Fun. Can you reproduce this issue in a new app for me?
[03:20:10] sevenseacat: ACTION disappears
[03:20:19] Radar: wenqin: Distill it down to just the relationship model and the following/followers associations?
[03:20:51] jdayvie: http://localhost:3000/orders/subregion_options?parent_region=AF - I got the JS error.
[03:21:01] jdayvie: Oooh, I see Seven left, well shucks.
[03:21:04] Radar: jdayvie: we can't see that link
[03:21:10] Radar: For hopefully obvious reasons
[03:21:12] FunkyPajamas: Guys, what would be a proper pattern/design for a class or module that needs access to controller data (request, response, session, current_user) but isn't really a representation of a resource (i.e. not necessarily RESTful)?
[03:21:32] Radar: FunkyPajamas: why does the object need access to all of those? It sounds like you're creating a monster there.
[03:21:44] jdayvie: Yes, I understand. I know the link isn't to be seen. He was trying to help me have a .js error appear in the log and I adjusted the code and made it happen.
[03:21:56] bronson: has joined #RubyOnRails
[03:22:06] jdayvie: She**, sorry... =(
[03:22:09] wenqin: radar: I dont quite understand what you mean by distill it down. Do you only want to see the relations?
[03:22:13] mary5030: has joined #RubyOnRails
[03:22:26] Radar: wenqin: I mean: create a new application with the bare minimum amount of code that's needed to reproduce this problem.
[03:22:29] FunkyPajamas: Haha, that may be the case. I'm using Rack-LTI on my Devise-authenticatable app.
[03:22:34] Radar: wenqin: Just to make sure nothing else is playing around with it.
[03:22:40] wenqin: ok got it
[03:23:04] jdayvie: Well, if anyone has experience in Devise/Carmen, please let me know. I am one step closer to figuring it out =P
[03:23:12] FunkyPajamas: Rack-LTI uses application.rb to configure and has a lambda for success after basic key/secret validation.
[03:23:20] surrealanalysis: has joined #RubyOnRails
[03:23:32] FunkyPajamas: In that lambda I need to do Single Sign On or create users on the fly if they don't exist.
[03:23:49] Radar: FunkyPajamas: Can you give me an example of what that lambda looks like?
[03:24:05] FunkyPajamas: Sure! Let me gist that
[03:24:13] war_pigs: has joined #RubyOnRails
[03:24:15] Radar: jdayvie: I wrote the/a book on Rails :P Can you reproduce the issue you're seeing in a new app?
[03:24:51] jdayvie: Radar: Wow, well thank you (for offering help and helping many others too!) and congrats =P
[03:25:07] Radar: sevenseacat also wrote that book
[03:25:15] adavia: Radar: what i should be expecting doing that?
[03:25:15] Radar: I guess she's gone to lunch or back to work now
[03:25:27] Radar: adavia: It should show an exception.
[03:25:39] Radar: adavia: This might be easier to try in the console
[03:25:51] jdayvie: Hey again Seven =P Radar (whoever is open to helping? =P): I am trying to get carmen to work with devise.
[03:26:26] hololeap: has joined #RubyOnRails
[03:26:27] jdayvie: Seven was kind enough and edited code and I finally have an error appear when I click the country link. The issue is that the state/subregion area is not update when I select a country.
[03:26:32] adavia: Radar: not getting anything
[03:26:36] earthquake: has joined #RubyOnRails
[03:26:42] Radar: adavia: Ok. Try creating a new user in the console
[03:27:05] jdayvie: Ultimately, I am unsure as to the URL for the .js code. url = "/orders/subregion_options?parent_region=" + country; because with Devise, it makes things a little different.
[03:27:36] bruno-: has joined #RubyOnRails
[03:27:43] jdayvie: Radar: If you don't mind me asking, what book did you write? =O
[03:27:49] Radar: jdayvie: !r4ia
[03:27:49] helpa: jdayvie: 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
[03:28:16] jdayvie: Fantastic! I will bookmark it and take a look in a bit =)
[03:30:04] jdayvie: Not sure how to place a URL for .js file when the country/state selection is on two different pages via devise =)
[03:30:36] brendan-: has joined #RubyOnRails
[03:30:44] FunkyPajamas: Radar: WIP application.rb lambda -> https://gist.github.com/mchavarriagam/25af45602ec677f10da3 + WIP LtiHandler.rb -> https://gist.github.com/mchavarriagam/aa4e76ed768a9a6d1763
[03:32:08] FunkyPajamas: So basically, I need to call a method in application.rb that will: a) check if user exists (so Model access is needed). b) authenticate user (currently using devise, so controller access is needed). c) If user does not exist, create, then authenticate (Model + Controller).
[03:32:58] FunkyPajamas: I guess I could just try to find the user and if it exists then I could redirect by doing a post to session controller, but I also need access to request/response in order to do redirect.
[03:32:58] adavia: Radar: this is what i get https://gist.github.com/adavia/576000bbdc35b8df266e
[03:33:30] sypheren: has joined #RubyOnRails
[03:34:00] chintanparikh: has joined #RubyOnRails
[03:34:32] FunkyPajamas: From what I've read, Devise *has* to work within the Controller. i.e. all session/current_user stuff is Controller-exclusive (which makes sense).
[03:35:24] GriffinHeart: has joined #RubyOnRails
[03:36:09] FunkyPajamas: Other thing is that my head is spinning by trying to be RESTful on this, haha. Like, if I'm going to create a new controller, what do I call it? Lti isn't really a resource. I can't "create" an Lti.
[03:36:25] FunkyPajamas: I create a session *or* a user. But I already have Controllers for those.
[03:36:39] FunkyPajamas: So perhaps what I need is just a module that determines which Controller to redirect to?
[03:38:34] urbanmonk: has joined #RubyOnRails
[03:38:44] Radar: FunkyPajamas: You can have multiple files in the same gist.
[03:39:08] jdayvie: Hey Radar: If you are able to help me regarding a .js file for carmen/devise, please let me know =) Don't want to overwhelm.
[03:39:40] bronson: has joined #RubyOnRails
[03:39:47] christiandsg: has joined #RubyOnRails
[03:41:17] wenqin: radar if you are reading this, the distilled app works. I'll get back to this in the morning hopefully I'll realize the bug.
[03:42:21] wenqin: thanks for your help though, and thank sevenseacat for me too :)
[03:43:22] FunkyPajamas: Radar: oops :) Silly me.
[03:43:32] Radar: FunkyPajamas: I don't think subclassing from ActionController::Base is a good idea if they're just being passed in
[03:43:49] Radar: \o/ wenqin solved his problem (kinda)
[03:43:56] Radar: It's not a controller
[03:44:03] Radar: I've never used Rack-LTI so I don't know for certain
[03:44:49] FunkyPajamas: Radar: yeah, definitely, I don't like having to inherit from it in there. It think it's smelly.
[03:44:57] Radar: FunkyPajamas: I do see how it's working in the README though. You could probably get away with creating just a normal class and having that have an initialize method.
[03:46:27] FunkyPajamas: Radar: that makes sense. But I wouldn't be able to do Devise::Controllers:SignInOut from within a regular class unless that class inherits from Controller.
[03:46:40] Radar: Wait why do you want to do that?
[03:47:31] FunkyPajamas: Radar: One of the features of LTI is Single Sign On. So basically I need to check if user exists. If it does, do sign_in. If not, do User.create, then sign_in.
[03:47:48] jimmiejohnson48: has joined #RubyOnRails
[03:48:06] Radar: Ok, but I don't see why that means you need to inherit from ActionController::Base (hereafter referred to as AC::B to save my fingers)
[03:48:10] FunkyPajamas: Radar: I can get away with doing User.find and User.create from within the normal class, easy. But when it comes to doing Devise sign_in I guess I'll need to redirect?
[03:48:17] jimmiejohnson48: has left #RubyOnRails: ()
[03:48:32] Radar: FunkyPajamas: request.env['warden'].set_user(user)
[03:48:38] Radar: that's all devise's sign_in helper is doing, really.
[03:48:55] Radar: and since you have access to the request object in your new class you can totally do that
[03:49:07] FunkyPajamas: Radar: oh my. I knew I'd come to the right place.
[03:49:22] FunkyPajamas: Radar: trying that right away :D
[03:50:14] danielglh: has joined #RubyOnRails
[03:50:45] jdayvie: If anyone has knowledge with .js on rails, please let me know =) Specifically with gems carmen/devise =)
[03:52:06] Radar: jdayvie: I don't think I can help in this case.
[03:52:20] Radar: jdayvie: I think this is the kind of issue where I would need to see it happening for myself in order to understand what is happening here.
[03:52:25] jdayvie: That's okay, I appreciate it =)
[03:52:52] jdayvie: Carmen is an easy gem to use and I could easily follow directions but with Devise, it makes things a little...different =P
[03:53:54] mary5030: has joined #RubyOnRails
[03:54:04] Miesco: has joined #RubyOnRails
[03:54:24] Miesco: quick question. What happens when you move your rails application to a new machine with a different version of rails and different versions of all the gems?
[03:54:45] Radar: You run "bundle install" and everyone is happy
[03:55:05] Radar: unless you messed up your Ruby install somehow by using a system-Ruby or RVM, in which case I would put on my "grumpy cat face"
[03:55:40] Miesco: Radar: I installed ruby from debian package management system
[03:55:55] Radar: Despite being told not to do that last week?
[03:56:01] Radar: ACTION remembers a lot of things
[03:56:15] FunkyPajamas: Radar: *victory dance* you're a Rock star! Thanks!
[03:56:18] Radar: FunkyPajamas: :)
[03:57:02] Miesco: Radar: Well I almost went insane so I did: find / | grep ruby | xargs rm -rf
[03:57:09] Miesco: then installed debian ruby
[03:57:18] Miesco: Now everything working all shiny and new and perfect :D
[03:57:58] frishi: has joined #RubyOnRails
[03:58:21] jfarmer: the mind boggles
[03:58:57] Miesco: Radar: "bundle install" works. Its all working perfect ! My web site says "hello, world" just like its supposed to.
[04:01:52] hololeap: has joined #RubyOnRails
[04:02:19] dcunit3d: has joined #RubyOnRails
[04:05:51] arooni-mobile__: has joined #RubyOnRails
[04:05:53] arooni-mobile: has joined #RubyOnRails
[04:07:27] lessless: has joined #RubyOnRails
[04:07:56] jdayvie: Is it possible to generally say what an error 500 is normally related to?
[04:08:02] helpa: Check your logs. Namely everything in the log folder of your rails app and the error and access logs from Apache or whatever else you're using.
[04:08:13] Bilbo-baggons: has joined #RubyOnRails
[04:09:16] jdayvie: Okay, thank you Radar - Doing so now =) Seem to slowly be trucking along...I think...I hope =P
[04:09:57] sypheren: has joined #RubyOnRails
[04:13:03] jdayvie: Resolved one problem and now have another =P
[04:13:32] Radar: welcome to programming
[04:15:31] sevenseacat: heh. is true.
[04:15:45] jdayvie: All part of the fun =P
[04:16:21] abuzze: has joined #RubyOnRails
[04:16:24] microdex: has joined #RubyOnRails
[04:16:42] cbz: has joined #RubyOnRails
[04:17:02] jdayvie: I just want to say thank you for you help earlier Seven and I apologize if I stressed you out - Was not my intention and I do appreciate your time.
[04:17:09] jenrzzz: has joined #RubyOnRails
[04:17:19] braincrash: has joined #RubyOnRails
[04:17:24] jdayvie: Still working on the issue but its moving along I hope =P
[04:17:41] earthquake: has joined #RubyOnRails
[04:17:43] microdex: has joined #RubyOnRails
[04:17:43] Oog: has joined #RubyOnRails
[04:17:50] Oog: how are foreign_key names generated?
[04:18:42] sevenseacat: jdayvie: all good, just can be a little overwhelming when ten people ask specifically for your help at once lol
[04:18:54] sevenseacat: (slight exaggeration, but not by much)
[04:19:13] Oog: nm i found the code - why does it use a hash instead of just tablename_column_name_fk ?
[04:19:29] jdayvie: I understand =P I could only imagine how that would be, especially since most answers are not plain and simple.
[04:19:29] sevenseacat: ACTION is back, refuelled, iced coffee'd up and ready to go
[04:19:29] annlewis: has joined #RubyOnRails
[04:19:59] jdayvie: If you are willing to help once more, let me know =P I am further along, and have everything done...nearly =P
[04:20:15] sevenseacat: good to know things are moving along :) whats the issue now?
[04:20:18] jdayvie: No pressure and okay if not though! =)
[04:20:38] jdayvie: Well...I don't know =P The JS is in, routes are setup and method in controller.
[04:20:52] jdayvie: When I select a country, it changes the subregion always to Please Select a Country.
[04:21:09] sevenseacat: ok so what do your rails logs say when you change the select box?
[04:21:16] sevenseacat: you should have a request in there for your new subregion action
[04:21:24] jdayvie: Should I post that here of gist that too?
[04:21:34] sevenseacat: in a gist please :)
[04:21:44] jdayvie: Sure thing!
[04:21:46] jdayvie: Coming right up
[04:22:00] jdayvie: https://gist.github.com/Jdayvie/ba8a47e2be57f65721dd
[04:22:06] hotpancakes: has joined #RubyOnRails
[04:22:20] jdayvie: Thats when I first click the edit page and then the country box itself.
[04:22:24] sevenseacat: ah hah, see here https://gist.github.com/Jdayvie/ba8a47e2be57f65721dd#file-gistfile1-txt-L16 we're not getting the correct country code through
[04:22:30] mary5030: has joined #RubyOnRails
[04:22:44] sevenseacat: so something's a bit naffed in the javascript that makes the request
[04:22:48] jdayvie: Ahh yes...I noticed that.
[04:22:55] jdayvie: Argh, okay...hold on =P
[04:23:04] smathy: has joined #RubyOnRails
[04:23:27] jdayvie: Updated same gist with my JS code.
[04:23:31] jdayvie: Im looking through it now too.
[04:23:32] sevenseacat: if you noticed that, then you're learning :)
[04:23:56] jdayvie: Slowly but surely!
[04:24:00] jdayvie: ...hopefully =P
[04:24:08] jdayvie: select#user_country
[04:24:18] jdayvie: I don't have an id of that in my HTML.
[04:24:30] sevenseacat: so something's going wrong here https://gist.github.com/Jdayvie/ba8a47e2be57f65721dd#file-gistfile1-txt-L73-L74
[04:24:35] kkeuning: has joined #RubyOnRails
[04:24:43] sevenseacat: can you gist the html for the form? i know i've asked this before
[04:24:58] sevenseacat: but i forgets it
[04:25:03] frishi: has joined #RubyOnRails
[04:25:06] jdayvie: Coming right up
[04:25:46] jdayvie: Its updated
[04:25:59] jdayvie: I didn't put the end portion of the rest of the form as I think its not needed but I can if you want.
[04:26:44] sevenseacat: nah thats plenty
[04:27:05] jdayvie: Ill place an ID user_country around the country input
[04:27:11] Surt_Q: has joined #RubyOnRails
[04:27:32] sevenseacat: it should be there already, otherwise the JS wouldnt be running
[04:28:07] sevenseacat: we're probably missing something reeeeeally obvious now
[04:28:07] ght: Question: We are using the cocoon gem to provide the user an HTML table with two select tags where they can dynamically add rows via an "add row" button. On page load, it iterates through current saved entries and renders them via the same partial, as seen here: https://gist.github.com/anonymous/6f618e2aa4da2431cc59
[04:28:09] sevenseacat: ACTION squints
[04:28:12] ght: That's the relevant code.
[04:28:42] jdayvie: Oh boy, okay. I will be looking around too =P
[04:28:45] ght: However, since the "new row" uses the same partial as the existing saved entries, we are attempting to add some code to determine whether or not the entry is new or existing.
[04:29:04] ght: Due to some javascript we utilize to manipulate the second select tag, based on the value of the first select tag.
[04:29:15] ght: In this basic example, does anyone know if this is possible?
[04:29:38] ght: The partial will automatically have the saved values as the "selected" option for select in the select tags when it is a stored entry.
[04:29:49] ght: And we don't want to overwrite that with our javascript.
[04:30:16] ght: So if there was some method we could check to see if the current entry is saved or new, that would be prime.
[04:30:40] jdayvie: Seven: When I render partial, I don't put the underscore in the beginning, correct?
[04:30:55] jdayvie: Okay, just making sure =p
[04:31:01] dopie: has joined #RubyOnRails
[04:31:04] krz: has joined #RubyOnRails
[04:31:21] sevenseacat: jdayvie: can you try removing the line `var country, select...` and running it again? this is a bit odd
[04:31:28] jdayvie: Sure thing
[04:31:43] wethu: has joined #RubyOnRails
[04:31:47] jfarmer: ght If you have access to the underlying ActiveRecord object, you can check the object.
[04:32:23] ght: jfarmer: In the presented example, how would one check the underlying AR object? Normally we'd apply .nil?
[04:32:53] jdayvie: Same result - I updated the gist for you to see if you wanted: https://gist.github.com/Jdayvie/ba8a47e2be57f65721dd
[04:33:40] sevenseacat: ok, time to do some js debugging
[04:34:01] jfarmer: ght I haven't used cocoon in a long time, so I forget the details of how it works. It has to be a little "clever" to do what it does on the client-side.
[04:34:04] jfarmer: But using this example: https://github.com/nathanvda/cocoon#formtastic
[04:34:16] sevenseacat: after https://gist.github.com/Jdayvie/ba8a47e2be57f65721dd#file-gistfile1-txt-L79 can we add a line `console.log($(this)); console.log(country);` and see what that prints out to the web console when it runs?
[04:34:20] jdayvie: I have the console up and reading through the errors but I honestly am not sure what I am reading =P
[04:34:38] jfarmer: You can check for new-ness with new_record? (cf. http://api.rubyonrails.org/classes/ActiveRecord/Persistence.html#method-i-new_record-3F)
[04:35:12] jfarmer: I don't know what the various variables reference in the example you posted, so can't say how it'd apply to yours.
[04:35:29] jdayvie: Code: 304 Not modified
[04:35:39] krz: has joined #RubyOnRails
[04:35:40] ght: jfarmer: They reference an AR object consisting of those two columns.
[04:35:42] sevenseacat: in the web console?
[04:35:51] qejk: has joined #RubyOnRails
[04:35:52] eggoez: has joined #RubyOnRails
[04:36:09] jdayvie: Yes, when I click the box and change a country.
[04:36:09] ght: So this new_record?, it can be applied to form helper?
[04:36:13] ght: Doesn't look like it.
[04:36:22] jdayvie: rails console shows the same thing as last time.
[04:36:33] jdayvie: I apologize.
[04:36:36] jfarmer: You can get at the associated object with helper_object.object I think
[04:36:43] jdayvie: Let me place it in gist for you
[04:37:03] jdayvie: https://gist.github.com/Jdayvie/ba8a47e2be57f65721dd - updated =)
[04:37:08] ght: The cocoon code is just doing in HAML what we're already doing in ERB, don't see it checking for new record status.
[04:37:13] jdayvie: I apologize, I was still under Network.
[04:37:14] ght: jfarmer, really, ok.
[04:37:42] sevenseacat: jdayvie: ok, that looks exactly what it should be - you're selecting Canada i presume, which gives you country code CA
[04:38:25] ght: So I guess the real question is whether or not one can check within a form helper if the record already exists or not.
[04:38:35] ght: or using a form helper, rather.
[04:38:55] jfarmer: Yes, sure. f.object.new_record?
[04:39:07] sevenseacat: ACTION looks very suspiciously at the url= line
[04:39:08] ght: Interesting, thank you.
[04:39:18] sevenseacat: y u not put CA in the URL
[04:39:25] ght: jfarmer: And to grab the record itself to pull currently-saved values?
[04:39:36] jfarmer: <%= form_for whatever do |f| ... f.object.new_record? ... end %>
[04:39:51] ght: What is that? Does f.object reference the object iself, so, if the record had a column "name", could you go f.object.name?
[04:40:19] jfarmer: f.object is a reference to the AR object you're building a form for
[04:40:32] jfarmer: assuming f is the form helper passed to the block by form_for
[04:40:36] jfarmer: (or fields_for)
[04:40:44] sypheren: has joined #RubyOnRails
[04:40:56] ght: It is form_for, yes, from that gist.
[04:41:02] jfarmer: That's how things like <%= f.text_field :name %> "know" what to do.
[04:41:07] jdayvie: Could it be something in the partial or is most likely a .JS related issue?
[04:41:13] jfarmer: e.g., whether there's a value to put into the field, whether there's an error on the field, and so on
[04:41:25] ght: So say, if we wanted to check if !f.object.new_record?, how would we reference the name field in that object?
[04:41:31] jdayvie: I am looking through the partial, erb, routes, controller trying to see what could be wrong.
[04:41:32] ght: the column entitled "name"
[04:41:42] jfarmer: f.object is the AR object
[04:41:44] sevenseacat: jdayvie: I'm going to suggest something really stupid - retyping that `url=` line in case something went wonky in the copy-paste, like extra hidden characters got added
[04:41:56] jfarmer: You'd reference a field like you would in any other context where you had a reference to the appropriate AR object
[04:42:08] jdayvie: It's not stupid! Its an idea! =)
[04:42:18] jfarmer: form_for widget do |f| ... end
[04:42:21] jfarmer: f.object == widget
[04:42:45] sevenseacat: because the problem is definitely in the JS - we established that `country` is CA, but when we call the URL, the server isn't getting the CA
[04:42:56] ght: jfarmer: That's fantastic, thank you very much.
[04:42:57] ght: Great work.
[04:43:00] ght: Worked perfectly.
[04:43:10] sevenseacat: jfarmer: great work :D
[04:45:04] rhizome: sevenseacat: yeah, you can
[04:45:14] rhizome: oops, scrolled up. nvm
[04:45:16] jdayvie: Its working!! Thank you so much! I do have a question though. Instead of the #{country}, I did + country;
[04:45:24] jdayvie: Do you have any idea why that would make a difference?
[04:46:24] jdayvie: `url = "/users/subregion_options?parent_region=" +country;` is what I now have. Not sure why I did it but figured to try it.
[04:46:41] jdayvie: There should be a space between + and country but still.
[04:47:09] sevenseacat: I'm going to chalk it up to JS being stupid.
[04:47:16] ivanskie: has joined #RubyOnRails
[04:47:29] jdayvie: *kicks JS*
[04:47:29] sevenseacat: that was going to be my next suggestion, but they should be the exact same thing
[04:47:35] eggoez: has joined #RubyOnRails
[04:47:38] charliesome: has joined #RubyOnRails
[04:47:39] jdayvie: Yeah, thats what I thought...jeez.
[04:48:07] sevenseacat: i mean i went and looked up the last time i used this exact code, and i have url = "/admin/users/region_options?parent_region=#{country_code}"
[04:48:08] jdayvie: Well...I really cannot express how thankful I am for you!! Thank you for your time AND patience! This being my first time here, I've already learned so much from just our interaction =)
[04:48:23] sevenseacat: so it does work -_-
[04:48:41] sevenseacat: I'm glad it's working now :)
[04:48:51] jdayvie: Could not have done it without you.
[04:48:51] sevenseacat: I wonder if its something to do with js vs coffee
[04:48:56] jdayvie: Understand a lot more now.
[04:48:59] jdayvie: Ahh, good thinking.
[04:49:02] jdayvie: Very possible!
[04:49:14] jake_g: has joined #RubyOnRails
[04:49:15] earthquake: has joined #RubyOnRails
[04:49:15] sevenseacat: haaaaaaa apparently not
[04:49:24] jdayvie: Well, good try! =P
[04:49:27] sevenseacat: js doesnt let you do interpolation like #{}
[04:49:40] wethu: has joined #RubyOnRails
[04:49:42] jdayvie: So that was it.
[04:49:47] sevenseacat: so the transpiler on coffeescript.org got us wrong from the get-go
[04:49:58] sevenseacat: ACTION shakes fist
[04:49:59] jdayvie: Ahhh, way to go *kicks coffeescript*
[04:50:09] sevenseacat: mystery solved :)
[04:50:17] jdayvie: Biggest lesson learned out of all this =P
[04:50:27] sevenseacat: I knew I disliked coffeescript.
[04:50:41] jdayvie: I have zero interest in ever getting into it but I know, at some point, I will have to :(
[04:50:43] sevenseacat: ah well, is it all clear now?
[04:50:48] jdayvie: Crystal! :D
[04:50:55] Creeves: hey guys, can anyone tell me the best rspec syntax for 'expect every element of this array to hold true for some condition'?
[04:51:05] jdayvie: Could not thank you enough =D
[04:51:19] jdayvie: If there is anything I can ever do (which I doubt, but still!), just let me know =)
[04:51:32] sevenseacat: Creeves: !guys
[04:51:32] helpa: Creeves: 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?
[04:51:45] sevenseacat: I have a feeling I'm gonna get a lot of use out of that factoid
[04:52:17] Creeves: sevenseacat: sorry yeah, i definitely didn't want to be gender specific in my question
[04:53:11] sevenseacat: Creeves: I'd typically write something like my_array_of_awesome.each { |element| expect(element).to be_true } or something
[04:53:32] Creeves: ahh okay cool, do it inside the block
[04:53:55] sevenseacat: you might not get the clearest error message if one doesnt match though
[04:53:59] Creeves: i am just trying expect(some_array).to satisfy {|element| element == expected}
[04:54:08] Creeves: might be what i want, but if i can't then i will do that
[04:54:09] Creeves: thanks again :)
[04:54:13] chinmay_dd: has joined #RubyOnRails
[04:54:26] sevenseacat: and now I must do some actual work of my own lol
[04:54:32] raunicolae: has joined #RubyOnRails
[04:54:35] Creeves: yeah you seem to help so much haha
[04:54:37] raunicolae: has left #RubyOnRails: ()
[04:55:59] hotpancakes: has joined #RubyOnRails
[04:56:45] jenrzzz: has joined #RubyOnRails
[04:57:00] robbyoconnor: has joined #RubyOnRails
[04:57:53] jesterfraud: she's secretly preparing to throw a coup, and is gathering our allegiance first, hence the help
[04:58:11] jesterfraud: sevenseacat for PM/Supreme Ruler
[04:58:14] jake_g: Hi everyone. I???m very new to SQL and am trying to write a query to get the ???Trending Candidates??? based on how many times theyve been commented and voted on. My scope is working until I try to chain it with another query such as `count`. Heres what I???m running into http://pastie.org/10275095 What does it mean when it says ???subquery_for_count??? in the error?
[04:58:28] sevenseacat: jesterfraud: you mean I'm not the supreme ruler of #rubyonrails already?
[04:58:34] melonstorm: has joined #RubyOnRails
[04:58:34] melonstorm: has joined #RubyOnRails
[04:58:37] julienk: has joined #RubyOnRails
[04:58:41] jesterfraud: sevenseacat, talking about wider horizons ;)
[04:58:59] sevenseacat: well I tried to step up and take charge of ruby australia but the people said noooo
[04:59:09] sevenseacat: so I went hmph
[04:59:30] robbyoconnor: has joined #RubyOnRails
[04:59:32] workmad3: has joined #RubyOnRails
[05:00:45] sevenseacat: is okay. all part of my master plan.
[05:00:58] sevenseacat: coincidentally, i am also listening to masterplan. see? its a sign.
[05:01:43] robbyoconnor: has joined #RubyOnRails
[05:03:10] bronson: has joined #RubyOnRails
[05:04:50] charliesome: has joined #RubyOnRails
[05:06:26] jenrzzz: has joined #RubyOnRails
[05:07:32] jesterfraud: I'll toe the line, else you'll make me walk the plank?
[05:08:50] icosa1: has joined #RubyOnRails
[05:09:41] bodie_: has joined #RubyOnRails
[05:13:15] jake_g: Another thing I???m running into with this query is I???m having issues passing in the time. Is there something blatantly wrong with the SQL? http://pastie.org/10275103
[05:14:10] sevenseacat: jake_g: well, how can votes and comments be created in the future?
[05:14:59] war_pigs: has joined #RubyOnRails
[05:16:23] Creeves: jake_g: your original pastie was throwing a syntax error right?
[05:16:32] swamix: has joined #RubyOnRails
[05:16:33] jake_g: sevenseacat: Oops. Forgot to do `- 1.day`.
[05:16:36] milf_commander: has joined #RubyOnRails
[05:16:48] jake_g: Creeves: It had a syntax error only if I added .count onto the end of it
[05:16:57] jake_g: Candidate.trending.count
[05:17:13] sevenseacat: right, because thats when the query gets executed
[05:17:19] sevenseacat: when you actually try to use it
[05:17:55] jake_g: Candidate.trending was working (before I added the created_at stuff)
[05:18:12] sevenseacat: I dont think you can order on a computed field like that, can you?
[05:18:24] Radar: 1) has anyone seen this issue before with El Capitan https://github.com/cowboyd/libv8/issues/180 and 2) what's the fix?
[05:19:03] sevenseacat: living on the edge is fun isnt it!
[05:19:14] roolo: has joined #RubyOnRails
[05:19:37] Radar: IT SURE ISNT
[05:20:12] jdayvie: Radar: Just wanted to say thank you again to you too =)
[05:20:18] Radar: jdayvie: \o/ no worries
[05:20:42] sevenseacat: Radar: today we learned you cant do string interpolation with #{} in javascript.
[05:20:49] SteenJobs: has joined #RubyOnRails
[05:20:51] Radar: yeah that's a thing
[05:20:55] sevenseacat: because js is stupid.
[05:21:21] sevenseacat: silly me assumed when i told coffeescript.org to convert coffee to js, they wouldnt stuff it up
[05:21:31] jdayvie: How silly.
[05:22:05] riotjones: has joined #RubyOnRails
[05:25:22] raunicolae: has joined #RubyOnRails
[05:27:27] jdayvie: Does a partial accept a class like normal?
[05:27:32] jdayvie: Or would I have to wrap in a div?
[05:28:03] Rukeal: has joined #RubyOnRails
[05:29:14] bhuvan_aurora: has joined #RubyOnRails
[05:29:18] bhuvanaurora: has joined #RubyOnRails
[05:29:31] raunicolae: has left #RubyOnRails: ()
[05:29:36] jdayvie: Nevermind! =P
[05:31:29] dhjondoh: has joined #RubyOnRails
[05:32:13] tagrudev: has joined #RubyOnRails
[05:32:34] Creeves: i said i would get lunch once i got these tests passing...
[05:32:36] Creeves: i'm so hungry
[05:32:57] sypheren: has joined #RubyOnRails
[05:32:58] Radar: Eat if you're hungry. Tests can be relentless sometimes and the answer is often in what you eat.
[05:33:37] sevenseacat: for all you know, the solution will come to your brain while you're innocently buttering a piece of bread or something
[05:33:57] sevenseacat: now i want some buttered bread.
[05:34:13] Creeves: that's very true for me yeah, i often come up with the solutions to bugs quickly after taking a break
[05:34:36] Creeves: though i didn't have lunch at the usual time today, so when i'm at work and skip it, ill stay till like 4 and get a 4-5 lunchbreak then go home
[05:34:59] Creeves: i always feel weird going to lunch at like 3 and coming back at 4ish for an hours more work lol
[05:35:02] sevenseacat: if I didn't have lunch I'd turn into a mega-grumpy-bum
[05:35:08] sevenseacat: well, grumpier than usual
[05:35:24] Creeves: i used to be like that but have shifted my eating patterns (don't ever do this)
[05:35:39] Creeves: now i just wish i could eat breakfast without forcing it down
[05:35:50] hotpancakes: has joined #RubyOnRails
[05:35:51] sevenseacat: trying to get into the habit of eating breakfast
[05:35:56] sevenseacat: have never really done it regularly
[05:35:58] Radar: :+1: for time-since-eating-correlating-with-grumpiness
[05:36:10] Creeves: yeah from what i've heard it's really important, but i'm the same
[05:36:10] siemprefresco: has joined #RubyOnRails
[05:36:23] sevenseacat: I find when I eat breakfast, then I want lunch earlier. which is annoying.
[05:36:30] Creeves: i ended gorging late at night though, and that makes me not want to eat in the morning
[05:36:32] Creeves: it's a vicious cycle
[05:36:42] Creeves: yeah i get that too, i think it's due to your stomach expanding
[05:36:58] Creeves: and i get the opposite, where it shrinks when i don't eat and i can't eat much at all later in the day
[05:37:17] sevenseacat: the human body is a messed up thing sometimes.
[05:37:27] leonardoajim: has joined #RubyOnRails
[05:38:24] jdayvie: has joined #RubyOnRails
[05:38:26] Creeves: yeah, now i just have to decide if i want to drive 40 mins out of the way return trip to get the best burgers in the city
[05:38:38] Creeves: if anyone is in sydney, definitely check out five points >.>
[05:39:19] jdayvie: Thats dedication!
[05:39:32] sevenseacat: I'll be in sydney in a couple weeks for two days, where is it? >_>
[05:40:47] ferr: has joined #RubyOnRails
[05:40:59] Creeves: sevenseacat: north sydney
[05:41:02] Creeves: but it's AMAZING
[05:41:09] Creeves: you should definitely go there
[05:41:16] Creeves: though i'm not sure if they have vegetarian options
[05:41:20] Creeves: for anyone that is one
[05:41:26] togg719: has joined #RubyOnRails
[05:41:32] Radar: I think sevenseacat eats vegetarians...?
[05:41:33] mary5030: has joined #RubyOnRails
[05:41:41] Creeves: then this place will not dissapoint
[05:42:13] sevenseacat: ACTION looks it up
[05:42:55] sevenseacat: I know roughly where that is, too easy
[05:43:04] Creeves: where are you coming from?
[05:43:07] sevenseacat: I was looking for burgers last time I was in Sydney, ended up some place in SurryH ills
[05:43:17] Creeves: ahh nice, my gf grew up in perth
[05:43:54] Creeves: in joondalup i think
[05:44:08] sevenseacat: thats a place, yep :) about 20min from where i am now
[05:44:48] Creeves: yeah it's a nice city. i was just wondering cause i know adelaide has some nice burgers so if you were coming from there that might be the only scenario where these ones may not live up to my hype haha
[05:45:16] Creeves: you haven't had much exposure to tech companies in australia by any chance? my girlfriend has had a lot of trouble with sexism in the tech industry
[05:45:25] Creeves: and is looking at Atlassian but is unsure if it'll be much better there
[05:45:48] Aeyrix: Atlassian is based in SF now.
[05:46:01] Creeves: Aeyrix: yeah but they have a sydney office
[05:46:07] sevenseacat: thats one of those tough issues. its always very subtle when it happens.
[05:46:11] Creeves: she's pretty much got an offer there too, just the psych test left i think
[05:46:26] GriffinHeart: has joined #RubyOnRails
[05:46:28] sevenseacat: I've worked with some, had exposure to a few more, met a few people.
[05:46:43] Creeves: sevenseacat: true yeah, though subtle sexism would still be better than the place she's at now
[05:46:51] Creeves: if you know freelancer.com
[05:46:58] Creeves: don't ever work there
[05:47:18] sevenseacat: arr i wouldnt, for many reasons, but thats just one more
[05:47:32] Aeyrix: Freelancer has some glaring security concerns.
[05:47:36] Creeves: yeah she's had a really horrible experience
[05:47:44] Creeves: Aeyrix: i'd love to know them haha
[05:47:56] Aeyrix: Creeves: That'd be irresponsible of me.
[05:48:10] Creeves: i'm not saying you should tell me, just that i'd love to know ;)
[05:48:17] Aeyrix: I disclosed them about two or so years ago. As far as I'm aware, they haven't been fixed.
[05:48:30] Creeves: classic shitty freelancer
[05:48:53] Creeves: my gf found out that upper management went on a 'growth conference' which was essentially a boys club trip, where they discussed how 'fuckable' each of the female employees were
[05:49:03] sevenseacat: oh thats revolting.
[05:49:26] Creeves: it's a revolting place
[05:49:40] Creeves: we're trying to establish whether it's going to be better at other firms
[05:49:45] sevenseacat: most definitely.
[05:49:49] Creeves: oh good :)
[05:49:49] Aeyrix: "Guys I have an idea"
[05:49:49] wethu: has joined #RubyOnRails
[05:49:52] sevenseacat: absolutely, 100%.
[05:49:55] GriffinHeart: has joined #RubyOnRails
[05:49:57] jenrzzz: has joined #RubyOnRails
[05:50:03] Aeyrix: "let's, guys listen, let's go on a vacation thing"
[05:50:22] Aeyrix: "guys seriously, let's go on a vacation, just us guys, and we'll talk about the girls"
[05:50:25] Aeyrix: "thoughts?"
[05:50:33] sevenseacat: I'd suggest filing a complaint against them, but its all hearsay really
[05:50:39] Creeves: the sad thing is just how accurate you are Aeyrix
[05:50:54] Creeves: sevenseacat: well the plan is to get a job secured, then act
[05:51:03] Creeves: another employee did pretty much that
[05:51:04] GriffinHeart: has joined #RubyOnRails
[05:51:07] sypheren: has joined #RubyOnRails
[05:51:10] sevenseacat: what type of dev does she do?
[05:51:18] Creeves: she's a data scientist
[05:51:32] hotpancakes: has joined #RubyOnRails
[05:51:39] Creeves: but yeah, this employee did that and matt barrie (ceo) called the other company and told them not to hire the employee
[05:51:47] sevenseacat: arr.... id you'd said rails I could have started listing companies
[05:51:54] sevenseacat: I've heard of matt barrie
[05:52:07] sevenseacat: I just can't remember where from
[05:52:11] Creeves: yeah she's not really a developer, though she can code, more of a product manager and analytics person
[05:52:32] Creeves: sevenseacat: one of australias biggest 'entrepreneurs'
[05:52:37] volsus: has joined #RubyOnRails
[05:52:38] Creeves: also a gigantic wanker
[05:52:48] Aeyrix: https://en.wikipedia.org/wiki/Matt_Barrie#Awards_and_recognition
[05:52:49] Aeyrix: Interesting
[05:53:00] Aeyrix: he's not the current holder of the "world's biggest dicksplash" award
[05:53:02] Aeyrix: i'm confused
[05:53:09] Aeyrix: i thought he had an honorary lifetime title
[05:53:36] Creeves: i think i know where the trophy is hiding
[05:53:49] rvanlieshout: has joined #RubyOnRails
[05:53:58] siemprefresco: has joined #RubyOnRails
[05:54:06] Aeyrix: really kind of want more coffee but I don't know if I can justify going outside.
[05:54:33] Creeves: that's why i like my cafinated sugary energy drinks
[05:54:41] Creeves: other than being horrible for you
[05:54:45] Creeves: easily accessible
[05:55:01] Creeves: but yeah, nearly 4pm, time to go for me
[05:55:40] Aeyrix: I wish I left work at 4pm.
[05:55:55] sevenseacat: if she's looking for a new job and wants help doing so, tell her to hit up lookahead search, theyre a decent recruitment agency
[05:56:04] michael_mbp: has joined #RubyOnRails
[05:56:16] bronson: has joined #RubyOnRails
[05:56:47] kreantos: has joined #RubyOnRails
[06:00:18] hotpancakes: has joined #RubyOnRails
[06:00:43] metus_violarium: has joined #RubyOnRails
[06:00:46] julienk: in rails, in dev, how comes I can see a list of all the errors upon validations, even if I havent included any partials view containing the errors?
[06:00:55] bf4: has joined #RubyOnRails
[06:01:33] sevenseacat: tbuehlmann: hallo.
[06:02:03] sypheren: has joined #RubyOnRails
[06:03:02] tbuehlmann: pretty decent german skills you got there, count me impressed
[06:03:14] sevenseacat: tbuehlmann: wilkommen.
[06:03:41] sevenseacat: ich spreche Deutsch schlecht.
[06:03:50] chrissonar: has joined #RubyOnRails
[06:04:28] sevenseacat: and I don't know how to make 'schlecht' into an adverb. so there.
[06:04:39] tbuehlmann: that's already better than things I hear when traveling with the metro
[06:05:10] Bilbo-baggons: has joined #RubyOnRails
[06:05:24] GriffinHeart: has joined #RubyOnRails
[06:05:34] tbuehlmann: the sentence is correct as is, a little better: ich spreche schlecht deutsch
[06:05:34] Bilbo-baggons: has left #RubyOnRails: ()
[06:08:04] Creeves: has joined #RubyOnRails
[06:08:10] sevenseacat: ACTION goes back to learning German by listening to Rammstein
[06:10:36] Oog: ive got a big list of gps coordinates - i need to get the timezone for each one. im trying to use https://developers.google.com/maps/documentation/timezone/ but the problem is the returned time zone name and id doesnt match whats in ActiveSupport::TimeZone.zones_map.keys
[06:10:36] aganov: has joined #RubyOnRails
[06:11:06] Creeves: sevenseacat: was thinking, if you've been at any of the rails girls stuff in sydney you've probably met my gf
[06:11:37] sevenseacat: haven't, unfortunately... have mentored at the perth version though! :)
[06:12:20] krokuz_: has joined #RubyOnRails
[06:12:35] emilkarl: has joined #RubyOnRails
[06:14:32] sevenseacat: i only visit sydney for work events or other ruby-related events
[06:14:36] lxsameer: has joined #RubyOnRails
[06:14:44] sevenseacat: such as railscamp or rubyconf
[06:20:29] riotjones: has joined #RubyOnRails
[06:20:36] Creeves: yeah i've been meaning to go to railscamp or some of those rails events
[06:20:47] jfarmer: has joined #RubyOnRails
[06:20:52] Creeves: i'm in the unfortaunte position to have only been exposed to rails in that our company uses it for their API
[06:21:09] Creeves: so never had to use many of the other features
[06:21:15] Oog: how do i map from a TZInfo timezone id that is not one of the ones in ActiveSupport::TimeZone to one of those
[06:21:17] annlewis: has joined #RubyOnRails
[06:21:51] sypheren: has joined #RubyOnRails
[06:22:24] tvw: has joined #RubyOnRails
[06:23:06] christiandsg: has joined #RubyOnRails
[06:23:43] sevenseacat: Creeves: nothing stopping you playing with it for your own reasons :) i did that for nine months before i started using rails professionally
[06:23:50] sevenseacat: hell now I'm doing the same thing with elixir
[06:24:31] Oog: maybe i dont need to do that actually...
[06:24:38] sevenseacat: next railscamp is in canberra in december :)
[06:25:14] sevenseacat: (rails not required)
[06:26:01] swamix: has joined #RubyOnRails
[06:26:01] milf_commander: has joined #RubyOnRails
[06:26:43] hotpancakes: has joined #RubyOnRails
[06:27:34] artto: has joined #RubyOnRails
[06:27:42] comrad: has joined #RubyOnRails
[06:30:39] netzfisch: has joined #RubyOnRails
[06:31:54] Moonlight-Angel: has joined #RubyOnRails
[06:32:01] disperso: has joined #RubyOnRails
[06:33:07] Creeves: sevenseacat: yeah i've tried to do that a bit yeah though i'm a bit strapped for time as i'm attempting to do my honours for IT while still working full time
[06:33:20] sevenseacat: ouch.... well good luck with that!
[06:33:22] Creeves: so events where i can gain lots of knowledge of things like rails in a short amount of time are great
[06:33:44] Creeves: cheers haha, i'm doing it on parasitic javascript
[06:34:05] Creeves: so a lot of people aren't exactly wishing me luck :D
[06:34:09] benhuda: has joined #RubyOnRails
[06:38:52] nya: has joined #RubyOnRails
[06:40:26] sypheren: has joined #RubyOnRails
[06:41:58] Pupeno: has joined #RubyOnRails
[06:43:25] microdex: has joined #RubyOnRails
[06:44:36] ur5us: has joined #RubyOnRails
[06:47:43] bhuvan_aurora: has joined #RubyOnRails
[06:47:55] bhuvanaurora: has joined #RubyOnRails
[06:48:01] Farioko: has joined #RubyOnRails
[06:48:19] workmad3: has joined #RubyOnRails
[06:48:49] Farioko: I'm trying out http://guides.rubyonrails.org/getting_started.html But now when I'm listing the articles, it shows up an array in the table? How come?
[06:49:04] Farioko: [#<Article id: 1, title: "adasdasd", text: "asdasdasd", created_at: "2015-07-06 06:23:02", updated_at: "2015-07-06 06:23:02">, #<Article id: 2, title: "asfasfasf", text: "asfsfsf", created_at: "2015-07-06 06:30:16", updated_at: "2015-07-06 06:30:16">]
[06:50:20] sevenseacat: Farioko: because you wrote <%= something.each instead of <%- something.each
[06:51:14] yardenbar: has joined #RubyOnRails
[06:51:25] robgreene: has joined #RubyOnRails
[06:51:28] Farioko: sevenseacat: oh I see, I should write it as <% only.
[06:51:37] sevenseacat: oh yeah. that too.
[06:51:43] Farioko: sevenseacat: why don't I get a syntax error?
[06:51:56] sevenseacat: <%= will print out the result of whatever you evaluate
[06:52:00] sevenseacat: because its not a syntax error
[06:52:24] arBmind: has joined #RubyOnRails
[06:52:47] Pathfinder: has joined #RubyOnRails
[06:52:54] Farioko: sevenseacat: thanks
[06:53:27] volsus: has joined #RubyOnRails
[06:55:38] DoubleMalt: has joined #RubyOnRails
[07:04:27] creature: has joined #RubyOnRails
[07:05:57] hotpancakes: has joined #RubyOnRails
[07:10:09] Farioko: sevenseacat: perhaps you know why render 'new' generates invalid HTML code?
[07:10:21] sevenseacat: thats a bit of a vague question
[07:10:28] sevenseacat: whats invalid about it?
[07:11:04] nfk: has joined #RubyOnRails
[07:11:39] Farioko: sevenseacat: well if I go to /articles/new it shows fine, but after the validation it does something to the <p> tag.
[07:11:52] sevenseacat: what <p> tag? I can't see what code you're looking at
[07:11:58] sevenseacat: or what output you have
[07:12:17] darutoko: has joined #RubyOnRails
[07:13:12] ndrei: has joined #RubyOnRails
[07:13:36] Farioko: sevenseacat: before validation https://paste.kde.org/pcrnqyrad/1gkdj5/raw after validation https://paste.kde.org/pvae0wgks/lmvvnu/raw
[07:15:30] sevenseacat: not strictly invalid, but weird for sure
[07:15:42] Ergo: has joined #RubyOnRails
[07:16:51] sevenseacat: because rails likes to wrap things in divs for the fun of it
[07:17:50] Sylario: has joined #RubyOnRails
[07:18:21] Creeves: do you think the first answer here is the best way to deal with that: http://stackoverflow.com/questions/5267998/rails-3-field-with-errors-wrapper-changes-the-page-appearance-how-to-avoid-t ?
[07:18:38] Radar: That Ryan Bigg guy is EVERYWHERE.
[07:18:41] Creeves: other stuff i was reading seems hacky
[07:18:58] sevenseacat: Radar: god, I know. he should write a book or something.
[07:19:03] Creeves: i guess he is wearing a superman costume
[07:19:33] sevenseacat: its been a long time since I used the inbuilt rails form helpers. that way was the best way in rails 3.
[07:19:49] solars: has joined #RubyOnRails
[07:20:07] sevenseacat: Radar: have a +1 from me.
[07:20:22] GriffinHeart: has joined #RubyOnRails
[07:20:52] Creeves: Radar: i'm going to pretend i knew it was you when i posted the link
[07:20:57] Radar: MORE REPUTATION POINTS
[07:21:16] workmad3: has joined #RubyOnRails
[07:21:34] sevenseacat: 73.6k... dammit, getting further away from me
[07:21:48] Radar: I rarely go on there to help out anymore
[07:21:52] Creeves: how many do you have sevenseacat
[07:21:57] Radar: The questions have been getting more and more obscure / ghetto
[07:22:20] yaymukund: has joined #RubyOnRails
[07:22:21] Creeves: still pretty good
[07:22:44] Creeves: i've probably read both your stuff before and not realised
[07:22:52] Radar: Extremely likely.
[07:22:57] Radar: I am everywhere.
[07:23:01] sevenseacat: we both answer a lot of rails stuff.
[07:23:09] sevenseacat: and we both write awesome books.
[07:23:09] Creeves: is stackoverflow like wikipedia with a smaller number of highly active users
[07:23:20] Radar: SO is a Q&A site
[07:23:45] Creeves: oh yeah, i just mean in terms of the amount of people posting answers
[07:24:14] Creeves: where like 90% of the content is done by 0.1% of the users
[07:24:24] Creeves: or some other non-made-up numbers
[07:24:37] sevenseacat: 90% of the answers are from like 2% of the users, yeah
[07:24:40] Radar: yes something like that
[07:24:45] Radar: I am in the top 0.20%
[07:24:49] baweaver: Radar: karma bot?
[07:24:57] Radar: baweaver: not that I am aware of
[07:25:04] baweaver: could add one :P
[07:25:17] Radar: SO has protections for that
[07:25:21] sevenseacat: fun fact - check out the total reputation table on the bottom right http://stackexchange.com/leagues/1/week/stackoverflow
[07:25:27] baweaver: for the channel
[07:25:37] sevenseacat: all of the 1s are for people who turn up, ask a question, then bugger off
[07:25:38] baweaver: clarity and context help
[07:25:42] Radar: I've considered adding it many times but can't be motivated enough to do it
[07:25:51] baweaver: Radar: but magic internet points!
[07:25:55] baweaver: everyone likes those
[07:26:28] Creeves: they should offer some cool stuff to their really high level answerers
[07:26:49] sevenseacat: they used to send out swag packs to users that hit 100k
[07:26:53] sevenseacat: then too many people started hitting it
[07:27:23] sevenseacat: jon skeet will probably get something when he hits a million
[07:27:30] baweaver: I'm all types of inactive on SO
[07:27:42] Creeves: i guess you don't want to incentivise it too much or people will put out bad answers just to make money or get free stuff
[07:27:52] hotpancakes: has joined #RubyOnRails
[07:28:04] sevenseacat: a lot of psychology goes into the design of gamification systems
[07:28:39] Creeves: that makes sense
[07:28:58] Creeves: my brother is trying to lose a bunch of weight at the moment and is essentially being encouraged alone by gamification
[07:29:03] bruno-: has joined #RubyOnRails
[07:29:25] Creeves: nah more like some of these apps for weightlose that really make it into an almost rpg experience
[07:29:30] Creeves: weightloss*
[07:29:42] sevenseacat: i'm gonna be jumping back on that bandwagon
[07:30:03] sevenseacat: i hate exercising
[07:30:05] Creeves: he's been using this great one that lets you scan your food to get the nutritional info instead of having to manually enter it
[07:30:20] Oog: how thread safe is activerecord
[07:30:20] Creeves: and then another where he can track calories in vs calories burned
[07:30:57] sevenseacat: Oog: I believe it's threadsafe in rails 4 if you enable it
[07:31:12] Oog: how do i enable it
[07:31:29] sevenseacat: should be an option in your config/application.rb
[07:31:39] sevenseacat: config.threadsafe! i think
[07:31:58] sevenseacat: probably best to google it :)
[07:32:36] benhuda: has joined #RubyOnRails
[07:32:39] Oog: looking safe out of the box! We've also added live streaming for persistent connections and Rails 4.0 is now safe for threaded servers out of the box (no more need for config.threadsafe!).
[07:33:23] sevenseacat: i was half-right >_>
[07:34:16] Oog: actually that is about rails im assuming that means activerecord too...
[07:35:56] ndrei: has joined #RubyOnRails
[07:36:53] Lightsword: has joined #RubyOnRails
[07:37:28] hotpancakes: has joined #RubyOnRails
[07:40:12] Lightsword: has joined #RubyOnRails
[07:42:02] eGGsha: has joined #RubyOnRails
[07:42:34] eGGsha: has joined #RubyOnRails
[07:43:26] LJT: has joined #RubyOnRails
[07:44:13] microdex: has joined #RubyOnRails
[07:45:10] hotpancakes: has joined #RubyOnRails
[07:46:18] x-light: has joined #RubyOnRails
[07:48:22] DEA7TH: has joined #RubyOnRails
[07:50:18] blackmesa: has joined #RubyOnRails
[07:51:12] nickenchuggets_: has joined #RubyOnRails
[07:52:19] kp666: has joined #RubyOnRails
[07:54:45] ur5us: has joined #RubyOnRails
[07:57:45] livathinos: has joined #RubyOnRails
[07:58:05] choke: has joined #RubyOnRails
[08:00:16] jeanlinux: has joined #RubyOnRails
[08:00:47] hotpancakes: has joined #RubyOnRails
[08:01:24] marr: has joined #RubyOnRails
[08:01:34] jsrn_: has joined #RubyOnRails
[08:04:06] elia: has joined #RubyOnRails
[08:06:30] ferr: has joined #RubyOnRails
[08:07:47] artto: has joined #RubyOnRails
[08:11:51] christiandsg: has joined #RubyOnRails
[08:12:46] julienk: has joined #RubyOnRails
[08:14:09] adre: has joined #RubyOnRails
[08:15:35] pacman: has joined #RubyOnRails
[08:15:54] elia_: has joined #RubyOnRails
[08:19:04] eGGsha: has joined #RubyOnRails
[08:19:32] bhuvanaurora: has joined #RubyOnRails
[08:19:37] bhuvan_aurora: has joined #RubyOnRails
[08:21:58] arBmind: has joined #RubyOnRails
[08:22:47] annlewis: has joined #RubyOnRails
[08:24:51] eGGsha: has joined #RubyOnRails
[08:26:38] bin_005: has joined #RubyOnRails
[08:27:14] ruurd: has joined #RubyOnRails
[08:27:42] ruurd: thedonkdonk: it says loud and clear that it cannot load iconv.
[08:29:58] srinidhi: has joined #RubyOnRails
[08:30:52] varunwachaspati: has joined #RubyOnRails
[08:32:09] granthatcher: has joined #RubyOnRails
[08:32:47] hotpancakes: has joined #RubyOnRails
[08:39:29] viki_: has joined #RubyOnRails
[08:40:15] Frem: has joined #RubyOnRails
[08:40:42] rickmasta: has joined #RubyOnRails
[08:42:23] wethu: has joined #RubyOnRails
[08:43:15] arBmind: has joined #RubyOnRails
[08:44:59] microdex: has joined #RubyOnRails
[08:45:54] Coldblackice_: has joined #RubyOnRails
[08:48:10] blackhuey: has joined #RubyOnRails
[08:50:05] eGGsha: has joined #RubyOnRails
[08:50:40] gremax: has joined #RubyOnRails
[08:50:46] hotpancakes: has joined #RubyOnRails
[08:51:36] chinmay_dd: has joined #RubyOnRails
[08:52:02] hotpancakes: has joined #RubyOnRails
[08:54:21] krz: has joined #RubyOnRails
[08:54:54] blackmesa: hi all. I want to handle 10 input fields that are not related to a model attribute. therefore I created 10 virtual attributes for that model. When it comes to validation I have issues. I have a custom validation method that would only check for 1 attribute https://gist.github.com/anonymous/2afb2a6c35b3b577ea35 . How would I use this for 10 virtual attributes?
[08:55:34] varunwachaspati: has joined #RubyOnRails
[08:55:49] eGGsha: has joined #RubyOnRails
[08:56:59] ruurd: thedonkdonk: are you sure that the native part is available on that machine? What happens if you install the iconv gem on that machine from a pristine state? Does the extension compile properly?
[09:00:25] rvanlieshout: blackmesa: why not create a normal relationship for that?
[09:00:45] swamix: has joined #RubyOnRails
[09:00:45] milf_commander: has joined #RubyOnRails
[09:03:23] varunwachaspati: has joined #RubyOnRails
[09:03:38] blackmesa: rvanlieshout: hey. what kind?
[09:05:15] arup_r: has joined #RubyOnRails
[09:06:02] dionysus69: has joined #RubyOnRails
[09:06:33] bhuvan_aurora: has joined #RubyOnRails
[09:06:52] rvanlieshout: then you can validate presence
[09:07:40] SteenJobs: has joined #RubyOnRails
[09:09:28] sevenseacat: has joined #RubyOnRails
[09:09:46] ndrei: has joined #RubyOnRails
[09:09:59] workmad3: has joined #RubyOnRails
[09:12:58] bhuvanaurora: has joined #RubyOnRails
[09:13:55] julienk: has joined #RubyOnRails
[09:16:42] andrew9184: has joined #RubyOnRails
[09:17:50] elia: has joined #RubyOnRails
[09:20:54] hotpancakes: has joined #RubyOnRails
[09:23:09] Juslintek: has joined #RubyOnRails
[09:24:08] eGGsha: has joined #RubyOnRails
[09:24:15] maloik: If you use .select('foo AS bar, baz AS qux') it seems you can't use #pluck anymore. I want to select these two "virtual attributes" right from the db into a flattened array
[09:24:23] workmad3: has joined #RubyOnRails
[09:24:27] maloik: Do I have any option other than manually iterating over the result?
[09:24:45] rvanlieshout: maloik: .pluck('foo, baz')
[09:25:30] maloik: Nope doesn't work apparently, unknown column
[09:25:44] rvanlieshout: then the column doesn't exist
[09:25:59] maloik: oh, my bad... you said foo and baz :D
[09:26:08] sbhatore: has joined #RubyOnRails
[09:26:12] maloik: the thing is that foo is actually CONCAT(foo, 'baz')
[09:26:23] helpa: Please do not use fake values, as they can be confusing or misleading. Sometimes both.
[09:26:24] jfarmer: maloik Did you read http://apidock.com/rails/ActiveRecord/Calculations/pluck ?
[09:26:29] rvanlieshout: you said foo and baz :)
[09:26:38] maloik: I know...
[09:26:39] rvanlieshout: but pluck that?
[09:26:42] jfarmer: It gives an example:
[09:26:49] jfarmer: > Person.pluck('DATEDIFF(updated_at, created_at)') # SELECT DATEDIFF(updated_at, created_at) FROM people
[09:26:56] maloik: hmm, interesting
[09:27:17] maloik: very nice, thank you jfarmer
[09:27:17] mices: has joined #RubyOnRails
[09:27:47] mices: has anyone read or is reading the pragmatic book, agile web dev w/rails
[09:29:59] chinmay_dd: has joined #RubyOnRails
[09:32:14] Spami: has joined #RubyOnRails
[09:32:37] ur5us: has joined #RubyOnRails
[09:33:27] quazimodo: has joined #RubyOnRails
[09:33:50] wethu: has joined #RubyOnRails
[09:34:57] Trefex: has joined #RubyOnRails
[09:35:41] man_in_the_b0x: has joined #RubyOnRails
[09:42:19] Radar: mices: !r4ia is a much better book
[09:42:19] helpa: mices: 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
[09:43:00] DylanJ: mices: dont read books. use the internet.
[09:43:09] DylanJ: everyone knows books are useless.
[09:45:25] dici: has joined #RubyOnRails
[09:45:50] microdex: has joined #RubyOnRails
[09:47:58] blackmesa: has joined #RubyOnRails
[09:50:49] bhuvan_aurora: has joined #RubyOnRails
[09:50:55] bhuvanaurora: has joined #RubyOnRails
[09:51:07] alex88: has joined #RubyOnRails
[09:55:20] Juslintek: has joined #RubyOnRails
[10:00:38] christiandsg: has joined #RubyOnRails
[10:00:46] annlewis: has joined #RubyOnRails
[10:02:38] nickenchuggets: has joined #RubyOnRails
[10:09:09] stamina: has joined #RubyOnRails
[10:13:37] Creeves: has joined #RubyOnRails
[10:13:56] bruno-: has joined #RubyOnRails
[10:16:51] eGGsha: has joined #RubyOnRails
[10:16:56] wildfield: has joined #RubyOnRails
[10:18:08] jessu: has joined #RubyOnRails
[10:19:01] jessu: hi guys I need to create a webpage which contails a forrm say name age sex location etc. Now can I can save all the details into a databasse?
[10:20:25] rickmasta: has joined #RubyOnRails
[10:20:26] jessu: doge__: any tutorial?/ I am very begineer to rails
[10:20:58] jessu: doge__: I wan to know all the details whpo pened my page and who entered thos edetails
[10:21:05] doge__: jessu, see the topic
[10:21:39] jessu: doge__: What is there?
[10:21:49] doge__: Guides: http://goo.gl/Drh96
[10:22:49] doge__: You could try this one https://www.railstutorial.org/book/
[10:23:39] Guest2656545: doge__: first thing I wan't to be clear I don't want to learn rails but only of rthis I just want touse it.
[10:24:28] doge__: Then learn only that part
[10:24:45] wildfield: Hello, what resources would you recommend beyond the basic tutorials? I mean something about code organization in rails, maybe some general web development methodology guides?
[10:25:02] Guest2656545: doge__: can you plese refer me topic number/page no?
[10:26:07] elaptics: wildfield: have you read through the rails guides?
[10:26:29] wildfield: elaptics: depends on the definition of "enough"
[10:27:00] wildfield: I've read that rails tutorial book, some misc guides, and I'm doing simple rails project
[10:27:05] frishi: has joined #RubyOnRails
[10:27:12] elaptics: wildfield: depends on your current skill levels and experience then probably
[10:27:35] wildfield: but I have questions like am I doing stuff right
[10:27:43] wildfield: maybe there's better approach to how I'm doing things, so on
[10:27:48] elaptics: wildfield: feel free to ask those things here
[10:27:55] elaptics: that's what we're here for
[10:28:13] elaptics: and I'm sure there are several of us who would be happy for some meaty questions :D
[10:30:23] FastJack: has joined #RubyOnRails
[10:30:39] Hates_: has joined #RubyOnRails
[10:31:00] hectortrope: has joined #RubyOnRails
[10:32:03] wildfield: elaptics: My first question would be what are the guidelines of splitting pages into controllers? I don't have exactly CRUD pages, for example there's an admin page where I can manage player's answers, and mark them as correct/incorrect. Basically that's the only thing I will be able to do with them, should I make this a separate controller with index route or maybe a method in some general Admin controller?
[10:33:18] blackmes1: has joined #RubyOnRails
[10:33:51] drale2k: has joined #RubyOnRails
[10:34:05] frek818: has joined #RubyOnRails
[10:42:14] alienaut: has joined #RubyOnRails
[10:45:11] julienk: in rails, in dev, how comes I can see a list of all the errors upon validations, even if I havent included any partials view containing the errors?
[10:45:16] rvanlieshout: wildfield: answer-controller
[10:45:22] rvanlieshout: wildfield: action approve or reject
[10:45:37] rvanlieshout: julienk: you don't. it's in a view somewhere
[10:45:58] elaptics: wildfield: I generally try to think of things in resources terms. And thus I'd pretty much do what rvanlieshout just suggested
[10:46:35] julienk: @rvanlieshout , thanks, but wjat if I want to modify the default errors layout ?
[10:46:37] microdex: has joined #RubyOnRails
[10:46:45] alienaut: I am trying to MySQL query to active record but I couldnt. Can you take a look? https://gist.github.com/alienaut/752c872dc097bca6c731
[10:46:47] julienk: I havent seen that partial in the view/ folder
[10:47:38] elaptics: alienaut: that seems correct
[10:47:45] creature: has joined #RubyOnRails
[10:48:04] elaptics: alienaut: your db should be set up correctly in the first place with the appropriate collation,etc
[10:48:19] rvanlieshout: julienk: there is no default?
[10:48:48] rvanlieshout: alienaut: .where('name = :name collate utf8_bin', name: 'Francis')
[10:49:21] julienk: rvanlieshout mmm....what do you mean there is no default? I havent personally set any default
[10:49:43] elaptics: julienk: is it the actual html markup you want to change?
[10:49:43] rvanlieshout: there is no default indeed
[10:50:15] lessless: has joined #RubyOnRails
[10:50:19] julienk: I really wonder where does this error message view come from
[10:50:23] elaptics: julienk: maybe you could gist your current code and what you're seeing and what you want to change exactly
[10:51:31] wildfield: generally, how do you approach the new page creation? Do you start with view and then add data or work with data first?
[10:54:32] rodfersou: has joined #RubyOnRails
[10:55:25] julienk: I guess I will have to come back later with some code then. It was just a general question
[10:55:30] elaptics: wildfield: it depends I guess. In this case here I presume you already have some answer data and seems straightforward so I'd start with the controller to fetch the list of answers first for the index view and then do the view. Then I'd move onto hooking up the approve/reject buttons to the controllers (and then views if they're necessary though I imagine you'd be just redirecting back to the list)
[10:55:38] eGGsha: has joined #RubyOnRails
[10:56:01] diegobiavati: has joined #RubyOnRails
[10:56:08] julienk: I was under the impression that just adding some validation rules to a model would display the validation error automatically on the view, if any
[10:56:13] julienk: but maybe Im wrong
[10:56:26] frishi: has joined #RubyOnRails
[10:56:28] julienk: maybe there is some rails helper to output this
[10:56:48] julienk: like if @errors.size > 0 output_errors
[10:56:49] ndrei: has joined #RubyOnRails
[10:56:51] kipl20: has joined #RubyOnRails
[10:56:52] julienk: or something like this
[10:56:54] elaptics: julienk: http://guides.rubyonrails.org/active_record_validations.html#displaying-validation-errors-in-views
[10:57:32] elaptics: this is what we mean by there's no default - it's up to you to implement what you need. In older versions of rails there was some default stuff
[10:57:48] julienk: elaptics, thx its more clear now
[10:58:03] alienaut: elaptics: i don't want to change encoding of my tables. I got hell lot of data that cannot lose. Is there a way running different SQL collation? is it safe?
[10:58:22] elaptics: julienk: there are gems like simple_form which do provide more stuff that can be customised
[10:58:30] dhjondoh1: has joined #RubyOnRails
[10:58:45] jaimessi: has joined #RubyOnRails
[10:58:45] julienk: ok great Ill have a look
[10:59:16] elektronaut: has joined #RubyOnRails
[10:59:28] drPoggs: has joined #RubyOnRails
[10:59:44] alienaut: elektronaut: nice nickname.
[10:59:57] wildfield: elaptics: thanks. My main problem is that I'm new to web development and it doesn't still 'click' in my head, so I have to stop and think on every task.
[11:01:26] elaptics: alienaut: only like rvanlieshout suggested I guess - I've never tried myself
[11:02:14] rvanlieshout: wildfield: in REST you have actions on a resource
[11:02:24] rvanlieshout: standard actions would be create, update, destroy, show, index
[11:02:32] jenrzzz: has joined #RubyOnRails
[11:02:32] rvanlieshout: but there is nothing against into heaving other actions
[11:02:59] alienaut: o i missed rvanlieshout's message, let me check above.
[11:04:03] alienaut: rvanlieshout: thanks! i will try this one
[11:04:33] wildfield: rvanlieshout: is resource abstraction connected to what is stored in database, or may change depending on task?
[11:05:26] rvanlieshout: it's directly related to anything in the db
[11:05:30] solars: hi, what's the right way to turn off sql/database logging in rails? ActiveRecord::Base.logger.level = 1 - and if so, where to put it?
[11:05:55] elaptics: wildfield: all that comes with experience. Just takes time and sometimes it's just best to learn by experience the hard way.
[11:07:26] wildfield: can resources be different depending on context? For example when users can see it and when admin can see it? They see and can do slightly different things, though in database they are stored the same
[11:07:50] dhjondoh: has joined #RubyOnRails
[11:09:13] bruno-: has joined #RubyOnRails
[11:09:20] arup_r: has joined #RubyOnRails
[11:11:24] bronson: has joined #RubyOnRails
[11:11:48] wildfield: and probably more general question: how do you see a web application from an abstracted point of view? Just as a collection of resources and static pages?
[11:12:14] arup_r1: has joined #RubyOnRails
[11:13:24] rrawlins: has joined #RubyOnRails
[11:13:42] hotpancakes: has joined #RubyOnRails
[11:13:52] Hates_: wildfield: yeah, you can use something like cancan to achieve that
[11:14:34] Hates_: wildfield: I just seen web apps as interactions between different objects.
[11:15:34] wildfield: Hates_: thanks, i'll take a look into that
[11:16:01] alienaut: rvanlieshout: thanks, again! it worked for me.
[11:16:20] rickmasta: has joined #RubyOnRails
[11:16:27] rrawlins: Hi All. Currently working on a gem which I want to push certain method calls into a background queue should one exist. Anyone know of a nice pattern to push to any of the main background queues (DJ, SideKiq) should the exist, and fallback to running synchronously should they not?
[11:16:33] jaimessi: has joined #RubyOnRails
[11:17:17] Hates_: rrawlins: make it dependent on Active Job perhaps
[11:17:25] Hates_: rrawlins: but that's not a nice solution
[11:17:28] Papierkorb: has joined #RubyOnRails
[11:17:48] Hates_: rrawlins: trying to think of some gems that let you choose which BG processor you have
[11:17:55] Hates_: rrawlins: but you'll have to write adapters for each
[11:18:03] rrawlins: Hates_: yeah I did consider that, my guess is that'll have back-compat issues though.
[11:18:40] rrawlins: Hates_: Writing adapters is a possibility, but thought I'd see if anything already exists, must be a common enough pattern.
[11:18:55] arup_r: has joined #RubyOnRails
[11:19:01] Hates_: rrawlins: well you could see how ActiveJob has done it and the adapters that the different queues provide
[11:20:43] pacman: has joined #RubyOnRails
[11:20:55] Hates_: rrawlins: sorry I can't give more info than that
[11:21:19] rrawlins: Hates_: yeah that's a possibility. I'll so some more research on AJ and see what's what.
[11:22:03] logik-bomb: has joined #RubyOnRails
[11:22:43] logik-bomb: what's the rule of thumb regarding more than 1 devise model?
[11:26:11] wethu: has joined #RubyOnRails
[11:28:03] diegoviola: has joined #RubyOnRails
[11:30:30] frek818: has joined #RubyOnRails
[11:31:38] jhass: has joined #RubyOnRails
[11:31:44] konsolebox: has joined #RubyOnRails
[11:32:33] konsolebox: has joined #RubyOnRails
[11:35:58] cac: has joined #RubyOnRails
[11:37:08] erich: has joined #RubyOnRails
[11:37:39] blazeeboy: has joined #RubyOnRails
[11:38:57] blazeeboy: has left #RubyOnRails: ()
[11:40:17] skroon: has joined #RubyOnRails
[11:40:23] eGGsha: has joined #RubyOnRails
[11:40:34] jordanstorz: has joined #RubyOnRails
[11:41:38] Detch: has joined #RubyOnRails
[11:43:28] ldnunes: has joined #RubyOnRails
[11:44:11] wethu: has joined #RubyOnRails
[11:44:56] pacman: has joined #RubyOnRails
[11:46:16] ProLoser: has joined #RubyOnRails
[11:47:35] microdex: has joined #RubyOnRails
[11:47:57] cac: has joined #RubyOnRails
[11:48:29] pacman: has joined #RubyOnRails
[11:48:50] danielglh: has joined #RubyOnRails
[11:49:01] shyshy: has joined #RubyOnRails
[11:49:11] skroon: is there a way to also spawn a long running process together with starting rails?
[11:49:21] christiandsg: has joined #RubyOnRails
[11:50:15] ndrei: has joined #RubyOnRails
[11:51:10] hotpancakes: has joined #RubyOnRails
[11:51:42] dionysus69: has joined #RubyOnRails
[11:51:48] JohnBat26: has joined #RubyOnRails
[11:52:05] contradictioned: is there a gem that does "pagination for files"? e.g. if i want to display a log file in chunks of 30 lines
[11:52:18] krokuz_: has joined #RubyOnRails
[11:52:35] arup_r: Can we use helper method image_path inside the controller ? or any way to use it if Rails don't allow it to call inside the controller ?
[11:52:38] contradictioned: skroon: you could do this in /config/initializers
[11:53:35] contradictioned: e.g. I had there a command that started sphinx, if this was not already running
[11:53:42] solars: can anyone tell me where to put ActiveRecord::Base.logger.level = 1 to silence sql logging? it works in the console but in environment.rb or environments/dev.rb I'm getting a nil class error
[11:54:28] pusewicz: has joined #RubyOnRails
[11:55:26] nothingmuch: has joined #RubyOnRails
[11:56:23] DylanJ: arup_r: you should avoid doing view things in your controller
[11:56:35] DylanJ: arup_r: why do you need image_path in your controller
[11:57:06] arup_r: I was trying to avoid the hardcoded image path inside the controller.. that's why I was looking for something like `image_path` helper
[11:57:10] yaymukund: has joined #RubyOnRails
[11:57:42] arup_r: DylanJ: I am using carrierwave gem to attach images.. using some callback inside the cotroller
[11:57:49] asuraphel: has joined #RubyOnRails
[11:57:58] arup_r: that's why I need ... Right now I have hardcoded image path
[11:58:41] DylanJ: sounds like you shouldn't be doing this in your controller
[11:58:48] DylanJ: i could be wrong
[11:59:00] arup_r: https://gist.github.com/aruprakshit/8cce1246f3ed936ab7d7#file-profiles_controller-rb-L64
[11:59:32] DylanJ: how about
[11:59:32] arup_r: DylanJ: ^^
[11:59:42] DylanJ: instead of actually setting a "default" file for everyone
[11:59:48] DylanJ: just rendering a default image if a user has no avatar.
[12:00:19] sevenseacat: carrierwave supports that out of the box.
[12:00:39] Oog: has joined #RubyOnRails
[12:00:44] Oog: what kind of request.remote_ip is ::1 ?!
[12:00:53] DylanJ: Oog: ipv6
[12:00:55] DylanJ: localhost
[12:01:25] LJT: has joined #RubyOnRails
[12:01:55] arup_r: DylanJ: method name is misleading there.. I'll change it.. But the thing is you can see.. there in UI some inages are being dispayed using check boxex.. and if user select any one and hit update, then I'll update using the file, or if the user upload can also upload the image from UI
[12:02:11] annlewis: has joined #RubyOnRails
[12:02:39] arup_r: Two ways people can add avatars
[12:02:57] arup_r: either upload their own.. or use system default images...
[12:03:05] arup_r: Am I clear now ?
[12:03:16] k4nd4lf: has joined #RubyOnRails
[12:03:23] DylanJ: yeah but you still dont need to do any of this in your controller
[12:03:46] DylanJ: just set user[avatar] to whatever in your form
[12:04:27] DylanJ: whatever being... an uploaded file. or some path to a local file that's already uploaded. (i think carrier wave will be okay with that)
[12:04:38] arup_r: I have that.. but it allows to upload a new image.. I actually don't know how the system defaults I should attach there
[12:06:22] skroon: contradictioned: great!
[12:06:43] skroon: contradictioned: so those initializers files, are they spawnd in a different thread then or something?
[12:07:17] DylanJ: arup_r: don't know what to tell you other than have another look at the carrier wave docs and examples.
[12:08:20] gremax: has joined #RubyOnRails
[12:09:46] arup_r: DylanJ: ok got it now.. https://github.com/carrierwaveuploader/carrierwave#uploading-files-from-a-remote-location
[12:12:25] arup_r: no that's for remote.. Let me read docs more n more :)
[12:13:17] jaimessi: has joined #RubyOnRails
[12:13:37] jeanlinux: has joined #RubyOnRails
[12:14:22] cornerma1: has joined #RubyOnRails
[12:14:23] rvanlieshout: for a dfeault image?
[12:15:17] raffomania: has joined #RubyOnRails
[12:16:24] arup_r: rvanlieshout: Not default that way... it is system given avatars..
[12:16:37] rvanlieshout: what is 'system given avatars'?
[12:17:33] arup_r: I have 10 avatars
[12:17:46] universa1: arup_r: i had a similar problem: i had a text field which referenced a system provided icon and a "file_field" (using carrierwave) which stored files, files take precedence over textfield, when both are set...
[12:17:53] ndrei: has joined #RubyOnRails
[12:18:37] universa1: and a simple validation that one of both is set. no complex meddling neccessary, to get the stuff into carrierwave and replicate it possibly a thousand times...
[12:18:51] universa1: and also a simple helper which generated the image tag
[12:19:20] jokke: has joined #RubyOnRails
[12:19:43] centrx: has joined #RubyOnRails
[12:19:48] danielglh: has joined #RubyOnRails
[12:19:50] arup_r: universa1: Yes, you got my case.. Instead of text fields I have checkbox for each image
[12:20:06] arup_r: sorry radio button**
[12:20:09] contradictioned: skroon: no, they're just run at the startup of your application. you could start a new thread in them but I'm not sure, how well this would fit in a deployment scenario with multiple application instances in parallel
[12:20:46] arup_r: and I am passing the image name inside the controller and doing the same as I have shown.. those readion button names are actual image names..
[12:20:49] sevenseacat: arup_r: so set the value of the radio button to the URL of the file
[12:20:51] sadaf2605: has joined #RubyOnRails
[12:21:09] skroon: contradictioned: but, when you started sphinx, did it daemonize it self, or stay on foreground?
[12:21:15] sevenseacat: then it will all just work automagically
[12:21:15] arup_r: Aww! cool... sevenseacat
[12:21:19] Dreamer3: has joined #RubyOnRails
[12:21:21] universa1: arup_r: textfield and filefield as in separate database columns ;)
[12:21:27] arup_r: that makes sense
[12:21:28] contradictioned: skroon: i'm just searching for this :D
[12:21:33] hotpancakes: has joined #RubyOnRails
[12:21:34] universa1: but what sevenseacat said makes sense if both are images...
[12:21:47] arup_r: universa1: no they are same field... in the database
[12:22:12] universa1: arup_r: ok. i was just describing my solution. and there they are not the same field.
[12:22:13] arup_r: yes I agree with sevenseacat's trick
[12:22:16] arup_r: I'll do that
[12:22:23] arup_r: ohkay! :)
[12:22:35] sevenseacat: just make sure the radio buttons have the remote_whatever_url name, and the value of the full URL
[12:22:38] bhorn1: has joined #RubyOnRails
[12:23:08] arup_r: yes.. I can do it.. sevenseacat: using `image_path` helper...
[12:23:11] arup_r: anyway thanks
[12:23:32] ekain: has joined #RubyOnRails
[12:23:58] skroon: contradictioned: i'm writing some example code as well to test it :-)
[12:24:57] contradictioned: skroon: I have searched in the thinking sphinx repo in order to find, what happens there (the initializer file calls a rake task, which itself starts sphinx) but I have no idea
[12:25:28] skroon: contradictioned: i'm wondering if you have a blocking loop inside the initializer
[12:26:19] hellschreiber: has joined #RubyOnRails
[12:26:30] ryanmc: has joined #RubyOnRails
[12:26:31] alxndr: has joined #RubyOnRails
[12:26:45] contradictioned: skroon: not really. but if you have one, i'd guess that your application won't boot
[12:26:58] leonardoajim: has joined #RubyOnRails
[12:27:36] skroon: contradictioned: I want to write a scheduled task that runs every 30 seconds, but I was hoping to not have to use a seperate process, like cron
[12:28:01] skroon: contradictioned: in hoops, I could just have a long running process next to the rails process that would keep running in endless loop
[12:28:18] rvanlieshout: what's wrong with cron?
[12:28:29] rvanlieshout: (compared to endless loops)
[12:28:37] hardtail: has joined #RubyOnRails
[12:29:01] contradictioned: I'm very sure, that you can do that in rails as well. but as I said, if you deploy your application you have to be carefull, because you'd have one of those loops in every instance
[12:29:10] skroon: rvanlieshout: I'm compiling my rails app to a single java .jar file (using jruby + warbler) and want to have a single executable, and not have to start multiple processes
[12:29:36] skroon: contradictioned: right, in my use case it's only running once
[12:30:06] danlucraft: has joined #RubyOnRails
[12:30:06] rvanlieshout: even then i would still prefer something that installs cronjobs on installation over endless running processes
[12:30:52] skroon: rvanlieshout: it's going to run on 2000+ nodes (raspberrypi's) I want to try and keep sysadmin stuff as simple as possible, not many proccess
[12:31:10] hardtail: morning all
[12:31:12] contradictioned: the problem with the endless loop in a thread is, that you have to care about that thread panicing. so if you have a exception there, the rest of the app still works
[12:31:16] rvanlieshout: can't it run install scripts on jar installation?
[12:31:42] bf4: has joined #RubyOnRails
[12:32:34] noodman: has joined #RubyOnRails
[12:32:55] contradictioned: skroon: i just wanted to propose ActiveJob: you could do something like: a job waits 30 seconds, then executes your command and then enqueues itself again. but then you had to install redis or whatever backend you want
[12:33:22] rvanlieshout: it needs a backend
[12:33:30] rvanlieshout: but queueing it again is possible
[12:33:40] rvanlieshout: althoug you still have to care about that when the job fails
[12:33:51] skroon: contradictioned: queueing it again, would ave the same problem you described with thread panicing right?
[12:34:03] rvanlieshout: and then again, you could also benefit from having redis as a cache
[12:34:06] sadaf2605: has joined #RubyOnRails
[12:34:40] contradictioned: skroon: yes, but at least it would throw the exception every 30 seconds and not only once :D
[12:35:15] rvanlieshout: ^ only if you queue it again before you break it
[12:35:19] asuraphel: has joined #RubyOnRails
[12:36:33] axl_: has joined #RubyOnRails
[12:36:37] axl_: has left #RubyOnRails: ("Leaving")
[12:36:52] axl_: has joined #RubyOnRails
[12:36:58] jkamenik: has joined #RubyOnRails
[12:40:08] jaimessi: has joined #RubyOnRails
[12:41:29] microdex: has joined #RubyOnRails
[12:42:14] jhwhite: has joined #RubyOnRails
[12:43:34] contradictioned: btw: i'd still go with rvanlieshout's idea of a cron job.. have a rake task in your application that does, whatever you want, and call this via cron. you can add a file to your repo and on deployment create a symlink from /etc/cron.d/your-task to your repo
[12:43:34] pgatt: has joined #RubyOnRails
[12:44:01] brotspinne: has joined #RubyOnRails
[12:44:17] skroon: contradictioned: rvanlieshout: right, got it thanks
[12:45:23] brotspinne: hello. I want to use find_in_batches(). I know I can't use my own limit() or order() because this is just how it works. it uses the primary internally and orders it ASC. so here's my question: is there a way to turn this ASC to DESC? I just want to batch process the records in reverse order with the "newest" starting first
[12:46:00] rvanlieshout: .order('created_at DESC').find_in_batches...
[12:46:09] brotspinne: rvanlieshout: nope thats not gonna work
[12:46:49] noodman: has joined #RubyOnRails
[12:47:20] tbuehlmann: yeah, doesn't work with the default implementation. but you could write your own find_in_batches, changing this: https://github.com/rails/rails/blob/2a7cf24cb7aab28f483a6772b608e2868a9030ba/activerecord/lib/active_record/relation/batches.rb#L135
[12:47:31] brotspinne: rvanlieshout: because find_in_batches() overwrites the order to be on the primary key ASC. it also gives this warning: "Scoped order and limit are ignored, it's forced to be batch order and batch size"
[12:47:37] tbuehlmann: there's most likely more to change, but it should be possible
[12:47:54] rvanlieshout: didn't got your problem
[12:48:16] rvanlieshout: then i guess creating a copy of the find_in_batched-method might be best
[12:48:18] rvanlieshout: as tbuehlmann suggests
[12:48:25] tbuehlmann: gteq <-- has to be lteq then, I assume
[12:48:28] brotspinne: tbuehlmann: yes I found that line but I don't want to monkey patch the whole method
[12:48:38] tbuehlmann: not possible then, I guess
[12:49:29] rvanlieshout: it uses batch_order
[12:49:33] brotspinne: why isn't it an option like reversed: true?
[12:49:49] rvanlieshout: that's just a private method
[12:49:50] brotspinne: is it hard to implement?
[12:49:52] rvanlieshout: just override that one?
[12:49:52] tbuehlmann: but it's not too complex. I once had to rewrite find_in_batches to not instantiate the records but just use the hash coming from the database :D
[12:49:59] rvanlieshout: https://github.com/rails/rails/blob/2a7cf24cb7aab28f483a6772b608e2868a9030ba/activerecord/lib/active_record/relation/batches.rb#L134
[12:50:29] brotspinne: rvanlieshout: you are one step behind :p
[12:50:37] bbrowning: has joined #RubyOnRails
[12:50:42] tbuehlmann: but that's not all, right? there's also a gteq(start) which shouldn't be right then
[12:51:01] rvanlieshout: there is no need to change that part. it uses to_a unless you give a start
[12:51:03] BBHoss: has joined #RubyOnRails
[12:51:21] poikon: has joined #RubyOnRails
[12:52:01] tbuehlmann: then this? table[primary_key].gt(primary_key_offset) --> lt?
[12:52:34] victortyau: has joined #RubyOnRails
[12:53:10] ramortegui: has joined #RubyOnRails
[12:53:49] xcesariox: has joined #RubyOnRails
[12:56:03] roshanavand: has joined #RubyOnRails
[12:56:31] brotspinne: I'm going to create a helper method around find_in_batches. thx!
[12:57:28] idd2d: has joined #RubyOnRails
[12:58:32] pedrosnk: has joined #RubyOnRails
[13:01:31] Peteykun: has joined #RubyOnRails
[13:02:15] puppeh: has joined #RubyOnRails
[13:02:28] fgo: has joined #RubyOnRails
[13:03:16] asuraphel: has joined #RubyOnRails
[13:05:18] eGGsha: has joined #RubyOnRails
[13:05:31] dstarh: has joined #RubyOnRails
[13:06:43] puppeh: any ideas why after upgrading from 3.2 to 4.0, in one of my rack middlewares `request.env['action_dispatch.cookies']` is nil instead of containing the actual cookies?
[13:06:46] aceRacer: has joined #RubyOnRails
[13:07:46] aceRacer: anyone use devises forgot password thing with the api, I am having a problem, in my routes file I have namespace :api, path: 'api/v1_1', api_version: 'v1_1', format: :json do; draw :api_routes; end
[13:08:04] aceRacer: where draw is a method looks like instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb")))
[13:08:08] mkc: has joined #RubyOnRails
[13:08:28] Creeves: has joined #RubyOnRails
[13:08:46] aceRacer: in my api_routes.rb I have put "/passwords" => "devise/passwords_controller#update", but when I try to update it says undeifned Api::Devise
[13:08:53] aceRacer: how can I resolve this ?
[13:09:22] sandelius: has joined #RubyOnRails
[13:09:41] aceRacer: previously in api::paswords_controller#create I had user = User.send_reset_password_instructions(params) but this doesn't update the reset_password_token
[13:13:09] bmurt: has joined #RubyOnRails
[13:13:27] diegobiavati: has joined #RubyOnRails
[13:13:33] chinmay_dd: has joined #RubyOnRails
[13:14:06] rrawlins: has joined #RubyOnRails
[13:16:56] JoshL: has joined #RubyOnRails
[13:18:29] a346: has joined #RubyOnRails
[13:18:53] jerematic: has joined #RubyOnRails
[13:19:35] jordanstorz: has joined #RubyOnRails
[13:21:04] RegulationD: has joined #RubyOnRails
[13:21:29] riotjones: has joined #RubyOnRails
[13:22:45] thatslifeson: has joined #RubyOnRails
[13:22:56] gerep: has joined #RubyOnRails
[13:23:02] thatslifeson: hi, what is the best gem to use for a live search functionality?
[13:23:18] chouhoulis: has joined #RubyOnRails
[13:23:38] oflannabhra: has joined #RubyOnRails
[13:23:56] cac: has joined #RubyOnRails
[13:24:01] nettoweb: has joined #RubyOnRails
[13:24:52] aceRacer: oh sorry reset_token is updating
[13:25:08] aceRacer: how to reset forgot password !!
[13:27:39] krz: has joined #RubyOnRails
[13:28:26] Voker57|2: has joined #RubyOnRails
[13:28:38] elia: has joined #RubyOnRails
[13:29:44] arup_r: has joined #RubyOnRails
[13:30:41] cswelin: has joined #RubyOnRails
[13:30:46] blackmes1: has joined #RubyOnRails
[13:33:45] zly: has joined #RubyOnRails
[13:34:09] zly: Sup guys. I have a quick question
[13:34:18] zly: Given that I have variable 'users' in my controller
[13:34:31] zly: I want to list all groups that those users are related to
[13:34:34] zly: but only the groups
[13:34:40] maZtah: has joined #RubyOnRails
[13:34:44] rvanlieshout: so what is that 'users'?
[13:34:57] zly: every user has many groups and every group has many users
[13:35:03] zly: it's just a relation of users
[13:35:13] zly: found by some param
[13:35:13] rvanlieshout: Group.joins(:users).where(users: { id: users.select('id') })
[13:35:43] jamesrward: has joined #RubyOnRails
[13:36:10] zly: Looks like that's it :)
[13:36:18] zly: Thank you very much rvanlieshout
[13:37:23] jamesrward: I'm a bit lost on how to test CanCan roles with minitest. I'm getting Expected response to be a <success>, but was <302> on a test that I think should be passing. Here's a gist of my test if anyone has time to take a look and point me in the right direction: https://gist.github.com/anonymous/6916a423c66ce6a96eb2
[13:38:03] christiandsg: has joined #RubyOnRails
[13:38:34] rvanlieshout: jamesrward: https://github.com/ryanb/cancan/wiki/Debugging-Abilities#logging-accessdenied-exception, then tail -f log/test.log and see why it fails
[13:38:40] jamesrward: I'm creating the user and the session inside the test for now while I try to get things working.
[13:38:47] jamesrward: rvanlieshout: will do
[13:39:06] Ropeney: has joined #RubyOnRails
[13:39:19] drale2k: has joined #RubyOnRails
[13:41:29] jamesrward: rvanlieshout: not really giving me any additional information. The use is created then selected then it redirects to the login page.
[13:42:22] devdazed: has joined #RubyOnRails
[13:42:32] fwaokda: has joined #RubyOnRails
[13:42:33] rvanlieshout: jamesrward: what does it give?
[13:42:56] rvanlieshout: are you using a headless browser? if yes, are you using database cleaner to prevent transactions
[13:43:13] jamesrward: rvanlieshout: https://gist.github.com/jamesrward/a6984f9bc9449b5a8b76
[13:43:14] jobewan: has joined #RubyOnRails
[13:43:54] rvanlieshout: it didn't log anything. did you add that logger-line to your authorize method?
[13:44:53] oflannabhra: has joined #RubyOnRails
[13:44:54] jamesrward: rvanlieshout: whoops no. Thought the tail command was enough. I'll get things logging properly and come back with more info. Thanks for your help
[13:45:25] rvanlieshout: jamesrward: and is this using capybara?
[13:46:01] yaymukund: has joined #RubyOnRails
[13:48:00] dashedstripes: has joined #RubyOnRails
[13:49:38] bryancp: has joined #RubyOnRails
[13:51:25] K0nserv-_: has left #RubyOnRails: ()
[13:51:48] K0nserv-: has joined #RubyOnRails
[13:52:16] puppeh: any ideas why after upgrading from 3.2 to 4.0, in one of my rack middlewares `request.env['action_dispatch.cookies']` is nil instead of containing the actual cookies?
[13:52:16] K0nserv-: Hello, does anyone have recommendations on SMS providers with good rails integration and coverage in as much of the worls as possible?
[13:56:06] bratsche: has joined #RubyOnRails
[13:56:13] elia: has joined #RubyOnRails
[13:56:19] puppeh: K0nserv-: I've heard of nexmo
[13:57:38] JakFrist: has joined #RubyOnRails
[13:57:48] FCser: has joined #RubyOnRails
[13:59:22] aceRacer: is the password reset toke base64 encoded when devise sends it throught email ? they aren't matching (the one in the url and the one in the db)
[13:59:51] DaniG2k: has joined #RubyOnRails
[14:00:02] smathy: has joined #RubyOnRails
[14:01:07] hotpancakes: has joined #RubyOnRails
[14:01:18] aceRacer: but doesn't look like a base64 though , no == at the end
[14:01:59] surrealanalysis: has joined #RubyOnRails
[14:02:08] Papierkorb: == is not mandatory
[14:02:22] momomomomo: has joined #RubyOnRails
[14:02:26] Papierkorb: aceRacer: no idea about devise, but have you tried just pumping it through base64 -d ?
[14:04:02] diegobiavati: has joined #RubyOnRails
[14:04:08] broman: has joined #RubyOnRails
[14:04:47] broman: can anyone help me with wickedpdf??? in development mode i can generate the pdf file... but in production (on the server) i can't.. can someone shed me a light on this?
[14:04:58] elia: has joined #RubyOnRails
[14:05:14] broman: how can i change the logging option to see more things without restarting the server?
[14:05:35] johnkpaul_: has joined #RubyOnRails
[14:05:56] asheinfeld: has joined #RubyOnRails
[14:07:32] K0nserv-: puppeh: Thanks, I'll have a look
[14:07:39] puppeh: any ideas why after upgrading from 3.2 to 4.0, in one of my rack middlewares `request.env['action_dispatch.cookies']` is nil instead of containing the actual cookies?
[14:08:35] AzaToth: has joined #RubyOnRails
[14:10:13] neanias: has joined #RubyOnRails
[14:10:48] yaymukund: has joined #RubyOnRails
[14:11:21] werelivinginthef: has joined #RubyOnRails
[14:12:25] Schalla: has joined #RubyOnRails
[14:12:46] bronson: has joined #RubyOnRails
[14:13:13] nzst: has joined #RubyOnRails
[14:13:18] oflannabhra: has joined #RubyOnRails
[14:13:44] charliesome: has joined #RubyOnRails
[14:15:23] moeabdol: has joined #RubyOnRails
[14:15:48] logik-bomb: has joined #RubyOnRails
[14:16:40] Surt_Q: has joined #RubyOnRails
[14:17:15] aceRacer: no, I didn't do that, I was looking to stay within the devise ecosystem ... but well most people hate these admin tools and I can se why :D
[14:17:51] Grundell: has joined #RubyOnRails
[14:17:53] mando: has joined #RubyOnRails
[14:17:56] eggoez: has joined #RubyOnRails
[14:19:06] asheinfeld: has joined #RubyOnRails
[14:19:25] logik-bomb: I have 3 models. User, Site, Membership ( https://gist.github.com/anonymous/b108e4e4132ec8de44aa#file-role-rb-L12 ) How should I change my User model so that I could do something like User.find(1).sites.first.role ? Thanks
[14:19:29] paulcsmith: has joined #RubyOnRails
[14:20:56] hotpancakes: has joined #RubyOnRails
[14:22:42] pipework: logik-bomb: You'll have to use a default_scope to include memberships on sites and then use `.delegate` in the class to delegate role to membership.
[14:23:35] cac: has joined #RubyOnRails
[14:24:26] logik-bomb: pipework: thanks
[14:24:26] eGGsha: has joined #RubyOnRails
[14:24:28] axl__: has joined #RubyOnRails
[14:25:07] gambl0re: has joined #RubyOnRails
[14:26:12] jeanlinux: has joined #RubyOnRails
[14:26:15] jenrzzz: has joined #RubyOnRails
[14:26:19] arBmind: has joined #RubyOnRails
[14:27:37] eggoez: has joined #RubyOnRails
[14:27:45] pullphinger: has joined #RubyOnRails
[14:28:15] asheinfeld: has joined #RubyOnRails
[14:30:02] uris: has joined #RubyOnRails
[14:30:03] kies^: has joined #RubyOnRails
[14:30:18] dopie: has joined #RubyOnRails
[14:31:50] christiandsg: has joined #RubyOnRails
[14:34:03] DEA7TH_: has joined #RubyOnRails
[14:34:53] acti0nman: has joined #RubyOnRails
[14:35:26] IanV0rn2341: has joined #RubyOnRails
[14:36:23] HenriettaSalt: has joined #RubyOnRails
[14:36:40] DEA7TH_: I'm sending POST requests to Unicorn with a sockets API and it doesn't like my header, but only replies with 400 Bad Request. What does it need me to include?
[14:37:54] jamesrward: has joined #RubyOnRails
[14:40:12] sung: has joined #RubyOnRails
[14:42:16] christiandsg: has joined #RubyOnRails
[14:42:55] aceRacer: User.reset_password_by_token(user_params)
[14:43:00] asheinfeld: has joined #RubyOnRails
[14:43:44] victortyau: has joined #RubyOnRails
[14:44:31] chouhoulis: has joined #RubyOnRails
[14:44:33] Papierkorb: DEA7TH_: what does your request look like?
[14:45:35] Papierkorb: DEA7TH_: TL;DR for HTTP/1.1 GET requests is, that you need to supply a Host header. Not demanded, but sometimes errornously required, is the User-Agent header. Apart from that, the client is free to omit any other header
[14:45:36] DEA7TH_: Papierkorb: POST digi_send/1 HTTP/1.1\nContent-Type: text/plain\nContent-Length: 2\n\nhi
[14:45:44] DEA7TH_: my GET works
[14:45:45] Papierkorb: DEA7TH_: You're missing the Host header
[14:45:55] tubbo: has joined #RubyOnRails
[14:46:13] Papierkorb: DEA7TH_: also, use \r\n, not only \n
[14:46:17] Papierkorb: \r\n is mandated by the RFC
[14:46:31] DEA7TH_: every time \r\n instead of \n?
[14:46:36] Papierkorb: for HTTP headers, yes
[14:47:15] Papierkorb: what you send inside your body is up to you then. So sending"foo\nbar" is perfectly fine there
[14:47:48] tfitts: has joined #RubyOnRails
[14:47:54] jamesrward: Was getting help in here then had to head to a meeting. Still have a failing controller test using CanCan authorization. Gist of the test at https://gist.github.com/jamesrward/bb0e032a042ec28ca4f1 and tail of the test.log at https://gist.github.com/jamesrward/cd2206b51c901bbe316f any advice on what to try next would be much appreciated
[14:49:25] eGGsha: has joined #RubyOnRails
[14:51:59] asuraphel: has left #RubyOnRails: ()
[14:52:16] skroon: I would like to run my own OAuth 2.0 Identity provider, can anyone with experience running one, tell me which one is worth looking at?
[14:52:33] jocuman: has joined #RubyOnRails
[14:55:56] Skelz0r: has joined #RubyOnRails
[14:57:01] yaymukund: has joined #RubyOnRails
[14:57:13] DEA7TH_: Papierkorb: I think I included host and it still doesn't work. I included it like Host: 192.168.0.132:8899, after Content-Type and before Content-Length
[14:57:41] joelataylor: has joined #RubyOnRails
[14:57:43] Papierkorb: DEA7TH_: have you looked at the logs what it writes there?
[14:58:03] DEA7TH_: I did look, but there was nothing about why the HTTP request fails
[14:58:31] mary5030: has joined #RubyOnRails
[14:58:56] snockerton: has joined #RubyOnRails
[14:59:01] nettoweb: has joined #RubyOnRails
[14:59:27] hakunin: has joined #RubyOnRails
[14:59:28] mary5030: has joined #RubyOnRails
[14:59:37] varunwachaspati: has joined #RubyOnRails
[15:00:37] paulcsmith: has joined #RubyOnRails
[15:02:42] nettoweb: has joined #RubyOnRails
[15:04:03] JakFrist: has joined #RubyOnRails
[15:04:42] Fire-Dragon-DoL: has joined #RubyOnRails
[15:04:58] skyjumper: anyone know why Thin (running as 'rails server') would use separate connections for each HTTP request?
[15:05:52] skyjumper: ex, this app has 229 requests and takes 5+ seconds to load locally because they're all happening in separate connections
[15:06:51] fryguy: skyjumper: I'm not sure I understand
[15:07:01] fryguy: that's how HTTP works, users make individual connections to it
[15:07:20] tubbo: skyjumper: 229 requests? that's a lot of requests.
[15:07:25] tubbo: why is your app making so many requests?
[15:10:09] werelivinginthef: has joined #RubyOnRails
[15:10:23] skyjumper: tubbo: don't know, i didn't write the thing
[15:10:40] skyjumper: fryguy: ideally you make 1 connection, and submit multiple requests within it
[15:11:09] Papierkorb: skyjumper: Keep Alive is not concurrent
[15:11:25] eGGsha: has joined #RubyOnRails
[15:11:33] Papierkorb: HTTP/2 supports that, but I doubt that thin already implements it
[15:11:48] asheinfeld: has joined #RubyOnRails
[15:12:08] fryguy: skyjumper: the HTTP/1.1 extension you are referring to is keep_alive, but as mentioned it's not concurrent, it just causes the same connection to be reused, saving some tcp_handshake time
[15:12:31] fryguy: thin (probably) supports keep-alive, so you can send an appropriate header to use it if your client library also supports it
[15:12:33] skyjumper: fryguy: right. the connection isn't being reused
[15:12:46] adavia: has joined #RubyOnRails
[15:12:51] fmcgeough: has joined #RubyOnRails
[15:13:40] paulcsmith: has joined #RubyOnRails
[15:14:10] skyjumper: confirmed, the browser is sending "Connection: keep-alive"
[15:14:19] alex88: has joined #RubyOnRails
[15:14:51] rayre: has joined #RubyOnRails
[15:15:07] chouhoulis: has joined #RubyOnRails
[15:15:10] Papierkorb: What's the servers response?
[15:16:47] skyjumper: https://gist.github.com/anonymous/3052c5e78693d5529720
[15:17:30] Creeves: has joined #RubyOnRails
[15:17:34] skyjumper: wonder why the "Connection: close"
[15:17:56] Papierkorb: Does that happen for a 200 response too? Would be a weird reason, but .. servers
[15:19:04] IFrank00: has joined #RubyOnRails
[15:20:04] Papierkorb: Huh? thin isn't HTTP/1.1 compliant? Where's the Date header in the response?
[15:20:05] hotpancakes: has joined #RubyOnRails
[15:20:21] skyjumper: interesting. getting "Connection: keep-alive" and persistent connection immediately after clearing browser cache
[15:20:47] fryguy: skyjumper: what is max-persistent-conns set to?
[15:21:11] Papierkorb: Wow, it really doesn't send a Date header. Urgh. And that's why we can't have nice things.
[15:21:31] tubbo: Thin: Not a production web server.
[15:21:44] Papierkorb: Sure it's not
[15:21:53] IFrank00: Hi I'm Upgrading my rails app to multi tenant/ I'm getting a error when creating the tenant. PG::Error: ERROR: function pg_stat_statements_reset() does not exist on this StackOverflow http://stackoverflow.com/questions/28452481/heroku-apartment-pgerror-error-function-pg-stat-statements-reset-does-no they see to disable the pg stat but I add it the migration but the schema still has the pg stat
[15:21:53] artto: has joined #RubyOnRails
[15:22:17] skyjumper: fryguy: has to be the default. i don't see any settings
[15:22:52] chouhoulis: has joined #RubyOnRails
[15:23:45] chouhoul_: has joined #RubyOnRails
[15:23:55] fryguy: skyjumper: you should double check, current documentation suggests that this is set to 100 by default.
[15:23:57] axl__: has joined #RubyOnRails
[15:24:44] riotjones: has joined #RubyOnRails
[15:25:06] skyjumper: there's no thin config
[15:27:08] darrencauthon: has joined #RubyOnRails
[15:27:35] drale2k: has joined #RubyOnRails
[15:27:40] tubbo: skyjumper: by default i think thin looks for a config at config/thin.yml
[15:27:50] tubbo: most people don't have it because they never need it
[15:28:17] skyjumper: yeah, just added that file and it seems to be ignored
[15:28:25] swamix: has joined #RubyOnRails
[15:28:28] milf_commander: has joined #RubyOnRails
[15:28:58] tubbo: skyjumper: i might be wrong haha
[15:29:08] tubbo: you can specify with -c config/thin.yml
[15:29:31] CatMartyn: has joined #RubyOnRails
[15:29:46] asheinfeld: has joined #RubyOnRails
[15:31:47] CatMartyn: has joined #RubyOnRails
[15:32:28] bf4: has joined #RubyOnRails
[15:34:02] skyjumper: weird. https://gist.github.com/anonymous/9b940025856e333a82be
[15:35:56] varunwachaspati: has joined #RubyOnRails
[15:36:51] Papierkorb: bundle exec thin ?
[15:38:48] jenrzzz: has joined #RubyOnRails
[15:39:26] givanse: has joined #RubyOnRails
[15:39:28] skroon: anyone here that is using devise with token authentication for api's?
[15:39:44] skyjumper: "be thin start --max-persistent-conns 500" still sending 'Connection: close'
[15:39:55] skyjumper: same if i specify it via thin.yml
[15:41:27] oflannabhra: has joined #RubyOnRails
[15:42:55] mary5030: has joined #RubyOnRails
[15:43:10] DCameronMauch: has joined #RubyOnRails
[15:43:16] viki_: has left #RubyOnRails: ()
[15:44:37] fryguy: skyjumper: is your app creating exceptions?
[15:44:47] blackmes1: has joined #RubyOnRails
[15:45:36] dcunit3d: has joined #RubyOnRails
[15:46:10] bronson: has joined #RubyOnRails
[15:46:11] pixelhandler: has joined #RubyOnRails
[15:46:11] skroon: what is difference with omniauth and devise, or are they both completely different things?
[15:46:26] axl__: has joined #RubyOnRails
[15:47:31] tubbo: skroon: omniauth consumes oauth, devise is a self-hosted auth solution. one might use omniauth only if they don't want to deal with storing user passwords
[15:47:35] MiracleBlue: has joined #RubyOnRails
[15:48:24] skroon: tubbo: aha, and do you happen to know what the difference then is with doorkeeper?
[15:48:28] chouhoulis: has joined #RubyOnRails
[15:49:00] jdayvie: has joined #RubyOnRails
[15:49:02] tubbo: skroon: doorkeeper is an oauth provider. i saw your question earlier but forgot about it...you'd probably want to use doorkeeper to provide the oauth2 endpoints and stuff.
[15:50:03] jhwhite: has joined #RubyOnRails
[15:52:43] asheinfeld: has joined #RubyOnRails
[15:53:14] skroon: tubbo: ah cool, so omniauth would be like a client to connecto to doorkeeper then right?
[15:53:35] skroon: tubbo: cool, that's actually what I would like to have :-)
[15:53:55] skroon: tubbo: and since doorkeeper talks oauth, it doesn't matter which client I use, as long as it's an oauth client right?
[15:54:01] julienk: has joined #RubyOnRails
[15:55:33] tubbo: well, it specifically provides OAuth2
[15:57:34] michael_mbp: has joined #RubyOnRails
[15:57:54] skroon: tubbo: right, so all OAuth2 clients should be able to use it
[15:58:31] skroon: tubbo: I want to make just a single rails app, that only runs doorkeeper, and then have seperate rails apps that connect to my IDentity Provider (this doorkeeper rails app)
[15:59:17] Cache_Money: has joined #RubyOnRails
[15:59:32] tubbo: skroon: i see no reason why you can't do that. :)
[15:59:46] skroon: tubbo: oke cool, I was thinking i'm maybe confusing different tech :-)
[15:59:56] acconrad: has joined #RubyOnRails
[16:00:07] skroon: tubbo: since I also read that devise has OAuth support, still don't know what that would do :-) lot's of new lingo for me
[16:00:36] rickmasta: has joined #RubyOnRails
[16:00:59] tubbo: i think devise has oauth support _through_ omniauth haha
[16:01:26] skroon: meaning that you could keep using devise API, while authentication through something like google oauth2?
[16:02:06] dopie: https://gist.github.com/staycreativedesign/3b2ecde3fe627b2d5f1b I am trying to create a let for post: create ....
[16:02:15] dopie: is it possible and how can I do it
[16:02:22] dopie: since Im using post on all 3 actions
[16:02:34] tubbo: dopie: use a `before` block
[16:02:55] tubbo: dopie: and perhaps a `let` to change the params when you need to
[16:03:29] Zadrel: has joined #RubyOnRails
[16:04:05] Zadrel: hello there! :D
[16:04:11] Maletor: has joined #RubyOnRails
[16:05:15] DCameronMauch: has joined #RubyOnRails
[16:06:59] smathy: has joined #RubyOnRails
[16:07:22] dopie: would I need to use a context block?
[16:08:15] jerematic: has joined #RubyOnRails
[16:09:16] asheinfeld: has joined #RubyOnRails
[16:10:11] dopie: to use a before I have to use a context block correct?
[16:10:41] zendrix: has joined #RubyOnRails
[16:11:18] Maletor: has joined #RubyOnRails
[16:11:41] __butch__: has joined #RubyOnRails
[16:11:49] dopie: tubbo, https://gist.github.com/staycreativedesign/3b2ecde3fe627b2d5f1b I se the before but getting a no method error post
[16:11:53] dopie: for class...
[16:12:37] varunwachaspati: has joined #RubyOnRails
[16:12:47] hotpancakes: has joined #RubyOnRails
[16:12:48] equestrianerd: has joined #RubyOnRails
[16:12:57] hotpancakes: has joined #RubyOnRails
[16:14:39] crislar: has joined #RubyOnRails
[16:16:13] moeabdol: has joined #RubyOnRails
[16:16:16] ProLoser: has joined #RubyOnRails
[16:16:22] equestrianerd: has left #RubyOnRails: ()
[16:16:39] skyjumper: so my "Connection: close" in thin happens because there's no Content-Length header
[16:16:57] skyjumper: tried loading Rack::ContentLength as middleware, no luck
[16:17:02] skyjumper: if anyone knows offhand...
[16:17:43] marcoceppi: has joined #RubyOnRails
[16:18:39] julienk: I am digging into the source code of rails and I am having difficulties understanding
[16:18:48] jhwhite_: has joined #RubyOnRails
[16:18:51] bronson: has joined #RubyOnRails
[16:18:53] julienk: does anyone have recommendation for understanding it?
[16:19:00] julienk: I dont mean using rails
[16:19:07] julienk: I mean really understanding the code
[16:19:39] julienk: what I am looking for is relevant books, website, or ppl to contact
[16:19:41] bricker: has joined #RubyOnRails
[16:20:14] zendrix: has joined #RubyOnRails
[16:20:35] dopie: I'm missing a }
[16:21:48] JoshL: has joined #RubyOnRails
[16:21:56] axl__: has joined #RubyOnRails
[16:24:04] silverdust: has joined #RubyOnRails
[16:24:25] gerep: has joined #RubyOnRails
[16:24:28] solars: has joined #RubyOnRails
[16:24:30] zendrix: has joined #RubyOnRails
[16:24:55] drale2k: has joined #RubyOnRails
[16:25:28] riotjones: has joined #RubyOnRails
[16:29:04] quazimod1: has joined #RubyOnRails
[16:32:18] Aswebb_: has joined #RubyOnRails
[16:32:24] jamey-uk: has joined #RubyOnRails
[16:32:51] zendrix: has joined #RubyOnRails
[16:33:00] symbol: has joined #RubyOnRails
[16:34:23] emptyflask: has joined #RubyOnRails
[16:36:23] DEA7TH_: has joined #RubyOnRails
[16:36:56] moeabdol1: has joined #RubyOnRails
[16:37:30] josh_be: has joined #RubyOnRails
[16:37:56] benlieb: has joined #RubyOnRails
[16:38:47] jerematic: has joined #RubyOnRails
[16:39:46] shinnya: has joined #RubyOnRails
[16:39:53] jamey-uk: I'm having trouble getting checkbox validation working, it's on a virtual attribute and even though the correct value (1) is being POSTed through it doesn't accept it. Am I supposed to cast it to a boolean value for this to work properly?
[16:40:10] RegulationD: has joined #RubyOnRails
[16:40:16] paulcsmith: has joined #RubyOnRails
[16:40:35] RegulationD: has joined #RubyOnRails
[16:40:45] DylanJ: jamey-uk: is the field allowed in your strong_params?
[16:41:52] jamey-uk: DylanJ: thanks, that's the one :)
[16:42:15] eGGsha: has joined #RubyOnRails
[16:45:06] tcy227: has joined #RubyOnRails
[16:45:36] hotpancakes: has joined #RubyOnRails
[16:45:52] silverdust: Using devise how can I take users to last attempted access regulated page immediately after login
[16:47:00] smathy: julienk, there's nothing like that that I'm aware of, as far as source code goes the Rails source is fairly easy to follow. The most common problem I've seen is people's understanding of ruby, could that be an area that's letting you down?
[16:47:28] tcy227: Hi, I'm having trouble integrating CSS into my Rails app. I've linked the CSS with <%= stylesheet_link_tag "/assets/stylesheets/main.css" %> in my application.html.erb but the CSS is not displaying my other html.erb files
[16:48:24] julienk: smathy, mmm, I am fairly new to both ruby and rails
[16:49:12] jdayvie: Where did you place the CSS?
[16:49:30] jdayvie: It should link automatically into the application without needing to add.
[16:49:33] julienk: however I did study a lot of ruby. still need to learn some ruby stuffs, but also I would like to have a global understanding ot rails (how does it hold together with railties for example)
[16:50:21] julienk: and I would like to know what is the best areas of rails to start digging. the whole code base is a bit overwhelming when you are new, so I would like to focus on one specific part
[16:50:22] jdayvie: Well...I use the Application.css file so that affects the entire project. As far as creating your own file, I never had to do that.
[16:50:29] smathy: julienk, ok, so I'd definitely recommend improving your ruby knowledge then, my general recommendations are really any of the resources under "Getting Started" here: https://www.ruby-lang.org/en/documentation/ - but especially Learn to Program and Ruby Koans
[16:50:51] leslie: has joined #RubyOnRails
[16:50:51] leslie: has joined #RubyOnRails
[16:51:23] silverdust: tcy227: Aren't you using sprockets?
[16:51:26] GreySyntax: has joined #RubyOnRails
[16:51:26] smathy: julienk, http://guides.rubyonrails.org/initialization.html is a very good place to start, once you understand ruby to the point where the rails source code reads fine to you.
[16:51:44] silverdust: You are trying to relatively call the CSS
[16:51:54] zack6849: has joined #RubyOnRails
[16:51:54] zack6849: has joined #RubyOnRails
[16:52:19] silverdust: <%= stylesheet_link_tag 'main' %> should do what you want
[16:52:25] lxkm__: has joined #RubyOnRails
[16:52:48] julienk: thanks smathy
[16:52:55] tcy227: silverdust: I am not
[16:52:59] julienk: I will have a look into this
[16:53:12] julienk: I have a last question. specific on ruby, but I have seen that in the rails code
[16:53:34] silverdust: tcy227: you are certain you don't have sprockets? What version of rails?
[16:53:36] julienk: some objects use estend
[16:53:46] julienk: some others use include inside
[16:53:49] jamey-uk: has left #RubyOnRails: ()
[16:54:14] julienk: I understand that if you use extend it means that you are including methods in a static way
[16:54:30] julienk: and with include you include methods as instance methods
[16:54:31] Caius: has joined #RubyOnRails
[16:54:46] julienk: is this the main difference between both?
[16:54:46] beauby: has joined #RubyOnRails
[16:55:01] tcy227: silverdust: I'm not using Sprockets, Rails 4.2.1
[16:55:02] rj-code: has joined #RubyOnRails
[16:55:17] smathy: julienk, ruby doesn't use "static" - but yes.
[16:55:32] julienk: ok, thanks
[16:56:09] smathy: julienk, important to note: `include` can also add to class methods, based on the `included` method in the included module.
[16:56:32] skipkeats: has joined #RubyOnRails
[16:56:42] silverdust: Since sprockets ships with 4.2.1 you probably have it except you removed it. If the latter there's nothing I can do
[16:56:51] julienk: smathy, got it, thx:)
[16:57:21] skipkeats: has left #RubyOnRails: ()
[16:57:35] tcy227: I might have it then. I just don't see it anywhere
[16:57:47] tcy227: silverdust:^
[16:57:54] skyjumper: so "thin" closes the connection every time if the response is 304 Not Modified
[16:58:01] skyjumper: does that sound right to anyone else?
[16:58:12] skyjumper: it's adding a lot to the load time in my dev environment
[16:58:13] momomomomo: skyjumper: !ask
[16:58:13] helpa: skyjumper: How to ask good questions and get great answers: http://www.mikeash.com/getting_answers.html
[16:58:23] momomomomo: show the logs
[16:58:32] silverdust: ok tcy227 just do this <%= stylesheet_link_tag 'main' %>
[16:58:50] silverdust: ok tcy227 just do this <%= stylesheet_link_tag 'application' %>
[16:58:55] skyjumper: question was directed at a few people who already knew my issue
[16:59:06] smathy: tcy227, use the scaffold generators to see how Rails does this itself.
[16:59:18] silverdust: sorry you should follow the second. Sprockets will include main.css with application.css
[16:59:46] dopie: whats in easier way to write 6.times do foo end
[16:59:48] silverdust: That's if you didn't delete application.css already
[17:00:10] momomomomo: >> 6.times { |i| puts i }
[17:00:19] dopie: no other way?
[17:00:33] momomomomo: what part, specifically, do you take issue with dopie
[17:00:52] tcy227: silverdust: It's still there but it's empty
[17:02:17] silverdust: ok just follow the code I gave with application
[17:02:25] tcy227: It's in there
[17:02:33] silverdust: and it still fails?
[17:02:46] tcy227: I just filled up my application.css in /app/assets/stylesheets with my main.css code
[17:02:49] tcy227: Still fails
[17:03:06] silverdust: create a gist
[17:03:41] momomomomo: helpa: !gist
[17:03:41] helpa: helpa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[17:03:52] rickmasta: has joined #RubyOnRails
[17:04:52] tcy227: silverdust: what code do you want?
[17:05:15] silverdust: The html where you call the CSS file
[17:05:27] silverdust: Thanks momomomomo
[17:06:11] tcy227: https://gist.github.com/anonymous/968b31c92021c4bf045b
[17:06:30] lapidary: has joined #RubyOnRails
[17:07:04] jsrn_: has joined #RubyOnRails
[17:07:32] JakFrist: has joined #RubyOnRails
[17:07:44] yardenbar: has joined #RubyOnRails
[17:09:00] bronson: has joined #RubyOnRails
[17:09:05] silverdust: That should work just fine
[17:09:38] zendrix: has joined #RubyOnRails
[17:10:20] tcy227: silverdust: That was my thought too
[17:10:45] christiandsg: has joined #RubyOnRails
[17:10:50] yaw: has joined #RubyOnRails
[17:13:39] melter: has joined #RubyOnRails
[17:14:48] eggoez: has joined #RubyOnRails
[17:15:36] yaw: has joined #RubyOnRails
[17:18:15] bf4: has joined #RubyOnRails
[17:19:33] gambl0re: has joined #RubyOnRails
[17:20:04] hotpancakes: has joined #RubyOnRails
[17:20:57] lxsameer: has joined #RubyOnRails
[17:23:19] hotpanca_: has joined #RubyOnRails
[17:23:34] tubbo: has joined #RubyOnRails
[17:23:56] asheinfeld: has joined #RubyOnRails
[17:24:41] lapidary: has left #RubyOnRails: ()
[17:25:36] LambdaSource: has joined #RubyOnRails
[17:28:06] rrawlins: Got a gem which I maintain, and it has a dependancy listed in the Gemspec however users reporting that Bundler doesn't appear to be installing the dependency when they install my gem. What are the potential reasons for that?
[17:28:38] smathy: tcy227, ok, and add your app/assets/stylesheets/application.css to the gist.
[17:29:14] iamjarvo: has joined #RubyOnRails
[17:29:15] rrawlins: Here's the Gem in question, users reporting that Gibbon isn't being installed as a dependancy. https://github.com/sorry-app/devise_campaignable
[17:29:21] andrew9184: has joined #RubyOnRails
[17:30:32] tubbo: rrawlins: your gemspec looks valid
[17:31:19] crdpink: has joined #RubyOnRails
[17:31:28] tubbo: rrawlins:
[17:31:43] rrawlins: tubbo: thanks, that was my instinct too. Which is what's leaving me confused.
[17:31:57] tubbo: rrawlins: only thing i can think of is you're using add_runtime_dependency but...it seems to pull in devise, right?
[17:32:15] tubbo: simply doing gem 'devise_campaignable' should be sufficient to bring in all of the dependencies
[17:32:36] tcy227: smathy: I got it to work
[17:32:46] rrawlins: tubbo: I believe so, however likelyhood is that the users already have Devise in place, so can't be sure.
[17:32:46] smathy: Glad to hear it/
[17:33:15] tubbo: rrawlins: i just added the gem to a random Gemfile, we'll see what gets pulle din
[17:33:17] tubbo: pulled in*
[17:33:34] rrawlins: tubbo: thanks! appreciate the help.
[17:33:35] tubbo: (it does not already have devise installed)
[17:34:00] tubbo: looks like it pulled in devise
[17:34:16] hotpancakes: has joined #RubyOnRails
[17:34:18] tubbo: rrawlins: ...as well as Gibbon
[17:34:19] smathy: rrawlins, I got both devise and gibbon pulled in.
[17:34:22] smathy: Looks fine.
[17:34:23] tubbo: problem solved :)
[17:35:05] rrawlins: tubbo: haha! well I'm glad it's worked for you, it did for me also - just had several reports of others having issues.
[17:35:38] rrawlins: tubbo: they had to explicitly add 'gem gibbon' to their own gemfile to get it working.
[17:35:57] tubbo: *shrug* they must have been doing something else wrong
[17:36:45] rrawlins: tubbo: well that's good to know. I won't burn too much time on it then :) thanks for the sanity check! really appreciated.
[17:36:53] tubbo: no worries
[17:37:06] tubbo: rrawlins: always check Gemfile.lock in a test app for your gem to make sure shit gets pulled in
[17:37:45] rrawlins: Good tip! Will do so moving forward.
[17:38:22] towski_: has joined #RubyOnRails
[17:38:30] zendrix: has joined #RubyOnRails
[17:39:21] jenrzzz: has joined #RubyOnRails
[17:39:29] DEA7TH_: has joined #RubyOnRails
[17:39:31] lessless: has joined #RubyOnRails
[17:40:45] k4nd4lf: has joined #RubyOnRails
[17:42:34] rromanchuk: has joined #RubyOnRails
[17:42:53] arup_r: has joined #RubyOnRails
[17:43:05] bricker: where did tubbo go I want to make fun of him
[17:44:24] smathy: bricker, go ahead, he can look at the logs later.
[17:44:31] bricker: tubbo sux! hehehe
[17:45:17] yfeldblum: has joined #RubyOnRails
[17:45:33] nzst: has joined #RubyOnRails
[17:45:43] bronson: has joined #RubyOnRails
[17:48:28] diegoviola: has joined #RubyOnRails
[17:48:45] diegoviola: has joined #RubyOnRails
[17:49:26] tubbo: has joined #RubyOnRails
[17:50:40] veekram: has joined #RubyOnRails
[17:53:56] Xiti: has joined #RubyOnRails
[17:54:53] asheinfeld: has joined #RubyOnRails
[17:54:58] jhwhite: has joined #RubyOnRails
[17:56:12] momomomomo: has joined #RubyOnRails
[17:57:46] veekram: hello alll
[17:59:00] tcy227: How do I concentrate CSS and JS files in the their respective application files
[17:59:35] FunkyPajamas_: has joined #RubyOnRails
[17:59:46] tcy227: I.E. /app/assets/stylesheets/application.css and /app/assets/javascripts/application.js
[17:59:54] ProLoser: has joined #RubyOnRails
[18:00:54] tubbo: tcy227: "concentrate"?
[18:01:09] tubbo: they are precompiled into those manifest files when you run rake assets:precompile on deploy
[18:02:28] podman: has joined #RubyOnRails
[18:04:11] tcy227: tubbo: I'm not sure I understand. If I have, say, 4 different .css files in my /app/assets/stylesheets, and my .html.erb is looking for application.css, how do I compile all four assets into that file
[18:04:35] tubbo: tcy227: you can run rake assets:precompile in production, but you won't need to do anything in development or test.
[18:05:07] drale2k: has joined #RubyOnRails
[18:05:36] workmad3: tcy227: do you see at the top of application.css a comment block that has a line like `*= require_tree .`?
[18:06:11] loc22: has joined #RubyOnRails
[18:06:39] workmad3: tcy227: the tool used by rails to handle your assets (Sprockets) will pull out the first comment-block of a file it's managing and read off certain directives, which it'll use to assemble your compiled files
[18:06:56] tcy227: workmad3: https://gist.github.com/anonymous/568a81d1409f1ea7ef7f
[18:07:06] tcy227: There's the gist of my application.css
[18:07:19] workmad3: tcy227: yeah, all of those are sprockets directives
[18:07:37] tcy227: So it should work?
[18:09:01] tcy227: I just wanted to make sure the .min.css would go through and be added to the page
[18:09:08] momomomomo_: has joined #RubyOnRails
[18:09:13] workmad3: tcy227: you might need to adjust the last line to `*= require_tree .` (that last . is important)
[18:10:42] jhwhite: has joined #RubyOnRails
[18:11:26] tcy227: workmad3: alright I've added the . but it does not look like the fontawesome.min.js is loading
[18:11:35] tcy227: min.css, sorry
[18:11:44] choke: has joined #RubyOnRails
[18:12:06] jdayvie: Does anyone have knowledge of ActionMailer? I had a general question.
[18:13:07] asheinfeld: has joined #RubyOnRails
[18:13:58] smathy: tcy227, you'll probably benefit from this: http://guides.rubyonrails.org/asset_pipeline.html
[18:14:46] smathy: jdayvie, just ask your question.
[18:14:49] loc22: Hi guys, I know this isn't for Rails, but anyone knows what is the equivalent '--binary-data'(cURL) in 'http/net'?
[18:14:53] jeanlinux: has joined #RubyOnRails
[18:15:39] tubbo: loc22: what does --binary-data do?
[18:16:28] jdayvie: Okay, thanks. Overall, looking to implement confirmations for signups, weekly mailers, etc. for users. I have no experience implementing but I have read up on some aspects briefly (before getting a bit confused). Is it best for me to build my own setup or is there a gem which is better suited?
[18:16:31] loc22: tubbo: No idea :/ but looks like it attaches some data in the request...
[18:16:56] loc22: tubbo: is '--data-binary'
[18:17:46] tubbo: loc22: hmm, did you try just passing over binary data in Net::HTTP?
[18:17:52] tubbo: (without doing any special configuration)
[18:18:15] tubbo: loc22: i learned what --data-binary does by typing `man curl` and searching for data-binary
[18:18:34] tubbo: on a mac, the manpage reads "(HTTP) This posts data exactly as specified with no extra processing whatsoever."
[18:18:36] bf4: has joined #RubyOnRails
[18:18:52] momomomomo: has joined #RubyOnRails
[18:19:06] tubbo: i suppose it just means that won't do anything to the value you pass in, it just takes that value wholesale and uses it as the body of the POST request.
[18:19:41] oflannabhra: has joined #RubyOnRails
[18:20:26] eckod: has joined #RubyOnRails
[18:21:08] loc22: tubbo: Yes, you are right
[18:21:40] loc22: tubbo: The actual request that Im trying to do with 'http/net' is the following one: https://gist.github.com/anonymous/025d8b274d108be08dc6
[18:22:01] smathy: I think it mainly just strips out CRs and LFs
[18:22:12] smathy: (ie. the binary mode does NOT do that)
[18:23:05] ndrei: has joined #RubyOnRails
[18:23:10] batasrki: has joined #RubyOnRails
[18:23:24] leonardoajim: has joined #RubyOnRails
[18:23:25] bmurt: has joined #RubyOnRails
[18:24:07] smathy: jdayvie, have you read http://guides.rubyonrails.org/action_mailer_basics.html ?
[18:24:17] DLSteve: has joined #RubyOnRails
[18:25:47] jdayvie: smathy: Yes, I read the beginning portion of it but I was unsure if that was exactly what I was looking for.
[18:26:12] jdayvie: Wanted to make sure this was the best route to go =)
[18:26:12] appledroid: has joined #RubyOnRails
[18:26:41] jdayvie: As I research, people keep talking about gems and it made me question which is best to use. I know there are multiple ways to do the same thing but still =)
[18:26:52] dopie: Anyone can help me why am i getting symbol_keys for 78 string error
[18:26:53] dopie: https://gist.github.com/staycreativedesign/37e164f8ad66a2874a37
[18:27:23] smathy: loc22, there's nothing that request you're showing that requires the --data-binary (ie. it would work the same with just the -d option), and therefore you shouldn't be looking for anything special in net/http
[18:27:37] tubbo: dopie: that's not how you pass in params to a POST rqeuest
[18:27:53] tubbo: dopie: you're passing in a User, it has to be a Hash of some kind.
[18:28:01] tubbo: check out some other examples on the rails guides
[18:28:09] nigelx344: has joined #RubyOnRails
[18:28:26] dopie: tube isn't the fabricator passing a hash?
[18:28:56] bikram: has joined #RubyOnRails
[18:29:07] jordsmi: has joined #RubyOnRails
[18:29:08] nigelx344: Is there a way to create your own def create
[18:29:22] nigelx344: like I want a def addToTable to be posted
[18:29:30] nigelx344: through form_tag
[18:30:23] bikram: has left #RubyOnRails: ()
[18:30:50] bricker: nigelx344: you can define whatever methods you want
[18:31:06] nigelx344: so I have def sendMessage
[18:31:06] bikram: has joined #RubyOnRails
[18:31:20] tubbo: dopie: no it is not, it is passing a User.
[18:31:34] JoshL: has joined #RubyOnRails
[18:31:36] nigelx344: and form_for :info , ur=> posts_path
[18:31:38] baweaver: has joined #RubyOnRails
[18:32:15] dopie: post :create, user: {full_name: 'Gus', password: 'red500', email: 'somethingelse'}
[18:32:27] bikram: has left #RubyOnRails: ()
[18:32:36] dopie: is how I normally would pass it but I would like to use fabricator
[18:32:40] smathy: dopie, Fabricate(:foo) create an object.
[18:32:42] tubbo: nigelx344: you just want to change the method name right? you just want POST /users to perform the UsersController#add_to_table action?
[18:32:51] dopie: smathy, I did do that
[18:33:00] smathy: dopie, right, but that's not what you want.
[18:33:05] nigelx344: i have a form to post to def create()
[18:33:11] macmkboy2: has joined #RubyOnRails
[18:33:13] tubbo: dopie: well first of all, if you've already done Fabricate(:user), why would you `post :create` a User? you already have one.
[18:33:24] smathy: dopie, if you pass an object to one of the get/post/put methods then it'll call `.to_param` on it and pass that ID.
[18:33:36] veekram: has joined #RubyOnRails
[18:33:36] tubbo: nigelx344: don't fight the framework, just use the conventions that Rails provides. if you don't like those conventions, use Sinatra.
[18:33:52] wpp: has joined #RubyOnRails
[18:34:04] tubbo: nigelx344: you can add additional POST actions (for example) by adding routes to the resources block, but in this case it just seems like you want to be pedantic about what the method is named.
[18:34:10] dopie: tubbo, thank you
[18:34:20] tubbo: which is a really bad reason for adding special configuration to config/routes.rb
[18:34:56] dopie: smathy, ok I get it as well :) sorry just learning TDD
[18:35:05] qejk: has joined #RubyOnRails
[18:35:14] macmkboy2: has left #RubyOnRails: ()
[18:35:39] smathy: dopie, no need to apologize, this was a well asked question!
[18:35:42] zendrix: has joined #RubyOnRails
[18:35:58] sargas: has joined #RubyOnRails
[18:35:59] hotpanca_: has joined #RubyOnRails
[18:37:40] nigelx344: okay thanks tubbo
[18:37:49] nigelx344: so i have ont hing then
[18:38:02] nigelx344: a form that accesses download links,
[18:38:09] nigelx344: and another form that upload files
[18:38:16] Papierkorb: Does anyone here btw actually write tests, run them, be surprised that they fail, implement it, and "get it to green" while doing TDD?
[18:38:21] nigelx344: Do I post it into the same def create()?
[18:38:41] tubbo: nigelx344: !gist me the code you're working with, both forms and the controller. i'm really not sure what your issue is.
[18:38:41] helpa: nigelx344: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[18:39:10] batasrki: Papierkorb: everything but "be surprised they fail"
[18:39:13] veekram: Do anyone have sweet example on proc?
[18:39:26] batasrki: Papierkorb: I generally set out with an idea on how to implement something
[18:39:30] tubbo: Papierkorb: not really, i'm a test-last kind of person
[18:39:34] nigelx344: oh, im on a library computer atm
[18:39:43] nigelx344: i dont have access to my code
[18:39:50] batasrki: Papierkorb: during implementation or testing, I may change my mind or observe things that aren't working
[18:40:05] tubbo: nigelx344: hmm, well it will be difficult to help. i'm not sure why you'd need a POST request or a form just for downloading files
[18:40:08] tubbo: or why that form has to be a POST
[18:40:11] nettoweb: has joined #RubyOnRails
[18:40:11] nigelx344: For example, I have two forms that both are intended to do different things
[18:40:23] nigelx344: store to different tables
[18:40:39] Papierkorb: I never really did front-end dev, I wrote libraries mainly and there I wrote a (doxygen) documentation, wrote the test against that and then the implementation. Or the other way around, didn't matter, as the only truth was what the docs said, and nothing else
[18:40:40] tubbo: nigelx344: if that's the case, why are they both going to the same controller?
[18:40:42] nigelx344: I cant just link it all to def create() because thats only one function
[18:40:56] nigelx344: because I want them on the same page
[18:41:10] nigelx344: Sorry im a noob
[18:41:30] dopie: ok... now my user is being created by Fabricate
[18:41:49] dopie: but my response.redirect fails
[18:41:56] Papierkorb: Thinking about it, is there actually some gem which implements something like that where I can define tests e.g. in the documentation-comment or something?
[18:42:30] tubbo: nigelx344: that's ok, this would just be way easier if you had access to the code because i can see several faults with this approach
[18:43:03] tubbo: for one thing, it feels like there should be two controllers, each of your forms hitting a different controller because they are updating different tables
[18:43:04] bronson: has joined #RubyOnRails
[18:43:38] tubbo: Papierkorb: kind-of... https://www.relishapp.com/
[18:43:58] tubbo: unfortunately it uses cucumber :D
[18:44:06] Papierkorb: not only that, it's also paid only
[18:44:13] dopie: https://gist.github.com/staycreativedesign/37e164f8ad66a2874a37
[18:44:15] blackmes1: has joined #RubyOnRails
[18:44:27] Papierkorb: tubbo: but thanks
[18:44:30] asheinfeld: has joined #RubyOnRails
[18:44:38] dopie: its giving me 200.... and not redirecting
[18:45:16] nigelx344: ill go back home later and ill get the code up
[18:45:18] tubbo: Papierkorb: i was talking to Radar about this the other day actually, typically the best docs are written, not generated.
[18:46:16] adavia: damn i need a csv list of all countries and states in the world
[18:46:17] Papierkorb: Another question I had for a while now: I'm using RSpec/Capybara to write behaviour tests, so, "visit this, click that and make sure I see something" stuff. Is there a reason now to also have tests going against the controller directly and not only against what they render? (You can assume that I also tested security stuff)
[18:46:44] joelataylor: has joined #RubyOnRails
[18:46:53] Papierkorb: tubbo: absolutely, auto generated docs are shit. I was actually thinking about the other way around, kind like generating tests out of docs, or at least embedding tests into the docs
[18:47:38] smathy: adavia, look at https://github.com/jim/carmen
[18:48:45] Aswebb_: has joined #RubyOnRails
[18:49:04] mary5030: has joined #RubyOnRails
[18:50:08] DeLaHelias: has joined #RubyOnRails
[18:51:03] zendrix: has joined #RubyOnRails
[18:51:38] okdas: has joined #RubyOnRails
[18:51:39] okdas: has joined #RubyOnRails
[18:52:11] ruurd: has joined #RubyOnRails
[18:54:18] baweaver: has joined #RubyOnRails
[18:55:02] x1337807x: has joined #RubyOnRails
[18:55:51] x1337807x: has joined #RubyOnRails
[18:56:43] chouhoul_: has joined #RubyOnRails
[18:56:48] x1337807x: has joined #RubyOnRails
[18:57:04] arooni-mobile__: has joined #RubyOnRails
[18:57:06] arooni-mobile: has joined #RubyOnRails
[18:57:29] x1337807x: has joined #RubyOnRails
[18:58:36] chouhoul_: has joined #RubyOnRails
[18:59:26] eggoez: has joined #RubyOnRails
[19:00:53] tubbo: def options(value = @options)
[19:00:57] tubbo: fuck you to whoever wrote this :P
[19:02:04] Hates_: tubbo: sorry :P
[19:02:09] asheinfeld: has joined #RubyOnRails
[19:02:37] Hates_: reminds me of the time (last week) when I thought adding a method called send to a class was a good idea :P
[19:02:57] rhizome: that's a paddlin'
[19:02:58] tubbo: lol Hates_, yeah...that was the first big bug i fixed when i got here. we had defined `empty?` on an Order model
[19:03:34] workmad3: has joined #RubyOnRails
[19:05:24] christiandsg: has joined #RubyOnRails
[19:05:40] elektronaut: has joined #RubyOnRails
[19:05:43] srinidhi: has joined #RubyOnRails
[19:05:52] drPoggs: has joined #RubyOnRails
[19:06:55] tbuehlmann: Hates_, actually send is meant to be overriden in ruby, __send__ is not
[19:07:36] Hates_: tbuehlmann: It was an AASM event. Seemed to cause everything to just explode :S
[19:07:50] Pupeno: has joined #RubyOnRails
[19:07:55] JakFrist: has joined #RubyOnRails
[19:08:00] abuzze: has joined #RubyOnRails
[19:08:19] tbuehlmann: yeah, because people depend on #send rather than #__send__
[19:08:20] dopie: tubbo, ok now I created the user but now the redirect isn't working
[19:08:21] dopie: https://gist.github.com/staycreativedesign/37e164f8ad66a2874a37
[19:08:43] tubbo: tbuehlmann: why would send() need to be overridden ever when you have method_missing?
[19:08:54] dopie: it works when I do a post :create, user: {full_name: 'Gus', password: 'red500', email: 'somethingelse'}
[19:09:42] tubbo: dopie: i don't see where you do the `post :create` thing
[19:09:49] tubbo: tbuehlmann: ...
[19:10:03] tubbo: tbuehlmann: so your point about send() being there so you can override it is...not right? :P
[19:10:17] okdas: has joined #RubyOnRails
[19:10:17] okdas: has joined #RubyOnRails
[19:10:26] tubbo: i really don't think send() is ever supposed to be overridden
[19:10:28] dopie: tubbo, i removed it since i'm using Fabricate(:user)
[19:10:43] tbuehlmann: tubbo, I was joking about method_missing, I thought you were, too. my point is: it's okay to override #send, there's still __send__ that can be used
[19:11:10] tubbo: tbuehlmann: yeah but i was legit curious as to why you'd ever need to override #send when you can override the "hook" #method_missing
[19:11:11] tbuehlmann: tubbo, iirc, it is. it's for things like mail.send. that's why there's also #__send__ (beside public_send, but well..)
[19:11:21] tubbo: tbuehlmann: it's similar to why you can't override self.new, but you *can* override #initialize...
[19:11:38] tbuehlmann: I don't get what method_missing has to do with it
[19:12:13] Hates_: see this is proof that me overriding send causes nothing but trouble :P
[19:12:33] tubbo: tbuehlmann: well first of all..let's just be clear about something. when i call a method on an object, is Ruby itself running MyObject#send or MyObject#__send__?
[19:13:07] tbuehlmann: um, neither of both?
[19:13:13] asheinfeld: has joined #RubyOnRails
[19:13:36] tbuehlmann: but I'm not sure about that, I don't know the internals too well
[19:14:15] tubbo: tbuehlmann: can you provide any sort of source or documentation for this assertion that Ruby is encouraging you to override #send on an object?
[19:14:38] smathy: No, methods don't call send, send calls methods.
[19:14:39] tubbo: or is this just something you kinda reasoned out of learning Ruby?
[19:14:42] okdas: has joined #RubyOnRails
[19:14:42] okdas: has joined #RubyOnRails
[19:14:47] emptyflask: has joined #RubyOnRails
[19:15:11] tbuehlmann: http://stackoverflow.com/a/4658359/384293
[19:15:15] JoshL: has joined #RubyOnRails
[19:15:52] batasrki: has left #RubyOnRails: ()
[19:16:16] bhuvan_aurora: has joined #RubyOnRails
[19:16:28] bhuvanaurora: has joined #RubyOnRails
[19:16:45] tubbo: "The reason for that is that send existed first and only later it was realized that the name send might also usefully be used in other contexts, so __send__ was added (that's the same thing that happened with id and object_id by the way)."
[19:16:59] JoshL: has joined #RubyOnRails
[19:17:10] tubbo: that kinda disproves your argument right there. it's not that ruby *intended* for us to use send(), it's just that they made a mistake and couldn't go back.
[19:17:29] tubbo: ruby is hilarious sometimes.
[19:17:31] rhizome: that's good. proper style should make __send__(:foo) as ugly as possible
[19:17:56] tubbo: i'm gonna add a monkeypatch to Object so that when something calls send() it will `puts "fuck you"` ;)
[19:18:35] tubbo: Object#send and Object#id are among the few places where Ruby does make internal things a little less ugly than they should be
[19:18:52] smathy: tubbo, if you define your own `send` then ruby just lets you, if you define your own `__send__` then ruby displays a warning.
[19:18:52] oflannabhra: has joined #RubyOnRails
[19:19:13] tbuehlmann: my point being: use __send__ if you want to call methods dynamically, not send
[19:19:13] smathy: tubbo, I wouldn't say that ruby encourages you to redefine `send` but it certainly doesn't discourage you.
[19:19:14] tubbo: interesting
[19:19:43] tubbo: Abut...i don't want warnings all over the place? so why should i redefine __send__?
[19:19:56] tubbo: seems like i should keep redefining send() because it won't throw a warning
[19:19:58] tbuehlmann: I do this even on my own classes, so I wouldn't have to change something when implementing a #send method
[19:20:19] tbuehlmann: are you trolling right now? can't say..
[19:20:42] tbuehlmann: is it friday yet?
[19:20:46] smathy: tubbo, not sure what you're saying now. I was just pointing out the warning to show that ruby's warnings add credence to the claim that it's happy for you to define your own `send`
[19:20:47] tbuehlmann: what year do we have?
[19:20:47] tubbo: i wish haha
[19:21:08] workmad3: has joined #RubyOnRails
[19:21:18] tubbo: i guess i've had very few instances where i even wanted to redefine send()
[19:21:29] Etriaph: has joined #RubyOnRails
[19:21:30] dopie: So fabricate creates and returns a user... how can i call the post create before or after it?!@
[19:21:50] smathy: tubbo, I've done it a fair bit over the years.
[19:21:50] tubbo: dopie: you're not trying very hard to figure this out
[19:22:13] dopie: tubbo, am I missing syntax from rspec?!@
[19:22:16] tubbo: smathy: anthrax.send(to: smathy)
[19:22:28] tubbo: dopie: yeah, you're missing the whole "making an http request" part
[19:22:37] tubbo: because you removed that line and replaced it with another line that didn't do what you wanted
[19:22:38] smathy: tubbo, you backward weirdo, should me smathy.send :anthrax
[19:22:52] tubbo: smathy: this is ruby 2.x so i'm using keyword arguments. get with the program grandpa.
[19:22:54] dopie: So i need the original line
[19:23:05] bricker: tubbo: tbuehlmann the two are different anyways
[19:23:12] smathy: class Smathy; def send; puts "Fuck you tubbo!"; end; end
[19:23:14] dopie: the post :create
[19:23:18] bricker: #send is defined on Kernel, #__send__ is defined on BasicObject
[19:23:27] tubbo: dopie: yeah, and in controller tests i typically don't use factories/fixtures because i find it hard to parse out the attrs i want. instead, i just hand-write all the attrs in that i want to pass into the request.
[19:23:34] tubbo: smathy: :D
[19:23:39] slash_nick: smathy: can we run like 10 of those in parallel?
[19:23:46] tubbo: only with jruby
[19:23:48] ariedler: has joined #RubyOnRails
[19:23:54] dopie: tubbo, so I don't use fabricator on the post create
[19:24:16] tubbo: dopie: you said earlier that you wrote in all the attrs yourself and that seemed to work. i would suggest just keeping with that.
[19:24:35] ProLoser: has joined #RubyOnRails
[19:24:54] arBmind: has joined #RubyOnRails
[19:25:19] dopie: tubbo, but the user model is going to grow to include a lot of things and instead of me replacing them all the time in all the tests i can just do it in 1 place
[19:25:29] asheinfeld: has joined #RubyOnRails
[19:25:55] toretore: has joined #RubyOnRails
[19:25:58] tubbo: dopie: well, if you do need to use a fixture or fabricator thing...you might want to do something like this:
[19:26:05] iamjarvo: has joined #RubyOnRails
[19:26:07] baweaver: has joined #RubyOnRails
[19:26:11] jenrzzz: has joined #RubyOnRails
[19:26:28] tubbo: dopie: Fabricate(:user).attributes.except(:id, :created_at, :updated_at)
[19:26:41] tubbo: that will produce a hash of attrs that won't include the rails default shit like timestamps and theid
[19:26:47] iamjarvo: has joined #RubyOnRails
[19:27:05] dopie: post :create, user: Fabricate.attributes_for(:user)
[19:27:35] tubbo: hey if that works, go for it
[19:27:45] tubbo: i dunno what attributes_for does, it's been a while since i used Fabricator
[19:27:55] tubbo: problem is that no one uses it in real life, it's all FactoryGirl out here ;)
[19:27:56] baweaver: has joined #RubyOnRails
[19:29:03] bricker: it probably returns a hash of attributes
[19:29:23] skroon: anyone know a easy way to add token authorization (for api) to devise? I was playing around with devise_token_auth gem, but it seems to be a complete replacement of devise as well
[19:29:58] tubbo: skroon: whenever i've had to do this, i used this gist to get me started https://gist.github.com/josevalim/fb706b1e933ef01e4fb6
[19:30:03] hotpancakes: has joined #RubyOnRails
[19:30:10] tubbo: got it working using ember-simple-auth and devise
[19:30:33] skroon: tubbo: oke, thanks :-) seen that link mentioned on the devise wiki... but I thought perhaps there is a gem for it
[19:34:13] JoshL: has joined #RubyOnRails
[19:37:13] baweaver: has joined #RubyOnRails
[19:37:31] asheinfeld: has joined #RubyOnRails
[19:39:01] gusrub: has joined #RubyOnRails
[19:41:54] loc22: has joined #RubyOnRails
[19:42:30] Frem: has joined #RubyOnRails
[19:42:30] jdayvie: has joined #RubyOnRails
[19:43:17] skroon: tubbo: so if I understand it correctly, the thing that makes it more secure is the addition of including e-mail address in the params?
[19:43:18] delianides: has joined #RubyOnRails
[19:43:44] tubbo: token auth is kind-of a weird thing
[19:43:50] jdayvie: Howdy =) Could someone tell me where I would place a search iteration for finding users in a search within my view?
[19:44:03] skroon: tubbo: what would perhaps be a better way to do authentication via API requests?
[19:44:04] dan0034001: has joined #RubyOnRails
[19:44:58] veekram: @jdayview . On a controller of course :)
[19:45:02] tubbo: skroon: i suppose token auth is inherently insecure because you have to pass the access token (which never changes) in clear text over the wire
[19:45:05] jfarmer: has joined #RubyOnRails
[19:45:17] tubbo: so all i have to do is wait for you to get on a coffeeshop wifi and sniff the traffic to determine your login token
[19:45:20] tubbo: then i can log in as you
[19:45:28] smathy: jdayvie, what's a "search iteration"?
[19:45:29] delianides: has joined #RubyOnRails
[19:45:40] bricker: shiteration?
[19:45:45] bricker: that one was for tubbo
[19:45:56] pipework: Shituation?
[19:46:01] veekram: lol. shiteration!
[19:46:01] pipework: Relationshit?
[19:46:03] bricker: you ruined it
[19:46:12] tubbo: skroon: compare this to OAuth, where you have to provide credentials and you get back a token that is temporarily valid, but will eventually expire (or can be expired manually by the user)
[19:46:17] pipework: bricker: It's kinda what I do.
[19:46:28] delianides: has joined #RubyOnRails
[19:46:35] jdayvie: veekram: So where I have `if params[:search]`, I would place the iteration there?
[19:47:08] jdayvie: Smathy: When I say that, I mean to place a block to go through results and return those that match the search query.
[19:47:30] veekram: Its ok to put it there inside some def
[19:47:35] zendrix: has joined #RubyOnRails
[19:47:50] tubbo: bricker: <3
[19:47:59] veekram: if params[:search].present? # do this and that
[19:47:59] jdayvie: Right, its inside that pages' method.
[19:48:08] jdayvie: Okay, thank you!
[19:48:11] jdayvie: Let me give that a try now =)
[19:48:38] skroon: tubbo: right so moving to OAuth2 is probably a good idea anyways... but there you also have to store the token locally right? I mean for API usage
[19:49:00] tubbo: skroon: what exactly are you trying to do here? when you say "API" it might mean a lot of things
[19:49:02] tubbo: web app? mobile app?
[19:49:06] tubbo: satellite? :)
[19:49:23] skroon: tubbo: mobile app basically
[19:49:35] skroon: tubbo: I wish satellite though :)
[19:49:38] dideler: has joined #RubyOnRails
[19:50:40] smathy: jdayvie, oh, I see what you mean. Just that usually people use the search parameters to construct an SQL query, rather than iterating over all the results in their ruby code.
[19:51:05] smathy: jdayvie, and FWIW that code tends to be in the index method of a controller.
[19:51:16] workmad3: has joined #RubyOnRails
[19:51:19] jdayvie: I suppose I am confused now =P Hmm...
[19:51:45] cac: has joined #RubyOnRails
[19:51:52] smathy: jdayvie, !code if you want
[19:51:52] helpa: jdayvie: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[19:52:41] jdayvie: I am doing that as we speak =P
[19:53:31] nettoweb: has joined #RubyOnRails
[19:53:46] jdayvie: https://gist.github.com/Jdayvie/3a42b24d2f188b57a071
[19:53:51] jdayvie: Thanks again!
[19:54:32] jdayvie: Oops, ignore that last line in the controller =P
[19:54:44] djbkd: has joined #RubyOnRails
[19:55:00] rhizome: you know gist allows you to edit stuff right
[19:55:13] jdayvie: Yes, I just did. I just assumed they already saw it first.
[19:56:37] JoshL: has joined #RubyOnRails
[19:58:00] jenrzzz: has joined #RubyOnRails
[19:58:28] yfeldblum: has joined #RubyOnRails
[19:59:08] veekram: @jdayvie. Isnt that User model?
[19:59:34] erich: has joined #RubyOnRails
[20:00:14] DEA7TH_: Is there a way to get the params as a string? Like, from my_url?a=1&b=2 obtain the string "a=1&b=2" with the order maintained; should also work for POST.
[20:00:31] rubyonrails497: has joined #RubyOnRails
[20:00:59] JoshL_: has joined #RubyOnRails
[20:01:37] rubyonrails603: has joined #RubyOnRails
[20:01:45] veekram: Are you searching for User or cities?
[20:02:00] jdayvie: I'm trying to be able to search for users by their cities.
[20:02:08] jfarmer: DEA7TH_ What's your intention, exactly?
[20:03:23] DEA7TH_: jfarmer: Under the hood, redirecting the request to another page and returning the result. The order must be maintained because the other page cares about order. It cares about order because it's in C, and C has awful support for hashmaps and anything really.
[20:03:55] jfarmer: What's the redirect rule, exactly?
[20:04:19] DEA7TH_: it doesn't matter, it's already implemented; what's missing is passing in the parameters
[20:04:22] jfarmer: In terms of URL A redirecting to URL B? What does URL A look like and what should URL B looks like?
[20:04:39] thatslifeson: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[20:05:02] jfarmer: DEA7TH_ My price for answering your question is understanding the problem.
[20:05:09] DEA7TH_: It's not literally redirection.
[20:05:23] jfarmer: Then what is it, literally?
[20:05:33] DEA7TH_: When the request is received, my page sends it to an internal page, and sends back the internal page's reply.
[20:05:55] jfarmer: Ok, you're proxying some page from the internal network?
[20:05:56] DEA7TH_: A user of the external page might not even know about the internal page's existence.
[20:06:07] DEA7TH_: I'm not sure what proxying means.
[20:06:20] bronson: has joined #RubyOnRails
[20:06:30] DEA7TH_: But I think yes
[20:06:50] jfarmer: What does the public-facing URL look like and what does the internal URL look like?
[20:07:40] DEA7TH_: public-facing URL: http://192.168.2.228:8889/cgi-bin/bathomatic_config.cgi?c=getConstants&auth=zarko,pass123
[20:07:46] erich: has joined #RubyOnRails
[20:07:52] DEA7TH_: internal URL: cgi-bin/bathomatic_config.cgi
[20:08:42] DEA7TH_: they're basically the same, but I'm not sure I want to keep it that way. It's not a rule which makes my life MUCH easier.
[20:09:06] jfarmer: DEA7TH_ http://guides.rubyonrails.org/action_controller_overview.html#the-request-object
[20:09:10] krz: so lets say i have a query coming into my api in the form of http://localhost/user?filter[gender]=females whats a good way to parse through this? i.e. get the value of gender
[20:09:32] nertzy: has joined #RubyOnRails
[20:09:50] momomomomo_: has joined #RubyOnRails
[20:09:54] DEA7TH_: well this works for GET at least
[20:10:33] tubbo: krz: check out the URI.parse method from the ruby standard library, and the URI class. it will take that String and cut it up into the different "parts" of a URI like uri.host, uri.query, etc.
[20:10:37] veekram: Night night guys :)
[20:10:54] jfarmer: DEA7TH_ Read the paragraph with the header "path_parameters, query_parameters, and request_parameters"
[20:11:41] cac: has joined #RubyOnRails
[20:12:19] leonardoajim: has joined #RubyOnRails
[20:12:38] krz: tubbo: im not looking to parse the url
[20:12:55] tubbo: krz: you...just said you were? :P
[20:13:02] krz: im looking to parse the query in this format: filter[something]=value
[20:13:17] tubbo: krz: you know the query is part of the URL right?
[20:13:18] krz: which is part of the url
[20:14:10] jdayvie: https://gist.github.com/Jdayvie/3a42b24d2f188b57a071 - If anyone is able to help as I am looking to get the search to show results.
[20:14:12] tubbo: krz: i mean, you could do it crudely by just doing your_url_string.split('?').last.gsub('filter[something]=', '')...then you'd have the value
[20:14:18] tubbo: krz: but the URI class does all this for you
[20:16:37] krz: tubbo: the URI class can get me the query params. but i still have to do those gymnastic methods
[20:16:57] krz: i.e. uri.query
[20:17:10] jfarmer: krz Are you using Rails? Because Rails will do that parsing for you.
[20:17:24] krz: jfarmer: which parsing specifically?
[20:17:37] jfarmer: If you have ?filter[gender]=females then params will look like {:filter => {:gender => "females"}}
[20:17:45] zendrix: has joined #RubyOnRails
[20:17:59] krz: let me check on that
[20:18:16] jfarmer: The value params is printed out in the log for each request (in development).
[20:18:17] pipework: krz: Dude, you know this!
[20:18:37] krz: jfarmer: if you are correct, then i should be able to do params[:filter][:gender]
[20:18:38] sargas: has joined #RubyOnRails
[20:18:45] sargas: has joined #RubyOnRails
[20:18:46] kinduff: has joined #RubyOnRails
[20:18:46] kinduff: has joined #RubyOnRails
[20:19:08] jfarmer: Print out params, you'll see it.
[20:19:18] baweaver: has joined #RubyOnRails
[20:20:00] jfarmer: (quicker and less ambiguous than asking other people)
[20:20:20] krz: {"filter"=>"[gender]=female", "format"=>"json", "controller"=>"team/api/v1/users", "action"=>"index"}
[20:21:52] jfarmer: Well, might need to escape the [ and ]
[20:22:01] jfarmer: It's generally odd to see parameters like that in a GET requesst
[20:22:26] pipework: not really odd, no.
[20:22:29] jfarmer: vs. like, GET /users?gender=female
[20:22:46] pipework: jfarmer: Yeah, why would it matter?
[20:23:05] krz: jfarmer: not really, this is also part of the json api format at http://jsonapi.org/format/#fetching-filtering
[20:23:47] pipework: jfarmer: I've made nice filtering libraries before where your filter is an array under filter, and order is important, where each value at each indice is a hash that declares the filter attributes on a single 'field' of sorts for the request.
[20:24:02] krz: pipework: its late here. like 4.30am. either im missing something obvious or i need another coffee
[20:24:08] asheinfeld: has joined #RubyOnRails
[20:24:16] kinduff: Hello guise and gals, looking for a Spree advice. Anyone with this knowledge?
[20:24:17] pipework: krz: Coffee coffee coffee!
[20:24:20] jfarmer: love it how folks chime in only as soon as there's a "Well, actually..." moment
[20:24:22] pipework: kinduff: #spree
[20:24:29] blahwoop: has joined #RubyOnRails
[20:24:30] kinduff: pipework: slow channel
[20:24:59] pipework: kinduff: They're the people that know. If you need help here, write your question out, in a single line, and maybe you'll get some help.
[20:25:00] jfarmer: krz Fair enough, if that's the spec you're following.
[20:25:02] tbuehlmann: grrrrr, freaking HashWithIndifferentAccess! https://gist.github.com/tbuehlmann/2f0239d6b09ace033e67 :(
[20:25:08] blahwoop: if I use oauth do i still need something like devise ? or can i just use oauth to authenticate a person
[20:25:13] kinduff: pipework: ty
[20:25:14] arup_r: kinduff: I agree #spree is slow
[20:25:17] pipework: But usually just asking if people are familiar with a thing will get you silence. Good luck!
[20:25:59] pipework: tbuehlmann: When in doubt, fuck hwia, make an object!
[20:26:03] krz: guess ill have to cook up a utility library, but in the morning
[20:26:04] jfarmer: krz You might need to escape the brackets
[20:26:06] pipework: Like something you own the behaviour of.
[20:26:09] kinduff: Need to add a JS file inside this Spree gem asset pipeline, trying to figure out the best way without overriding the original ones. Layout is not an option.
[20:26:32] jfarmer: krz If this is a widely-used spec, I'm sure there's a gem that makes it easier to implement.
[20:26:36] pipework: krz: Try this: Use your route helpers in rails console to generate a link with the params you want.
[20:26:40] pipework: Then you can see how it should look.
[20:26:50] pipework: something_path(@something, extra_query_params_here)
[20:27:16] tbuehlmann: pipework, hwia?
[20:27:35] pipework: tbuehlmann: HashWithIndifferentAccess H-W-I-A
[20:28:13] tbuehlmann: yeah, well, I'd really like to just use the params from a controller in my library, but that's a pain
[20:28:52] bin_005: has joined #RubyOnRails
[20:28:56] Shidash: has joined #RubyOnRails
[20:29:35] jfarmer: tbuehlmann I'd be skeptical of any code that depends on object identity in that way (speaking personally).
[20:29:42] tubbo: has joined #RubyOnRails
[20:32:53] tbuehlmann: jfarmer, true
[20:34:05] krz: gah. "Note: JSON API is agnostic about the strategies supported by a server. The filter query parameter can be used as the basis for any number of filtering strategies". guess ?sort=female,male will suffice. then in the controller params[:sort].split(',')
[20:34:08] bricker: HashWithLazyDeveloper
[20:34:21] krz: sort=filter
[20:34:35] krz: happy implementation, happy spec
[20:34:49] krz: and time for a happy nap!
[20:35:09] ndrei: has joined #RubyOnRails
[20:35:44] tbuehlmann: funnily enough, my problem exactly addresses that problem, krz
[20:37:41] kadoppe: has joined #RubyOnRails
[20:38:10] krz: yea, i thought id just keep the query param simple enough. jsonapi is a respectable spec. theres no need to over complicate things with [] :P
[20:38:36] pipework: I think it's a weird spec, but adoption is high.
[20:38:55] krz: pipework: ember just embraced it
[20:39:04] tubbo: so does active_model_serializers
[20:39:05] tbuehlmann: I'm working on an abstraction library that handles filtering stuff right now
[20:39:10] sloggerkhan: has joined #RubyOnRails
[20:39:15] krz: well AMS is still a little behind
[20:39:16] tbuehlmann: not following the JSONAPI specs indepth, though
[20:39:30] krz: but they (AMS) are getting there
[20:39:37] pipework: krz: They didn't 'just embrace it'. One of the core is part of the team that made the spec.
[20:39:55] pipework: I'm waiting a long while to see what kind of stable API's ember puts out there.
[20:40:06] workmad3: has joined #RubyOnRails
[20:40:17] tubbo: yeah, ember kind-of drove the JSON API idea on both sides. actually i think JSON API itself was thought up by someone else though
[20:40:20] krz: pipework: oh neat. ember data just turned stable. and is highly supportive of it
[20:40:36] ur5us: has joined #RubyOnRails
[20:40:39] pipework: krz: Yeah, I mean it's cool that they're actually shipping stuff.
[20:40:40] zendrix: has joined #RubyOnRails
[20:40:40] tubbo: ember-data is stable and ember is *pretty* stable, only big change nowadays is the move away from views and into routable components
[20:40:41] Shidash: has joined #RubyOnRails
[20:40:54] krz: tubbo: yeap the react way
[20:40:54] Rahul_Roy: has joined #RubyOnRails
[20:40:55] pipework: I just use elementaljs for a nice API to get dom events and JS.
[20:41:02] tubbo: in the past few years of working with ember, the upgrades have been super easy and straightforward. very different from rails!
[20:41:23] pipework: tubbo: I'm waiting for a general stability, not a stability that's announced by the developer(s) for one or a set of libs.
[20:41:34] tubbo: pipework: define "general stability"
[20:41:36] pipework: Waiting for dust to settle, not waiting for someone to mark it production worthy.
[20:42:02] tubbo: oh, so you're waiting for blogs :)
[20:42:21] tubbo: yeah...we'll see...incidentally the javascript definition of 'stability' is different from most others'...
[20:42:27] krz: https://leanpub.com/ember-cli-101 worked for me :D
[20:42:31] pipework: As if I'm someone who needs blogs to form an opinion. I hate everything regardless of what tripe is being written about it.
[20:42:34] tubbo: let's wait for JS itself to become "stable" and THEN we can talk about this shit haha
[20:42:44] krz: the author hangs out on the freenode and slack channels
[20:43:06] pipework: Yeah, I've interacted in person and on IRC with them. They're good people
[20:43:13] krz: oh man, getting started with ember... is a whole different ball game though
[20:43:29] tubbo: ember when it first came out was kinda silly
[20:43:37] pipework: I just don't buy into the whole ember framework, but I'm definitely interested in libraries that are fantastic at staying out of my way and doing great things.
[20:44:54] rodferso1: has joined #RubyOnRails
[20:45:00] tubbo: i see your point on that
[20:45:25] krz: pipework: i had taht same mentality until i sat down for a few frustrating months and finally got the hang of it
[20:45:45] krz: ofcourse with the help of a mentor too. actually that really helped
[20:45:49] pipework: krz: It's not that it's too hard or anything. I could probably have it together within 2 weeks, it's just a question of whether I really ought to.
[20:46:01] eggoez: has joined #RubyOnRails
[20:46:10] krz: defo. so much more abstraction
[20:46:13] tubbo: it's just that pipework has a bug up his ass about frameworks and would rather use a collection of small libs to get the job done, for a lot of good reasons (like being able to change out components)
[20:46:13] pipework: JavaScript was my first language, so I can be quite curmudgeonly about where the community has gone on it.
[20:46:24] blahwoop: what's the standard webserver to use for rails now? puma or thin?
[20:46:34] krz: unicorn
[20:46:36] pipework: blahwoop: "standard" is a word you should forget when talking rails. :)
[20:46:38] tubbo: blahwoop: for prodcution?
[20:46:40] pipework: I develop on puma.
[20:46:41] tubbo: production*
[20:46:45] tubbo: ACTION loves puma
[20:46:45] blahwoop: yeah production
[20:46:51] tbuehlmann: I'm also a fan of puma
[20:46:51] krz: passenger?
[20:46:58] pipework: Because if it works on puma, it'll probably work on unicorn unless you're doing something intentionally fucky.
[20:47:09] krz: unicorn or passsenger if on aws opsworks :)
[20:47:11] tubbo: in order of popularity of rails servers: passenger, unicorn, puma
[20:47:21] pipework: tubbo: Production-sure.
[20:47:33] DEA7TH_: has joined #RubyOnRails
[20:47:35] blahwoop: ill probably be on digital ocean
[20:48:11] pipework: blahwoop: I'd say to just go with nginx+passenger until you pick up some of your own opinions.
[20:48:20] blahwoop: cool thanks
[20:49:10] ndrei: has joined #RubyOnRails
[20:49:29] blahwoop: next question. if i'm using webhooks do i need multiple threads if 2 post actions happens at the same time
[20:49:32] krz: https://www.youtube.com/watch?v=QZVYP3cPcWQ literally 10 seconds to deploy an app. we are currently using this deployment architecture. for the curious minded
[20:49:43] pipework: blahwoop: Not necessarily threads, per se, but yes in an abstract way.
[20:49:44] tubbo: i like ember a lot because it makes certain things that would normally be a bitch, but are also the right way to do things, very easy
[20:49:46] smathy: nginx + passenger is still my preferred stack
[20:50:14] tubbo: tbh if i could just use ember's router i might ditch the framework...but so far i haven't found a great way of doing that
[20:50:20] hotpancakes: has joined #RubyOnRails
[20:50:25] blahwoop: pipework: would i need something like puma to handle it
[20:50:41] pipework: blahwoop: No, passenger has what you need to handle multiple concurrent requests.
[20:50:51] krz: tubbo: they are ditching controllers. in favour of routers. theyve already ditched views
[20:50:58] pipework: You'll be able to configure it if the defaults don't suit you.
[20:50:59] dopie: ok I got all my tests passing
[20:50:59] tubbo: blahwoop: it just forks processes rather than spawning threads
[20:51:04] dopie: but the test spec looks horrendous
[20:51:08] dopie: https://gist.github.com/staycreativedesign/3fc6e98273e5f5c30868
[20:51:12] dopie: any ideas on how to make it better?
[20:51:17] blahwoop: cool thats what i need
[20:51:20] lxsameer: has joined #RubyOnRails
[20:51:36] blahwoop: would i need something to queue it or that would be later on
[20:51:54] tubbo: dopie: if you don't want those video_1 and video_2 calls all over the place, replace `let` with `let!`
[20:52:07] pipework: blahwoop: Nope, it'll be automatic and on the receiving end of the request before it gets to rails.
[20:52:20] pipework: blahwoop: That's handling connections though.
[20:52:24] krz: tubbo: going forward with ember 2. a lot of things will happen in ember routes and components. views are out. controllers might be next. so basically left with router, routes, templates and models
[20:52:26] blahwoop: krz: is there a video for good rails deployment archtecture
[20:52:40] tubbo: dopie: Ayou could also turn that futurama local var into a `let`. the model won't get created until you use it
[20:52:45] krz: blahwoop: dont need one. just go on the heroku guides :D
[20:52:45] blahwoop: pipework: ok thanks
[20:53:06] tubbo: krz: yeah, controllers are definitely on their way out. probably by ember 3.
[20:53:08] krz: blahwoop: if your bootstrapping. heroku might be a good option too. FYI
[20:53:17] tubbo: i never really used controllers much anyway
[20:53:19] blahwoop: krz: haha im trying to do my own thing without heroku
[20:53:21] pipework: blahwoop: Deploying rails can get really deep.
[20:53:58] pipework: It can be really simple if you want to, or really bad-ass and fun.
[20:54:03] momomomomo: has joined #RubyOnRails
[20:54:09] pipework: There may be some bias in my statement.
[20:54:25] christiandsg: has joined #RubyOnRails
[20:54:25] blahwoop: pipework: i just want to understand it and get some experience deploying my own
[20:54:28] krz: nothing beats a 10 second deployment strategy though :P thats a lot of fun
[20:54:57] pipework: krz: Whale, when you get things in order, I bet you could make it a 0.001 second deployment strategy.
[20:55:07] blahwoop: im trying to build an oss project that helps oss repos create a twitterbot so that when they create a new issues for specific labels it'll tweet it out. give more exposure for contributing to oss
[20:57:52] krz: i lied. deploying an ember app will take < 10 seconds. updating the api code base (rails) can take 10-30 secs. longer with new migrations
[20:58:30] tubbo: well, ember isn't the whole app
[20:58:52] tubbo: so that's kind-of a moot point there
[20:59:08] krz: its just the front. but its hardly the scenario that you will be updating the api constantly
[20:59:13] ekain: has joined #RubyOnRails
[20:59:20] tubbo: krz: i would have to disagree with you there
[20:59:28] Spami: has joined #RubyOnRails
[20:59:34] tubbo: 80% of the changes i make are full stack, front-end and back-end.
[21:00:21] krz: tubbo: you would have different api versions. and even still, new api versions shouldnt be released constantly
[21:00:39] pipework: krz: Why not?
[21:00:44] pipework: I just ship.
[21:00:45] krz: with ember sitting in front. its likely most of the work is 80% ui
[21:00:48] tubbo: well what i mean is...in my line of work, the API gets updated just as much as the front-end.
[21:00:55] pipework: If I have to break the API, I break it and move on.
[21:01:07] tubbo: there are (i'm sure) lots of places out there whose APIs don't change as often
[21:01:27] pipework: Most places don't invest in hateoas-like API design, which is sad
[21:02:28] blahwoop: noob question can i run passenger on develoment?
[21:02:46] krz: blahwoop: you should if thats your target production server too
[21:02:48] tubbo: blahwoop: you can, but it's typically not necessary.
[21:03:04] tubbo: it's rare to find a bug caused by the server you are running.
[21:03:06] tubbo: especially in dev
[21:03:11] pipework: blahwoop: Yes.
[21:03:18] pipework: I develop using puma myself.
[21:03:18] krz: or not, but at least have it running on a stagign environment to catch any surprises
[21:03:33] blahwoop: ok thanks. yeah im trying to set it up locally
[21:03:34] baweaver: has joined #RubyOnRails
[21:03:43] blahwoop: so i dont run into any surprises
[21:03:53] IFrank00: I have a Project and a project_detail table
[21:04:27] krz: IFrank00: project_detail should be polymorphic. your welcome
[21:04:30] pipework: IFrank00: join tables and default scopes, I bet.
[21:04:49] SteenJobs: has joined #RubyOnRails
[21:05:46] krz: this time of the day, its no surprise, if you come across mind readers
[21:06:02] IFrank00: I'm trying to do this use the default scopes so I can use @project.city city is a column of project deatil
[21:07:09] pipework: IFrank00: I just wrote something that does all that, but it's not super clean yet.
[21:07:10] IFrank00: on my local machine is running fine with out a error but on production its say column can be found on project
[21:07:21] pipework: Let's see the code!
[21:07:24] Spami: has joined #RubyOnRails
[21:07:47] gerep: has joined #RubyOnRails
[21:07:57] IFrank00: def city "#{project_detail.city}" end
[21:08:16] IFrank00: this code is on my Project Model
[21:08:47] tubbo: why not just delegate :city, to: :project_detail?
[21:09:00] chouhoulis: has joined #RubyOnRails
[21:09:14] noodman: has joined #RubyOnRails
[21:09:17] IFrank00: so I can shortcut to project.city and dont have to do @project.project_detail.city
[21:10:14] workmad3: has joined #RubyOnRails
[21:10:27] rstark: has joined #RubyOnRails
[21:11:40] momomomomo: has joined #RubyOnRails
[21:14:45] tubbo: IFrank00: !gist
[21:14:45] helpa: IFrank00: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[21:14:59] Coldblackice_: has joined #RubyOnRails
[21:15:02] tubbo: IFrank00: we need more info on Project and ProjectDetail, also the error you're experiencing
[21:15:07] tubbo: a single line is not sufficient
[21:15:33] IFrank00: and thank you
[21:15:44] bronson: has joined #RubyOnRails
[21:16:30] tubbo: no worries
[21:17:43] dopie: anyone here use GitGutter
[21:18:11] arooni-mobile__: has joined #RubyOnRails
[21:18:13] arooni-mobile: has joined #RubyOnRails
[21:18:25] engassa: has joined #RubyOnRails
[21:22:39] IFrank00: https://gist.github.com/Frank004/5652766556541889e8a3
[21:23:59] IFrank00: mmmm it say nil:NilClass mmm let me check something first
[21:24:13] tubbo: IFrank00: project_detail seems to be nil
[21:24:30] mando: has joined #RubyOnRails
[21:24:38] LiquidInsect: has joined #RubyOnRails
[21:25:02] ascarter: has joined #RubyOnRails
[21:25:15] bricker1: has joined #RubyOnRails
[21:26:53] engassa: run_callbacks in ActiveSupport::Callbacks used to supports arguments, but stopped from 4.0.2 onwards. Any ideas why? and any ways to work around this? I want to cascade a parameter down the associations for a destroy
[21:28:00] engassa: ^ http://apidock.com/rails/v4.0.2/ActiveSupport/Callbacks/run_callbacks
[21:28:08] nettoweb: has joined #RubyOnRails
[21:30:00] Maletor: Looks like RAILS_REALTIVE_URL_ROOT is deprecated. What's the best way to deploy to a subdirectory?
[21:31:20] tubbo: scenario 'display the five greatest rappers of all time'
[21:31:32] tubbo: 5.times.each { expect(page).to have_content('DYLAN') }
[21:31:37] nettoweb: has joined #RubyOnRails
[21:32:06] djbkd: has joined #RubyOnRails
[21:32:47] djbkd: has joined #RubyOnRails
[21:34:44] nettoweb: has joined #RubyOnRails
[21:35:21] choke: has joined #RubyOnRails
[21:37:51] baweaver: has joined #RubyOnRails
[21:38:03] nettoweb: has joined #RubyOnRails
[21:38:22] hotpancakes: has joined #RubyOnRails
[21:39:28] FernandoBasso: has joined #RubyOnRails
[21:40:00] gambl0re: has joined #RubyOnRails
[21:40:37] momomomomo: has joined #RubyOnRails
[21:41:15] JakFrist: has joined #RubyOnRails
[21:42:41] hanss: has joined #RubyOnRails
[21:47:31] rhizome: why i oughtta
[21:51:39] yaymukund: has joined #RubyOnRails
[21:52:36] baweaver: has joined #RubyOnRails
[21:53:02] workmad3: has joined #RubyOnRails
[21:53:18] Xiti: has joined #RubyOnRails
[21:54:37] dhpjlc58: has joined #RubyOnRails
[21:55:50] baweaver: has joined #RubyOnRails
[21:56:35] ProLoser_: has joined #RubyOnRails
[21:57:26] dhpjlc58a: has joined #RubyOnRails
[21:57:52] Junaos_: has left #RubyOnRails: ()
[21:58:01] Junaos: has joined #RubyOnRails
[22:00:50] dhpjlc58: has joined #RubyOnRails
[22:02:01] djbkd: has joined #RubyOnRails
[22:02:55] iamse7en: has joined #RubyOnRails
[22:03:50] dhpjlc58a: has joined #RubyOnRails
[22:05:58] Papierkorb: has joined #RubyOnRails
[22:05:58] Pupeno_: has joined #RubyOnRails
[22:06:23] dopie: has joined #RubyOnRails
[22:07:45] noodman: has joined #RubyOnRails
[22:08:35] zendrix: has joined #RubyOnRails
[22:10:10] christiandsg: has joined #RubyOnRails
[22:10:48] DEA7TH: has joined #RubyOnRails
[22:11:42] dan0034001: has joined #RubyOnRails
[22:11:52] dhpjlc58: has joined #RubyOnRails
[22:15:00] asheinfeld: has joined #RubyOnRails
[22:15:08] mary5030_: has joined #RubyOnRails
[22:16:49] mkc: has joined #RubyOnRails
[22:17:19] Oog: has joined #RubyOnRails
[22:17:43] Oog: create_join_table :zip_codes, :regions, :foreign_key => true - seems to ignore foreign_key
[22:17:48] Oog: i have to amek them manually?
[22:17:58] ascarter: has joined #RubyOnRails
[22:18:10] sparr: has joined #RubyOnRails
[22:18:56] frek818: has joined #RubyOnRails
[22:19:09] rhizome: what is that supposed to do?
[22:19:57] s2013: has joined #RubyOnRails
[22:20:20] bruno-: has joined #RubyOnRails
[22:20:21] rhizome: i.e. what is your intent?
[22:20:23] IFrank00: has joined #RubyOnRails
[22:21:21] IFrank00: tubbo Yes that what I was looking at
[22:21:48] engassa: Is there any way for us to pass parameters to callbacks called through run_callbacks?
[22:23:36] Oog: rhizome: have a has many to many join table with foreign keys to ensure referential integrity
[22:24:03] rhizome: i don't see anything about :foreign_key in the docs
[22:24:33] Wolfram74: has joined #RubyOnRails
[22:24:39] Wolfram74: I have a factory girl question
[22:25:03] Wolfram74: http://dpaste.com/2SSEJ2V
[22:25:35] Wolfram74: so, I want to set it so id and manger_id are the same, but also different for each instance
[22:25:59] eggoez: has joined #RubyOnRails
[22:26:22] Wolfram74: at the moment it satifies the first criterion, but not the second
[22:26:27] s2013: has joined #RubyOnRails
[22:26:36] s2013: whats the best way to make sure that the /mail_view link is only for admin ?
[22:26:49] moeabdol: has joined #RubyOnRails
[22:26:51] rhizome: wolfram74: didn't look at the paste, but you could use after_create for something like that
[22:26:54] s2013: also its rails 3
[22:27:12] chintanparikh: has joined #RubyOnRails
[22:27:13] rhizome: what's a /mail_view link?
[22:27:32] Wolfram74: after_create? I'll peek at that
[22:27:50] s2013: i think its standard in rails 4.1 but basically its email preview
[22:28:19] Wolfram74: um, it looks like after_create is part of the model and not part of the factory, which is definitely behavior I'm not interested in
[22:28:20] s2013: https://github.com/basecamp/mail_view
[22:28:30] Wolfram74: my bad, isee it now
[22:29:39] Pupeno: has joined #RubyOnRails
[22:30:13] charliesome: has joined #RubyOnRails
[22:30:32] djbkd: has joined #RubyOnRails
[22:30:34] Wolfram74: thanks rhizome
[22:30:48] rhizome: you're welcome
[22:30:58] engassa: http://pastie.org/10276486#8
[22:31:10] rhizome: s2013: no idea how that works. if current-user is available you can check and redirect
[22:31:18] engassa: Passing run_callbacks parameters which can be sent to callbacks ^
[22:31:22] rhizome: maybe it's not enabled in production
[22:33:49] ruurd: has joined #RubyOnRails
[22:33:54] thalassa: has joined #RubyOnRails
[22:36:48] x-light: has joined #RubyOnRails
[22:37:14] asheinfeld: has joined #RubyOnRails
[22:37:40] k4nd4lf: has joined #RubyOnRails
[22:42:15] mastyd: has joined #RubyOnRails
[22:42:46] mastyd: newrelic is showing me that over 80% of execution time in the app server is taking place in "Middleware ActiveRecord::QueryCache#call"
[22:43:05] idd2d: has joined #RubyOnRails
[22:43:15] mastyd: anyone who's experience this?
[22:43:17] DEA7TH: has joined #RubyOnRails
[22:44:15] rickmasta: has joined #RubyOnRails
[22:44:26] Radar: GOOD MORNING
[22:44:33] Radar: mastyd: Pics?
[22:45:14] mastyd: where would you like me to upload? Imgur fine?
[22:46:34] emptyflask: has joined #RubyOnRails
[22:46:58] Sid05: has joined #RubyOnRails
[22:47:06] mastyd: radar: http://i.imgur.com/1WzZdvH.png
[22:47:21] Radar: Seems bad
[22:47:33] mastyd: I'm seeing like 1 - 1.5 second response times (horrifically slow)
[22:47:34] Radar: 1s in the query cache could mean that you have an N+1 query
[22:47:46] Radar: Api::V2::GamesController#show in a Gist please.
[22:47:50] Radar: And the template.
[22:48:33] RegulationD: has joined #RubyOnRails
[22:50:37] arBmind1: has joined #RubyOnRails
[22:50:49] mastyd: radar: https://gist.github.com/dmastylo/6ac1dc78d097d56ed53a
[22:51:00] mastyd: Sorry the language selection is bugging out and didn't let me set it to Ruby
[22:51:50] Radar: mastyd: Show me a query log (from log/development.log) of a single request to Games#show in dev please
[22:51:56] Radar: Nothing stands out too much there.
[22:53:19] hotpancakes: has joined #RubyOnRails
[22:53:30] mastyd: Roger that, thanks for helping me out radar, I'm pulling my hair out here
[22:55:08] ivanskie: has joined #RubyOnRails
[22:55:31] weaksauce: mastyd do you have indexes setup on things?
[22:56:34] mastyd: weaksauce: fairly certain yes
[22:56:43] mastyd: radar: I updated the gist with an example at the bottom
[22:57:08] Radar: mastyd: nothing too terrible there :( I don't know, sorry!
[23:00:53] mastyd: I was testing that with 100 users hitting the endpoint every second for a 1 minute straight
[23:00:59] mastyd: so about 6000 requests in a minute
[23:01:29] mastyd: t2.medium instance on AWS elastic Beanstalk with t2.small RDS DB
[23:01:48] jfelchner: has joined #RubyOnRails
[23:01:52] mastyd: if anyone has any suggestions or ideas would love to hear them. Am I expecting too much out of those instances?
[23:02:06] yaymukund: has joined #RubyOnRails
[23:02:13] stantonnet: has joined #RubyOnRails
[23:03:59] weaksauce: mastyd how slow is one lone query like that?
[23:04:41] mastyd: Just one?
[23:04:44] mastyd: I can check
[23:04:54] JeramyRR: has joined #RubyOnRails
[23:07:39] gerep: has joined #RubyOnRails
[23:08:06] mastyd: I hit reboot on my elastic beanstalk app 10 minutes ago and it's still not done...
[23:10:21] Radar: memory + CPU not maxing out? (I am assuming you have graphs)
[23:12:25] Ropeney: has joined #RubyOnRails
[23:14:26] gusrub: has anybody here ever bought the baserails courses?
[23:14:26] Sid05: has joined #RubyOnRails
[23:14:30] wa_r_ch_i__ld1: has joined #RubyOnRails
[23:14:41] mastyd: On a performance ($500/month) Heroku instance with $50 Postgres instance I'm getting like 350ms response with just 3 concurrent users each second
[23:14:51] mastyd: fucking horrific response times and I have no idea what's going on
[23:15:58] rhizome: hard to say
[23:16:55] leonardoajim: has joined #RubyOnRails
[23:18:29] mastyd: on a page with no database/dynamic content, literally just serving an HTML file styled with Foundation with 100 users every second I'm getting 1100ms (1.1s) response times
[23:19:27] mastyd: is 100 users a second considered a lot?
[23:22:19] paulcsmith: has joined #RubyOnRails
[23:22:25] wa_r_ch_i__ld1: anyone here have any experience hosting an app that integrates with mailchimp?
[23:22:28] baweaver: has joined #RubyOnRails
[23:25:00] Lightsword: has joined #RubyOnRails
[23:28:26] centrx: has joined #RubyOnRails
[23:28:41] trydionel: has joined #RubyOnRails
[23:28:43] hotpancakes: has joined #RubyOnRails
[23:29:01] wenqin: has joined #RubyOnRails
[23:29:07] davidbitton: has joined #RubyOnRails
[23:29:25] SteenJobs: has joined #RubyOnRails
[23:34:34] duncannz: has joined #RubyOnRails
[23:34:50] ndrei: has joined #RubyOnRails
[23:39:57] wethu: has joined #RubyOnRails
[23:40:11] jerematic: has joined #RubyOnRails
[23:40:37] quazimodo: has joined #RubyOnRails
[23:40:53] werelivinginthef: has joined #RubyOnRails
[23:41:58] hotpanca_: has joined #RubyOnRails
[23:42:12] rodfersou: has joined #RubyOnRails
[23:42:43] pontiki: halp! i need some help with aasm. I have this state machine here: https://github.com/tamouse/order_state_machine/blob/master/app/models/order.rb#L24-L32
[23:43:10] choke: has joined #RubyOnRails
[23:43:21] pontiki: and tests here: https://github.com/tamouse/order_state_machine/blob/master/spec/models/order_spec.rb#L33-L40
[23:43:24] fatephd: has joined #RubyOnRails
[23:43:48] pontiki: when the test runs, i was expecting it to transition to :auth_failed, but it stays :pending
[23:44:10] pontiki: something i don't understand here about the transition guards
[23:46:00] zendrix: has joined #RubyOnRails
[23:46:11] pontiki: looking at the example in the README, i expected if the transition guard fails, it would drop to the next transition
[23:47:29] dan0034001: has joined #RubyOnRails
[23:48:44] rhizome: ACTION bends activeadmin to his will
[23:48:57] pontiki: gods, never mind, i figured it out
[23:49:32] jfelchner: has joined #RubyOnRails
[23:49:38] rhizome: i use "guard: :methodname"
[23:50:41] tvw: has joined #RubyOnRails
[23:55:43] acconrad: has joined #RubyOnRails
[23:57:28] iamse7en: has joined #RubyOnRails
[23:58:55] christiandsg: has joined #RubyOnRails
[23:59:53] drale2k_: has joined #RubyOnRails