« Back to channel list

#RubyOnRails - 28 May 2015

« Back 1 day Forward 1 day »
[00:00:02] jstanton: has joined #RubyOnRails
[00:00:29] DoctorMonocular: has joined #RubyOnRails
[00:00:56] thiagovsk: has joined #RubyOnRails
[00:01:45] renanoronfle: has joined #RubyOnRails
[00:01:52] Im_Max_Peck: has joined #RubyOnRails
[00:06:14] nobitanobi: has joined #RubyOnRails
[00:07:15] Radar: Don't call description on a collection proxy :)
[00:07:22] RandyT: has joined #RubyOnRails
[00:07:25] kinduff: has joined #RubyOnRails
[00:07:31] Radar: line 20 in that pastie is what's wrong
[00:07:40] Radar: you're calling description on a collection of items.
[00:07:45] baweaver: has joined #RubyOnRails
[00:08:22] johntrails: is description a reserved word? that is the column name on the related table that I am trying to call
[00:08:29] Radar: No, it's not a reserved word.
[00:08:44] Radar: You have a COLLECTION of items there. What do you expect Rails to do? Show you the description for each of the items in that collection?
[00:09:24] johntrails: yes, that is exactly what I am trying to accomplish
[00:09:31] jgpawletko: has joined #RubyOnRails
[00:09:44] Radar: ps_items.map(&:description).join(", ")
[00:10:02] Radar: That will iterate through each of the ps_items elements, get their description and then join them together with ,
[00:12:08] johntrails: I want to iterate through ps_dailyorders, and whenever a ps_item_id is shown, i want to show you the description from ps_items
[00:13:15] chouhoulis: has joined #RubyOnRails
[00:13:37] johntrails: the mapping solution gives me a sql error of "SELECT [ps_items].* FROM [ps_items] WHERE [ps_items].[id] = @0 ORDER BY [ps_items].[id] ASC OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY', N'@0 varchar(9)', @0 = N'700425'" for some reason that select statement is going through the order numbers and i don't see a join from ps_items to ps_dailyorder on ps_dailyorders.ps_item_id = ps_item.id
[00:14:51] renews: has joined #RubyOnRails
[00:16:23] johntrails: this is the equivalent sql statement for what I am trying to show on my view "select ps_dailyorder.ordernum, ps_dailyorder.ps_item_id, ps_dailyorder.qty, ps_item.description, ps_dailyorder.item_total from ps_dailyorder join ps_item on ps_dailyorder.ps_item_id = ps_item.id
[00:16:50] johntrails: "select ps_dailyorder.ordernum, ps_dailyorder.ps_item_id, ps_dailyorder.qty, ps_item.description, ps_dailyorder.item_total from ps_dailyorder join ps_item on ps_dailyorder.ps_item_id = ps_item.id"
[00:17:14] Radar: I can't help you.
[00:17:16] Aeyrix: has left #RubyOnRails: ()
[00:17:20] sevenseacat: has joined #RubyOnRails
[00:17:34] johntrails: ok. thanks for trying
[00:18:51] bricker: johntrails: #sql
[00:19:24] rickmasta: has joined #RubyOnRails
[00:21:34] johntrails: briker.. i'm a dba. i can write sql in my sleep.. my problem is translating to rails my sql statement
[00:22:29] ericchernuka: has joined #RubyOnRails
[00:24:20] chouhoulis: has joined #RubyOnRails
[00:26:19] codelurker: has joined #RubyOnRails
[00:29:05] pjammer: has joined #RubyOnRails
[00:29:45] ericchernuka: has joined #RubyOnRails
[00:31:08] meat147: has joined #RubyOnRails
[00:32:51] moretti: has joined #RubyOnRails
[00:34:19] nicememe: has joined #RubyOnRails
[00:34:38] charliesome: has joined #RubyOnRails
[00:34:46] nicememe: has left #RubyOnRails: ()
[00:35:04] CheckYourSix_: has joined #RubyOnRails
[00:35:24] CheckYourSix_: What's everyone up to?
[00:36:28] Cache_Money: has joined #RubyOnRails
[00:38:31] dstarh: has joined #RubyOnRails
[00:39:05] michael_mbp: has joined #RubyOnRails
[00:40:04] mordof: has joined #RubyOnRails
[00:41:02] surrealanalysis: has joined #RubyOnRails
[00:41:39] sevenseacat: just starting work for the day
[00:41:48] nobitanobi: has joined #RubyOnRails
[00:41:50] goodcodeguy: has joined #RubyOnRails
[00:42:47] mordof: sevenseacat, what time zone?
[00:43:29] mordof: that explains things, heh
[00:43:39] mordof: est (-5) here
[00:44:09] mordof: or is it -4... edt? i have no idea.. i hate shifting time zones depending on year :/
[00:44:22] mordof: s/year/time of year/
[00:44:39] s2013: has joined #RubyOnRails
[00:44:41] sevenseacat: we dont have that here :)
[00:47:14] mordof: sevenseacat, is your job also involving rails?
[00:47:22] sevenseacat: of course, half of the rest of the country does, which makes things fun.
[00:47:27] sevenseacat: mordof: it sure is.
[00:48:29] mordof: are you in the philipeans/australia area?
[00:48:50] mordof: my geography sucks - so it's possible those two are nowhere near each other either, lol
[00:49:04] sevenseacat: west coast of australia, yes.
[00:49:11] maz-dev: has joined #RubyOnRails
[00:52:19] sankaber: has joined #RubyOnRails
[00:52:53] cirn0: has joined #RubyOnRails
[00:53:12] commondream: has joined #RubyOnRails
[00:53:20] lampshades: has joined #RubyOnRails
[00:53:58] goodcodeguy: has joined #RubyOnRails
[00:55:48] mello: has joined #RubyOnRails
[00:55:53] byprdct: has joined #RubyOnRails
[00:55:57] robustus: has joined #RubyOnRails
[00:59:31] kinda: anyone working on cool things?
[00:59:46] sevenseacat: not particularly
[00:59:58] mordof: kinda, not sure if it's considered cool - working on a community site for wanikani
[01:00:04] s2013: has joined #RubyOnRails
[01:00:15] mordof: i'm enjoying it though
[01:00:24] kinda: I'd say that's cool then, as long as you're enjoying it
[01:00:29] chagel: has joined #RubyOnRails
[01:01:59] DogHackit: has joined #RubyOnRails
[01:02:48] RegulationD: has joined #RubyOnRails
[01:03:24] Radar: kinda: http://leanpub.com/ddr I think is pretty cool :)
[01:03:25] jacor: has joined #RubyOnRails
[01:04:05] jacor: has joined #RubyOnRails
[01:04:07] baweaver: I'm working on a Scala talk for our internal Spark engineers
[01:04:51] baweaver: and hosting a Google I/O stream session in office
[01:04:55] baweaver: they have me busy this week.
[01:05:56] baweaver: ACTION is not going to comment on the irony of being on IRC whilst supposedly busy
[01:06:51] Radar: oh and I've been put in charge of the dev team here while the boss is away for the next 3 weeks
[01:07:50] baweaver: What could possibly go wrong?
[01:08:18] baweaver: Have fun, though you may well need a vacation after that ;)
[01:08:54] Radar: nothing will go wrong because this team is awesome
[01:08:56] renews: has joined #RubyOnRails
[01:09:02] sevenseacat: thats the spirit.
[01:09:07] mordof: hmmm... not sure if i can do this
[01:09:14] Sylario: has joined #RubyOnRails
[01:09:16] baweaver: ACTION grabs popcorn and waits for Murphy to take his cue
[01:09:33] sevenseacat: yesterday i used jasmine for the first time. that was kind of cool.
[01:09:58] baweaver: It's a bit gnarly in straight JS, but fairly straightforward
[01:10:05] mordof: I have a model WkUserItemStat, which has columns item_id, item_type, created_at (amongst others) - is it possible to grab all records, ensuring that item_id and item_type are unique, taking the newest records?
[01:10:11] pipework: sevenseacat: I wonder if they made it stop sucking at testing async behaviour.
[01:10:13] baweaver: Oh, and sevenseacat, fair warning if you use Teaspoon it runs in Dev environment
[01:10:53] mordof: I'm not sure how to write the queries like this using ActiveRecord more than sql itself
[01:11:02] _blizzy_: has joined #RubyOnRails
[01:11:05] quazimodo: has joined #RubyOnRails
[01:11:16] _blizzy_: anyone have experience with Paperclip?
[01:11:26] Radar: _blizzy_: !used
[01:11:26] helpa: _blizzy_: Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
[01:11:57] sevenseacat: havent looked at teaspoon or anything like that
[01:12:06] baweaver: test runner
[01:12:26] jacor_m: has joined #RubyOnRails
[01:12:34] Radar: Oh nice, helpa passed 3 million messages collected "recently"
[01:12:43] _blizzy_: ok then, I've been trying to upload pictures using Paperclip to S3, however, it uploads to S3, but the photo url in ActiveRecord is missing.png
[01:13:03] HenriettaSalt: has joined #RubyOnRails
[01:13:09] qwertme: has joined #RubyOnRails
[01:13:16] Radar: By recently, I mean 20th March. It's now at about 3.23 million messages.
[01:13:30] Radar: _blizzy_: Show us the code?
[01:13:34] sevenseacat: Radar: we talk too much.
[01:13:59] _blizzy_: https://gist.github.com/NotBlizzard/1eb65e62b3a2ca165585
[01:14:01] mordof: ACTION wonders if his question got lost
[01:14:03] thebatu1: has joined #RubyOnRails
[01:14:27] Radar: mordof: yup, it definitely got lost
[01:14:48] mordof: Radar, that's a shame, heh
[01:14:55] blogjy: has joined #RubyOnRails
[01:15:05] baweaver: mordof: WkUserItemStat.select(:item_type, :item_id).distinct for said records that are unique
[01:15:28] baweaver: as to how to do that *AND* get the entire record with ordering, not sure.
[01:15:43] Lightsword: has joined #RubyOnRails
[01:15:58] mordof: baweaver, ok, thanks. i'll start fiddling around with different things and see what happens then.
[01:16:25] Radar: -bbbb garbagecollectio!*@* MidnightSun99!*@* mansgrf!*@* IcE_BoY!*@*
[01:16:55] mordof: baweaver, ooh, apparently .distinct takes an orderby as the second arg
[01:17:09] Radar: -bbbb spazm!*@* Byllida!*@* Splatter_Waste_F!*@* Margret_Mae_Barb!*@*
[01:18:45] mordof: or... i guess that's a different version of the method :/
[01:18:54] Radar: -bbbb Margret_Mae_Barb!*@* k1t!*@* osdc_bot!*@* Abby*!*@*
[01:19:02] Radar: -bbbb AntiCorrupcion!*@* *!*DiNoALaCo@* fakam*!*@* turiss!*@*
[01:19:07] Radar: -bbb tarsis!*@* visgia!*@* ulaas*!*@*
[01:19:14] prereflect: has joined #RubyOnRails
[01:19:15] Rubie: has joined #RubyOnRails
[01:19:22] baweaver: Radar: Having fun over there?
[01:19:58] Radar: -b neworder!*@*
[01:20:06] JDeen: has joined #RubyOnRails
[01:20:22] _blizzy_: so, anyone think they figured out the cause of my problem?
[01:20:34] pipework: _blizzy_: As always, not enough liquor.
[01:20:39] Radar: -bbbb *!*@emoneko.bukkake.glitterkitty.org *!*@gateway/web/freenode/ip.24.8.130.168 *!*goofyball@50.1.85.183 *!*adre@88.96.237.217
[01:20:39] p8m: has joined #RubyOnRails
[01:20:42] Radar: I think that'll do for now.
[01:20:45] _blizzy_: pipework, but I'm only 17.
[01:20:48] _blizzy_: I can't drink.
[01:20:54] sevenseacat: legally anyway
[01:20:56] Radar: That explains a lot.
[01:20:57] pipework: _blizzy_: I don't know what country you're in.
[01:21:05] garrypolley: has joined #RubyOnRails
[01:21:12] pipework: There isn't a country by that name.
[01:21:21] _blizzy_: United States of America
[01:21:22] sevenseacat: you mean, 'murrica?
[01:21:38] Radar: _blizzy_: What do your logs show during the request where the image is uploaded?
[01:21:45] sevenseacat: 'murrica. fk yeah.
[01:22:21] baweaver: Ah World Police
[01:22:33] baweaver: and The Interview
[01:22:33] afrianska: has joined #RubyOnRails
[01:22:38] baweaver: that one hit a little too close to home ;)
[01:23:11] garrypolley: has joined #RubyOnRails
[01:23:19] garyserj: has joined #RubyOnRails
[01:23:39] garyserj: what is the latest stable release of ruby on rails?
[01:23:44] Radar: garyserj: 4.2.1
[01:23:48] helpa: Next question, please!
[01:23:50] sevenseacat: is listed in the channel topic.
[01:24:06] garyserj: is the latest release always stable?
[01:24:12] pipework: garyserj: /topic bruh
[01:24:27] baweaver: ACTION snickers at the word stable
[01:24:45] baweaver: ACTION glares at ActiveJob
[01:25:31] sevenseacat: ACTION glares at spring and turbolinks
[01:25:37] mordof: baweaver, turns out it's just a .group([:item_type, :item_id]).order("created_at desc")
[01:25:42] pipework: ACTION whinnies like a horse caught up in their stable
[01:25:52] mordof: baweaver, thought it was gonna be a lot messier than that
[01:26:07] baweaver: yeah, which is why I didn't quite mention it first.
[01:26:18] _blizzy_: I'm about to look at the log, but my app still uploads the file to s3.
[01:26:21] _blizzy_: it's just the url.
[01:26:43] mordof: baweaver, my misguided google searches weren't getting me anywhere for a while, heh. didn't realize there was a .distinct, so that at least got me in the right direction. thanks :)
[01:30:58] _blizzy_: I looked at the ogs.
[01:31:09] _blizzy_: it uploads fine, it just doesn't have the correct url
[01:31:34] sevenseacat: if you cant provide *us* the information, no-one can help you.
[01:32:11] prereflect: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[01:32:26] Cache_Money: has joined #RubyOnRails
[01:34:57] GreySyntax: has joined #RubyOnRails
[01:35:02] shtirlic: has joined #RubyOnRails
[01:35:05] Isthar: has joined #RubyOnRails
[01:35:16] rmoriz: has joined #RubyOnRails
[01:36:58] _blizzy_: I am providing information. ._.
[01:37:02] _blizzy_: the logs look normal.
[01:37:18] sevenseacat: define 'normal'.
[01:37:28] _blizzy_: nothing out of place.
[01:37:40] _blizzy_: it looks the same as if it uploaded correctly.
[01:37:41] sevenseacat: you're not helping yourself here./
[01:37:43] pipework: Then nothing can be wrong.
[01:37:57] sevenseacat: either gist the logs when we ask to see them, or stop talking.
[01:38:09] pipework: Or start pouring the rest of us drinks.
[01:38:13] sparr: has joined #RubyOnRails
[01:38:15] larissa: has joined #RubyOnRails
[01:38:19] jalcine: has joined #RubyOnRails
[01:38:38] _blizzy_: you don't have to be rude about it. c:
[01:39:09] sevenseacat: really? the message wasnt getting through any other way
[01:39:10] baweaver: _blizzy_: They're right, you need to post code, way too little context
[01:39:27] _blizzy_: sevenseacat, ok, so?
[01:39:28] jrnkr: has joined #RubyOnRails
[01:39:29] baweaver: though a bit edgy on the response, admittedly.
[01:39:29] johntrails: anyone know why me doing something like "PsItem.first" from the rails console will give me the following error? (TinyTds::Error: Incorrect syntax near 'OFFSET'.: EXEC sp_executesql N'SELECT [ps_items].* FROM [ps_items] ORDER BY [ps_items].[id] ASC OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY').... when i do (select * from ps_items) via sql, it's a valid sql statement
[01:39:32] sevenseacat: pipework: are you old enough to drink yet?
[01:39:34] pipework: _blizzy_: Generally, you should put yourself in the shoes of the person who you're asking for halp from and try to give information that would make it easiest for the person helping you to understand what's going on, or ask for halp on how to get that information to us.
[01:39:42] johntrails: I think the issue i've been having tonight with relationships might be at the db level and not with my code
[01:39:45] pipework: sevenseacat: Only for a few years already.
[01:39:46] _blizzy_: https://gist.github.com/NotBlizzard/e0a5e31e43d384ec74a2
[01:39:58] _blizzy_: pipework, ok, I understand that nicely. thanks.
[01:39:59] pipework: Practically a baby!
[01:40:00] sevenseacat: pipework: just checking. these years are flying by
[01:40:26] johntrails: using sql server as backend
[01:40:32] sevenseacat: _blizzy_: https://gist.github.com/NotBlizzard/e0a5e31e43d384ec74a2#file-gistfile1-txt-L14
[01:41:02] baweaver: strong_params mad! strong_params smash!
[01:41:03] sevenseacat: your photo attribute is not being saved to the db.
[01:41:13] _blizzy_: but I have this line ' params.require(:photo).permit(:title, :photo, :tags)
[01:41:15] goshdarnyou: has joined #RubyOnRails
[01:41:19] _blizzy_: so IDK why it's not saving.
[01:41:32] baweaver: ACTION hides his scotch
[01:41:41] sevenseacat: great, so gist us the related controller code.
[01:41:53] rubyonrailed: has joined #RubyOnRails
[01:42:04] sevenseacat: are you even calling that line? we dont know.
[01:42:06] DoctorMonocular: has joined #RubyOnRails
[01:42:24] _blizzy_: https://gist.github.com/NotBlizzard/1de59db1a56c273e56dd
[01:42:29] givanse: has joined #RubyOnRails
[01:42:43] DoctorMonocular: has joined #RubyOnRails
[01:43:48] twilling_: has joined #RubyOnRails
[01:44:41] syzygy_: has joined #RubyOnRails
[01:45:08] baweaver: Well there's where line 14 becomes an issue
[01:45:43] _blizzy_: it might be something else then, since I'm calling the line.
[01:45:53] joaomdmoura: has joined #RubyOnRails
[01:46:10] baweaver: also, http://api.rubyonrails.org/classes/ActiveRecord/NestedAttributes/ClassMethods.html
[01:46:31] sevenseacat: _blizzy_: rewrite your get_tags method to not use the same require/permit structure.
[01:46:57] duderonomy: has joined #RubyOnRails
[01:47:58] kinduff: has joined #RubyOnRails
[01:48:43] joaomdmoura: has joined #RubyOnRails
[01:48:44] _blizzy_: the acceptes_nested_attributes_for method worked. thanks, baweaver.
[01:48:57] _blizzy_: sevenseacat, why? since that is the recommended structure.
[01:49:01] _blizzy_: just curious.
[01:49:08] sevenseacat: _blizzy_: when you're doing mass assignment. you're not.
[01:49:25] _blizzy_: so what exactly should I use instead?
[01:49:50] sevenseacat: just access the hash value you want.
[01:50:21] baweaver: I'd be careful using strong params as a slice equivalent
[01:50:35] baweaver: because some people use it as an error handle
[01:50:44] _blizzy_: thanks, sevenseacat
[01:50:54] baweaver: though params now has some stupid bit about being auto strong_param when you hit it with slice
[01:51:12] baweaver: so params.to_h.slice(:all, : the, :keys, :you, :want)
[01:51:45] baweaver: or just params[:key] if it's only one
[01:52:16] _blizzy_: what does .to_h do?
[01:52:31] baweaver: try it in console
[01:52:53] _blizzy_: well, it doesn't work with a string.
[01:53:05] sevenseacat: is params a string?
[01:53:17] baweaver: it's not a hash, fair warning
[01:53:23] baweaver: it just *acts* like one
[01:53:32] Radar: It's a HashWithIndifferentAccess
[01:53:43] baweaver: Still not quite
[01:54:50] baweaver: guess it is
[01:55:01] baweaver: coulda sworn it was some odd ActiveParams object
[01:55:07] sevenseacat: i thought it was an ActionController::Params object.
[01:55:09] pipework: Good ol' HWIA!
[01:55:16] baweaver: well, technically
[01:55:16] Radar: sevenseacat is right
[01:55:18] baweaver: ActionController::Parameters < ActiveSupport::HashWithIndifferentAccess
[01:55:20] rhizome: who doesn't love it
[01:55:34] pipework: sevenseacat is so right that sevenseacat is left!
[01:55:53] sevenseacat: ACTION raises ink-smudged left hand in victory
[01:56:21] baweaver: params.to_h removes some of the params
[01:56:34] imuglyandimproud: has joined #RubyOnRails
[01:56:35] pipework: sevenseacat: I bet it's pretty funny to slap someone when your hand is smudged in ink. It's like evidence of being lefty-slapped.
[01:56:39] baweaver: I call shenanigans
[01:56:45] pontiki: has joined #RubyOnRails
[01:56:45] pipework: I just don't use ink often enough to get smudges anymore.
[01:57:38] blazes816: has joined #RubyOnRails
[01:57:38] baweaver: params object is still a mess.
[01:57:40] imuglyandimproud: Is there any way to route outside of a namespace? I have a namespace :admin that contains users, and would like to use the sessions controller that is outside :admin (path is /sessions#?)
[01:57:57] pontiki: pipework: how do you keep your ink-stained fingers, then?
[01:58:08] baweaver: Well back home for me, 'night
[01:58:12] sevenseacat: lots of things in rails are a mess.
[01:58:17] pipework: pontiki: I prefer them medium rare.
[01:58:26] _blizzy_: thxs for the help everyone.
[01:58:54] mordof: sevenseacat, the more recent oddity i found is the result of a (Active SomethingorOther::)Duration output in irb
[01:58:59] baweaver: sevenseacat: try params.to_h some time. Only way to get it to behave is JSON.parse(params.to_json) or params.as_json
[01:59:04] Radar: imuglyandimproud: what have you tried so far?
[01:59:12] merryfett: has joined #RubyOnRails
[01:59:19] Lytol: has joined #RubyOnRails
[01:59:53] baweaver: params.as_json == params.to_h # => false
[02:00:11] baweaver: {a: 1} == {a: 1} # => true
[02:00:33] baweaver: ACTION notes it as something to raise as an issue later.
[02:00:58] imuglyandimproud: Radar, within the :users resource of the namespace I've tried setting get 'login' => 'sessions#new' but the route is expecting Admin::SessionsController. I would like to route to the SessionsController outside of the namespace
[02:01:23] Radar: imuglyandimproud: Can you show me the full context of this in the routes.rb file please? Just Gist the full routes file so that I can understand what you're doing.
[02:01:26] goodcodeguy: has joined #RubyOnRails
[02:01:35] imuglyandimproud: Radar, sure thing. gimme a sec
[02:02:09] prereflect: has joined #RubyOnRails
[02:03:10] _blizzy_: has left #RubyOnRails: ("Leaving")
[02:03:36] RegulationD: has joined #RubyOnRails
[02:03:39] renews: has joined #RubyOnRails
[02:04:21] charliesome: has joined #RubyOnRails
[02:06:38] imuglyandimproud: Radar: Here ya go. https://gist.github.com/cmcdaniels/8437971c931a1894e5aa
[02:07:10] ivanc: has joined #RubyOnRails
[02:07:30] imuglyandimproud: Radar: I do understand why it doesn't work as it is expecting the namespace prefix
[02:08:36] cleopatra: has joined #RubyOnRails
[02:09:31] Scripore: has joined #RubyOnRails
[02:10:39] Radar: imuglyandimproud: Why are those routes both inside and outside of the namespace?
[02:11:17] siemprefresco: has joined #RubyOnRails
[02:11:19] dru``: has joined #RubyOnRails
[02:11:38] demosthenes131: Hi. I'm new to Rails and trying to follow the tutorial on Rubytutorial. How long does it take for Cloud9 to make a workspace?
[02:12:35] cha1tanya: has joined #RubyOnRails
[02:13:00] imuglyandimproud: Radar There are several types of users on my site, here client and admin. The locations they are logged in are different (client at /login and admin @ /admin/login) however the behavior at which their sessions are created are the same. I wanted to avoid using the Admin::SessionsController because of this
[02:13:08] pontiki: less than a minute for me, demosthenes131
[02:13:30] demosthenes131: wow. This has been going for about 30 minutes!
[02:13:50] Radar: imuglyandimproud: You're using the same controller for both clients and admins?
[02:13:52] HenriettaSalt: has joined #RubyOnRails
[02:13:56] Radar: imuglyandimproud: They log in the same way?
[02:14:53] Etriaph: has joined #RubyOnRails
[02:14:57] demosthenes131: pontiki, I tried that but was still processing
[02:15:11] imuglyandimproud: Radar the manner their sessions are handled yes. there is a seperation between the Clients and Admins controllers, though.
[02:15:22] pontiki: maybe send a support message to them
[02:15:22] Radar: imuglyandimproud: Can you show me these two controllers please?
[02:17:23] GriffinHeart: has joined #RubyOnRails
[02:17:39] chipotle: has joined #RubyOnRails
[02:18:46] tubbo`: has joined #RubyOnRails
[02:18:52] imuglyandimproud: Radar: Rather than trying to route outside, I just extended Admin::SessionsController and called super on all the methods. This fixes my issue
[02:20:18] Radar: imuglyandimproud: that doesn't seem like the right way to fix it
[02:20:42] Radar: imuglyandimproud: I don't know why you need Admin::SessionsController or those routes for sessions inside the admin namespace to exist at all if everyone signs in throught he same controller
[02:21:16] CheckYourSix: sevenseacat: Were you the one that told me about using joins inside my controller the other night so I could sort by area number for the users display?
[02:23:04] cirn0: has joined #RubyOnRails
[02:23:39] DoctorMonocular: has joined #RubyOnRails
[02:23:51] sevenseacat: CheckYourSix: yep.
[02:24:21] demosthenes131: pontiki, I will probably do that. I tried to delete the workspace and it won't even do that.
[02:25:00] pontiki: demosthenes131: try creating it as a public space instead of private
[02:25:20] pontiki: i don't know, but it could be those get throttled
[02:25:42] CheckYourSix: sevenseacat: Ok, I was reading about them on www.rubyonrails.org, but I've never used them before. Even in PHP. I'm a slight bit confused. So would it just be @users = User.joins(:area)? Because it doesn't seem to work.
[02:25:45] imuglyandimproud: Radar: I guess I don't. Moving outside the namespace and redefining routes is also a solution.
[02:26:00] rubyonrailed: has joined #RubyOnRails
[02:26:16] Cache_Money: has joined #RubyOnRails
[02:26:42] sevenseacat: CheckYourSix: what isnt working?
[02:27:11] quazimodo: any way to take an Arel::Node::Union and turn it into a regular AR Relation?
[02:27:44] CheckYourSix: sevenseacat: When I do that, I can't display the area_number in the view. When I used .includes instead of .joins, I was able to put user.area.area_number. I also did @users.inspect to dump the data, and there is nothing in the array for it either.
[02:28:10] sevenseacat: why cant you display the area number in the view? what happens?
[02:28:58] mase-chatter: has joined #RubyOnRails
[02:29:04] kinduff: has joined #RubyOnRails
[02:29:56] CheckYourSix: sevenseacat: Ok, I must be going crazy. It's outputting area_number now.
[02:30:28] sevenseacat: `inspect` will only show the activerecord attributes for a model
[02:30:39] sevenseacat: there can be many more methods and attributes added :)
[02:31:07] CheckYourSix: How would I sort by area_number? User.joins(:area).order(:area_number) doesn't work of course.
[02:31:51] sevenseacat: order('areas.area_number')
[02:32:08] sevenseacat: because the area number is on the area table, you need to specify the table in the order
[02:32:36] CheckYourSix: Oh. Without the : in front.
[02:33:40] duderonomy: has joined #RubyOnRails
[02:35:17] CheckYourSix: Ok, I have another question now. I have Divsions, Areas, and Users. Each Area belongs_to Division, each User belongs_to Area. Each Area has_many Users. Each Division has_many Areas, has_many Users through Areas.
[02:35:37] CheckYourSix: Do I need the have the division_id in the Users table, or is having it in the Areas table enough?
[02:35:49] CheckYourSix: From what I read and understand, I need it in both
[02:36:05] dunno987: has joined #RubyOnRails
[02:36:40] sevenseacat: nope, having it in the middle table is enough
[02:37:03] surrealanalysis: has joined #RubyOnRails
[02:37:15] nobitanobi: has joined #RubyOnRails
[02:37:16] CheckYourSix: And do I still need each User belongs_to Division?
[02:38:00] CheckYourSix: Since it's only a through reference
[02:38:04] maz-dev: has joined #RubyOnRails
[02:39:38] CheckYourSix: Ok. Now, back to joins again. How do I also join in the divisions table so I can sort and display divisions along with areas for the users?
[02:40:31] CheckYourSix: @users = User.joins(:area, :division).order('areas.area_number')
[02:40:38] CheckYourSix: Mysql2::Error: Unknown column 'users.division_id' in 'on clause': SELECT `users`.* FROM `users` INNER JOIN `areas` ON `areas`.`id` = `users`.`area_id` INNER JOIN `divisions` ON `divisions`.`id` = `users`.`division_id` ORDER BY areas.area_number
[02:40:49] jtdowney: has joined #RubyOnRails
[02:41:11] sevenseacat: user has no direct association to division
[02:41:25] CheckYourSix: I forgot to remove the belongs_to division.
[02:41:27] CheckYourSix: I removed that.
[02:41:28] sevenseacat: if you want to join between area and division, you can specify that in the joins, eg. joins(area: :division)
[02:41:54] sevenseacat: http://guides.rubyonrails.org/active_record_querying.html#using-array-hash-of-named-associations
[02:42:26] skiz: has joined #RubyOnRails
[02:42:27] earthquake: has joined #RubyOnRails
[02:44:40] mello: has joined #RubyOnRails
[02:46:28] CheckYourSix: Ok I got it now. Perfect
[02:47:20] nixward: has joined #RubyOnRails
[02:48:28] jwaldrip_: has joined #RubyOnRails
[02:50:08] davpet77: has joined #RubyOnRails
[02:51:15] GPrime: has joined #RubyOnRails
[02:54:44] gambl0re: has joined #RubyOnRails
[02:56:53] davpet77: my session cookie resets everytime I redirect to a new page so I can't keep a user logged in.
[02:57:25] mike_bueti: has joined #RubyOnRails
[02:57:42] renews: has joined #RubyOnRails
[02:58:18] sevenseacat: has joined #RubyOnRails
[02:58:20] rickmasta: has joined #RubyOnRails
[02:59:42] bronson: has joined #RubyOnRails
[03:02:55] thebatu1: has joined #RubyOnRails
[03:02:56] nahtnam: has joined #RubyOnRails
[03:02:56] crdpink: has joined #RubyOnRails
[03:04:04] JDeen: has joined #RubyOnRails
[03:04:54] Limix: has joined #RubyOnRails
[03:05:12] jrnkr: has joined #RubyOnRails
[03:05:16] neruda: my question is about how form fields get loaded into the params hash for nested forms with multiple child objects
[03:05:24] neruda: does the params hash need unique index values on the name *and* id attributes of the input? just unique name? just unique id?
[03:05:32] neruda: im adding new form fields by cloning (jquery) fields and replacing name attributes that originally look like "parent[child][0]" with "parent[child][1]"
[03:05:40] neruda: im just wondering if rails needs both the name attribute and id attribute to reflect this nesting or how its parsed
[03:05:42] Limix: Hi, any feedback on deploying rails apps with docker to azure? specifically using compose and machine?
[03:07:01] tcrypt: has joined #RubyOnRails
[03:08:08] acti0nman: has joined #RubyOnRails
[03:09:10] Scripore: has joined #RubyOnRails
[03:10:48] cha1tanya: has joined #RubyOnRails
[03:11:36] braincrash: has joined #RubyOnRails
[03:14:15] dkam: has joined #RubyOnRails
[03:16:51] philcrissman: has joined #RubyOnRails
[03:17:57] Spami: has joined #RubyOnRails
[03:22:29] bratsche: has joined #RubyOnRails
[03:27:03] crankharder: has joined #RubyOnRails
[03:29:27] rogaps: has joined #RubyOnRails
[03:31:51] Lightsword: has joined #RubyOnRails
[03:34:55] baweaver: has joined #RubyOnRails
[03:35:22] Isthar: has joined #RubyOnRails
[03:35:37] GreySyntax: has joined #RubyOnRails
[03:35:41] shtirlic: has joined #RubyOnRails
[03:35:57] rmoriz: has joined #RubyOnRails
[03:37:36] chagel: has joined #RubyOnRails
[03:38:46] maz-dev: has joined #RubyOnRails
[03:46:05] morissette: has joined #RubyOnRails
[03:46:32] morissette: Anyone available to help w/ http://stackoverflow.com/questions/30496796/rails-layout-stylesheets-disappearing-when-rendered
[03:48:01] parrow: has joined #RubyOnRails
[03:48:45] mwlang: has joined #RubyOnRails
[03:49:37] fryguy: morissette: <% should be <%=
[03:49:44] morissette: I saw the update
[03:49:46] sevenseacat: morissette: yw.
[03:49:51] morissette: So <% works in the view but not the layout?
[03:50:07] sevenseacat: <% will never output anything.
[03:50:11] fryguy: <% runs ruby code but does not output anything
[03:50:28] morissette: It totally worked in the view
[03:50:37] morissette: i just copied and pasted from the view to the layout
[03:50:40] morissette: then it stopped working
[03:50:41] sevenseacat: care to share that code?
[03:50:48] sevenseacat: because i dont think it did.
[03:51:18] morissette: <% stylesheet_link_tag "bootstrap.min" %> in home/index.erb
[03:51:28] bratsche: If it worked then that's a bug.
[03:51:35] sevenseacat: definitely doesnt work.
[03:51:44] morissette: maharris@maharris-ipsoft:~/Projects/QA$ rails --version
[03:51:45] morissette: maharris@maharris-ipsoft:~/Projects/QA$ ruby --version
[03:51:45] morissette: ruby 2.1.2p95 (2014-05-08) [x86_64-linux-gnu]
[03:51:52] renews: has joined #RubyOnRails
[03:52:24] RegulationD: has joined #RubyOnRails
[03:52:55] mwlang: I have a field validation rule I need to change: currently it???s defined as: ???validates :otn, presence: true??? however, I want presence: to be true if another field (:ctn in this case) is populated, but false when that field is empty. that is, enforce that it???s populated when the other is and left blank when the other is as well. I could do it with two lines and a conditional, but I was wondering if this could be done with o
[03:53:29] sevenseacat: validates :otn, presence: true, if: :ctn ?
[03:53:41] mwlang: sevenseacat: almost.
[03:54:01] mwlang: sevenseacat: that only enforces it???s present when :ctn is also present.
[03:54:21] sevenseacat: isnt that what you just asked?
[03:54:29] mwlang: it doesn???t enforce validates :otn, presence: false, unless: ctn?
[03:54:37] sevenseacat: is that even a thing?
[03:54:42] sevenseacat: to validate the lack of a presence?
[03:55:18] mwlang: sevenseacat: I would hope so! I guess I???d better whip up some tests???but why else would presence: take a boolean?
[03:55:30] sevenseacat: to turn the validation on
[03:56:24] mwlang: sevenseacat: I???d better drop down to some specs to ensure I???m getting what I thought I???d be getting
[03:56:57] mwlang: ideally, I???d just love to drop a Proc in like so: validates :otn, presence: ???ctn.present????
[03:57:02] mwlang: and have it go both ways.
[03:57:20] sevenseacat: except you'll need a proc, like rhizome said
[03:59:16] shyshy: has joined #RubyOnRails
[04:02:04] rubyonrailed: has joined #RubyOnRails
[04:05:26] mwlang: heh, learned something new today. there???s such a thing as validating :absence
[04:05:34] merryfett: has joined #RubyOnRails
[04:10:07] nobitanobi: has joined #RubyOnRails
[04:15:03] mauro1254: has joined #RubyOnRails
[04:16:34] vanne: has joined #RubyOnRails
[04:16:35] JDeen: has joined #RubyOnRails
[04:18:01] jrnkr: has joined #RubyOnRails
[04:19:35] michael_mbp: has joined #RubyOnRails
[04:20:40] zorak8: has joined #RubyOnRails
[04:25:07] gusrub: has joined #RubyOnRails
[04:29:05] djbkd: has joined #RubyOnRails
[04:30:28] morissette: Can anyone enlighten me with how this is producing two different paths: http://pastebin.com/0A476NK2 - and my apologies newbing it jup
[04:30:59] morissette: and / or http://pastie.org/10211288
[04:31:01] shyshy: has joined #RubyOnRails
[04:32:39] sevenseacat: morissette: rails found bootstrap - it didnt find jquery
[04:33:01] morissette: fair enough - thanks I just figured it out was missing .min
[04:33:13] sevenseacat: you shouldn't be including jquery like that - it will conflict with the jquery that rails includes
[04:33:20] mello: has joined #RubyOnRails
[04:34:10] DoctorMonocular: has joined #RubyOnRails
[04:35:31] goshdarnyou: has left #RubyOnRails: ()
[04:35:48] helpa: What sevenseacat said
[04:37:01] morissette: Can link me to docs or learn me something good :)
[04:37:09] charliesome: has joined #RubyOnRails
[04:37:44] sevenseacat: !assetpipeline
[04:37:58] morissette: .... googles asset pipeline
[04:37:58] sevenseacat: !asset-pipeline
[04:38:08] sevenseacat: fucking helpa.
[04:38:24] morissette: so should i also not have my bootstrap fonts in /public/ ?
[04:38:56] sevenseacat: use something like bootstrap-sass, which can integrate with the asset pipeline.
[04:39:03] morissette: one day please forgive me
[04:39:41] riotjones: has joined #RubyOnRails
[04:39:49] sevenseacat: nothing to forgive, you're learning :)
[04:42:24] morissette: I guess you guys are a lot more forgiving than the perl crowd I'm used to that all like did you google it and RTFM
[04:42:24] sbhatore: has joined #RubyOnRails
[04:44:30] Etriaph: has joined #RubyOnRails
[04:44:35] sevenseacat: well sometimes we do, but then again we know all the right terms to google for and have all the docs on speed dial
[04:44:44] helpa: http://guides.rubyonrails.org/asset_pipeline.html - The Asset Pipeline Guide by Ryan Bigg, Richard Hulse & Mohammad Typaldos
[04:44:49] sevenseacat: its easier for us to link you to them, or tell you what to google for
[04:44:51] sevenseacat: Radar: oh ffs.
[04:45:35] workmad3: has joined #RubyOnRails
[04:46:07] renews: has joined #RubyOnRails
[04:48:00] rickmasta: has joined #RubyOnRails
[04:49:19] mwlang: *sigh* Gotta love it when the requirements change just as you???re about to wrap up the last spec of a new feature.
[04:49:51] Brando753: has joined #RubyOnRails
[04:50:38] scottm: has joined #RubyOnRails
[04:51:46] thebatu1: has joined #RubyOnRails
[04:51:59] mwlang: it???s for the better, tho??? I don???t like making conditional logic based on whether pairs of fields have data or not. :-) It just muddles the design and makes it easy for next developer to come along and muck things up.
[04:52:57] mwlang: better to be explicit with additional fields that are there to state what you mean unambiguously.
[04:54:37] maz-dev: has joined #RubyOnRails
[04:55:41] stevednd: has joined #RubyOnRails
[04:57:25] siemprefresco: has joined #RubyOnRails
[04:57:57] scottmatheina: has joined #RubyOnRails
[04:58:32] arBmind: has joined #RubyOnRails
[05:02:43] rubyonrailed: has joined #RubyOnRails
[05:03:53] Radar: what's a good sublime text theme?
[05:04:09] sevenseacat: i use DobDark, available in package control.
[05:04:12] baweaver: I just stick the tried and true Molokia
[05:04:26] sevenseacat: DobDark for colour scheme, Nil for a theme.
[05:04:30] towski_: has joined #RubyOnRails
[05:04:52] baweaver: ACTION opens sublime
[05:05:09] Radar: Tabs are ugly in Monokai
[05:05:10] baweaver: ACTION bows head in shame
[05:05:32] commondream: has joined #RubyOnRails
[05:06:13] sinequanon: has joined #RubyOnRails
[05:06:56] baweaver: Glacier is decent
[05:07:15] baweaver: http://glaciertheme.com/
[05:07:45] baweaver: http://colorsublime.com/ - though that seems more handy
[05:07:53] ndrei: has joined #RubyOnRails
[05:08:22] chrissonar: has joined #RubyOnRails
[05:08:29] baweaver: Well, for color schemes
[05:08:41] baweaver: ACTION debates trying to make his own themes some time
[05:09:14] sevenseacat: its too much hard work
[05:09:23] scottmatheina: has joined #RubyOnRails
[05:10:38] baweaver: sevenseacat: http://tmtheme-editor.herokuapp.com/#/theme/Monokai :D
[05:11:01] sevenseacat: baweaver: oh i did not know about that
[05:11:12] baweaver: google tells me fun things
[05:11:28] sevenseacat: thats freaking awesome
[05:11:32] baweaver: ACTION more of wanted to see what legwork was required to make a custom one
[05:11:34] user121212: has joined #RubyOnRails
[05:11:37] baweaver: but that works too
[05:11:44] sevenseacat: my dobdark theme is there!
[05:11:51] mbuf: has joined #RubyOnRails
[05:11:52] Etriaph: has joined #RubyOnRails
[05:12:15] sevenseacat: now i can fucking fix it because some update of it changed the symbol colour which drives me nuts
[05:12:17] mbuf: what benefits does thin provide for running Ruby on Rails applications?
[05:12:40] baweaver: It's thinner
[05:13:00] mbuf: baweaver, does it support multi-threading?
[05:13:34] baweaver: https://blog.engineyard.com/2014/ruby-app-server-arena-pt2
[05:14:04] baweaver: mbuf: Look up green threading
[05:14:05] scottmatheina: has joined #RubyOnRails
[05:14:19] mbuf: baweaver, okay
[05:14:23] baweaver: MRI doesn't. You;d have to use JRuby or Rubinus
[05:14:27] synfinatic_: has joined #RubyOnRails
[05:15:02] djbkd: has joined #RubyOnRails
[05:15:55] mbuf: baweaver, okay
[05:15:57] scottmatheina: has joined #RubyOnRails
[05:15:58] dru`: has joined #RubyOnRails
[05:15:59] sevenseacat: yaaaaaay my symbols are back to being blue on dobdark
[05:16:03] sevenseacat: ACTION happy now
[05:18:02] baweaver: ACTION is reverse engineering themes to make a Tron theme
[05:18:14] scottmatheina: has joined #RubyOnRails
[05:19:37] baweaver: Take some of the CSS from an old version of my site: http://baweaver.com/v2/ - and try and make this happen: https://camo.githubusercontent.com/15bfedfe8255ee91b864c4c3afa7d2541fec4de9/687474703a2f2f692e696d6775722e636f6d2f4454727a322e6a7067
[05:21:52] cjlarose: has joined #RubyOnRails
[05:23:54] scottmatheina: nickserv status
[05:24:14] mwlang: ACTION used to carry forth the old Borland Turbo Pascal 5.5 theme through to all my editors, including VIM, Eclipse, Textmate, etc. one font and same colors to rule ???em all! :-) ...
[05:24:20] tagrudev: has joined #RubyOnRails
[05:24:27] mwlang: ACTION ???then I got tired of 16 colors. 
[05:24:39] tagrudev: is it Friday yet
[05:24:43] scottmatheina: my bad.. thought I couldn't talk
[05:25:00] JDeen: has joined #RubyOnRails
[05:25:02] scottmatheina: new to this channel... new Ruby programmer
[05:25:08] sevenseacat: scottmatheina: welcome :)
[05:25:39] baweaver: http://colorsublime.com/?q=tron - Ooh, I like this one. Time to do a bit of tweaking then to the theme.
[05:25:57] scottmatheina: hoping there are some great resources shared here
[05:26:35] jenrzzz: has joined #RubyOnRails
[05:26:58] sevenseacat: well at the moment we're talking about sublime text themes, if that helps :P
[05:27:18] sevenseacat: baweaver: i do like that tron light theme
[05:27:21] scottmatheina: I have that editor also
[05:27:43] baweaver: Customizing the tron one a bit for Ruby
[05:27:54] mwlang: oh, yeah, I forgot there???s a new tron nowadays.
[05:28:08] sevenseacat: yeah its not good for ruby
[05:28:15] hahuang61: has joined #RubyOnRails
[05:28:37] baweaver: mwlang: There is? I thought it was just a really awesome Daft Punk music video.
[05:28:57] siemprefresco: has joined #RubyOnRails
[05:29:00] sevenseacat: so many themes look good in the small preview, but then you look at a big preview and it sucks
[05:29:01] hahuang61: has joined #RubyOnRails
[05:29:41] mwlang: baweaver: :-p Yeah, I???m showin??? my age, I reckon
[05:29:43] sevenseacat: you can tell which languages they were designed for, and which were an afterthought
[05:31:51] baweaver: Well I'm going to go filch a bunch of tron screenshots and force them into a color scheme
[05:33:15] mwlang: baweaver: you only need one: http://fc01.deviantart.net/fs70/i/2010/322/9/8/tron_lightdiscs_icon_v2_by_dantenopolis-d333joy.jpg
[05:34:07] chinmay_dd: has joined #RubyOnRails
[05:34:33] baweaver: Was going off of this: http://wallpaperest.com/wallpapers/tron-legacy-light-cycles_130105.jpg
[05:35:10] DoctorMonocular: has joined #RubyOnRails
[05:35:47] ritek: has left #RubyOnRails: ()
[05:37:42] mwlang: some good colors there. Better than http://furiousfanboys.com/wp-content/uploads/2010/10/tron10.jpg
[05:40:24] renews: has joined #RubyOnRails
[05:41:14] user121212: Hello, I'm still struggling with devise token auth gem, can anybody help me on it? http://stackoverflow.com/questions/30496770/devise-token-auth-cant-create-user-account-after-installing-devise-token-auth
[05:43:30] philcrissman: has joined #RubyOnRails
[05:45:18] Davedo: has joined #RubyOnRails
[05:47:49] rocknrollMarc: has joined #RubyOnRails
[05:50:14] sammy889: has left #RubyOnRails: ()
[05:51:33] David_H__: has joined #RubyOnRails
[05:51:34] sleungcy: has joined #RubyOnRails
[05:53:23] mbuf: anyone here use supervisor to start a thin server for Rails? I get the following error message, "INFO spawnerr: can't find command '/home/ubuntu/.rvm/wrappers/ruby-1.9.3-p362/bundle exec thin -C config/thin.yml start'"
[05:54:12] n008f4g_: has joined #RubyOnRails
[06:00:30] sinkensabe: has joined #RubyOnRails
[06:00:31] metus_violarium: has joined #RubyOnRails
[06:00:53] riotjones: has joined #RubyOnRails
[06:01:04] aganov: has joined #RubyOnRails
[06:02:16] krz: has joined #RubyOnRails
[06:04:14] cornerma1: has joined #RubyOnRails
[06:05:33] DoctorMonocular: has joined #RubyOnRails
[06:06:34] hahuang65: has joined #RubyOnRails
[06:07:35] artmann: has left #RubyOnRails: ()
[06:07:38] hahuang65: has joined #RubyOnRails
[06:07:50] sleungcy: mbuf: try remove the quotes around the command
[06:08:42] eoy_: has joined #RubyOnRails
[06:10:58] hahuang65: has joined #RubyOnRails
[06:14:42] mbuf: sleungcy, yes, that worked; but, supervisord keeps respawning the thin server, with log messages INFO exited, spawned success, what could be the reason? in /var/log/server.log, I see that it starts on port :3000, sees the pid file exists, and tries to start it again and fails for the same reason again and again
[06:14:48] mbuf: but the server is running on port :3000
[06:15:10] mbuf: should we remove the pid file in thin.yml when using with supervisor?
[06:15:13] hahuang65: has joined #RubyOnRails
[06:17:20] bronson: has joined #RubyOnRails
[06:18:44] DoctorMo_: has joined #RubyOnRails
[06:18:45] sinequanon: has joined #RubyOnRails
[06:19:30] Kovensky: has joined #RubyOnRails
[06:20:50] drale2k: has joined #RubyOnRails
[06:21:25] sleungcy: It sound like thin is already running?
[06:22:05] mello: has joined #RubyOnRails
[06:23:00] stoffus: has joined #RubyOnRails
[06:23:22] sleungcy: Does thin stop work
[06:25:10] kerunaru: has joined #RubyOnRails
[06:25:22] maz-dev: has joined #RubyOnRails
[06:27:37] MartinElvar: has joined #RubyOnRails
[06:28:05] mbuf: sleungcy, it is running, is it something to do with nodaemonize for supervisord?
[06:28:10] crdpink2: has joined #RubyOnRails
[06:28:48] TvL2386: has joined #RubyOnRails
[06:29:07] roolo: has joined #RubyOnRails
[06:29:52] chinmay__: has joined #RubyOnRails
[06:29:55] ndrei: has joined #RubyOnRails
[06:31:56] sinequanon: has joined #RubyOnRails
[06:31:59] sandelius: has joined #RubyOnRails
[06:32:28] TvL2386: hi guys, I have ruby-2.1 and bundle complained about me having multiple sources without block. So I added the blocks and did bundle update... On development that worked fine and the dev env works great. I have now deployed this on my acceptance server but it doesn't install any gem dependency. Bundle says: The Gemfile specifies no dependencies
[06:33:38] TvL2386: I've been googling a bit, but the only thing I can find is someone who is not in the directory where his Gemfile resides
[06:34:07] TvL2386: rhizome, see this http://bundler.io/gemfile.html and scroll kinda half way
[06:34:53] rhizome: never heard of having to do that before
[06:34:58] workmad3: has joined #RubyOnRails
[06:35:04] Hates_: has joined #RubyOnRails
[06:35:10] TvL2386: rhizome, you ever had multiple sources defined in a Gemfile?
[06:35:26] Hates_: has joined #RubyOnRails
[06:36:05] rhizome: i guess not
[06:36:09] TvL2386: as I have `source 'http://internal-gem-server.example.com' ; source 'https://rubygems.org'`
[06:36:24] GriffinHeart: has joined #RubyOnRails
[06:36:31] towski_: has joined #RubyOnRails
[06:37:45] TvL2386: it seems that if I only add a block to my private gem server and not to the rubygems.org the issue is gone
[06:38:07] doublemalt_: has joined #RubyOnRails
[06:38:39] Macaveli: has joined #RubyOnRails
[06:40:07] dideler: has joined #RubyOnRails
[06:40:40] thebatu1: has joined #RubyOnRails
[06:41:09] Depili: TvL2386: you should always scope different sources in gemfiles, new bundlers should even warn you about multiple top-level sources as they tend to cause problems
[06:44:49] charliesome: has joined #RubyOnRails
[06:45:05] TvL2386: Depili, sounds like a good practice indeed and I got this warning: "Warning: this Gemfile contains multiple primary sources. Using `source` more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run `bundle config disable_multisource true`."
[06:46:06] TvL2386: Depili, I added a block to both sources which got me the issue of "The Gemfile specifies no dependencies" on my acceptance server
[06:46:37] Depili: you should have one top level source still, so don't scope the rubygems source
[06:46:52] TvL2386: Depili, hmmm... dev is running bundler-1.8.5 and acceptance 1.6.1... That's probably the difference in result.
[06:46:57] srinidhi: has joined #RubyOnRails
[06:47:17] benhuda: has joined #RubyOnRails
[06:47:24] TvL2386: Depili, yeah agreed. I should have read the warning message better and I wouldn't have a problem :-)
[06:49:22] Depili: sometimes its simple things like that, one reason why rubber duck debugging works :) (practice where you describe what your code is doing to a inanimate object, good way for finding brainfarts)
[06:49:30] chinmay__: has left #RubyOnRails: ()
[06:52:05] michael_mbp: has joined #RubyOnRails
[06:55:58] Macaveli: has joined #RubyOnRails
[06:56:02] gauke: has joined #RubyOnRails
[06:57:53] arup_r: has joined #RubyOnRails
[06:58:40] chagel: has joined #RubyOnRails
[06:59:02] Lytol: has joined #RubyOnRails
[06:59:47] vanne: has joined #RubyOnRails
[07:01:54] drale2k: has joined #RubyOnRails
[07:03:21] arup_r: Any body used this Gem https://github.com/gottfrois/link_thumbnailer ?
[07:03:48] arup_r: I just not getting the idea how would I incorporate the logic with my View..
[07:03:49] lyuben_: has joined #RubyOnRails
[07:04:03] arup_r: Demo app source code also not exposed -- http://link-thumbnailer-demo.herokuapp.com/#
[07:04:17] arup_r: Any idea? After installing what to do?
[07:04:53] sevenseacat: look at the usage instructions?
[07:05:08] sevenseacat: you give it a URL, and it goes and scrapes it and gives you back the data to build your thumbnail preview with
[07:05:39] solars: has joined #RubyOnRails
[07:06:15] maz-dev: has joined #RubyOnRails
[07:06:41] arup_r: I just want to know how the herokuapp is working.. when clicked on the preview..
[07:06:55] arup_r: Author show us the source code of the heroku app too
[07:08:08] vanne_: has joined #RubyOnRails
[07:08:36] artto: has joined #RubyOnRails
[07:08:56] dhjondoh: has joined #RubyOnRails
[07:08:59] sevenseacat: arup_r: you mean https://github.com/gottfrois/link_thumbnailer_demo ?
[07:09:13] arup_r: one min..
[07:09:36] arup_r: hey sevenseacat: from where you got the link..?
[07:10:04] sevenseacat: from looking at the guy's repos
[07:10:34] arup_r: He should mention it in his gem Readme..anyway thanks sevenseacat: as always
[07:10:41] arup_r: I was too formal.. :p
[07:10:51] sevenseacat: maybe you should put in a pull request amending his readme with the link :)
[07:11:10] arup_r: Another good idea
[07:12:00] Sylario: has joined #RubyOnRails
[07:12:01] karimb: has joined #RubyOnRails
[07:14:21] ruurd: has joined #RubyOnRails
[07:18:03] meoblast001: has joined #RubyOnRails
[07:18:18] aufi: has joined #RubyOnRails
[07:20:55] sandstrom: has joined #RubyOnRails
[07:22:01] dcarmich: has joined #RubyOnRails
[07:22:10] quazimodo: I want to use NullUser objects for when a user has been deleted and is still referenced
[07:22:42] GriffinHeart: has joined #RubyOnRails
[07:22:49] quazimodo: but I need user_path helpers to work
[07:22:53] Trefex: has joined #RubyOnRails
[07:22:55] mello: has joined #RubyOnRails
[07:22:56] quazimodo: well, at least not break magnificently
[07:23:57] User458764: has joined #RubyOnRails
[07:24:32] jarr0dsz: has joined #RubyOnRails
[07:25:18] comrad: has joined #RubyOnRails
[07:25:43] cha1tanya: has joined #RubyOnRails
[07:27:13] arup_r: sevenseacat: done -- https://github.com/gottfrois/link_thumbnailer/pull/58 :)
[07:27:58] arup_r: sevenseacat: what does it mean "The Travis CI build is in progress"
[07:28:08] sdwrage: has joined #RubyOnRails
[07:28:16] Ergo: has joined #RubyOnRails
[07:28:19] sevenseacat: arup_r: click the details link.
[07:28:35] renews: has joined #RubyOnRails
[07:28:58] MartinElvar: has joined #RubyOnRails
[07:29:13] arup_r: Humm.. clcked.. What is it checking?
[07:29:22] sevenseacat: the tests for the repository.
[07:29:37] arup_r: sevenseacat: he merged it
[07:30:12] RegulationD: has joined #RubyOnRails
[07:30:26] arup_r: My first opensource contributions.. :)
[07:32:26] K0nserv-: If I a have a FactoryGirl factory with a DateTime field in it is it possible to control how said datetime is returned when calling attributes_for?
[07:32:46] sevenseacat: what do you mean, how its returned?
[07:33:30] K0nserv-: sevenseacat: Let me check, I think it's returned as a DateTIme
[07:33:39] livathinos: has joined #RubyOnRails
[07:35:55] K0nserv-: Okay it's actually a ActiveSupport::TimeWithZone
[07:35:58] sbhatore: has joined #RubyOnRails
[07:38:33] seuros: has joined #RubyOnRails
[07:40:49] K0nserv-: Turns out I just forgot to add it to permitted params-.-
[07:41:04] skammer: has joined #RubyOnRails
[07:44:56] vasilakisFiL: has joined #RubyOnRails
[07:45:14] sandstrom: has joined #RubyOnRails
[07:45:23] vasilakisFiL: I am building a rack metrics middleware that logs the http requests (headers, requested path, parameters etc) and the equivalent responses (status, time spent in rails app, headers etc)
[07:45:24] vasilakisFiL: filippos [10:37]
[07:45:26] vasilakisFiL: but I am not sure where I should store the requests/responses.. at first I was thinking in redis using https://github.com/soveran/ohm
[07:45:47] vasilakisFiL: but I think ideally, using sql I could develop much better statistics..for instance I could filter all requests that have a specific header
[07:45:50] vasilakisFiL: what do you think ?
[07:45:51] elia: has joined #RubyOnRails
[07:46:06] vasilakisFiL: is it a bad idea to have postgres (for its json type) in a rack middleware ?
[07:47:06] intuxicated_: has joined #RubyOnRails
[07:49:21] kerunaru: has joined #RubyOnRails
[07:49:40] thebatu1: has joined #RubyOnRails
[07:50:39] Lightsword: has joined #RubyOnRails
[07:51:15] dcarmich: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[07:52:47] charliesome: has joined #RubyOnRails
[07:56:22] hidensoft: has joined #RubyOnRails
[07:59:35] Oxynum: has joined #RubyOnRails
[08:00:26] x-light: has joined #RubyOnRails
[08:00:53] jrnkr: has joined #RubyOnRails
[08:01:33] cha1tanya: has joined #RubyOnRails
[08:02:53] maz-dev: has joined #RubyOnRails
[08:06:29] eoy__: has joined #RubyOnRails
[08:08:16] creature: has joined #RubyOnRails
[08:09:16] jsrn_: has joined #RubyOnRails
[08:09:20] MartinElvar: has joined #RubyOnRails
[08:10:22] MartinElvar: has joined #RubyOnRails
[08:10:45] le_gars: has joined #RubyOnRails
[08:10:46] shortCircuit__: has joined #RubyOnRails
[08:10:57] jrnkr: has joined #RubyOnRails
[08:11:54] darutoko: has joined #RubyOnRails
[08:12:04] granthatcher: has joined #RubyOnRails
[08:12:10] shortCircuit__: what does :class and :attachment mean in paperclip interpolation. is there a list which describes all the available option meanings
[08:12:28] sevenseacat: shortCircuit__: yep, in the paperclip docs.
[08:12:30] dudedudeman: has joined #RubyOnRails
[08:12:58] philcrissman: has joined #RubyOnRails
[08:13:15] sevenseacat: https://github.com/thoughtbot/paperclip/wiki/Interpolations
[08:13:33] nothingmuch: has joined #RubyOnRails
[08:13:51] shortCircuit__: oh, the wiki.. I was just searching in the readme
[08:14:19] sevenseacat: yeah, in the docs.
[08:14:48] ghr: has joined #RubyOnRails
[08:16:06] shortCircuit__: wait, this points to interpolation.rb file :(
[08:16:09] Ergo^: has joined #RubyOnRails
[08:16:29] mikecmpbll: has joined #RubyOnRails
[08:16:35] sevenseacat: what better source of the interpolation meanings, than the code that defines what they mean?
[08:17:20] vasilakisFiL: which mongodb driver would you suggest? mongoid or the official one ?
[08:17:36] sevenseacat: mongoid isnt a mongodb driver
[08:17:51] shortCircuit__: OH.. OK FOUND IT
[08:17:53] sandstrom: has joined #RubyOnRails
[08:17:56] sevenseacat: shortCircuit__: :)
[08:18:45] vasilakisFiL: ah sorry, I haven't used mongodb before
[08:18:55] shortCircuit__: I didn't know devdocs.io is written in ruby ... they have two kinds of scrapers built with selenium .. its cool
[08:19:28] sevenseacat: i just found out about that site a couple days ago
[08:20:59] dudedudeman: has joined #RubyOnRails
[08:22:58] renews: has joined #RubyOnRails
[08:23:17] ghr: has joined #RubyOnRails
[08:23:45] workmad3: has joined #RubyOnRails
[08:25:49] zelo: has left #RubyOnRails: ()
[08:26:24] neanderslob: has joined #RubyOnRails
[08:26:25] granthatcher: has joined #RubyOnRails
[08:26:42] JarekTkaczyk: has joined #RubyOnRails
[08:26:49] JarekTkaczyk: has left #RubyOnRails: ()
[08:27:12] granthatcher: has joined #RubyOnRails
[08:29:42] granthatcher: has joined #RubyOnRails
[08:30:35] ndrei: has joined #RubyOnRails
[08:31:06] drzel: has joined #RubyOnRails
[08:31:42] hmnhf_: has joined #RubyOnRails
[08:33:47] dvdchr: has joined #RubyOnRails
[08:34:44] olistik: has joined #RubyOnRails
[08:35:20] rikkipitt: has joined #RubyOnRails
[08:37:47] edwinvdg_: has joined #RubyOnRails
[08:39:40] chinmay_dd: has joined #RubyOnRails
[08:39:44] gerardc: has joined #RubyOnRails
[08:40:12] edwinvdgraaf: has joined #RubyOnRails
[08:41:13] dudedudeman: has joined #RubyOnRails
[08:44:33] ArchRogem: has joined #RubyOnRails
[08:49:11] ur5us: has joined #RubyOnRails
[08:50:27] Spami: has joined #RubyOnRails
[08:50:53] eoy_: has joined #RubyOnRails
[08:52:23] edwinvdg_: has joined #RubyOnRails
[08:53:29] edwinvdg_: has joined #RubyOnRails
[08:54:47] edwinvdgraaf: has joined #RubyOnRails
[08:56:53] StanLee: has joined #RubyOnRails
[08:57:00] platzhirsch: has joined #RubyOnRails
[09:00:06] DoctorMonocular: has joined #RubyOnRails
[09:01:13] platzhirsch: has left #RubyOnRails: ()
[09:01:16] Lytol: has joined #RubyOnRails
[09:03:52] workmad3: has joined #RubyOnRails
[09:06:17] dudedudeman: has joined #RubyOnRails
[09:07:50] nixter1029: has joined #RubyOnRails
[09:11:39] mello: has joined #RubyOnRails
[09:11:50] Trefex: has joined #RubyOnRails
[09:12:57] darutoko-: has joined #RubyOnRails
[09:14:06] nfk: has joined #RubyOnRails
[09:17:05] startupality: has joined #RubyOnRails
[09:17:10] maz-dev: has joined #RubyOnRails
[09:17:14] renews: has joined #RubyOnRails
[09:19:07] RegulationD: has joined #RubyOnRails
[09:22:54] dEPy: has joined #RubyOnRails
[09:24:49] Scripore: has joined #RubyOnRails
[09:26:43] neitherupnordown: has joined #RubyOnRails
[09:26:44] user121212: has joined #RubyOnRails
[09:28:22] freezevee: has joined #RubyOnRails
[09:28:34] freezevee: hi all, can someone please help http://stackoverflow.com/questions/30502476/simple-example-of-rails-testing-devise-controllers ?
[09:28:34] rogaps_: has joined #RubyOnRails
[09:31:09] universa1: freezevee: question?!
[09:31:27] jacksparrow007: has joined #RubyOnRails
[09:31:30] freezevee: universa1: I am looking for the simplest example
[09:33:01] null__: can someone share a few github projects of well-written rails4 + ember webapps? basic crud stuff or anything else is fine.
[09:33:08] Scripore: has joined #RubyOnRails
[09:33:40] freezevee: universa1: not of the meaning of life
[09:34:30] vanne: has joined #RubyOnRails
[09:36:37] roshanavand: has joined #RubyOnRails
[09:37:17] universa1: freezevee: http://guides.rubyonrails.org/testing.html#functional-tests-for-your-controllers
[09:37:23] marr: has joined #RubyOnRails
[09:37:26] leekme: has joined #RubyOnRails
[09:37:27] freezevee: universa1: let's say how you check If the email in the registration form is not nil ?
[09:38:03] universa1: freezevee: you don't in a controller/functional test... the controller does not care about your form, it cares about the data it receives.
[09:38:03] roshanavand: has left #RubyOnRails: ()
[09:38:13] roshanavand: has joined #RubyOnRails
[09:38:15] freezevee: universa1: the problem is not Rails Testing but the "connection" with the Devise controllers which are not in my controllers (obviously)
[09:38:43] freezevee: universa1: I find a lot of examples on various sites and books but devise is what worries me
[09:39:05] fu2ristiq: has joined #RubyOnRails
[09:39:09] universa1: freezevee: why? look at the code of devise and i'm fairly certain you will find that they already wrote a lot of test.
[09:39:21] freezevee: universa1: they do in RSpec
[09:39:26] maxshelley: has joined #RubyOnRails
[09:39:31] universa1: freezevee: so?
[09:39:49] Tonch: has joined #RubyOnRails
[09:39:51] freezevee: I have no idea how RSpec works
[09:39:55] freezevee: universa1: If I rake routes, I see that new_user_registration GET /users/sign_up(.:format) devise/registrations#new
[09:40:21] universa1: freezevee: why do you want to rewrite tests that have already been written? do you also test that ar saves to the db?
[09:40:39] freezevee: universa1: to learn mostly
[09:40:57] universa1: freezevee: to learn write tests for your own controllers.
[09:41:38] vanne: has joined #RubyOnRails
[09:41:51] freezevee: universa1: even If I do that, I need to create a new user by using a devise action and then let him sign in
[09:42:04] universa1: freezevee: no, not in a controller test.
[09:42:14] freezevee: universa1: sign in should be very easy - they say you just try with sign_in @user
[09:42:15] universa1: freezevee: controller / functional
[09:42:37] fu2ristiq: when do they release version 5?
[09:42:39] universa1: freezevee: devise provides a helper for functional tests, which "signs a user in"
[09:42:47] universa1: fu2ristiq: when it is done.
[09:43:06] freezevee: universa1: but how do you create a user ? you need to call DeviseRegistration#new
[09:43:11] universa1: freezevee: no.
[09:43:15] freezevee: universa1: or something like that
[09:43:23] freezevee: universa1: what am I doing wrong ?
[09:43:24] universa1: freezevee: how do you create records for your other functional tests?
[09:43:47] freezevee: universa1: I don't yet
[09:44:17] universa1: freezevee: how do you create records for your model tests that need to exist before your tests run?
[09:44:56] krz: has joined #RubyOnRails
[09:45:01] universa1: freezevee: for that you use either: http://guides.rubyonrails.org/testing.html#the-low-down-on-fixtures or a factory library like factory_girl / ....
[09:46:34] fu2ristiq: has left #RubyOnRails: ("WeeChat 1.1.1")
[09:47:01] freezevee: universa1: or rake db:test:prepare copies the data from the dev db ?
[09:47:09] universa1: freezevee: no.
[09:47:16] jacksparrow007: has joined #RubyOnRails
[09:47:20] freezevee: I fail on all of my assumptions
[09:47:44] freezevee: universa1: thank you, I need a bit more reading to go on
[09:47:53] darrencauthon: has joined #RubyOnRails
[09:48:18] freezevee: universa1: and I suppose I must trust those who built devise and the testing they did
[09:48:46] universa1: freezevee: you should check what they did and then decide if you trust them.
[09:49:06] wethu: has joined #RubyOnRails
[09:51:23] Oxynum: has joined #RubyOnRails
[09:51:35] srinidhi: has joined #RubyOnRails
[09:53:50] intinig: has joined #RubyOnRails
[09:55:40] bronson: has joined #RubyOnRails
[09:57:23] sandelius: has joined #RubyOnRails
[09:59:17] edwinvdgraaf: has joined #RubyOnRails
[09:59:19] user121212: Can anybody help me to debug it? http://stackoverflow.com/questions/30496770/devise-token-auth-cant-create-user-account-after-installing-devise-token-auth
[09:59:35] jacksparrow007: has joined #RubyOnRails
[09:59:38] stamina: has joined #RubyOnRails
[10:00:14] centrx: has joined #RubyOnRails
[10:00:56] DoctorMonocular: has joined #RubyOnRails
[10:01:15] prereflect: has joined #RubyOnRails
[10:01:20] Chagel_: has joined #RubyOnRails
[10:04:46] rikkipitt: has joined #RubyOnRails
[10:05:48] edwinvdg_: has joined #RubyOnRails
[10:07:18] darrenca_: has joined #RubyOnRails
[10:09:25] srinidhi: has joined #RubyOnRails
[10:09:28] krz: has joined #RubyOnRails
[10:11:08] renews: has joined #RubyOnRails
[10:11:30] thsig: has joined #RubyOnRails
[10:12:33] qwertme: has joined #RubyOnRails
[10:13:02] vanne: has joined #RubyOnRails
[10:13:56] jacor: has joined #RubyOnRails
[10:17:17] chagel: has joined #RubyOnRails
[10:18:51] Macaveli: How can you check if a variable exists?
[10:18:55] Macaveli: and is filled in
[10:20:25] coin3d: has joined #RubyOnRails
[10:20:31] rickmasta: has joined #RubyOnRails
[10:21:00] mikecmpbll: var, var.nil?, var.blank? depends on yourn requirements
[10:21:44] mikecmpbll: defined?(var) even :p
[10:21:53] jackr: has joined #RubyOnRails
[10:21:55] workmad3: mikecmpbll: heh :) was about to say that!
[10:21:58] andywww: has joined #RubyOnRails
[10:22:29] startupality: has joined #RubyOnRails
[10:22:35] mikecmpbll: ACTION fist pumps
[10:22:44] workmad3: I'm out of practice :(
[10:23:22] Papierkorb: has joined #RubyOnRails
[10:24:16] mike_bueti: has joined #RubyOnRails
[10:27:22] zorak8: has joined #RubyOnRails
[10:27:48] skammer: has joined #RubyOnRails
[10:28:00] roshanavand: has left #RubyOnRails: ()
[10:28:14] drale2k: has joined #RubyOnRails
[10:32:18] arup_r: has joined #RubyOnRails
[10:33:19] Macaveli: i used defined :p
[10:33:42] hmnhf_: has joined #RubyOnRails
[10:35:04] |RicharD|: has joined #RubyOnRails
[10:35:14] x44x45x41x4E: has joined #RubyOnRails
[10:35:46] tvw: has joined #RubyOnRails
[10:37:45] mrbubbles: has joined #RubyOnRails
[10:39:07] mrbubbles: morning guys. I???m following the Ben Dixon book to deploy a rails app on a VPS privisioned with chef solo. The provisioning seemed to go okay, as did the deployment with Capistrano. However, when I try and visit my site I get a 404 for any page (a unicorn 404 rather than an nginx 404 though). Looking at the production log it seems to think the route doesn???t exist. But if I do rake routes I can see them
[10:39:45] mrbubbles: I was just hoping someone might be able to point me in a direction to debug??? It???s a subdomain, not sure if that would be screwing with it somehow
[10:39:50] Ergo: has joined #RubyOnRails
[10:40:42] deavid: has joined #RubyOnRails
[10:43:02] karimb: has joined #RubyOnRails
[10:43:47] vanne: has joined #RubyOnRails
[10:45:11] krz: has joined #RubyOnRails
[10:46:07] GriffinHeart: has joined #RubyOnRails
[10:46:10] karimb: has joined #RubyOnRails
[10:46:18] artto: has joined #RubyOnRails
[10:47:27] DerAlSem: has joined #RubyOnRails
[10:47:32] karmatronic: has joined #RubyOnRails
[10:50:00] chipotle: has joined #RubyOnRails
[10:52:05] GriffinHeart: has joined #RubyOnRails
[10:53:13] Doddlin: has joined #RubyOnRails
[10:53:28] Paradox: has joined #RubyOnRails
[10:53:51] Juanchito: has joined #RubyOnRails
[10:54:06] doublemalt_: has joined #RubyOnRails
[10:54:41] dudedudeman: has joined #RubyOnRails
[10:55:11] xMopxShell: has joined #RubyOnRails
[10:57:26] mello: has joined #RubyOnRails
[10:57:35] dustinm`: has joined #RubyOnRails
[10:58:04] Elion: has joined #RubyOnRails
[10:58:31] cirn0: has joined #RubyOnRails
[11:00:04] rodfersou: has joined #RubyOnRails
[11:00:44] erich: has joined #RubyOnRails
[11:00:50] garyserj: has joined #RubyOnRails
[11:01:05] dstarh: has joined #RubyOnRails
[11:05:43] xMopxShell: has joined #RubyOnRails
[11:07:07] vanne: has joined #RubyOnRails
[11:07:58] RegulationD: has joined #RubyOnRails
[11:08:21] AzaToth: has joined #RubyOnRails
[11:11:56] omerraja: has joined #RubyOnRails
[11:12:30] omerraja: Whats the most famous ROR CMS?
[11:12:58] jenrzzz: has joined #RubyOnRails
[11:14:11] centrx: omerraja, https://www.ruby-toolbox.com/categories/content_management_systems
[11:16:37] Elion: has joined #RubyOnRails
[11:18:21] aaronr: has joined #RubyOnRails
[11:21:36] commondream: has joined #RubyOnRails
[11:23:11] Paradox: has joined #RubyOnRails
[11:23:33] garyserj: has joined #RubyOnRails
[11:24:16] MuffinPimp: has joined #RubyOnRails
[11:24:23] djinni`: has joined #RubyOnRails
[11:24:30] livathinos: has joined #RubyOnRails
[11:25:22] MrMaynes: has joined #RubyOnRails
[11:25:22] xMopxShell: has joined #RubyOnRails
[11:27:12] chagel: has joined #RubyOnRails
[11:27:15] dudedudeman: has joined #RubyOnRails
[11:27:52] kerunaru: has joined #RubyOnRails
[11:28:52] user121212: has joined #RubyOnRails
[11:29:44] pjammer: has joined #RubyOnRails
[11:31:41] chagel: has joined #RubyOnRails
[11:32:25] superflat: has joined #RubyOnRails
[11:32:54] Bertg: has joined #RubyOnRails
[11:33:03] Doddlin: hi all! Anyone who knows a tutorial to delete images uploaded to S3 via Paperclip gem?
[11:33:43] ldnunes: has joined #RubyOnRails
[11:34:30] Scripore: has joined #RubyOnRails
[11:36:32] k3b0: has joined #RubyOnRails
[11:36:52] MuffinPimp: has joined #RubyOnRails
[11:38:00] chagel: has joined #RubyOnRails
[11:39:56] DEA7TH: has joined #RubyOnRails
[11:40:30] dudedudeman: has joined #RubyOnRails
[11:41:26] maxshelley: has joined #RubyOnRails
[11:41:29] kp666: has joined #RubyOnRails
[11:41:55] n008f4g_: has joined #RubyOnRails
[11:42:06] djinni`: has joined #RubyOnRails
[11:44:05] cha1tanya: has joined #RubyOnRails
[11:44:11] thsig: has joined #RubyOnRails
[11:44:20] chagel: has joined #RubyOnRails
[11:44:21] djinni`: has joined #RubyOnRails
[11:45:05] edwinvdgraaf: has joined #RubyOnRails
[11:48:33] shyshy: has joined #RubyOnRails
[11:48:38] arBmind: has joined #RubyOnRails
[11:49:16] xMopxShell: has joined #RubyOnRails
[11:49:38] maz-dev: has joined #RubyOnRails
[11:50:02] kp666: has joined #RubyOnRails
[11:50:24] artto: has joined #RubyOnRails
[11:50:37] mostlybadfly: has joined #RubyOnRails
[11:51:42] mosez: has joined #RubyOnRails
[11:52:21] Glyphik: has joined #RubyOnRails
[11:52:26] dionysus69: has joined #RubyOnRails
[11:54:20] ArTiSTiX: Hi there ! I have a big issue with Nokogiri gem for Rails 4.2.1 on a Debian. I tried using ruby 2.0.0, 2.1.0, 2.2.2, and it's still impossible to run my Rails Starter App. Any idea ?
[11:54:54] ArTiSTiX: (the same gemset works fine on Windows x64, ruby2.0.0)
[11:55:04] Guest29816: has joined #RubyOnRails
[11:58:10] pjammer: has joined #RubyOnRails
[11:58:13] thebatu1_: has joined #RubyOnRails
[11:58:50] xMopxShell: has joined #RubyOnRails
[12:00:44] gauke: has joined #RubyOnRails
[12:02:01] Trefex1: has joined #RubyOnRails
[12:02:46] universa1: ArTiSTiX: error?
[12:02:52] Oxynum: has joined #RubyOnRails
[12:03:04] universa1: ArTiSTiX: are you using the gemfile.lock from your windows machine?
[12:03:40] Elion: has joined #RubyOnRails
[12:06:03] edwinvdg_: has joined #RubyOnRails
[12:07:08] ekain: has joined #RubyOnRails
[12:09:15] ArTiSTiX: @universa1: I found my mistake ! It's because mongoid documentation is incomplete, i forget to add require 'action_view/railtie' in my application.rb...
[12:09:18] Scripore: has joined #RubyOnRails
[12:09:50] ArTiSTiX: thanks for helping, i was stuck on my deployment since 3 hours.
[12:10:15] surrealanalysis: has joined #RubyOnRails
[12:11:10] mbuf: has left #RubyOnRails: ("Ex-Chat")
[12:12:17] fgo: has joined #RubyOnRails
[12:16:20] krz: has joined #RubyOnRails
[12:18:16] swhitt: has joined #RubyOnRails
[12:19:32] TheNumb: has joined #RubyOnRails
[12:20:23] mehdi1: has left #RubyOnRails: ()
[12:24:16] pulgolino: has joined #RubyOnRails
[12:26:00] karimb: has joined #RubyOnRails
[12:26:26] mrbubbles: ArTiSTiX: I???m up to 12 hours so far :(
[12:26:45] mrbubbles: so root 'welcome#index' works, but anything within a namespace block on my server doesn???t seem to
[12:26:55] goodcodeguy: has joined #RubyOnRails
[12:27:44] chouhoulis: has joined #RubyOnRails
[12:28:00] ArTiSTiX: mrbubbles: do your Rails app listen on multiple domains / subdomains ?
[12:29:24] lapide_viridi: has joined #RubyOnRails
[12:29:29] k4nd4lf: has joined #RubyOnRails
[12:30:26] mrbubbles: I think so, this is the excerpt form my routes file and my nginx server config
[12:30:27] mrbubbles: http://pastie.org/10211800
[12:30:58] ArTiSTiX: mrbubbles: Here are my routes I wrote for listening on multiple domains, with 2 methods, contraintes, and scope: http://pastebin.com/sEK7SujU
[12:31:42] dariusweb: has joined #RubyOnRails
[12:31:53] ArTiSTiX: Here is the same Pastie: http://pastie.org/10211804
[12:32:21] ArTiSTiX: I hope it will help you
[12:33:02] Kvargla: has joined #RubyOnRails
[12:33:19] Ergo: has joined #RubyOnRails
[12:33:51] thebatu1: has joined #RubyOnRails
[12:34:40] Doddlin: can someone see why this line would not only change the style but also not get the messages that is sent by the other participant in the conversation?
[12:34:41] Doddlin: <span <% if message.sender = current_user %> style="justify:right;" <% else %> style="justify:left;" <% end %>>
[12:34:41] mike: has joined #RubyOnRails
[12:34:54] zack6849: has joined #RubyOnRails
[12:34:54] zack6849: has joined #RubyOnRails
[12:35:59] mrbubbles: Thanks ArTiSTiX
[12:36:01] jacor: has joined #RubyOnRails
[12:39:03] pulgolino: has joined #RubyOnRails
[12:39:26] x44x45x41x4E: has joined #RubyOnRails
[12:39:38] universa1: Doddlin: because you only set the style...
[12:40:22] Doddlin: universa1, well, that is my goal, to only set the style, but with that if-logic I???m also not getting the messages from the other partic
[12:40:28] Doddlin: which is really weird ^^
[12:40:42] universa1: Doddlin: what?! full code in a gist...
[12:42:06] coin3d: has joined #RubyOnRails
[12:43:19] SalexW: has joined #RubyOnRails
[12:44:21] Doddlin: universa1, https://gist.github.com/anonymous/04ea4f563ca1ab0a0ab4
[12:44:31] pacMakaveli: has joined #RubyOnRails
[12:44:57] universa1: Doddlin: wtf: https://gist.github.com/anonymous/04ea4f563ca1ab0a0ab4#file-show-html-erb-L7
[12:45:50] Doddlin: universa1, Not sure about that one yet, I imagine it should be in the controller#show? :P
[12:46:11] mello: has joined #RubyOnRails
[12:46:20] universa1: Doddlin: so what is your actual problem?
[12:46:21] maz-dev: has joined #RubyOnRails
[12:46:24] noodman: has joined #RubyOnRails
[12:46:36] universa1: aside from using an indentation which makes it very hard to read.
[12:47:03] Doddlin: universa1, that when I do that If-statement that I pasted before, all of the ???Sent by??? is being set to my username
[12:47:31] Doddlin: yeah??? blaming Coda for that in combination with me being a lazy copy-paster
[12:47:38] pulgolino: has joined #RubyOnRails
[12:47:53] universa1: Doddlin: https://gist.github.com/anonymous/04ea4f563ca1ab0a0ab4#file-show-html-erb-L12
[12:48:04] universa1: i doubt it changes if you remove the if else...
[12:48:56] Doddlin: actually I tried removing the if/else just before I gisted, trying not to make too much of a fool of myself, and it worked
[12:49:18] Doddlin: but when I apply that ???styling??? if/else it goes to me having sent each message
[12:50:03] universa1: Doddlin: message.sender = current_user
[12:50:17] universa1: see what the return value fo that statement is,.
[12:51:43] dariusweb: has joined #RubyOnRails
[12:51:57] jwaldrip_: has joined #RubyOnRails
[12:54:59] mike___1234: has joined #RubyOnRails
[12:55:14] Doddlin: universa1, hmmmm
[12:55:25] Doddlin: I???m getting #<User:0x007ffa0fe94808> on each message and the name has changed again
[12:55:26] griffindy: has joined #RubyOnRails
[12:55:34] universa1: Doddlin: you want a boolean comparison, not an assigment
[12:55:58] universa1: Doddlin: see the difference between a = b (assignment) and a == b (comparison)
[12:56:10] Scripore: has joined #RubyOnRails
[12:56:22] DEA7TH: has joined #RubyOnRails
[12:56:52] RegulationD: has joined #RubyOnRails
[12:59:15] k3b0: has joined #RubyOnRails
[12:59:37] gambl0re: has joined #RubyOnRails
[12:59:39] edwinvdgraaf: has joined #RubyOnRails
[13:00:03] jkamenik: has joined #RubyOnRails
[13:00:19] edwinvdg_: has joined #RubyOnRails
[13:00:24] Doddlin: universa1, As I said, I did not want to make a fool of myself.
[13:00:24] bmurt: has joined #RubyOnRails
[13:00:29] Doddlin: I did make a fool of myself.
[13:01:49] startupality: has joined #RubyOnRails
[13:02:11] rickmasta: has joined #RubyOnRails
[13:02:31] ndrei: has joined #RubyOnRails
[13:03:08] seuros: has joined #RubyOnRails
[13:07:22] darrencauthon: has joined #RubyOnRails
[13:07:59] hotdawg: has left #RubyOnRails: ()
[13:08:52] umdstu: has joined #RubyOnRails
[13:09:40] arup_r: has joined #RubyOnRails
[13:09:50] umdstu: i'm trying to do a bundle install but it complains about no ssl and to not use https: gem sources. but i'm not using https sources in my Gemfile. what gives? (no ruby isn't compiled with openssl)
[13:10:45] nfk: has joined #RubyOnRails
[13:11:36] ruby-lang541: has joined #RubyOnRails
[13:12:24] code1o6: has joined #RubyOnRails
[13:12:30] eyck: has joined #RubyOnRails
[13:13:08] rubyonrailed: has joined #RubyOnRails
[13:13:18] benoror: has joined #RubyOnRails
[13:13:47] garrypolley: has joined #RubyOnRails
[13:14:42] rubyonrails639: has joined #RubyOnRails
[13:15:24] ArTiSTiX: umdstu: Using windows ?
[13:15:37] DigitallyBorn: has joined #RubyOnRails
[13:16:49] Bil1: has joined #RubyOnRails
[13:17:36] universa1: umdstu: reinstall ruby with ssl? ;)
[13:17:53] rubyonrails639: has left #RubyOnRails: ()
[13:18:08] qejk: has joined #RubyOnRails
[13:18:12] Wrathraiser: has joined #RubyOnRails
[13:18:26] dudedudeman: has joined #RubyOnRails
[13:18:45] georgedrummond: has joined #RubyOnRails
[13:18:59] Bil1: has joined #RubyOnRails
[13:19:15] umdstu: ArTiSTiX: os x 10.10
[13:19:22] umdstu: universa1: tried many times :(
[13:19:36] universa1: umdstu: how did you install ruby?
[13:19:37] umdstu: using RVM, tried multiple ruby version, multiple openssl versions/paths
[13:19:47] shortCircuit__: why why why http://hastebin.com/tirunanelu.md
[13:19:51] universa1: umdstu: homebrew?
[13:19:57] umdstu: tried specifying in $HOME/.rvm/usr, tried /usr
[13:19:59] acti0nman: has joined #RubyOnRails
[13:20:11] Wrathraiser: Hi, I've been using Ruby on Rails for two months now and I'd need a little help to fully understand forms, can anyone help me please ?
[13:20:12] umdstu: no access to brew
[13:20:34] ddv: Wrathraiser: also new to irc? don't ask to ask
[13:20:35] Bil1: has joined #RubyOnRails
[13:21:01] universa1: umdstu: homebrew is helpful for installing the dependencies, rvm can use it to automate that.
[13:21:15] umdstu: rvm pkg install openssl fails because it crashes on the docs (it requires `make install_sw`). so I installed from source. pointing RVM to use openssl from either location compiles fine. but when starting ruby it says it can't find openssl every time
[13:21:24] umdstu: universa1: i know, i just dont have access to it
[13:21:25] Wrathraiser: Yes completely new, thanks for the advice
[13:21:29] umdstu: internal version of rvm
[13:21:33] umdstu: no internal version of brew
[13:21:54] universa1: shortCircuit__: what are you trying to tell us?!
[13:22:25] speaking1ode: has joined #RubyOnRails
[13:24:06] michael_mbp: has joined #RubyOnRails
[13:25:01] shortCircuit__: its a multipart form , I was going to do fileupload, but simple json data dosen't work. I always have this error
[13:25:31] shortCircuit__: its angular on front end and rails on the backend
[13:25:50] ArTiSTiX: shortCircuit__: aren't you sending JSON with a content-type multipart form ?
[13:26:26] universa1: shortCircuit__: how are you creating the request?
[13:27:34] shortCircuit__: I do a new FormData(). and then formData.append("profile", angular.toJson(data.profile)). and then I send the request. I will gist the code.
[13:27:36] michael_mbp: has joined #RubyOnRails
[13:27:38] Bil1: OK, i've been rolling this around for a while and I could use guidance. I have two types of people in my project, students and staffmembers. They share usual fields like e-mail first, last etc so I though I would create a people model and have students and staffmembers inherit the model. Am I doing this right? Do the models need other relations?
[13:28:28] universa1: Bil1: theoritically can a student also be a staff member?
[13:28:44] sinkensabe: has joined #RubyOnRails
[13:28:45] dudedudeman: has joined #RubyOnRails
[13:29:00] Bil1: universa1 Not for this application. They could be a former student though that is now a staff member.
[13:29:30] arup_r: has joined #RubyOnRails
[13:29:42] Depili: sounds like a good case for single table inheritance, or STI
[13:29:42] chagel: has joined #RubyOnRails
[13:30:18] sinkensabe: has joined #RubyOnRails
[13:30:22] Bil1: Depili that is what I was thinking too but I read that you should generally use STI for cases where there are very few difference in fields and you just need different rolls... perhaps that was mistaken?
[13:30:41] Bil1: In PHP I did inheritence (STI) and I think it worked ok
[13:31:12] Depili: Bil1: yeah, the less difference in the fields between the objects the better
[13:31:14] sinkensa_: has joined #RubyOnRails
[13:31:17] Wrathraiser: I have a form in an edit view which method is put but when I submit it it sends a post request (even though it goes to the update action), is it normal ?
[13:31:24] harshamv: Any one knows of Rails opening. Looking for some freelance work!
[13:31:33] Depili: you can also declare the "people" model as abstract and then have students and staff live in different tables
[13:31:45] Bil1: Well, staff has things like staff number... students have things like student number, lunch number, grade, graduation year
[13:31:54] universa1: hmm, i'd probably have a basic user class, which has belongs_to associations to student and staff.
[13:32:35] shortCircuit__: https://gist.github.com/argentum47/2050e88108d02f5439a9
[13:33:01] bronson: has joined #RubyOnRails
[13:33:13] Bil1: universa1 I am sorry; that confused me. Wouldn't it be a person class has_one student or has_one staff?
[13:33:19] shortCircuit__: oh, I also change the Content-Type to false, when I am trying to do the file upload.
[13:33:37] shortCircuit__: along with json data. and it doesn't send any request at all.
[13:33:44] telmich: trying to do the file upload.
[13:33:44] telmich: 15:33 < shortCircuit__ trying to do the file upload.
[13:33:44] telmich: 15:33 < shortCircuit__ trying to do the file upload.
[13:33:44] telmich: 15:33 < shortCircuit__ trying to do the file upload.
[13:33:44] telmich: 15:33 < shortCircuit__ trying to do the file upload.
[13:34:06] vanne: has joined #RubyOnRails
[13:34:14] annlewis: has joined #RubyOnRails
[13:35:04] shortCircuit__: oh, no wait there is a file upload. \o/. let me change the "content-type"
[13:35:05] universa1: Bil1: well: person/user -> staff; and person/user -> student
[13:35:06] michael_mbp: has joined #RubyOnRails
[13:36:41] sankaber: has joined #RubyOnRails
[13:36:56] startupality: has joined #RubyOnRails
[13:37:00] vanne: has joined #RubyOnRails
[13:37:37] shortCircuit__: yes, succeded, there is error. with "Content-Type": false. Completed 400 Bad Request in 190ms.; ActionController::ParameterMissing (param is missing or the value is empty: profile):
[13:37:48] sarink: has joined #RubyOnRails
[13:38:06] universa1: shortCircuit__: sounds like you have strong params looking for something which is not there.
[13:38:07] michael_mbp: has joined #RubyOnRails
[13:38:41] Bil1: universa1 I googled the belongs_to relation... Maybe you are on to something here. If the Person (I don't say user because a user can log in; a person is just a record of information in the system)... if a person belongs to both a student and a staffmember... would it be unhappy if I only tried to build a person with a student and no staffmember record?
[13:39:02] universa1: Bil1: !associations
[13:39:02] helpa: Bil1: http://guides.rubyonrails.org/association_basics.html - Active Record Association Basics by Mike Gunderloy
[13:39:24] Bil1: @helpa ty, that is the page I am on lol
[13:40:41] shortCircuit__: hmm.. ok, I will check by replacing data.profile, with profile.
[13:42:31] Bil1: universa1 so... if I setup belongs to references in this manner... I would be able to create complex forms where selecting a field (e.g. student or staff) would provide the form for either a student entry or a staffmember entry per http://railscasts.com/episodes/73-complex-forms-part-1
[13:42:40] baweaver: has joined #RubyOnRails
[13:42:42] Bil1: universa1 or would I have a problem doing it this way.
[13:43:58] Bil1: universa1 with the obvious change that I wouldn't ask for 3 student entries for 1 person :-P
[13:44:04] seuros: has joined #RubyOnRails
[13:44:12] dstarh: has joined #RubyOnRails
[13:44:17] umgrosscol: has joined #RubyOnRails
[13:44:58] universa1: Bil1: http://railscasts.com/episodes/196-nested-model-form-revised?view=comments
[13:45:28] kp666: has joined #RubyOnRails
[13:45:43] dstarh: is it possible to stop the schema generation after migrations run in a particular environment?
[13:45:52] universa1: dstarh: why?
[13:46:01] Bil1: universa1 Sorry, I don't have a subscription and cannot watch that one :-(
[13:46:15] universa1: Bil1: it's a onetime payment of 9$ ;)
[13:46:25] universa1: though it's getting older, some stuff is still really good.
[13:46:40] rushed: has joined #RubyOnRails
[13:46:47] shortCircuit__: I tried to do p "----"; p params in the profiles_controller#create. there is nothing
[13:46:49] dudedudeman: has joined #RubyOnRails
[13:47:06] dstarh: universa1 our prod user doesn't own some of the tables it's trying to dump so it gives errors and we really don't need it in prod
[13:47:20] dstarh: so we'd just like to skip it
[13:48:07] livathinos: has joined #RubyOnRails
[13:48:26] universa1: shortCircuit__: logs/development.log
[13:48:32] porkqpain: has joined #RubyOnRails
[13:48:42] universa1: shortCircuit__: and also browser -> inspect/whatever -> network tab
[13:48:46] Hates_: has joined #RubyOnRails
[13:49:21] BaNzounet: has joined #RubyOnRails
[13:50:17] universa1: dstarh: https://github.com/rails/rails/blob/4-2-stable/activerecord/lib/active_record/railties/databases.rake#L45
[13:51:03] Bil1: universa1 I found the detailed notes on their site. Much better! Thanks for that. So... imagine I'm making a table that contains both students and staffmembers together. How would I query the Person model to get the info I need?
[13:51:22] startupality: has joined #RubyOnRails
[13:51:29] universa1: Bil1: i'm sorry, i don't understand your question
[13:51:51] maxshelley: has joined #RubyOnRails
[13:51:57] User458764: has joined #RubyOnRails
[13:52:42] mary5030: has joined #RubyOnRails
[13:52:55] ismaelga: has joined #RubyOnRails
[13:52:59] universa1: dstarh: so it looks like you simply can set that to false, and it shouldn't dump the schema anymore.
[13:53:14] darrencauthon: has joined #RubyOnRails
[13:53:36] dstarh: universa1 Thanks!
[13:53:58] Bil1: universa1 If I wanted to show a list of all the people in my system.... I would do something like People.all and then list them out. How would I show the grade of the person (null if a staffmember) in the table?
[13:54:23] darrenca_: has joined #RubyOnRails
[13:55:04] pawelec: has joined #RubyOnRails
[13:55:15] universa1: Bil1: Person.include(:student, :staff).all.each |p|; p.student.try(:grade)
[13:55:37] michael_mbp: has joined #RubyOnRails
[13:56:27] RegulationD: has joined #RubyOnRails
[13:58:12] Bil1: universa1 Wonderful! You have been so helpful. I am very new to rails but I know databasing and php... seeing syntax like that is amazing for me. I'm sure i'll be back later. I'm going to try to build this part this week. I'm assuming student, staffmember, and person are all resources right?
[13:58:36] michael_mbp: has joined #RubyOnRails
[13:58:41] universa1: Bil1: can be, did you already do the getting started tutorial ?
[13:59:07] omerraja: has joined #RubyOnRails
[13:59:31] vanne: has joined #RubyOnRails
[13:59:42] Bil1: universa1 yes. I have the blog project created and I gave myself a challeng to allow the user to modify a settings resource that adjusted the validation of the article entry. Got it working thanks to help from here and a lot of googling. So this part is the start of my real project.
[14:00:23] dhosterman: has joined #RubyOnRails
[14:00:31] Bil1: universa1 Got to get to work; Thanks again!
[14:00:52] Bil1: has left #RubyOnRails: ()
[14:01:36] pawelec: Hello, do you know how to make join in arel using ActiveRecord's reflection?
[14:02:21] thiagovsk: has joined #RubyOnRails
[14:02:38] sevenseacat: has joined #RubyOnRails
[14:02:40] universa1: pawelec: what?
[14:02:49] universa1: *what are you trying to do?
[14:03:00] surrealanalysis: has joined #RubyOnRails
[14:03:06] Ropeney: has joined #RubyOnRails
[14:03:35] tianyi: has joined #RubyOnRails
[14:04:47] ndrei: has joined #RubyOnRails
[14:04:52] pawelec: universa1: I want to construct joins based on model association but outer, not inner
[14:05:30] superflat: has joined #RubyOnRails
[14:05:31] highcup: has joined #RubyOnRails
[14:05:56] HenriettaSalt: has joined #RubyOnRails
[14:05:56] universa1: pawelec: http://guides.rubyonrails.org/active_record_querying.html#joining-tables
[14:06:06] michael_mbp: has joined #RubyOnRails
[14:06:29] universa1: pawelec: see also 13.2
[14:08:08] spyderman4g63: has joined #RubyOnRails
[14:08:49] krz: has joined #RubyOnRails
[14:09:31] n008f4g_: has joined #RubyOnRails
[14:10:20] seuros: has joined #RubyOnRails
[14:10:33] yfeldblum: has joined #RubyOnRails
[14:11:05] mrbubbles: has joined #RubyOnRails
[14:12:22] ericchernuka: has joined #RubyOnRails
[14:12:59] m0r0n: has joined #RubyOnRails
[14:13:42] alex88: has joined #RubyOnRails
[14:14:00] pawelec: universa1: sure, but since I'm working on "user defined reports" where user can add associations of model to report, I must be able to generate joins using model reflection. I tried to use "joins" method but it generates Inner joins
[14:14:26] mrbubbles: it turns out I had to set the tld_length parameter
[14:15:33] universa1: pawelec: how will joins("OUTER JOIN ... ON ...") generate a inner join ?#
[14:15:35] universa1: pawelec: http://stackoverflow.com/questions/15029652/arel-left-outer-join-using-symbols
[14:15:55] zorak8: has joined #RubyOnRails
[14:16:13] maz-dev: has joined #RubyOnRails
[14:16:46] futilegames: has joined #RubyOnRails
[14:18:56] pawelec: universa1: I can't use sql string because the input varaiables are model and relation name - I don't know the ON condition
[14:19:10] universa1: pawelec: then find them out?!
[14:21:11] dru`: has joined #RubyOnRails
[14:21:36] michael_mbp: has joined #RubyOnRails
[14:22:56] Joshmfrankel: has joined #RubyOnRails
[14:23:00] pawelec: universa1: Sure I can write a code which calculates ON clause from model reflections. I was only wondering if there maybe is something already done which takes reflection and returns prepared join
[14:23:26] karimb: has joined #RubyOnRails
[14:24:11] pawelec: universa1: And there must be something bcause ActivRecord constructs the join in method "joins()"
[14:29:48] omerraja: has joined #RubyOnRails
[14:29:50] gaboesquivel: has joined #RubyOnRails
[14:30:46] gambl0re: has joined #RubyOnRails
[14:32:37] michael_mbp: has joined #RubyOnRails
[14:34:04] bruno-: has joined #RubyOnRails
[14:34:56] mello: has joined #RubyOnRails
[14:35:34] joaomdmoura: has joined #RubyOnRails
[14:37:32] commondream: has joined #RubyOnRails
[14:37:50] vanne: has joined #RubyOnRails
[14:38:08] maz-dev: has joined #RubyOnRails
[14:40:29] Pumukel: has joined #RubyOnRails
[14:45:06] tubbo`: has joined #RubyOnRails
[14:45:09] paulcsmith: has joined #RubyOnRails
[14:47:24] bratsche: has joined #RubyOnRails
[14:47:59] Scripore: has joined #RubyOnRails
[14:48:33] tubbo: this isn't a shell!
[14:48:37] Doddlin: anyone who knows if I could use a user_id instead of name as identification for recipients in Mailboxer? https://github.com/mailboxer/mailboxer
[14:50:07] Doddlin: I get ???NoMethodError (undefined method `primary_key' for String:Class): ???-error when using an userid??? :S
[14:50:42] sonofdirt: has joined #RubyOnRails
[14:50:47] shinnya: has joined #RubyOnRails
[14:51:07] jenrzzz: has joined #RubyOnRails
[14:56:13] zubnola: has joined #RubyOnRails
[14:56:59] MrMaynes: has joined #RubyOnRails
[14:57:41] leafac: has joined #RubyOnRails
[14:58:15] gaussblurinc1: has joined #RubyOnRails
[14:58:20] zubnola: I'm working with a legacy application that stored date times as flat strings ('YYYYMMDDHHMMSS'). What's the most conventional way to migrate these columns to actual datetimes?
[14:58:43] seuros: has joined #RubyOnRails
[14:59:19] tubbo: zubnola: Ruby's Date class supports strptime() -> http://ruby-doc.org/stdlib-2.1.1/libdoc/date/rdoc/Date.html#method-c-strptime
[14:59:20] gaussblurinc1: hi! how to destroy big amount of rows from table? drop nearly 75% of table with rows count nearly 60M
[14:59:39] tubbo: if you were a php developer, you might remember the syntax. or if you ever worked in the unix shell, since (i believe) that's where it originates.
[14:59:48] tubbo: gaussblurinc1: DROP TABLE.
[14:59:54] slash_nick: Any of you deal with taking screenshots using poltergeist? I'm noticing none of the content is styled in the screenshots...
[15:00:03] tubbo: gaussblurinc1: SQL queries don't change based on the amount of data you have.
[15:00:26] disgrntld: has joined #RubyOnRails
[15:00:36] tubbo: slash_nick: that does not happen with me when i save_and_open_screenshot. have you tried save_and_open_page and inspected the Network tab?
[15:00:43] tubbo: make sure your CSS files are being read and stuff?
[15:00:53] gaussblurinc1: tubbo: so, only sql queries would be ok? oh, bye-bye AR :/
[15:01:03] tubbo: gaussblurinc1: no...you are missing the point
[15:01:07] slash_nick: tubbo: i'll try that... i've just navigated to the test server and verified it looked kosher
[15:01:10] tbuehlmann: gaussblurinc1, deleting rows is also possible with AR
[15:01:17] tubbo: gaussblurinc1: AR is just a glorified generator for SQL queries, so you're still OK :)
[15:01:46] tubbo: gaussblurinc1: if you want to do it in Rails check out delete_all and destroy_all.
[15:02:05] paulcsmith: has joined #RubyOnRails
[15:02:12] gaussblurinc1: tubbo: I know that it is possible, but destroy_all fall down on nearly 1M of rows
[15:02:16] mehdi1: has joined #RubyOnRails
[15:02:24] tubbo: Post.delete_all will just make a big DELETE FROM query, while Post.destroy_all actually runs through all the *_destroy callbacks in your model (as if you had done Post.find(1).destroy)
[15:02:34] tubbo: gaussblurinc1: you probably want delete_all but remember it doesn't do any callbacks or validations.
[15:02:34] zubnola: tubbo: Thank you. I'm aware of the strptime method. I'm less aware of how to apply that in an actual migration that include changing the column type and also modifying all of the rows to convert to the datetime object
[15:03:05] gaussblurinc1: tubbo: so, safety vs speed, uh
[15:03:21] slash_nick: tubbo: save_and_open_page looks even worse :/
[15:03:23] tubbo: gaussblurinc1: think about it as if YOU are the database.
[15:03:45] tubbo: isn't it easier to just take a broom and push a bunch of dirt off the floor than it is to individually pick out each piece of dirt, inspect it and make sure it's not money, then toss it?
[15:04:08] HenriettaSalt: has joined #RubyOnRails
[15:04:18] slash_nick: tubbo: and inside the network tab the problem is revealed... thanks man
[15:04:32] Joshmfrankel: has joined #RubyOnRails
[15:04:57] artto: has joined #RubyOnRails
[15:05:18] gaussblurinc1: tubbo: as a database I would say: well, you try to take big amount of me?! really?! calm down, you will never do it, just calm down
[15:05:25] riotjones: has joined #RubyOnRails
[15:05:55] tbuehlmann: 60m isn't really that much :)
[15:06:51] gaussblurinc1: tbuehlmann: don't touch my 60M! don't touch them!
[15:07:51] pjammer: has joined #RubyOnRails
[15:08:19] shortCircuit__: has left #RubyOnRails: ()
[15:10:43] highcup: has joined #RubyOnRails
[15:11:49] cjlarose: has joined #RubyOnRails
[15:11:52] snockerton: has joined #RubyOnRails
[15:12:27] kinduff: has joined #RubyOnRails
[15:14:53] rubyonrailed: has joined #RubyOnRails
[15:15:27] artto: has joined #RubyOnRails
[15:16:16] kinduff_: has joined #RubyOnRails
[15:18:00] elia_: has joined #RubyOnRails
[15:18:38] kinduff: has joined #RubyOnRails
[15:18:40] maxshelley: has joined #RubyOnRails
[15:18:46] kinduff: good morning
[15:21:06] Cache_Money: has joined #RubyOnRails
[15:21:42] hotpancakes: has joined #RubyOnRails
[15:22:19] Peteykun: has joined #RubyOnRails
[15:22:19] commondream: has joined #RubyOnRails
[15:23:25] JarekTkaczyk: has joined #RubyOnRails
[15:23:41] voker57: has joined #RubyOnRails
[15:24:03] JarekTkaczyk: has left #RubyOnRails: ()
[15:26:31] commondream: has joined #RubyOnRails
[15:27:03] ndrei: has joined #RubyOnRails
[15:29:41] thebatu1: has joined #RubyOnRails
[15:30:35] Macaveli: has joined #RubyOnRails
[15:30:49] cac: has joined #RubyOnRails
[15:31:35] Joshmfrankel: has joined #RubyOnRails
[15:31:42] DoctorMonocular: has joined #RubyOnRails
[15:33:31] Scripore: has joined #RubyOnRails
[15:35:25] ismaelga: has joined #RubyOnRails
[15:35:33] HenriettaSalt: has joined #RubyOnRails
[15:35:52] ismaelga: has joined #RubyOnRails
[15:36:05] iamjarvo: has joined #RubyOnRails
[15:37:39] garyserj: has joined #RubyOnRails
[15:38:03] sardev: has joined #RubyOnRails
[15:40:44] Rubie: has joined #RubyOnRails
[15:42:30] mikecmpb_: has joined #RubyOnRails
[15:45:08] borodin: has joined #RubyOnRails
[15:45:21] user121212: has joined #RubyOnRails
[15:45:58] i: has joined #RubyOnRails
[15:46:18] baweaver: has joined #RubyOnRails
[15:46:56] Guest4634: has left #RubyOnRails: ()
[15:47:20] user121212: Hello, I'm following this tutorial. But when I send a post request, the response is html, not the json, How can I do that? http://blog.andrewray.me/how-to-set-up-devise-ajax-authentication-with-rails-4-0/
[15:47:22] dopie: has joined #RubyOnRails
[15:47:44] CheckYourSix: has joined #RubyOnRails
[15:49:21] joaomdmoura: has joined #RubyOnRails
[15:50:44] mello: has joined #RubyOnRails
[15:51:18] tbuehlmann: user121212, do you send the request to /users/sign_in.json or have an accept header set for json?
[15:51:29] Scripore: has joined #RubyOnRails
[15:51:59] user121212: tbuehlmann: oops, I missed that .json, thankss
[15:52:01] rubyonrailed: I'm updating some attributes from some params coming in simply like this: p.update_attributes(v). The problem is, I have some params that are already saved to the object and if they aren't passed in with params, they are set to nil. How can I update my attributes but not overwrite attributes that arent in my params?
[15:52:02] HenriettaSalt: has joined #RubyOnRails
[15:52:50] paulcsmith: has joined #RubyOnRails
[15:53:13] bluish: has joined #RubyOnRails
[15:53:26] tbuehlmann: rubyonrailed, they shouldn't be set at all if they were missing from the params
[15:53:32] HenriettaSalt: has joined #RubyOnRails
[15:53:32] tbuehlmann: do you have a minimal example for us?
[15:53:51] rubyonrailed: tbuehlmann Yeah, i'll give me a minute
[15:54:06] tbuehlmann: for you brad, I got five
[15:57:26] |RicharD|: guys I got: Couldn't find User with when I call User.find in a sidekiq worker
[15:57:32] |RicharD|: it's like sidekiq it's more fat
[15:57:38] |RicharD|: fast* than the write on db
[15:57:43] |RicharD|: how I can fix this ?
[15:57:55] |RicharD|: Right now I call the worker from a after_save
[15:58:01] tbuehlmann: |RicharD|, use after_commit
[15:58:10] tbuehlmann: but that's in sidekiq's FAQ/docs
[15:58:40] tbuehlmann: see https://github.com/mperham/sidekiq/wiki/Problems-and-Troubleshooting#user-content-cannot-find-modelname-with-id12345
[16:00:01] marr: has joined #RubyOnRails
[16:00:11] HenriettaSalt: has joined #RubyOnRails
[16:00:19] artto: has joined #RubyOnRails
[16:00:28] User458764: has joined #RubyOnRails
[16:00:33] rubyonrailed: tbuehlmann: NVM it's fixed. There was some method clearing out the attributes for some reason.
[16:00:41] tbuehlmann: rubyonrailed, great!
[16:00:55] hahuang65: has joined #RubyOnRails
[16:01:14] Lytol: has joined #RubyOnRails
[16:02:35] artto: has joined #RubyOnRails
[16:02:45] commondream: has joined #RubyOnRails
[16:05:03] sonofdirt: has joined #RubyOnRails
[16:06:03] commondream: has joined #RubyOnRails
[16:07:16] artto: has joined #RubyOnRails
[16:07:33] nixter1029: has joined #RubyOnRails
[16:08:16] nobitanobi: has joined #RubyOnRails
[16:09:35] towski_: has joined #RubyOnRails
[16:09:43] ianks: has joined #RubyOnRails
[16:10:12] synfinatic_: has left #RubyOnRails: ()
[16:10:37] ivanskie: has joined #RubyOnRails
[16:10:49] sardev: What's the correct way to update an object's attribute from outside form_for? This is where I'm currently at: https://gist.github.com/anonymous/8a9ef05691be2e2481b5
[16:10:50] asheinfeld: has joined #RubyOnRails
[16:11:04] Fire-Dragon-DoL: has joined #RubyOnRails
[16:11:06] MartinElvar: has joined #RubyOnRails
[16:12:03] tbuehlmann: sardev, why exactly do you use form_tag and not form_for? also, what does your controller code looks like?
[16:12:41] maz-dev: has joined #RubyOnRails
[16:13:31] sardev: tbuehlmann, I want to update an attribute value from an object's show view (show.html.erb). Controller code is the default from scaffolding and shouldn't really matter as long as it has the update action properly set, correct?
[16:14:18] cirn0: has joined #RubyOnRails
[16:14:48] baweaver: has joined #RubyOnRails
[16:15:03] edwinvdgraaf: has joined #RubyOnRails
[16:15:25] tbuehlmann: sardev, correct. but why form_tag instead of form_for?
[16:16:40] edektor: has joined #RubyOnRails
[16:16:41] doodlehaus: has joined #RubyOnRails
[16:17:09] edektor: With ActiveRecords Postgres adapter what is the difference between json and jsonb column types?
[16:17:20] sardev: tbuehlmann, Well I'm not entirely sure. Read somewhere that it wasn't the best for updating values from outside the edit page.
[16:17:42] tomaszbalon: has joined #RubyOnRails
[16:18:20] smathy: has joined #RubyOnRails
[16:18:25] tbuehlmann: edektor, jsonb stores a binary representation of the input, avoiding reparsing the saved json. and it supports indexing. here's some more info: http://nandovieira.com/using-postgresql-and-jsonb-with-ruby-on-rails
[16:18:39] tbuehlmann: sardev, that's wrong then. using form_for is perfectly valid in that situation
[16:18:58] sardev: tbuehlmann, Alright.
[16:19:01] edektor: tbuehlmann: so jsonb is way to go then
[16:19:03] sardev: tbuehlmann, I'll look into that then.
[16:19:09] bartdorsey: has joined #RubyOnRails
[16:19:49] tbuehlmann: edektor, depends on what you want to do. if you just want to save/retrieve some json, the json type is good enough
[16:20:07] noodman_: has joined #RubyOnRails
[16:20:28] edektor: tbuehlmann: got it. Thanks for the quick answers
[16:20:33] edwinvdg_: has joined #RubyOnRails
[16:21:12] givanse: has joined #RubyOnRails
[16:22:59] Drewch: has joined #RubyOnRails
[16:24:47] chrisja: has joined #RubyOnRails
[16:26:32] arisu_: has joined #RubyOnRails
[16:26:48] hotpancakes: has joined #RubyOnRails
[16:28:24] treehug88: has joined #RubyOnRails
[16:28:46] treehug88: Anyone here use the 'hairtrigger' gem? I had a question about it.
[16:29:43] treehug88: smathy: I came around to your view that using triggers was the 'best' way to handle the 'consistent timestamps in transactions' issue
[16:30:07] treehug88: hacking AR to do it was not pretty
[16:30:17] avril14th: has joined #RubyOnRails
[16:30:49] User458764: Hi, When I scaffold an entity with the generator scaffold it creates a scss and coffee file, but it seems in a specific view the scss and coffee related file are loaded but all others entites too. Is there a way to load for a specific entity only the related asset files?
[16:31:16] smathy: treehug88, yeah, I knew it wouldn't be pretty :)
[16:31:31] treehug88: it was strangely ugly! :)
[16:31:33] omerraja: has joined #RubyOnRails
[16:32:28] karimb: has joined #RubyOnRails
[16:32:28] DoctorMonocular: has joined #RubyOnRails
[16:32:30] smathy: treehug88, one of the first things I said to you was that you'd have to write a lot of AR.
[16:33:17] smathy: There are just a lot of assumptions around that code.
[16:33:32] smathy: treehug88, anyway, just ask your question about hairtrigger
[16:33:35] Scripore: has joined #RubyOnRails
[16:33:45] treehug88: will do smathy , one minute, prepping pastebin
[16:34:09] smathy: treehug88, use gist if you want me to look at it.
[16:35:13] toretore: has joined #RubyOnRails
[16:35:48] b0nn1e: has joined #RubyOnRails
[16:36:38] Spami: has joined #RubyOnRails
[16:36:45] kinduff: has joined #RubyOnRails
[16:37:03] asheinfeld: has joined #RubyOnRails
[16:38:15] GeorgesLeYeti: has joined #RubyOnRails
[16:38:43] Spami: has joined #RubyOnRails
[16:39:17] treehug88: smathy, others: https://gist.github.com/anonymous/ca84f6bb2e49731dcabe . Why is this generating warnings in db/schema.rb?
[16:39:51] smathy: treehug88, !gist-usage c'mon man!
[16:39:51] helpa: treehug88: How to use Gist properly: https://github.com/radar/guides/blob/master/using-gist.markdown
[16:40:36] GeorgesLeYeti: I have a problem with faraday. I'm trying to use the google speech api. In shell with curl the request works well but with faraday the post request never stop running
[16:40:37] treehug88: next time, thanks. Can you figure out the question though? :)
[16:40:47] jacor_m: has joined #RubyOnRails
[16:41:53] smathy: treehug88, why aren't you using the model declarations for the triggers?
[16:42:18] smathy: GeorgesLeYeti, !gist
[16:42:18] helpa: GeorgesLeYeti: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[16:42:25] GeorgesLeYeti: In google developers console I see that my request works.
[16:42:32] treehug88: felt more database-y than model-y. Didn't want to embed SQL in the model
[16:43:51] it_tard: has joined #RubyOnRails
[16:43:54] smathy: treehug88, why does the error talk about orders whereas your code is talking about organs?
[16:44:05] treehug88: oops, missed a search/replace
[16:44:26] treehug88: orders -> organs
[16:45:03] x44x45x41x4E: has joined #RubyOnRails
[16:45:06] Lightsword: has joined #RubyOnRails
[16:45:13] smathy: Copy paste your actual code, and the actual error, and tidy up the gist while you're at it. Then we can talk.
[16:45:40] treehug88: s/orders/organs/ that is the exact code
[16:45:48] x44x45x41x4E: has joined #RubyOnRails
[16:46:27] rhizome: yeah well gist doesn't do regexes.
[16:46:38] smathy: treehug88, make a new gist, copy-paste your actual code.
[16:46:46] treehug88: you guys are sticklers for BS
[16:46:53] GeorgesLeYeti: https://gist.github.com/anonymous/dfdbb3450f7aa42c38fe
[16:47:13] smathy: treehug88, actually, we're very experienced in the tiniest things triggering the most bizarre error scenarios.
[16:47:39] smathy: treehug88, also, very experienced in wasting hours only to find out that the problem was actually the one thing that someone changed when creating a gist.
[16:47:48] rhizome: oh THAT? that's just an error in the gist
[16:48:45] bronson: has joined #RubyOnRails
[16:52:40] treehug88: https://gist.github.com/anonymous/288b003f970443ffb475
[16:53:31] treehug88: please excuse typo in filename
[16:53:43] rhizome: it just doesn't stop with you does it
[16:54:19] tjbiddle: has joined #RubyOnRails
[16:54:44] renegadeandy: has joined #RubyOnRails
[16:54:53] roolo: has joined #RubyOnRails
[16:55:08] asheinfeld: has joined #RubyOnRails
[16:55:27] renegadeandy: hey everyone! How can i store a variable in the current user's session? I am struggling to find out. I thought I could just access it with session["myvar"] = 10 - but that is giving me an undefined variable 'session'
[16:56:31] aufi: has joined #RubyOnRails
[16:56:38] smathy: GeorgesLeYeti, nothing obviously wrong, when you say "the post request never stop running" - what do you mean exactly?
[16:57:06] paulcsmith: has joined #RubyOnRails
[16:57:55] edwinvdgraaf: has joined #RubyOnRails
[16:57:58] czerasz: has joined #RubyOnRails
[16:58:14] Joshmfrankel: has joined #RubyOnRails
[16:58:46] netzfisch: has joined #RubyOnRails
[16:58:53] GeorgesLeYeti: smathy, hard to explain. Just i don't have any return. like if the script was still running (in rails console)
[16:59:01] czerasz: has joined #RubyOnRails
[16:59:35] AntiSpamMeta: has joined #RubyOnRails
[17:00:07] user121212_: has joined #RubyOnRails
[17:00:14] treehug88: rhizome, smathy : making you a contrived, complete example
[17:00:15] dalybr: has joined #RubyOnRails
[17:01:03] treehug88: but really, that paste is pretty faithful
[17:01:11] sparr: has joined #RubyOnRails
[17:01:41] czerasz: has joined #RubyOnRails
[17:01:56] siemprefresco: has joined #RubyOnRails
[17:02:15] HenriettaSalt: has joined #RubyOnRails
[17:04:39] alyosha: has joined #RubyOnRails
[17:05:02] czerasz: has joined #RubyOnRails
[17:05:03] spyderman4g63: has joined #RubyOnRails
[17:06:52] asheinfeld: has joined #RubyOnRails
[17:07:43] tenderlove: has joined #RubyOnRails
[17:07:45] asheinfeld: has joined #RubyOnRails
[17:10:43] HenriettaSalt: has joined #RubyOnRails
[17:11:13] srinidhi: has joined #RubyOnRails
[17:11:26] maz-dev: has joined #RubyOnRails
[17:11:41] anjen: has joined #RubyOnRails
[17:12:15] arup_r: has joined #RubyOnRails
[17:12:21] smathy: treehug88, in your schema.rb does it show a create_trigger statement for the insert triggers? (and an execute with SQL for the update triggers?)
[17:12:48] treehug88: I'lll paste the relevant parts of schema.db too
[17:13:02] smathy: GeorgesLeYeti, so your app just hangs on that line forever?
[17:13:18] smathy: treehug88, ok, or you could just answer that question in here.
[17:13:33] edwinvdg_: has joined #RubyOnRails
[17:13:45] codeurge: has joined #RubyOnRails
[17:14:04] smathy: GeorgesLeYeti, to get a better idea, can you just copy that code into your `rails console` and run it there. See if it never returns.
[17:14:20] smathy: GeorgesLeYeti, make sure you leave it for at least 5 minutes to be sure.
[17:15:08] GeorgesLeYeti: smathy, already did this
[17:15:15] treehug88: smathy: yes, and yes. I see this in schema.db: create_trigger("organs_after_insert__trigger", :compatibility => 1). on("organs"). after(:insert) do "update organs set localtimestamp=NOW() where id=NEW.id;" end
[17:15:26] smathy: ...and after 5 minutes it was just hanging there on that line without returning?
[17:15:46] treehug88: lemme confirm that inserts get the timestamp set
[17:16:05] smathy: treehug88, no need.
[17:16:24] shinnya: has joined #RubyOnRails
[17:16:52] sdwrage: has joined #RubyOnRails
[17:16:56] renegadeandy: hey everyone! How can i store a variable in the current user's session? I am struggling to find out. I thought I could just access it with session["myvar"] = 10 - but that is giving me an undefined variable 'session'
[17:17:27] smathy: treehug88, I think update triggers must just not be compatible with all DBs. Not sure why the warning is there like that.
[17:17:28] nixter1029: has joined #RubyOnRails
[17:17:44] smathy: renegadeandy, where are you trying to access it?
[17:18:17] treehug88: smathy: ok, i'll probably to finish the example so I can show the issue simply. thanks
[17:18:25] thebatu1: has joined #RubyOnRails
[17:19:01] alex88: has joined #RubyOnRails
[17:19:01] treehug88: confirmed, insert trigger works
[17:20:43] renegadeandy: smathy: a controller
[17:21:08] smathy: renegadeandy, ok, that's odd, make a gist please.
[17:21:23] smathy: renegadeandy, show the exact error you're getting too with the first few lines of stacktrace.
[17:23:24] startupality: has joined #RubyOnRails
[17:23:36] moretti: has joined #RubyOnRails
[17:24:46] GeorgesLeYeti: smathy, Yes. I try a Open3.popen3("curl -X POST...") this works
[17:26:07] DoctorMonocular: has joined #RubyOnRails
[17:26:21] renegadeandy: smathy: here we are mate : https://gist.github.com/anonymous/2e1bc348061628d1c40c
[17:26:33] Hates_: has joined #RubyOnRails
[17:26:55] djbkd: has joined #RubyOnRails
[17:27:50] smathy: GeorgesLeYeti, no idea, sorry.
[17:28:42] pjammer: has joined #RubyOnRails
[17:28:54] GeorgesLeYeti: smathy, no prob. Ty for your help. Just another question do you know any other gem like faraday ?
[17:29:31] smathy: renegadeandy, your comment says that it "ends up being nil when i check it later on" - but that's not true is it? The truth is that later on when you try to retrieve it you get the `undefined local variable or method `session'` error right?
[17:30:15] smathy: renegadeandy, and above I asked you where you were trying to access it, and you said a controller, but the truth is that you're trying to access it in: app/services/g_distance.rb:28:in `getLocation'
[17:30:24] smathy: renegadeandy, NOT a controller.
[17:30:28] maz-dev: has joined #RubyOnRails
[17:30:38] smathy: renegadeandy, therefore does NOT have a `session` method defined.
[17:31:34] iamjarvo: has joined #RubyOnRails
[17:31:35] renegadeandy: smathy: hmm let me take a closer look - sorry
[17:31:59] hmnhf_: has joined #RubyOnRails
[17:32:43] smathy: renegadeandy, not sure why your line numbers are lying to you (unless you didn't copy-paste properly), but the stack trace you show (https://gist.github.com/anonymous/2e1bc348061628d1c40c#file-stacktrace-L119-L120) is wrong. `getLocation` is NOT called from app/controllers/utilities_controller.rb:8:in `getUserLocation' - rather it's called on line 11
[17:33:05] diegobiavati: has joined #RubyOnRails
[17:33:17] diegobiavati_: has joined #RubyOnRails
[17:33:18] smathy: renegadeandy, my guess is that you added lines 7, 8 and 9 after that stacktrace was printed.
[17:33:29] renegadeandy: yeah i think that may be the case actually
[17:33:42] spyderman4g63: has joined #RubyOnRails
[17:33:48] justinedwards: has joined #RubyOnRails
[17:34:17] asheinfeld: has joined #RubyOnRails
[17:34:50] smathy: renegadeandy, so line 8 is actually the google.getLocation line. And yeah, your GDistance service object has no session method because it's not a controller.
[17:35:03] IFrank00: has joined #RubyOnRails
[17:35:08] justinedwards: has left #RubyOnRails: ()
[17:35:10] justinedwards: has joined #RubyOnRails
[17:36:11] koryteg: has joined #RubyOnRails
[17:36:19] DoctorMonocular: has joined #RubyOnRails
[17:36:29] iamjarvo_: has joined #RubyOnRails
[17:36:42] koryteg: anyone have any experience working with rack-cors?
[17:37:14] iamjarvo_: has joined #RubyOnRails
[17:37:42] koryteg: I added it to my app and now all my ajax calls want to respond to the html format instead of json
[17:37:43] justinedwards: i'm having some trouble with ujs on rails 3.2.17 - even though it's required in my app.js it does not seem to be running on my forms
[17:37:46] synfinatic: has joined #RubyOnRails
[17:38:45] IFrank00: Hi I got a rails app with many Companies and each company has many employees. Each employee has a emp_id. I need the emp_id to be unique for each employee. The problem that I have is If Comp A has employee emp_id: 001 Comp B can't have employee with emp_id: 001. what is a good workaround this problem
[17:39:33] mello: has joined #RubyOnRails
[17:39:38] cnk: has joined #RubyOnRails
[17:41:27] renegadeandy: smathy: yep, i forgot i changed all of this after the stacktrace was caught haha , thank you
[17:42:02] IFrank00: I was think of creating another column (":search_id" = company_id + emp_id) and using it as unique and keeping the emp_id without the unique value.
[17:42:38] IFrank00: is there a better way of doing this ??
[17:43:42] d5sx43: has joined #RubyOnRails
[17:44:06] smathy: renegadeandy, you're welcome. So, if you want to access the session in your service object then you'll need to pass it or the value in, perhaps in the constructor.
[17:44:11] Doddlin: has joined #RubyOnRails
[17:44:44] commondream: has joined #RubyOnRails
[17:45:45] cirn0: has joined #RubyOnRails
[17:45:47] smathy: IFrank00, you're just using the uniqueness validation to ensure this?
[17:46:41] igrowbeards: IFrank00: i think a scoped uniq validation is what you need
[17:46:47] smathy: IFrank00, so as per the docs (http://devdocs.io/rails/activerecord/validations/classmethods#method-i-validates_uniqueness_of) you can specify a scope.
[17:46:49] igrowbeards: http://stackoverflow.com/questions/3276110/rails-3-validation-on-uniqueness-on-multiple-attributes
[17:47:37] tenderlove: has joined #RubyOnRails
[17:47:41] hotpancakes: has joined #RubyOnRails
[17:48:35] kinduff: has joined #RubyOnRails
[17:48:39] vanne: has joined #RubyOnRails
[17:48:43] user121212: has joined #RubyOnRails
[17:51:05] surrealanalysis: has joined #RubyOnRails
[17:51:50] IFrank00: smithy, how do you search for stuff like that
[17:52:08] mikecmpbll: has joined #RubyOnRails
[17:52:24] IFrank00: I was looking for something like that for weeks :/
[17:53:27] smathy: IFrank00, you mean specifically the `validates_uniqueness_of` docs as opposed to the main `validates` docs?
[17:53:36] Maletor: has joined #RubyOnRails
[17:53:52] igrowbeards: has left #RubyOnRails: ()
[17:53:54] igrowbeards: has joined #RubyOnRails
[17:55:08] hahuang65: has joined #RubyOnRails
[17:55:14] Vendella: has joined #RubyOnRails
[17:55:24] igrowbeards: has left #RubyOnRails: ()
[17:55:54] smathy: IFrank00, yeah, in this particular case - that's just historical context. In some prior version of Rails you had to use those validators, there was no `uniqueness: true` options for `validates`, and unfortunately the docs under `validates` don't point to the underlying docs for each of the options.
[17:56:12] igrowbeards: has joined #RubyOnRails
[17:56:28] bronson: has joined #RubyOnRails
[17:56:57] jenrzzz: has joined #RubyOnRails
[17:56:59] IFrank00: smathy, https://gist.github.com/Frank004/9d40872205f2447b825b
[17:57:07] smathy: IFrank00, it is unfortunately one of those "you just gotta know" things, although I would say that if you had gone to the API docs and typed in `validates` then you may have noticed the `validates_*_of` methods listed in the autocomplete drop-down and you may have thought to look at one of them.
[17:57:12] kinduff_: has joined #RubyOnRails
[17:57:31] hahuang65: has joined #RubyOnRails
[17:57:45] kinduff_: has joined #RubyOnRails
[17:57:54] renechz: has joined #RubyOnRails
[17:57:57] IFrank00: this will scope each employee by company ???
[17:58:02] smathy: IFrank00, also, FYI, to use the options in the `validates :foo, uniqueness: true` style calling, just replace `true` with the options hash (also undocumented AFAIK), ie. validates :emp_id, uniqueness: { scope: :company_id }`
[17:58:53] smathy: IFrank00, you're welcome.
[17:58:56] chadwtaylor: has joined #RubyOnRails
[17:59:58] kinduff_: has joined #RubyOnRails
[17:59:58] IFrank00: the you just gotta know thing gets me every time
[18:00:58] smathy: IFrank00, yeah, it's an unfortunate (and avoidable) byproduct of the speed of Rails development. Rails used to be a lot easier to get up and running with.
[18:01:19] mello: has joined #RubyOnRails
[18:01:39] doodlehaus: has joined #RubyOnRails
[18:02:25] kinduff: has joined #RubyOnRails
[18:02:40] IFrank00: smathy, im trying to stick to convention. but some times I dont know what rails is doing. :/
[18:03:06] smathy: IFrank00, you're not alone, there are a number of gotchas that are not mentioned in any official docs.
[18:03:16] platzhirsch: has joined #RubyOnRails
[18:03:31] platzhirsch: I am getting "*** RuntimeError Exception: Declare either attr_protected or attr_accessible for Event, but not both." although there is no attr_protected defined in my AR class
[18:03:45] Moonlight-Angel: has joined #RubyOnRails
[18:03:56] igrowbeards: When i inspect the dom i see that my hidden inputs (utf8, _method, and auth token) are all value-less
[18:03:58] smathy: IFrank00, and the docs team are not as welcoming as I expected them to be in adding gotchas to the docs.
[18:04:25] smathy: igrowbeards, oh, you're justinedwards?
[18:04:38] igrowbeards: i am - sorry i changed nicks
[18:04:48] igrowbeards: should have mentioned that :P
[18:04:54] smathy: igrowbeards, np, a lot of us have NICK changes hidden :)
[18:05:22] igrowbeards: so in my chrome console $.rails is defined
[18:05:35] igrowbeards: but it does not seem to be actually doing anything
[18:05:54] igrowbeards: no errors either :-/
[18:06:30] smathy: igrowbeards, the _method setting isn't done by UJS
[18:06:52] tubbo: has joined #RubyOnRails
[18:07:00] smathy: igrowbeards, nor is the setting of csrf-token
[18:07:08] smathy: nor authenticity_token
[18:07:19] smathy: Heh, nor utf8
[18:07:27] smathy: igrowbeards, sorry, I was reading one by one :)
[18:07:33] smathy: igrowbeards, all that's done on the server.
[18:07:37] igrowbeards: no worries - i appreciate the feedback
[18:07:56] igrowbeards: so maybe just invalid form_for or something?
[18:08:44] DLSteve: has joined #RubyOnRails
[18:09:16] hmnhf_: has joined #RubyOnRails
[18:09:16] igrowbeards: my prob is that i am trying to put and it is sending as post (whether by ajax or not)
[18:09:45] treehug88: smathy, rhizome : this should exhibit the issue clearly: https://github.com/rubyrailhead/hairtriggertest
[18:09:48] igrowbeards: but i'm not sure why it's not just working out of the box like i am user to
[18:10:20] smathy: igrowbeards, I could imagine the _method not there if you messed up the form_for, but for utf8 and authenticity_token to be missing, that's something very weird.
[18:10:35] TheNet: has joined #RubyOnRails
[18:10:54] smathy: igrowbeards, are you using something non-standard for your forms? Your own custom form builder, or some other gem for helping with forms?
[18:11:01] chinmay_dd: has joined #RubyOnRails
[18:11:07] IFrank00: smathy, Another question im using cancan and devise. I got 2 company A and B if im login in A on im show.html.erb http://localhost:3000/service_companies/1 I can change to http://localhost:3000/service_companies/2 and see the other company info how can I block that from happening
[18:11:33] igrowbeards: smathy: nope - plain rails
[18:12:13] smathy: treehug88, at the very least upgrade to 4.1.10 - but I'm sure it does, as I explained the UPDATE trigger must be something that's not applicable to all DB engines, hence the warning.
[18:12:29] kinduff: IFrank00: you'll need to modify the UsersController coming from devise in order to block the access per user, making a verification like @user=current_user and showing the info. Also mod the routes to hide the IDs.
[18:12:31] smathy: igrowbeards, which version of Rails?
[18:13:25] IFrank00: smathy, do you have and doc on mod the routes as is something i like to do
[18:13:33] smathy: igrowbeards, ok, not sure that even had those fields added.
[18:14:19] igrowbeards: it does - they are there, they are just valueless
[18:14:26] igrowbeards: and i am not adding them manually or anything
[18:15:01] treehug88: smathy: upgrade which part to 4.1.10?
[18:15:51] smathy: igrowbeards, at least update to 3.2.21, I know that has them.
[18:15:58] smathy: igrowbeards, oh, ok.
[18:16:27] Trefex: has joined #RubyOnRails
[18:17:23] IFrank00: smathy, im using friendly_id gem at the moment but they can still add numbers
[18:17:35] igrowbeards: so if i just manually change the val of method to 'PUT' in the dom inspector everything works fine
[18:17:47] gaussblurinc1: has joined #RubyOnRails
[18:17:49] igrowbeards: i have no idea what is going on haha :P
[18:18:52] smathy: IFrank00, as kinduff mentioned, you need to use `current_user` to get your other objects, so you're not just doing Company.find(params[:id]) but instead you're doing: current_user.companies.find(params[:id])
[18:19:22] smathy: IFrank00, everything that should be restricted to just that user needs to use the user to scope the finds you're doing in any controller.
[18:19:46] User458764: has joined #RubyOnRails
[18:19:58] smathy: igrowbeards, but if you use `curl` on the command line to get the form, you see empty values in the HTML?
[18:20:13] igrowbeards: smart - let me try that
[18:20:20] chouhoulis: has joined #RubyOnRails
[18:20:31] treehug88: smathy: so was that comment about upgrading to 4.1.10 to me or igrowbeards
[18:21:05] treehug88: back in a moment
[18:21:27] krz: anyone else having issues with github?
[18:21:58] smathy: treehug88, to you, you're on 4.1.8 - should be on 4.1.10, but that won't fix your issue - the issue is because the hairtrigger author has concluded that he can't use his helpers for the update triggers because different DBs do things differently.
[18:22:07] IFrank00: smathy, got it working
[18:22:17] smathy: IFrank00, cool.
[18:22:58] igrowbeards: smathy: i think it's some js that got added - not sure why it's breaking it but if i comment it out things seem to go back to normal
[18:23:16] smathy: igrowbeards, and curl showed the right fields?
[18:23:16] igrowbeards: smathy: thanks a ton for the help
[18:23:20] smathy: igrowbeards, you're welcome.
[18:23:20] crystalneth: has joined #RubyOnRails
[18:23:40] igrowbeards: smathy: couldn't curl because of authentication
[18:23:44] doublemalt_: has joined #RubyOnRails
[18:24:51] platzhirsch: has joined #RubyOnRails
[18:24:52] sinkensabe: has joined #RubyOnRails
[18:25:16] cornerma1: has joined #RubyOnRails
[18:25:23] hmnhf__: has joined #RubyOnRails
[18:25:48] RegulationD: has joined #RubyOnRails
[18:26:14] platzhirsch: has left #RubyOnRails: ()
[18:31:22] nobitanobi: has joined #RubyOnRails
[18:31:32] renegadeandy: has joined #RubyOnRails
[18:31:51] chouhoulis: has joined #RubyOnRails
[18:31:52] renegadeandy: smathy: - as an extension to my earlier question about the session variable....this is my latest problemo : https://gist.github.com/renegadeandy/e065de4e11e75e37c3e5
[18:31:57] treehug88: has joined #RubyOnRails
[18:33:12] nobitanobi: has joined #RubyOnRails
[18:33:35] jenrzzz: has joined #RubyOnRails
[18:33:55] mclee: has joined #RubyOnRails
[18:34:11] TheNet: has joined #RubyOnRails
[18:34:50] _blizzy_: has joined #RubyOnRails
[18:35:13] andrew9184: has joined #RubyOnRails
[18:35:44] _blizzy_: could anyone help me figure out why I'm getting Postgresql Errors when I run rake db:migrate, even though none of my databases use psql?
[18:35:45] _blizzy_: https://gist.github.com/NotBlizzard/1f5bb2289d988768b586
[18:36:02] _blizzy_: yes, the gem is defined in my gemfile
[18:37:22] treehug88: is it in config/database.yml, _blizzy_ ?
[18:37:48] _blizzy_: treehug88, yes, that file I posted is config/database.yml
[18:37:56] CheckYourSix: What errors are you getting?
[18:38:36] _blizzy_: it's not the errors in general, it's that when I run rake db:migrate, it's running it as if I'm in production
[18:38:39] _blizzy_: which I'm not
[18:38:51] nixter1029: has joined #RubyOnRails
[18:39:03] xploshioon: has joined #RubyOnRails
[18:39:39] xploshioon: hi guys, if I have something like this @auction = Auction.new(auction_params)
[18:39:48] xploshioon: where auction_params is a method
[18:40:10] alyosha: has left #RubyOnRails: ("Leaving...")
[18:40:25] xploshioon: that does a require and permit from params
[18:40:44] xploshioon: but i need to pass another params manually in the controller
[18:41:12] elaptics: xploshioon: to set other things for auction?
[18:41:15] xploshioon: @auction = Auction.new(auction_params, professiona_id:@professional.id)
[18:41:23] xploshioon: something like that
[18:41:34] xploshioon: yes, but before save
[18:41:35] elaptics: xploshioon: you're setting a relationship?
[18:41:53] elaptics: to something you already have in @professional
[18:42:21] elaptics: then all you need to do after the #new call is something like @auction.professional = @professional
[18:42:28] elaptics: then call save on @auction
[18:42:54] elaptics: xploshioon: or even better if you have your relations set up properly scope it through @professional
[18:43:21] elaptics: xploshioon: e.g. @auction = @professional.auctions.build(auction_params)
[18:43:32] elaptics: that will set the relation automatically
[18:43:38] elaptics: then you can just call save
[18:45:10] kinduff: has joined #RubyOnRails
[18:47:15] Cache_Money: I have a model (HourlyTrafficMetric) where every hour I add a row with clicks/spend for a couple different sources (assuming the cronjob doesn't fail!). I'm having trouble with my view in cases where there is no record for a given hour. How should I handle those errors? https://gist.github.com/anonymous/efa9f8d1b301ff6d3dc2
[18:48:11] Cache_Money: I'm also wondering if I should restructure my models so that it's easier to do day over day comparisons for a given hour..
[18:48:43] renegadeandy: Can anybody explain why a session variable set in one controller before accessing in the next is somehow now nil? https://gist.github.com/renegadeandy/e065de4e11e75e37c3e5
[18:49:22] rhizome: Cache_Money: can you elaborate on "having trouble," and "those errors?" pretend like we didn't write your code and don't have your eyes.
[18:50:23] Etriaph: has joined #RubyOnRails
[18:50:29] annlewis: has joined #RubyOnRails
[18:50:36] arBmind: has joined #RubyOnRails
[18:50:51] rhizome: renegadeandy: why are you using a string for the key name?
[18:51:11] elaptics: Cache_Money: why should your hourly traffic metric object know about the same hour yesterday - how would you implement that - would that have to go off to do a query for it for each of them?
[18:51:15] Cache_Money: rhizome: I added an `issues.md` that explains the error, but basically if there is no row in HourlyTrafficMetric for a given hour on the previous day then my view will break when attempting to create the table
[18:52:06] Cache_Money: elaptics: Yes, right now it queries for the day prior for a given hour. It's not a good solution but it works for now (assuming there are no missing hours the day before)
[18:52:06] rhizome: are you saying that @hours_today is empty?
[18:52:13] elaptics: Cache_Money: if you're showing this as a list of hours and data for today, tomorrow I'd just grab the data for the two day periods and then loop through the hours of the day showing the appropriate data - if you didn't select one then the view can show whatever you want
[18:52:57] Cache_Money: rhizome: No, it's when I iterate through @hours_today and then call `(hour.sameHourYesterday.total_clicks` where it's breaking -- due to the fact that the hour doesn't exist in the day prior
[18:52:59] elaptics: Cache_Money: e.g. loop through (0..23).each do |hour|
[18:53:16] xploshioon: elaptics, doing an update_attributes() works nice, i need to update 3 fields and that works, thanks @elaptics
[18:53:54] rhizome: Cache_Money: think: hour.total_clicks(hour_number)
[18:53:55] renegadeandy: rhizome: i thought the session was a hash?
[18:54:04] rhizome: just curious
[18:54:16] renegadeandy: rhizome: i just like strings in hashes!
[18:54:28] rhizome: try with symbol
[18:54:44] rhizome: your gist is pretty terrible tbh
[18:55:10] renegadeandy: so session[:location]
[18:55:11] Rubie: has joined #RubyOnRails
[18:55:43] momomomomo: has joined #RubyOnRails
[18:55:57] _blizzy_: can anyone help that why when I run 'rake db:migrate', it runs as if it is in production mode?
[18:56:02] _blizzy_: I want it to run as if it's in dev mode
[18:56:14] rhizome: what exactly does "utilities controller...firing the search controller" mean?
[18:56:32] rhizome: your gist has too little context to provide real help
[18:56:37] arBmind1: has joined #RubyOnRails
[18:56:51] bronson: has joined #RubyOnRails
[18:57:13] rhizome: _blizzy_: do we already know what you mean by "as if"?
[18:57:17] Cache_Money: elaptics: If I do (0..23).each do |hour| and still have @hours_today as an array. Should I change @hours_today to being a hash with the hour as the key?
[18:57:41] elia: has joined #RubyOnRails
[18:57:57] _blizzy_: rhizome, when I said 'as if', I mean it is migrating my production database, as if rake is running in production mode
[18:58:44] _blizzy_: when I want to run rake in development mode
[18:58:48] maxshelley: has joined #RubyOnRails
[18:59:00] zarubin: has joined #RubyOnRails
[18:59:29] rhizome: what is the context that you're running it?
[18:59:48] _blizzy_: you mean where I'm running 'rake db:migrate'?
[19:00:08] rhizome: yes. rails can have a lot of moving parts, you should describe them.
[19:00:17] Joshmfrankel: has joined #RubyOnRails
[19:00:22] _blizzy_: I'm running 'rake db:migrate' on a Windows 8.1 laptop.
[19:00:37] rhizome: so, locally
[19:01:03] rhizome: and rails s runs in dev mode?
[19:01:21] _blizzy_: however rake runs in production mode
[19:01:33] rhizome: what is RAILS_ENV?
[19:02:12] jenrzzz_: has joined #RubyOnRails
[19:02:19] _blizzy_: "development"
[19:02:52] rhizome: have you ever been able to migrate against development?
[19:03:01] rhizome: what changed?
[19:03:24] _blizzy_: another problem is is that
[19:03:33] jacor_m: has joined #RubyOnRails
[19:03:33] _blizzy_: when I run 'rails db', it connects to the production db
[19:03:36] _blizzy_: not the development one
[19:03:50] rhizome: and then you looked at database.yml and saw what
[19:04:03] rhizome: what did you see
[19:04:20] _blizzy_: I already posted my database.yml file, but ok
[19:04:30] IFrank00: smathy, https://gist.github.com/Frank004/801d176f72220ecf6455
[19:04:51] dopie: Ok I keep on getting this error its looking for the assets file and I check and the file is there...
[19:04:53] dopie: https://gist.github.com/staycreativedesign/7d66a5f0a9f5c92d8789
[19:04:55] _blizzy_: https://gist.github.com/NotBlizzard/2e76f45a0d9af330354f
[19:04:57] dopie: why would it be giving me this error?
[19:05:15] _blizzy_: I don't even have a production settings in my yml file
[19:05:23] _blizzy_: so IDK where the heck it's getting the info from
[19:05:51] rhizome: was there ever a production environment in there? did this change after you switched to default: style?
[19:06:01] chinmay_dd: has joined #RubyOnRails
[19:06:26] _blizzy_: rhizome, yes.
[19:06:35] stoffus: has joined #RubyOnRails
[19:06:46] rhizome: i asked two questions.
[19:07:03] _blizzy_: oh sorry. yes, and no
[19:07:17] thebatu1: has joined #RubyOnRails
[19:07:25] koryteg: has left #RubyOnRails: ()
[19:08:34] jkamenik1: has joined #RubyOnRails
[19:08:55] nettoweb: has joined #RubyOnRails
[19:09:12] moretti: has joined #RubyOnRails
[19:09:17] rhizome: so...did it change after the production section was removed?
[19:09:23] sandelius: has joined #RubyOnRails
[19:10:24] JimmyNeutron: has joined #RubyOnRails
[19:12:43] rhizome: maybe gist the error that you're getting
[19:13:57] _blizzy_: http://pastie.org/10212434
[19:14:09] sinkensabe: has joined #RubyOnRails
[19:14:13] _blizzy_: my rails_env is set to 'development'
[19:14:39] _blizzy_: it's getting that error because I already have a user table on my production db.
[19:15:29] rhizome: are you sure it doesn't exist in your dev db?
[19:16:10] _blizzy_: I've tried by changing the dev db name
[19:16:14] _blizzy_: to something random
[19:16:18] _blizzy_: I still get the same error.
[19:17:03] marr: has joined #RubyOnRails
[19:17:15] volk_: has joined #RubyOnRails
[19:17:30] volk_: hey guys im wondering if anyone here has a good method of opening a response from rpsec in a web browser
[19:17:39] volk_: capybara doesnt makes sense since its just an API
[19:17:53] volk_: i just want to open the response in a browser because theres an error and i want to see the formatted stack trace
[19:17:58] andrew9184: has joined #RubyOnRails
[19:18:12] volk_: and not the ugly HTML which i can barely read in my terminal windwo
[19:18:46] Coldblackice_: has joined #RubyOnRails
[19:20:35] delianides: has joined #RubyOnRails
[19:20:42] IFrank00: Im trying to fix this association I have a Company model a ServiceCompany and a ClientCompany. on the Company I have basic info(name,address.ect) a ServiceCompany Belongs to a Company and Company has_one ServiceCompany ?? and a ClientCompany Belongs to a Company and Company has_one ClientCompany ??
[19:20:47] crackedlcdscreen: has joined #RubyOnRails
[19:21:45] prereflect: has joined #RubyOnRails
[19:21:55] _blizzy_: I figured it out, rhizome
[19:22:14] _blizzy_: I just removed the production db environment variables from my machine
[19:22:41] Scripore: has joined #RubyOnRails
[19:23:23] paulcsmith: has joined #RubyOnRails
[19:23:49] jkamenik: has joined #RubyOnRails
[19:24:50] zubnola: has joined #RubyOnRails
[19:27:37] Manj-811-Xfce: has joined #RubyOnRails
[19:27:38] assembledbits: has joined #RubyOnRails
[19:28:02] jerematic: has joined #RubyOnRails
[19:28:15] Manj-811-Xfce: has left #RubyOnRails: ()
[19:28:16] danman: has joined #RubyOnRails
[19:28:32] gerep: has joined #RubyOnRails
[19:28:38] sdwrage: has joined #RubyOnRails
[19:29:23] erik_p: has joined #RubyOnRails
[19:32:22] tjbiddle_: has joined #RubyOnRails
[19:32:40] treehug88: gosh darn env vars
[19:32:49] maz-dev: has joined #RubyOnRails
[19:33:07] gerep: Hi all. I'm trying to use Devise scope for the first time. I'm testing with two models User and Admin (this is the code so far https://gist.github.com/gerep/571c5cf66fb7db74b8da) When I'm running the code for the first time I can switch between /users/sign_up and /admins/sign_up and create separated accounts but when I login via /admins/sign_in, it redirects me to /users/sign_in with a message: "You need to sign in or sign up before continuing." What am
[19:33:07] gerep: I doing wrong here?
[19:33:26] Papierkorb: I have a url which I want to post stuff to when I click a button. Do I have to build my own form for that, or can rails do that for me?
[19:34:59] sandelius: has joined #RubyOnRails
[19:35:07] olistik: has joined #RubyOnRails
[19:35:48] delianides: has joined #RubyOnRails
[19:37:00] olistik: has left #RubyOnRails: ()
[19:37:01] tubbo: Papierkorb: you can use button_to, not sure how you pass data along though.
[19:38:59] crackedlcd: has joined #RubyOnRails
[19:39:07] baweaver: has joined #RubyOnRails
[19:39:28] Papierkorb: tubbo: ah: link_to 'foo', something_path(the_argument: '123'), method: :post
[19:39:56] vanne: has joined #RubyOnRails
[19:40:16] tubbo: Papierkorb: button_to...
[19:40:19] tubbo: but yeah :D
[19:40:22] tubbo: either way it works
[19:40:38] Papierkorb: I just give the <a> the bootstrap 'btn' class to make it look like one ;)
[19:41:00] zorak8: has joined #RubyOnRails
[19:41:14] tubbo: <a>s are way easier to style than <button>s, especially on mobile
[19:43:42] SalexW: has joined #RubyOnRails
[19:44:18] bricker: has joined #RubyOnRails
[19:46:34] Deck`: Is there a way to freeze time for all specs? to create objects in let! statement relative to freezed time ?
[19:47:01] bronson: has joined #RubyOnRails
[19:47:54] delianides: has joined #RubyOnRails
[19:49:05] edwinvdgraaf: has joined #RubyOnRails
[19:49:53] allcentury: has joined #RubyOnRails
[19:50:08] Etriaph: has joined #RubyOnRails
[19:50:40] tubbo: Deck`: what do you mean
[19:51:44] vanne: has joined #RubyOnRails
[19:51:45] Deck`: tubbo, I would like to freeze some datetime before objects created in let, if its possible
[19:52:03] siemprefresco: has joined #RubyOnRails
[19:52:32] rhizome: like t = Time.now
[19:53:46] sinkensabe: has joined #RubyOnRails
[19:54:59] krz: has joined #RubyOnRails
[19:59:10] tenderlove: has joined #RubyOnRails
[19:59:33] dstarh: Deck` have you looked at travel?
[19:59:51] dstarh: http://api.rubyonrails.org/classes/ActiveSupport/Testing/TimeHelpers.html
[20:00:12] jenrzzz: has joined #RubyOnRails
[20:00:48] pjammer: has joined #RubyOnRails
[20:01:13] joaomdmoura: has joined #RubyOnRails
[20:01:15] dstarh: anyone familar with a gem that would allow me to elect one of my servers as a "master" when they boot? We have some rake tasks that are run by cron but we don't want them to run on every server so we'd like to elect a master upon startup
[20:01:33] Obfuscate: Deck`: The timecop gem may also be worth looking at.
[20:02:42] fryguy: dstarh: zookeeper and/or etcd are the current de-facto services for things like that
[20:02:59] dstarh: fryguy thanks
[20:04:51] zarubin: has joined #RubyOnRails
[20:05:41] Pumukel: has joined #RubyOnRails
[20:06:09] commondream: has joined #RubyOnRails
[20:06:52] sdwrage: has joined #RubyOnRails
[20:07:02] digitalknk: has joined #RubyOnRails
[20:07:30] __butch__: has joined #RubyOnRails
[20:08:35] Lytol: has joined #RubyOnRails
[20:09:46] Guest98: has joined #RubyOnRails
[20:11:39] Joshmfrankel: has left #RubyOnRails: ()
[20:12:34] joaomdmoura: has joined #RubyOnRails
[20:12:53] bronson: has joined #RubyOnRails
[20:15:43] commondream: has joined #RubyOnRails
[20:16:00] seank_: has joined #RubyOnRails
[20:16:31] zorak8: has joined #RubyOnRails
[20:16:54] jacor_m: has joined #RubyOnRails
[20:18:46] nixter1029: has joined #RubyOnRails
[20:19:03] elaptics: Cache_Money: did you figure it out - sorry I'd gone home to get something to eat so just saw your message
[20:20:05] kinduff: has joined #RubyOnRails
[20:20:44] siemprefresco: has joined #RubyOnRails
[20:21:25] bendangelo: has joined #RubyOnRails
[20:21:46] kadoppe: has joined #RubyOnRails
[20:24:25] aZtec_: has joined #RubyOnRails
[20:24:40] aZtec_: Hi..anybody know how to test code that depends on Octokit / Github API?
[20:24:42] jgpawletko: has joined #RubyOnRails
[20:24:52] Lytol: has joined #RubyOnRails
[20:28:05] CalvinnHobbes: has joined #RubyOnRails
[20:28:12] tubbo: Aztec_: mock the dependencies out
[20:28:15] byprdct: has joined #RubyOnRails
[20:28:18] tubbo: so you don't need the network to run tests
[20:29:03] elaptics: Aztec_: take a look at gems like vcr
[20:29:48] aZtec_: right...but...since I use Octokit instead of their REST-API, I would have to first figure out what requests i need to mock.
[20:30:17] aZtec_: it just seems very tedious and i thought there might be a more convenient option built in.
[20:31:17] Lytol: has joined #RubyOnRails
[20:31:23] nettoweb: has joined #RubyOnRails
[20:31:49] elaptics: Aztec_: vcr records all the interactions so you just run your tests the first time and then after that first run the tests are faster
[20:32:11] aZtec_: oh, elaptics, that's that cassettes thing, right?
[20:32:15] Coldblackice: has joined #RubyOnRails
[20:33:15] _blizzy_: I'm googling, but I can't figure out how to generate a csrf_token from the controller
[20:33:44] dopie: has joined #RubyOnRails
[20:34:19] Coldblackice_: has joined #RubyOnRails
[20:35:22] sandstrom: has joined #RubyOnRails
[20:35:44] aZtec_: elaptics have you used vcr?
[20:35:52] elaptics: _blizzy_: why do you need to generate one in the controller?
[20:35:54] elaptics: Aztec_: yes
[20:36:07] _blizzy_: elaptics, because I'm generating a form with reactjs
[20:36:20] _blizzy_: and there's no way to put the csrf_token in there, so I was going to pass it from the controller
[20:36:33] aZtec_: did you run into any problems from not getting "true" return values? I assume vcr returns the same recorded response regardless of paramters?
[20:36:52] elaptics: _blizzy_: I haven't used react but the typical thing is to grab it from the page in the meta tags
[20:36:53] aZtec_: 'return values'...damn i should head straight to bed ^^
[20:37:26] mello: has joined #RubyOnRails
[20:38:47] x-light: has joined #RubyOnRails
[20:39:18] philcrissman: has joined #RubyOnRails
[20:39:56] olistik: has joined #RubyOnRails
[20:39:58] neanderslob: has joined #RubyOnRails
[20:40:28] __butch__: has joined #RubyOnRails
[20:41:28] Papierkorb: I want to catch every path under a certain URL in a action, how do I do this? Say I have in my routes.rb: " post 'call/', to: 'caller#call' " and when /call/foo/bar is requested, I want it to invoke the 'call' action and pass "foo/bar" as params
[20:43:07] Papierkorb: ah, rails calls this globbing
[20:43:31] elaptics: Papierkorb: yep, was just getting you the link http://guides.rubyonrails.org/routing.html#route-globbing-and-wildcard-segments
[20:43:32] rhizome: globbing is a pretty old concept
[20:43:46] Papierkorb: elaptics: Thanks for your work then
[20:43:50] edwinvdgraaf: has joined #RubyOnRails
[20:44:24] i: has joined #RubyOnRails
[20:44:36] christop_: has joined #RubyOnRails
[20:44:37] olistik: has joined #RubyOnRails
[20:44:59] cac: has joined #RubyOnRails
[20:45:11] sarink_: has joined #RubyOnRails
[20:49:00] lytol_: has joined #RubyOnRails
[20:49:51] _blizzy_: I'm still confused on how I would render a csrf token in reactjs for rails
[20:50:19] Lytol: has joined #RubyOnRails
[20:51:14] elia: has joined #RubyOnRails
[20:51:21] nettoweb: has joined #RubyOnRails
[20:51:58] rubyonrailed: https://gist.github.com/anonymous/15af99a74dbc0520f69e Can anyone help me why this returns false when the checkbox is checked, but disabled?
[20:54:35] a346: has joined #RubyOnRails
[20:55:04] tubbo: rubyonrailed: because an element being "disabled" on the front-end is not relative to what form data is being passed to the back-end
[20:55:34] tubbo: if i have <form><input type="text" disabled="disabled" name="foo"></form>, submitting that form is going to pass the foo param no matter if it's visible, disabled, or a hidden field.
[20:56:59] surrealanalysis: has joined #RubyOnRails
[20:57:17] DEA7TH: has joined #RubyOnRails
[20:58:39] CheckYourSix: has joined #RubyOnRails
[20:59:25] rubyonrailed: tubbo: So there isn't a simple way of making it pass true if the checkbox is checked, disabled or not?
[21:00:40] tubbo: rubyonrailed: oh sorry i flipped what you said
[21:00:48] garrypolley: has joined #RubyOnRails
[21:01:13] cleopatra: has joined #RubyOnRails
[21:01:18] cleopatra: hellouuuuuuuu
[21:01:22] kies: has joined #RubyOnRails
[21:02:04] coderhs: has joined #RubyOnRails
[21:03:04] _blizzy_: is there a way to get the value of a <input> WHILE inside the erb file?
[21:03:26] tubbo: _blizzy_: $('input').val() :D
[21:03:47] _blizzy_: I can just straight up use js in erb without <script></script>
[21:03:53] disgrntld: According to https://github.com/ryanb/cancan/wiki/Defining-Abilities , when using a hash of conditions, "it is important to only use database columns for these conditions so it can be used for Fetching Records" (pressumably using `<Model>.accessible_by(current_ability)`, like load_resource does). Is this restriction just for performance (i.e. couldn't all records be fetched and then filtered for non-database column conditions)?
[21:03:56] snockerton: has joined #RubyOnRails
[21:03:56] bricker: _blizzy_: no
[21:04:00] _blizzy_: bricker, oh.
[21:04:09] stardiviner: has joined #RubyOnRails
[21:04:40] bricker: _blizzy_: to answer your question, you can probably assign the input call to a variable and get is value that way. Find out what f.text_field() returns and go from there
[21:04:43] _blizzy_: as I'm using react, and I'm trying to get the email field value. https://gist.github.com/NotBlizzard/3f9ea2445bdecccc2e57
[21:04:59] Radar: GOOD MORNING
[21:05:16] cleopatra: so danm !!!
[21:05:20] _blizzy_: wouldn't it be grander than to be in louisiana, in the morning, in the morn...oh
[21:05:49] maz-dev: has joined #RubyOnRails
[21:06:10] cleopatra: Radar, good morning: P
[21:06:18] Deck`: Is it possble to skip model callbacks before creation object in factory girl? I have before_validate hook which sets smth_updated_at field
[21:07:41] snockerton: has joined #RubyOnRails
[21:07:59] djbkd: has joined #RubyOnRails
[21:08:38] ur5us: has joined #RubyOnRails
[21:09:02] ur5us: has joined #RubyOnRails
[21:09:06] djbkd: has joined #RubyOnRails
[21:09:23] pjammer: has joined #RubyOnRails
[21:10:34] bricker: Deck`: not really
[21:10:44] duderonomy: has joined #RubyOnRails
[21:10:47] x-light: Happy Friday Radar
[21:10:47] bricker: I mean, the answer to "is it possible" is always yes
[21:10:51] cleopatra: how I can simplify this code https://gist.github.com/ArpiaPsuv/ce69f074294e9ab26519
[21:11:23] ismaelga: has joined #RubyOnRails
[21:11:38] Deck`: bricker, because I have two fields: team and team_assigned_at , the second one is set automatically in callback. I neet to create object in rspec and set explicitly both of them
[21:12:07] cleopatra: I need to make a tree of categories with a maximum depth of 10 via seed.rb
[21:12:10] bricker: cleopatra: http://guides.rubyonrails.org/active_record_querying.html#find-or-create-by
[21:12:58] tubbo: Deck`: http://stackoverflow.com/questions/8751175/skip-callbacks-on-factory-girl-and-rspec
[21:13:14] tubbo: and in the spirit of open source, here's how i found it: https://www.google.com/search?q=FactoryGirl&oq=FactoryGirl&aqs=chrome..69i57.1087j0j7&sourceid=chrome&es_sm=91&ie=UTF-8#q=factory+girl+skip+callbacks
[21:13:23] tubbo: i should probably write a googling guide
[21:13:30] mberk: has joined #RubyOnRails
[21:13:41] nobitanobi: has joined #RubyOnRails
[21:14:27] Etriaph: Then you'd have to teach someone how to find it through Google tubbo
[21:14:30] Etriaph: Vicious circle
[21:14:57] Deck`: bricker, tried, doesn't work
[21:15:11] bricker: you tried not doing it? Great!
[21:15:22] bricker: who am I talking to
[21:15:33] bricker: what did you try?
[21:15:35] Scripore: has joined #RubyOnRails
[21:15:51] prereflect: has joined #RubyOnRails
[21:15:51] bricker: tubbo: holy jeez
[21:15:56] bricker: tubbo: you found it
[21:16:09] bricker: the code that illustrates "Can I?" vs. "Should I?"
[21:16:19] x-light: _blizzy_: did you have success
[21:16:27] Deck`: bricker, after(:build) { |o| o.class.skip_callback(:validate, :before, :update_team_assigned_at) }
[21:16:31] x-light: _blizzy_: in finding your email value
[21:16:46] bricker: Deck`: why can't you assign that value in your tests?
[21:16:50] _blizzy_: x-light, yes, thank you.
[21:17:07] Deck`: bricker, just explicitly in every testcase?
[21:17:32] Deck`: bricker, probably I could, just there will be a lot of objects
[21:18:06] bricker: Deck`: no, I mean, why do you want to skip that callback?
[21:18:22] vickleton: has joined #RubyOnRails
[21:18:58] Deck`: bricker, in my case I want to freeze some time and create objects with team_assigned_at: 3 months.ago, and set particular team
[21:19:15] edwinvdgraaf: has joined #RubyOnRails
[21:19:20] bricker: Deck`: stub or use Timecop or similar library
[21:19:44] bricker: Deck`: there's also update_column() which will skip all callbacks, which is useful for stuff like that
[21:20:53] allcentury: has joined #RubyOnRails
[21:21:00] tubbo: bricker: what
[21:21:17] tubbo: i found what
[21:21:23] bricker: you found what what?
[21:21:23] elaptics: Deck`: unless I missed something you just need to freeze time to the timeframe you want it to be then create the objects you want with factory girl, then resume normal time
[21:21:39] Deck`: bricker, yeah. I use Timecop and freeze time, but I cant set team_assigned_at attribute with team attribute, because callback breaks team_assigned_at and set it to current time. But I want to set it as 3.year.ago or smeth like that
[21:21:42] kinduff: has joined #RubyOnRails
[21:21:48] bricker: tubbo: that stack overflow answer
[21:21:58] bricker: changing callbacks on the class in a factory callbacks
[21:22:06] bricker: Can I? vs. Should I?
[21:22:20] elaptics: Deck`: gist your code that's setting that attribute because if you're freezing time with timecop you must be doing something weird
[21:22:26] elaptics: if it's not working
[21:22:28] bricker: Deck`: thing.update_column(:team_assigned_at, 3.years.ago)
[21:22:38] smathy: igrowbeards, curl -u"username:password"
[21:22:49] kinduff: has joined #RubyOnRails
[21:22:49] kinduff: has joined #RubyOnRails
[21:22:56] bricker: or expect(thing).to receive(:team_assigned_at).and_return(3.years.ago)
[21:23:28] Deck`: elaptics, nono, look, I freeze time for context: 2015-05-29 and I'd like to create 3-4 objects with 3.days.ago attribute, 4.weeks.ago and so on. It's different for each object
[21:23:34] ismaelga: has joined #RubyOnRails
[21:24:25] smathy: ...usually with -c cookies
[21:25:29] spyderman4g63: has joined #RubyOnRails
[21:25:34] bricker: Deck`: When I need to do that, I create the object then use update_column() to set the value. I do this usually when testing sorting on one of the rails Auto-timestamps (created_at/updated_at)
[21:25:50] igrowbeards: smathy: my curl-fu is not that great but neat to know it's possible
[21:25:58] igrowbeards: love learning little tricks like that
[21:26:48] zorak8: has joined #RubyOnRails
[21:26:54] elaptics: Deck`: so either move to the different timeframes and create the appropriate objects, like would happen for realsies in the app, or do as bricker suggests and directly update the attributes in the db
[21:27:58] TheNet: has joined #RubyOnRails
[21:28:52] powersurge: has joined #RubyOnRails
[21:28:57] powersurge: has left #RubyOnRails: ("WeeChat 0.4.3")
[21:30:20] smathy: renegadeandy, maybe you're unsetting it somewhere, show the whole action from each controller. Also, just to be sure, you don't have cookies disabled in your browser do you?
[21:33:03] bruno-: has joined #RubyOnRails
[21:34:00] doublemalt__: has joined #RubyOnRails
[21:34:16] commondream: has joined #RubyOnRails
[21:34:54] ismaelga: has joined #RubyOnRails
[21:34:56] hutch78: has joined #RubyOnRails
[21:34:59] mary5030: has joined #RubyOnRails
[21:35:09] hutch78: so im having a problem running my server in production mode
[21:35:43] hutch78: 1. server is deployed and runs fine on the remote production server 2. assets are precompiled locally, yet noassets are found when server runs in production mode locally
[21:38:07] mello: has joined #RubyOnRails
[21:38:13] gambl0re: has joined #RubyOnRails
[21:39:03] Radar: tubbo: Rule 1 is the Googling guide.
[21:39:17] tubbo: !didntread
[21:39:30] ismaelga: has joined #RubyOnRails
[21:39:34] Zesty: has joined #RubyOnRails
[21:42:11] barriommx: has joined #RubyOnRails
[21:42:28] cyanpunk_: has joined #RubyOnRails
[21:43:51] cyanpunk: has joined #RubyOnRails
[21:44:26] SalexW: has joined #RubyOnRails
[21:44:35] mrbubbles: has joined #RubyOnRails
[21:44:43] smathy: hutch78, rails doesn't server static assets/files by default, only if `config.serve_static_files` is true (which it isn't for production environment).
[21:45:40] smathy: hutch78, if you want to run in production locally, you should consider using the same httpd locally as production, and then that will serve the static files - not rails.
[21:46:27] barriommx_: has joined #RubyOnRails
[21:46:58] MartinElvar: has joined #RubyOnRails
[21:48:05] yaymukund: has joined #RubyOnRails
[21:50:01] tubbo: has joined #RubyOnRails
[21:50:02] mrbubbles: i???ve an app which needs to wait for a csv to arrive and then parse the content. whats the best approach? use Guard / Listen to watch the folder?
[21:50:25] pjammer: has joined #RubyOnRails
[21:50:26] helpa: "Best" and "better" are subjective. Try to use a different term.
[21:50:37] Radar: Cron job which runs a rake task every minute?
[21:50:39] garyserj: has joined #RubyOnRails
[21:50:47] spyderman4g63: has joined #RubyOnRails
[21:51:30] centrx: has joined #RubyOnRails
[21:52:05] noodman: has joined #RubyOnRails
[21:52:07] workmad3: has joined #RubyOnRails
[21:52:32] WillAmes: has joined #RubyOnRails
[21:53:03] commondream: has joined #RubyOnRails
[21:56:37] prereflect: has joined #RubyOnRails
[21:56:38] jgpawletko: has joined #RubyOnRails
[21:59:26] k3b0: has joined #RubyOnRails
[21:59:27] hutch78: smathy: sorry i just got back to you - how does one avoid the struggles of transitioning from development to production without running locally in production
[21:59:45] weaksauce: hutch78 staging
[22:00:07] hutch78: how do i run my rails app in staging
[22:00:15] hutch78: RTFM, i know lol
[22:00:17] weaksauce: aka a cheaper prod server that you spin up and test out
[22:02:09] wethu: has joined #RubyOnRails
[22:03:08] ismaelga: has joined #RubyOnRails
[22:04:34] robotbrain: has joined #RubyOnRails
[22:04:46] robotbrain: I need A has_one B, A has_one C through B, B has_many C
[22:04:50] robotbrain: so identity belongs to user and can be used for several of that user's networks
[22:04:56] robotbrain: so user has many identities and networks
[22:05:14] watchtheblur: has joined #RubyOnRails
[22:05:15] robotbrain: (sorry if garbled, using up arrow to grap from message history elsewhere)
[22:05:20] robotbrain: can anyone help?
[22:05:26] weaksauce: mrbubbles check out whenever
[22:05:58] smathy: hutch78, +1 to weaksauce
[22:06:04] mrbubbles: ooh interesting thanks weaksauce
[22:06:14] mrbubbles: I think I???ve got it working using Listener though which should be okay
[22:06:25] workmad3: has joined #RubyOnRails
[22:06:27] hutch78: smathy, weaksauce: do people ever use virtual machines for this ?
[22:07:03] Papierkorb: My web application doesn't render inside a iframe. Firebug just shows an empty 200 OK response from the server. Did I mess up or is there some rails setting for it?
[22:07:05] weaksauce: hutch78 yes absolutely. perhaps the box is even built up using the same automation that builds the production servers
[22:07:24] smathy: hutch78, well, considering that people use VMs for production, yes of course.
[22:08:22] Papierkorb: What makes me think that it's rails is that the 404 error page of passenger works just fine when I direct the iframe towards a non existing path
[22:09:15] weaksauce: are there any good weather reporting apis?
[22:10:13] evenix: has joined #RubyOnRails
[22:11:06] skyjumper: weaksauce: wunderground.com has one
[22:11:11] evenix: Im building a gem and im trying to add a viewhelper method to my gem that I can call from my app
[22:11:16] evenix: for some reason its not working https://github.com/richardsondx/tumblr_client_wrapper/blob/master/lib/tumblr_wrapper/railtie.rb
[22:12:14] evenix: when i call my method embed_tumblr on the view it says: undefined local variable or method
[22:12:35] weaksauce: skyjumper thanks. I like them usually
[22:14:07] powersurge: has joined #RubyOnRails
[22:14:33] powersurge: anyone use activemerchant with authorize.net? I'm trying to figure out how to do AVS verification (address verification)
[22:15:21] JoshGlzBrk: has joined #RubyOnRails
[22:15:43] iamjarvo: has joined #RubyOnRails
[22:16:22] iamjarvo: has joined #RubyOnRails
[22:17:11] iamjarvo: has joined #RubyOnRails
[22:17:28] darrencauthon: has joined #RubyOnRails
[22:17:35] elia: has joined #RubyOnRails
[22:18:24] erich: has joined #RubyOnRails
[22:19:17] renechz: has joined #RubyOnRails
[22:19:23] DEA7TH: has joined #RubyOnRails
[22:19:39] jerematic: has joined #RubyOnRails
[22:23:48] ismaelga: has joined #RubyOnRails
[22:24:24] rodfersou: has joined #RubyOnRails
[22:25:41] Jarboe: has joined #RubyOnRails
[22:25:49] prereflect: has joined #RubyOnRails
[22:26:32] Scripore: has joined #RubyOnRails
[22:26:53] Radar: powersurge: I use ActiveMerchant but I don't use authorize.net because I like myself too much.
[22:27:00] Radar: I use Braintree instead.
[22:27:32] mase-chatter: has joined #RubyOnRails
[22:28:04] ismaelga: has joined #RubyOnRails
[22:28:05] commondream: has joined #RubyOnRails
[22:31:15] powersurge: app's already built and I have to modify the integration somewhat
[22:33:10] Radar: I am sorry for the situation you find yourself in
[22:33:11] smathy: Papierkorb, yeah, Rails sends an X-Frame-Options of SAMEORIGIN
[22:33:25] Radar: Personally I found authorize.net to be the worst payment gateway to work with
[22:33:34] Radar: PayPal was better
[22:33:36] smathy: Papierkorb, I'm surprised that error didn't show up in your firebug.
[22:34:19] Papierkorb: smathy: Yeah it didn't, I also checked with a super minimal test html only containing <iframe> and it just didn't show anything.
[22:34:51] jenrzzz: has joined #RubyOnRails
[22:35:01] Brozo: has joined #RubyOnRails
[22:36:03] smathy: Papierkorb, right, it won't work. I'm surprised that firebug didn't show the error (the Chrome console shows it clearly)
[22:36:30] smathy: Papierkorb, it'll work if the HTML file containing the IFRAME is in your Rails app's public folder.
[22:37:11] Papierkorb: smathy: Yeah, sadly I don't have control over that. I "fixed" that by removing the header in a after action filter
[22:37:16] Papierkorb: Damn you facebook canvas crap
[22:37:39] arBmind: has joined #RubyOnRails
[22:38:58] GPrime: has joined #RubyOnRails
[22:39:10] baweaver: has joined #RubyOnRails
[22:39:12] smathy: I just meant as a test/demo.
[22:39:20] smathy: ...but yeah, that's a reasonable fix.
[22:42:59] griffindy: has joined #RubyOnRails
[22:45:14] thebatu1: has joined #RubyOnRails
[22:45:38] k3b0: has joined #RubyOnRails
[22:45:43] mary5030: has joined #RubyOnRails
[22:47:32] i: has joined #RubyOnRails
[22:50:23] renechz: has joined #RubyOnRails
[22:51:38] ismaelga: has joined #RubyOnRails
[22:53:16] bricker: has joined #RubyOnRails
[22:54:11] nobitanobi: has joined #RubyOnRails
[22:55:08] bronson: has joined #RubyOnRails
[22:55:16] maz-dev: has joined #RubyOnRails
[23:00:21] zorak8: has joined #RubyOnRails
[23:01:23] l1meon: has joined #RubyOnRails
[23:01:33] dseitz: has joined #RubyOnRails
[23:01:42] kinduff: has joined #RubyOnRails
[23:01:52] Cache_Money: elaptics: I got pulled onto something else after lucnh and wasn't able to implement those changes. I'll begin working on it now and let you know..
[23:02:06] jstanton: has joined #RubyOnRails
[23:02:27] rhizome: you're fired
[23:06:01] renegadeandy: has joined #RubyOnRails
[23:06:57] renegadeandy: hi everyone. If i have a model - event, and i have an record of that model in a variable called eventVar, and I want to assign a new 'instance' variable to it, like a new piece of metadata - which will stick to that variable, but has no place in the records model...how can i do that?
[23:07:26] workmad3: has joined #RubyOnRails
[23:08:39] moretti: has joined #RubyOnRails
[23:08:53] l1meon_: has joined #RubyOnRails
[23:09:22] kinduff: has joined #RubyOnRails
[23:09:30] Scripore: has joined #RubyOnRails
[23:12:29] renegadeandy: can anybody help ?
[23:13:10] commondream: has joined #RubyOnRails
[23:14:11] rhizome: renegadeandy: attr_accessor
[23:15:15] Ropeney: has joined #RubyOnRails
[23:16:02] SeriousMatters: has joined #RubyOnRails
[23:16:51] shuber_: has joined #RubyOnRails
[23:17:21] jacor: has joined #RubyOnRails
[23:18:01] premera: has joined #RubyOnRails
[23:18:20] renegadeandy: rhizome: awesome awesome awesome, thats perfect! I was going to do this http://railscasts.com/episodes/16-virtual-attributes?view=asciicast but attr_accessor appears to just be a shorthand version of a similar thing :)
[23:21:42] blackhuey: has joined #RubyOnRails
[23:23:27] macmartine: has joined #RubyOnRails
[23:23:49] delianides: has joined #RubyOnRails
[23:24:02] tjbiddle: has joined #RubyOnRails
[23:26:30] commondream: has joined #RubyOnRails
[23:27:24] mello: has joined #RubyOnRails
[23:28:23] one_zero: has joined #RubyOnRails
[23:29:22] erich: has joined #RubyOnRails
[23:33:35] CalvinnHobbes: Hi all, if I want to eager/pre-load the associations on a model object that has already been found. What is the best way?
[23:34:09] CalvinnHobbes: this seems hacky: @model.comments = @model.comments.includes(:author)
[23:34:12] CalvinnHobbes: but it does work
[23:35:42] JoshGlzBrk: has joined #RubyOnRails
[23:35:45] kinduff: call it from the model
[23:37:06] CalvinnHobbes: isn't that what is happening on the right side?
[23:37:27] SeriousMatters: I thought attr_accessor is deprecated.
[23:37:48] kinduff: @model = Model.includes(:comments => [:autor]); Whenever you call @model.comments it's going to be "pre-loaded"
[23:38:43] Spami: has joined #RubyOnRails
[23:38:52] renegadeandy: SeriousMatters: replaced by?
[23:39:25] iamse7en: has joined #RubyOnRails
[23:40:45] kinduff: CalvinnHobbes, works for you?
[23:40:51] CalvinnHobbes: yes thanks kinduff
[23:40:55] SeriousMatters: strong parameters?
[23:43:37] djbkd: has joined #RubyOnRails
[23:44:07] Lightsword: has joined #RubyOnRails
[23:44:19] djbkd: has joined #RubyOnRails
[23:44:31] iamse7en: if anyone can help. I have users who can make comments via simple_form for a restaurant. The comments are made of two parts: a rating (1-5) and description. the rating says "5 stars", so I can do rating[0].to_i to turn it into just 5. But, comment.rating[0].to_i spits out 4 separate numbers from 4 separate comments. How can I group them together to come up with an average rating? And would this go in my comment.rb model?
[23:45:10] sonofdirt: has joined #RubyOnRails
[23:45:14] elia: has joined #RubyOnRails
[23:45:18] SalexW: has joined #RubyOnRails
[23:45:24] prereflect: has joined #RubyOnRails
[23:48:07] drale2k_: has joined #RubyOnRails
[23:48:08] GPrime: has joined #RubyOnRails
[23:48:24] weaksauce: iamse7en gist your code and the results you are getting
[23:49:13] Babelfish: has joined #RubyOnRails
[23:50:04] asheinfeld: has joined #RubyOnRails
[23:53:00] weaksauce: iamse7en `array.inject(:+) / array.count` would be a easy way if the ratings are being returned as an array.
[23:53:09] weaksauce: an array named array that is
[23:54:42] dru`: has joined #RubyOnRails
[23:55:04] moretti: has joined #RubyOnRails
[23:57:31] asheinfeld: has joined #RubyOnRails
[23:58:03] duderonomy: has joined #RubyOnRails
[23:59:25] quazimodo: has joined #RubyOnRails
[23:59:37] iamse7en: weaksauce: https://gist.github.com/austinarchibald/fe31eda357e43f53e2e4
[23:59:56] iamse7en: and this is what i see: http://imgur.com/Ymf98YK