« Back to channel list

#RubyOnRails - 10 October 2015

« Back 1 day Forward 1 day »
[00:00:01] FailBit: pwnd_nsfw: mods are away, post <x>
[00:00:13] pwnd_nsfw: I feel I'm being bated
[00:00:16] pwnd_nsfw: baited*****
[00:00:17] mehwork: whereas php is popular because it's easy to find people who know it and is crappy
[00:00:28] Radar: Time to find out if my pair for today has bailed again for the second time in two weeks...
[00:00:33] Radar: My money's on "yes"
[00:00:39] Radar: in which case, I'll be sending an invoice for the hour.
[00:02:00] mary5030: has joined #RubyOnRails
[00:02:09] pwnd_nsfw: Huhuh Todd's cool....
[00:02:13] Thomas-0725: So as a self-taught individual who is in-fact making an effort to learn and follow industry best-practices, is RoR a language that might give me any sort of advantage in eventually finding a job in The Industry, or are my odds pretty even from one language to another.
[00:02:39] mehwork: ror is a framework
[00:02:53] mehwork: ruby beibg the language
[00:02:58] workmad3: has joined #RubyOnRails
[00:03:07] Thomas-0725: Right. I'm more omfortable with Ruby than with RoR which could explain the confusion there.
[00:03:12] pwnd_nsfw: Thomas-0725, of course it'd help
[00:03:23] jsuth: has joined #RubyOnRails
[00:03:31] pwnd_nsfw: Knowing RoR is quite valuable
[00:03:45] pwnd_nsfw: If you want to freelance, you'd probably do pretty good knowing PHP.... If you want to work enterprise, go with Java lol
[00:03:48] mehwork: Thomas-0725: i dont think it gives an advantage other than maybe working with smarter people than some
[00:03:56] Thomas-0725: Is it important to know multiple languages and frameworks, or is it more important to have a focused knowledge in one or the other, would you say?
[00:04:11] ahmgeek: has joined #RubyOnRails
[00:04:17] pwnd_nsfw: It's not so much important as it just makes you a better asset.
[00:04:57] pwnd_nsfw: Especially for junior dev position being the first person you described... knowing multiple langs/frameworks.
[00:05:34] mehwork: you won't know the answer until you learn more than one
[00:06:04] mehwork: it'd be like only test driving one car
[00:06:18] ahmgeek: folks, I am sending an invitation by mail to get users, so here's the invitation link, https://gist.github.com/ahmgeek/e353fa3d71cfb607c150 I want to store the params in the url in cookies, and after the login and signup make some processing in the home page. so, the Idea is I use omniauth fb only to login.
[00:06:29] Miron_: has joined #RubyOnRails
[00:06:38] ahmgeek: so when he hit the button he goes to FB to login the get back
[00:06:48] Thomas-0725: OK, well I'll keep on studying then. I'm strapped for cash and use the web primarily for my learning resource. I have a book on discreet mathematics, a book on Ruby, and a book on Regexp. Makes sense to add a book on Rails. If I were to add just one book, is The Rails Way pretty much the go-to, or is the re a better suggestion anyone can offer?
[00:07:05] mehwork: skip math and regex
[00:07:31] mehwork: until needed
[00:08:08] oflannabhra: has joined #RubyOnRails
[00:08:50] Thomas-0725: I have a book on algorithms as well. Should I hold off on that and use it as a reference, or is it important to have a standing familiarity with major algorithms? The book is Algorithms by Sedgewick
[00:08:51] mehwork: Thomas-0725: rails 4 in action
[00:09:11] mehwork: that's a good book that you dont have to read
[00:09:21] mehwork: if you're just trying to get a job as a web dev
[00:09:49] mehwork: it's a far different world from comp sci unless you're landing a very specific comp sci requiring job
[00:10:21] l_tonz: has joined #RubyOnRails
[00:10:24] mehwork: you will overload your brain with so much stuff that you won't use, is all i'm saying. I'd start with what you will use: ruby and rails
[00:10:31] Thomas-0725: My eventual goal is to do research work possibly in algorithms related to AI, but I have a long road ahead to ever get to that point, and right now my understanding of that field is shaky at best and it could perhaps not be quite what I want. Web Dev seems to be a relatively easy foot-in-the-door, so I figure I can start there and then get a degree and whatever else is required.
[00:10:43] pwnd_nfsw: has joined #RubyOnRails
[00:10:47] mehwork: then spend some time learning javasript/css before regex
[00:11:06] mehwork: ok if that's your goal then start learning some algorithsm now then actually
[00:11:23] pwnd_nfsw: Chrome crashes periodically as I use it. Clicking on links from IRC, opening new tabs... BRO
[00:11:55] losvedir: has joined #RubyOnRails
[00:11:59] ahmgeek: pwnd_nfsw: I choose you to help me, help.
[00:12:12] mehwork: it's hard to give career advice. If you're going into AI consider looking at python
[00:12:14] pwnd_nfsw: I don't know ish about omniauth
[00:12:23] mehwork: with python there's tons of AI, machine learning, etc jobs that don't require web to get your foot in the door
[00:12:56] Thomas-0725: I assumed a career in AI might truly require a college degree. Am I maybe wrong?
[00:13:04] mehwork: rails is more for people who want to do the web and do it right
[00:13:29] Thomas-0725: Well, whatever I do even if only temporary, I'd like to be able to say I Did It Right, but ....
[00:13:29] mehwork: Thomas-0725: most tech jobs require a degree or actually knowing how to do it
[00:13:35] mehwork: if you can prove you can do it, someone will hire you
[00:13:50] mehwork: but you will have less choices probably
[00:13:59] pwnd_nfsw: Depending on your portfolio and rep
[00:15:28] mehwork: whenever a new programmer says they want to do something harder, like AI, game programming, kernel hacking or whatever, asking for advice in a web dev channel isn't the best idea
[00:15:44] mehwork: since that tends to be above our heads, we're like the ben affleck of the movie
[00:15:49] mehwork: you need to talk to some will's
[00:15:53] pwnd_nfsw: being a savant would help though
[00:17:43] Thomas-0725: I'm no savant, but I hear I'm pretty bright. It's just this is an incredibly big field, and my only real knowledge is in Ruby with some RoR knowledge and some general JavaScript experience and some stuff. I tried to do a programming bootcamp in CA but money issues forced me to quit early and return to Oklahoma. Now I'm forced to do this on my own, so it's like AH! It's hard to know what must be known to do what.
[00:17:51] Thomas-0725: In any case, thanks for the off-topic help. :)
[00:18:11] havenn: has joined #RubyOnRails
[00:18:41] mehwork: i'm self-taught but my teacher lets me goof off too much
[00:18:51] ElSif: has joined #RubyOnRails
[00:19:21] mehwork: i've never paid to learn anything programming wise and have made probably millions of dollars writing CRUD apps. but that is far from AI
[00:19:49] mehwork: no one in their right neuro network would pay me to do AI
[00:20:27] pwnd_nfsw: yo my tests are so good they might as well be AI
[00:21:04] mary5030: has joined #RubyOnRails
[00:21:14] mehwork: i'd like to say that if you're smart enough to learn AI, you're smart enough to learn a web framework, but that might not be true. Being able to get a web dev job usually means being a jack of all trades, very practice and fast and experienced. Not able to look everything up in a text book or apply one math solution
[00:21:23] rhizome: just a single selenium script
[00:21:47] mehwork: my point being, that if you're trying to break into AI by first breaking into web dev, you might be totally distracting yourself
[00:21:59] mary5030_: has joined #RubyOnRails
[00:22:18] pwnd_nfsw: You're absolutely distracting yourself
[00:22:22] mehwork: i'd say avoid web, go python and go get one of the thousands of python jobs out there i see all of the time that don't require web dev
[00:22:28] pwnd_nfsw: However, you can still use Ruby to write some simple AI
[00:22:34] pwnd_nfsw: if you have a decent understanding
[00:22:42] rickmasta: has joined #RubyOnRails
[00:22:43] pwnd_nfsw: But other languages open up other possibilities
[00:22:51] mehwork: it's harder to find pure ruby jobs that don't also want rails though, i think is what he's worried about
[00:23:00] Thomas-0725: Why are you opposed to AI? And I'm a generalist at heart, but my meticulous nature has a tendency to distract from that and make me feel as though I should have some sort of specialty. It's a weird spot. I understand your advice regarding not using webdev as a path to AI, and it makes sense to me. Ultimately, it might be pertinent to clarify that while I'm trying to break into AI ... perhaps more importantly I
[00:23:00] Thomas-0725: am trying to break out of fast food. :)
[00:23:41] mehwork: i'm not opposed to it. I don't know anything about it and have been more than busy with web stuff
[00:23:46] rapha: Good morning!
[00:24:41] rapha: Could somebody point me towards an explanation of how submit a form using http://foundation.zurb.com/docs/components/dropdown_buttons.html and perform a different action according to which <a> was clicked?
[00:24:50] stamina: has joined #RubyOnRails
[00:25:34] Thomas-0725: Ah ok. Well, good talk. Thank the both of you for the insights! Goodbye for now. :)
[00:25:41] rapha: The only thing I can imagine that would work (given how the buttons are presented on that site) is by looking at the link text, i.e. the stuff between <a> and </a>, which can't possibly be a very good idea.
[00:26:11] mehwork: Thomas-0725: it will be hard to get anyone to hire you without either a degree or some general programming work experience i'm sure. So maybe it doesn't matter if you get into rails. Just get some jr to intermediate web dev jobs if that's what it takes and focus on your AI
[00:26:18] pwnd_nfsw: rapha, javascript?
[00:26:24] mehwork: and let nature take its course. You might find you end up wanting to focus on web
[00:26:57] pwnd_nfsw: WEB AI!!!!!
[00:27:05] pwnd_nfsw: GoogleBot 9.000
[00:27:06] mehwork: at the very least it will look better if you have some tech companies on your resume rather than mcdonalds
[00:27:06] rapha: pwnd_nfsw: despite of that being uncool if it doesn't gracefully degrade, it would still suck.
[00:27:28] pwnd_nfsw: But... you want a link to submit a form
[00:27:29] mehwork: Thomas-0725: OR keep your day job and just do a lot of open source stuff in AI
[00:27:57] pwnd_nfsw: Write computer systems for your place of work
[00:28:00] Thomas-0725: Though it would make a good story
[00:28:06] rapha: pwnd_nfsw: I want one of these Foundation Dropdown Buttons to submit a form. They *do* work by way of a <button>, so it's different from just a link.
[00:28:08] Thomas-0725: Barista by day
[00:28:11] Thomas-0725: Coder by night
[00:28:14] EminenceHC: has joined #RubyOnRails
[00:28:21] Thomas-0725: Baristo? I don't even know
[00:28:29] mehwork: the only shame in fast food is those who eat it
[00:28:41] Or1on: What makes the ruby community so awesome!? is it chunky bacon? Maybe I should give up on vegetarianism...
[00:28:50] pwnd_nfsw: rapha, put the html for a form in the li and style as neccessary?
[00:28:56] pwnd_nfsw: also uncool
[00:29:18] herbst: has joined #RubyOnRails
[00:30:19] rapha: pwnd_nfsw: since Bootstrap and Foundation are so hot and cool and the best thing ever, there's got to be a sane way of doing this. Interestingly, for both of these, such Dropdown Buttons seems to work the same. I guess I'll try to find the proper place on the web to ask for help with them. The backend side won't differ between Rails, PHP and whatnot.
[00:31:12] rhizome_: has joined #RubyOnRails
[00:32:00] pwnd_nfsw: I'm just interested in what you're really trying to implement here rapha
[00:32:20] pwnd_nfsw: Perhaps a little more description will give us some more direction.
[00:32:32] RegulationD: has joined #RubyOnRails
[00:33:51] l_tonz_: has joined #RubyOnRails
[00:34:09] ahmgeek: has joined #RubyOnRails
[00:34:34] ahmgeek: https://gist.github.com/ahmgeek/c4ff158504c7bdc9b3f1
[00:34:40] rapha: pwnd_nfsw: Hmm. So I have this form with three different submit buttons (i.e. <input type="submit">) each causing the form to redirect somewhere else. It works but looks rather awkward. From a UI perspective, one of these Dropdown Buttons would make much more sense.
[00:35:22] rapha: pwnd_nfsw: I can't possibly be the first person wanting to implement such a thing, can I?
[00:35:46] dopamean_: has joined #RubyOnRails
[00:35:49] rapha: ACTION thought that such UI has become quite standard by now
[00:36:30] bricker: rapha: the name of the button gets sent with the form and available to you in the params
[00:36:36] bricker: rapha: so, set a different name for each button
[00:36:52] Denarii: has joined #RubyOnRails
[00:39:04] pwnd_nfsw: rapha, you described it seemingly different this time around. bricker has your answer.
[00:39:05] bricker: rapha: <button name="formAction" value="firstThing"> ... <button name="formAction" value="secondThing">
[00:39:59] rapha: bricker: that's with normal buttons and is also what I do right now. If you take a look at http://foundation.zurb.com/docs/components/dropdown_buttons.html, they doesn't offer any way to make that work. The <a>'s have no way of changing the <button>'s name except perhaps with their href string, which would be a problem because of i18n.
[00:40:35] FailBit: <Or1on> What makes the ruby community so awesome!? is it chunky bacon? Maybe I should give up on vegetarianism...
[00:40:38] FailBit: the language has fewer annoying flaws and makes a "get-er-done" mentality rewarding
[00:40:48] rushed: has joined #RubyOnRails
[00:41:05] bricker: rapha: put buttons inside the dropdown, they don't have to be <a> tags
[00:41:07] pwnd_nfsw: chunky bacon is from why_'s ruby guide
[00:41:35] pwnd_nfsw: unless a has particular style done to it. then you must carry this style to your buttons.
[00:41:52] DanKnox: has joined #RubyOnRails
[00:42:06] pwnd_nfsw: you should give up on vegetarianism just for bacon anyways
[00:42:16] rapha: bricker: oh! so that's the answer then ??? I was under the impression it *has* to be like they show there (I'm new to Foundation and the whole CSS/JS framework thing, plus haven't had a lot of sleep). Thank you!!
[00:42:35] rapha: pwnd_nfsw: ofc, makes sense
[00:42:40] bricker: rapha: Even if it does for some reason require a link there... it's just CSS, change it
[00:42:45] rapha: Then this can be solved afterall
[00:42:57] l_tonz: has joined #RubyOnRails
[00:43:00] rapha: That makes me feel a bit better about stopping at this point and going to get some sleep
[00:43:03] rapha: Thank you all!
[00:43:15] pwnd_nfsw: I hate not being able to sleep because stuck on a problem
[00:43:22] pwnd_nfsw: Might as well not sleep... going to be thinking about it all night
[00:44:01] rapha: ever since my burnout in 2009 that has changed for me
[00:44:05] mehwork: maybe you're stuck on the problem because you haven't slept
[00:44:20] rapha: so yeah, do take care to get your sleep guys
[00:44:22] pwnd_nfsw: He's no longer stuck, is he awake now?
[00:44:24] rapha: bad things happen if you dont
[00:44:42] rapha: g'night there all around the world now!
[00:45:26] mehwork: i'm not a doctor but i play one on irc
[00:46:07] pwnd_nfsw: That's all that counts
[00:46:27] Or1on: FailBit, people in this channel are often upbeat and answering questions in good humor... that is not always the case in channels of other frameworks. so there is something unique here even though the community is larger.
[00:47:02] FailBit: we have active mods, maybe?
[00:48:13] pwnd_nfsw: ty css for rendering correctly... I really appreciate it
[00:48:20] pwnd_nfsw: "np, but im not really rendering correctly"
[00:48:23] pwnd_nfsw: ACTION sighs.
[00:48:40] mehwork: computers will always let the programmer know they're the one really in charge
[00:48:59] tweeeaks: has joined #RubyOnRails
[00:49:05] pwnd_nfsw: Haha, seemingly
[00:52:58] FailBit: pwnd_nfsw: https://mobile.twitter.com/ericwastl/status/652270524358389760
[00:53:00] pwnd_nfsw: "Yo, it's css again... perhaps if you would minimize your typos, shit would be gravy yo"
[00:53:31] l_tonz: has joined #RubyOnRails
[00:54:04] mary5030: has joined #RubyOnRails
[00:54:04] jamto11: has joined #RubyOnRails
[00:54:26] hephaestus_rg: has joined #RubyOnRails
[00:54:54] doodlehaus: has joined #RubyOnRails
[00:55:11] oflannab_: has joined #RubyOnRails
[00:56:02] jaequery: has joined #RubyOnRails
[00:57:20] BlackCoyote: has joined #RubyOnRails
[00:58:44] mices: pwnd_nfsw: so the first step would be to add an admin attribute to the users table ?
[00:58:49] nya: has joined #RubyOnRails
[00:59:02] FailBit: I'd add a role string
[00:59:08] FailBit: default it to user
[00:59:26] mices: so where does pundit refer to find out the users role
[00:59:30] riotjones: has joined #RubyOnRails
[01:00:16] mices: https://github.com/elabs/pundit all these docs and it doesn't tell you where the user:role table is
[01:01:14] baweaver: has joined #RubyOnRails
[01:01:25] mices: FailBit: what's a role string?
[01:01:36] pwnd_nfsw: a string that defines a role..
[01:01:41] mices: heh ok sorry
[01:02:38] ellisTAA: has joined #RubyOnRails
[01:02:50] jamto11: has joined #RubyOnRails
[01:03:01] ellisTAA: would it be hard to build an app where two users can voice chat with each other?
[01:03:24] pwnd_nfsw: No, but that's just a simple answer for your simple question.
[01:03:27] l_tonz: has joined #RubyOnRails
[01:04:07] elaptics: mices: pundit doesn't define any roles, it doesn't care
[01:04:19] mices: i see, ty
[01:04:26] mices: do i need pundit?
[01:04:47] elaptics: mices: no idea. What are you doing?
[01:05:01] mices: a sellers platform
[01:05:09] pwnd_nfsw: you don't technically need it, especially if just for admin/user differentiation.
[01:05:19] mices: yea that's all
[01:05:20] pwnd_nfsw: For more complex examples, pundit helps
[01:05:36] mices: so what should i read
[01:05:52] elaptics: mices: a user is either an admin or not?
[01:05:59] mices: yea that's all
[01:06:09] elaptics: keep it simple with a boolean then
[01:06:25] mices: no, i like the role string it's cool
[01:06:57] elaptics: why complicate it if you don't need to
[01:07:17] mices: it's either null or admin
[01:07:19] pwnd_nfsw: but yeah, mices, you tell pundit how to define the roles, you use pundit to help with the actual authorization part of it
[01:07:20] elaptics: harder to go wrong with a boolean. Especially if you default it to false in the database
[01:07:23] mices: that's simple
[01:07:45] elaptics: mices: yeah, except a string could be admin Admin ADMIN aDmin
[01:08:01] elaptics: so then you need to do more work to normalise it or protect it, etc
[01:08:25] elaptics: e.g. role check user.role == "admin"
[01:08:27] pwnd_nfsw: plus it's 4 extra characters
[01:08:30] pwnd_nfsw: instead or 1 or 0
[01:08:50] elaptics: mices: it's much simpler to have checks like user.admin?
[01:09:30] erich: has joined #RubyOnRails
[01:09:36] elaptics: mices: all you need to do is define an `admin` boolean column in your database and rails will give you that admin? predicate method
[01:10:08] elaptics: mices: the only thing you need to make sure is that normal users can't set admin to elevate their permissions
[01:10:26] elaptics: applies equally if you were going to use a role string too
[01:10:48] elaptics: i.e. don't allow the admin attribute in your strong parameters list
[01:11:54] nettoweb: has joined #RubyOnRails
[01:12:42] stannard: has joined #RubyOnRails
[01:12:58] SamGerber: has joined #RubyOnRails
[01:13:30] l_tonz: has joined #RubyOnRails
[01:15:31] rushed: has joined #RubyOnRails
[01:16:05] stardiviner: has joined #RubyOnRails
[01:19:12] one_zero: has joined #RubyOnRails
[01:19:43] mices: but if i went with the role string and someday had to hire someone there'd be something in between web and admin and i wouldn't have to make changes all throughout my app
[01:20:18] FailBit: role string means you could have a moderator role
[01:20:25] FailBit: or a janitor role
[01:20:32] FailBit: and then you become 4chan
[01:21:10] mices: if i went a step above just admin or not i'd wanna use something like pundit?
[01:21:14] NBarnes: has joined #RubyOnRails
[01:21:40] mices: if i actually start using more than 2 roles
[01:21:54] mices: or i can do just as well without pundit
[01:22:00] shumshar: has joined #RubyOnRails
[01:22:43] mices: you can't let staff have the same admin as webmaster that's for sure
[01:22:46] NBarnes: Why am I getting "undefined method `empty?' for nil:NilClass" when I try "render root_path"?
[01:23:09] pwnd_nfsw: NBarnes, wha'ts the rest of the controller action look like
[01:23:28] NBarnes: It's in a before filter action.
[01:23:36] pwnd_nfsw: that's great
[01:23:36] NBarnes: It fails even with an empty controller action.
[01:24:01] pwnd_nfsw: Are you not initializing something that your view at root_path needs?
[01:24:21] pwnd_nfsw: just shooting in the dark since I have no code
[01:24:25] oflannabhra: has joined #RubyOnRails
[01:24:27] l_tonz: has joined #RubyOnRails
[01:24:38] rhizome_: render path_helper is not normal
[01:24:50] pwnd_nfsw: oh yeah, duh
[01:25:03] jessemcgilallen: has joined #RubyOnRails
[01:25:50] chills42: has joined #RubyOnRails
[01:27:01] NBarnes: Not normal in what sense?
[01:27:10] pwnd_nfsw: it's not a partial or a view
[01:27:28] NBarnes: I think I see the distinction.
[01:28:13] NBarnes: Render... renders something. Somewhat analogous to rendering a picture. Whereas redirect_to, which has roughly similar utility to render, nevertheless has routing and paths at its core.
[01:28:31] NBarnes: So render expects a view or a partial or whatnot. redirect_to expects a path.
[01:29:00] hnanon: has joined #RubyOnRails
[01:29:36] hnanon: Can a column name begin with an integer? Like 100_some_text?
[01:29:55] rhizome_: no don't do that
[01:30:27] rhizome_: NBarnes: redirect_to is a Location: header in the browser
[01:33:05] mehwork: did rails 4 change flash messages css from #alert to .error?
[01:33:34] mehwork: oh i think it's just another tutorial saying diff things
[01:35:09] hnanon: rhizome: "no don't do that" to me?
[01:35:49] MartinEl_: has joined #RubyOnRails
[01:36:17] rboyd_: has joined #RubyOnRails
[01:37:15] hnanon: Why, though?
[01:37:55] hnanon: It affects some ruby methods when starting as an integer?
[01:39:05] rhizome: methods can't begin with a number, and column names become methods in ActiveRecord
[01:39:44] oflannab_: has joined #RubyOnRails
[01:40:53] i: has joined #RubyOnRails
[01:44:41] metalic: has joined #RubyOnRails
[01:44:58] joshkovach: has joined #RubyOnRails
[01:45:00] dikaio: has joined #RubyOnRails
[01:46:38] dopie: has joined #RubyOnRails
[01:51:12] workmad3: has joined #RubyOnRails
[01:53:01] ellisTAA: has joined #RubyOnRails
[01:53:16] hahuang61: has joined #RubyOnRails
[01:54:55] michael_mbp: has joined #RubyOnRails
[01:55:03] NBarnes: has joined #RubyOnRails
[01:59:44] rickmasta: has joined #RubyOnRails
[02:00:21] riotjones: has joined #RubyOnRails
[02:01:36] thejamespinto_: has joined #RubyOnRails
[02:01:47] Icey: has joined #RubyOnRails
[02:04:07] thejamespinto: has joined #RubyOnRails
[02:04:19] losvedir: has joined #RubyOnRails
[02:04:58] mary5030: has joined #RubyOnRails
[02:05:45] jaequery: has joined #RubyOnRails
[02:08:04] mary5030_: has joined #RubyOnRails
[02:10:28] mary5030: has joined #RubyOnRails
[02:10:31] atomical: has joined #RubyOnRails
[02:13:14] NBarnes: has joined #RubyOnRails
[02:13:31] thejamespinto_: has joined #RubyOnRails
[02:13:51] Contigi777: has joined #RubyOnRails
[02:18:14] Shoutsid: has joined #RubyOnRails
[02:19:07] doodlehaus: has joined #RubyOnRails
[02:19:08] thejamespinto: has joined #RubyOnRails
[02:21:59] chi6rag: has joined #RubyOnRails
[02:23:18] thejamespinto: has joined #RubyOnRails
[02:24:45] shumshar: has left #RubyOnRails: ()
[02:25:40] jsuth: has joined #RubyOnRails
[02:26:21] mtmcfarl: has joined #RubyOnRails
[02:26:57] mtmcfarl: I'm running a rake task once per minute. Is there a way that I can load the Rails env only once and have it "cached" somehow.
[02:27:21] doritostains: has joined #RubyOnRails
[02:29:25] discounted: has joined #RubyOnRails
[02:33:08] wethu: has joined #RubyOnRails
[02:33:17] RegulationD: has joined #RubyOnRails
[02:36:23] weihan: has joined #RubyOnRails
[02:39:42] d5sx43: has joined #RubyOnRails
[02:40:41] l_tonz_: has joined #RubyOnRails
[02:40:51] rhizome: curious what needs to be run every minute, but rake runs from scratch. look more into daemonizing a ruby script.
[02:44:10] mtmcfarl: thanks rhizome
[02:45:00] thejamespinto_: has joined #RubyOnRails
[02:45:39] rhizome: or bash, or rails runner
[02:45:42] hnanon: has joined #RubyOnRails
[02:50:02] weihan: has joined #RubyOnRails
[02:55:44] AnoHito: has joined #RubyOnRails
[02:56:29] rushed_: has joined #RubyOnRails
[02:57:34] yaymukund: has joined #RubyOnRails
[02:58:02] Rixius: has joined #RubyOnRails
[03:00:23] sevenseacat: has joined #RubyOnRails
[03:06:48] nyaa: has joined #RubyOnRails
[03:08:01] chipotle: has joined #RubyOnRails
[03:08:28] stardiviner: has joined #RubyOnRails
[03:10:53] braincrash: has joined #RubyOnRails
[03:14:31] w0rd-driven: has joined #RubyOnRails
[03:15:25] iliketurtles: has joined #RubyOnRails
[03:21:16] mary5030: has joined #RubyOnRails
[03:21:49] C0L0R: has joined #RubyOnRails
[03:22:54] hightower4: Hey, within an extension, is there a variable/location containing the extension's name? (E.g. in an install generator)
[03:29:35] thejamespinto: has joined #RubyOnRails
[03:29:36] ishikawa91: has joined #RubyOnRails
[03:31:21] nertzy: has joined #RubyOnRails
[03:34:47] d2dchat: has joined #RubyOnRails
[03:35:27] greenride: has joined #RubyOnRails
[03:36:23] Coldblackice_: has joined #RubyOnRails
[03:39:14] workmad3: has joined #RubyOnRails
[03:39:54] riotjones: has joined #RubyOnRails
[03:40:11] psyonix: has joined #RubyOnRails
[03:42:49] _3dwardsharp: has joined #RubyOnRails
[03:42:52] Jameser: has joined #RubyOnRails
[03:45:12] havenn: has joined #RubyOnRails
[03:48:46] pontiki: has joined #RubyOnRails
[03:50:33] avemestr: has joined #RubyOnRails
[03:51:43] jamto11_: has joined #RubyOnRails
[03:57:16] seank_: has joined #RubyOnRails
[03:57:43] dikaio: has joined #RubyOnRails
[03:59:35] Jameser: has joined #RubyOnRails
[04:00:26] baweaver: has joined #RubyOnRails
[04:00:57] greenride: When items are moved in a spree taxonomy, what would cause the url to be updated? Initially, the old url was maintained, but the url changed to reflect the new location.
[04:02:52] bruno-: has joined #RubyOnRails
[04:02:57] rhizome: which one is actually happening?
[04:06:04] ZucchiniZe: has joined #RubyOnRails
[04:08:26] greenride: rhizome: The item is being moved manually. The unintended consequence is that the url changes to reflect the new location within the taxonomy.
[04:08:44] greenride: rhizome: Is there a rake task or some other piece of code that updates these urls?
[04:12:03] mrburied: has joined #RubyOnRails
[04:12:40] Bilbo-baggons: has joined #RubyOnRails
[04:18:55] rhizome: probably. i thought you were asking about responding to old urls with a redirect to the new content
[04:19:54] greenride: rhizome: No. I was wondering what actions could cause the url to be updated.
[04:21:47] gaboesquivel: has joined #RubyOnRails
[04:26:54] gaboesqu_: has joined #RubyOnRails
[04:29:31] Pharaoh2: has joined #RubyOnRails
[04:33:58] The_Phoenix: has joined #RubyOnRails
[04:37:32] rhizome: the act of saving, perhaps
[04:38:09] rhizome: after changing the attribute(s) the slug is created from. you're implying you don't want the url to be changing?
[04:40:06] workmad3: has joined #RubyOnRails
[04:40:43] riotjones: has joined #RubyOnRails
[04:43:51] rromanch_: has joined #RubyOnRails
[04:47:02] jaequery: has joined #RubyOnRails
[04:56:39] discounted: has joined #RubyOnRails
[04:57:42] avemestr: has joined #RubyOnRails
[04:59:07] ellisTAA: has joined #RubyOnRails
[04:59:26] gaboesquivel: has joined #RubyOnRails
[05:07:00] mmb: has joined #RubyOnRails
[05:07:00] jenrzzz: has joined #RubyOnRails
[05:08:52] hephaestus_rg: has joined #RubyOnRails
[05:13:44] youngbaks: has joined #RubyOnRails
[05:15:08] hahuang61: has joined #RubyOnRails
[05:15:44] jenrzzz: has joined #RubyOnRails
[05:21:56] inoter: has joined #RubyOnRails
[05:23:02] jenrzzz: has joined #RubyOnRails
[05:25:33] rakm: has joined #RubyOnRails
[05:27:20] mrburied: What is the default Datetime format for Rails ? Where can I see ?
[05:27:35] mrburied: [5] pry(main)> Share.last.update_attribute(:expiry_time, "10/14/2015".to_datetime) gives me error
[05:27:50] mrburied: ArgumentError: invalid date
[05:31:41] rickmasta: has joined #RubyOnRails
[05:32:49] ereslibre: has joined #RubyOnRails
[05:33:04] tejasmanohar: for practice, i was thinking of building a site that creates a mini "workspace" where users can add static files and run them... each workspace would just kinda run a mini http server (kinda like python m simple http server etc) and just show the static files
[05:33:28] tejasmanohar: i know if it was just html you could save the html in the database or if you were generating html etc and then display it in a view
[05:33:42] chipotle: has joined #RubyOnRails
[05:33:44] tejasmanohar: but since im allowing the user to add "files" w/ html, css, js, etc. link them up and work, it's a bit different
[05:33:57] tejasmanohar: would i need to create "sandboxes" somehow? not sure what the best way to do that would be
[05:34:10] tejasmanohar: i would guess i would create a directory for each user or something? maybe docker? not sure
[05:35:05] skullcrasher: has joined #RubyOnRails
[05:37:20] iliketurtles: has joined #RubyOnRails
[05:39:43] tejasmanohar: kinda like treehouse's workspaces https://teamtreehouse.com/workspaces
[05:40:12] doodlehaus: has joined #RubyOnRails
[05:40:51] workmad3: has joined #RubyOnRails
[05:41:30] riotjones: has joined #RubyOnRails
[05:43:17] TheShaun: has joined #RubyOnRails
[05:43:32] dionysus69: has joined #RubyOnRails
[05:46:15] mmb: has joined #RubyOnRails
[05:47:20] ejnahc: has joined #RubyOnRails
[05:49:23] markelite: has joined #RubyOnRails
[05:52:02] srinidhi: has joined #RubyOnRails
[05:52:38] yfeldblum: has joined #RubyOnRails
[05:52:46] towski_: has joined #RubyOnRails
[05:56:30] simplyianm: has joined #RubyOnRails
[06:04:39] bruno-: has joined #RubyOnRails
[06:05:45] rushed: has joined #RubyOnRails
[06:07:53] mrburied: has joined #RubyOnRails
[06:08:34] jenrzzz: has joined #RubyOnRails
[06:23:13] jenrzzz: has joined #RubyOnRails
[06:24:47] gusrub: has joined #RubyOnRails
[06:26:29] dionysus69: anyone ever user datatable with column filter? I made datatable work but column filter doesnt show up :s
[06:31:58] warshrike: has joined #RubyOnRails
[06:32:58] warshrike: Hello Brother! I seek aid. I
[06:33:22] rushed: has joined #RubyOnRails
[06:34:23] warshrike: I'm trying model Students such that they have many programs, which will be selected from a checkbox when students are created. So I have a Student model with has_many: Programs; and a Program model with belongs_to Student.
[06:34:46] RegulationD: has joined #RubyOnRails
[06:34:53] warshrike: Using formtastic, I can create the checkbox easily as f.input :program_ids, :as => :check_boxes
[06:35:28] warshrike: But when the programs are selected while making students the the programs seem to get reassigned
[06:36:07] warshrike: So, for example, to students can't have science. If I give sicence to a student, then to another one, the first will lose it.
[06:36:17] rushed: warshrike: that's what belongs_to means
[06:36:34] mrburied: you need many to many
[06:36:39] warshrike: Hey Rushed whats up you helped me last time too
[06:36:50] stannard: has joined #RubyOnRails
[06:36:51] rushed: warshrike: http://railscasts.com/episodes/17-habtm-checkboxes
[06:36:59] rushed: warshrike: that doesn't sound like me~ :P
[06:37:02] mrburied: yes.. there you go
[06:37:13] warshrike: the habtm seems too complex...
[06:38:01] warshrike: so its a students has many programs...and a program belongs to many students
[06:38:21] mrburied: You idea doesn't match the modeling you did.
[06:38:34] mrburied: You need to change to many to many, Bro
[06:38:41] warshrike: Yeah makes sense now
[06:38:54] warshrike: formtastic should figure the rest out on its own
[06:39:01] warshrike: Thanks guys. I'll try this
[06:39:33] mrburied: Why not use form_for ? :(
[06:39:43] mrburied: this is also powerful..
[06:40:07] mrburied: Last 2 years, I am using form_for day and night
[06:40:31] warshrike: Yeah I use it normally. But I'm using activeadmin for this project
[06:40:34] warshrike: and it has formtastic builtin
[06:41:34] warshrike: will a has_and_belongs_to_many on the activerecord level do? or do I need a migration for a join on the sql level too
[06:41:37] workmad3: has joined #RubyOnRails
[06:42:08] mrburied: Ok.. Then you HAVE to
[06:42:15] riotjones: has joined #RubyOnRails
[06:42:29] mrburied: ActiveAdmin use that shit..
[06:42:48] mrburied: gem inside gem inside gem inside gem .............
[06:45:22] dionysus69: I need to save extra js files to vendor/assets/js right?
[06:45:34] mrburied: what do you mean by extra ?
[06:45:49] warshrike: after I turned the has_many into has_and_belongs_to_many
[06:46:30] warshrike: rails can't find col 'program' in students model
[06:46:43] warshrike: is this expected?
[06:47:13] mrburied: did you wrote migrations at all for HABTM
[06:47:23] mrburied: or just changed those levels..?
[06:47:41] warshrike: No I just did
[06:47:44] warshrike: has_and_belongs_to_many
[06:47:49] dionysus69: extra like downloaded js files which I will use as a lib
[06:47:52] mrburied: wouldn't work
[06:48:04] mrburied: read rails guide for the HABTM migration
[06:48:13] mrburied: dionysus69: vendor
[06:49:00] dionysus69: mrburied: thanks :)
[06:49:27] warshrike: Ok. but btw I need something like a table associating students and programs?
[06:49:48] mrburied: Yes, You need to write a migration so that your HABTM works.
[06:49:54] mrburied: otherwise it wouldn't work
[06:50:15] mrburied: You have to do DB level some stuffs.. then those Rails macro will hear you.. otherwise not
[06:51:02] benlieb: has joined #RubyOnRails
[06:51:29] baweaver: A habtm B => A -> (AB.a_id, AB.b_id) -> B
[06:51:39] baweaver: AB needs to exist in the database
[06:51:47] baweaver: otherwise how do you link A and B?
[06:52:17] baweaver: honestly though I use habtm through
[06:52:29] baweaver: even if I don't immediately think I'll need the model present in Rails
[06:52:37] mrburied: You mean has_many through..
[06:52:52] baweaver: that's what I meant
[06:52:59] baweaver: Friday is hard for typing
[06:53:30] mrburied: I know. I am in Saturday now.
[06:53:54] warshrike: so I'llmake a table students_programs...and to make it explicit add ', join_table: :students_programs' after has_and_belongs_to_many
[06:53:56] warshrike: should work?
[06:54:15] warshrike: ooh im saturday too
[06:54:43] baweaver: read the guides
[06:54:49] baweaver: they cover this
[06:57:05] htmldrum: has joined #RubyOnRails
[06:58:22] weihan: has joined #RubyOnRails
[06:59:32] Lytol: has joined #RubyOnRails
[06:59:52] pawnbox: has joined #RubyOnRails
[07:00:30] rushed: has joined #RubyOnRails
[07:00:33] johnflux_: has joined #RubyOnRails
[07:04:04] havenn: has joined #RubyOnRails
[07:06:20] bruno-: has joined #RubyOnRails
[07:13:27] ChariIsSalty: has joined #RubyOnRails
[07:13:42] lxsameer: has joined #RubyOnRails
[07:13:53] ChariIsSalty: has left #RubyOnRails: ()
[07:13:55] NBarnes: has joined #RubyOnRails
[07:23:30] Pharaoh2: has joined #RubyOnRails
[07:24:23] otacon-: has joined #RubyOnRails
[07:28:48] Puffball: has joined #RubyOnRails
[07:37:28] Coldblackice_: has joined #RubyOnRails
[07:41:01] doodlehaus: has joined #RubyOnRails
[07:41:12] richipargo: has joined #RubyOnRails
[07:43:45] tejasmanohar: if i want to redirect all traffic in my rails app to another webpage, is a before_filter the best way to do this?
[07:43:46] Dopagod: has joined #RubyOnRails
[07:43:46] Dopagod: has joined #RubyOnRails
[07:44:43] webdestroya: has joined #RubyOnRails
[07:45:09] Dopagod: has joined #RubyOnRails
[07:45:14] moei: has joined #RubyOnRails
[07:46:45] rromanch_: has joined #RubyOnRails
[07:47:22] yfeldblum: has joined #RubyOnRails
[07:52:11] Jameser: has joined #RubyOnRails
[07:52:20] tejasmanohar: root to: redirect('https://google.com') doesn't seem to do the trick... No route matches [GET] "..." error - seems like Rails thinks this is a local/relative path / url though https:// should mean full url, no?
[07:52:49] tejasmanohar: http://stackoverflow.com/questions/30766482/rails-route-redirect-to-external-url O.o -> this says it should work
[07:53:54] tejasmanohar: nvm me, browser was redirected due to old code and forgot to change URL in bar sorry
[07:57:07] nya: has joined #RubyOnRails
[07:58:55] habitullence: has joined #RubyOnRails
[08:04:14] hahuang61: has joined #RubyOnRails
[08:04:51] srinidhi: has joined #RubyOnRails
[08:07:55] blackmesa: has joined #RubyOnRails
[08:08:29] armyriad: has joined #RubyOnRails
[08:12:56] webdestroya: has joined #RubyOnRails
[08:13:01] saneki: has joined #RubyOnRails
[08:13:44] rushed: has joined #RubyOnRails
[08:14:08] darutoko: has joined #RubyOnRails
[08:15:09] dionysus69: has joined #RubyOnRails
[08:15:20] tw1sted: has joined #RubyOnRails
[08:17:00] weltzooo: has joined #RubyOnRails
[08:17:17] Haydos: has joined #RubyOnRails
[08:18:04] iszak: has joined #RubyOnRails
[08:18:04] iszak: has joined #RubyOnRails
[08:19:21] avelldiroll: has joined #RubyOnRails
[08:20:40] simplyianm: has joined #RubyOnRails
[08:22:26] ynonp: has joined #RubyOnRails
[08:23:30] srinidhi: has joined #RubyOnRails
[08:26:40] JulienITARD: has joined #RubyOnRails
[08:26:55] rushed: has joined #RubyOnRails
[08:29:32] workmad3: has joined #RubyOnRails
[08:29:47] srinidhi1: has joined #RubyOnRails
[08:30:10] triangles: has joined #RubyOnRails
[08:31:29] lxsameer: has joined #RubyOnRails
[08:35:47] sevenseacat: has joined #RubyOnRails
[08:37:38] Trynemjoel: has joined #RubyOnRails
[08:38:41] MartinElvar: has joined #RubyOnRails
[08:39:28] zpe: has joined #RubyOnRails
[08:41:08] avemestr: has joined #RubyOnRails
[08:43:53] quazimodo: has joined #RubyOnRails
[08:44:00] quazimod1: has joined #RubyOnRails
[08:45:02] xcesariox: has joined #RubyOnRails
[08:45:09] Trynemjoel: has joined #RubyOnRails
[08:46:25] n008f4g_: has joined #RubyOnRails
[08:48:11] alan_andrade: has joined #RubyOnRails
[08:49:54] Jasaka: has joined #RubyOnRails
[08:51:26] DEA7TH: has joined #RubyOnRails
[08:53:22] Lytol: has joined #RubyOnRails
[08:54:39] Trynemjoel: has joined #RubyOnRails
[08:57:10] yaymukund: has joined #RubyOnRails
[09:02:59] meoblast001: has joined #RubyOnRails
[09:04:31] triangles: has joined #RubyOnRails
[09:06:48] stardiviner: has joined #RubyOnRails
[09:07:26] bruno-: has joined #RubyOnRails
[09:08:28] PhantomSpank: has joined #RubyOnRails
[09:08:30] dionysus69: how do I make something like datatable but instead of <td> rows I want to have floating divs ?
[09:09:17] pwnd_nfsw: Time traveling to ~2004 may help you too
[09:10:07] dionysus69: ok thanks that means leaving structure just altering css
[09:11:27] pwnd_nfsw: float: left;
[09:11:51] pwnd_nfsw: best of luck though
[09:12:48] dionysus69: ye I will have to test how that behaves ^.^
[09:13:57] pwnd_nfsw: Back in the day you had to mess with that stuff all of the time
[09:14:18] pwnd_nfsw: But, thanks to front end frameworks, I never have to go through that ish again
[09:15:33] sevenseacat: has joined #RubyOnRails
[09:17:09] dionysus69: what solution would you use for lets say hundreds of results in floating blocks and be able to sort filter and maybe search too?
[09:17:20] alex88: has joined #RubyOnRails
[09:17:50] Bilbo-baggons: has joined #RubyOnRails
[09:19:24] baweaver: bootstrap + frontend framework
[09:19:29] marr: has joined #RubyOnRails
[09:19:54] baweaver: if you do the css by hand, remember to clear the float
[09:20:02] baweaver: otherwise.... well, you'll figure that one out.
[09:20:51] workmad3: has joined #RubyOnRails
[09:21:26] moeabdol: has joined #RubyOnRails
[09:21:52] baweaver: to those who don't know how to use it perhaps
[09:22:54] dionysus69: ye I dont think css sucks hehe
[09:23:07] dionysus69: it made design easy
[09:24:22] baweaver: most of the issue is that browsers fail to agree on how to implement it.
[09:25:18] dionysus69: chrome and firefox is most of the market, developers I assume ignore the rest anyway
[09:25:51] baweaver: depending on your demographic, you need to pay attention and support approprietly
[09:26:16] mrburied: I need to know how to skip callback while saving AR
[09:26:21] FailBit: if you work for a large corporation, expect to be supporting IE8
[09:26:34] mrburied: otherwise I ran into a recusion
[09:26:46] baweaver: arbitrary statements are arbitrary.
[09:26:58] baweaver: ACTION works at a big company
[09:27:05] baweaver: ACTION does not support IE < 10
[09:27:15] FailBit: I didn't say it was a certainty
[09:27:38] baweaver: mrburied: what have you tried?
[09:27:49] FailBit: ACTION goes back to converting mongo to pg
[09:27:54] mrburied: nothing.. waiting for you..
[09:28:08] baweaver: it doesn't work like that.
[09:28:22] baweaver: you need to put forth some effort in finding a solution.
[09:28:48] mrburied: Why are you thinking I didn't try anything..
[09:28:54] aruntomar: has joined #RubyOnRails
[09:29:03] baweaver: "nothing.. waiting for you.."
[09:29:19] FailBit: #update_columns({})
[09:29:20] mrburied: Because you asked me.. That annoyed me
[09:29:28] FailBit: okay that annoys even me
[09:29:32] dionysus69: haha my attitude is like if someone uses ie8 they deserveto see something like this ... http://mr.g.graham.tripod.com/ i just googled most annoying website
[09:29:50] baweaver: you said you haven't
[09:30:01] mrburied: anyway looking into http://apidock.com/rails/ActiveSupport/Callbacks/ClassMethods/skip_callback
[09:30:06] mrburied: lets see if it helps.
[09:30:11] FailBit: you can use #update_columns
[09:31:05] mrburied: the save inside the callback freaks out https://gist.github.com/aruprakshit/795afcd6e91c121f4a83
[09:31:28] baweaver: new name eh?
[09:31:34] mrburied: FailBit: I am have JSONB column, so update_column might not work. Let me try though
[09:31:39] mrburied: baweaver: Yes
[09:31:45] mrburied: I am buried :(
[09:31:50] mrburied: annoyed.. so
[09:31:53] mrburied: changed nick
[09:31:54] bonhoeffer: has joined #RubyOnRails
[09:32:03] FailBit: I didn't even notice
[09:32:13] mrburied: arup_r -> buried
[09:32:17] mrburied: so mrburied
[09:33:15] mrburied: FailBit: baweaver is an OPs.. so his eye is much stronger than us.. ;D
[09:33:29] voker57: has joined #RubyOnRails
[09:33:34] voker57: has joined #RubyOnRails
[09:33:36] mrburied: ops means moderator..
[09:33:41] mrburied: any way tips please..
[09:33:43] baweaver: gist username helps
[09:34:01] FailBit: how do I use `rails g model` without generating specs?
[09:34:08] baweaver: http://stackoverflow.com/questions/1342761/how-to-skip-activerecord-callbacks
[09:34:12] baweaver: look into generators
[09:34:17] baweaver: there are ways to turn it off
[09:34:24] mrburied: FailBit: there is a option
[09:34:33] mrburied: -skip--tests something like that
[09:34:40] FailBit: I saw for controllers that you could avoid generating helpers and assets
[09:34:50] FailBit: that is nice but not pertinent to my issue.. maybe I need to dig more
[09:34:59] mrburied: FailBit: just type rails g model and <ENTER>
[09:35:14] mrburied: see all helpful options
[09:35:22] mrburied: baweaver: let me check
[09:35:53] baweaver: http://guides.rubyonrails.org/generators.html
[09:36:08] baweaver: anyways, it's 2:30am here. Bed for me.
[09:36:17] mrburied: baweaver: humm so, I am on the right doc :) http://apidock.com/rails/ActiveSupport/Callbacks/ClassMethods/skip_callback
[09:36:23] baweaver: http://stackoverflow.com/questions/1342761/how-to-skip-activerecord-callbacks - that looked relevant
[09:36:29] mrburied: baweaver: happy weekend
[09:36:42] mrburied: Yes, that answer helpful
[09:36:52] FailBit: --no-fixture still creates a fixture
[09:37:21] stannard: has joined #RubyOnRails
[09:38:59] mission712_: has joined #RubyOnRails
[09:39:05] shoutsid06: has joined #RubyOnRails
[09:41:55] doodlehaus: has joined #RubyOnRails
[09:46:35] workmad3: has joined #RubyOnRails
[09:46:43] weihan: has joined #RubyOnRails
[09:46:58] The_Phoenix: has joined #RubyOnRails
[09:48:51] pawnbox: has joined #RubyOnRails
[09:50:18] weihan: has joined #RubyOnRails
[09:52:10] mlangenberg: has joined #RubyOnRails
[09:52:31] bbunny: has joined #RubyOnRails
[09:55:23] FailBit: hate to be one of those pesky rulebreakers but
[09:55:26] FailBit: rescue_from ActionController::UnknownFormat do |exception|
[09:55:28] FailBit: render action: 'pages/render_404'
[09:55:32] FailBit: will this work
[09:56:05] ruurd: has joined #RubyOnRails
[09:56:45] bruno-: has joined #RubyOnRails
[09:57:20] The_Phoenix1: has joined #RubyOnRails
[09:58:30] yfeldblum: has joined #RubyOnRails
[10:02:08] mlangenberg: has joined #RubyOnRails
[10:03:32] sevenseacat: then dont be one of them
[10:04:52] meoblast001: has joined #RubyOnRails
[10:05:23] jvanbaarsen: has joined #RubyOnRails
[10:05:48] jvanbaarsen: has joined #RubyOnRails
[10:07:44] lalalaaa: has joined #RubyOnRails
[10:09:07] linocisco: has joined #RubyOnRails
[10:09:44] Jameser: has joined #RubyOnRails
[10:09:54] linocisco: how can we develop website which is accessible from all devices , all browsers?
[10:10:05] linocisco: can rails do that?
[10:10:27] linocisco: has left #RubyOnRails: ()
[10:10:57] linocisco: has joined #RubyOnRails
[10:12:35] absklb: has joined #RubyOnRails
[10:13:05] absklb: vimeo api here https://developer.vimeo.com/player/js-api says to open the page on server and not directly. does webrick counts?
[10:13:20] Ergo: has joined #RubyOnRails
[10:13:25] absklb: Thin counts?
[10:14:31] absklb: cause i added the ifrome video, and js. and it does not work.
[10:15:42] lalalaaa: linocisco: that depends on your css (and in some cases your js). see http://motherfuckingwebsite.com/
[10:16:18] absklb: ACTION wonders whats going on
[10:17:12] stamina: has joined #RubyOnRails
[10:17:41] FailBit: see also http://bettermotherfuckingwebsite.com/
[10:18:43] absklb: guess everyones in weekend celebration mood...
[10:19:02] mrburied: linocisco: yes. Write API and web both
[10:19:13] mrburied: API for mobiles and web for broswers..
[10:19:17] FailBit: I'm in "just-took-a-dump-ass-on-fire" mood, absklb
[10:19:25] FailBit: but that's irrelevant
[10:19:28] mrburied: absklb: I am struggling .. lol
[10:19:55] absklb: ammm..ok...
[10:20:27] arup_r: has joined #RubyOnRails
[10:21:09] lalalaaa: FailBit: i feel that dude sorta misses the point of the original website though
[10:21:55] lalalaaa: but nicely done nonetheless!
[10:21:59] FailBit: not that much imo
[10:22:02] FailBit: I do like it a lot more
[10:22:20] arBmind: has joined #RubyOnRails
[10:23:12] absklb: OMG! thats actual real web site? someone actually paid for that and wrote all that there!
[10:23:42] FailBit: shocking revelation
[10:24:04] absklb: i think i visited it many years ago. dejavu
[10:26:02] absklb: whats Tamagotchi
[10:26:08] alan_andrade: has joined #RubyOnRails
[10:28:47] DoubleMalt: has joined #RubyOnRails
[10:29:53] avemestr: has joined #RubyOnRails
[10:29:56] otherj: has joined #RubyOnRails
[10:30:39] allcentury: has joined #RubyOnRails
[10:30:41] quazimodo: has joined #RubyOnRails
[10:30:43] quazimod1: has joined #RubyOnRails
[10:31:45] ruurd: has joined #RubyOnRails
[10:31:49] lalalaaa: FailBit: motherfuckingwebsite is meant to illustrate the KISS principle by pointing out all the crap people add to their websites. ie. its last words: "Good design is as little design as possible."
[10:32:11] lalalaaa: FailBit: the dude behind bettermotherfuckingwebsite doesn't get the full picture.. thinks it's about typography instead, and decides to show off.. i believe the saying "lipstick on a pig" fits nicely here
[10:36:15] RegulationD: has joined #RubyOnRails
[10:41:29] Lytol: has joined #RubyOnRails
[10:43:14] youngbaks: has joined #RubyOnRails
[10:43:22] Oog: has joined #RubyOnRails
[10:48:13] alexhartley: has joined #RubyOnRails
[10:50:37] rickmasta: has joined #RubyOnRails
[10:57:44] l_tonz: has joined #RubyOnRails
[10:58:52] alexhartley: has joined #RubyOnRails
[11:04:06] l_tonz: has joined #RubyOnRails
[11:06:51] Detch: has joined #RubyOnRails
[11:10:15] existensil: has joined #RubyOnRails
[11:10:59] arup_r: what is wrong ?
[11:11:09] arup_r: I meant what is going on.........
[11:12:16] absklb: too late..
[11:17:46] webdestroya: has joined #RubyOnRails
[11:18:05] gerep: has joined #RubyOnRails
[11:19:39] psyonix: has joined #RubyOnRails
[11:23:27] aruntomar: has joined #RubyOnRails
[11:24:33] jvanbaarsen: has joined #RubyOnRails
[11:24:52] inoter: has joined #RubyOnRails
[11:27:25] Haydos: has joined #RubyOnRails
[11:32:41] qejk: has joined #RubyOnRails
[11:36:02] DEA7TH: What is the best practice for a return value if the method call failed? nil? "Error"?
[11:36:35] sevenseacat: define 'if the method call failed'
[11:38:56] DEA7TH: In my case, it's a Google API call and it might return an error for some reason. I don't want to handle those.
[11:39:04] jvanbaarsen: has joined #RubyOnRails
[11:39:27] sevenseacat: well you have to do something
[11:39:34] sevenseacat: what do you want the user to know?
[11:39:52] DEA7TH: I kind of handle them by checking if the output is nil.
[11:39:56] riotjones: has joined #RubyOnRails
[11:39:58] sevenseacat: if its a call to the maps api for example, you might want to tell them that the address couldnt be found, for example
[11:39:58] DEA7TH: But apparently, nil checks are a bad practice?
[11:40:10] sevenseacat: need some actual context here rather than hypotheticals
[11:40:43] DEA7TH: yeah I handle them well, the point is the value which is passed in case of error. then I check whether I received those value
[11:40:46] skullcrasher_: has joined #RubyOnRails
[11:41:03] DEA7TH: it sounds like it shouldn't matter, but reek (code smells gem) complains about nil checks
[11:41:27] DEA7TH: so I'm thinking of passing the string 'Error' instead
[11:41:40] gerep: DEA7TH: if the execution is successful, do you have a specific returned type?
[11:42:00] DEA7TH: gerep: yes, it's always non-nil and not a string
[11:42:07] Oog: has joined #RubyOnRails
[11:42:13] DEA7TH: actually it's a string but can never be 'Error'
[11:42:47] doodlehaus: has joined #RubyOnRails
[11:42:47] gerep: DEA7TH: you can return false
[11:43:11] gerep: DEA7TH: can you?
[11:43:20] DEA7TH: gerep: yeah
[11:43:31] gerep: DEA7TH: since your gem is complaining about returning nil, which is odd :D
[11:43:41] DEA7TH: yeah I should probably ignore that gem more often
[11:43:54] DEA7TH: it's complaining about nil? checks actually
[11:44:13] DEA7TH: but when I installed it, I trusted object oriented design more
[11:44:47] gerep: So go with return false ;)
[11:45:20] gerep: At least, that's what I do if I don't return an error message
[11:45:35] srinidhi: has joined #RubyOnRails
[11:47:20] dionysus69: how do I combine these two lines ?https://gist.github.com/webzorg/ab1d53dca8bdf3f5f3a8
[11:48:46] gerep: dionysus69: the second one is overriding the @products, what are you trying to do?
[11:49:16] dionysus69: I am trying to list products with status true only + paginate them
[11:49:23] aruntomar: has joined #RubyOnRails
[11:49:28] dionysus69: but the second one as you said overrides :\
[11:49:52] dionysus69: I want them both active so not sure how to write that
[11:49:52] gerep: dionysus69: @products = Product.status(true).page(params[:page])
[11:50:07] dionysus69: i think I tried that but let me do it again
[11:50:29] blackmesa: has joined #RubyOnRails
[11:50:39] dionysus69: ... now it worked :D
[11:50:59] gerep: I'm with problem rendering a specific layout after calling the create action: https://gist.github.com/gerep/b57fb5effd6d25929294 I renders :new but the layout used is not the 'pages' one, can someone point me what I'm doing wrong?
[11:51:02] gerep: dionysus69: :D
[11:51:23] taxen: has joined #RubyOnRails
[11:51:33] gerep: When I call create it renders the new action but using the default layout, not the 'pages' layout
[11:53:21] taxen: I have a Team model and now want to add a Game model that should contain a home_team and away_team reference. I get an error when trying to run rake db:migrate saying "ERROR: relation "home_teams" does not exist"... What should my migration file look like?
[11:54:09] taxen: rails generated two lines like this in the migration: t.references :home_team, index: true
[11:59:04] DmitryBochkarev: has joined #RubyOnRails
[11:59:17] aruntomar: has joined #RubyOnRails
[11:59:46] gerep: taxen: when you use t.references, it will expect a model, not a column name
[12:00:09] avemestr: has joined #RubyOnRails
[12:00:12] taxen: gerep: right, how can I use two references to the same model then?
[12:00:38] gerep: taxen: you can't, that's another kind of relationship
[12:01:28] taxen: gerep: ok, how do you recommend I approach this problem?
[12:01:52] gerep: taxen: can you show you team and game schema?
[12:02:00] taxen: Sure, 1 sec
[12:02:24] tsujp: has joined #RubyOnRails
[12:02:48] taxen: gerep: http://pastebin.com/C05MGxX5
[12:02:55] tsujp: hey guys I am trying to do some really basic stuff, simply including a form in another controller's view and I get an error when trying to view the index action on the controller the form is from: https://gist.github.com/tsujp/ff230266e6954b3cc4bb
[12:03:07] gerep: taxen: listen to helpa :D
[12:03:09] tsujp: e.g. including users form on the index action of my home controller gives me an error when I try and look at users index
[12:03:47] gerep: tsujp: what's the error?
[12:03:56] taxen: gerep: hehe, sorry, here you go: https://gist.github.com/anonymous/135a13f054f2d46760fb
[12:03:58] tsujp: gerep it's in the top file error.rb
[12:04:01] Spami: has joined #RubyOnRails
[12:04:41] alex88: has joined #RubyOnRails
[12:04:55] gerep: tsujp: you form is in app/views/users/_form.html.haml but you are create @user in your HomeController, it will never work
[12:04:56] taxen: gerep: here's the correct url https://gist.github.com/anonymous/1eb80f8e582f083a3c45
[12:05:04] gerep: taxen:thanks
[12:05:16] tsujp: gerep how do I include my users form in my home_controller index action then?
[12:05:56] gerep: tsujp: app/views/home/_form.html.haml
[12:06:19] gerep: tsujp: but it will still call the user #create action
[12:07:09] tsujp: is there a way to include the actual users form so I don't have to edit two files for formatting, or should I just symlink the users form to the home/_form location?
[12:07:14] tsujp: gerep see above, forgot to tag ya*
[12:08:48] gerep: tsujp: since your form is a partial (_form.html.haml) you can render it wherever you need so in your app/views/home/new.html.haml for instance, you can render 'users/form'
[12:09:04] gerep: taxen: I'm not good with databases but maybe a many to many?!
[12:09:11] tsujp: gerep that's what I am doing right now but it gives me an error
[12:09:40] gerep: tsujp: oh, really sorry, didn't notice that
[12:10:02] tsujp: gerep I am including the users form in my home action using =render 'users/form' and getting an error. All the relevant stuff is in the gist: https://gist.github.com/tsujp/ff230266e6954b3cc4bb
[12:10:23] taxen: gerep: I think the problem is "t.references :home_team, index: true" since rails thinks there's a model called home-_team..
[12:10:44] taxen: gerep: but I have no idea what the syntax should be instead
[12:11:04] gerep: taxen: yes but you need to reference two teams, I don't think it will work
[12:11:08] tsujp: gerep do you know what I can do to fix this?
[12:11:23] northfurr: has joined #RubyOnRails
[12:11:46] gerep: tsujp: I'm thinking, I thought rendering it would do it
[12:14:23] nya: has joined #RubyOnRails
[12:15:04] tsujp: gerep i know the source of the problem
[12:15:19] tsujp: gerep currently the form is included on every page in the :navbar partial I have
[12:15:33] tsujp: gerep so, that means I would have to add @user = User.new to every single action of every single controller
[12:15:55] tsujp: gerep since that's disgusting, I'll amend the question to this: how can I use this form and submit it to the user/create action manually?
[12:16:01] tsujp: or should I just make a special form for this?
[12:16:28] tsujp: basically I want a new user form on every single page in my app, and it currently is but it breaks everything other than controller actions that have @user = User.new
[12:16:41] bonhoeffer: has joined #RubyOnRails
[12:17:02] gerep: tsujp: you can use the form_for url and specify the action to you users controller
[12:17:59] aruntomar_: has joined #RubyOnRails
[12:18:25] tsujp: since this is the form that creates a new user should I make the URL for the user#new action or user#create?
[12:18:29] tsujp: #create right?
[12:19:26] tsujp: and the other problem is that @user would be needed still
[12:19:43] mary5030: has joined #RubyOnRails
[12:22:20] gerep: tsujp: you call the #create action
[12:22:37] tsujp: Still won't work as @user is undefined
[12:22:47] tsujp: i fixed it with this (it's really short check it out) https://gist.github.com/tsujp/8e3929112fecf1797a3d
[12:22:53] tsujp: is that good practice?
[12:22:56] gerep: tsujp: yes, you won't make use of @user, replace it with :user (I quest it will work)
[12:23:07] tsujp: ill try ur thing sec
[12:23:55] gerep: taxen: A Team will have many Games and a Game will belong to 2 Teams, so I think a many to many will do it, what you think?
[12:24:06] tsujp: works but @users.errors breaks
[12:24:12] blackmes1: has joined #RubyOnRails
[12:24:32] ruurd: has joined #RubyOnRails
[12:24:35] arup_r: it should be many to many
[12:24:46] gerep: arup_r: shouldn't it? :D
[12:24:48] arup_r: gerep: 0/
[12:24:57] gerep: arup_r: \0
[12:24:59] arup_r: humm........
[12:25:00] taxen: gerep: yeah, agreed. right now I'm trying to get db:migrate to pass though. I added add_foreign_key :games, :teams, column: :home_team_id to the migration and that seemed to work... but I'm unsure it's the right way?
[12:25:23] gerep: tsujp: you are checking for that in your users#create method?
[12:27:03] bitkiller: has joined #RubyOnRails
[12:27:31] alex88: has joined #RubyOnRails
[12:27:54] gerep: tsujp: using form_for :user, url: users_path, method: :post will call your users#create action with your parameters like this: params[:user]
[12:29:34] gerep: taxen: I can't tell, just testing to know :D
[12:29:36] Lytol: has joined #RubyOnRails
[12:29:54] tsujp: gerep i've decied ill just add a before_filter in the application_controller.rb to do this: @user = User.new
[12:30:04] avemestr: has joined #RubyOnRails
[12:30:16] tsujp: gerep using :user on the form instead of @user means I cannot do this: @user.errors.any? as :user.errors.any? doesn't work
[12:30:27] tsujp: unless you know a way to get :user.errors.any? to wrok
[12:31:06] gerep: tsujp: on your users#create you will do this: @user = User.new(users_params) and it will instantiate a @user for you and you'll be able to check for errors the way you want to
[12:33:04] tsujp: thank you gerep
[12:33:09] bonhoeffer: has joined #RubyOnRails
[12:33:37] Icey: has joined #RubyOnRails
[12:33:48] gerep: tsujp: ;)
[12:35:27] bonhoeffer: has joined #RubyOnRails
[12:37:04] RegulationD: has joined #RubyOnRails
[12:37:11] kalusn: has joined #RubyOnRails
[12:37:53] losvedir: has joined #RubyOnRails
[12:40:03] PhantomS_: has joined #RubyOnRails
[12:43:21] mary5030: has joined #RubyOnRails
[12:43:22] ruurd: has joined #RubyOnRails
[12:47:30] Seich: has joined #RubyOnRails
[12:48:21] simplyianm: has joined #RubyOnRails
[12:49:37] jamto11: has joined #RubyOnRails
[12:53:03] ruurd: has joined #RubyOnRails
[12:54:34] avemestr: has joined #RubyOnRails
[12:55:58] tsujp: has joined #RubyOnRails
[12:59:25] nettoweb: has joined #RubyOnRails
[13:00:11] srinidhi: has joined #RubyOnRails
[13:01:44] Cervajz: has joined #RubyOnRails
[13:02:32] Jameser: has joined #RubyOnRails
[13:02:50] WillAmes: has joined #RubyOnRails
[13:03:15] stardiviner: has joined #RubyOnRails
[13:03:40] Cervajz_: has joined #RubyOnRails
[13:03:42] CheckYourSix: has joined #RubyOnRails
[13:04:05] simplyianm: has joined #RubyOnRails
[13:04:51] johnflux_: has joined #RubyOnRails
[13:08:03] dionysus69: has joined #RubyOnRails
[13:08:26] michael_mbp: has joined #RubyOnRails
[13:16:38] Diabolik: what's the best way in a routes file of routing my show action to another url, e.g. 'capacity'
[13:16:52] Diabolik: resource :capacity, controller: 'providers/installer_capacity', only: [:show, :update]
[13:16:55] Diabolik: in my routes file
[13:17:11] Diabolik: render :capacity
[13:17:13] Diabolik: in my show action
[13:17:18] Diabolik: but obviously that makes it difficult to test
[13:17:36] brazenbraden: has joined #RubyOnRails
[13:18:48] arup_r: Why my render not showing the notice message https://gist.github.com/aruprakshit/6dfa92e1c4ddacfeb69c
[13:18:49] Guest91: has joined #RubyOnRails
[13:19:43] sevenseacat: arup_r: because that's not how you set a flash message
[13:20:09] arup_r: from update when rendering .. flash messgae not coming
[13:20:14] arup_r: ahh.. then how ?
[13:20:20] Diabolik: when i run tests i obviously get
[13:20:32] sevenseacat: ACTION goes to google "rails set flash message"
[13:20:34] Diabolik: ActionController::UrlGenerationError:
[13:20:34] Diabolik: No route matches {:action=>"show", :controller=>"providers/installer_capacity", :id=>"3990", :provider=>"3990"}
[13:20:46] Diabolik: it works from a UI point of view
[13:20:52] sevenseacat: http://api.rubyonrails.org/classes/ActionDispatch/Flash.html
[13:20:54] Diabolik: it's just difficult with testin
[13:21:30] arup_r: []= this syntax also for notice type ?
[13:21:40] sevenseacat: its for flash messages.
[13:22:52] sevenseacat: http://guides.rubyonrails.org/action_controller_overview.html#the-flash
[13:23:29] Diabolik: im rendering a different template
[13:23:29] arup_r: yes, I forgot that
[13:23:31] Diabolik: not a message
[13:24:06] simplyianm: has joined #RubyOnRails
[13:24:34] aruntomar: has joined #RubyOnRails
[13:25:05] sevenseacat: Diabolik: I'm not talking to you.
[13:26:19] Diabolik: oh sorry :(
[13:27:45] simplyianm: has joined #RubyOnRails
[13:28:16] blackmes1: has joined #RubyOnRails
[13:30:09] chipotle: has joined #RubyOnRails
[13:31:30] aruntomar: has joined #RubyOnRails
[13:32:47] beauby: has joined #RubyOnRails
[13:35:03] FailBit: t.integer :images_cunt
[13:35:05] shinnya: has joined #RubyOnRails
[13:35:37] sevenseacat: FailBit: that word is not acceptable here.
[13:36:12] FailBit: I forget myself
[13:36:28] RegulationD: has joined #RubyOnRails
[13:36:29] Diabolik: sevenseacat did you write rails 4 in action?
[13:36:40] sevenseacat: Diabolik: I am one of the co-authors, yes.
[13:36:57] Diabolik: ah i only ask because i started reading it last nighg
[13:37:05] sevenseacat: :) I hope you find it useful
[13:37:07] youngbaks: has joined #RubyOnRails
[13:37:13] arup_r: Can I render with params? I tried this: render "visit", email: params[:email], layout: "public_player"
[13:37:16] Diabolik: are there any other books you recommend?
[13:37:35] arup_r: But it seems, it is not carrying the param email: till there
[13:37:54] arup_r: ok.. correct way is ?
[13:38:01] sevenseacat: Diabolik: I'd recommend getting a solid background in Ruby with The Well Grounded Rubyist
[13:38:13] sevenseacat: right at the end I added a list of some further reading books as well
[13:38:17] Diabolik: i have it but haven't started reading it
[13:38:40] arup_r: got it https://dothingssimple.wordpress.com/2009/11/09/render-action-and-passing-parameters/ :D
[13:39:06] xcesariox: has joined #RubyOnRails
[13:40:28] arup_r: Nah it didn't work
[13:40:50] raunicolae: has joined #RubyOnRails
[13:40:58] victortyau: has joined #RubyOnRails
[13:41:03] aruntomar: has joined #RubyOnRails
[13:42:36] atomical: has joined #RubyOnRails
[13:44:12] havenn: has joined #RubyOnRails
[13:47:18] beauby: has joined #RubyOnRails
[13:49:59] simplyianm: has joined #RubyOnRails
[13:52:10] krz: has joined #RubyOnRails
[13:52:53] joshkovach: has joined #RubyOnRails
[13:54:21] mary5030: has joined #RubyOnRails
[13:56:57] raunicolae: has left #RubyOnRails: ("Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is")
[13:57:38] beauby: has joined #RubyOnRails
[13:58:16] jessemcgilallen: has joined #RubyOnRails
[14:00:31] absklb: has joined #RubyOnRails
[14:01:32] Diabolik: il try again
[14:01:56] Diabolik: what's the best way in a routes file of routing my show action to another url, e.g. 'capacity'?
[14:02:18] Diabolik: resource :capacity, controller: 'providers/installer_capacity', only: [:show, :update]
[14:02:28] Diabolik: then render :capacity in my show action
[14:02:39] Diabolik: but when i run tests ofc i get
[14:02:39] Diabolik: ACTION No route matches {:action=>"show", :controller=>"providers/installer_capacity", :id=>"3990", :provider=>"3990"}
[14:03:12] doodlehaus: has joined #RubyOnRails
[14:05:15] Lightsword: has joined #RubyOnRails
[14:05:23] stannard: has joined #RubyOnRails
[14:12:48] dionysus69: is it right way to import <link rel="stylesheet" from head section ? or is there other way in rails?
[14:17:42] Lytol: has joined #RubyOnRails
[14:18:12] simplyianm: has joined #RubyOnRails
[14:21:57] simplyianm: has joined #RubyOnRails
[14:22:02] blackmesa: has joined #RubyOnRails
[14:23:12] stardiviner: has joined #RubyOnRails
[14:23:15] arup_r: sevenseacat: You there? Then I would like to tell you one thing.
[14:23:44] jsrn_: has joined #RubyOnRails
[14:24:15] arup_r: Actually, we can make any arbitary flash method with this http://api.rubyonrails.org/classes/ActionController/Flash/ClassMethods.html#method-i-add_flash_types . And it worked for me in other 2 controllers, and but this one it didn't work.
[14:24:41] sevenseacat: I know you can define your own flash types.
[14:24:47] arup_r: I will investigate 2morrow. Today, I need to ship a feature, so I did it ancient way
[14:24:52] sevenseacat: I don't know what thats got to do with anything
[14:25:00] sevenseacat: you were using notice, which is one of the default flash types
[14:25:37] arup_r: Yes, I add add_flash_type :error and then used like render "visit", error: ".."
[14:25:42] arup_r: but it didn't work
[14:26:00] sevenseacat: thats still not how you set flash messages.
[14:26:06] arup_r: But it works, in other 2 controllers,, no idea what I missed here
[14:26:11] sevenseacat: again, http://guides.rubyonrails.org/action_controller_overview.html#the-flash
[14:26:18] sevenseacat: see section 5.2.1
[14:26:44] bruno-: has joined #RubyOnRails
[14:26:50] allcentury: has joined #RubyOnRails
[14:27:49] simplyianm: has joined #RubyOnRails
[14:28:33] joshkovach: has joined #RubyOnRails
[14:28:38] arup_r: Ok. I overworked 2day. :)
[14:29:05] arup_r: Thanks for responding .. sevenseacat
[14:29:21] arup_r: got how those 2 works.. I read it clearly now
[14:29:33] prestorium: has joined #RubyOnRails
[14:31:27] gaboesquivel: has joined #RubyOnRails
[14:32:02] SteenJobs: has joined #RubyOnRails
[14:34:21] simplyianm: has joined #RubyOnRails
[14:36:01] stannard: has joined #RubyOnRails
[14:36:31] bePolite: has joined #RubyOnRails
[14:37:10] Shoutsid: has joined #RubyOnRails
[14:38:02] arup_r: dionysus69: there is a helper for that
[14:38:16] arup_r: look at the application.html for the same
[14:38:26] michael_mbp: has joined #RubyOnRails
[14:38:28] arup_r: something like <%= stylesheet..
[14:38:43] dionysus69: arup_r: i found it thanks :)
[14:39:17] Klumben: has joined #RubyOnRails
[14:39:30] northfurr: has joined #RubyOnRails
[14:47:44] Shoutsid: has joined #RubyOnRails
[14:49:08] nightsh: has joined #RubyOnRails
[14:52:32] nfk: has joined #RubyOnRails
[14:57:13] leslie: has joined #RubyOnRails
[14:57:13] leslie: has joined #RubyOnRails
[14:57:23] elektronaut: has joined #RubyOnRails
[14:57:27] jessemcgilallen: has joined #RubyOnRails
[15:02:29] nightsh_: has joined #RubyOnRails
[15:03:40] patrick_star: has joined #RubyOnRails
[15:06:30] chouhoulis: has joined #RubyOnRails
[15:07:23] chouhoulis: has joined #RubyOnRails
[15:08:45] chouhoulis: has joined #RubyOnRails
[15:11:48] qejk: has joined #RubyOnRails
[15:12:18] nightsh: has joined #RubyOnRails
[15:14:18] stamina: has joined #RubyOnRails
[15:14:20] tenderlo_: has joined #RubyOnRails
[15:14:31] shmilan: has joined #RubyOnRails
[15:17:04] tenderlo_: has joined #RubyOnRails
[15:19:04] tenderlove: has joined #RubyOnRails
[15:21:04] tenderlo_: has joined #RubyOnRails
[15:21:12] dionysus69: has joined #RubyOnRails
[15:22:36] Shoutsid: has joined #RubyOnRails
[15:22:54] Lytol: has joined #RubyOnRails
[15:23:08] tenderlo_: has joined #RubyOnRails
[15:24:44] nightsh: has joined #RubyOnRails
[15:26:09] Cervajz: has joined #RubyOnRails
[15:26:16] tenderlove: has joined #RubyOnRails
[15:26:44] Cervajz__: has joined #RubyOnRails
[15:27:15] youngbaks: has joined #RubyOnRails
[15:27:25] atomical: has joined #RubyOnRails
[15:28:16] tenderlo_: has joined #RubyOnRails
[15:30:54] nya: has joined #RubyOnRails
[15:33:09] bonhoeffer: has joined #RubyOnRails
[15:33:54] nightsh: has joined #RubyOnRails
[15:34:05] bkulbida: has joined #RubyOnRails
[15:36:24] Cervajz: has joined #RubyOnRails
[15:37:41] Peteykun: has joined #RubyOnRails
[15:39:03] nightsh: has joined #RubyOnRails
[15:39:48] Jameser: has joined #RubyOnRails
[15:41:10] maletor_: has joined #RubyOnRails
[15:43:03] Shoutsid: has joined #RubyOnRails
[15:44:53] losvedir: has joined #RubyOnRails
[15:46:55] mmb: has joined #RubyOnRails
[15:49:31] Shoutsid: has joined #RubyOnRails
[15:49:40] mehwork: in rails tutorials i see people using blocks with do/end instead of braces: <% @articles.each do |article| %> ... <% end %> but my ruby book says its always better to use braces: <% @articles.each { |article| %> ... <% } >
[15:49:46] mehwork: is that true?
[15:50:03] lurkmaster: has joined #RubyOnRails
[15:52:03] mehwork: maybe it only matters in ruby code, not erb?
[15:53:53] Shoutsid: has joined #RubyOnRails
[15:54:41] Cervajz__: has joined #RubyOnRails
[15:55:31] waseem_: mehwork: You can use either do end or braces. Usually when block body is just one line people use braces otherwise do end.
[15:55:52] krz: has joined #RubyOnRails
[15:56:07] Guest25941: has left #RubyOnRails: ()
[15:56:15] doodlehaus: has joined #RubyOnRails
[15:58:17] bonhoeffer: has joined #RubyOnRails
[15:59:43] Cache_Money: has joined #RubyOnRails
[15:59:49] Shoutsid: has joined #RubyOnRails
[16:03:40] NBarnes: has joined #RubyOnRails
[16:08:11] mmb: has joined #RubyOnRails
[16:10:56] blackmesa: has joined #RubyOnRails
[16:11:16] toretore: has joined #RubyOnRails
[16:11:18] ruurd: has joined #RubyOnRails
[16:12:35] Or1on: has joined #RubyOnRails
[16:12:48] iateadonut: has joined #RubyOnRails
[16:16:02] mostlybadfly: has joined #RubyOnRails
[16:20:46] bonhoeffer: has joined #RubyOnRails
[16:21:11] alan_andrade: has joined #RubyOnRails
[16:26:07] acti0nman: has joined #RubyOnRails
[16:26:18] seank_: has joined #RubyOnRails
[16:29:01] bonhoeffer: has joined #RubyOnRails
[16:30:38] mehwork: waseem_: ok, im reading that it's more idiomatic to use braces because it's less characters and has a higher precedence but i guess in this case it doesn't matter. THanks
[16:32:49] bonhoeffer: has joined #RubyOnRails
[16:35:10] SteenJobs: has joined #RubyOnRails
[16:35:29] Contigi: has joined #RubyOnRails
[16:35:51] doodlehaus: has joined #RubyOnRails
[16:37:18] blackmesa: has joined #RubyOnRails
[16:38:40] Lytol: has joined #RubyOnRails
[16:40:46] sankaber: has joined #RubyOnRails
[16:40:47] Cervajz: has joined #RubyOnRails
[16:41:00] dionysus69: has joined #RubyOnRails
[16:41:03] pawnbox: has joined #RubyOnRails
[16:41:35] lxsameer: has joined #RubyOnRails
[16:42:20] shinnya: has joined #RubyOnRails
[16:42:34] pawnbox: has joined #RubyOnRails
[16:43:02] nettoweb: has joined #RubyOnRails
[16:44:36] arup_r: has joined #RubyOnRails
[16:47:41] bonhoeffer: has joined #RubyOnRails
[16:49:38] pawnbox: has joined #RubyOnRails
[16:50:18] sameerynho: has joined #RubyOnRails
[16:54:57] Shoutsid: has joined #RubyOnRails
[16:54:58] Cervajz__: has joined #RubyOnRails
[16:58:57] jun_: has joined #RubyOnRails
[16:59:48] doodlehaus: has joined #RubyOnRails
[16:59:48] stannard: has joined #RubyOnRails
[17:00:03] chipotle: has joined #RubyOnRails
[17:01:42] smathy: has joined #RubyOnRails
[17:01:54] ishikawa91: has joined #RubyOnRails
[17:04:12] Shoutsid: has joined #RubyOnRails
[17:05:12] Joufflu: has joined #RubyOnRails
[17:07:17] gaboesqu_: has joined #RubyOnRails
[17:08:32] blackmesa: has joined #RubyOnRails
[17:10:19] joshkovach: has joined #RubyOnRails
[17:11:53] Shoutsid: has joined #RubyOnRails
[17:12:51] yaymukund: has joined #RubyOnRails
[17:13:51] Oog: has joined #RubyOnRails
[17:14:39] DoubleMalt: has joined #RubyOnRails
[17:14:44] meoblast001: has joined #RubyOnRails
[17:17:18] ngscheur1: has joined #RubyOnRails
[17:17:26] lele: has joined #RubyOnRails
[17:18:40] djbkd: has joined #RubyOnRails
[17:20:15] losvedir: has joined #RubyOnRails
[17:21:43] rodfersou: has joined #RubyOnRails
[17:24:23] Klumben: has joined #RubyOnRails
[17:24:24] l_tonz: has joined #RubyOnRails
[17:24:32] otherj: has joined #RubyOnRails
[17:26:36] naftilos76: has joined #RubyOnRails
[17:29:16] jun_: has joined #RubyOnRails
[17:30:44] dionysus69: has joined #RubyOnRails
[17:32:11] mloy_: has joined #RubyOnRails
[17:32:13] Guest81258: has joined #RubyOnRails
[17:35:35] sankaber: has joined #RubyOnRails
[17:36:43] avemestr: has joined #RubyOnRails
[17:37:25] gambl0re: has joined #RubyOnRails
[17:38:56] Cache_Money: has joined #RubyOnRails
[17:42:41] Pharaoh2: has joined #RubyOnRails
[17:43:16] maletor_: has joined #RubyOnRails
[17:43:18] FailBit: how do you query greater than in AR
[17:43:47] arup_r: .where("name > ?", vale)
[17:44:04] FailBit: well that's unfortunate
[17:45:34] l_tonz: has joined #RubyOnRails
[17:46:36] Dopagod: has joined #RubyOnRails
[17:47:29] DEA7TH: Why does this result in 2 queries (therefore 2 trips to the DB)? Is there an easy way to make it 1 instead? BookingService.includes(:service).limit(10)
[17:47:43] DEA7TH: Rails should know in advance because I say includes before anything else.
[17:48:28] Dopagod: has joined #RubyOnRails
[17:48:34] Dopagod: has joined #RubyOnRails
[17:48:58] diegoviola: has joined #RubyOnRails
[17:54:59] sankaber: has joined #RubyOnRails
[17:55:23] naftilos76: has joined #RubyOnRails
[17:59:03] arup_r: Your query is making 2 queries for your fortune.
[17:59:19] arup_r: This solves N + 1 issue.
[18:01:14] northfurr: has joined #RubyOnRails
[18:03:51] Shoutsid: has joined #RubyOnRails
[18:03:54] Dopagod: has joined #RubyOnRails
[18:04:41] jessemcgilallen: has joined #RubyOnRails
[18:06:53] fatal77: has joined #RubyOnRails
[18:07:37] benlieb: has joined #RubyOnRails
[18:08:53] superlou: has joined #RubyOnRails
[18:10:40] FailBit: wow arel is annoying
[18:11:50] netzfisch: has joined #RubyOnRails
[18:12:02] Lincee: has joined #RubyOnRails
[18:12:44] naftilos76: has joined #RubyOnRails
[18:13:18] CanTonic: has joined #RubyOnRails
[18:16:51] Trynemjoel: has joined #RubyOnRails
[18:18:44] stamina: has joined #RubyOnRails
[18:19:56] CanTonic: hey there. i hope somebody can help me. I cannot get knapsack gem running. I have followed the installation instructions, but the command `bundle exec rake knapsack:rspec` fails with `rake aborted! Don't know how to build task 'knapsack:rspec'`
[18:20:16] hahuang65: has joined #RubyOnRails
[18:20:18] CanTonic: which is strange since it is included in the :test and :development group in the Gemfile
[18:23:57] Icey: has joined #RubyOnRails
[18:25:07] bbunny_: has joined #RubyOnRails
[18:25:15] Trynemjoel: has joined #RubyOnRails
[18:26:50] Lytol: has joined #RubyOnRails
[18:29:36] codergeek: has joined #RubyOnRails
[18:31:57] naftilos76: has joined #RubyOnRails
[18:32:19] gaboesquivel: has joined #RubyOnRails
[18:34:54] andatche: has joined #RubyOnRails
[18:36:52] dionysus69: has joined #RubyOnRails
[18:37:49] codergeek: has left #RubyOnRails: ()
[18:37:51] blackmesa: has joined #RubyOnRails
[18:40:01] kies^: has joined #RubyOnRails
[18:41:55] CanTonic: ah damn, forgot to add it into the Rakefile
[18:44:36] youngbaks: has joined #RubyOnRails
[18:45:00] Shoutsid: has joined #RubyOnRails
[18:45:09] lalalaaa: has joined #RubyOnRails
[18:45:14] blackmes1: has joined #RubyOnRails
[18:45:57] lalalaaa: Hi! How do I add `property="url"` to my link_to's? (trying to add some http://schema.org/ info to my markup)
[18:46:46] beauby: has joined #RubyOnRails
[18:46:56] lalalaaa: `<%= link_to "Lipsum", my_path, property: "url" %>` or with `"property": "url"` didn't work
[18:47:03] diegoviola: has joined #RubyOnRails
[18:47:36] arup_r: lalalaaa: use data: { property: "url" }
[18:47:41] michaeldeol: has joined #RubyOnRails
[18:48:19] arup_r: If you are going to add any custom attrs use data:
[18:48:47] lalalaaa: arup_r: but wont that add `data-property`?
[18:49:06] PhantomSpank: has joined #RubyOnRails
[18:49:21] arup_r: Do we have any property called 'property" with anchor tag?
[18:49:43] lalalaaa: im looking to add http://schema.org stuff using RDFa Lite (http://www.w3.org/TR/rdfa-lite/#vocab-typeof-and-property)
[18:50:03] lalalaaa: in other words, im trying to flirt with google :P
[18:51:08] Lincee: i am trying to find someone like Ultimate Client Manager, but then in Ruby.. now THAT is a problem :(
[18:51:09] ruurd: has joined #RubyOnRails
[18:51:10] arup_r: Do you want to add anchor to your url ?
[18:51:43] arup_r: lalalaaa: I am not getting your question
[18:52:15] lalalaaa: arup_r: i need to add the RDFa Lite `property` to my link_to's.. see http://manu.sporny.org/2012/mythical-differences/ for more
[18:52:19] arup_r: Lincee: didn't get you
[18:52:34] lalalaaa: or wait, see http://schema.org/docs/gs.html
[18:52:48] sankaber: has joined #RubyOnRails
[18:53:00] Lincee: oh.. Ultimate Client Manager is a rather advanched projectmanagement/crm kinda thingy.. but its in php.. and i want something in ruby, since that is what i plan to learn ;-)
[18:53:15] yfeldblum: has joined #RubyOnRails
[18:53:42] gambl0re: do i need to upload my rails app to github before i upload to heroku?
[18:53:59] iliketurtles: has joined #RubyOnRails
[18:54:53] greengriminal: has joined #RubyOnRails
[18:56:15] arup_r: lalalaaa: Ok add it like we add other HTML property...
[18:56:52] lalalaaa: arup_r: sorry what do you mean?
[18:58:19] arup_r: ok.. you already did it.. I see
[18:59:21] dcope: is there any activerecord-esque system for persisting models to redis?
[18:59:32] dcope: like some sort of helper gem / class to have redis backed models?
[18:59:38] lalalaaa: arup_r: probably have to override link_to with some nasty shiz :)
[19:00:28] arup_r: may be.. You seems creating a nice app
[19:00:42] arup_r: I never heard of the that property.. really
[19:00:49] user1138: has joined #RubyOnRails
[19:01:06] arup_r: went through MDN, nothing found. I read it from the links you gave although
[19:01:46] dionysus69: has joined #RubyOnRails
[19:02:18] lalalaaa: arup_r: should be some videos on it in google webmaster tools
[19:02:57] michaeldeol: has joined #RubyOnRails
[19:03:40] jessemcgilallen: has joined #RubyOnRails
[19:04:29] kadoppe: has joined #RubyOnRails
[19:05:57] dideler: has joined #RubyOnRails
[19:07:54] ruurd: has joined #RubyOnRails
[19:09:04] lalalaaa: arup_r: link_to "Lipsum", my_path, html_options:{property: "url"} :))
[19:09:50] arup_r: that key is not needed with your syntax
[19:10:07] arup_r: link_to supports 4 kinds of syntax..
[19:10:34] hephaestus_rg: has joined #RubyOnRails
[19:10:34] arup_r: your one falls into first syntax as per the doc. That's why your first example should be fine
[19:10:48] lalalaaa: wait, testing..
[19:11:30] ericjphillips: has joined #RubyOnRails
[19:12:09] kalusn: has joined #RubyOnRails
[19:12:29] corioliss: has joined #RubyOnRails
[19:13:20] mikecmpbll: has joined #RubyOnRails
[19:14:14] simplyianm: has joined #RubyOnRails
[19:16:46] tenderlove: has joined #RubyOnRails
[19:17:00] beauby: has joined #RubyOnRails
[19:18:54] lalalaaa: take care arup_r
[19:19:10] lalalaaa: i'll let you know if i figure it out
[19:19:12] arup_r: sleeping time :D
[19:19:21] arup_r: sure please
[19:20:13] VeryBewitching: has joined #RubyOnRails
[19:20:36] gambl0re: im getting an error msg when trying to deploy to heroku https://gist.github.com/anonymous/2cc9dd265823c6303624
[19:21:00] gambl0re: it says remote: Make sure that `gem install sqlite3 -v '1.3.10'` succeeds before bundling.
[19:21:07] mary5030: has joined #RubyOnRails
[19:21:13] gambl0re: i already installed it but im still getting that error message.
[19:21:35] raazdaan: has joined #RubyOnRails
[19:21:40] gambl0re: and i changed my gemfile to use 'pg' database in production
[19:22:00] northfurr: has joined #RubyOnRails
[19:22:33] iamse7en: has joined #RubyOnRails
[19:23:31] mary5030: has joined #RubyOnRails
[19:25:30] ishikawa91: just a wild guess, but did you commit your Gemfile.lock after adding pg to your gemfile?
[19:25:33] reber: has joined #RubyOnRails
[19:26:25] gambl0re: i didnt edit the gemlock file
[19:26:36] NBarnes: has joined #RubyOnRails
[19:26:47] gambl0re: shit, can anyone help me
[19:27:10] northfurr: has joined #RubyOnRails
[19:27:14] VeryBewitching: gambl0re: I think I'm more concerned that the sqlite3 gem won't build on their platform.
[19:28:01] gambl0re: the rails deployment on the heroku site doesnt help much
[19:28:16] inoter: has joined #RubyOnRails
[19:28:34] jun_: has joined #RubyOnRails
[19:28:35] gambl0re: group :test, :production do
[19:28:42] gambl0re: i added that to the gem file
[19:29:01] VeryBewitching: gambl0re: Trying installing the gem. 'heroku run bash' then gem install sqlite3 -v '1.3.10'
[19:29:16] sankaber: has joined #RubyOnRails
[19:29:31] VeryBewitching: The sqlite3 gem
[19:29:51] changqing: has joined #RubyOnRails
[19:29:57] VeryBewitching: Heroku is suggesting how you can resolve the issue.
[19:30:14] towski_: has joined #RubyOnRails
[19:30:17] VeryBewitching: brb, need more coffee.
[19:30:40] gambl0re: Fetching: sqlite3-1.3.10.gem (100%)
[19:30:40] gambl0re: ERROR: While executing gem ... (Errno::EROFS)
[19:30:40] gambl0re: Read-only file system - /var/lib/gems
[19:30:59] ishikawa91: Ah, its right there in the error dump: https://devcenter.heroku.com/articles/sqlite3
[19:31:02] VeryBewitching: OK, that makes some sense.
[19:31:24] gambl0re: nothing is making sense right now.
[19:31:36] ishikawa91: Make sure you removed all sqlite references from the lock file
[19:31:57] maletor_: has joined #RubyOnRails
[19:32:04] VeryBewitching: Also, you apparently should not be using a gem that depends on sqlite3
[19:32:36] ishikawa91: They do support the pg gem, per the article
[19:32:37] gambl0re: ok...look. im just following the steps on the heroku site
[19:32:51] VeryBewitching: gambl0re: grep "sqlite3" Gemfile.lock
[19:32:51] gambl0re: im trying to do a straight forward deployment.
[19:32:55] ngr: has joined #RubyOnRails
[19:33:07] superlou: has joined #RubyOnRails
[19:33:21] ishikawa91: It definitely seems like you have sqlite3 in your Gemfile.lock
[19:33:24] gambl0re: sqlite3 (1.3.10)
[19:33:25] gambl0re: sqlite3 (~> 1.3.10)
[19:33:34] ishikawa91: get rid of those lines
[19:33:35] bruno-: has joined #RubyOnRails
[19:33:41] VeryBewitching: Run bundle install
[19:33:50] ruurd: has joined #RubyOnRails
[19:33:59] VeryBewitching: And then make sure it's gone, if not edit Gemfile and remove sqlite3
[19:34:03] gambl0re: what about my gem file
[19:34:06] ishikawa91: Yeah, remove those lines, run bundle install, and then double check sqlite3 is gone from lock file
[19:34:23] ishikawa91: Make sure there is no reference to sqlite in your Gemfile either
[19:34:34] VeryBewitching: kk, coffee time
[19:34:50] lokson: has joined #RubyOnRails
[19:35:06] gambl0re: https://gist.github.com/rickywid/d4bf362ace2c9dba3556
[19:35:11] gambl0re: does it look ok?
[19:35:19] havenn: has joined #RubyOnRails
[19:35:49] ishikawa91: remove line 11
[19:35:57] l_tonz: has joined #RubyOnRails
[19:36:36] blackmesa: has joined #RubyOnRails
[19:36:54] gambl0re: ok i ran bundle install
[19:37:02] gambl0re: shall i try again to deploy to heroku?
[19:37:09] jun_: has joined #RubyOnRails
[19:37:15] ishikawa91: ok, check your Gemfile.lock for any lines that say sqlite3
[19:37:24] ishikawa91: you can try deploying now too
[19:37:45] gambl0re: do i need to add the files first
[19:37:46] ishikawa91: you should be able to deploy then
[19:37:50] gambl0re: and commit?
[19:38:11] ishikawa91: commit both the Gemfile and Gemfile.lock
[19:38:32] gambl0re: well i did git add .
[19:38:54] ishikawa91: that's fine too, that just adds any modified files in your project
[19:39:05] gambl0re: its still runnning
[19:39:34] gambl0re: shit, new error
[19:39:58] riotjones: has joined #RubyOnRails
[19:40:05] ishikawa91: whats the error?
[19:40:13] gambl0re: https://gist.github.com/rickywid/4b40c83998565c87c9c9
[19:40:28] gambl0re: remote: ! Precompiling assets failed.
[19:40:36] gambl0re: im guessing thats the problem?
[19:40:40] ishikawa91: looks like you have an error in your css
[19:40:52] ishikawa91: Sass::SyntaxError: Invalid CSS after " -moz-transition": expected ";", was ": border 0.3s"
[19:41:06] iamse7en: has joined #RubyOnRails
[19:41:12] joshkovach: has joined #RubyOnRails
[19:41:29] gambl0re: where do you see that message?
[19:42:00] ishikawa91: the error is on line 137 of application.css.scss
[19:42:01] gambl0re: ok yea there was an error in my css
[19:42:16] |RicharD|: has joined #RubyOnRails
[19:42:26] gambl0re: but i mean which file did you see that error msg,
[19:42:34] Lytol: has joined #RubyOnRails
[19:42:37] |RicharD|: hi guys, someone here use web pack in a rails app ? it works well ?
[19:42:38] gambl0re: i didnt see that in the output
[19:42:52] ishikawa91: it was on the next line but all the way at the end of the line haha
[19:43:17] mlangenberg: has joined #RubyOnRails
[19:43:22] northfurr: has joined #RubyOnRails
[19:43:50] ishikawa91: thats why its sometimes easier to do git add file1 file2 etc instead of git add . or git add -A
[19:43:52] ruurd: has joined #RubyOnRails
[19:44:02] ishikawa91: so you don't accidentally commit something that's not ready yet
[19:44:21] gambl0re: yea i know, but its easier to just add everything
[19:44:48] gambl0re: when deploying to heroku, is it mostly just ensuring you're using postgres in production?
[19:45:10] ishikawa91: you can use other databases, just not sqlite3 apparently
[19:45:24] ishikawa91: For example you could use mongodb on heroku
[19:45:37] gambl0re: what if i wanted to make changes to my app locally? do i have to switch back all the configuration settings to make it work locally?
[19:46:04] ishikawa91: what kind of changes, like changing databases?
[19:46:36] gambl0re: not changing database, but just testing the database, add/editing/removing data
[19:46:48] ishikawa91: thats kind of where config/database.yml comes in. You can set up different environments
[19:46:49] gambl0re: becasuse locally i was using sqite3 i think
[19:47:05] gambl0re: now i removed sqlite and now using postgres for heroku
[19:47:09] ishikawa91: yeah, you can use it in development. In your Gemfile just put it in group :development
[19:47:28] gambl0re: gem 'sqlite3' ?
[19:47:47] ishikawa91: group :development do gem 'sqlite3' end
[19:48:04] jsrn_: has joined #RubyOnRails
[19:48:11] gambl0re: ahh i see...and i can run rails server and it will automatically use sqite?
[19:48:32] ishikawa91: yeah, it looks at your Rails.env and uses the config set in config/database.yml
[19:48:50] ishikawa91: so if Rails.env is set to development, it will use the development config in that yml
[19:49:24] gambl0re: ok the i pushed to heroku, no problem but..
[19:49:24] ishikawa91: In general, its set to development automatically. When you run your test suite, the suite sets it to 'test' and heroku sets it to 'production'
[19:49:48] gambl0re: when i open my site in browser i get "We're sorry, but something went wrong."
[19:50:10] VeryBewitching: gambl0re: Look at your logs, that's a 500 error
[19:50:31] gambl0re: where do i check my logs?
[19:50:36] ishikawa91: heroku logs in commandline
[19:51:05] ishikawa91: you can also do `heroku logs -t` to get a live feed in your command line of the log file
[19:51:17] gambl0re: are you japanese?
[19:51:36] ishikawa91: no but I wish I was :)
[19:51:37] northfurr: has joined #RubyOnRails
[19:52:04] VeryBewitching: ishikawa91: So you want to be a highly apologetic individual?
[19:52:22] rickmasta: has joined #RubyOnRails
[19:52:29] ishikawa91: I am already a highly apologetic individual :) Some call me Canadian :P
[19:52:42] bonhoeffer: has joined #RubyOnRails
[19:52:48] gambl0re: osihigoto wa nan desuka?
[19:53:31] gambl0re: ok i dont understand what the hell is going on, log file is sayings its a router issue, but locally everything runs fine
[19:54:01] ishikawa91: can you post a few of the lines from the log file?
[19:54:39] SteenJobs: has joined #RubyOnRails
[19:55:05] jun_: has joined #RubyOnRails
[19:55:18] gwena: has joined #RubyOnRails
[19:56:10] ishikawa91: try this: `heroku run rake db:migrate`
[19:56:40] Klumben: has joined #RubyOnRails
[19:58:23] gambl0re: yea, it works
[19:58:31] gwena: has joined #RubyOnRails
[19:59:17] Cervajz: has joined #RubyOnRails
[19:59:38] beauby: has joined #RubyOnRails
[20:01:05] ruurd: has joined #RubyOnRails
[20:01:13] Cervajz__: has joined #RubyOnRails
[20:02:47] jun_: has joined #RubyOnRails
[20:02:53] joshkovach: has joined #RubyOnRails
[20:04:34] ferz_: has joined #RubyOnRails
[20:05:34] Cervajz: has joined #RubyOnRails
[20:05:43] bender_unit: has joined #RubyOnRails
[20:07:04] naftilos76: has joined #RubyOnRails
[20:10:31] doodlehaus: has joined #RubyOnRails
[20:10:39] benlieb: has joined #RubyOnRails
[20:12:19] joshkovach: has joined #RubyOnRails
[20:13:02] VeryBewitching: ishikawa91: Ah, I'm in Ottawa
[20:13:30] yaymukund: has joined #RubyOnRails
[20:14:46] jun_: has joined #RubyOnRails
[20:15:27] ruurd: has joined #RubyOnRails
[20:15:33] stannard: has joined #RubyOnRails
[20:17:51] beauby: has joined #RubyOnRails
[20:20:08] losvedir: has joined #RubyOnRails
[20:23:55] akhil_96: has joined #RubyOnRails
[20:24:00] joshkovach: has joined #RubyOnRails
[20:24:37] iliketurtles: has joined #RubyOnRails
[20:24:54] Bilbo-baggons: has joined #RubyOnRails
[20:25:16] ruurd: has joined #RubyOnRails
[20:25:31] shinnya: has joined #RubyOnRails
[20:28:21] rakm: has joined #RubyOnRails
[20:35:50] beauby: has joined #RubyOnRails
[20:39:50] KensoDev_: has joined #RubyOnRails
[20:39:59] hephaest1s_rg: has joined #RubyOnRails
[20:41:00] riotjones: has joined #RubyOnRails
[20:41:04] Cache_Money1: has joined #RubyOnRails
[20:41:24] Edward123: has joined #RubyOnRails
[20:41:41] l_tonz_: has joined #RubyOnRails
[20:42:21] mduca_: has joined #RubyOnRails
[20:42:41] jcm__: has joined #RubyOnRails
[20:43:09] Mession_: has joined #RubyOnRails
[20:43:18] Or1on_: has joined #RubyOnRails
[20:43:44] creature_: has joined #RubyOnRails
[20:44:46] bonhoeffer: has joined #RubyOnRails
[20:45:16] teegee543_: has joined #RubyOnRails
[20:46:22] ruurd: has joined #RubyOnRails
[20:47:11] bruno-: has joined #RubyOnRails
[20:47:44] naftilos76_: has joined #RubyOnRails
[20:47:46] maxx88_: has joined #RubyOnRails
[20:47:54] l_tonz_: has joined #RubyOnRails
[20:50:19] zz_timnovinger: has joined #RubyOnRails
[20:50:25] hardtail: has joined #RubyOnRails
[20:50:57] siddart: has joined #RubyOnRails
[20:50:58] TakumoKatekari: has joined #RubyOnRails
[20:50:58] TakumoKatekari: has joined #RubyOnRails
[20:53:58] beauby: has joined #RubyOnRails
[20:54:08] bonhoeffer: has joined #RubyOnRails
[20:54:52] diego1: has joined #RubyOnRails
[20:54:56] diego1: has joined #RubyOnRails
[20:55:49] cornerma1: has joined #RubyOnRails
[20:56:32] bonhoeffer: has joined #RubyOnRails
[20:57:02] mclee_: has joined #RubyOnRails
[20:57:03] hnanon: has joined #RubyOnRails
[20:58:34] Pharaoh2: has joined #RubyOnRails
[21:00:14] n008f4g_: has joined #RubyOnRails
[21:00:14] nej: has joined #RubyOnRails
[21:01:53] RegulationD: has joined #RubyOnRails
[21:02:44] blackmesa: has joined #RubyOnRails
[21:03:22] hephaestus_rg: has joined #RubyOnRails
[21:04:36] A124: has joined #RubyOnRails
[21:04:50] nettoweb: has joined #RubyOnRails
[21:05:26] Or1on: has joined #RubyOnRails
[21:05:52] Klumben: has joined #RubyOnRails
[21:07:30] bender_unit: has joined #RubyOnRails
[21:08:17] baweaver: has joined #RubyOnRails
[21:10:02] t_mmyv: has joined #RubyOnRails
[21:10:39] netzfisch: has joined #RubyOnRails
[21:11:53] DanKnox: has joined #RubyOnRails
[21:12:01] beauby: has joined #RubyOnRails
[21:15:07] doodlehaus: has joined #RubyOnRails
[21:21:18] jun_: has joined #RubyOnRails
[21:21:33] siaW: has joined #RubyOnRails
[21:22:13] siaW: i need some help. when i run rspec, i get a failure result that???s looking for a template on a test for delete: https://gist.github.com/siaw23/349e0e68dc08f2439308
[21:22:19] siaW: any idea why this is happening?
[21:24:55] taxen: has joined #RubyOnRails
[21:27:08] Radar: siaw: It's because your destroy action doesn't have anything in it: https://gist.github.com/siaw23/349e0e68dc08f2439308#file-tickets_controller-rb-L39-L41
[21:27:16] Radar: So Rails defaults to rendering the templatr with the same name as your action.
[21:29:52] siaW: Radar: ah i see. thanks :)
[21:30:06] jamto11: has joined #RubyOnRails
[21:30:08] beauby: has joined #RubyOnRails
[21:33:19] masscrx: has joined #RubyOnRails
[21:33:30] ernesto_jimenez: has joined #RubyOnRails
[21:33:35] yie: has joined #RubyOnRails
[21:33:38] jun_: has joined #RubyOnRails
[21:33:54] MuffinPimp_: has joined #RubyOnRails
[21:33:55] taxen: Anyone here have experience using multiple references of a model on another model?
[21:34:09] maletor__: has joined #RubyOnRails
[21:34:14] Cache_Money1: has joined #RubyOnRails
[21:34:34] cantonic_: has joined #RubyOnRails
[21:34:43] Radar: thanks for asking
[21:34:51] mattt: has joined #RubyOnRails
[21:34:51] Radar: the option you're looking for is class_name
[21:35:03] taxen: Radar: was that for me?
[21:35:11] Leeky_: has joined #RubyOnRails
[21:35:15] hephaestus_rg: has joined #RubyOnRails
[21:36:04] artmann_: has joined #RubyOnRails
[21:36:13] Pharaoh2_: has joined #RubyOnRails
[21:36:54] saneki_: has joined #RubyOnRails
[21:37:27] speaking1ode: has joined #RubyOnRails
[21:37:45] badeball_: has joined #RubyOnRails
[21:37:49] Criten_: has joined #RubyOnRails
[21:38:06] dlitz_: has joined #RubyOnRails
[21:38:06] camilasann: has joined #RubyOnRails
[21:38:36] dotty_: has joined #RubyOnRails
[21:38:47] rboyd__: has joined #RubyOnRails
[21:39:17] daxroc1: has joined #RubyOnRails
[21:39:34] doodlehaus: has joined #RubyOnRails
[21:40:00] lacrosse_: has joined #RubyOnRails
[21:41:14] kayloos: has joined #RubyOnRails
[21:41:33] w0bni: has joined #RubyOnRails
[21:41:34] neanias_: has joined #RubyOnRails
[21:41:36] riotjones: has joined #RubyOnRails
[21:41:39] kitallisii: has joined #RubyOnRails
[21:41:45] twohlix_: has joined #RubyOnRails
[21:41:55] maxmanders_: has joined #RubyOnRails
[21:41:59] thejoecarroll_: has joined #RubyOnRails
[21:42:00] DiabolikFreenode: has joined #RubyOnRails
[21:42:04] Takumo: has joined #RubyOnRails
[21:42:04] Takumo: has joined #RubyOnRails
[21:42:14] KorriX_: has joined #RubyOnRails
[21:42:22] webdestroyaz: has joined #RubyOnRails
[21:42:44] Lat: has joined #RubyOnRails
[21:43:07] apeiros_: has joined #RubyOnRails
[21:43:14] Dfoolz: has joined #RubyOnRails
[21:43:29] DiabolikFreenode: has left #RubyOnRails: ()
[21:43:58] armyriad: has joined #RubyOnRails
[21:44:01] Diabolik: has joined #RubyOnRails
[21:44:13] northfurr: has joined #RubyOnRails
[21:44:16] sheepman: has joined #RubyOnRails
[21:44:32] noodle: has joined #RubyOnRails
[21:45:11] j0llyr0tten: has joined #RubyOnRails
[21:45:57] Or1on: has joined #RubyOnRails
[21:47:14] MartinEl_: has joined #RubyOnRails
[21:47:35] siddart: has joined #RubyOnRails
[21:48:15] defswork: has joined #RubyOnRails
[21:49:00] rapha: has joined #RubyOnRails
[21:49:17] confact: has joined #RubyOnRails
[21:49:45] kies: has joined #RubyOnRails
[21:49:54] bkulbida: has joined #RubyOnRails
[21:49:55] towler: has joined #RubyOnRails
[21:50:08] machty: has joined #RubyOnRails
[21:50:32] neilf: has joined #RubyOnRails
[21:51:33] danlucraft: has joined #RubyOnRails
[21:52:56] dualbus: has joined #RubyOnRails
[21:53:55] SteenJobs: has joined #RubyOnRails
[21:53:55] feignt: has joined #RubyOnRails
[21:53:55] rj-code: has joined #RubyOnRails
[21:53:55] xybre: has joined #RubyOnRails
[21:53:55] Caius: has joined #RubyOnRails
[21:53:56] feignt: has joined #RubyOnRails
[21:54:10] Caius: has joined #RubyOnRails
[21:54:44] rj-code: has joined #RubyOnRails
[21:54:55] jun_: has joined #RubyOnRails
[21:55:54] losvedir: has joined #RubyOnRails
[21:56:02] Radar: taxen: sure was
[21:56:33] taxen: Radar: ok, well, I'm a noob and have a bit more complex problem...
[21:56:42] Radar: taxen: !rule0
[21:56:42] helpa: taxen: Show rather than tell. Explaining your problem with code, stacktraces or errors is always preferred to explaining it with just text. Show us what's happening, rather than telling us.
[21:56:52] Radar: I'm about to head out, so I might not be able to help you.
[21:56:58] rhizome: noobs don't often have problems as complex as they think they are
[21:57:09] diegoviola: has joined #RubyOnRails
[21:57:10] taxen: true, but at the moment I'm lost
[21:57:17] taxen: I'll explain
[21:57:19] rhizome: lost is fine
[21:59:22] mloy_: has joined #RubyOnRails
[21:59:24] Guest81258: has joined #RubyOnRails
[21:59:38] Radar: !gist if you want to share code
[21:59:38] helpa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[21:59:43] doodlehaus: has joined #RubyOnRails
[22:00:26] taxen: I have a Game model and a Team model... game model contains home_team and away_team references (using belongs_to :home_team, :class_name => 'Team' etc). On the team model, I have has_many :home_games, :class_name => 'Game', :foreign_key => 'home_team_id' and the same for away_games, but ideally I'd like to be able to do Team.games and combine all instances where a Team is either home or away. Does that make sense?
[22:00:57] mices: if i have a users table then what does User.new mean?
[22:01:18] VeryBewitching: mices: Do you know any Java?
[22:01:33] VeryBewitching: mices: User.new constructs a new User object
[22:01:40] taxen: helpa: ^^
[22:01:48] taxen: Radar: ^^
[22:01:57] superlou: has joined #RubyOnRails
[22:02:29] VeryBewitching: mices: Java/C++/PHP would be new User();
[22:02:30] Radar: taxen: def games; home_games + away_games; end
[22:02:37] Radar: That's _one_ way of doing it
[22:02:58] l_tonz: has joined #RubyOnRails
[22:03:20] mices: VeryBewitching: thanks, so then @user=User.new will look for a form named what?
[22:03:43] jamto11: has joined #RubyOnRails
[22:03:57] mices: or i name the form whatever i want?
[22:04:03] VeryBewitching: mices: You mean form_for @user ?
[22:04:13] taxen: Radar: thank you very much, works like a charm
[22:04:29] taxen: Radar: Is it the best way though?
[22:04:30] VeryBewitching: mices: If it doesn't have an idea, it would probably be new_user
[22:04:48] VeryBewitching: Just inspect the form.
[22:05:14] VeryBewitching: mices: If you want to know what the output of it would be, just look at the output.
[22:05:27] mices: can i name the form whatever i want?
[22:05:36] Coldblackice_: has joined #RubyOnRails
[22:05:41] mices: i mean the filename
[22:05:45] mices: *.html.erb
[22:06:22] coffeejunk: has joined #RubyOnRails
[22:06:26] mices: here's what's happening
[22:06:33] helpa: mices: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[22:06:41] lalalaaa: has joined #RubyOnRails
[22:07:43] mices: the form has a lot of fields including user_name and password, there's a password database with only one entry and the user_name and password fields of the form are filled in already with the values from the users table
[22:10:07] maxx88: has joined #RubyOnRails
[22:10:22] fatal77: has joined #RubyOnRails
[22:11:47] fatal77: has left #RubyOnRails: ()
[22:12:48] naftilos76: has joined #RubyOnRails
[22:13:14] benlieb: has joined #RubyOnRails
[22:13:25] blackmesa: has joined #RubyOnRails
[22:13:58] northfurr: has joined #RubyOnRails
[22:15:19] weaksauce: has joined #RubyOnRails
[22:18:29] mices: VeryBewitching: https://gist.github.com/mices/7b273a8da010cac4f4f8
[22:18:47] user1138: has joined #RubyOnRails
[22:21:05] VeryBewitching: mices: OK, so what are you trying to do?
[22:21:27] mices: it works but the first two fields user_name and password and being filled in
[22:21:33] mices: i dunno how
[22:21:39] taxen: VeryBewitching: when generating a model with a reference to another model... Is there a way to rename that property? For example; A user can create a tournament. I'd like this reference to be called founder_id on the model instead of user_id.
[22:22:32] VeryBewitching: taxen: You can specify which field is used for the join.
[22:23:03] taxen: VeryBewitching: OK, so it's not something you'd put in the rails g model command?
[22:23:13] VeryBewitching: mices: With just the code you showed me, I wouldn't know either.
[22:23:37] VeryBewitching: taxen: When I generate a model, I always clean up the migration/model directly afterwards.
[22:23:42] mices: VeryBewitching: does it have anything to do with the users controller?
[22:23:48] taxen: VeryBewitching: cool
[22:24:34] VeryBewitching: mices: If you're visiting a route that points to WebController#register_us then no, I wouldn't imagine so.
[22:25:05] gambl0re: when i deploy my rails app to heroku all the images are broken, whereas locally everhtihng shows up fine
[22:25:17] gambl0re: i tried several solutions found online but none worked. can anyone help me. thanks
[22:25:38] mices: VeryBewitching: sorry, it must be my browser filling in the fields
[22:26:11] VeryBewitching: gambl0re: Where are the images in your app? app/assets/images ?
[22:26:11] CanTonic: has joined #RubyOnRails
[22:26:45] gambl0re: well actually, the images are supposed to be attachments when submitting the form
[22:27:44] gambl0re: at first the images display find when first attached and submitted, but if i check back a few days later, the images are all broken
[22:27:50] gambl0re: display "fine"
[22:28:14] VeryBewitching: gambl0re: Ah. Be aware that you shouldn't be using Heroku to upload your files to.
[22:28:26] mxrguspxrt: has joined #RubyOnRails
[22:28:33] VeryBewitching: Heroku has an ephemeral filesystem.
[22:28:50] mices: VeryBewitching: should i submit it to the create action of the users controller or write an action for the web_controller.rb ? sorry, this is my first form
[22:29:09] helpa: mices: http://guides.rubyonrails.org/ - Ruby on Rails guides. Recommended reading.
[22:29:43] gambl0re: im not uploading my files to heroku
[22:29:53] gambl0re: im attach the images to a form...
[22:30:04] VeryBewitching: gambl0re: If you're adding a file as an attachment then the file is going somewhere.
[22:30:29] VeryBewitching: gambl0re: What are you using for file uploads?
[22:31:11] VeryBewitching: gambl0re: So Paperclip is trying to store it, by default, in public/system/xxx/xxx/:size/image.png
[22:31:25] VeryBewitching: (some of those are variables obviously)
[22:31:38] VeryBewitching: You have to configure it to store it somewhere else, which is suggested.
[22:32:18] VeryBewitching: gambl0re: Whenever you redeploy your application file uploads will be lost on Heroku to my understanding.
[22:32:48] jun_: has joined #RubyOnRails
[22:32:55] VeryBewitching: gambl0re: You have to use another provider. S3 is quite reasonable and you can store quite a bit before any cost comes into play.
[22:33:04] northfurr: has joined #RubyOnRails
[22:33:12] VeryBewitching: gambl0re: And Paperclip supports S3
[22:34:05] gambl0re: that sucks...
[22:34:21] VeryBewitching: Not really, any assets like images, video, probably best on a CDN
[22:34:51] gambl0re: i gotta pay to use s3?
[22:35:34] VeryBewitching: I haven't so far.
[22:35:42] taxen: gambl0re: first year is free
[22:35:43] FailBit: cloudflare is free
[22:35:54] VeryBewitching: They have a disk usage limit in the free tier and computation minimum.
[22:36:03] ngscheur1: has joined #RubyOnRails
[22:36:08] VeryBewitching: FailBit: Free as in what, beer?
[22:37:44] taxen: VeryBewitching: not sure how I should go about generating my group model... a group has a creator (user object) and also has a bunch of invited users tied to it. Any ideas?
[22:38:16] VeryBewitching: taxen: You'd need a third table.
[22:39:27] gambl0re: signing up with s3 seems like overkill especially for a dummy app that im only using to put in my portfolio
[22:40:06] VeryBewitching: gambl0re: Then don't use Heroku I guess.
[22:40:48] gambl0re: i will look for alternatives..
[22:41:57] VeryBewitching: taxen: http://guides.rubyonrails.org/association_basics.html#has-and-belongs-to-many-association-reference
[22:42:07] taxen: VeryBewitching: cheers
[22:42:09] VeryBewitching: err... wrong link, one sec
[22:42:12] mxrguspxrt: has joined #RubyOnRails
[22:42:21] riotjones: has joined #RubyOnRails
[22:42:23] VeryBewitching: taxen: http://guides.rubyonrails.org/association_basics.html#the-has-many-through-association
[22:42:25] VeryBewitching: That's the one.
[22:42:34] stannard: has joined #RubyOnRails
[22:43:45] l_tonz: has joined #RubyOnRails
[22:43:52] northfurr: has joined #RubyOnRails
[22:44:04] VeryBewitching: taxen: So maybe a GroupMember model that belongs_to :group and belongs_to :user
[22:44:14] yaymukund: has joined #RubyOnRails
[22:44:54] taxen: VeryBewitching: I'm thinking there's probably some way rails would set that up for me, that I'm just unaware of
[22:45:27] taxen: VeryBewitching: if all relationships are properly defined
[22:45:34] gambl0re: has joined #RubyOnRails
[22:45:44] VeryBewitching: This is how to define them though.
[22:46:00] VeryBewitching: Rails provides has_many :model, through: :other_model
[22:47:24] VeryBewitching: So you generate Group, GroupUser, User
[22:47:38] taxen: VeryBewitching: allright, I'll give it a try
[22:47:42] taxen: VeryBewitching: thanks
[22:47:51] rickmasta: has joined #RubyOnRails
[22:48:17] VeryBewitching: Group has whatever attrs you have, User has whatever attrs you have, GroupUser has belongs_to :group and belongs_to :user, Group will has_many :users, through: :group_user
[22:48:52] VeryBewitching: So you can say Group.find(n).users
[22:49:13] raunicolae: has joined #RubyOnRails
[22:49:18] VeryBewitching: It's easy as pie once you do it more than once :D
[22:49:39] taxen: Yeah.. I'm only starting out
[22:49:45] taxen: This is my first serious rails project
[22:49:55] taxen: Love RoR already
[22:50:35] Tokenizer: has joined #RubyOnRails
[22:50:41] VeryBewitching: And the above example should have been through: :group_users
[22:50:54] VeryBewitching: Smoke break, bbiab.
[22:51:13] leeky: has joined #RubyOnRails
[22:51:51] 18VAATXU3: has joined #RubyOnRails
[22:51:51] 7GHABDWVU: has joined #RubyOnRails
[22:52:22] ericjphillips: has joined #RubyOnRails
[22:54:11] sanjayu: has joined #RubyOnRails
[22:58:55] GJdan: has joined #RubyOnRails
[22:59:33] hephaestus_rg: has joined #RubyOnRails
[23:00:02] AntiSpamMeta: has joined #RubyOnRails
[23:00:23] Cache_Money: has joined #RubyOnRails
[23:02:18] elektronaut: has joined #RubyOnRails
[23:03:27] asi_: has joined #RubyOnRails
[23:03:40] gerep: has joined #RubyOnRails
[23:04:07] epochwolf: has joined #RubyOnRails
[23:04:49] CanTonic: has joined #RubyOnRails
[23:11:48] moeabdol: has joined #RubyOnRails
[23:17:10] doodlehaus: has joined #RubyOnRails
[23:19:00] apg: has joined #RubyOnRails
[23:21:41] blackmesa: has joined #RubyOnRails
[23:25:07] chouhoul_: has joined #RubyOnRails
[23:27:17] chouhoulis: has joined #RubyOnRails
[23:27:34] arBmind: has joined #RubyOnRails
[23:28:59] ericjphillips: has joined #RubyOnRails
[23:29:21] mxrguspxrt: has joined #RubyOnRails
[23:30:39] benlieb: has joined #RubyOnRails
[23:35:48] tw1sted: has joined #RubyOnRails
[23:39:32] dikaio: has joined #RubyOnRails
[23:42:29] moeabdol: has joined #RubyOnRails
[23:43:08] riotjones: has joined #RubyOnRails
[23:45:20] stardiviner: has joined #RubyOnRails
[23:45:30] prasselpikachu: has joined #RubyOnRails
[23:46:04] jun_: has joined #RubyOnRails
[23:46:43] htmldrum: has joined #RubyOnRails
[23:47:33] maletor_: has joined #RubyOnRails
[23:49:15] mfitton: has joined #RubyOnRails
[23:51:22] mfitton: Hey guys, can someone help me debug a StrongAttribute error I'm getting?
[23:52:30] mfitton: I've looked up the issue online, but most of the fixes are oriented around the use of a params hash
[23:54:58] yaymukund: has joined #RubyOnRails
[23:55:36] mfitton: https://gist.github.com/anonymous/ef17434b87670ec827c3 is my code
[23:55:46] mfitton: I don't know how to allow the attributes through
[23:59:04] mfitton: Is the channel silent or am I somehow not getting messages. I've never been in an IRC channel with this many people that's this quiet
[23:59:16] dopamean_: has joined #RubyOnRails