« Back to channel list

#RubyOnRails - 30 March 2016

« Back 1 day Forward 1 day »
[00:02:02] Rubie: has joined #RubyOnRails
[00:03:47] workmad3: has joined #RubyOnRails
[00:04:41] wethu: has joined #RubyOnRails
[00:12:48] djbkd: has joined #RubyOnRails
[00:13:24] Ropeney: has joined #RubyOnRails
[00:16:10] Megamos: has joined #RubyOnRails
[00:22:57] GodFather: has joined #RubyOnRails
[00:23:41] sdwrage: has joined #RubyOnRails
[00:25:11] hnanon: Radar: data = File.read(Rails.root.join('db', 'seeds', 'data', Dir["cities*.rb"])) ?
[00:29:32] hnanon: Radar: nevermind, sorry. Slower than usual today.
[00:30:58] rubyonrailed: has joined #RubyOnRails
[00:31:06] Arcaire: 10:57 AM <hxegon> ... all because I'm using 'docker-compose up' instead of 'docker-compose up web'..........
[00:31:13] Arcaire: Docker is bad.
[00:31:16] Arcaire: Use something else.
[00:33:22] Radar: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[00:33:24] Radar: has joined #RubyOnRails
[00:33:57] _Tariq: has joined #RubyOnRails
[00:34:08] georgedrummond: has joined #RubyOnRails
[00:34:57] Aswebb_: has joined #RubyOnRails
[00:38:41] baweaver: but containers Arcaire
[00:38:54] Arcaire: Contain my tears.
[00:39:39] _Tariq: has joined #RubyOnRails
[00:39:39] eregi: has joined #RubyOnRails
[00:41:00] jenrzzz: has joined #RubyOnRails
[00:41:42] Ropeney: those claims though
[00:42:50] makenoise: has joined #RubyOnRails
[00:44:55] joshhbk: has joined #RubyOnRails
[00:47:54] baweaver: has joined #RubyOnRails
[00:54:14] trosborn: has joined #RubyOnRails
[00:59:03] hahuang61: has joined #RubyOnRails
[01:00:06] shmilan: has joined #RubyOnRails
[01:04:01] owenjones: has joined #RubyOnRails
[01:05:31] eregi: has joined #RubyOnRails
[01:05:46] superlou: has joined #RubyOnRails
[01:07:53] sevenseacat: has joined #RubyOnRails
[01:08:21] FailBit: has joined #RubyOnRails
[01:08:23] rodfersou: has joined #RubyOnRails
[01:12:18] chipotle: has joined #RubyOnRails
[01:13:22] DoctorMonocular: has joined #RubyOnRails
[01:14:05] FailBit: has left #RubyOnRails: ("WeeChat 0.4.2")
[01:15:49] provokeme: has joined #RubyOnRails
[01:19:07] lemur: has joined #RubyOnRails
[01:23:35] Inside: has joined #RubyOnRails
[01:28:06] edwinvdg_: has joined #RubyOnRails
[01:28:09] blackmesa: has joined #RubyOnRails
[01:29:12] provokeme: has joined #RubyOnRails
[01:30:16] swav: has joined #RubyOnRails
[01:31:52] jamo: has joined #RubyOnRails
[01:32:22] CodaBrink: has joined #RubyOnRails
[01:32:41] uglybandersnatch: has joined #RubyOnRails
[01:32:57] jtdowney: has joined #RubyOnRails
[01:32:57] jtdowney: has joined #RubyOnRails
[01:33:21] drupald: has joined #RubyOnRails
[01:33:22] apeiros: has joined #RubyOnRails
[01:33:52] PaulePanter: has joined #RubyOnRails
[01:34:06] aep: has joined #RubyOnRails
[01:35:08] gabr13l: has joined #RubyOnRails
[01:35:51] dextertzu: has joined #RubyOnRails
[01:36:20] droptone: has joined #RubyOnRails
[01:37:25] lyoshajapan: has joined #RubyOnRails
[01:38:52] hotpancakes: has joined #RubyOnRails
[01:38:59] provokeme: has left #RubyOnRails: ("rcirc on GNU Emacs 24.4.50.1")
[01:39:30] _Tariq: has joined #RubyOnRails
[01:41:25] bronson: has joined #RubyOnRails
[01:51:16] diegoaguilar: has joined #RubyOnRails
[01:51:55] dtzuzu: has joined #RubyOnRails
[01:55:00] _Tariq: has joined #RubyOnRails
[01:57:35] DLSteve: has joined #RubyOnRails
[01:57:45] rogue_koder: has joined #RubyOnRails
[02:00:34] renderIssue: has joined #RubyOnRails
[02:01:05] brt: has joined #RubyOnRails
[02:03:15] _Tariq: has joined #RubyOnRails
[02:03:46] B1n4r10: has joined #RubyOnRails
[02:03:57] CodaBrink: has joined #RubyOnRails
[02:04:07] _Tariq: has joined #RubyOnRails
[02:09:06] uglybandersnatch: has joined #RubyOnRails
[02:10:51] n1lo: has joined #RubyOnRails
[02:12:40] sudoubuntu: has joined #RubyOnRails
[02:15:00] Musashi007: has joined #RubyOnRails
[02:16:07] shmilan: has joined #RubyOnRails
[02:17:06] htmldrum: has joined #RubyOnRails
[02:17:06] htmldrum_: has joined #RubyOnRails
[02:17:42] sudoubuntu: has joined #RubyOnRails
[02:20:39] hotpancakes: has joined #RubyOnRails
[02:22:38] jstransky: has joined #RubyOnRails
[02:28:51] blackmesa: has joined #RubyOnRails
[02:29:24] Rubie: has joined #RubyOnRails
[02:31:10] mDuff: has joined #RubyOnRails
[02:31:32] sdwrage: has joined #RubyOnRails
[02:32:12] hxegon: has joined #RubyOnRails
[02:32:16] rubyonrailed: has joined #RubyOnRails
[02:35:07] chagel: has joined #RubyOnRails
[02:35:46] Aswebb_: has joined #RubyOnRails
[02:39:14] djbkd: has joined #RubyOnRails
[02:39:51] lyoshajapan: has joined #RubyOnRails
[02:42:37] _Tariq_: has joined #RubyOnRails
[02:42:43] Devalo: has joined #RubyOnRails
[02:43:22] Glyphikon: has joined #RubyOnRails
[02:43:58] Glyphikon: has left #RubyOnRails: ()
[02:43:59] bronson: has joined #RubyOnRails
[02:44:28] Glyphik: has joined #RubyOnRails
[02:52:44] moeabdol2: has joined #RubyOnRails
[02:53:02] _Tariq: has joined #RubyOnRails
[02:54:32] tomatoes: has joined #RubyOnRails
[02:54:45] _Tariq: has joined #RubyOnRails
[02:59:48] hahuang61: has joined #RubyOnRails
[02:59:57] barajasfab: has joined #RubyOnRails
[03:00:07] sypheren: has joined #RubyOnRails
[03:00:38] _Tariq: has joined #RubyOnRails
[03:03:44] Rubie: has joined #RubyOnRails
[03:05:02] uglybandersnatch: has joined #RubyOnRails
[03:15:12] braincrash: has joined #RubyOnRails
[03:17:48] duncannz: has joined #RubyOnRails
[03:19:06] AntiSpamMeta: has joined #RubyOnRails
[03:19:52] baweaver: has joined #RubyOnRails
[03:21:59] uglybandersnatch: has joined #RubyOnRails
[03:22:03] merida: has joined #RubyOnRails
[03:24:17] TheGreatGudsby: has joined #RubyOnRails
[03:24:26] eyeamaye: has joined #RubyOnRails
[03:25:03] phredus: has joined #RubyOnRails
[03:27:10] helpa: has joined #RubyOnRails
[03:29:42] blackmesa: has joined #RubyOnRails
[03:31:18] helpa: has joined #RubyOnRails
[03:32:04] baweaver: has joined #RubyOnRails
[03:33:20] hotpancakes: has joined #RubyOnRails
[03:33:55] merida: has joined #RubyOnRails
[03:34:05] sudoubuntu: has joined #RubyOnRails
[03:34:10] hxegon: has joined #RubyOnRails
[03:37:29] bphogan: has joined #RubyOnRails
[03:40:22] Rubie: has joined #RubyOnRails
[03:42:02] RegulationD: has joined #RubyOnRails
[03:43:23] davee_: has joined #RubyOnRails
[03:52:39] arBmind1: has joined #RubyOnRails
[03:53:33] benlieb: has joined #RubyOnRails
[03:56:15] GitGud: has joined #RubyOnRails
[03:59:24] chagel: has joined #RubyOnRails
[03:59:47] sudoubuntu: has joined #RubyOnRails
[04:00:42] hotpancakes: has joined #RubyOnRails
[04:01:59] merida_: has joined #RubyOnRails
[04:03:02] tycoon177: has joined #RubyOnRails
[04:03:46] pawnbox: has joined #RubyOnRails
[04:04:17] lyoshajapan: has joined #RubyOnRails
[04:04:37] chipotle: has joined #RubyOnRails
[04:08:28] sneakerhax: has joined #RubyOnRails
[04:09:53] djbkd: has joined #RubyOnRails
[04:10:53] trosborn: has joined #RubyOnRails
[04:16:19] ivanskie: has joined #RubyOnRails
[04:16:59] RaetiveName: has joined #RubyOnRails
[04:17:53] N1GG3R54R3G4Y: has joined #RubyOnRails
[04:18:17] beauby: has joined #RubyOnRails
[04:18:57] Guest12: has joined #RubyOnRails
[04:19:16] merida: has joined #RubyOnRails
[04:19:22] trosborn: has joined #RubyOnRails
[04:21:59] Rubie: has joined #RubyOnRails
[04:23:56] merida: has joined #RubyOnRails
[04:25:06] hxegon: has joined #RubyOnRails
[04:25:08] sypheren: has joined #RubyOnRails
[04:28:14] merida: has joined #RubyOnRails
[04:28:40] d0nn1e: has joined #RubyOnRails
[04:29:19] _Tariq: has joined #RubyOnRails
[04:31:41] blackmesa: has joined #RubyOnRails
[04:33:30] chagel: has joined #RubyOnRails
[04:34:59] Palsson: has joined #RubyOnRails
[04:36:14] mdw: has joined #RubyOnRails
[04:36:38] Aswebb_: has joined #RubyOnRails
[04:37:21] eregi: has joined #RubyOnRails
[04:40:26] merida_: has joined #RubyOnRails
[04:41:50] Devalo: has joined #RubyOnRails
[04:42:12] hotpancakes: has joined #RubyOnRails
[04:44:31] bronson: has joined #RubyOnRails
[04:48:32] lyoshajapan: has joined #RubyOnRails
[04:49:01] jenrzzz: has joined #RubyOnRails
[04:55:44] failasLStoRM: has joined #RubyOnRails
[04:57:33] sypheren: has joined #RubyOnRails
[05:00:09] helpa: has joined #RubyOnRails
[05:00:34] hahuang61: has joined #RubyOnRails
[05:00:43] Arcaire: Ropeney: late, but what claims?
[05:00:46] Arcaire: i was in meetings lol
[05:01:04] Ropeney: you said something about Docker being bad, IIRC
[05:01:18] Ropeney: those claims though
[05:01:20] Arcaire: I give it 2 / 10
[05:01:23] Ropeney: oh my, we are here again
[05:01:24] Arcaire: see me after class
[05:01:26] Arcaire: stop wasting my time
[05:01:26] gingray: has joined #RubyOnRails
[05:01:44] bronson: has joined #RubyOnRails
[05:01:46] Arcaire: It's good for people who don't understand the infrastructure tho I guess.
[05:02:05] Arcaire: I wouldn't recommend it to anyone who knows what they're doing, or anyone who only half-knows what they're doing due to the security concerns.
[05:02:15] baweaver: you mean like 90% of developers?
[05:02:18] Arcaire: I just hedge my bets on the people who don't know what they're doing are using a service managed by others.
[05:02:30] Arcaire: true facts
[05:02:35] Ropeney: so your against containers in general, or just docker?
[05:02:44] Arcaire: Little column A, little column B.
[05:02:45] baweaver: more like asspullery with numbers, but ok.
[05:03:05] Arcaire: baweaver: no it was TRUE ≥FACTS≤
[05:03:18] baweaver: ACTION shrugs
[05:03:23] Arcaire: Apparently I cannot do double arrows on a Mac keyboard.
[05:03:33] uglybandersnatch: has joined #RubyOnRails
[05:03:38] Arcaire: oh, yes i can
[05:03:50] Radar: arrow quotes*
[05:03:56] Arcaire: alt+\, if you're wondering
[05:04:05] baweaver: anyways, for the less enlightened, what are your reasons?
[05:04:06] Arcaire: alt+shift+\ does »
[05:04:19] Arcaire: baweaver: still zero to hero root
[05:04:21] Arcaire: which is cool
[05:05:15] Arcaire: also a number of non-security issues i have with it
[05:05:40] helpa: http://i.imgur.com/tyViD.gif
[05:05:40] baweaver: for me it was always encouraging disparate dev environments because we can
[05:05:40] Arcaire: There's no inherent security in a dockeroo, really
[05:05:46] Arcaire: like, at all
[05:06:02] Arcaire: it's just kind of like a patchwork around a bunch of stuff that happens to have existed for years, and was rewritten in Go because it's a hip meme language
[05:06:10] Arcaire: as a result you end up with this thin layer of "oh it just works™"
[05:06:16] Arcaire: that's great until remote code execution exploits
[05:06:16] Radar: so, like JS?
[05:06:22] Arcaire: that's great until sql injection exlpoits
[05:06:30] Arcaire: that's great until insecure direct object references
[05:06:32] Arcaire: that's great until ...
[05:06:49] Ropeney: Did you read a magazines opinion and regurgitate?
[05:07:14] Arcaire: Actually, I'm a security consultant with several years of experience working with networking infrastructure, web applications, and virtualisation technologies.
[05:07:31] Arcaire: So my experience with it probably trumps your blind defence of it.
[05:07:33] Ropeney: congratulations?
[05:07:43] Ropeney: Because, you are very educated in who I am?
[05:07:44] baweaver: I have a big stick too
[05:07:57] baweaver: I can swing it fast
[05:08:41] baweaver: It's a nice stick
[05:09:32] Arcaire: Is it smooth?
[05:10:06] baweaver: I'll let you use your imagination
[05:10:29] baweaver: Anyways, to the point. Backed up opinions and facts are good
[05:10:31] Arcaire: You probably don't want to do that.
[05:10:36] baweaver: Name calling and posturing are not
[05:10:42] Radar: "Backed up opinions and facts are good" +100000
[05:10:42] baweaver: let's all be friends <3
[05:10:51] Arcaire: https://docs.docker.com/engine/security/security/
[05:10:57] Arcaire: >This daemon currently requires root privileges, and you should therefore be aware of some important details.
[05:10:59] Arcaire: I rest my case.
[05:11:02] baweaver: there we go
[05:11:08] baweaver: progress :D
[05:11:09] gingray: has joined #RubyOnRails
[05:11:26] Arcaire: >First of all, only trusted users should be allowed to control your Docker daemon.
[05:11:36] Arcaire: Fun fact: "control of the docker daemon" can happen from inside the dockeroo if you happen to get RCE
[05:12:00] Arcaire: Therefore, it can be implied that "don't run anything externally-facing in your dockeroo" is the mantra we're going for here.
[05:12:08] Arcaire: s/implied/inferred
[05:12:11] Arcaire: why do i do that every time
[05:12:41] Arcaire: I recall that the docker HTTP endpoint once listened on 0.0.0.0, not 127.0.0.1. I'm sure you can imagine what problems that may cause.
[05:12:59] Arcaire: I don't know if it still does. "Probably".
[05:13:39] Arcaire: Docker containers are like if jails had a kid but it was super unambitious and never really amounted to anything.
[05:13:46] Arcaire: And by jails I'm referring exclusively to BSD jails.
[05:14:44] baweaver: That was fun figuring out OpenBSD does those
[05:15:05] Arcaire: One of my friends just installed OpenBSD 5.9 on his laptop.
[05:15:10] Arcaire: I wasn't aware he was that depressed.
[05:15:16] benlieb: has joined #RubyOnRails
[05:15:40] xardion: has joined #RubyOnRails
[05:17:31] netzfisch: has joined #RubyOnRails
[05:18:28] sevenseacat: has joined #RubyOnRails
[05:18:58] beauby: has joined #RubyOnRails
[05:33:34] User458764: has joined #RubyOnRails
[05:33:45] gabr13l: has joined #RubyOnRails
[05:35:12] chagel: has joined #RubyOnRails
[05:39:48] uglybandersnatch: has joined #RubyOnRails
[05:40:08] krz: has joined #RubyOnRails
[05:40:35] tenderlove: has joined #RubyOnRails
[05:41:54] jkahn: has joined #RubyOnRails
[05:44:02] hotpancakes: has joined #RubyOnRails
[05:45:41] merida: has joined #RubyOnRails
[05:46:12] netzfisch: has joined #RubyOnRails
[05:47:02] bronson: has joined #RubyOnRails
[05:49:53] merida_: has joined #RubyOnRails
[05:52:38] Macaveli: has joined #RubyOnRails
[05:52:46] Jameser: has joined #RubyOnRails
[05:56:19] y2mq37: has joined #RubyOnRails
[06:04:52] uglybandersnatch: has joined #RubyOnRails
[06:04:58] Cervajz_: has joined #RubyOnRails
[06:04:58] owenjones: has joined #RubyOnRails
[06:06:02] merida: has joined #RubyOnRails
[06:06:16] chagel: has joined #RubyOnRails
[06:10:36] blackmesa: has joined #RubyOnRails
[06:10:59] Cervajz: has joined #RubyOnRails
[06:15:22] rubyforgood: has joined #RubyOnRails
[06:15:25] comrad: has joined #RubyOnRails
[06:18:52] scepticulous: has joined #RubyOnRails
[06:19:49] beauby: has joined #RubyOnRails
[06:22:17] srinidhi: has joined #RubyOnRails
[06:23:20] benlieb: has joined #RubyOnRails
[06:23:48] merida__: has joined #RubyOnRails
[06:24:59] arup_r: has joined #RubyOnRails
[06:25:10] hotpancakes: has joined #RubyOnRails
[06:27:10] Cohedrin: has joined #RubyOnRails
[06:29:48] lyoshajapan: has joined #RubyOnRails
[06:31:41] pawnbox: has joined #RubyOnRails
[06:32:30] Martyn: has joined #RubyOnRails
[06:34:57] yfeldblum: has joined #RubyOnRails
[06:37:50] Aswebb_: has joined #RubyOnRails
[06:38:52] User458764: has joined #RubyOnRails
[06:39:12] solars: has joined #RubyOnRails
[06:41:34] aganov: has joined #RubyOnRails
[06:44:35] edwinvdgraaf: has joined #RubyOnRails
[06:46:03] vale_tudo: has joined #RubyOnRails
[06:47:19] futilegames: has joined #RubyOnRails
[06:47:32] AlexJakeGreen: has joined #RubyOnRails
[06:47:43] Irikos: has joined #RubyOnRails
[06:50:27] sandstrom: has joined #RubyOnRails
[06:50:30] pawnbox: has joined #RubyOnRails
[06:51:36] merida: has joined #RubyOnRails
[06:53:46] ur5us: has joined #RubyOnRails
[06:56:39] hotpancakes: has joined #RubyOnRails
[06:58:33] dede: has joined #RubyOnRails
[06:59:14] Glyphik: has joined #RubyOnRails
[06:59:54] Guest12: has joined #RubyOnRails
[07:00:16] DoubleMalt: has joined #RubyOnRails
[07:01:14] Guest12: has left #RubyOnRails: ()
[07:01:46] Glyphik: has joined #RubyOnRails
[07:02:24] pawnbox: has joined #RubyOnRails
[07:04:00] SteenJobs: has joined #RubyOnRails
[07:04:49] SteenJobs: given an extenuating circumstance, is it ok to access params within a view template or is that always frowned upon?
[07:05:29] SteenJobs: let me rephrase that, because that would also involve making an AR query in a view which is gross
[07:06:12] sypheren: has joined #RubyOnRails
[07:06:48] davee_: has joined #RubyOnRails
[07:07:15] pawnbox: has joined #RubyOnRails
[07:07:38] SteenJobs: if i have a series of ‘onboarding’ views, where onboarding1 is rendered my my controller’s new action, and then when onboarding1 is submitted, my object is created and the create action then renders the next view, onboarding2..and so on, dynamically rendering each subsequent view. however, onboarding2 and onwards will be updating the object created in onboarding1…how can i query for that object so it’s available in my up
[07:07:40] SteenJobs: https://gist.github.com/jesiegel1/aecaa4580b2acd7f28bceb282cb24cba
[07:11:25] SteenJobs: in my form within onboarding2, i need to pass the object’s id to my form’s url path
[07:13:09] oded: has joined #RubyOnRails
[07:15:36] chagel: has joined #RubyOnRails
[07:15:45] neanderslob: has joined #RubyOnRails
[07:16:32] ur5us: has joined #RubyOnRails
[07:17:18] kiloreux: has joined #RubyOnRails
[07:18:20] universa1: SteenJobs: https://github.com/schneems/wicked
[07:18:47] SteenJobs: universa1: thanks!! i’ll check it out
[07:19:03] SteenJobs: does this seem like a problem that could happen, or does it sound more like i’m just not approaching it properly
[07:19:32] universa1: multi-step forms / wizards are a somewhat solved problem.
[07:19:39] sandstrom: has joined #RubyOnRails
[07:20:37] quazimodo: has joined #RubyOnRails
[07:21:45] beauby: has joined #RubyOnRails
[07:25:46] hotpancakes: has joined #RubyOnRails
[07:27:36] Dimik: has joined #RubyOnRails
[07:27:37] agit0: has joined #RubyOnRails
[07:27:54] eregi: has joined #RubyOnRails
[07:29:36] sevenseacat: wicked is a great gem
[07:30:22] gingray: has joined #RubyOnRails
[07:30:30] merida_: has joined #RubyOnRails
[07:30:56] chagel: has joined #RubyOnRails
[07:31:38] beauby: has joined #RubyOnRails
[07:33:03] rubyonrailed: has joined #RubyOnRails
[07:34:23] robbyoconnor: has joined #RubyOnRails
[07:37:14] Ropeney: The wicked demo is down :(
[07:37:23] AnoHito: has joined #RubyOnRails
[07:38:53] monoprotic: has joined #RubyOnRails
[07:39:44] moeabdol2: has joined #RubyOnRails
[07:41:14] snowy: has joined #RubyOnRails
[07:42:02] CustosLimen: has joined #RubyOnRails
[07:42:13] bronson: has joined #RubyOnRails
[07:43:28] RegulationD: has joined #RubyOnRails
[07:45:50] sevenseacat: there's a demo?
[07:46:44] Ropeney: Screencast
[07:46:52] rvanlieshout: has joined #RubyOnRails
[07:47:41] User458764: has joined #RubyOnRails
[07:47:52] mikecmpbll: has joined #RubyOnRails
[07:49:36] mark2: has joined #RubyOnRails
[07:50:14] lyoshajapan: has joined #RubyOnRails
[07:51:40] merida: has joined #RubyOnRails
[07:53:27] pawnbox: has joined #RubyOnRails
[07:57:08] hotpancakes: has joined #RubyOnRails
[07:59:19] artto: has joined #RubyOnRails
[07:59:24] AimlessRAven: has joined #RubyOnRails
[08:00:17] SteenJobs: universa1: aright, that makes me feel better
[08:03:07] Pazician: has joined #RubyOnRails
[08:03:31] blackmesa: has joined #RubyOnRails
[08:03:47] marr: has joined #RubyOnRails
[08:06:37] njero: has joined #RubyOnRails
[08:06:41] owenjones: has joined #RubyOnRails
[08:07:01] darutoko: has joined #RubyOnRails
[08:11:33] jsrn: has joined #RubyOnRails
[08:12:28] adre: has joined #RubyOnRails
[08:13:03] petor: has joined #RubyOnRails
[08:14:54] artto: has joined #RubyOnRails
[08:15:43] mikecmpbll: has joined #RubyOnRails
[08:15:51] chagel: has joined #RubyOnRails
[08:18:58] Jasaka: has joined #RubyOnRails
[08:21:40] pawnbox_: has joined #RubyOnRails
[08:24:20] ferr: has joined #RubyOnRails
[08:24:21] SteenJobs: while i plan to read up on wicked, why not just add the new object’s id to params in my create action, and then in onboarding2, pass params[:id] to my update path helper in my form? (and then i can access the object in my update action)
[08:25:03] dionysus69: has joined #RubyOnRails
[08:25:21] ferr: has joined #RubyOnRails
[08:25:31] sevenseacat: its your app, if thats what you wantto do, go for it.
[08:27:03] finnnnnnnnnnn: has joined #RubyOnRails
[08:27:31] tvw: has joined #RubyOnRails
[08:27:50] SteenJobs: sevenseacat: fair, i should be more specific - in terms of best practice, what are the downsides to doing it the way i described, and is there an alternative (wicked i presume uses that alternative method, so why is that approach better)?
[08:28:13] hotpancakes: has joined #RubyOnRails
[08:28:44] sevenseacat: i dont really understand what you were proposing - a new object doesn't have an ID in a create action
[08:29:27] SteenJobs: after it’s saved it does
[08:29:52] SteenJobs: lemme recreate the gist, the formatting is all off
[08:30:01] sevenseacat: if you had some sample code, it would probably be much clearer
[08:30:31] SteenJobs: yea yea, i posted the gist before - gimme a quick second
[08:32:36] SteenJobs: sevenseacat: https://gist.github.com/jesiegel1/c3d61e5b0fcc7b9add72fd1bcd762ac9
[08:33:36] sevenseacat: SteenJobs: so how do you navigate to a specific step of the wizard
[08:33:46] baweaver: has joined #RubyOnRails
[08:33:54] SteenJobs: sevenseacat: you can’t, it must be done sequentially
[08:33:54] rubyonrailed: has joined #RubyOnRails
[08:34:06] sevenseacat: you're also creating a new object every time you submit the form...?
[08:34:21] SteenJobs: no - so step 1 creates the object, and steps 2-5 update the object
[08:34:34] SteenJobs: so the create action will only be called when the form in step 1 is submitted
[08:34:44] SteenJobs: after that, all the logic will be within the update method
[08:35:06] sevenseacat: so you're trying to reinvent wicked, by the sounds of it
[08:35:08] jstransky: has joined #RubyOnRails
[08:35:16] SteenJobs: this approach seemed solid to me, my only hesitation was passing params[:company_id] in the template
[08:35:17] sevenseacat: but with a lot less functionality
[08:35:21] SteenJobs: sevenseacat: haha is that what wicked does??
[08:35:27] SteenJobs: that’s reassuring :)
[08:35:39] mikecmpbll: i'm confused about web drivers :[
[08:35:40] sevenseacat: but neither does your code
[08:35:42] SteenJobs: well for starters, i didn’t even know wicked existed
[08:36:02] SteenJobs: but i’m more curious re their approach - is it totally different than my implementation?
[08:36:08] SteenJobs: in terms of the general logic behind how it works
[08:36:10] sevenseacat: have a look at their approach?
[08:36:24] pawnbox: has joined #RubyOnRails
[08:36:43] mikecmpbll: so selenium webdriver can be used to driving a range of real browsers, like chrome, firefox etc
[08:36:44] SteenJobs: ha i knew that’s what you were going to say
[08:36:51] SteenJobs: but appropriately so
[08:36:57] sevenseacat: its also really really easy to break yours
[08:37:02] mikecmpbll: poltergeist is a driver for phantomjs, a headless browser?
[08:37:19] sevenseacat: by changing the params[:current_stage_num] variable
[08:37:40] sevenseacat: mikecmpbll: yes to both
[08:37:58] SteenJobs: sevenseacat: right - meaning if a user has errors in the form, they can still navigate to the next stage by increasing that param by 1
[08:38:19] mikecmpbll: sevenseacat : i've read selenium can also drive phantomjs, so I'd quite like to drop selenium into my test suite and use it with phantomjs, so that on a whim i can also test it with other real browsers without having to change much
[08:38:22] Aswebb_: has joined #RubyOnRails
[08:38:28] sevenseacat: SteenJobs: or meaning they can just start on the last page of the form
[08:38:43] mikecmpbll: i'm using poltergeist atm. i can't find anything about how to do that :[
[08:38:43] moep: has joined #RubyOnRails
[08:38:47] sevenseacat: mikecmpbll: i havent heard that one, but i avoid selenium at all costs
[08:38:55] SteenJobs: right, so short version being there’s no way to enforce going through the flow sequentially
[08:39:30] mikecmpbll: ugh as is often the case i think i found what i'm looking for
[08:39:34] pawnbox: has joined #RubyOnRails
[08:39:56] SteenJobs: sevenseacat: although there’s no real security concern there, so i guess the person altering the params would just be causing their own account to have incomplete information?
[08:40:17] SteenJobs: it’s honestly just one long form, but the creative director wants it to be comprised of five separate templates, so broken into five mini forms
[08:40:41] sevenseacat: without seeing the rest of your logic, i can only assume it's as broken as what you have showed
[08:41:00] arBmind: has joined #RubyOnRails
[08:41:29] krz: has joined #RubyOnRails
[08:41:30] Vircung: has joined #RubyOnRails
[08:42:00] sevenseacat: most wizards are just 'one long form' broken up into chunks to be less intimidating
[08:42:25] srinidhi: has joined #RubyOnRails
[08:43:23] SteenJobs: right so that’s exactly what it is - basically the object is created in the first form, and all subsequent chunks either the user or the object that was created
[08:43:26] sevenseacat: but if the user can trivially make the app render 500 errors, i'd say thats definitely broken
[08:43:56] SteenJobs: i guess since there are no real security issues that can come from not going sequentially, i wasn’t concerned, but yea it shouldn’t be that easy to throw a 500
[08:44:25] SteenJobs: aright - in that case i’ll take a look at wicked’s implementation, and see how they render the different form chunks dynamically
[08:45:01] vedu: has joined #RubyOnRails
[08:46:19] ferr: has joined #RubyOnRails
[08:48:18] Ropeney: has joined #RubyOnRails
[08:50:47] pawnbox: has joined #RubyOnRails
[08:56:51] pawnbox: has joined #RubyOnRails
[08:58:44] weckl: has joined #RubyOnRails
[09:00:43] lxsameer: has joined #RubyOnRails
[09:01:46] hotpancakes: has joined #RubyOnRails
[09:02:06] eregi: has joined #RubyOnRails
[09:04:19] n008f4g_: has joined #RubyOnRails
[09:06:59] moeabdol: has joined #RubyOnRails
[09:09:36] arup_r: has joined #RubyOnRails
[09:09:56] SteenJobs: sevenseacat: another annoyance, while Rails usually determines post vs. patch for the object you pass to your form, i have to specify the method i want, patch, in my form (although i figured since create and update have different helpers, rails would know post vs. patch based on the url helper i use)
[09:10:32] sevenseacat: nope, its all based on the object in the form_for
[09:10:36] sevenseacat: whether its persisted or not
[09:11:11] SteenJobs: cool, that’s good to know
[09:12:06] SteenJobs: and i guess there is a security concern - the user can just change the company_id, and he’ll be able to update any of the company objects he wants - unless there’s an added layer of defense in the controller logic that checks for a relationship between the company object and current_user
[09:13:27] djellemah: has joined #RubyOnRails
[09:13:58] sevenseacat: that sounds like basic authorization
[09:14:48] lyoshajapan: has joined #RubyOnRails
[09:16:22] SteenJobs: oh yea you’re right
[09:16:30] SteenJobs: totally scratch that
[09:16:32] SteenJobs: have it covered
[09:16:46] SteenJobs: it’s late. and i’m so thrown off by this weird wizard implementation
[09:17:25] navo: has joined #RubyOnRails
[09:20:16] Spami: has joined #RubyOnRails
[09:23:52] workmad3: has joined #RubyOnRails
[09:24:51] AzaToth: has joined #RubyOnRails
[09:25:39] defsdoor: has joined #RubyOnRails
[09:25:56] hotpancakes: has joined #RubyOnRails
[09:31:34] Olipro: has joined #RubyOnRails
[09:32:33] finnnnnnnnnnn: has joined #RubyOnRails
[09:32:38] wethu: has joined #RubyOnRails
[09:35:14] shibly: has joined #RubyOnRails
[09:35:45] shibly: has left #RubyOnRails: ()
[09:42:34] bronson: has joined #RubyOnRails
[09:50:03] siaW: i have a controller like this https://gist.github.com/siaw23/04195bd0556b6712ea19d0d8362accbb what i want to do is. any time i do a run a rake task the logger on line 7 posts the NEXT tweet. this is what i’m doing so far, creating and instance variable to keep track of index and incrementing it in the rake task. it’s not working and i could use some help
[09:52:27] quazimodo: has joined #RubyOnRails
[09:57:15] hotpancakes: has joined #RubyOnRails
[10:00:30] dtzuzu: has joined #RubyOnRails
[10:02:15] blackmesa: has joined #RubyOnRails
[10:02:28] tildes: siaw: what exactly doesn't work? what kind of error message do you get?
[10:03:15] siaW: i’m expecting the index variable i have set to “0” to be incremented by one each time i run the rake task
[10:03:33] siaW: it’s staying at 0 every single time i run the rake task
[10:04:16] siaW: hence, posting only the first tweet from the array always. but i want it to behave like this. first rake task, index 0, second time task is run, index 1, … and so one
[10:04:44] siaW: no error message. the task runs fine, but not doing what i want it to do
[10:05:07] Chagel_: has joined #RubyOnRails
[10:06:37] Ropeney: has joined #RubyOnRails
[10:06:38] artto: has joined #RubyOnRails
[10:06:46] Aherin: has joined #RubyOnRails
[10:10:34] Ergo: has joined #RubyOnRails
[10:11:11] lyoshajapan: has joined #RubyOnRails
[10:11:46] FooMunki: has joined #RubyOnRails
[10:15:11] renegadeandy: has joined #RubyOnRails
[10:19:52] renegadeandy: Hi everyone. If i have a rails view, and I can access an instance variable @my_name, why when I try to get it in my js.erb is it nill?
[10:20:25] uglybandersnatch: has joined #RubyOnRails
[10:21:56] deur-: renegadeandy: it's not set correctly in the controller, or its value really is nil
[10:22:27] tildes: siaw: just guessing, but what if you put @@index ||= 0
[10:22:49] siaW: let me check
[10:23:02] blackhuey: has joined #RubyOnRails
[10:23:13] tildes: renegadeandy you could set a breakpoint (byebug for instance) in your controller action, and see if @my_name is what it should be
[10:23:17] renegadeandy: deur-: Well it views fine like this <h1>output : <%= @my_name %></h1>
[10:23:46] Hates_: siaw: you probably don't want to use a variable like that
[10:23:48] renegadeandy: but it is nil in my js.erb when i do alert(“<%= @my_name %>”); Is it because im not using respond_to
[10:24:23] Hates_: siaw: the value isn't persisted between runs
[10:24:40] Glyphik: hi guys. i've got a demo twitter app up and running and was wondering if i could get some feedback on it. you can find the code as well as a link to a live demo here: https://github.com/psyglyphik/tweet-reader
[10:25:09] siaW: Hates_: i realised that. how do i make it persisted between runs?
[10:25:10] hotpancakes: has joined #RubyOnRails
[10:25:19] Hates_: siaw: you will need to store it in the database
[10:25:43] siaW: i thought of that but thought there’d be an easier way
[10:26:17] Hates_: siaw: well you need to store it somewhere apart from memory :) database, redis, file etc
[10:26:17] FooMunki: has joined #RubyOnRails
[10:26:51] Hates_: renegadeandy: is your alert actually showing?
[10:27:08] deur-: renegadeandy: probably so. you can also try and use before_action and point to a method where you assign the instance variable
[10:27:26] siaW: thanks tildes and Hates_
[10:27:28] dvinciguerra__: has joined #RubyOnRails
[10:27:51] Megamos: has joined #RubyOnRails
[10:27:51] Hates_: siaw: you don't generally use class instance variables, or call controllers like that from rake tasks
[10:28:26] tildes: siaw: Hates_ has got a point here
[10:28:40] siaW: well now i know. i wanted to increment the index after each rake run
[10:29:03] adlerdias_: has joined #RubyOnRails
[10:29:11] Hates_: *I mean class variables
[10:29:24] pawnbox: has joined #RubyOnRails
[10:29:46] adlerdias_: has joined #RubyOnRails
[10:30:35] renegadeandy: its showing but with an empty string
[10:30:40] alfie_max15: has joined #RubyOnRails
[10:30:50] renegadeandy: tildes: so basically all @my_name = “hello” variables in my controller dont show through
[10:30:57] alfie_max15: i'm kinda stuck right now
[10:30:59] Hates_: renegadeandy: put your controller in a gist
[10:31:05] tildes: siaw: redis is actually fast and easy to use and good with rails, you could give it a shot, to store the counter
[10:31:23] alfie_max15: i have a user model, which has a status field and a subdomain field
[10:31:34] renegadeandy: tildes: https://gist.github.com/renegadeandy/5474af43d34b56c3a22ca504e8cf0f1c
[10:31:38] alfie_max15: and if the status of the user is archived, i want the subdomain to be available for a new user to claim
[10:31:48] renegadeandy: tildes: so @event is always nil
[10:31:53] renegadeandy: @nextDate is always nil
[10:31:57] renegadeandy: only in my js.erb files
[10:32:00] alfie_max15: how can i modify my subdomain uniqueness validation so that this is possible?
[10:32:01] renegadeandy: in my html.erb files its fine
[10:32:33] tildes: renegadeandy I really know nothing about js.erb, sorry. seems that you have verified that the variables are set correctly
[10:33:24] tildes: stackoverflow could be a good bet. or tutorials. or docs
[10:33:56] lxsameer: has joined #RubyOnRails
[10:34:44] baweaver: has joined #RubyOnRails
[10:34:56] arBmind: has joined #RubyOnRails
[10:35:14] pawnbox_: has joined #RubyOnRails
[10:35:43] Hates_: renegadeandy: can you also gist your html and js views
[10:36:25] Hates_: renegadeandy: have you tried setting a dummy variable like @test = "Hello" and seeing if you can get that to appear in both views?
[10:37:01] renegadeandy: Hates_: yeah - it is nil in js.erb and its correct in html erb
[10:39:21] Aswebb_: has joined #RubyOnRails
[10:40:17] renegadeandy: Hates_: https://gist.github.com/renegadeandy/00c88f2432fdca8417a5597c69576416
[10:41:09] lxsameer: has joined #RubyOnRails
[10:44:56] solars: has joined #RubyOnRails
[10:45:15] siaW: has left #RubyOnRails: ()
[10:46:06] sandstrom: has joined #RubyOnRails
[10:46:36] Hates_: renegadeandy: why isn't it called show.js.erb?
[10:46:43] uglybandersnatch: has joined #RubyOnRails
[10:47:19] renegadeandy: well the view is called show.html.erb = and the javascript, which is in assets/javascript/events.js.erb is called that - I do some handling of naming in the application.html.erb - so the correct file is loaded
[10:47:26] pawnbox: has joined #RubyOnRails
[10:47:45] renegadeandy: we dont need javascript on a per view basis, more on a controller basis which is why we use that namign convention instead
[10:48:33] tildes: alfie_max15: could you show what you have got currently?
[10:49:24] Hates_: renegadeandy: I'm pretty sure you can't access instance vars inside asset pipeline files
[10:49:47] renegadeandy: certainly what it seems like….why not? That seems a bit restrictive?
[10:50:08] eregi: has joined #RubyOnRails
[10:50:12] renegadeandy: it forces the developer to have js inside their view code, which ideally would be just html,,,rather than mixed js and html
[10:50:57] Hates_: renegadeandy: no, you can have just plain JS, it just needs to live in your views directory
[10:51:10] Hates_: renegadeandy: it's because of the pre-processing
[10:51:22] Hates_: renegadeandy: how could you access a variable when your JS is pre-compiled?
[10:51:24] workmad3: renegadeandy: asset pipeline has no access to the request environment at all, because it's not rendered as part of a normal request... ideally, it'll be precompiled and served from the filesystem, or at a minimum it'll be compiled on-the-fly with separate requests to specific assets
[10:51:28] tildes: renegadeandy: is this relates somehow? http://stackoverflow.com/questions/25443273/how-to-pass-parameter-to-js-erb-in-rails
[10:51:44] renegadeandy: so if events.js.erb is inside the views directory…it has access to instance vairables?
[10:51:56] Hates_: renegadeandy: yeah, you need to call it show.js
[10:52:04] Hates_: show.js.erb
[10:52:17] renegadeandy: Hates_: and will RoR load that automatically, or do i need to include it in the show.html.erb file?
[10:52:33] Hates_: renegadeandy: well they are two separate requests
[10:52:45] Hates_: renegadeandy: /events/1 and /events/1.js
[10:52:56] Hates_: renegadeandy: one renders .html and one renders .js
[10:53:04] renegadeandy: Hates_: ok…but i don’t need to reference 1.js in my 1.html.erb
[10:53:08] workmad3: renegadeandy: the recommended practice is to separate data from JS so that you're not dynamically generating JS just to get some instance variable data into it... instead you'd ideally be passing that data as either a JSON-encoded response to a request or embedding it in the DOM (as data-* attributes, for example) and pulling it out with JS
[10:53:09] renegadeandy: in order to make it load
[10:53:28] xardion_: has joined #RubyOnRails
[10:53:36] workmad3: renegadeandy: if you're doing a JS view, then you'd need to include a script tag for that in the page you want to load it on
[10:53:48] renegadeandy: workmad3: thanksa lot guys - makes sense, learnt a lot
[10:55:03] renegadeandy: what would the include tag look like, to find the show.js.erb inside the view?
[10:55:20] renegadeandy: because the javascript_include_tag is relative to the assets
[10:56:14] yaewa: has joined #RubyOnRails
[10:56:22] lxsameer: has joined #RubyOnRails
[10:56:38] hotpancakes: has joined #RubyOnRails
[10:56:43] artto: has joined #RubyOnRails
[10:57:37] blackmesa: has joined #RubyOnRails
[11:01:00] artto: has joined #RubyOnRails
[11:02:25] vale_tudo: has joined #RubyOnRails
[11:02:56] spiman: has joined #RubyOnRails
[11:04:15] srinidhi: has joined #RubyOnRails
[11:05:09] platzhirsch: has joined #RubyOnRails
[11:05:12] GodFather: has joined #RubyOnRails
[11:05:28] platzhirsch: Is it possible to do .delete_all, but in batches? Rather than just one fat SQL DELETE?
[11:06:27] alfie_max15: has joined #RubyOnRails
[11:06:32] platzhirsch: probably just find_in_batches
[11:06:32] Hates_: platzhirsch: any reason you don't want to do them all in one go?
[11:06:47] spiman: is anyone using the sprockets-es6 gem? for some reason my scripts fail if i use the spread operator
[11:06:51] platzhirsch: Hates_: Yes, it might affect couple of millions and isn't that quite expensive?
[11:07:50] yfeldblum: has joined #RubyOnRails
[11:07:50] Hates_: platzhirsch: ahh that is quite a lot :P
[11:08:00] platzhirsch: I know, right!
[11:08:39] Hates_: platzhirsch: although finding_in_batches may end up being just as slow
[11:11:31] Hates_: platzhirsch: you could perhaps do it with a subquery and put a limit on that
[11:12:34] Hates_: platzhirsch: but I don't know if you can get the number of rows deleted then just keep looping until it equals 0
[11:13:54] arBmind: has joined #RubyOnRails
[11:14:27] myntcake: has joined #RubyOnRails
[11:17:18] rodfersou: has joined #RubyOnRails
[11:18:18] siaW: has joined #RubyOnRails
[11:22:16] rickmasta: has joined #RubyOnRails
[11:23:46] mauro1254: has joined #RubyOnRails
[11:24:13] sadaf2605: has joined #RubyOnRails
[11:25:11] hotpancakes: has joined #RubyOnRails
[11:25:26] mauro1254: Hi guys, yesterday I asked few questions about polymorphism and now I have another one. Is it possible to implement a one to one Polymorphism using models inheritance as STI does?
[11:26:12] mauro1254: I have Document base model and Doc A, Doc B, Doc C.
[11:26:19] alfie_max15: i have a user model, which has a status field and a subdomain field
[11:26:20] alfie_max15: and if the status of the user is archived, i want the subdomain to be available for a new user to claim
[11:26:23] alfie_max15: how can i modify my subdomain uniqueness validation so that this is possible?
[11:26:30] alfie_max15: would i have to write custom validation?
[11:27:03] beauby: has joined #RubyOnRails
[11:27:37] alfie_max15: that's how i've done right now, and that's the only solution checking a few SO answers
[11:28:30] stannard: has joined #RubyOnRails
[11:29:45] GodFather: has joined #RubyOnRails
[11:30:06] Macaveli: http://www.omgubuntu.co.uk/2016/03/microsoft-brings-ubuntu-to-windows-10
[11:33:18] Jasaka: has joined #RubyOnRails
[11:33:38] rubyonrailed: has joined #RubyOnRails
[11:34:23] rvanlieshout: Macaveli: you still didn't abandon that windows-thing?
[11:34:45] Macaveli: rvanlieshout I am on mac for 2 years now :p
[11:34:56] Macaveli: I almost suicided after using windows for 2 months with rails
[11:37:26] Aswebb_: has joined #RubyOnRails
[11:37:38] rvanlieshout: i never did rails on windows
[11:38:10] arup_r: has joined #RubyOnRails
[11:38:41] Ergo: has joined #RubyOnRails
[11:38:48] Palsson: has joined #RubyOnRails
[11:39:39] ELCALOR_: has left #RubyOnRails: ()
[11:40:27] ELCALOR: has joined #RubyOnRails
[11:41:54] siaW: any help with this: http://stackoverflow.com/questions/36307740/increment-array-index-after-rake-task
[11:44:06] rvanlieshout: don't use class variables
[11:44:22] bronson: has joined #RubyOnRails
[11:44:23] rvanlieshout: but besides that; what is the usecase for this?
[11:44:40] King_Rex: has joined #RubyOnRails
[11:45:04] RegulationD: has joined #RubyOnRails
[11:45:15] ldnunes: has joined #RubyOnRails
[11:45:26] siaW: well. i’m trying to have users set a time interval on an array of posts. then i’ll use rake task to grap the interval they set and post the string in their array
[11:45:45] finnnnnnnnnnn: has joined #RubyOnRails
[11:46:10] rvanlieshout: you wan what?
[11:46:20] rvanlieshout: what is a 'a time interval on array of posts'?
[11:46:23] mauro1254: Any idea? Is there a way to have Models inheritance with polymorphism?
[11:46:50] rvanlieshout: mauro1254: you can include stuff dynamically
[11:46:58] gambl0re: has joined #RubyOnRails
[11:47:17] siaW: sorry. i mean i want user to able to set how period some posts will be made. the posts are strings in an array
[11:47:28] siaW: so like every, hour, every 24 hours etc
[11:48:07] rvanlieshout: for now i understand the part where a user has given you a timeframe like 'every hour' or 'every 24 hours'
[11:48:08] siaW: and i’ll let the rake task run periodially for whatever they set. but will iterate the post (the strings in the array)
[11:48:30] rvanlieshout: and the question here is how to have it run at that scheduled interval?
[11:48:51] siaW: by iterating through the set of posts in the array
[11:48:51] rvanlieshout: consider using whenever for that. it's a gem that allows you to configure cron use a schedule.rb
[11:49:00] siaW: i’m using it.
[11:49:04] rvanlieshout: that last part confuses me
[11:49:10] rodferso1: has joined #RubyOnRails
[11:49:14] rvanlieshout: why do you need to iterate over something to determine when something has to be performed?
[11:49:30] siaW: ok. maybe it’s easier this way
[11:49:36] siaW: a user has a set of posts
[11:49:41] siaW: could be 300 or 500
[11:49:46] siaW: say in an array
[11:49:59] rvanlieshout: i hope it's not an array
[11:50:02] rodferso1: has joined #RubyOnRails
[11:50:04] siaW: now the users says, “i want to post each item in my array each hour”
[11:50:32] mauro1254: rvanlieshout: an example?
[11:50:43] mauro1254: I have a one to one polymorphism
[11:50:56] rvanlieshout: mauro1254: and example of what? include Foobar
[11:52:57] mauro1254: rvanlieshout: I have a Document model and then DocA, DocB and DocC models
[11:53:12] spiman: has joined #RubyOnRails
[11:53:13] tribals: has joined #RubyOnRails
[11:53:22] mauro1254: I would like DocA, DocB, DocC extend Document
[11:53:28] rvanlieshout: are you using STI?
[11:53:33] mauro1254: This is easy with STI
[11:53:48] rvanlieshout: class DocA < Document
[11:53:55] mauro1254: I don't want columns with null values
[11:54:00] rvanlieshout: in 105% of the cases
[11:54:04] rvanlieshout: i've seen here
[11:54:12] alfie_max15: has joined #RubyOnRails
[11:54:14] tribals: it is possible to expire data cached by `Rails.cache.fetch`?
[11:55:04] mauro1254: But I would like to handle CRUD iperarions on different types of document with one controller (code is very similar)
[11:55:20] mauro1254: And it make sense that DocA, DocB, DocC exten Document
[11:55:24] rvanlieshout: tribals: there is a .delete or .delete_matched
[11:55:31] rvanlieshout: mauro1254: use concerns for that
[11:55:35] mauro1254: The fact is that polymorphism is based on composition ...
[11:55:51] rvanlieshout: don't try to over-do and place everything in 1 controller
[11:56:25] mauro1254: rvanlieshout: I would like to see an example but I didn't find anything
[11:56:39] hotpancakes: has joined #RubyOnRails
[11:56:46] rvanlieshout: mauro1254: an example of what?
[11:57:03] rvanlieshout: and how is this polymorphic
[11:57:11] mauro1254: Polymorphis one to one with a good implementation
[11:57:15] rvanlieshout: you just have docA, docB and docC that share some stuff
[11:57:32] rvanlieshout: so what's polymorphic about this?
[11:57:38] mauro1254: Document => documents table with common data
[11:58:02] rvanlieshout: ooh like that
[11:58:10] mauro1254: DocA, DocB, DocC have their own table
[11:58:13] helpa: Please do not use fake values, as they can be confusing or misleading. Sometimes both.
[11:58:20] rvanlieshout: but beside that. just include those columns on those 3 tables?
[11:58:31] rvanlieshout: or you have read about the exact impact of null columns over accessing a second table>
[11:58:57] mauro1254: Documents table has a doze on columns
[11:59:14] mauro1254: I don't want to repeat these columns in each table
[11:59:51] rvanlieshout: what space does a null column actually cost?
[12:01:43] artto: has joined #RubyOnRails
[12:01:52] mauro1254: Thos columns won't be null
[12:02:29] FooMunki: has joined #RubyOnRails
[12:03:07] rvanlieshout: so then why a separate table?
[12:03:11] rvanlieshout: what's the benefit?
[12:04:00] rvanlieshout: besides that it's slower to fetch the data
[12:04:07] rvanlieshout: although that's not really a benefit :)
[12:04:40] walidvb: has joined #RubyOnRails
[12:04:52] rvanlieshout: walidvb: !ask
[12:04:52] helpa: walidvb: How to ask good questions and get great answers: http://www.mikeash.com/getting_answers.html
[12:05:36] walidvb: rvanlieshout: thx :)
[12:09:43] mauro1254: Document has a dozen of shared fields. Event is a document with 4 additional fields, Publication is a document with 1 additional field, ...
[12:11:07] artto_: has joined #RubyOnRails
[12:11:31] itgoner: has joined #RubyOnRails
[12:12:41] getbrandao: has joined #RubyOnRails
[12:12:57] rvanlieshout: cause just adding those fiels feels like a simple solution
[12:13:26] rvanlieshout: or an enum on document that states what it is, event, publication, ...
[12:13:33] rvanlieshout: and based on that some extra validations
[12:13:43] mauro1254: rvanlieshout: I need to add several relations
[12:14:01] mauro1254: Publication belongs_to Document, Event belongs_to Document
[12:14:04] mauro1254: But then ...
[12:14:15] mauro1254: Document has_one Publication
[12:14:26] mauro1254: Document has_one Event ...
[12:14:51] tvw: has joined #RubyOnRails
[12:15:01] rvanlieshout: so event also has_one event?
[12:15:32] AntiSpamMeta: has joined #RubyOnRails
[12:15:48] mauro1254: You suggested using has_one <-> belongs_to
[12:16:06] rvanlieshout: yeah. event has_one document
[12:16:11] rvanlieshout: publication has_one document
[12:16:23] mauro1254: document belongs_to what?
[12:16:35] rvanlieshout: both event and publication
[12:16:42] mauro1254: document cannot be an event and also a publication
[12:16:50] rvanlieshout: so add a validation
[12:16:59] rvanlieshout: or document belongs to documentable
[12:17:05] rvanlieshout: then that would be a polymorphic association
[12:17:10] rvanlieshout: which has benefits
[12:17:11] hotpancakes: has joined #RubyOnRails
[12:17:13] rvanlieshout: but also downsides
[12:17:26] rvanlieshout: when joining it you'll need to compare 2 fields where one is a stringish type
[12:17:35] mauro1254: This is what I'm asking for ... a way to handle the polymorphism
[12:17:45] rvanlieshout: just a normal polymorphic relationship
[12:17:48] rvanlieshout: nothing special
[12:18:04] mauro1254: what about controllers?
[12:18:15] rvanlieshout: nested fields
[12:18:29] rvanlieshout: event accepts_attributes_for :document
[12:18:33] mauro1254: PublicationsController, EventsController, ... with similar code?
[12:18:57] rvanlieshout: that's why concerns exist
[12:19:02] mauro1254: DocumentsController or N controllers?
[12:19:13] rvanlieshout: not really n, 2
[12:19:39] rvanlieshout: and the controller doesn't even have to know about this accepts_nested_attributes_for / fields_for
[12:19:42] rvanlieshout: except for strong params
[12:19:46] mauro1254: Yes, but if in the future I will add a new document type, then I neeed a new controller
[12:20:01] rvanlieshout: if it's a document type it should be a property of document
[12:20:03] rvanlieshout: not a separate model
[12:21:06] mauro1254: sorry, with document type I mean another kind of document, with same basis but with different additional fields
[12:21:21] rvanlieshout: why an additional model?
[12:21:39] rvanlieshout: just because of those few extra fields per type?
[12:21:43] rvanlieshout: where you have 2 types?
[12:25:31] j3r0: has joined #RubyOnRails
[12:26:02] mauro1254: Document is the basis
[12:26:33] mauro1254: Event is a type of document with extra fields, the same is for Publication
[12:27:03] hotpancakes: has joined #RubyOnRails
[12:27:12] rvanlieshout: yes. but imho you're really overcomplicating a solution with a enum document_type + a few fields
[12:27:47] Ergo^: has joined #RubyOnRails
[12:29:02] mauro1254: rvanlieshout: this is STI
[12:29:10] mauro1254: I would like to avoid STI
[12:29:17] rvanlieshout: then don't use STI
[12:29:38] rvanlieshout: either use 2 tables with all document-columns + specific columns or 1 tables containing all columns
[12:30:39] rvanlieshout: or use a normal or polymorphic relationship from document to event and to publication
[12:30:49] rvanlieshout: 3 solutions that don't require STI
[12:32:35] mauro1254: I want to use a polymorphic relationship, it seems the cleanest solution
[12:33:09] rvanlieshout: then document belongs to :documentable, polymorphic: true
[12:33:12] rvanlieshout: but still add 2 controllers
[12:33:34] mauro1254: But it is strange to have models that "depends" on document and that, alone, are non sense ...
[12:34:02] rvanlieshout: then use concerns for that
[12:34:05] mrchris: has joined #RubyOnRails
[12:34:25] rvanlieshout: and why is it weird to have a event has_one :document, as: :documentable
[12:35:02] context: or use a normal table +1 json column for type specific data
[12:35:30] baweaver: has joined #RubyOnRails
[12:35:39] context: or, just use 4 tables
[12:35:44] rvanlieshout: don't use json column
[12:35:47] rvanlieshout: just add separate fields
[12:35:54] context: and you'd have not been having the predicament for 2 whole days
[12:35:55] rvanlieshout: if you ever want to query on them
[12:36:09] context: you can query json fields
[12:36:40] rvanlieshout: but why json field over separate field?
[12:36:59] context: fieldS. easier? laziness?
[12:37:02] chrisml: has joined #RubyOnRails
[12:37:17] context: if he is stuck on not using 3/4 separate tables
[12:37:23] rvanlieshout: it's not cleaner
[12:37:43] rvanlieshout: it's using a relational db in a somewhat-document-based-way
[12:37:48] context: its cleaner than have 12 + 5 + 5 + 5 (+5) (+5) for each different type using the table
[12:38:08] rvanlieshout: so you purly base this on column count?
[12:38:14] eregi: has joined #RubyOnRails
[12:38:24] context: column usage.
[12:38:47] rvanlieshout: and empty columns are bad?
[12:38:51] rvanlieshout: over querying json
[12:39:03] petor: has joined #RubyOnRails
[12:39:06] context: you dont purposely setup your schema/data so you know as a fact 1/3rd or less of the records are even using half the columns
[12:39:38] context: i literally are saying half the table is useless at that point and your schema sucks.
[12:39:44] rvanlieshout: but the column count is not really relevant
[12:39:54] rvanlieshout: i'm ok with choosing something based on facts
[12:39:57] rvanlieshout: but on on mearly column count
[12:39:58] context: you said count not me
[12:40:17] rvanlieshout: then why do we prefer json over multiple columns?
[12:40:24] rvanlieshout: each with a proper type
[12:40:29] rvanlieshout: index and whatnot
[12:40:57] context: http://stackoverflow.com/questions/17807030/how-to-create-index-on-json-field-in-postgres-9-3
[12:41:01] alfie_max15: has left #RubyOnRails: ()
[12:41:01] context: you can index json fields...
[12:41:13] rvanlieshout: but still it doesn't contain a type
[12:41:36] context: either way this discussion is WAY off base without knowing any actual requirements of the issue at hand
[12:41:42] context: as of now we are just throwing theories around
[12:41:57] mauro1254: Many tanks for your help, there are more solutions, each with advantages and disadvantages :)
[12:42:23] context: and he was talking about this yesterday. he just needs to pick a solution and role with it, if its "wrong" whatever, you can always shuffle data around at a later date
[12:42:28] rvanlieshout: and use whichever makes you feel happy, except STI
[12:43:00] context: i will personally say, DO NOT use STI.
[12:43:04] renanoronfle: has joined #RubyOnRails
[12:43:19] rodfersou: has joined #RubyOnRails
[12:43:21] context: STI is like regular expressions. yeah it is a solution to many problems, but it is very very rarely the proper solution
[12:43:33] rvanlieshout: hmm. i do prefer regexes
[12:43:44] dvinciguerra__: has joined #RubyOnRails
[12:44:03] context: and yes, i know as a new person to ruby/rails, and firs time hearing about it that STI sounds awesome.
[12:47:51] georgedrummond: has joined #RubyOnRails
[12:49:14] chagel: has joined #RubyOnRails
[12:50:25] beauby: has joined #RubyOnRails
[12:50:30] drbayer: has joined #RubyOnRails
[12:55:10] quazimodo: has joined #RubyOnRails
[12:58:20] arup_r: has joined #RubyOnRails
[12:59:06] sudoubuntu: has joined #RubyOnRails
[13:01:56] nfk|laptop: has joined #RubyOnRails
[13:02:25] pawnbox: has joined #RubyOnRails
[13:03:23] fexilal: has joined #RubyOnRails
[13:04:48] f3ttX]: has joined #RubyOnRails
[13:09:20] pawnbox: has joined #RubyOnRails
[13:11:28] beauby: has joined #RubyOnRails
[13:11:48] _Tariq: has joined #RubyOnRails
[13:12:23] GodFather: has joined #RubyOnRails
[13:12:50] yellow5: has joined #RubyOnRails
[13:13:07] Aswebb_: has joined #RubyOnRails
[13:14:02] mrgreenfur: has joined #RubyOnRails
[13:15:03] blackmesa: has joined #RubyOnRails
[13:19:04] sypheren: has joined #RubyOnRails
[13:20:16] kies: has joined #RubyOnRails
[13:20:50] llakey: has joined #RubyOnRails
[13:21:42] Ikri: has joined #RubyOnRails
[13:22:00] redondos: has joined #RubyOnRails
[13:22:20] felltir: has joined #RubyOnRails
[13:22:35] finnnnnnnnnnn: has joined #RubyOnRails
[13:22:42] myntcake: has joined #RubyOnRails
[13:23:01] roshanavand: has joined #RubyOnRails
[13:23:37] epochwolf: context: regex is always the solution
[13:23:50] c355E3B: has joined #RubyOnRails
[13:23:56] workmad3: if you can't solve if with regexps, you're solving the wrong problem, amirite?
[13:24:00] akshat: has joined #RubyOnRails
[13:25:51] codepete: has joined #RubyOnRails
[13:27:15] mDuff: has joined #RubyOnRails
[13:28:47] quazimodo: has joined #RubyOnRails
[13:29:23] IrishGringo: has joined #RubyOnRails
[13:29:31] context: workmad3: heard that
[13:29:54] Ropeney: has joined #RubyOnRails
[13:34:16] sudoubuntu: has joined #RubyOnRails
[13:34:18] rubyonrailed: has joined #RubyOnRails
[13:36:28] hotpancakes: has joined #RubyOnRails
[13:38:08] kp666: has joined #RubyOnRails
[13:45:31] krz: has joined #RubyOnRails
[13:46:31] bronson: has joined #RubyOnRails
[13:46:59] stannard: has joined #RubyOnRails
[13:47:41] stannard: has joined #RubyOnRails
[13:51:11] stannard: has joined #RubyOnRails
[13:52:16] TvL2386: has joined #RubyOnRails
[13:58:50] roshanavand: has joined #RubyOnRails
[13:59:28] AckZ: has joined #RubyOnRails
[13:59:37] axl_: has joined #RubyOnRails
[14:01:07] tvw: has joined #RubyOnRails
[14:02:27] User458764: has joined #RubyOnRails
[14:04:44] Dbugger: has joined #RubyOnRails
[14:04:46] Dbugger: Hello everyone
[14:04:54] Dbugger: Happy after-easter :)
[14:06:21] edwinvdgraaf: has joined #RubyOnRails
[14:06:25] Dbugger: I have a question. I have a Products model, with a "has_many :order, through: ..." and I was wondering. how can I make a scope to get the Products, whose order only contain a certain string?
[14:06:41] hotpancakes: has joined #RubyOnRails
[14:07:28] Dbugger: I know how to get the orders, with "where("order_no LIKE ?", "%#{needle}%")"... but not sure how to filter out the Products
[14:08:46] _Tariq: has joined #RubyOnRails
[14:08:50] finnnnnnnnnnn: has joined #RubyOnRails
[14:09:07] brazenbraden: has joined #RubyOnRails
[14:09:59] brazenbraden: hi all. im having a little trouble permitting the phone params. im not using AR so my params come back a little differently. have I mis-formed them? https://gist.github.com/brazenbraden/30d93d954f33b54b2fb68a22442c269e
[14:10:37] sevenseacat: BrazenBraden: you have a syntax error in your permitted_params method.
[14:11:46] brazenbraden: oh, the extra comma? removed it.
[14:12:02] sevenseacat: can you gist the real code?
[14:12:35] brazenbraden: that is the real code (bar params for emails which Im still working on). you want to see the full controller? or view?
[14:12:58] sevenseacat: no, i want to see the real permitted_params method
[14:13:18] _Tariq: has joined #RubyOnRails
[14:13:37] sevenseacat: knowing what the problem with the code is would help also
[14:14:23] hxegon: has joined #RubyOnRails
[14:14:30] matthewd: https://gist.github.com/brazenbraden/30d93d954f33b54b2fb68a22442c269e#file-params-log-L13
[14:14:31] brazenbraden: oh sorry, my bad. the resulting "permitted_params" for phones is {} (empty)
[14:14:36] snowy: has joined #RubyOnRails
[14:14:57] Dbugger: Is it possible to do something like in line 7, (but that works :P) ? https://gist.github.com/enriquemorenotent/b0152d16c153db1edd0bd5878626dcb9
[14:15:46] sevenseacat: BrazenBraden: and what do your logs say about it
[14:16:55] epochwolf: dbugger: why isn't line 7 working? What's the error?
[14:17:37] epochwolf: other than the syntax error.
[14:18:23] Dbugger: What is the syntax error?
[14:18:33] brazenbraden: updated gist with form partial and full controller. logs dont say anything except spitting out the request with the params. im breaking in my new action and testing via better_errors
[14:18:33] Dbugger: I thoguht the syntax was correct, but the concept was not doable
[14:19:01] sevenseacat: BrazenBraden: gist the logs please
[14:19:05] epochwolf: dbugger: wait, are you trying to search on an assocation?
[14:19:25] Dbugger: I am trying to filter out the Products, based on their associations
[14:19:25] brazenbraden: k. gimme a sec
[14:20:40] sdwrage: has joined #RubyOnRails
[14:20:42] russt: has joined #RubyOnRails
[14:20:50] _Tariq: has joined #RubyOnRails
[14:21:23] hotpancakes: has joined #RubyOnRails
[14:21:27] brazenbraden: updated with logs. its obviously breaking at xxx cos im halting execution there to check what per_params gives me
[14:21:34] epochwolf: dbugger: what you're looking for is a join: http://guides.rubyonrails.org/active_record_querying.html#joining-tables
[14:21:54] rogue_koder: has joined #RubyOnRails
[14:22:28] Rubie: has joined #RubyOnRails
[14:23:24] sevenseacat: grr, the logs are from before you call permitted_params
[14:23:42] sevenseacat: thats the bit i wanted to see
[14:24:07] brazenbraden: i will store the perm_params in a variable then break after. hang on.
[14:25:35] fmcgeough: has joined #RubyOnRails
[14:26:01] brazenbraden: sevenseacat, updated. its not permitting the random numbers (which it shouldnt)
[14:26:12] sevenseacat: on a side note, i wish raising on unpermitted params was the default
[14:26:21] eregi: has joined #RubyOnRails
[14:26:30] blackmesa: has joined #RubyOnRails
[14:27:06] brazenbraden: if i dont generated the random numbers for the fields, then only the last one gets sent :(
[14:27:14] arup_r: has joined #RubyOnRails
[14:27:40] jmignault: has joined #RubyOnRails
[14:27:42] brazenbraden: since im not using AR, im not using accepts_nested_attributes so I have to do this all manually
[14:27:52] sevenseacat: BrazenBraden: i believe the keys have to be integers, not floats
[14:28:08] brazenbraden: i will give that a shot
[14:28:11] sevenseacat: > Hashes with integer keys are treated differently and you can declare the attributes as if they were direct children.
[14:28:28] Dbugger: epochwolf, the problem is that there are 4 or 5 tables between my model and the one where the field is
[14:28:37] brazenbraden: i see. wish the hours of googling would have highlighted that lol
[14:28:42] Dbugger: epochwolf, so I was wondering if there was some way of using the :orders to access it directly
[14:28:47] epochwolf: dbugger: then you need to join 4 or 5 tables.
[14:28:48] brazenbraden: lemme update the code and see what happens.. gimme a sec
[14:28:53] sevenseacat: BrazenBraden: http://guides.rubyonrails.org/action_controller_overview.html#strong-parameters section 4.5.3
[14:29:18] sevenseacat: its why timestamps are usually used for index keys
[14:29:27] sevenseacat: that and to reduce collision methinks
[14:29:29] matthewd: BrazenBraden: Where are the random numbers coming from? A small-but-nonzero chance that one row will be ignored seems.. undesirable
[14:29:37] matthewd: Yeah, that :)
[14:30:11] brazenbraden: doing them in JS (unfortunately)
[14:30:39] Dbugger: epochwolf, so there is no way to use the already stablished relationship within the scope? :(
[14:31:46] epochwolf: dbugger: joins(:orders).where("orders.order_no LIKE ?", "%#{needle}%")
[14:32:04] epochwolf: That'll still join all those tables underneath.
[14:32:10] arup_r: has joined #RubyOnRails
[14:32:33] Dbugger: oh, really? Let me see..
[14:32:41] brazenbraden: why is NFS so slooooowwwww
[14:33:08] epochwolf: BrazenBraden: really? You're asking us why a network file system is slow?
[14:33:29] brazenbraden: just a side rant
[14:33:37] brazenbraden: wasnt asking for solutions lol
[14:33:45] epochwolf: Solution: Don't use NFS.
[14:33:56] brazenbraden: sevenseacat, i could hug you
[14:34:02] brazenbraden: but thank you!!!
[14:34:07] epochwolf: BrazenBraden: breathing in this channel is asking for a solution. ;)
[14:34:20] brazenbraden: ACTION heavy breathing
[14:34:24] sevenseacat: epochwolf: thats definitely one we can solve. *sharpens knives
[14:34:35] epochwolf: sevenseacat: exactly my thinking.
[14:35:28] rubyonrailed: has joined #RubyOnRails
[14:35:59] lyoshajapan: has joined #RubyOnRails
[14:36:16] Frem: has joined #RubyOnRails
[14:37:25] wldcordeiro: has joined #RubyOnRails
[14:37:26] baweaver: has joined #RubyOnRails
[14:37:26] _Tariq: has joined #RubyOnRails
[14:37:32] adavia: has joined #RubyOnRails
[14:42:05] andywww: has joined #RubyOnRails
[14:44:48] dopamean_: has joined #RubyOnRails
[14:46:01] Rubie: has joined #RubyOnRails
[14:48:45] _Tariq: has joined #RubyOnRails
[14:55:19] RegulationD: has joined #RubyOnRails
[14:55:50] _Tariq: has joined #RubyOnRails
[14:58:38] fedexo: has joined #RubyOnRails
[15:00:58] eregi: has joined #RubyOnRails
[15:01:03] snowy: has joined #RubyOnRails
[15:01:31] davee_: has joined #RubyOnRails
[15:02:11] GodFodder: has joined #RubyOnRails
[15:02:41] GodFodder: has joined #RubyOnRails
[15:04:00] blackmesa: has joined #RubyOnRails
[15:05:01] GodFodder: has joined #RubyOnRails
[15:09:36] uglybandersnatch: has joined #RubyOnRails
[15:11:16] Rubie: has joined #RubyOnRails
[15:11:38] crystal77: has joined #RubyOnRails
[15:13:33] mDuff: has joined #RubyOnRails
[15:13:50] n008f4g_: has joined #RubyOnRails
[15:14:26] gabr13l: has joined #RubyOnRails
[15:15:19] Rubie: has joined #RubyOnRails
[15:16:20] _Tariq: has joined #RubyOnRails
[15:19:11] Dbugger: epochwolf, worked miracles. Thanks!
[15:20:14] epochwolf: dbugger: you're welcome.
[15:21:03] mDuff: has joined #RubyOnRails
[15:21:52] sypheren: has joined #RubyOnRails
[15:25:06] disgrntld: has joined #RubyOnRails
[15:25:59] eregi: has joined #RubyOnRails
[15:28:16] diegoaguilar: has joined #RubyOnRails
[15:29:02] kies: has joined #RubyOnRails
[15:29:16] arup_r: has joined #RubyOnRails
[15:29:19] fox_mulder_cp: how to make !seen $user here?
[15:29:40] sevenseacat: we have it here.
[15:30:07] Dbugger: epochwolf, I have a problem. I did it for another field, but I got this error: "Cannot eagerly load the polymorphic association :product"
[15:30:32] Dbugger: I did join(:product), but since the polymorphism is on, it did not work... any workaround around that?
[15:31:47] tekk: has joined #RubyOnRails
[15:37:10] _Tariq: has joined #RubyOnRails
[15:38:29] context: from what i know you cant eager load polymorphic joins
[15:38:34] context: because its polymorphic.
[15:39:21] kt2: has joined #RubyOnRails
[15:39:45] _Tariq: has joined #RubyOnRails
[15:40:19] King_Rex: has joined #RubyOnRails
[15:40:38] brendan-: has joined #RubyOnRails
[15:40:41] monoprotic: has joined #RubyOnRails
[15:43:22] KensoDev: has joined #RubyOnRails
[15:44:08] fmcgeough: has joined #RubyOnRails
[15:44:10] audy: has joined #RubyOnRails
[15:45:25] merida: has joined #RubyOnRails
[15:46:37] akshat_: has joined #RubyOnRails
[15:48:42] GnuYawk: has joined #RubyOnRails
[15:48:42] GnuYawk: has joined #RubyOnRails
[15:48:45] bronson: has joined #RubyOnRails
[15:49:17] _Tariq: has joined #RubyOnRails
[15:50:28] drbayer: has joined #RubyOnRails
[15:52:08] epochwolf: It's a limitation of sql.
[15:54:13] User458764: has joined #RubyOnRails
[15:55:27] mwlang: “to be_nil” or “not_to be_nil”? that is, “to be nil” or “to be_nil” in rspec?
[15:55:48] Peteykun: has joined #RubyOnRails
[15:57:52] mwlang: I’ve gone both ways, but find I’m favoring “to be nil” because “to be_true” is definitely different from “to be true” The former expects a TrueClass the latter expects evaluation to “truthy”
[15:58:49] epochwolf: For anyone wondering why I really don't like rspec, this is why ^
[15:58:54] beauby: has joined #RubyOnRails
[15:59:19] agit0: has joined #RubyOnRails
[15:59:35] mwlang: epochwolf: I like the koolaid.
[15:59:58] Spami: has joined #RubyOnRails
[16:00:31] brentw: has joined #RubyOnRails
[16:01:39] epochwolf: mwlang: Yup. Personal opinion, that's all. :)
[16:03:39] B1n4r10: has joined #RubyOnRails
[16:03:50] mdel: has joined #RubyOnRails
[16:04:07] sevenseacat: i love rspec.
[16:04:36] pawnbox: has joined #RubyOnRails
[16:05:07] pawnbox: has joined #RubyOnRails
[16:10:55] baweaver: has joined #RubyOnRails
[16:11:29] drbayer: has joined #RubyOnRails
[16:11:51] mwlang: is there a pseudo official way (call it “the Rails way”(tm) if you must) to go from mime type to file extension?
[16:12:24] mwlang: for example: “image/tiff” => .tiff; “image/jpeg” => .jpg; “application/pdf” => .pdf…
[16:12:48] agit0: has joined #RubyOnRails
[16:13:53] eregi: has joined #RubyOnRails
[16:14:50] epochwolf: mwlang: Mime::Type.lookup_by_extension
[16:17:20] Cohedrin: has joined #RubyOnRails
[16:17:23] matthewd: Mime::Type["text/html"].to_sym # => :html
[16:17:46] renegadeandy: Can somebody please help me fix this problem. I want to render create.js.erb as part of an ajax request - instead what happens is i get a rails error saying it cannot find messages/create - please help : https://gist.github.com/renegadeandy/194c7a4035fb2101da3cdbdb3667160f
[16:17:48] matthewd: If you want a usefully-comprehensive database, though, you probably want the mime-types gem
[16:18:58] renegadeandy: It happens when i fire the form
[16:18:59] mwlang: matthewd: I suspect I need that anyway…your example throws NoMethodError: undefined method `[]' for Mime::Type:Class
[16:19:28] matthewd: Oh, oops... .lookup, not []
[16:19:57] epochwolf: hehe, happens to all of us.
[16:20:09] matthewd: http://api.rubyonrails.org/classes/Mime/Type.html
[16:20:17] epochwolf: oh look, documentation.
[16:20:19] matthewd: I made the mistake of assuming the example at the top wasn't full of Lies :P
[16:20:27] sevenseacat: PRs welcome <_< >_>
[16:23:54] renegadeandy: I would really appreciate some help - not sure why this is happenig, its like my form isnt being treated as an ajax form
[16:24:09] Siyo: has joined #RubyOnRails
[16:24:09] Siyo: has joined #RubyOnRails
[16:24:18] matthewd: renegadeandy: I think the error contains the information you seek
[16:24:35] renegadeandy: matthewd: i hope it does, it feels hidden to me though
[16:24:44] renegadeandy: matthewd: which line in the error should i be looking at here.
[16:25:49] matthewd: renegadeandy: It describes the search criteria being used when it failed to find the template
[16:26:21] renegadeandy: matthewd: soooo: {:locale=>[:en], :formats=>[:html], :variants=>[],
[16:26:27] renegadeandy: formats needs to contain js instead of html?
[16:26:46] renegadeandy: I have 0 idea on how ot add that? And this used to work...
[16:26:59] manfrin: has joined #RubyOnRails
[16:26:59] renegadeandy: Did something change in rails that would break this!?
[16:27:25] yorickpeterse1: has joined #RubyOnRails
[16:27:54] yorickpeterse1: Is there a way to get the full file path pointing to an asset? File path as in something like /home/farts/Projects/my-project/app/assets/images/foo.png
[16:28:29] yorickpeterse1: One that doesn't involve enumerating over config.assets.paths and checking if the file exists for every directory
[16:28:35] renegadeandy: matthewd: I tried adding this : https://gist.github.com/renegadeandy/5844d094e94ceb2b2ee5ca5bcbe8d2bf 
[16:28:36] sleungcy: has joined #RubyOnRails
[16:28:40] yorickpeterse1: (though that's probably what Rails does anyway)
[16:28:51] blackmesa: has joined #RubyOnRails
[16:28:57] sandstrom: has joined #RubyOnRails
[16:29:04] matthewd: renegadeandy: As the Rails team don't have access to your computer, I suspect something you did is the most proximate cause
[16:29:23] renegadeandy: renegadeandy: haha yeah, i went from rails V4.1 to 4.2.2 i think
[16:29:32] renegadeandy: but im surprised that would ahve changed this behaviour so dramatically
[16:29:52] renegadeandy: also went from ruby 2.1 to 2.2.2
[16:29:59] renegadeandy: again would be surprised if that caused this.
[16:30:33] Spami_: has joined #RubyOnRails
[16:31:00] matthewd: yorickpeterse1: Maybe.. if you have asset compilation enabled
[16:31:45] context: renegadeandy: the log will tell you what mime type the request is for
[16:31:49] yorickpeterse1: matthewd: config.assets.compile is set to true in this case
[16:32:16] yorickpeterse1: context: we have 1k something emoji images in GitLab, I'd like to pre-generate their URLs including digests because this takes fucking forever when doing it live (upwards to 2 minutes)
[16:32:34] yorickpeterse1: So my idea was to iterate over all the files, just construct the URLs, dump that in a JSON file, then load that
[16:32:48] yorickpeterse1: (the files change very rarely, thus we can update this using just a Rake task)
[16:32:55] renegadeandy: context: but when i tried adding format.js i got an unknown format error https://gist.github.com/renegadeandy/5844d094e94ceb2b2ee5ca5bcbe8d2bf
[16:33:02] dionysus69: has joined #RubyOnRails
[16:33:43] matthewd: Hmm... so you basically want to do asset precompile, for a subset of the assets
[16:33:47] hightower3: has joined #RubyOnRails
[16:33:48] yorickpeterse1: the Gem we use has a method to get its root directory
[16:33:55] cabinB: has joined #RubyOnRails
[16:33:57] yorickpeterse1: matthewd: Yes, but also generate the URL
[16:34:04] yorickpeterse1: there seems to be overhead in that process besides just generating the digests
[16:34:13] yorickpeterse1: Looking at the source it does quite a bunch of things, so it's not entirely surprising
[16:34:25] context: renegadeandy: read the log. it tells you what format its processing THE REQUEST as
[16:34:34] agit0: has joined #RubyOnRails
[16:34:38] Megamos: has joined #RubyOnRails
[16:34:46] context: if the request is asking for html, it doesnt matter that you have format.js
[16:34:48] matthewd: When asset precompile is used (compile=false), they get loaded from a json manifest
[16:35:15] yorickpeterse1: matthewd: wait, so having compile=true is actually a bad thing in this case?
[16:35:40] matthewd: yorickpeterse1: In production, that is a bad thing, yes
[16:35:41] yorickpeterse1: lemme check what we actually have in prod...
[16:35:44] dcope: is there a way to 'wrap' a call with a timeout handler?
[16:35:54] renegadeandy: context: it seems to be processing it as html….https://gist.github.com/renegadeandy/5844d094e94ceb2b2ee5ca5bcbe8d2bf#file-log-L2 — not sure why...
[16:35:57] dcope: i am calling into a gem that makes an http request but i'd like to wrap some sort of timeout around it
[16:36:02] matthewd: In development, it's a trade-off... precompile is less magically helpful, but equally means less runtime work
[16:36:08] context: renegadeandy: there you go.
[16:36:10] yorickpeterse1: Application.config.assets.compile # => compile
[16:36:15] context: renegadeandy: set the content type or add .js to the request url
[16:36:28] matthewd: Depending on the version of sprockets, maybe you can prepopulate [some of?] the find_asset cache
[16:36:28] benlieb: has joined #RubyOnRails
[16:37:35] matthewd: Actually, tbh, I'm not 100% sure whether we respect the asset manifest if it's present but we also have live compilation enabled
[16:37:44] GnuYawk: has joined #RubyOnRails
[16:37:55] matthewd: If not, seems like we could
[16:38:27] renegadeandy: context: i made the content-type json
[16:38:31] renegadeandy: that still doesnt work
[16:38:38] renegadeandy: should it be a content type of :js
[16:39:00] mrgreenfur: has joined #RubyOnRails
[16:39:06] matthewd: renegadeandy: json != js, so yes, if that's what you want
[16:39:22] renegadeandy: so format: :js
[16:39:46] yorickpeterse1: matthewd: hm thanks, looks like I have some work to do
[16:41:03] renegadeandy: matthewd: but i want it to actually render a js partial as my ajax response.....
[16:41:08] renegadeandy: that is not doing what I need it to do
[16:41:22] renegadeandy: format: :js makes it show an odd url and an empty page!
[16:41:39] renegadeandy: its not rendering the create.js.erb file
[16:41:45] renegadeandy: its ….. showing it as tetx
[16:41:54] renegadeandy: text without the actual erb
[16:42:54] arBmind: has joined #RubyOnRails
[16:43:08] roshanavand: has joined #RubyOnRails
[16:43:56] renegadeandy: context: it just doesnt look right at all : https://gist.github.com/renegadeandy/5844d094e94ceb2b2ee5ca5bcbe8d2bf#file-actual-form-generated-L1
[16:44:06] yorickpeterse1: has left #RubyOnRails: ()
[16:44:11] renegadeandy: this is an ajax request….why is it even changing page to an empty renedered js file.
[16:45:04] sbarg: has joined #RubyOnRails
[16:47:25] alex88: has joined #RubyOnRails
[16:47:35] polyidus: has joined #RubyOnRails
[16:47:48] alex88: hi there, I'm trying to use rails 5, I've a controller action that ends in "render json: { widgets: widgets }" however I get the error "ActionView::MissingTemplate" as it needs a template
[16:48:07] alex88: shouldn't "render json: ..." output the json without the need of a template?
[16:48:56] EXCHGR: has joined #RubyOnRails
[16:51:38] Devalo: has joined #RubyOnRails
[16:57:48] shinnya: has joined #RubyOnRails
[16:57:55] TheMoonMaster: has joined #RubyOnRails
[16:58:27] chouhoulis: has joined #RubyOnRails
[16:59:02] qejk: has joined #RubyOnRails
[17:00:18] Balzrael: has joined #RubyOnRails
[17:02:04] mikecmpbll: has joined #RubyOnRails
[17:02:40] rogue_koder: has joined #RubyOnRails
[17:03:10] Cache_Money: has joined #RubyOnRails
[17:03:50] sneakerhax: has joined #RubyOnRails
[17:04:52] rogue_koder: has joined #RubyOnRails
[17:05:40] IrishGringo: has joined #RubyOnRails
[17:06:27] EXCHGR: has joined #RubyOnRails
[17:06:28] renegadeandy: has left #RubyOnRails: ()
[17:06:34] MrPunkin: has joined #RubyOnRails
[17:06:54] lexi87: has joined #RubyOnRails
[17:07:43] lexi87: I am new to Rails, and a frontend person asked me how many endpoints do we have as he's going to start working on designing the project. I have finished the backend code. How do I find out the amount of endpoints in my project? Is this the amount of pages that are accessible? We are only on the web, no mobile, so there's no API involvement (no login with FB/twitter) minus Stripe and PayPal.
[17:07:51] lexi87: pardon the noob question haha
[17:08:05] y2mq37: has joined #RubyOnRails
[17:09:06] choke: has joined #RubyOnRails
[17:09:43] sandelius: has joined #RubyOnRails
[17:10:06] sandelius: anyone know what the max request body is set to?
[17:10:31] workmad3: sandelius: depends on what you've set it as in your web server
[17:10:57] sandelius: so rails detects that? thought rack set a limit aswell
[17:11:27] pfg: has joined #RubyOnRails
[17:11:33] Cache_Money: lexi87: $ rake routes ?
[17:11:45] arup_r: has joined #RubyOnRails
[17:12:33] lexi87: cache_money: I thought this, but “endpoints” felt like a trick question. Thanks
[17:13:38] sypheren: has joined #RubyOnRails
[17:14:09] Cache_Money: lexi87: you could also look within the config/routes.rb file to get a sense of the endpoints offered.
[17:14:11] bronson: has joined #RubyOnRails
[17:14:58] cnk: has joined #RubyOnRails
[17:15:01] Rubie: lexi87: i think hes asking where is will he get his data from...you might not be using external API's (like twitter/fb) but your backend probably is outputting some data somewhere -- endpoints usually mean a url to retrieve that data.
[17:15:11] merida: has joined #RubyOnRails
[17:16:34] lexi87: cache_money: thanks
[17:16:40] lexi87: rubie: thank you
[17:18:01] polyidus: has joined #RubyOnRails
[17:19:35] Cache_Money: I used to use a gem years ago to tunnel out my localhost so others could access it on the internet. The website had a really cool UI and you had to scroll down the page (mimicing digging a tunnel) until you got to the bottom with code samples. Does this ring a bell to anyone? Trying to see if I can find the website so I could borrow some CSS styling
[17:20:17] fryguy: the only 2 i know of are localtunnel and ngrok
[17:20:30] benlieb: anyone recommend any tool for turning rails logs into graphs that help analyze traffic, response time, etc?
[17:20:37] fryguy: benlieb: kibana
[17:21:08] benlieb: forgot to mention, ideally free
[17:21:31] Cache_Money: fryguy: I found those through Google but they didn't look familiar. But maybe the site has changed since I used it years ago.
[17:25:29] Jon30: has joined #RubyOnRails
[17:25:32] mrchris: has joined #RubyOnRails
[17:25:49] Cache_Money: benlieb: I've heard good things about Logstash but never used it myself
[17:26:27] benlieb: Cache_Money: was just looking at that now, assuming Logstasher is what you meant
[17:27:28] Dimik: has joined #RubyOnRails
[17:27:46] Cache_Money: benlieb: I think that gem uses Logstash https://www.elastic.co/products/logstash
[17:27:51] Cache_Money: could be wrong
[17:28:15] Jon30: Hello dear friends! I am using Apache + Passenger 4. One of the forms in my app allows users to import a huge XLSX file -- which could take 5-10 minutes to import, but this ends up my app to become non responsive and other users can't access it. Is there anyway to make passenger spawn another instance of rails instead of waiting for the original instance to become free? I already put
[17:28:15] Jon30: MaxPoolSize to a high number.
[17:28:41] renanoronfle: has joined #RubyOnRails
[17:29:00] d0nn1e: has joined #RubyOnRails
[17:29:51] _Tariq: has joined #RubyOnRails
[17:30:14] drbayer: has joined #RubyOnRails
[17:30:23] yellow5: has joined #RubyOnRails
[17:32:59] djbkd: has joined #RubyOnRails
[17:33:46] Martyn: has joined #RubyOnRails
[17:34:35] platzhirsch: has left #RubyOnRails: ()
[17:38:14] stannard: has joined #RubyOnRails
[17:39:13] rails968: has joined #RubyOnRails
[17:39:54] GodFather: has joined #RubyOnRails
[17:40:10] GnuYawk: has joined #RubyOnRails
[17:40:14] GodFather: has joined #RubyOnRails
[17:40:37] rails968: Hello :) Is it possible to pass a filename in a rails URL (without rails intercepting the .xx as :format) ? Like github /blob/master/my_file.rb
[17:40:52] petor: has joined #RubyOnRails
[17:41:52] tbuehlmann: rails968: you can pass `format: false` in your route
[17:42:23] rails968: tbuehlmann: I did it. But know this is a 404.. :/
[17:42:43] context: whats route/path being used in routes.rb
[17:42:43] tbuehlmann: wanna gist your routes, the controller and URL?
[17:43:15] GodFather: has joined #RubyOnRails
[17:43:25] sandelius: has joined #RubyOnRails
[17:43:39] rccie: has left #RubyOnRails: ()
[17:44:18] rails968: tbuehlmann: http://pastebin.com/g8PAhnbc
[17:45:00] hahuang61: has joined #RubyOnRails
[17:45:00] rails968: tbuehlmann: https://gist.github.com/iiNku/1e1dcd144757b741358f778bb351b28c
[17:45:35] renanoronfle: has joined #RubyOnRails
[17:45:59] iuuso: has joined #RubyOnRails
[17:46:02] JD: has joined #RubyOnRails
[17:46:10] blackmesa: has joined #RubyOnRails
[17:46:22] bronson: has joined #RubyOnRails
[17:47:32] hnanon: has joined #RubyOnRails
[17:48:03] hnanon: Dir.glob("Rails.root.join('db', 'seeds', 'data', 'cities_*.rb')").each do |data|
[17:48:15] hnanon: That is not iterating through my files.
[17:48:24] petor_: has joined #RubyOnRails
[17:48:34] hnanon: Is the syntax correct there?
[17:48:59] context: you need /:*path
[17:49:19] Devalo: has joined #RubyOnRails
[17:49:29] context: also, can you stop mixing json/hash-rocket syntax :)
[17:49:32] context: in your route
[17:50:13] rails968: context: you are talking to me ? :)
[17:50:18] context: rails968: yeah
[17:50:23] hnanon: Must be :)
[17:50:25] GnuYawk`: has joined #RubyOnRails
[17:50:34] context: rails968: that will pick up if path has a / in it
[17:50:35] SteenJobs: has joined #RubyOnRails
[17:50:47] rails968: context: oh :) yeah, the mixing is becaus I tried some things ^^ i will try this
[17:50:56] mrgreenfur: has joined #RubyOnRails
[17:51:51] context: hnanon: for good reason
[17:52:06] context: Dir.glob("Rails.root.join('db', 'seeds', 'data', 'cities_*.rb')")
[17:52:17] context: i highly doubt "Rails.root.join('db', 'seeds', 'data', 'cities_*.rb')" is the name of a file
[17:52:41] GodFoddar: has joined #RubyOnRails
[17:52:51] context: im actually willing to bet you money that if that file exists, its not what you want
[17:53:03] rails968: context: get 'user/project/:project_id/blob/:branch/:*path', to: 'users#blob', as: 'user_project_blob' seems to not work :/
[17:53:14] context: rails968: whats "the problem"
[17:53:22] GodFather: has joined #RubyOnRails
[17:53:25] tubbo: echo 'fuck you context' > "Rails.root.join('db', 'seeds', 'data', 'cities_*.rb')"
[17:53:26] moei: has joined #RubyOnRails
[17:53:26] context: you still need format: false
[17:53:33] tubbo: echo 'fuck you context' > "/usr/bin/Rails.root.join('db', 'seeds', 'data', 'cities_*.rb')"
[17:53:49] matthewd: /*path, not /:*path... I think?
[17:53:53] baweaver: has joined #RubyOnRails
[17:53:54] edwinvdgraaf: has joined #RubyOnRails
[17:54:12] context: matthewd might have it. im not sure ive ever had to use that syntax
[17:54:26] arup_r: has joined #RubyOnRails
[17:54:27] rails968: context: matthewd the /*path works ! Thanks guys ;)
[17:54:34] shmilan: has joined #RubyOnRails
[17:54:48] context: matthewd: you win this round !
[17:54:51] GnuYawk: has joined #RubyOnRails
[17:55:08] crystal77: has joined #RubyOnRails
[17:57:26] User458764: has joined #RubyOnRails
[17:57:47] hnanon: context: Doesn't glob take a path to files?
[17:59:16] smathy: has joined #RubyOnRails
[18:00:12] tbuehlmann: rails968: just *path
[18:00:26] rails968: tbuehlmann: yep, thanks you
[18:00:49] tbuehlmann: oh, didn't scroll to the end, was already answered, great
[18:01:14] aldodelgado: has joined #RubyOnRails
[18:01:34] DoctorMonocular: has joined #RubyOnRails
[18:01:42] context: hnanon: yeah
[18:01:54] lyoshajapan: has joined #RubyOnRails
[18:01:58] context: hnanon: "Rails.root.join('db', 'seeds', 'data', 'cities_*.rb')" is NOT what you think it is
[18:02:02] context: put it in your console
[18:02:04] context: and see what you get,
[18:02:05] Scient: soooo all the smart people here
[18:02:17] Scient: https://gist.github.com/tanelsuurhans/c4798a691705906bf249875b226d9712 can you tell me how the hell do you "read" this
[18:02:21] Scient: the choice element specifically
[18:02:49] Scient: can I have unlimited number of any of the choices, or can I have one of each, or can I have one of those unlimited times, but not any of the others?
[18:03:21] tubbo: hnanon: turn on syntax highlighting in your editor.
[18:03:43] dopie: has joined #RubyOnRails
[18:04:13] GnuYawk: has joined #RubyOnRails
[18:04:29] hnanon: <Pathname:/home/ubuntu/workspace/db/seeds/data/cities_*.rb>
[18:04:29] Scient: noone? :P
[18:04:43] Scient: damn you ruby devs and our lack of knowledge about xml and xsd schemas!
[18:04:45] Scient: ACTION shakes fist
[18:04:54] tubbo: Scient: really dude? 2 minutes?
[18:04:57] hnanon: So it thinks cities_*.rb is a directory?
[18:04:59] tubbo: some of us actually have jobs
[18:05:01] context: hnanon: wrong.
[18:05:03] GnuYawk: has joined #RubyOnRails
[18:05:11] Scient: im not a patient man tubbo :P
[18:05:12] context: 12:48 hnanon| Dir.glob("Rails.root.join('db', 'seeds', 'data', 'cities_*.rb')").each do |data|
[18:05:20] context: that is NOT the same as what you just did in your console
[18:05:36] tubbo: Scient: yo fuck that XML wtf does that even mean
[18:05:39] context: "Rails.root.join...." is NOT the same as Rails.root.join....
[18:05:52] context: hnanon: quotes == string.
[18:05:54] hnanon: I see... 1 sec.
[18:06:09] context: syntax highlighting in your editor will easily point this out as tubbo pointed out
[18:06:23] Scient: yeah im trying to figure out how to exactly translate that into some humanly understandable shit
[18:07:00] BBHoss: has joined #RubyOnRails
[18:07:01] tubbo: Scient: i have to deal with XSD myself (well, it might be helpful in validating input) so i was hoping i could find a tool where i could just load the XSD and my XML and it would lint the file for me :P
[18:07:19] hnanon: context: I honestly tried both ways earlier.
[18:07:24] tubbo: iirc it's not *supposed* to be really human-understandable
[18:07:30] Scient: tubbo: Nokogiri does that
[18:07:39] tubbo: hnanon: we're talking about the double-quotes FWIW.
[18:07:41] Scient: its a little slowish for realtime stuff, but for linting work its fine
[18:07:44] tubbo: Scient: nice
[18:07:50] Scient: I used it to validate my xml generator basically
[18:07:50] hnanon: tubbo: right
[18:07:53] tubbo: nokogiri is the shit
[18:08:14] hnanon: I got the same result with and without the double quotes.
[18:08:22] hnanon: or apparently the same result.
[18:08:28] hnanon: meaning no iteration
[18:08:38] ericmeds: has joined #RubyOnRails
[18:08:41] chouhoulis: has joined #RubyOnRails
[18:09:33] sypheren: has joined #RubyOnRails
[18:09:38] roshanavand: has joined #RubyOnRails
[18:09:42] chouhoulis: has joined #RubyOnRails
[18:09:42] context: hnanon: Rails.root.join(...).to_s
[18:09:58] context: im guessing Dir.glob is taking the Pathname literally
[18:10:05] tubbo: hnanon: sure, because Dir.glob could just as easily be trying to find a path called "Rails.root.join('db', 'seeds', 'data', 'cities_*.rb')" (which doesn't exist), or it could be finding no files in db/seeds/data/cities_*.rb
[18:10:11] smathy: Scient, it looks like an xmlschema, but doesn't have the schema header element.
[18:10:20] tubbo: hnanon: so yeah, it might have the same result but it is *not* the same code.
[18:10:29] context: actuially nm
[18:10:32] context: hnanon: it works here just fine .
[18:11:07] context: when you say "i tried both ways" what does that mean exactly ?
[18:11:34] tubbo: that's a bit of a personal question don't you think?
[18:11:35] context: ls db/seeds/data/* <-- does that show your files
[18:11:50] manfrin: has joined #RubyOnRails
[18:12:28] n1lo: has joined #RubyOnRails
[18:13:25] epochwolf: context: I haven't tried either way yet.
[18:13:49] hnanon: tubbo, context: I swear I think I'm losing my mind sometimes. The files are csv not rb.
[18:14:13] hnanon: Thanks, you two, for your help.
[18:15:14] tubbo: no problem
[18:15:15] shmilan: has joined #RubyOnRails
[18:15:26] roshanavand: has joined #RubyOnRails
[18:15:45] tubbo: hnanon: just so you know, if you ever have to wrap ruby code in a String, either you lost your mind or your architect deserves to be assassinated.
[18:15:56] tubbo: i feel like that's a good litmus test.
[18:16:55] jero_: has joined #RubyOnRails
[18:17:01] hnanon: tubbo: I'll keep that in mind.
[18:17:10] User458764: has joined #RubyOnRails
[18:17:31] eljimmy: has joined #RubyOnRails
[18:17:44] B1n4r10: has joined #RubyOnRails
[18:18:24] lll: has joined #RubyOnRails
[18:18:24] baweaver: has joined #RubyOnRails
[18:20:26] agit0: has joined #RubyOnRails
[18:21:50] GnuYawk: has joined #RubyOnRails
[18:22:28] hnanon: Does the update method exit a block?
[18:24:01] apeiros: hnanon: no method except Kernel#throw and #raise (and aliases) exit a block.
[18:24:34] apeiros: oh well, I guess I left out all methods which terminate the process entirely like #exit. but I guess that much is obvious :)
[18:24:44] epochwolf: apeiros: break and next.
[18:24:49] apeiros: epochwolf: not methods
[18:25:45] apeiros: break, next, redo, retry, return are all syntax and not methods
[18:25:51] merida_: has joined #RubyOnRails
[18:26:11] apeiros: not sure whether you could use redo/retry to exit a block, but the other three can be used too.
[18:26:22] epochwolf: apeiros: I read your statement as methods (english) not methods (ruby)
[18:26:57] apeiros: interesting, I don't think I've ever read "method" like that in a prog channel
[18:27:42] epochwolf: apeiros: you probably have but it was obvious from context which it was.
[18:27:52] tubbo: apeiros: try talking about methods in #c ;)
[18:27:56] hunter99: has joined #RubyOnRails
[18:28:10] epochwolf: ACTION slowly rolls up a newspaper.
[18:28:12] apeiros: epochwolf: quite possible
[18:28:36] epochwolf: ACTION beats tubbo black with the newpaper. :|
[18:29:17] tubbo: epochwolf: that's racist
[18:29:57] epochwolf: tubbo: I mean black from the ink transfer...
[18:30:15] epochwolf: ACTION is just going to not talk for the rest of the day.
[18:30:20] franzejr: has joined #RubyOnRails
[18:30:56] jstransky: has joined #RubyOnRails
[18:30:58] GnuYawk: has joined #RubyOnRails
[18:31:28] MrPunkin: has joined #RubyOnRails
[18:32:05] apeiros: epochwolf: your ebook leaks ink? that's horrible.
[18:32:16] polyidus: has joined #RubyOnRails
[18:33:46] drbayer: has joined #RubyOnRails
[18:34:22] netzfisch: has joined #RubyOnRails
[18:35:13] finnnnnnnnnnn: has joined #RubyOnRails
[18:37:00] _djbkd: has joined #RubyOnRails
[18:37:43] hunter90: has joined #RubyOnRails
[18:39:36] enkristoffer: has joined #RubyOnRails
[18:40:10] hunter90: can anyone tell me why i'm getting: undefined local variable or method `flash' for SessionsController:Class) ?
[18:40:33] MrPunkin: has left #RubyOnRails: ()
[18:40:37] arup_r: hunter90: show your code
[18:40:47] arup_r: with error in a gist
[18:42:02] smathy: hunter90, because you're calling an instance method in a class context.
[18:42:03] apeiros: hunter90: flash is an instance method, not a class method
[18:42:16] apeiros: :< Errno::ETOOSLOW
[18:42:18] renegadeandy: has joined #RubyOnRails
[18:42:27] hunter90: https://gist.github.com/hcharrington/7ff9dc8ce813c1accf523074961e11f9
[18:42:34] renegadeandy: Does anybody know why all of a sudden ajax calls are all processing as HTML instead of JS?
[18:42:43] renegadeandy: i think it may have happened after an update
[18:42:49] hunter90: so how can i fix it?
[18:43:06] solars: has joined #RubyOnRails
[18:43:07] dionysus69: has joined #RubyOnRails
[18:43:07] smathy: hunter90, remove these lines: https://gist.github.com/hcharrington/7ff9dc8ce813c1accf523074961e11f9#file-sessions_controller-rb-L24-L30
[18:43:12] smathy: WTF are you thinking there?
[18:43:18] context: hunter90: uhh the 24-30 need to..... go somewhere
[18:43:40] tubbo: looks like bad copy/pasta :)
[18:43:41] context: hunter90: please learn how to properly indent code now rather than later.
[18:43:49] renegadeandy: Something appears to have happened which has changed every single Ajax call so now they all submit as HTML instead of JS, what may have caused this!?
[18:44:04] arup_r: renegadeandy: sometime, JS syntax error causes it
[18:44:18] context: renegadeandy: thats very possibly a change in how rails handles the request. you did just upgrade rails no ?
[18:44:21] arup_r: so, check your browser console.. if any JS errors are there or not
[18:44:35] arup_r: oh.. :) I ^ saw in my cases
[18:44:41] renegadeandy: arup_r: console is clean
[18:44:56] renegadeandy: and i am on rails 4.2.2 no change....
[18:45:03] arup_r: click on the *preserve log* and try again
[18:45:11] context: so NOTHING changed at all and magically ALL of your ajax calls are now broken ?
[18:45:20] context: SOMETHING changed.
[18:45:21] arup_r: renegadeandy: I said to check in Browser devtool console
[18:45:39] renegadeandy: i think a bundle update may have caused it - arup_r i checked there...
[18:45:53] context: what did you update.
[18:46:05] renegadeandy: but it is something i havent tested in a while….my production server is working absolutely fine…my dev environment all ajax requests are broken
[18:46:12] renegadeandy: i did a generic bundle update
[18:46:16] renegadeandy: whch i will never do again
[18:46:21] comm64x: has joined #RubyOnRails
[18:46:22] renegadeandy: but i cannot workout which thing has broken me
[18:46:25] context: so just revert your gemfile.lock
[18:46:33] arup_r: renegadeandy: git status is telling what it updates..
[18:46:34] context: renegadeandy: so go look what got updated.
[18:46:55] context: this tool, called git, i hope you are using, will show you the changes made from the bundle uipdate. your gemfile.lock file specigfically
[18:46:58] renegadeandy: context: so copy gemfile.lock from production back to my dev environment
[18:47:00] sandelius: has joined #RubyOnRails
[18:47:03] context: it has alphanumeric text in it
[18:47:11] renegadeandy: yeah im looking at it context
[18:47:13] context: please tell me you commit your lock file
[18:47:15] renegadeandy: do i then do a bundle update
[18:47:19] renegadeandy: so i have that
[18:47:21] context: then look at the diff.....
[18:47:25] twilling: has joined #RubyOnRails
[18:47:29] context: you will see the version number changes.
[18:47:36] renegadeandy: loads of stuff have changed...
[18:47:50] renegadeandy: how do i just force my dev environment back to gemfile.lock from production?
[18:47:51] context: did rails ?
[18:47:53] renegadeandy: copy paste it into dev
[18:48:02] renegadeandy: bundle install?
[18:48:03] arup_r: renegadeandy: git stash and see.. is it working?
[18:48:06] context: just revert / uncommit the change
[18:48:13] context: or stash it...
[18:48:29] context: renegadeandy: did rails get updated ?
[18:48:36] context: gist the diff
[18:48:41] comm64x: this may be a noob question but how do you decide which group (i.e. development, test, etc.) a gem should go into
[18:48:56] renegadeandy: i cannot, i don’t know which change has caused this, there has been hundreds
[18:49:08] context: comm64x: you decide based on where/when the gem is actually needed
[18:49:11] apeiros: renegadeandy: git bisect is your friend then
[18:49:22] arup_r: ACTION never used it :(
[18:49:40] agit0: has joined #RubyOnRails
[18:49:43] cnk: comm64x: If it is only used for testing or debugging, it can go in test or dev, otherwise, put it in globally
[18:49:56] renegadeandy: context: arup_r https://gist.github.com/renegadeandy/e03a982173fcc67d6423e937e729cade
[18:49:58] context: renegadeandy: git bisect as apeiros said.
[18:49:59] apeiros: I only used it once to test how it works either. I usually don't have a hard time to figure the cause for a problem.
[18:50:54] blackmesa: has joined #RubyOnRails
[18:52:06] comm64x: is there any harm in putting for example rspec global as opposed to the convention
[18:52:27] context: harm? no? useless memory usage?
[18:52:33] nachoman: has joined #RubyOnRails
[18:52:34] context: needlessly installing it in production
[18:52:37] smathy: comm64x, no harm, just that it will be unnecessarily installed and required in your production environment.
[18:52:40] arup_r: comm64x: What gems you have in hand, can you tell that?
[18:52:54] renegadeandy: context: any ideas based upon what i posted?
[18:52:57] arup_r: ok follow smathy
[18:52:59] comm64x: smathy: ah I see
[18:53:18] context: no. im not gonna try digging into that more than i have
[18:53:26] comm64x: makes sense
[18:54:02] ramfjord: has joined #RubyOnRails
[18:54:18] context: renegadeandy: but if you have 100 changes and you have no idea what broke it, use git-bisect as apeiros said
[18:55:03] tubbo: maaaaaaaaaaaaaaaaaaaaaaaaan
[18:55:03] renegadeandy: i really don’t think i can do that :*(
[18:56:33] twilling: If I have a module that extends ActiveSupport::Concern, which is prepended into a class that inherits from ActiveRecord::Base (rails model), should I be able to define callbacks at the module level? Right now my tests are not firing my callback and I’m trying to discern if this just isn’t possible - if it’s not, why and what I can do to move around this. Example gist:
[18:56:34] twilling: https://gist.github.com/tylerwillingham/12878502026b72bd69ea7aace113af47
[18:56:41] dstarh: has joined #RubyOnRails
[18:56:45] King_Rex: has joined #RubyOnRails
[18:57:17] ramfjord: Hey guys, does anyone know a clean way of converting a Date to midnight in UTC for that date? I need this code to run independently of the system timezone. I've so far tried ActiveSupport::TimeZone#parse + Date#strftime, but it's kind of ugly to have to go to a string in between.
[18:57:36] gingray: has joined #RubyOnRails
[18:58:45] tubbo: ramfjord: try the chronic gem?
[18:58:47] cnk: ramfjord: I am a little surprised you can't chain something together from ActiveSupport that does that
[18:58:47] context: im not sure why a AR model would need to extend Concern
[18:59:14] tubbo: module, not model :)
[18:59:21] context: or i read that wrong
[18:59:45] tubbo: twilling: because you never included the module, you prepended it :D
[18:59:48] context: twilling: any reason you cant just extend vs prepend ?
[18:59:54] tubbo: twilling: so i figure you need to define a class method called self.prepended(base) or something
[19:00:23] GnuYawk: has joined #RubyOnRails
[19:00:37] GnuYawk: has joined #RubyOnRails
[19:02:12] twilling: context: existing super cool metaprogramming magic /sarcasm
[19:03:42] twilling: tubbo: thanks, i’ll go back and read up on the differences, i assumed i knew what prepend was doing but i assumed wrong :)
[19:04:54] tubbo: twilling: haha yeah it's *kinda* the same thing but since you're never including the module, the `self.included` callback never gets fired.
[19:05:58] DoctorMonocular: has joined #RubyOnRails
[19:07:56] arup_r: So, I got the fundamentals of React. Now, I want to build a toy app, where I will use Rails + React to play with it more. So any good tutorials you people have/follow to integrate and get started? I found 1 book, and that is $50 and out of my territory.. So some free good tutorials what you personally used, you can share me. I got some broken links and confusing too.
[19:08:40] centrx: has joined #RubyOnRails
[19:08:40] arup_r: s/broken/bored
[19:08:55] twilling: tubbo: i am highly suspicous that ActiveSupport::Concern is being mixed in without reason now, too
[19:09:11] cnk: The Arkeny stuff is good for Rails + react
[19:09:15] twilling: context & tubbo thanks for pointing me in the right direction
[19:09:28] tubbo: twilling: AS::Concern is just a little sugar over top of existing ruby stuff
[19:09:55] cnk: arup_r: And I have been meaning to try Shaka Code's stuff http://www.shakacode.com/opensource/
[19:10:10] smathy: ramfjord, Time.use_zone('UTC') { Time.zone.local d.year, d.month, d.day }
[19:10:34] cnk: I follow them and one of their devs http://www.railsonmaui.com/
[19:10:39] arup_r: cnk: Yes, Arkeny has a book, but costly.
[19:10:49] arup_r: cnk: let me see the link you gave
[19:11:01] cnk: Sign up for their maling list - they often run specials
[19:11:17] cnk: I got a great React bundle from them before christmas
[19:11:26] cnk: still working my way through the books from that
[19:11:32] twilling: tubbo right. i prefer not to use it unless i know exactly why i want it. there are a lot of people who default to using it because they were introduced to modules through Concerns
[19:11:34] uglybandersnatch: has joined #RubyOnRails
[19:11:39] twilling: at least thats what i’ve seen here
[19:11:42] cnk: The articles they email seem good
[19:12:15] arup_r: cnk: you have their Rails + react book?
[19:13:01] arup_r: Yes, I subscribed their mailing list, weekly it comes.
[19:13:21] smathy: ramfjord, actually, I made it way more complex than it is: Time.utc d.year, d.month, d.day
[19:14:15] cnk: I have their react.js by example but not the Rails meets React
[19:14:15] apeiros: I'm fascinated that there isn't like a .force_time_zone or however one would call it
[19:14:19] smathy: Standard ruby.
[19:14:29] smathy: apeiros, to do what?
[19:14:43] cnk: Also kind of intersted in their refactoring rails controllers - but I am not doing any rails at the moment
[19:14:56] apeiros: smathy: similar distinction as .encode vs. force_encoding - one converts, one just swaps the zone
[19:15:17] smathy: apeiros, that's what my first answer does.
[19:15:52] apeiros: which one is your first answer? `Time.use_zone('UTC') { Time.zone.local d.year, d.month, d.day }`?
[19:16:00] smathy: apeiros, yes.
[19:16:15] apeiros: yeah, that's how you get there. it's not really a method to do it for you.
[19:16:32] cnk: apeiros: I think that is what use_timezone is - see smathy's answer
[19:16:56] smathy: apeiros, `class Time...` if you really want ;)
[19:17:05] apeiros: you use .in_time_zone and add the offset of the time with the old zone
[19:17:07] polyidus: has joined #RubyOnRails
[19:17:23] dionysus69: has joined #RubyOnRails
[19:17:27] smathy: Yep, although that's a big pain.
[19:17:47] smathy: If you're just converting times you can just use Time#to_a: https://gist.github.com/smathy/7af836aec9265bbe71ae88f4113dc1c5
[19:17:50] apeiros: but that's still not the same as having a method akin to force_time_zone (again, or however one would call it)
[19:18:40] smathy: apeiros, right, you're creating a new time in the specified zone. I actually prefer that approach to the idea of changing the existing time's zone.
[19:19:09] apeiros: yes. having the same clock time in a different time zone means it's a different time.
[19:19:33] smathy: ...but I prefer objects to be immutable.
[19:19:49] apeiros: uh, yeah, I'd want it to return a new time with that applied too
[19:20:00] apeiros: so that's where the analogy with .force_encoding breaks :)
[19:20:10] smathy: So better to have it as a class method, as it is.
[19:20:19] apeiros: soo… more like .dup.force_encoding
[19:20:52] apeiros: no. no offense, but `Time.use_zone('UTC') { Time.zone.local d.year, d.month, d.day }` is ugly as sin.
[19:21:00] nickenchuggets: has joined #RubyOnRails
[19:21:00] nickenchuggets: has joined #RubyOnRails
[19:21:24] smathy: Better than an instance method.
[19:21:26] apeiros: compare to a `d.somethingsomething('UTC')
[19:21:28] Macaveli: has joined #RubyOnRails
[19:21:38] centrx: has joined #RubyOnRails
[19:21:56] apeiros: there's tons of instance methods which return a new Time. things like +, - f.ex.
[19:22:16] apeiros: so "creates a new instance" is not really the right clue for "must be a class method"
[19:22:58] smathy: That's terrible to me, an instance method shouldn't return a new object. I'd be ok with something like: Time.from( t, "UTC") where the second arg defaults to the t.zone.
[19:23:32] apeiros: smathy: you serious? because you know that almost no class does it like that?
[19:23:34] epochwolf: smathy: plenty of instance methods return new objects. See Array#map
[19:23:54] manfrin: has joined #RubyOnRails
[19:24:23] apeiros: the moment you have to pass in an instance of its own type, a class method is a bad joke. sorry.
[19:24:33] apeiros: the point of an instance method is to *not* have to explicitly pass in that object.
[19:25:02] theery: has joined #RubyOnRails
[19:25:40] GodFather: has joined #RubyOnRails
[19:25:51] apeiros: found it. in Chronos.js I called it .convertTimezone. so I'd want: `time.in_time_zone("UTC")` (same point in time, but changes clock) and `time.convert_time_zone("UTC")` (keeps clock, but changes point in time)
[19:27:32] baweaver: has joined #RubyOnRails
[19:28:29] ur5us: has joined #RubyOnRails
[19:29:02] jinette: has joined #RubyOnRails
[19:29:09] jenrzzz: has joined #RubyOnRails
[19:29:22] stannard: has joined #RubyOnRails
[19:30:57] eregi_: has joined #RubyOnRails
[19:31:34] ur5us_: has joined #RubyOnRails
[19:32:24] Jasaka: has joined #RubyOnRails
[19:32:43] King_Rex: has joined #RubyOnRails
[19:34:02] tubbo: `Time.convert_to_utc(time) # => <#Time:0x..>` would definitely make sense given convert_to_utc doesn't necessarily need a Time object.
[19:34:14] CanTonic: has joined #RubyOnRails
[19:34:18] tvw: has joined #RubyOnRails
[19:34:24] sandstrom: has joined #RubyOnRails
[19:35:01] apeiros: tubbo: only because of ruby's convoluted datetime/time heritage
[19:35:23] tubbo: i like ruby's date parsing a lot. way better than JS that's for sure.
[19:35:30] apeiros: or did you mean something else than Time vs. DateTime vs. AS::Time*?
[19:35:34] mrchris: has joined #RubyOnRails
[19:36:01] apeiros: yeah, thankfully they finally implemented _strptime natively.
[19:36:58] polyidus: has joined #RubyOnRails
[19:37:43] ekinmur: has joined #RubyOnRails
[19:37:52] apeiros: but that we still have Time and DateTime, and additionally need AS additions to have anything beyond local+utc as timezones is a disgrace. (nothing compares to the sadness that is JS, though)
[19:39:30] tubbo: oh yeah that's true
[19:39:45] tubbo: probably more of a PITA for the maintainers since it increases the amount of DateTime-related bug reports
[19:39:52] tubbo: i thought DateTime was an AS object though
[19:40:01] apeiros: DateTime is core
[19:40:04] apeiros: whoops, stdlib, sorry
[19:40:13] baweaver: has joined #RubyOnRails
[19:40:28] drbayer: has joined #RubyOnRails
[19:40:35] apeiros: and its existence is due to Time on 32bit systems before ruby 2.0 being limited to ~1970-2030
[19:41:36] tubbo: > Newer versions of Ruby (2.0+) do not really have significant differences between the two classes.
[19:41:58] tubbo: wow that's cool, i didn't realize i can pass a memory location into there :P
[19:42:26] pawnbox: has joined #RubyOnRails
[19:42:42] tubbo: apeiros: nah i'm kidding, it looks like a pointer value but it's actually a hex representation of a UTC integer. http://stackoverflow.com/questions/1261329/whats-the-difference-between-datetime-and-time-in-ruby
[19:43:06] apeiros: Time.at takes unix epoch time offset
[19:43:19] apeiros: with epoch being ~1970
[19:43:42] apeiros: actually drop the ~, it is 1970-01-01
[19:44:28] apeiros: upside of Time back then was that it was blazingly fast compared to the slug that was DateTime. with the advent of native Rational, that changed too.
[19:44:29] uglybandersnatch: has joined #RubyOnRails
[19:44:49] apeiros: and that too happened around 2.0. so the distinction is mostly historical.
[19:45:03] uglybandersnatch: has joined #RubyOnRails
[19:45:26] renegadeandy: has joined #RubyOnRails
[19:45:42] apeiros: the other remaining distinctions are that Time at least is aware of timezones, that DateTime is not proleptic, and that Time's arithmetic operations are second based, while DateTime has day and month based ones.
[19:46:05] apeiros: /endofknowledgebomb
[19:46:42] ramfjord: a little late, but thanks smathy! Didn't need any rails stuff after all
[19:47:52] johnflux_: has joined #RubyOnRails
[19:50:58] yfeldblum: has joined #RubyOnRails
[19:54:57] lemur: has joined #RubyOnRails
[19:55:00] hnanon: https://gist.github.com/anonymous/bd61b64b69c1362438fdb3e72be2e3b6
[19:55:21] hnanon: All records are showing as "unchanged" when I know some are new or updated.
[19:55:54] hnanon: So, new_record? and updated_at_changed? are not doing what I think they should be doing.
[19:56:40] hnanon: I added "include ActiveModel::Dirty" at the top of my model too (for the updated_at_changed? method).
[19:57:08] audy: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[19:57:30] ramfjord_: has joined #RubyOnRails
[19:57:52] baweaver: has joined #RubyOnRails
[19:59:00] jkahn: has joined #RubyOnRails
[19:59:58] apeiros: hnanon: once a model is saved it's no longer a new_record?
[20:00:04] polyidus: has joined #RubyOnRails
[20:00:17] siaW: quick question. can i use “update_attribute” in my controllers? or only in models?
[20:00:34] apeiros: and the create in find_or_create means its saved immediately. so it'll never be a `new_record?`
[20:01:37] hnanon: apeiros: I see.
[20:01:40] apeiros: same for update, straight from the docs: "and saves the record"
[20:02:02] eregi: has joined #RubyOnRails
[20:02:06] apeiros: dirty is "changes between loading from db/last save and now", since you saved, there are no changes left
[20:02:12] DoubleMalt: has joined #RubyOnRails
[20:02:19] hnanon: What are my options, then?
[20:02:44] sandelius: has joined #RubyOnRails
[20:03:02] apeiros: use methods which don't save the record
[20:03:29] apeiros: don't remember from the top of my head whether there's a find_or_build/find_or_new. but the replacement for update would be assign_attributes I'd say.
[20:03:46] apeiros: but don't forget to save in the end.
[20:03:51] hnanon: I think there is a find_or_new...
[20:03:55] hnanon: Thank you.
[20:04:39] DragonPunch: has joined #RubyOnRails
[20:04:40] jenrzzz_: has joined #RubyOnRails
[20:05:05] hnanon: http://apidock.com/rails/ActiveRecord/Relation/find_or_initialize_by
[20:05:44] YourManCJ: has joined #RubyOnRails
[20:06:26] siaW: can i have a method like this in my controller? https://gist.github.com/siaw23/6ea0879e2990439be07c18d3f1e8c50b it’s updating attributes
[20:07:24] YourManCJ: I keep getting the error database or disk is full. I had made a migration, moved to a different branch using git and had to reset my database, any idea how to fix this?
[20:08:21] denaras: has joined #RubyOnRails
[20:08:26] netzfisch: has joined #RubyOnRails
[20:09:30] apeiros: siaw: you can. but that's a rather weird place to put it. and the name is rather unfitting if you put it on a controller. after all, it does absolutely NOT find_or_create an AccountsController.
[20:09:48] yatish27: has joined #RubyOnRails
[20:09:52] Ikri: has joined #RubyOnRails
[20:09:55] apeiros: (i.e. yes you can - but really, don't - find a better suiting place)
[20:10:25] DoctorMonocular: has joined #RubyOnRails
[20:10:36] siaW: apeiros: you know why i’m asking this?
[20:10:52] apeiros: I can't read your thoughts, no
[20:10:57] tbuehlmann: Account.find() will get you an account or nil, so calling first_or_create on it is kind of weird
[20:11:53] siaW: now i’m confused
[20:12:00] siaW: i had that method in a model actually
[20:12:02] smathy: ramfjord_, you're welcome.
[20:12:08] siaW: but i didn’t know how to pass parameters to it
[20:12:26] siaW: so i thought if i used it in a controller, i could use params[:id]
[20:12:29] siaW: something like that
[20:12:30] nfk|laptop: has joined #RubyOnRails
[20:12:39] smathy: tbuehlmann, actually find will get you a record or raise an exception.
[20:12:50] tbuehlmann: oh, sorry, that's what I meant
[20:12:54] blackmesa: has joined #RubyOnRails
[20:12:55] apeiros: siaw: you defined a class method. how could a class method in a controller possibly have access to params?
[20:12:59] smathy: (which makes it ever weirder ;)
[20:13:21] siaW: ah, my bad
[20:13:41] siaW: https://gist.github.com/siaw23/6ea0879e2990439be07c18d3f1e8c50b
[20:14:49] apeiros: siaw: the name is still inaptly named. also what tbuehlmann said regarding .find() + .first_or_create
[20:14:57] apeiros: *the method
[20:15:33] teaearlgraycold: has joined #RubyOnRails
[20:16:13] siaW: this looks better i think https://gist.github.com/siaw23/6ea0879e2990439be07c18d3f1e8c50b
[20:16:39] ur5us: has joined #RubyOnRails
[20:17:02] YourManCJ: I keep getting "database or disk full" I tried dropping the database then runnning create and setup. Still nothing any ideas?
[20:17:17] apeiros: YourManCJ: get a bigger disk?
[20:17:27] YourManCJ: its not the disk.
[20:17:34] apeiros: how do you figure?
[20:17:34] Aswebb_: has joined #RubyOnRails
[20:17:49] YourManCJ: running df -h shows 180GB open
[20:17:58] apeiros: and you didn't think that was relevant?
[20:18:20] cnk: what db?
[20:18:32] apeiros: well, the error says "db or disk full", since you excluded the disk, that leaves the db
[20:18:35] Ikri: has joined #RubyOnRails
[20:18:40] adaedra: YourManCJ: sure you're looking at the right mount point?
[20:18:54] cnk: any chance your db got to 2 G or the max file size on your file system?
[20:18:54] YourManCJ: yeah, pretty sure
[20:19:12] YourManCJ: nope, the database only contains 2 rows
[20:19:15] apeiros: so as said - vacuum your db
[20:19:35] apeiros: though I thought sqlite did auto-vacuum. but I never had loads where that mattered.
[20:21:33] hnanon: apeiros: How would I check if a record is updated?
[20:21:36] DarkBushido: has joined #RubyOnRails
[20:21:36] DarkBushido: has joined #RubyOnRails
[20:22:00] apeiros: hnanon: what precisely do you mean by that?
[20:22:12] hnanon: 1 sec...updating gist
[20:22:43] hnanon: https://gist.github.com/anonymous/84a388f092310810502ce3f9c90697c1
[20:23:25] hnanon: new_record? is working as expected now.
[20:23:55] apeiros: c.changed?
[20:25:24] hnanon: That shows all records as "updated."
[20:28:40] apeiros: impossible given that you said new_record? works as expected and that's an elsif
[20:29:02] apeiros: but assuming you meant "shows all *other* records as updated": well, that'd be because you do update all records.
[20:31:34] apeiros: hnanon: you can see what changed via c.changes, or c.changed_attributes
[20:32:20] johnflux: has joined #RubyOnRails
[20:32:27] teaearlgraycold: has joined #RubyOnRails
[20:33:06] hnanon: apeiros: Yes, all other records as "updated." But no other attributes are changed. I'm reuploading the same csv file and only changing the attribute of one record. That's the record that should show as "updated" when doing c.changed?
[20:33:19] hnanon: However, all are showing as updated.
[20:33:36] hnanon: Trying c.changes to see...
[20:33:55] apeiros: hnanon: well then - time to debug and figure where theory deviates from praxis
[20:35:08] context: hnanon: are their new records that you know of ?
[20:35:18] context: or are you just assuming their "should" be new records ?
[20:35:23] hnanon: context: No. Same csv.
[20:35:25] sypheren: has joined #RubyOnRails
[20:35:40] hnanon: Only new records when I delete all of the records in the table.
[20:35:49] flashpoint9: has joined #RubyOnRails
[20:35:52] hnanon: then reupload the csv.
[20:36:40] hnanon: I see the changes now: population
[20:36:41] hnanon: {"population"=>[9, 9]}
[20:36:53] hnanon: Why is that considered a change?
[20:36:56] FooMunki: has joined #RubyOnRails
[20:37:01] hnanon: population is of type integer.
[20:37:18] hnanon: Is it related to the fact that it's a csv upload?
[20:37:25] context: what rails version
[20:37:29] apeiros: that's… unexpected
[20:37:32] hnanon: Latest stable.
[20:37:42] context: 4.2.6 then ?
[20:38:03] context: i just did on 4.2.1 and i dont get changed?
[20:38:10] context: changed as being true that is.
[20:38:24] Radar: GOOD MORNING
[20:38:34] hnanon: Good morning.
[20:38:38] context: ACTION hopes he is flying under the radar
[20:38:50] Radar: badumtish
[20:39:22] context: hnanon: i see no reason you should be getting that
[20:39:43] adaedra: context: congratulations, you won a one-way ticket to the exit.
[20:39:44] hnanon: context: c.changes is showing that population is changing when it's the same apparent value.
[20:39:52] context: hnanon: changes[:population].map(&:class).map(&:to_s)
[20:40:46] context: "updated: #{c.changes.inspect}"
[20:42:32] hnanon: context: {"population"=>[8, 8]}
[20:43:27] hnanon: Maybe because that value is a text from the csv then converted to an integer? Or something like that.
[20:44:24] apeiros: hnanon: I tried on an sqlite db, and replacing 2 with "2" did not appear as a change
[20:44:39] apeiros: hnanon: I'd do that .map(&:class) thing in the inspect context mentioned
[20:44:53] eyeamaye: has joined #RubyOnRails
[20:44:57] apeiros: if those are the same class, I'm at a loss.
[20:45:24] GitGud: has joined #RubyOnRails
[20:45:44] apeiros: I'm not sure what other class than integer it might be, though
[20:45:47] context: no. here in 4.2.1 even doing .attributes={int_field: "0"} doesnt upset changes
[20:45:58] apeiros: ruby's own numeric classes have distinct inspects
[20:46:02] context: me either. string, bigdecimal, float print differenly
[20:46:48] Radar: steps to repro in a new app
[20:47:42] hnanon: apeiros: same class: Fixnum
[20:47:54] context: u.changes is showing yo just that?
[20:48:05] context: why does changes here give me symbol keys not strings
[20:48:23] hnanon: Yes, showing {"population"=>[8, 8]}, for example.
[20:48:28] context: meh... eiither way doesnt cause a change for me
[20:48:53] srinidhi: has joined #RubyOnRails
[20:49:49] YourManCJ: has left #RubyOnRails: ()
[20:49:55] apeiros: I'd update to the newest rails and db driver, see whether the problem persists, and if so, build a minimal reproduction app.
[20:50:16] apeiros: in case nobody can figure from the repro app, I'd file an issue.
[20:50:46] hnanon: https://gist.github.com/anonymous/83047705e47c373dfa483c9a963127a0
[20:50:58] choke: has joined #RubyOnRails
[20:51:09] hnanon: Maybe I'm not doing something correctly.
[20:51:28] hnanon: ^ If you want to take a second look at the file.
[20:51:43] siaW: how can i create a route to match http://localhost:3000/accounts/1/auth/twitter
[20:51:47] context: hnanon: can we see the City model possibly ?
[20:51:52] siaW: this is what i’m doing https://gist.github.com/siaw23/806367aab496553b71fd70b29b2e0378
[20:52:05] apeiros: hnanon: you could do the attributes= more efficiently using either just row directly, or row.slice. but I see nothing wrong.
[20:52:10] context: :id not params[:id]
[20:52:35] context: siaw: also your url doesnt end in /callback
[20:52:43] context: so thats still not going to match...
[20:53:06] hnanon: City model: https://gist.github.com/anonymous/d80c02bd76c889ca6433ccaddea5f4f5
[20:53:14] hnanon: It's pretty basic.
[20:53:29] apeiros: drop that include
[20:53:38] siaW: this should work https://gist.github.com/siaw23/806367aab496553b71fd70b29b2e0378
[20:53:58] apeiros: it shouldn't resolve your issue, but it's redundant.
[20:54:34] hnanon: Oh, ok, I though it was needed to use the Dirty methods.
[20:54:50] apeiros: hnanon: it's already included by AR::Base
[20:54:59] apeiros: check its ancestors. the list is long :)
[20:55:59] context: hnanon: never hurts to try something before assuming
[20:56:32] hnanon: I suppose I can bypass any changes to the population attribute?
[20:57:02] context: comment geocoded_by/after_validation (for now) to see if that removes the problem from happening
[20:57:18] context: well, see if just removing the include fixes it first thlugh
[20:57:36] apeiros: I doubt it will
[20:58:06] hnanon: Yeah, I tried both.
[20:58:08] hnanon: No changes.
[20:58:14] hnanon: I mean same issue.
[20:58:38] agit0: has joined #RubyOnRails
[20:58:38] hahuang61: has joined #RubyOnRails
[20:59:14] delgiudices: has joined #RubyOnRails
[20:59:22] hnanon: Can you create a sample app with a City model and use my seed to see if you can reproduce it?
[20:59:57] delgiudices: I have a json containing thousands of rows i want to insert into my db
[21:00:05] delgiudices: The thing is one of the columns is an attachment url
[21:00:19] delgiudices: How can i create an script that downloads that image and creates the record
[21:00:42] context: delgiudices: with your editor.
[21:00:43] cnk: delgiudices: I would make a rake task that does that
[21:00:56] delgiudices: cnk but this is a one time thing only
[21:01:00] delgiudices: context no kidding
[21:01:07] barajasfab: has joined #RubyOnRails
[21:01:07] hnanon: Or just create a table with one attribute (an integer) and upload a one-column csv with a number as the value.
[21:01:09] delgiudices: cnk why a rake task
[21:01:13] context: so create teh file, write your script, run your script, delete your script
[21:01:17] context: if you feel so inclined
[21:01:24] delgiudices: Let me ask a better question
[21:01:32] delgiudices: How can i upload the image to the app from url
[21:02:02] cnk: delgiudices: generally depends on what image plugin you use
[21:02:08] delgiudices: I'm using paperclip
[21:02:45] cnk: https://github.com/thoughtbot/paperclip/wiki/Attachment-downloaded-from-a-URL
[21:03:22] delgiudices: That doesn't download the attachment and put it in the db
[21:03:28] delgiudices: it just puts the link from an external source
[21:04:06] context: according to reading that text it fetches it
[21:04:14] cnk: OK then as we have all said, make a script - personally I would use rake but straight ruby would also work. Use nethttp to download the file and then upload it
[21:04:36] cnk: One reason I use rake is it is easy to get your rails context + other stuff in a rake task
[21:05:05] delgiudices: I'll use rake then
[21:06:05] context: id personally be questioning why paperclip doesnt work the way it says it does
[21:06:14] context: are you sure you are using it correctly ?
[21:06:27] context: do you have a proper version for doing as it said
[21:06:30] King_Rex: has joined #RubyOnRails
[21:08:41] delgiudices: I didn't test it
[21:08:43] delgiudices: I just understood that
[21:08:56] delgiudices: But i speak spanish so i probably understood wrong
[21:09:17] hnanon: Ok...so my csv has population values shown with commas. The numbers after the comma are getting truncated.
[21:09:30] cnk: delgiudices: I sent you a link to some old code of mine. Should help you structure stuff
[21:09:30] hnanon: Removing commas now and retrying.
[21:12:30] hnanon: context: apeiros: That was it.
[21:12:53] apeiros: hnanon: that's weird. I think I'd file a bug.
[21:13:21] apeiros: yes. it's at the very least inconsistent across databases.
[21:13:40] apeiros: which db did you say you use?
[21:13:49] DoctorMonocular: has joined #RubyOnRails
[21:14:30] baweaver: has joined #RubyOnRails
[21:14:30] apeiros: in that case, it's even weirder
[21:14:40] apeiros: I tried with sqlite too and it doesn't show up as a change for me.
[21:15:31] hnanon: So, to be clear: a value in a csv like "32,456" will be save in the db as 32 as an integer attribute.
[21:16:13] hnanon: Reuploading that same file will do the same thing but show that attribute as changed.
[21:16:49] apeiros: yes. and I tried again with "," instead of "." with an integer column. does not show up as a change if I go from 2 -> "2,12". shows up as a change when I go from 2 -> "3,12" (shows as [2,3] as expected)
[21:19:10] DoctorMonocular: has joined #RubyOnRails
[21:19:31] hnanon: Ok, I'll file it and see what becomes of it.
[21:20:01] lxsameer: has joined #RubyOnRails
[21:20:23] context: hahaha. nice catch
[21:21:05] context: well "3,12" isnt a number.
[21:21:15] context: i think ive ran into that issue before
[21:21:23] context: i could go either way for that :-/
[21:21:29] context: you are giving it a bad value ;)
[21:22:49] hnanon: I've spent a few hours on it, just to output a simple notification...that wasn't even that necessary.
[21:22:50] bollullera: has joined #RubyOnRails
[21:23:03] chendry: has joined #RubyOnRails
[21:23:10] context: hey you learned something ;)
[21:23:33] hnanon: I did. Thanks context and apeiros.
[21:24:33] yfeldblum: has joined #RubyOnRails
[21:25:56] bollullera: has left #RubyOnRails: ()
[21:26:05] apeiros: honestly, I'd expect that to raise
[21:26:20] mrgreenfur: has joined #RubyOnRails
[21:26:26] apeiros: fun how this goes into the same topic as the current #ruby topic - guessing instead of solid solution :-|
[21:26:46] chendry: suppose I need to "round-trip" a user ID so I can tell which user a payment applies to when paypal redirects back to my site... what's a good way to do that securely?
[21:26:48] apeiros: "you tell me '3,12'? I'm sure you meant '3'!"
[21:26:52] dnrce: has joined #RubyOnRails
[21:30:15] lxsameer: has joined #RubyOnRails
[21:30:29] delgiudices: has joined #RubyOnRails
[21:31:03] georgedrummond: has joined #RubyOnRails
[21:35:23] lxsameer: has joined #RubyOnRails
[21:37:06] Guest31: has joined #RubyOnRails
[21:38:58] arBmind: has joined #RubyOnRails
[21:40:11] SteenJobs: has joined #RubyOnRails
[21:41:39] DoctorMonocular: has joined #RubyOnRails
[21:43:08] dangeranger: has joined #RubyOnRails
[21:43:10] eregi_: has joined #RubyOnRails
[21:45:15] jenrzzz: has joined #RubyOnRails
[21:45:15] jenrzzz: has joined #RubyOnRails
[21:50:45] n008f4g_: has joined #RubyOnRails
[21:53:38] jstransky: has joined #RubyOnRails
[21:55:21] ur5us: has joined #RubyOnRails
[21:55:41] lemur: has joined #RubyOnRails
[21:57:09] f3ttX]: has joined #RubyOnRails
[21:58:06] uglybandersnatch: has joined #RubyOnRails
[21:59:52] f3ttX]: has joined #RubyOnRails
[22:02:30] baweaver: has joined #RubyOnRails
[22:04:45] chrisja: has joined #RubyOnRails
[22:05:17] chrisja: has joined #RubyOnRails
[22:05:58] benlieb: has joined #RubyOnRails
[22:06:05] sleungcy: has joined #RubyOnRails
[22:08:34] apeiros: has joined #RubyOnRails
[22:09:13] wethu: has joined #RubyOnRails
[22:10:15] P4Titan: has joined #RubyOnRails
[22:11:15] hnanon: has joined #RubyOnRails
[22:11:17] P4Titan: Hello all. If I just ran a db:migrate, but realized I wanted to have one small change. What would be the best way to correct his? I feel like creating an entire new migration is over-kill.
[22:12:14] havenwood: has joined #RubyOnRails
[22:13:19] choke: has joined #RubyOnRails
[22:13:27] akshat: has joined #RubyOnRails
[22:14:30] Radar: has joined #RubyOnRails
[22:14:56] cnk: migrate backwards to the migration you wish you had put this in, edit, remigrate
[22:15:16] cnk: with the caveat that you shouldn't edit any migrations you have pushed to source controle
[22:25:47] renegadeandy: has joined #RubyOnRails
[22:27:13] DoctorMonocular: has joined #RubyOnRails
[22:29:41] ur5us: has joined #RubyOnRails
[22:34:19] n008f4g_: has joined #RubyOnRails
[22:35:51] myntcake: has joined #RubyOnRails
[22:35:55] keegnotrub: has joined #RubyOnRails
[22:37:37] dtzuzu: has joined #RubyOnRails
[22:37:46] Cohedrin_: has joined #RubyOnRails
[22:38:10] flashpoint9: has joined #RubyOnRails
[22:38:36] _Tariq: has joined #RubyOnRails
[22:40:22] quazimodo: has joined #RubyOnRails
[22:41:05] helpa: has joined #RubyOnRails
[22:42:58] helpa: has joined #RubyOnRails
[22:43:20] georgedrummond: has joined #RubyOnRails
[22:45:55] roshanavand: has joined #RubyOnRails
[22:47:25] Cohedrin: has joined #RubyOnRails
[22:50:24] baweaver: has joined #RubyOnRails
[22:51:42] uglybandersnatch: has joined #RubyOnRails
[22:53:48] jstransky: has joined #RubyOnRails
[22:55:43] P4Titan: I have an issue: when I start up the rails console --sandbox, it seems to me that my Models are not initially loaded
[22:55:45] FooMunki: has joined #RubyOnRails
[22:56:28] Inside: has joined #RubyOnRails
[22:56:28] Inside: has joined #RubyOnRails
[22:57:07] P4Titan: They somehow load when I instantiate a different model found in the same file
[22:58:40] uglybandersnatc-: has joined #RubyOnRails
[23:00:03] rubyonrails344: has joined #RubyOnRails
[23:02:50] rubyonrails344: hello, is there experienced ROR developer that would look some of my finished examples of websites?
[23:03:14] rubyonrails344: examples are on heroku...
[23:03:21] Cohedrin_: has joined #RubyOnRails
[23:03:28] Radar: It would be useful to see the code as well.
[23:03:35] rubyonrails344: i have git hub too
[23:04:25] rubyonrails344: i am new to this chat... how can i send you private msg?
[23:04:31] sleungcy: has joined #RubyOnRails
[23:04:48] dalbuschat: has joined #RubyOnRails
[23:05:04] smathy: has joined #RubyOnRails
[23:05:41] superlou: has joined #RubyOnRails
[23:06:02] helpa: Do not PM members of the channel without first asking if that is OK.
[23:06:05] Radar: I am v. busy right now
[23:06:30] rubyonrails344: well ok than...
[23:06:38] uglybandersnatch: has joined #RubyOnRails
[23:06:44] smathy: rubyonrails344, you'll get a lot more traction with specific questions. Doing a code review of an entire app is beyond what most of us are likely to do for free.
[23:06:44] rubyonrails344: maybe someone else would look at them?
[23:07:03] rubyonrails344: i dont want a full code review
[23:07:37] rubyonrails344: i am new... i just want some one that would maybe hire me to look at my stuff
[23:07:44] rubyonrails344: just to tell me what is wrong
[23:07:49] rubyonrails344: cause i cant see whats wrong...
[23:08:49] smathy: rubyonrails344, phrase your problem in three parts, show us what you're doing, what you're trying to achieve, and what's happening instead.
[23:09:26] flashpoint9: has joined #RubyOnRails
[23:09:33] rubyonrails344: i am looking for some advice on that i have like 3-4 complete projects from 0 to finish all by me, front-end back end, and when apply for job i have no answer i dont know why? even tried for internship
[23:09:34] mikecmpbll: has joined #RubyOnRails
[23:09:51] rubyonrails344: i have github for all those examples too...
[23:10:16] mrgreenfur: has joined #RubyOnRails
[23:10:20] rubyonrails344: using popular gems and haml sass etc...
[23:11:16] rubyonrails344: so it would be great if someone that is experienced can look at them... ?
[23:11:54] smathy: "look at them" = code review, which you said you didn't want.
[23:12:26] rubyonrails344: hmmm they are on heroku... just to see them? to see if thats
[23:13:13] rubyonrails344: users registrations validations posts etc image uploading... i have all that but hmmmm i am confused why i cant get internship even?
[23:13:14] smathy: rubyonrails344, you want us to tell you if it's enough for some employer we've never met for a job we know nothing about?
[23:13:55] rubyonrails344: i want you to tell me is it enough to start? cause i belive it is but maybe its not?
[23:15:16] sysodaff: has joined #RubyOnRails
[23:15:45] shmilan: has joined #RubyOnRails
[23:15:51] rubyonrails344: was i rude or something?
[23:15:54] smathy: rubyonrails344, there are often a very high number of applicants for internships, and you might find that actually your experience is working against you, they might want greener people because it's all about training people up.
[23:16:41] smathy: rubyonrails344, applying for a junior job is a big crap shoot, especially applying blind (with no introduction, and no one in there you know).
[23:17:05] rubyonrails344: i know all that... thats ok... but thats why i came here to ask if there is something wrong with my stuff what maybe can be better?
[23:17:28] smathy: rubyonrails344, right, that'll take too long to give you any meaningful response, sorry.
[23:17:33] roshanavand: has joined #RubyOnRails
[23:17:58] rubyonrails344: hmmm ok than...
[23:19:22] smathy: rubyonrails344, meet more people in the industry, work for free on little projects with people you meet, impress them, get introductions.
[23:20:06] rubyonrails344: well ... like i said i cant even work for free even some people said my websites are worth 1k$
[23:20:13] rubyonrails344: thats strange... but ok
[23:20:20] rubyonrails344: sorry to bother you
[23:20:37] smathy: No bother at all.
[23:21:24] rubyonrails344: if i dont have anyone in industry i am in pretty bad position? is that it?
[23:22:21] DoctorMonocular: has joined #RubyOnRails
[23:22:24] Mattx: has joined #RubyOnRails
[23:22:26] benlieb: has joined #RubyOnRails
[23:22:42] smathy: rubyonrails344, especially for a junior, it's much easier to find work through people you know.
[23:23:05] Mattx: Hey guys. I'm not getting how routes work when you have a constraint like this: match '/:controller(.:format)', controller: /[^\/]+\/[^\/]+/, action: "handle", via: [:get, :post]
[23:23:14] rubyonrails344: well i know no one... thats why i am here... but ok
[23:23:21] Mattx: If I'm not wrong, it should match /foo/bar
[23:23:27] smathy: rubyonrails344, without that network it's very much a crapshoot, you'll find some random employer who for some reason likes the sound of you.
[23:23:54] rubyonrails344: its ok i just want to start...
[23:23:55] Mattx: but in fact it doesn't. it works only if I put the path manually on the input on the error page: http://i.imgur.com/JX5hA10.png
[23:23:57] Mattx: any idea?
[23:23:58] rubyonrails344: no matter where mate...
[23:24:09] smathy: Mattx, :controller can't match /
[23:24:27] rubyonrails344: i am ready for it, i have examples to prove it github too want to work for free even... so idk where is the problem
[23:24:34] Mattx: I read that somewhere on the guide. let me find it
[23:24:46] Mattx: http://guides.rubyonrails.org/routing.html#dynamic-segments
[23:24:58] Mattx: I'm sure I'm not getting it, because it doesn't work
[23:25:07] Mattx: but if I write the path on the input it works, so I'm confused now
[23:25:34] ZerGabriel: has joined #RubyOnRails
[23:25:44] smathy: Mattx, huh, I thought you had to use a glob. Ok, you can ignore me :)
[23:26:14] smathy: rubyonrails344, the problem is that it's a crapshoot.
[23:26:14] Mattx: what do you mean smathy? I may need a glob (?)
[23:26:52] baweaver: As far as jobs, look into the slack channels like rails-link
[23:26:54] smathy: Mattx, it's just what I thought you needed in order to match a / - but you're right, the guide is clear there.
[23:27:04] baweaver: they tend to have a lot of content going and a dedicated jobs section
[23:27:30] Mattx: smathy, but it doesn't work :P
[23:27:41] Mattx: I'm doing something wrong, but I can't find it
[23:27:44] rubyonrails344: i am not sure i understand you... but what can i do than? any advice? like i said i know no one that can help me... if you are experienced you can maybe give me some advice?
[23:28:48] IrishGringo: has joined #RubyOnRails
[23:28:50] baweaver: http://www.rubyonrails.link/
[23:29:18] baweaver: this tends to be more of a support channel. That covers more ground on jobs and related matters.
[23:29:46] russt: has joined #RubyOnRails
[23:32:30] smathy: Mattx, using the same code from the guide doesn't work for me either.
[23:33:03] smathy: rubyonrails344, I'm not following here, I gave you advice already.
[23:33:14] smathy: [17:19:22] smathy: rubyonrails344, meet more people in the industry, work for free on little projects with people you meet, impress them, get introductions.
[23:33:58] P4Titan: Hello all. I have a has_many <-> belongs_to relationship with two Models, yet when I call destroy on the parent Model, it does not destroy the child Models. Why is that?
[23:34:22] rubyonrails344: nvm thank you anyway
[23:35:09] ZerGabriel: has joined #RubyOnRails
[23:35:11] bronson: has joined #RubyOnRails
[23:35:18] Mattx: smathy, weird. bug?
[23:35:29] xlegoman: has joined #RubyOnRails
[23:35:40] smathy: Mattx, maybe, or a bug in the guide :)
[23:35:58] smathy: Mattx, it's definitely weird that the debug console matches :)
[23:36:08] Mattx: my controllers are namespaced, I'm only trying to create routes for them without listing them all in the routes file
[23:36:22] smathy: Mattx, yeah, I'd give up and list them all.
[23:36:23] Mattx: yeah, the debug console matches, that's really consfusing
[23:36:45] Mattx: because I assume the code is the same
[23:36:54] smathy: Clearly not :)
[23:37:09] shmilan: has joined #RubyOnRails
[23:38:46] owenjones: has joined #RubyOnRails
[23:39:59] Infinite_187: has joined #RubyOnRails
[23:40:34] ZerGabriel: has joined #RubyOnRails
[23:41:38] P4Titan: Any ideas?
[23:45:06] kailido1: has joined #RubyOnRails
[23:45:08] delgiudices: has joined #RubyOnRails
[23:47:03] kailido: has joined #RubyOnRails
[23:47:09] smathy: P4Titan, maybe you put the dependent option on the wrong side, or maybe misspelled "dependent" - although you should get an error about that.
[23:47:40] georgedrummond: has joined #RubyOnRails
[23:48:29] kailido: <%= render partial: '/improvement_actions/improvement_action', locals: { improvement_action: @performance_indicator.improvement_actions.order("created_at DESC").first } %>
[23:48:39] Aswebb_: has joined #RubyOnRails
[23:48:46] shmilan: has joined #RubyOnRails
[23:48:48] kailido: this is rendering one post, how can I render all ?
[23:48:59] kailido: it only works with first
[23:50:02] P4Titan: smathy: Thanks! I accidentally ommited the dependent option
[23:51:10] smathy: kailido, http://guides.rubyonrails.org/layouts_and_rendering.html#using-partials
[23:51:22] smathy: P4Titan, ok, that'd do it.
[23:52:12] Radar: kailido: Hi again luis_
[23:52:16] arthurl: has joined #RubyOnRails
[23:52:20] aryanfun: has joined #RubyOnRails
[23:52:26] kailido: i dont know how to log in this
[23:53:49] one_zero: has joined #RubyOnRails
[23:54:02] Radar: Yet you've somehow managed?
[23:54:05] DLSteve: has joined #RubyOnRails
[23:54:15] arthurl: hi guys i'm having a strange issue w/ my ror app, i'm able to bundle install and and get into the console from the command line- however when i try bring up my app in apache i'm seein a 'You passed :source as an option for gem 'petri', but it is invalid'
[23:54:28] arthurl: i believe the error is somehow related to the bundler version
[23:54:40] Radar: kailido: https://gist.github.com/radar/743d44ecc409bad7ff355335f9eb3aee
[23:55:02] Radar: arthurl: what version of Bundler are you using
[23:55:13] Radar: arthurl: let's keep the discussion here for the time being
[23:55:37] arthurl: Radar Bundler version 1.11.2
[23:55:53] Radar: arthurl: and what does apache say it's using in terms of Ruby?
[23:56:04] aryanfun: has left #RubyOnRails: ()
[23:56:09] russt: has joined #RubyOnRails
[23:56:22] chouhoulis: has joined #RubyOnRails
[23:56:26] lemur: has joined #RubyOnRails
[23:56:43] arthurl: Radar do you mean ruby version or?
[23:56:50] Radar: arthurl: yes.
[23:56:57] Radar: arthurl: is it the same ruby that "bundle install" runs over?
[23:57:19] arthurl: how would i check that?
[23:57:36] Radar: arthurl: well, what does "ruby -v" say in your terminal, and what Ruby version is Apache configured to use?
[23:57:51] shmilan: has joined #RubyOnRails
[23:57:55] arthurl: from console: ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
[23:58:02] QualityAddict: has joined #RubyOnRails
[23:58:30] arthurl: and from my apache/passenger error screen, ruby version info: http://pastebin.com/sCH2Rpeu
[23:58:46] arthurl: got it- sorry about that
[23:59:14] kailido: collection is not working
[23:59:44] Radar: kailido: refer to 3.4.5 under this section of the guides: http://guides.rubyonrails.org/layouts_and_rendering.html#using-partials