« Back to channel list

#RubyOnRails - 20 July 2015

« Back 1 day Forward 1 day »
[00:00:00] kb3ien: I'll be damned, it seems to work on the SearchField object too!
[00:00:20] kb3ien: Blacklight::Configuration::SearchField to be concise.
[00:01:00] wethu: if you want your hash to be accessible by :symbols and 'strings', i.e. my_hash[:foo] or my_hash['foo'], covert it to a HashWithIndifferentAccess
[00:01:22] kb3ien: Any performance hit?
[00:01:44] wethu: probably...
[00:01:45] kb3ien: well. I'll just stick to symbols, which I assume compile into something FASTER than strings.
[00:02:38] wethu: yeah it probably is minor, FYI you can call #with_indifferent_access on any hash, it will return a converted hash
[00:04:04] GeissT: has joined #RubyOnRails
[00:05:13] mblair: has joined #RubyOnRails
[00:05:34] Aeyrix: There's frost
[00:05:37] Aeyrix: on my lawn
[00:05:41] Aeyrix: I haven't seen frost in nine years.
[00:06:00] wethu: its pretty cold here too, gold coast
[00:07:02] kb3ien: Its been about 30 all day here in NY.US, too damn hot.
[00:07:17] wethu: 30F or C?
[00:07:18] Papierkorb: kb3ien: I doubt that symbols are actually faster, it may save some bytes of memory though, and maybe also easier to search for
[00:07:53] Papierkorb: *are much faster
[00:08:32] kb3ien: yeah on an i386 any symbol longer than 3 chars will take 8 bytes of ram, minimum whereas a symbol should be encodeable as 32bits.
[00:08:51] kb3ien: degrees, not F.
[00:08:57] Aswebb_: has joined #RubyOnRails
[00:08:58] kb3ien: 30F would be nice.
[00:09:18] kb3ien: The garden would HATE it though.
[00:09:56] Papierkorb: kb3ien: Afaik it's actually that the VM *may* store symbol strings (They're still strings, one way or the other) just once, whereas for usual strings there's normally no optimization for that
[00:09:58] wethu: my tomatoes are hating this cold
[00:10:21] Radar: It was 32 here this morning (Melbourne)
[00:10:26] Radar: 32F, that is
[00:11:05] wethu: I thought you were a sydney sider Radar
[00:11:20] Radar: wethu: I moved 3 and a half years ago. You should update your Stalkerfile
[00:11:29] wethu: ah thanks
[00:11:40] bonhoeffer: has joined #RubyOnRails
[00:14:44] symbol: has joined #RubyOnRails
[00:17:21] bungoman: has joined #RubyOnRails
[00:17:59] centrx: has joined #RubyOnRails
[00:18:14] sinkensabe: has joined #RubyOnRails
[00:18:18] kb3ien: Thankyou. I can use the same form constructing code for searching two data sets, nearly.
[00:20:07] wethu: Awesome, reusing code is a great thing
[00:20:33] SteenJobs: has joined #RubyOnRails
[00:20:37] ledestin: has joined #RubyOnRails
[00:20:41] erich: has joined #RubyOnRails
[00:20:52] rubyonrails523: has joined #RubyOnRails
[00:23:20] FCser: has joined #RubyOnRails
[00:24:37] charliesome: has joined #RubyOnRails
[00:24:45] tjbiddle: has joined #RubyOnRails
[00:26:08] superlou: has joined #RubyOnRails
[00:26:21] WillAmes: has joined #RubyOnRails
[00:26:44] christiandsg: has joined #RubyOnRails
[00:28:07] Rodya_: has joined #RubyOnRails
[00:29:24] lethjakman: has joined #RubyOnRails
[00:29:46] nerdsville: Hello! does anyone have any suggestions for a testing library to use for usability tests?
[00:30:08] Lightsword: has joined #RubyOnRails
[00:30:15] wethu: like capybara ?
[00:30:36] nerdsville: not sure, I am new to rails, but I will take a look at that one :)
[00:31:07] nerdsville: Yup! That is exactly what I was looking for!
[00:32:09] dyulax: has joined #RubyOnRails
[00:32:29] jenrzzz: has joined #RubyOnRails
[00:34:00] Supertanker2: has joined #RubyOnRails
[00:34:04] Supertanker2: Is there a set of guidelines for deciding how to split up your app into controllers?
[00:34:26] Supertanker2: For example, I'm writing a blog to learn Rails. I have posts, so I have a Posts controllers. but Posts have Comments. Should Comment posting, etc be in a Comments controller?
[00:34:29] Supertanker2: Or in the Posts controller?
[00:34:38] htmldrum: has joined #RubyOnRails
[00:35:08] nerdsville: Depends on how you architect your routes, do you want comments to be accessible via url?
[00:35:18] Supertanker2: Doesn't particularly matter.
[00:35:24] Supertanker2: That could be interesting I suppose :o
[00:35:49] Supertanker2: I realize best practices are a myth and each app is different, but some general tips for deciding these sorts of things would be great :)
[00:36:22] nerdsville: Yeah I would say that you should be fine without a controller at all but setting up the relationships with the models
[00:36:32] tjbiddle: has joined #RubyOnRails
[00:36:34] nerdsville: But I am new to the community so I might not be the best for the advice )
[00:36:59] dyulax: I would have two different models (Post, Comment) and two different controllers
[00:37:53] nerdsville: I guess that does make sense, then you aren't creating the comment in the post controller :)
[00:37:55] dyulax: Maybe I would nest comments route under posts route, but anyway Comments list would appear under Posts#show
[00:38:06] Supertanker2: nerdsville, ah okay :) Thanks for the advice though, I appreciate it
[00:38:08] nerdsville: It really depends on the architecture
[00:38:14] Supertanker2: dyulax, ahhh, I haven't learned about nested routes yet, that's on my todo list.
[00:38:24] Supertanker2: Nested routes being something like /posts/156/comments/1 ?
[00:38:38] dyulax: check this: http://guides.rubyonrails.org/routing.html#nested-resources
[00:38:41] Supertanker2: and /posts/156/comments/new ? (If the form is a separate page)
[00:38:45] OS-14813: has joined #RubyOnRails
[00:38:57] volsus: has joined #RubyOnRails
[00:39:04] dyulax: nerdsville is right
[00:39:12] dyulax: read that and see if it is the best choice for you
[00:39:42] goodcodeguy: has joined #RubyOnRails
[00:40:15] Supertanker2: dyulax, very interesting, thank you!
[00:43:43] pwnz0r: has joined #RubyOnRails
[00:44:18] allcentury: has joined #RubyOnRails
[00:45:10] Rubie: has joined #RubyOnRails
[00:45:58] johntrails: Can someone help me out with a CoderByte solution? I am doing "Letter Changes" Which states "Replace every letter in the string with the letter following it in the alphabet (ie. c becomes d, z becomes a). Then capitalize every vowel in this new string (a, e, i, o, u) and finally return this modified string"
[00:46:10] charliesome: has joined #RubyOnRails
[00:46:10] johntrails: i got a solution, but it seems really dirty, wondering if there's a better way to code this
[00:46:23] johntrails: my solution = Replace every letter in the string with the letter following it in the alphabet (ie. c becomes d, z becomes a). Then capitalize every vowel in this new string (a, e, i, o, u) and finally return this modified string
[00:46:35] johntrails: my solution = http://pastie.org/10301689
[00:47:55] nerdsville: what language is this
[00:48:25] Papierkorb: Javascript, the bad parts
[00:49:17] nerdsville: #javascript :P
[00:52:27] johntrails: wrong chan!!
[00:52:37] nerdsville: Lol, no issue :P
[00:52:38] strcmp1: i think all of that function could be replaced with .replace() function though
[00:53:09] Aeyrix: [10:08:50] <kb3ien> degrees, not F.
[00:53:20] Aeyrix: You realise that Fahrenheit is a degree measurement too, right?
[00:53:53] Aeyrix: ??C and ??F.
[00:54:06] nerdsville: College degrees
[00:55:32] LeoDee: has joined #RubyOnRails
[01:00:07] gerep: has joined #RubyOnRails
[01:00:29] nerdsville: should requires for rspec go in rails_helper or spec_helper
[01:01:10] gerep: I have two models: Requests and Items, I'll add a new one which will be the table for a has many through association. This table name would be RequestsItems? Both words in plural?
[01:01:46] Aeyrix: Wait, why do you need an association table?
[01:01:55] Aeyrix: One request has many items? Or many requests have many items?
[01:03:04] nerdsville: I think it is many-to-many if I understand correctly
[01:03:16] nerdsville: In which case I think it would make sense to have the associations table
[01:04:26] ellisTAA: has joined #RubyOnRails
[01:04:47] ellisTAA: i closde my terminal now i can???t stop locahost:3000
[01:04:50] ellisTAA: anyone know how to stop it?
[01:04:56] kb3ien: Fahrenheit hasn't been degrees in decades.
[01:05:11] kb3ien: kill -9 ?
[01:05:53] nerdsville: ps -ax | grep "rails"
[01:05:57] nerdsville: and yeah kill -9
[01:06:29] gerep: Aeyrix, you are correct. I was so worried about creating a flawless relation from the start and I didn't notice it was unnecessary a many-to-many relation. One to many is enough in this case since a Request won't allow the same item and an item will be repeated only in different Request
[01:06:54] charliesome: has joined #RubyOnRails
[01:07:01] bruno-: has joined #RubyOnRails
[01:09:37] Aeyrix: kb3ien: wat
[01:09:56] Aeyrix: gerep: :)
[01:11:34] bonhoeffer: has joined #RubyOnRails
[01:11:43] isaacd: has joined #RubyOnRails
[01:19:01] sinkensabe: has joined #RubyOnRails
[01:19:31] isaacd: has joined #RubyOnRails
[01:20:36] isaacd: has joined #RubyOnRails
[01:21:48] isaacd: has joined #RubyOnRails
[01:22:36] eggoez: has joined #RubyOnRails
[01:22:55] DoctorMonocular: has joined #RubyOnRails
[01:23:38] isaacd: has joined #RubyOnRails
[01:25:56] nerdsville: I installed capybara and set it up with rspec, and now I get this error when running rspec
[01:25:57] nerdsville: https://gist.github.com/NerdsvilleCEO/31b51f4f4df8ec9f832a
[01:26:55] CheckYourSix: has joined #RubyOnRails
[01:28:48] yashinbasement: has joined #RubyOnRails
[01:30:11] yashinbasement: has joined #RubyOnRails
[01:32:03] Sylario: has joined #RubyOnRails
[01:32:55] nerdsville: It is because I specified it was a feature test, when in rails you aren't supposed to, nvm
[01:33:08] Radar: nerdsville: no code?
[01:33:57] nerdsville: describe "the signin process" :type => :feature do
[01:34:05] nerdsville: It needed to be:
[01:34:13] nerdsville: describe "the signin process" do
[01:35:50] braincra-: has joined #RubyOnRails
[01:36:33] framling: has joined #RubyOnRails
[01:36:53] Oog_: has joined #RubyOnRails
[01:39:11] Oog: self.where(["LOWER(?) = ?", field, value.downcase]).first - problem is this generates SELECT "user_statuses".* FROM "user_statuses" WHERE (LOWER('name') = 'has vehicle') ORDER BY "user_statuses"."id" ASC LIMIT 1
[01:39:41] Oog: notice the LOWER('name') - it puts name in quotes so it isnt a column name - how do i get it to not do that
[01:40:37] afrianska: has joined #RubyOnRails
[01:40:51] nerdsville: does #{field} work
[01:42:36] nerdsville: You should be able to replace the first question mark with #{field} to embed it in string
[01:42:43] ellisTAA: has joined #RubyOnRails
[01:42:55] ellisTAA: in order to make an api call you just need the url, and headers?
[01:43:15] fryguy: Elion: depends on the api you are calling
[01:43:16] nerdsville: what request method?
[01:43:22] fryguy: EllisTAA:
[01:43:45] nerdsville: you can post to the URL with a payload of params
[01:43:53] nerdsville: you can use curl to do this
[01:44:05] poli: has joined #RubyOnRails
[01:44:24] ellisTAA: nerdsville: payload of params ??? like authorization, etc?
[01:45:07] nerdsville: Can you make a gist of the controller
[01:45:10] ur5us: has joined #RubyOnRails
[01:45:21] ellisTAA: of what controller?
[01:45:26] nerdsville: that you are posting to
[01:45:48] ellisTAA: well i???m in my create method and i???m trying to make a post request to imgur api
[01:45:55] ellisTAA: i???m not at my computer atm
[01:46:06] nettoweb: has joined #RubyOnRails
[01:46:12] nerdsville: thought it was your api, I feel dumb lol
[01:46:13] Radar: EllisTAA is communicating with us using his rock
[01:46:48] Mendenhall: has joined #RubyOnRails
[01:46:55] nerdsville: ok so image upload right?
[01:47:25] nerdsville: https://api.imgur.com/3/image is your URL
[01:47:27] ellisTAA: let me go to my computer and show u what i have
[01:47:28] Aeyrix: > private irc net down
[01:48:03] Oog: nerdsville: that leaves me open to sql injection attach right?
[01:48:08] nerdsville: and you need an image... album, title, type, name, description are optional
[01:48:27] nerdsville: I don't think it does
[01:48:28] Aeyrix: parameterised queries
[01:48:51] bonhoeffer: has joined #RubyOnRails
[01:49:31] ellisTAA: https://gist.github.com/ellismarte/abb52d35a9175acfbad3
[01:49:36] nerdsville: EllisTAA: does imgur not require authenticaton to post an image? It doesn't ask for an API key?
[01:49:38] ellisTAA: so when i tried that i got an error
[01:50:10] ellisTAA: err it mentioned crap about authorization somewhere
[01:50:22] Aeyrix: "completely 100% required", right?
[01:50:34] nerdsville: Their api docs are weird
[01:50:39] ellisTAA: oh fuck i dont think i installed the http gem
[01:50:47] nerdsville: lol language
[01:51:25] mary5030: has joined #RubyOnRails
[01:51:53] nerdsville: ah yes, you are doing it right, they have authorization info above
[01:51:58] bungoman: has joined #RubyOnRails
[01:52:00] nerdsville: it should work
[01:52:09] Radar: EllisTAA: When you're wanting us to help you, best thing you can do is to provide us with all the steps to reproduce the issue on our own machines.
[01:52:18] Radar: EllisTAA: If we can see it going wrong too, then we can probably fix it.
[01:52:40] nerdsville: EllisTAA: actually, don't put base64 image in url
[01:52:43] ellisTAA: ok cool let me try running it and ill get right back to u
[01:52:54] nerdsville: https://api.imgur.com/3/image is the endpoint
[01:53:09] nerdsville: and then add a param {image: #{base64}}
[01:53:24] nerdsville: image is a string, not representative of a variable
[01:53:42] ellisTAA: nerdsville, but according to the docs it says to i think https://api.imgur.com/endpoints/image
[01:53:58] Aeyrix: EllisTAA: Do you actually understand the processes you're undertaking
[01:53:59] nerdsville: but you need a param of image
[01:54:05] Aeyrix: or are you just flailing wildly and hoping you get to the end?
[01:54:16] ellisTAA: so the url ends with /3/image and then i pass in a param of the base64 ?
[01:54:39] ellisTAA: aeyrix: i just don???t have a firm grasp of the details, this is like my 3rd api i???ve used
[01:54:43] ellisTAA: nerdsville: thanks
[01:54:50] Aeyrix: EllisTAA: The details are very explicit.
[01:55:04] Aeyrix: Within about two seconds of loading the API doc page I could tell you weren't doing it correctly, and I've never used the imgur API.
[01:55:26] nerdsville: {image} would indicate variable :) just for future reference
[01:55:38] nerdsville: It's all good, we all learn new things every day
[01:55:40] ellisTAA: thanks inerdsville
[01:55:47] nerdsville: We are all at different points in our learning
[01:55:49] Aeyrix: nerdsville: We do, I just have concerns about some peoples' methods of learning.
[01:56:03] Aeyrix: They want to know one thing really quickly and don't give a shit about the underlying fundamentals.
[01:56:08] Aeyrix: Which causes even bigger problems down the line.
[01:56:11] Aeyrix: We see it in #ror every day.
[01:56:14] ellisTAA: i do give a shit about the fundamentals
[01:56:32] nerdsville: Let's all get along :) we are a community
[01:56:59] Aeyrix: There's an important message behind the abrasiveness.
[01:57:10] Aeyrix: Which is, sure, help people along, but make sure they understand the entire process.
[01:57:14] nerdsville: Ah I am just, passive I guess
[01:57:16] Aeyrix: Otherwise you're literally just going to cause them more problems.
[01:57:46] nerdsville: Well, they are the ones learning, just as we all are
[01:57:48] Creeves: has joined #RubyOnRails
[01:57:49] ellisTAA: aeyrix: i hear you, you don???t have to reiterate your point
[01:57:50] Aswebb_: has joined #RubyOnRails
[01:57:57] Aeyrix: EllisTAA: I'm talking to nerdsville.
[01:58:12] nerdsville: Aeyrix, what if he learned from this?
[01:58:21] nerdsville: What if he learned how to post to an API endpoint properly
[01:58:41] nerdsville: Just because he didn't know previously doesn't mean that he can't learn by asking questions
[01:58:43] ellisTAA: anyways thanks nerdsville. i learned a lot. i???m starting to understand the headers thing more
[01:58:45] Aeyrix: Then they were advised correctly.
[01:58:53] Aeyrix: If they didn't learn what a POST parameter is
[01:58:55] Aeyrix: they were not.
[01:59:12] nerdsville: Which is fine, now he knows
[01:59:30] nerdsville: And won't ask these questions again
[02:00:47] lethjakman: has joined #RubyOnRails
[02:01:17] ellisTAA: has joined #RubyOnRails
[02:02:29] ellisTAA: so when i include this line, my front end that makes a request gets a 404 response, but when i take it out it gets the correct response i???m looking for https://gist.github.com/ellismarte/1e5c9438427246516009#file-photo-rb-L8
[02:03:31] nerdsville: can you post the error
[02:04:06] sevenseacat: has joined #RubyOnRails
[02:04:20] Aeyrix: Hey sevenseacat :
[02:04:57] ellisTAA: https://gist.github.com/ellismarte/1e5c9438427246516009#file-photo-rb-L8
[02:05:29] nettoweb: has joined #RubyOnRails
[02:06:06] nerdsville: all I see is ready state 4
[02:06:12] nerdsville: I need to see the status code lol
[02:06:23] nerdsville: and the url it is posting to
[02:06:37] nerdsville: ok what url is it posting to
[02:07:01] ellisTAA: ok so i think the problem is the require_relative at the top ....
[02:07:42] nerdsville: not sure it is even needed
[02:07:49] nerdsville: It should auto load the models
[02:07:51] bruno-: has joined #RubyOnRails
[02:07:55] ellisTAA: my module is in my model folder though
[02:08:03] nerdsville: I am pretty sure
[02:08:10] nerdsville: I have never had to require my models
[02:08:46] ellisTAA: yeah whenever i include code that references that module i get that 404 error
[02:10:23] nerdsville: do you have http.use_ssl = true
[02:10:34] ellisTAA: where would that be?
[02:11:00] nerdsville: in the model
[02:11:20] nerdsville: where you define your headers and post url
[02:11:34] ellisTAA: no i didn???t write that
[02:11:47] ellisTAA: i???ve used httparty without writing that before though
[02:12:14] nerdsville: ah you aren't using net/http
[02:12:57] OS-14813: has joined #RubyOnRails
[02:12:58] nerdsville: shouldn't the module be in /lib?
[02:13:21] ellisTAA: i thought it went in model but if that???s not true ill move it
[02:13:36] nerdsville: I am not sure, this is beyond my scope I am afraid
[02:13:44] nerdsville: I don't want to advise you the wrong direction
[02:13:48] nerdsville: I am new to rails myself :)
[02:13:51] ellisTAA: ooo it looks like you are right
[02:14:13] nerdsville: oh, it works?
[02:14:41] Spami: has joined #RubyOnRails
[02:14:48] ellisTAA: no i mean according to the internet it says to put modules in lib
[02:15:13] pwnz0r: has joined #RubyOnRails
[02:15:38] poli: has joined #RubyOnRails
[02:15:39] nerdsville: If you do that it *should* autoload
[02:17:54] nerdsville: Does anyone know how to create a user with capybara, without filling out the sign up form
[02:18:15] nerdsville: using devise
[02:19:13] ellisTAA: has joined #RubyOnRails
[02:19:48] sinkensabe: has joined #RubyOnRails
[02:20:47] inoter: has joined #RubyOnRails
[02:21:42] chipotle: has joined #RubyOnRails
[02:22:14] fighella: has joined #RubyOnRails
[02:23:53] volsus: has joined #RubyOnRails
[02:24:16] x-light: has joined #RubyOnRails
[02:25:27] Scripore: has joined #RubyOnRails
[02:28:33] tubbo: well you could just do User.create before running `visit`
[02:28:51] tubbo: nerdsville: ^
[02:32:21] nerdsville: I tried doing that
[02:32:37] nerdsville: I did user.new
[02:32:40] nerdsville: no user.save
[02:34:17] varunwachaspati: has joined #RubyOnRails
[02:34:56] nerdsville: tubbo: thanks :)
[02:35:05] nerdsville: I overlooked I wasn't saving the record
[02:39:52] goodcodeguy: has joined #RubyOnRails
[02:40:16] toretore: has joined #RubyOnRails
[02:40:59] varunwachaspati: has joined #RubyOnRails
[02:44:48] nerdsville: See you guys :) thanks for the help!
[02:45:36] arooni-mobile: has joined #RubyOnRails
[02:45:39] pwnz0r: has joined #RubyOnRails
[02:46:39] kkeuning: has joined #RubyOnRails
[02:46:46] vere: has joined #RubyOnRails
[02:47:29] Caius: has joined #RubyOnRails
[02:48:05] kkeuning: has joined #RubyOnRails
[02:52:22] ellisTAA: has joined #RubyOnRails
[02:57:38] volsus: has joined #RubyOnRails
[02:59:08] vere: has joined #RubyOnRails
[03:00:19] shyshy: has joined #RubyOnRails
[03:01:31] sarink: has joined #RubyOnRails
[03:01:35] Lightsword: has joined #RubyOnRails
[03:03:55] dtcristo: has joined #RubyOnRails
[03:04:16] VeryBewitching: has joined #RubyOnRails
[03:05:28] Anakat: has joined #RubyOnRails
[03:10:58] braincrash: has joined #RubyOnRails
[03:12:10] sar1nk: has joined #RubyOnRails
[03:12:39] zorak8: has joined #RubyOnRails
[03:20:31] sinkensabe: has joined #RubyOnRails
[03:21:39] Maletor: has joined #RubyOnRails
[03:23:14] Supertanker2: has joined #RubyOnRails
[03:27:15] EasyCo: has joined #RubyOnRails
[03:27:20] vere: has joined #RubyOnRails
[03:28:23] volsus: has joined #RubyOnRails
[03:30:51] Scripore: has joined #RubyOnRails
[03:31:51] xcesariox: has joined #RubyOnRails
[03:40:43] nerdsville: has joined #RubyOnRails
[03:41:46] kies^: has joined #RubyOnRails
[03:46:41] Aswebb_: has joined #RubyOnRails
[03:46:59] jenrzzz: has joined #RubyOnRails
[03:49:18] mikenovikov: has joined #RubyOnRails
[03:50:11] bungoman: has joined #RubyOnRails
[03:58:42] tuelz: has joined #RubyOnRails
[04:02:18] julienk: has joined #RubyOnRails
[04:04:47] riotjones: has joined #RubyOnRails
[04:05:31] richipargo: has joined #RubyOnRails
[04:09:15] bruno-: has joined #RubyOnRails
[04:10:34] bungoman: has joined #RubyOnRails
[04:11:16] bronson: has joined #RubyOnRails
[04:13:56] crunk_bear: has joined #RubyOnRails
[04:15:47] eggoez: has joined #RubyOnRails
[04:16:35] Maletor: has joined #RubyOnRails
[04:16:37] Guam: has left #RubyOnRails: ()
[04:17:52] cornerma1: has joined #RubyOnRails
[04:21:16] sinkensabe: has joined #RubyOnRails
[04:23:52] afrianska: has joined #RubyOnRails
[04:31:06] lxsameer: has joined #RubyOnRails
[04:36:36] dopie: has joined #RubyOnRails
[04:36:40] Lightsword: has joined #RubyOnRails
[04:36:54] Supertanker2: has joined #RubyOnRails
[04:37:02] dopie: Hey all I had a question with the api docs
[04:37:03] dopie: http://api.rubyonrails.org/classes/ActiveModel/Validations/HelperMethods.html#method-i-validates_numericality_of
[04:37:30] dopie: isn't it supposed to be on: instead of :on
[04:38:32] Aeyrix: Radar: no u
[04:38:54] Aeyrix: dopie: Where does it say :on?
[04:38:56] Radar: dopie: point to where this is wrong in a screenshot please.
[04:39:19] Aeyrix: I can only assume here:
[04:39:21] Aeyrix: "There is also a list of default options supported by every validator: :if, :unless, :on, :allow_nil, :allow_blank, and :strict . See ActiveModel::Validation#validates for more information"
[04:40:53] dopie: Aeyrix, yes
[04:41:13] dopie: seeing the examples and than viewing the text
[04:41:24] _blizzy_: has joined #RubyOnRails
[04:42:07] Aeyrix: Radar: btw congrats on the book going live. :>
[04:42:13] Aeyrix: I got an email late yesterday, I think.
[04:42:22] Aeyrix: ACTION chex
[04:42:24] Radar: oh that thing
[04:42:34] Aeyrix: Seems so.
[04:42:54] Aeyrix: o not quite completed apparently
[04:43:05] Radar: "All chapters and appendixes have been tech reviewed and copy edited."
[04:43:13] Radar: Which means there are at least 50 errors still in the book.
[04:43:22] Radar: tech reviewed == by sevenseacat
[04:43:28] Radar: Manning do fuck all.
[04:44:06] lethjakman: has joined #RubyOnRails
[04:46:20] l4u-: has joined #RubyOnRails
[04:46:31] schaerli: has joined #RubyOnRails
[04:48:59] _blizzy_: has joined #RubyOnRails
[04:50:35] vere: has joined #RubyOnRails
[04:51:38] Maletor: has joined #RubyOnRails
[04:53:16] DoctorMonocular: has joined #RubyOnRails
[04:56:50] dtcristo: has joined #RubyOnRails
[04:59:24] tuelz: has joined #RubyOnRails
[05:01:46] culturelabs: has joined #RubyOnRails
[05:02:39] mheld: has joined #RubyOnRails
[05:04:10] balr0g: has joined #RubyOnRails
[05:04:43] spastorino: has joined #RubyOnRails
[05:04:54] chancancode: has joined #RubyOnRails
[05:05:58] dotty: has joined #RubyOnRails
[05:06:23] grandy: has joined #RubyOnRails
[05:06:24] vere: has joined #RubyOnRails
[05:06:31] mjc_: has joined #RubyOnRails
[05:06:57] iamdevnul: has joined #RubyOnRails
[05:07:30] _blizzy_: has left #RubyOnRails: ()
[05:09:11] l4u-: has joined #RubyOnRails
[05:09:31] chrissonar: has joined #RubyOnRails
[05:11:40] Scripore: has joined #RubyOnRails
[05:11:58] nickenchuggets: has joined #RubyOnRails
[05:13:40] icaro: has joined #RubyOnRails
[05:13:46] jenrzzz: has joined #RubyOnRails
[05:14:41] acti0nman: has joined #RubyOnRails
[05:14:58] xkickflip: has joined #RubyOnRails
[05:15:31] srinidhi: has joined #RubyOnRails
[05:16:52] vere: has joined #RubyOnRails
[05:18:43] konsolebox: has joined #RubyOnRails
[05:18:44] feignt: has joined #RubyOnRails
[05:19:42] rugrat72: has joined #RubyOnRails
[05:20:38] lethjakman: has joined #RubyOnRails
[05:22:01] sinkensabe: has joined #RubyOnRails
[05:23:33] rugrat72: has left #RubyOnRails: ("WeeChat 0.4.2")
[05:24:16] _blizzy_: has joined #RubyOnRails
[05:24:18] rugrat72: has joined #RubyOnRails
[05:27:02] sp1rs: has joined #RubyOnRails
[05:28:31] illuz1on: has joined #RubyOnRails
[05:28:54] aganov: has joined #RubyOnRails
[05:29:28] sypheren: ren> When doing bundle install, I'm getting 'certificate verify failed' amongst other things. It tells me to install rake. When I try to do this, it says it cannot download data from rubygems.org for the same certificate verify failed
[05:32:58] Radar: Sypheren: !gist
[05:32:58] helpa: Sypheren: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[05:33:07] yardenbar: has joined #RubyOnRails
[05:35:33] Aswebb_: has joined #RubyOnRails
[05:35:36] riotjones: has joined #RubyOnRails
[05:36:48] varunwachaspati: has joined #RubyOnRails
[05:38:24] jgpawletko_: has joined #RubyOnRails
[05:40:38] PlasmaStar: has joined #RubyOnRails
[05:40:40] daxroc: has joined #RubyOnRails
[05:40:49] neilfse: has joined #RubyOnRails
[05:40:50] dotty: has joined #RubyOnRails
[05:41:16] Lightsword: has joined #RubyOnRails
[05:41:24] jlyndon: has joined #RubyOnRails
[05:41:41] shwoodard: has joined #RubyOnRails
[05:42:23] lxsameer: has joined #RubyOnRails
[05:42:23] lxsameer: has joined #RubyOnRails
[05:42:25] _blizzy_: has left #RubyOnRails: ("Leaving")
[05:42:31] MiracleBlue: has joined #RubyOnRails
[05:42:48] FCser: has joined #RubyOnRails
[05:42:52] mjc_: has joined #RubyOnRails
[05:43:13] roolo: has joined #RubyOnRails
[05:43:40] bryancp: has joined #RubyOnRails
[05:43:46] Mendenhall: has joined #RubyOnRails
[05:43:52] grandy: has joined #RubyOnRails
[05:44:03] jenrzzz: has joined #RubyOnRails
[05:44:58] feignt: has joined #RubyOnRails
[05:45:56] machty: has joined #RubyOnRails
[05:46:01] michael_mbp: has joined #RubyOnRails
[05:46:05] hosh_: has joined #RubyOnRails
[05:46:09] lacrosse: has joined #RubyOnRails
[05:46:11] x-light: has joined #RubyOnRails
[05:46:19] rakm: has joined #RubyOnRails
[05:46:23] zemmihates: has joined #RubyOnRails
[05:46:56] maZtah: has joined #RubyOnRails
[05:47:01] Lightsword: has joined #RubyOnRails
[05:47:37] Iacobus: has joined #RubyOnRails
[05:48:16] dhjondoh: has joined #RubyOnRails
[05:48:19] danlucraft: has joined #RubyOnRails
[05:48:24] corioliss: has joined #RubyOnRails
[05:48:40] rails663: has joined #RubyOnRails
[05:49:00] ebryn: has joined #RubyOnRails
[05:49:03] uranther: has joined #RubyOnRails
[05:49:27] nickfausnight: has joined #RubyOnRails
[05:49:48] kapowaz: has joined #RubyOnRails
[05:49:50] dideler: has joined #RubyOnRails
[05:51:37] jxf: has joined #RubyOnRails
[05:52:34] kumavis: has joined #RubyOnRails
[05:52:54] cardoni_: has joined #RubyOnRails
[05:53:05] krokuz_: has joined #RubyOnRails
[05:54:22] jimbeaudoin: has joined #RubyOnRails
[05:55:41] EasyCo: has joined #RubyOnRails
[05:56:17] naftilos76: has joined #RubyOnRails
[05:56:33] duncannz: has joined #RubyOnRails
[05:57:10] heidar: has joined #RubyOnRails
[05:57:21] l4u-: has joined #RubyOnRails
[05:57:27] tagrudev: has joined #RubyOnRails
[05:58:46] AckZ: has joined #RubyOnRails
[05:58:51] DukeDave: has joined #RubyOnRails
[05:58:56] rvanlieshout: has joined #RubyOnRails
[05:59:53] fgo: has joined #RubyOnRails
[06:00:09] tuelz: has joined #RubyOnRails
[06:01:57] Maletor: has joined #RubyOnRails
[06:02:13] vere: has joined #RubyOnRails
[06:04:06] metus_violarium: has joined #RubyOnRails
[06:04:27] lala: has joined #RubyOnRails
[06:04:56] richipargo: has joined #RubyOnRails
[06:05:46] zrl: has joined #RubyOnRails
[06:06:19] rugrat72: has joined #RubyOnRails
[06:06:23] sypheren: radar, had to change https to http in the gemfile for the project
[06:07:46] Radar: Sypheren: although that isn't a good fix for it
[06:07:55] Radar: Sypheren: Sounds like something's borked with your Ruby install
[06:07:58] Aeyrix: Is this gem on windows?
[06:13:48] Lightsword: has joined #RubyOnRails
[06:13:51] eggoez: has joined #RubyOnRails
[06:15:16] dtcristo: has joined #RubyOnRails
[06:15:43] simplyianm: has joined #RubyOnRails
[06:16:01] wethu: has joined #RubyOnRails
[06:16:35] rugrat72: has joined #RubyOnRails
[06:17:05] cjk101010: has joined #RubyOnRails
[06:18:13] eGGsha: has joined #RubyOnRails
[06:18:39] comrad: has joined #RubyOnRails
[06:18:44] comrad: has joined #RubyOnRails
[06:19:10] DoubleMalt: has joined #RubyOnRails
[06:20:08] bronson: has joined #RubyOnRails
[06:22:23] morenoh149: has joined #RubyOnRails
[06:24:54] lethjakman: has joined #RubyOnRails
[06:28:05] riotjones: has joined #RubyOnRails
[06:34:35] _lazarevsky: has joined #RubyOnRails
[06:34:39] _lazarevsky: morning good people
[06:34:59] _lazarevsky: I've asked the same question at ruby but no answer
[06:35:13] _lazarevsky: I wanna check whether a variable I populated using Time.now is older than half an hour ago
[06:35:24] Radar: _lazarevsky: Use Time.current
[06:35:32] _lazarevsky: Time.now and 30.minutes.ago give me drastically different times
[06:36:11] sinkensabe: has joined #RubyOnRails
[06:38:02] rugrat72: has joined #RubyOnRails
[06:42:56] vere: has joined #RubyOnRails
[06:43:14] bricker1: has joined #RubyOnRails
[06:44:19] artto: has joined #RubyOnRails
[06:47:29] krokuz_: has left #RubyOnRails: ()
[06:47:34] dede: has joined #RubyOnRails
[06:47:37] dtcristo: has joined #RubyOnRails
[06:48:14] krokuz: has joined #RubyOnRails
[06:48:29] sypheren: Aeyrix, yeah
[06:48:39] sypheren: Radar, I know, but I just needed something to work with right now
[06:48:50] Radar: Ok. Just making sure you know.
[06:48:51] sypheren: Rubygems probably needs to be updated maybe?
[06:49:50] Radar: Not sure.
[06:51:21] Aeyrix: http://stackoverflow.com/questions/19150017/ssl-error-when-installing-rubygems-unable-to-pull-data-from-https-rubygems-o
[06:52:21] simplyianm: has joined #RubyOnRails
[06:52:33] Macaveli: has joined #RubyOnRails
[06:55:08] DoctorMonocular: has joined #RubyOnRails
[06:55:12] ElSif: has joined #RubyOnRails
[06:58:15] kwd: has joined #RubyOnRails
[06:58:43] Hates_: has joined #RubyOnRails
[06:58:57] Hates_: has joined #RubyOnRails
[06:59:11] terpo: has joined #RubyOnRails
[07:01:27] jenrzzz: has joined #RubyOnRails
[07:02:36] MaDErroR123: has joined #RubyOnRails
[07:04:40] alphaatom: has joined #RubyOnRails
[07:05:25] MaDErroR123: has joined #RubyOnRails
[07:05:43] alphaatom: has joined #RubyOnRails
[07:06:36] sypheren: Aeyrix, Thanks!
[07:10:07] simplyianm: has joined #RubyOnRails
[07:11:10] givanse_: has joined #RubyOnRails
[07:12:07] Palsson: has joined #RubyOnRails
[07:18:01] Aswebb_: has joined #RubyOnRails
[07:18:22] darutoko: has joined #RubyOnRails
[07:24:51] eGGsha: has joined #RubyOnRails
[07:25:27] OS-14813: has joined #RubyOnRails
[07:28:53] Mendenhall: has joined #RubyOnRails
[07:31:01] dtcristo: has joined #RubyOnRails
[07:32:35] Sylario: has joined #RubyOnRails
[07:32:37] schaerli: has joined #RubyOnRails
[07:33:42] dtcristo: has joined #RubyOnRails
[07:34:49] arup_r: has joined #RubyOnRails
[07:40:47] dtcristo: has joined #RubyOnRails
[07:41:00] rails664: has joined #RubyOnRails
[07:43:01] pwnz0r: has joined #RubyOnRails
[07:43:44] rails663: has joined #RubyOnRails
[07:47:01] michael_mbp: has joined #RubyOnRails
[07:50:54] fighella: has joined #RubyOnRails
[07:51:20] alxndr: has joined #RubyOnRails
[07:53:41] arBmind: has joined #RubyOnRails
[07:54:23] MiracleBlue: has joined #RubyOnRails
[07:54:35] wpp: has joined #RubyOnRails
[07:54:51] danlucraft: has joined #RubyOnRails
[07:54:51] dotty: has joined #RubyOnRails
[07:54:52] hellschreiber: has joined #RubyOnRails
[07:55:24] hosh_: has joined #RubyOnRails
[07:55:31] chancancode: has joined #RubyOnRails
[07:55:31] nomadicoder: has joined #RubyOnRails
[07:55:56] nickfausnight: has joined #RubyOnRails
[07:55:57] heidar: has joined #RubyOnRails
[07:56:19] Iacobus: has joined #RubyOnRails
[07:56:20] spastorino: has joined #RubyOnRails
[07:56:29] balr0g: has joined #RubyOnRails
[07:56:38] DukeDave: has joined #RubyOnRails
[07:57:06] wpp: Hi, I'm trying to setup a redis-configuration like mentioned here: http://stackoverflow.com/a/8289602/980524
[07:57:07] kumavis: has joined #RubyOnRails
[07:57:15] wpp: the problem I'm facing is that the .flushdb call is behaving like flushall and database 0 is flushed
[07:57:32] wpp: I've summarized my problem here:
[07:57:35] wpp: http://stackoverflow.com/questions/31503584/ruby-redis-client-flushdb-removes-keys-from-all-databases
[07:57:51] wpp: If someone with redis experience could take a look, I'd really appreciate it.
[07:59:02] Axy: has joined #RubyOnRails
[07:59:02] Axy: has joined #RubyOnRails
[07:59:21] rails663: Hello, how can I validate blob size before saving it to db?
[08:00:51] amitchellbullard: has joined #RubyOnRails
[08:00:53] jlpeters: has joined #RubyOnRails
[08:00:55] tuelz: has joined #RubyOnRails
[08:01:51] mikecmpbll: has joined #RubyOnRails
[08:01:56] terpo: has joined #RubyOnRails
[08:02:38] shwoodard: has joined #RubyOnRails
[08:03:48] rakm: has joined #RubyOnRails
[08:03:52] jsrn_: has joined #RubyOnRails
[08:04:39] mjc_: has joined #RubyOnRails
[08:04:54] feignt: has joined #RubyOnRails
[08:04:54] neilfse: has joined #RubyOnRails
[08:05:00] corioliss: has joined #RubyOnRails
[08:05:03] max_v: has joined #RubyOnRails
[08:05:11] l4u-: has joined #RubyOnRails
[08:05:15] ljen: has joined #RubyOnRails
[08:06:14] uranther: has joined #RubyOnRails
[08:06:27] lxkm__: has joined #RubyOnRails
[08:06:27] jimbeaudoin: has joined #RubyOnRails
[08:06:28] iamdevnul: has joined #RubyOnRails
[08:06:28] hashrocket: has joined #RubyOnRails
[08:06:28] AckZ: has joined #RubyOnRails
[08:06:32] Lloyd: has joined #RubyOnRails
[08:06:32] lacrosse: has joined #RubyOnRails
[08:06:34] DoctorMonocular: has joined #RubyOnRails
[08:07:40] Mia: has joined #RubyOnRails
[08:07:40] Mia: has joined #RubyOnRails
[08:08:39] daxroc: has joined #RubyOnRails
[08:08:53] jlyndon: has joined #RubyOnRails
[08:10:23] bruno-: has joined #RubyOnRails
[08:12:03] arup_r1: has joined #RubyOnRails
[08:12:34] Fire-Dragon-DoL: has joined #RubyOnRails
[08:12:50] dede: has joined #RubyOnRails
[08:12:50] machty: has joined #RubyOnRails
[08:13:38] lethjakman: has joined #RubyOnRails
[08:13:49] mheld: has joined #RubyOnRails
[08:13:57] jxf: has joined #RubyOnRails
[08:14:27] Trefex: has joined #RubyOnRails
[08:15:43] vere: has joined #RubyOnRails
[08:16:19] heidar: has joined #RubyOnRails
[08:16:20] arup_r: has joined #RubyOnRails
[08:16:47] artto_: has joined #RubyOnRails
[08:17:34] artto_: has joined #RubyOnRails
[08:19:17] strcmp1: validates_length_of ?
[08:20:37] intinig: has joined #RubyOnRails
[08:24:14] dtcristo: has joined #RubyOnRails
[08:24:48] axl_: has joined #RubyOnRails
[08:25:01] julienk: has joined #RubyOnRails
[08:25:14] joaomdmoura: has joined #RubyOnRails
[08:28:13] nickenchuggets: has joined #RubyOnRails
[08:28:13] nickenchuggets: has joined #RubyOnRails
[08:28:27] arup_r1: has joined #RubyOnRails
[08:28:36] jdayvie: has joined #RubyOnRails
[08:29:04] marr: has joined #RubyOnRails
[08:29:24] schaerli: has joined #RubyOnRails
[08:29:49] rugrat72: has joined #RubyOnRails
[08:30:28] Supertanker2: has joined #RubyOnRails
[08:30:32] Supertanker2: Question: should I put my little toy blog up on github when I develop it more and, you know, put in error handling?
[08:30:38] Supertanker2: I eventually do plan to run it as my blog instead of WP.
[08:30:50] Supertanker2: It seems like there'd be enough blog software out there though.
[08:33:26] Pupeno: has joined #RubyOnRails
[08:33:44] Pupeno: has joined #RubyOnRails
[08:36:02] livathinos: has joined #RubyOnRails
[08:36:03] matcouto: has joined #RubyOnRails
[08:38:31] x-light: has joined #RubyOnRails
[08:42:01] tvw: has joined #RubyOnRails
[08:45:57] krz: has joined #RubyOnRails
[08:46:33] schaerli: has joined #RubyOnRails
[08:48:23] srinidhi: has joined #RubyOnRails
[08:48:57] Trefex: has joined #RubyOnRails
[08:49:39] jenrzzz: has joined #RubyOnRails
[08:57:28] ur5us: has joined #RubyOnRails
[09:01:35] jhass: Supertanker2: if you're proud enough of it, sure. Keep in my your GH might also be looked at by future employers ;)
[09:02:53] waka: has joined #RubyOnRails
[09:03:27] posixpascal: has joined #RubyOnRails
[09:06:20] rugrat72: has joined #RubyOnRails
[09:06:43] blindMoe|2: has joined #RubyOnRails
[09:08:24] tjbiddle: has joined #RubyOnRails
[09:11:41] eGGsha: has joined #RubyOnRails
[09:14:29] lethjakman: has joined #RubyOnRails
[09:18:00] x-light: has joined #RubyOnRails
[09:18:32] yuuvee: has joined #RubyOnRails
[09:19:45] dtcristo: has joined #RubyOnRails
[09:20:42] Supertanker2: jhass, that was my thought, yes :D
[09:20:48] Supertanker2: I'll be sure to polish it up nice.
[09:21:14] GeissT: has joined #RubyOnRails
[09:23:12] wethu: has joined #RubyOnRails
[09:29:44] krz: has joined #RubyOnRails
[09:30:57] matcouto: has joined #RubyOnRails
[09:35:39] workmad3: has joined #RubyOnRails
[09:36:42] arup_r: has joined #RubyOnRails
[09:37:17] jdayvie: Hey - Would anyone have an idea as to why a search of mine (for locations) only works some of the time?
[09:37:58] schaerli: has joined #RubyOnRails
[09:39:18] icosa1: has joined #RubyOnRails
[09:40:57] eGGsha: has joined #RubyOnRails
[09:43:55] sevenseacat: has joined #RubyOnRails
[09:44:24] stamina: has joined #RubyOnRails
[09:50:21] simplyianm: has joined #RubyOnRails
[09:55:14] elaptics: jdayvie: not without some code and what you mean by some of the time
[09:55:47] fgo: has joined #RubyOnRails
[09:56:04] workmad3_: has joined #RubyOnRails
[09:56:21] srinidhi: has joined #RubyOnRails
[09:56:38] bruno-: has joined #RubyOnRails
[09:58:46] jdayvie: elaptics: I don't know if this would be enough: https://gist.github.com/Jdayvie/e68e782b70788df74263
[09:59:13] jdayvie: So for example, if I type in Oregon to search those who live in that state, only one user appears when two should.
[09:59:42] jdayvie: Then if I type NV (for nevada), it works correctly. Though if I type OR (for Oregon), it does not appear with any results, when it should.
[10:00:10] Deck`: has joined #RubyOnRails
[10:00:17] jdayvie: I am confused if I have an issue with the search code or if there is an issue with geocode gem. I have a second search setup (general search) and it works correctly.
[10:00:25] elaptics: jdayvie: what is the near method doing?
[10:00:38] timharding: has joined #RubyOnRails
[10:00:45] jdayvie: It shows users near 200m of the area searched.
[10:00:58] jdayvie: I was messing with that too thinking it needed to be .search instead.
[10:00:59] elaptics: jdayvie: this is a method you have written or are you using some gem?
[10:01:13] jdayvie: the .near method is with a gem.
[10:01:38] tuelz: has joined #RubyOnRails
[10:02:13] elaptics: then there's not much you can do - you should raise an issue with the gem maintainer if the results are inconsistent assuming that you're doing things according to what the gem tells you
[10:02:13] timharding: Hi, I'm using ActiveJob in 4.2 and I want to set(wait: 20.minutes).preform_later. That works fine but in RAILS_ENV=test it fails because I'm not using a queuing backend for my tests. How is it suggested that one configures a queue in test?
[10:02:45] jdayvie: Hmm...okay, I appreciate it.
[10:02:51] elaptics: jdayvie: btw your gist line 4 is pointless
[10:03:10] elaptics: jdayvie: you're doing a query that you're immediately discarding
[10:03:21] jdayvie: Oh, yes, duh. Makes sense, thank you =)
[10:05:42] bricker: has joined #RubyOnRails
[10:05:47] Grundell: has joined #RubyOnRails
[10:06:30] dionysus69: has joined #RubyOnRails
[10:15:14] CheckYourSix: has joined #RubyOnRails
[10:20:42] mrbubbles: has joined #RubyOnRails
[10:20:48] mrbubbles: Good morning
[10:22:05] mrbubbles: I???ve a quick question about composed methods. I understand that you want to break down your classes into methods which each do a single thing, and with one level of abstraction. But, should each method do something to the class state (i.e. to an instance variable) or is it better to treat each method as a black box which accepts an input and then returns a value (with one ???main??? method chaining the methods
[10:25:50] ArchRogem: has joined #RubyOnRails
[10:28:54] wethu: has joined #RubyOnRails
[10:30:57] alex88: has joined #RubyOnRails
[10:30:57] alex88: has joined #RubyOnRails
[10:32:49] Detch: has joined #RubyOnRails
[10:32:59] schaerli: has joined #RubyOnRails
[10:33:33] max_v: has joined #RubyOnRails
[10:34:31] htmldrum: has joined #RubyOnRails
[10:35:24] mrbubbles: has joined #RubyOnRails
[10:35:37] mrbubbles: If that made any sense 0
[10:36:02] timharding: mrbubbles: it's fine for methods on an object to change the object's state.
[10:36:34] mrbubbles: I guess I always though that a method should have a single input/output
[10:36:53] mrbubbles: But I guess that as they???re only called internally it doesn???t matter
[10:37:24] timharding: So long as the methods only change the state of the object they belong to.
[10:37:42] mrbubbles: Cool, got you
[10:38:34] timharding: And object is state and behaviour together.
[10:41:14] ni291187: has joined #RubyOnRails
[10:41:35] givanse: has joined #RubyOnRails
[10:43:14] mrbubbles: Not sure where I got that black-box method idea from
[10:43:48] bonhoeffer: has joined #RubyOnRails
[10:44:18] workmad3: mrbubbles: sounds almost like pure functional programming
[10:44:23] mrbubbles: Any recommdned books on OOP in Ruby? I should probaby brush up...
[10:44:46] timharding: From outside the object it should appear to be a black box. If I'm calling a method then I don't want to / shouldn't know how it does things internally.
[10:45:01] timharding: But within the object you're fine.
[10:45:06] Hates_: mrbubbles: Practical Object-Oriented Design in Ruby and Refactoring: Ruby Edition are good
[10:45:14] mrbubbles: Perfect thanks guys
[10:48:21] granthatcher: has joined #RubyOnRails
[10:49:04] granthatcher: has joined #RubyOnRails
[10:52:16] eGGsha: has joined #RubyOnRails
[10:52:26] granthatcher: has left #RubyOnRails: ()
[10:53:02] Lightsword: has joined #RubyOnRails
[10:57:53] sp1rs: has joined #RubyOnRails
[10:59:00] arup_r: Account and Event model has N to N relationships though :account_events, account_events table has a field 'status' .. I am trying to create a has_many assoc called pending_events inside the model Account.. But not able to make it work.. hints please
[10:59:48] Oog: has joined #RubyOnRails
[11:00:33] Oog: https://gist.github.com/anonymous/2cb12dea54144f83cd8f causes in db/schema.rb add_index "user_addresses", ["user_id"], name: "index_user_addresses_on_user_name_lower", unique: true, using: :btree which is incorrect
[11:00:42] Oog: does the add_index in schema.rb matter?
[11:01:03] timharding: arup_r: build it up through a has_any :account_events scoped on the status field == pending
[11:01:28] mrbubbles: has joined #RubyOnRails
[11:01:28] timharding: arup_r: then I guess you can add a has_many :through on top of that.
[11:01:42] arup_r: That I have.. Need to crerate another has_many for pending events
[11:01:59] arup_r: Ohh! I think I didn't get you.,.
[11:02:07] arup_r: should I show you what I have ?
[11:02:11] timharding: arup_r: yeah, you need a new has_many with a scope.
[11:02:20] mostlybadfly: has joined #RubyOnRails
[11:02:26] timharding: arup_r: on Account.
[11:02:37] timharding: arup_r: no, I'm not going to have time to look at code.
[11:02:42] htmldrum: has joined #RubyOnRails
[11:03:18] michael_mbp: anyone familar with thinkingsphinx?
[11:03:46] lethjakman: has joined #RubyOnRails
[11:05:16] Oog: i cant believe rails is parsing custom sql
[11:05:38] rubyonrails084: has joined #RubyOnRails
[11:06:51] Madman_man: has joined #RubyOnRails
[11:07:47] marahin: has joined #RubyOnRails
[11:08:12] Lightsword: has joined #RubyOnRails
[11:08:44] marahin: Hey guys! I have a "Quote" model which has pluses and minuses (both integer values). I want to sort @quotes = Quote.all by (pluses-minuses), descending. How do I do that?
[11:09:34] marahin: @quotes.sort_by{ |quote| (quote.pluses-quote.minuses) } is what I thought about, but not sure if it's the correct way
[11:09:52] bmalum: has joined #RubyOnRails
[11:11:16] Madman_man: Can I get some advice for a struggling novice
[11:11:25] Madman_man: my questions should be simple to answer
[11:11:28] bruno-: has joined #RubyOnRails
[11:11:28] rvanlieshout: Madman_man: .order('pluses - minuses')
[11:11:35] timharding: marahin: reading this http://guides.rubyonrails.org/active_record_querying.html would be worthwhile. You want to Quote.all.order('pluses - minuses desc')
[11:11:45] Hates_: Madman_man: yup, just ask :)
[11:11:52] timharding: marahin: you can let your database do the maths for you on the ordering.
[11:12:44] FCser: has joined #RubyOnRails
[11:12:50] Madman_man: Sorry haven't used IRc yet
[11:13:12] marahin: timharding: thank you very much! I'm aware of that, though I'm worst with SQL, wouldn't like to touch that :P
[11:13:24] Oog: this spurious add_index is ap roblem
[11:13:30] Oog: wtf rails
[11:13:41] timharding: marahin: if you're scared to learn new things then there is no hope for you.
[11:13:47] arup_r: I tried has_many :pending_events, -> { where(status: 'pending') }, through: :account_events, source: :event .. but not working as I am doing it correct way.. What is the correct way then..
[11:14:11] arup_r: giving error PG::UndefinedColumn: ERROR: column events.status does not exist
[11:14:13] Madman_man: Anyway the point is I seem to have constant issues adding models with multiple variables. No matter how I do it I get migration errors
[11:14:14] Oog: its actually creating the messed up index
[11:14:15] marahin: timharding: good one. I'm not, just if I don't know something, it's difficult to use it :P
[11:14:24] rvanlieshout: arup_r: an event doesn't have a status column...
[11:14:28] marahin: I rather like to experiment before I implement.
[11:14:34] Hates_: Madman_man: where error do you get?
[11:14:52] arup_r: yes.. source: should through model name..
[11:14:53] Madman_man: I seem to be making a mistake without realising
[11:15:07] Madman_man: I will generate a scaffold
[11:15:28] Madman_man: my most recent attempt I tried this
[11:15:38] arup_r: status is the column of account_event model
[11:15:42] Madman_man: rails g migration AddToOrders
[11:15:52] Madman_man: I edit the migration file
[11:15:56] rvanlieshout: arup_r: where(account_events: { status: 'pending' })
[11:15:58] Madman_man: add some strings
[11:16:28] Oog: how is schema.rb generated
[11:16:33] Madman_man: My main issue now was that the controller had not be set up.
[11:16:44] Madman_man: so when I test the model and views
[11:16:51] Madman_man: and try an add a record
[11:17:09] Madman_man: I just see a window with Add Order and no form to fill in
[11:17:30] timharding: marahin: when you say .order('pluses - minuses desc') you're telling the database to subtract the minuses column from the pluses column and then order by the result descending. That is SQL.
[11:17:36] Madman_man: What's the most simple way to add a table, with say 5 variables and have the scaffold generate all views and controllers
[11:17:55] marahin: timharding: yeah, I know.
[11:18:01] rvanlieshout: Hates_: simples: don't use scaffold?
[11:18:04] rvanlieshout: generate a model
[11:18:13] rvanlieshout: or only a migration even
[11:18:15] Madman_man: My biggest problem seems to be just setting up all the models
[11:18:30] arup_r: thanks rvanlieshout
[11:18:48] Madman_man: every tutorial seems to do it differently
[11:18:55] timharding: has left #RubyOnRails: ("Ciao!")
[11:19:16] Madman_man: what would you say was the most practical way of building models
[11:19:27] Madman_man: terminal? Migrations?
[11:19:27] rvanlieshout: Madman_man: rails generate model
[11:19:38] rvanlieshout: you'll need a migration for the db table
[11:20:55] Madman_man: but then I run into migration problems when adding variables
[11:22:12] rvanlieshout: what have you tried?
[11:22:44] bix: has joined #RubyOnRails
[11:24:16] Madman_man: I made a spreadsheet of all my planned variables
[11:24:34] helpa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[11:24:39] Madman_man: first run I used rails g model Orders with variables appended
[11:25:01] Madman_man: then i had problems editing my models
[11:25:14] Madman_man: removing variables or changing datatypes
[11:25:51] Madman_man: My real question is why do I seem to trip up on the first hurdle everytime
[11:25:56] Madman_man: Im so eager to learn
[11:26:04] Madman_man: and Im competent in rails
[11:26:08] rvanlieshout: show us your code
[11:26:10] Madman_man: in terms of code
[11:26:29] Madman_man: it just seems overly tricky to build tables with variables
[11:26:52] Madman_man: hang on i'll add it to my github
[11:27:54] Madman_man: look Im not going to waste ya time, Im gonna go through a tutorial and come back another time if it fails again
[11:28:00] Madman_man: thanks anyway for your help
[11:28:13] rvanlieshout: but it's not really a big thing
[11:28:25] rvanlieshout: we just need to see the code
[11:28:30] rvanlieshout: to really understand what you've done
[11:28:32] Madman_man: It feels like im tripping up on something basic but I can't see what it is im gettin wrong
[11:28:32] ni291187: has joined #RubyOnRails
[11:29:42] rvanlieshout: it most likely is
[11:29:55] Hates_: Madman_man: we're here to help, just show your migration and we can help you get over the initial hurdles :|)
[11:30:39] kp666: has joined #RubyOnRails
[11:32:22] Shidash: has joined #RubyOnRails
[11:32:37] Madman_man: Listen I can't get it on github quite yet
[11:32:48] rvanlieshout: we only need fragments
[11:32:49] Madman_man: but if it's ok im gonna dump 4-5 lines here
[11:32:50] rvanlieshout: just the migration file
[11:32:56] Madman_man: create_table :orders do |t| t.string :orderNumber t.string :purchaseOrderNumber t.string :reference t.string :invoiceNumber t.date :targetDate t.date :bookedDate t.date :completionDate t.timestamps null: false
[11:33:02] helpa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[11:33:17] Madman_man: this was my first Migration
[11:33:23] Madman_man: called CreateOrders
[11:34:16] tjbiddle: has joined #RubyOnRails
[11:35:00] Madman_man: I Cut out the standard syntax
[11:35:27] rvanlieshout: i've really got no clue about what you have or what you're exactly trying to do
[11:35:54] Madman_man: as far as I understand creating databases
[11:36:05] rvanlieshout: and that's an issue?
[11:36:07] Madman_man: you create tables with variables to sort data
[11:36:16] rvanlieshout: what is 'variables'
[11:36:20] rvanlieshout: and 'sort data'
[11:36:27] exadeci: has joined #RubyOnRails
[11:36:51] Madman_man: Variables is how I was taught. But basically columns
[11:37:14] rvanlieshout: so just a table with some columns
[11:37:29] Madman_man: when I rake db:migrate
[11:37:43] Madman_man: I run into issues with conflicts
[11:37:50] Madman_man: it's seems so random
[11:37:53] rvanlieshout: show the error output
[11:38:07] Madman_man: and i can't get a clear picture of what each table exists
[11:38:35] doodlehaus: has joined #RubyOnRails
[11:39:26] Hates_: Madman_man: we need to know what the actual error you get in the console is
[11:39:26] rustymyers: has joined #RubyOnRails
[11:39:44] rvanlieshout: and are you trying to create a table that already exists?
[11:39:57] Madman_man: Let me clear this up
[11:40:26] Madman_man: I don't consider myself to be completely new to coding
[11:40:32] helpa: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[11:40:39] Madman_man: but as someone trying to learn ruby on rails
[11:41:19] rvanlieshout: and somebody who is giving really a lot of information
[11:41:21] Madman_man: I seem to run into continues problems building up my tables. Can anyone recommend the best way to do this. with multiple columns
[11:41:25] rvanlieshout: without the single thing of information we need
[11:41:30] rvanlieshout: the error itself
[11:41:55] ldnunes: has joined #RubyOnRails
[11:41:59] Madman_man: The error is unspecific because Im running into many different ones
[11:42:09] Madman_man: my point is really what is the recommended way
[11:42:10] Hates_: Madman_man: so lets just fix the first one you get
[11:42:24] rvanlieshout: Madman_man: read the guides for the recommended way
[11:42:29] rvanlieshout: it's quite similar to your migration
[11:42:36] Madman_man: I get what your saying but the point is I deleted my last attempt and just started again
[11:42:43] rvanlieshout: then start with that
[11:42:55] schaerli: has joined #RubyOnRails
[11:43:08] Madman_man: So should I go with a migration file and then I can rollback if problems occur
[11:43:10] silverdust: Hi. I have a application.rb that looks like this https://gist.github.com/bl4ckdu5t/2fdb8026f3d298484688 as I'm using devise and want to take users that tried accessing an authenticated page back to the page after being prompted to log in before continuing
[11:43:15] Hates_: Madman_man: for all we know you've got the database in a muddle with previous migrations
[11:43:19] rvanlieshout: Madman_man: you don't have to rollback if the migration fails
[11:43:34] Madman_man: no I i want to undo one. Right?
[11:43:37] pwnz0r: has joined #RubyOnRails
[11:43:42] rvanlieshout: i've really got no idea
[11:43:45] Scripore: has joined #RubyOnRails
[11:43:46] Madman_man: im sorry to be confusing
[11:44:05] fgo: has joined #RubyOnRails
[11:44:13] Hates_: Madman_man: it would a lot easier if you just showed us the error message you get when you try and run the migration :)
[11:44:14] Madman_man: let me ask one new question
[11:44:22] silverdust: I've gone ahead to try to see what the request.referer is and for the regular cases of users coming from the home page (root_url), the request.referer on production is http://localhost:3000/ as expected
[11:44:27] Madman_man: forget my previous one
[11:44:35] Madman_man: My question is this.
[11:44:36] rvanlieshout: what previous one?
[11:44:51] sankaber: has joined #RubyOnRails
[11:45:07] rvanlieshout: silverdust: you cannot trust the referer for that one
[11:45:16] rvanlieshout: they could be on that sign in page for several attempts
[11:45:18] Madman_man: Is it just me , or is there a steep learning curve with rails or am I a retard
[11:45:22] silverdust: but when user is redirected to log in page from an access regulated page the request.referer is blank
[11:45:24] rvanlieshout: so you might just want to add a hidden field or store it in the session for a sec
[11:45:43] rvanlieshout: Madman_man: there is
[11:45:57] silverdust: but here's what I discovered from inspecting the request hash. There's a user_return_to which has the url I want
[11:46:09] Hates_: Madman_man: TBH if you follow the getting start, then it's relatively simple, once you start getting into the meat of models and routes it gets difficult fast.
[11:46:09] rvanlieshout: silverdust: session[:user_return_to] ?
[11:46:10] Madman_man: It's crushing my moral
[11:46:21] silverdust: but I couldn't acces request.user_return_to
[11:46:26] silverdust: oh it's in the session
[11:46:35] silverdust: I'll try to see that
[11:46:39] rvanlieshout: silverdust: that's an assumption though
[11:46:43] Madman_man: anyway thanks, I'm gonna dig my heels in and fix this
[11:46:49] Hates_: Madman_man: start with a fresh database and follow the official getting started :)
[11:47:00] Madman_man: thanks mate :)
[11:47:01] silverdust: cool. Thanks rvanlieshout you just saved my life
[11:47:56] arup_r: o ys silverdust:
[11:49:32] axl__: has joined #RubyOnRails
[11:49:36] diegoviola: has joined #RubyOnRails
[11:52:33] crunk_bear: has joined #RubyOnRails
[11:57:37] schaerli: has joined #RubyOnRails
[11:58:52] nettoweb: has joined #RubyOnRails
[11:59:02] Papierkorb: has joined #RubyOnRails
[11:59:19] centrx: has joined #RubyOnRails
[11:59:38] griffindy: has joined #RubyOnRails
[12:01:16] yuuvee: has joined #RubyOnRails
[12:02:24] tuelz: has joined #RubyOnRails
[12:03:20] Creeves: has joined #RubyOnRails
[12:03:29] marahin: has left #RubyOnRails: ("Leaving...")
[12:04:16] lethjakman: has joined #RubyOnRails
[12:05:23] mary5030: has joined #RubyOnRails
[12:05:54] eGGsha: has joined #RubyOnRails
[12:08:19] timonv_: has joined #RubyOnRails
[12:08:27] Spami: has joined #RubyOnRails
[12:08:53] crunk_bear: has joined #RubyOnRails
[12:09:59] bonhoeffer: has joined #RubyOnRails
[12:11:58] shyshy: has joined #RubyOnRails
[12:12:28] allcentury: has joined #RubyOnRails
[12:13:33] eoy: has joined #RubyOnRails
[12:14:04] vigasdeep: has joined #RubyOnRails
[12:14:10] julienk: has joined #RubyOnRails
[12:15:16] DEA7TH_: has joined #RubyOnRails
[12:15:57] victortyau: has joined #RubyOnRails
[12:16:09] noodman: has joined #RubyOnRails
[12:17:55] Lightsword: has joined #RubyOnRails
[12:21:39] schaerli: has joined #RubyOnRails
[12:22:26] juanpaucar: has joined #RubyOnRails
[12:22:28] sp1rs: has joined #RubyOnRails
[12:23:21] minver: has joined #RubyOnRails
[12:23:55] minver: Can I use counter_cache on a HABTM relation in Rails 4?
[12:25:59] centrx: has joined #RubyOnRails
[12:26:41] wethu: has joined #RubyOnRails
[12:27:07] nickenchuggets: has joined #RubyOnRails
[12:27:41] christiandsg: has joined #RubyOnRails
[12:27:58] centrx: Hi I'm looking for help with Verizon's "More Everything" Plan?
[12:28:01] centrx: Can anyone explain this to me?
[12:28:07] mary5030: has joined #RubyOnRails
[12:29:00] centrx: That's what I was thinking
[12:29:49] centrx: slow day at the train factory
[12:34:01] helpa: has joined #RubyOnRails
[12:34:14] nya: has joined #RubyOnRails
[12:34:37] mrbubbles: has joined #RubyOnRails
[12:35:21] DoubleMalt: has joined #RubyOnRails
[12:35:36] Betray1st: has joined #RubyOnRails
[12:35:46] dhjondoh: has joined #RubyOnRails
[12:36:20] kkeuning: has joined #RubyOnRails
[12:37:20] krz: has joined #RubyOnRails
[12:38:05] kkeuning: has joined #RubyOnRails
[12:39:22] tuelz: has joined #RubyOnRails
[12:39:49] kkeuning: has joined #RubyOnRails
[12:41:20] rails663: has joined #RubyOnRails
[12:43:08] jamiely: has joined #RubyOnRails
[12:44:08] TheCuriousGuy: has joined #RubyOnRails
[12:44:38] cochise: has joined #RubyOnRails
[12:44:45] coffeeju1: has left #RubyOnRails: ()
[12:45:11] fgo: has joined #RubyOnRails
[12:45:12] TheCuriousGuy: I have this big problem
[12:45:32] TheCuriousGuy: I have always wanted to contribute to an open source project
[12:45:42] TheCuriousGuy: I have the time and energy
[12:45:57] TheCuriousGuy: but I don't know where to start and how!
[12:46:28] bruno-: has joined #RubyOnRails
[12:46:38] coffeejunk: has joined #RubyOnRails
[12:46:44] TheCuriousGuy: I am desperately looking for some advice
[12:47:16] centrx: One way is to start with software that you use already
[12:47:39] centrx: But there are tons of projects on github.com
[12:49:18] Papierkorb: expanding on the "what you already use", go to the issue tracker of those projects and try to fix something.
[12:49:25] TheCuriousGuy: centrx: I have heard that from several people, but my problem is with how should I start
[12:49:31] leslie: What should I include in rspec so I can use t instead of I18n.t? or is that a bad idea?
[12:50:22] christiandsg: has joined #RubyOnRails
[12:50:31] simplyianm: has joined #RubyOnRails
[12:56:46] centrx: TheCuriousGuy, Go to the issue tracker and look at the bug reports
[13:01:10] Rubie: has joined #RubyOnRails
[13:02:51] k4nd4lf: has joined #RubyOnRails
[13:05:03] lethjakman: has joined #RubyOnRails
[13:08:09] adegre: has joined #RubyOnRails
[13:09:26] bricker: has joined #RubyOnRails
[13:09:52] bungoman: has joined #RubyOnRails
[13:11:11] bmurt: has joined #RubyOnRails
[13:11:21] eGGsha: has joined #RubyOnRails
[13:12:08] annlewis: has joined #RubyOnRails
[13:12:25] michael_mbp: have you done much with Thinking Sphinx?
[13:12:38] zpe: has joined #RubyOnRails
[13:13:58] doodlehaus: has joined #RubyOnRails
[13:14:40] Pupeno: has joined #RubyOnRails
[13:14:40] Pupeno: has joined #RubyOnRails
[13:17:51] arup_r1: has joined #RubyOnRails
[13:19:05] Scripore: has joined #RubyOnRails
[13:19:06] jgpawletko: has joined #RubyOnRails
[13:20:16] mhib: has joined #RubyOnRails
[13:20:30] DEA7TH_: has joined #RubyOnRails
[13:20:33] chrise86: has joined #RubyOnRails
[13:22:35] ruurd: has joined #RubyOnRails
[13:23:55] bronson: has joined #RubyOnRails
[13:24:26] ruurd: has joined #RubyOnRails
[13:24:28] cochise: has joined #RubyOnRails
[13:25:21] schaerli_: has joined #RubyOnRails
[13:26:05] allcentury: has joined #RubyOnRails
[13:26:24] tuelz: has joined #RubyOnRails
[13:28:13] erich: has joined #RubyOnRails
[13:29:54] jkamenik: has joined #RubyOnRails
[13:31:44] Skizu: has joined #RubyOnRails
[13:32:42] Skizu: has joined #RubyOnRails
[13:32:42] Skizu: has joined #RubyOnRails
[13:32:54] Skizu: I'm looking to make an events log activity feed thing, basically an event will be fired and let people know. I want to have an inbox/activity feed and then remove items as their viewed/clicked. Not sure how I should structure this table and the data to be in the columns.
[13:33:10] jhass: has joined #RubyOnRails
[13:36:16] garrypolley: has joined #RubyOnRails
[13:36:23] diegorv: has joined #RubyOnRails
[13:39:35] mary5030: has joined #RubyOnRails
[13:39:47] nettoweb: has joined #RubyOnRails
[13:40:29] IFrank00: has joined #RubyOnRails
[13:43:48] arup_r: has joined #RubyOnRails
[13:44:58] JoshL: has joined #RubyOnRails
[13:46:18] fgo: has joined #RubyOnRails
[13:47:03] porkchicharon: has joined #RubyOnRails
[13:49:16] rikkipitt: has joined #RubyOnRails
[13:50:19] rikkipitt: hey guys, is memcachier still relevant in speeding up deploys to Heroku? I tried this and it actually made deploys slower - http://blog.alexmaccaw.com/faster-deploys
[13:50:48] rikkipitt: i can't find any up to date articles on the matter
[13:51:37] vigasdeep: has joined #RubyOnRails
[13:53:31] isjaylee: has joined #RubyOnRails
[13:55:46] paulcsmith: has joined #RubyOnRails
[13:56:15] isjaylee: has left #RubyOnRails: ()
[13:56:27] poli: has joined #RubyOnRails
[13:57:26] ni291187: has joined #RubyOnRails
[14:00:53] sarink: has joined #RubyOnRails
[14:03:51] timharding: has joined #RubyOnRails
[14:07:15] max_v: has joined #RubyOnRails
[14:10:36] tuelz: has joined #RubyOnRails
[14:11:46] anti-freeze: has joined #RubyOnRails
[14:13:42] ruurd: has joined #RubyOnRails
[14:13:43] csmb: has joined #RubyOnRails
[14:14:13] juanpaucar: has joined #RubyOnRails
[14:15:19] Palsson: has joined #RubyOnRails
[14:15:40] treehug88: has joined #RubyOnRails
[14:16:28] hoodow: has joined #RubyOnRails
[14:16:33] Palsson: has joined #RubyOnRails
[14:17:44] chouhoulis: has joined #RubyOnRails
[14:18:23] id3nt1t1_: has joined #RubyOnRails
[14:18:41] darrencauthon: has joined #RubyOnRails
[14:18:45] bruno-: has joined #RubyOnRails
[14:19:26] DEA7TH_: has joined #RubyOnRails
[14:22:10] dopie: has joined #RubyOnRails
[14:25:34] Scripore: has joined #RubyOnRails
[14:26:29] allcentury: has joined #RubyOnRails
[14:29:17] podman: has joined #RubyOnRails
[14:31:32] futilegames: has joined #RubyOnRails
[14:33:43] hashrocket: has joined #RubyOnRails
[14:33:44] terpo: has joined #RubyOnRails
[14:34:49] melter_: has joined #RubyOnRails
[14:35:01] drale2k: has joined #RubyOnRails
[14:35:06] annlewis_: has joined #RubyOnRails
[14:35:34] smathy: has joined #RubyOnRails
[14:35:37] nickenchuggets_: has joined #RubyOnRails
[14:35:40] pwnd_nfsw: has joined #RubyOnRails
[14:35:45] artto: has joined #RubyOnRails
[14:35:45] workmad3_: has joined #RubyOnRails
[14:35:48] brendan-: has joined #RubyOnRails
[14:35:56] jkamenik1: has joined #RubyOnRails
[14:36:11] schaerli: has joined #RubyOnRails
[14:37:10] chancancode_: has joined #RubyOnRails
[14:37:16] doodleha_: has joined #RubyOnRails
[14:37:19] SloggerKhan1: has joined #RubyOnRails
[14:37:30] alxndr_: has joined #RubyOnRails
[14:37:31] hosh__: has joined #RubyOnRails
[14:37:34] MiracleBlue_: has joined #RubyOnRails
[14:37:34] spastorino_: has joined #RubyOnRails
[14:37:42] danlucraft_: has joined #RubyOnRails
[14:37:44] ArTiSTiX_: has joined #RubyOnRails
[14:37:53] Killerkeksdose: has joined #RubyOnRails
[14:38:05] eggoez: has joined #RubyOnRails
[14:38:21] balr0g_: has joined #RubyOnRails
[14:38:24] crdpink2: has joined #RubyOnRails
[14:38:41] kumavis_: has joined #RubyOnRails
[14:39:03] hashrocket_: has joined #RubyOnRails
[14:39:14] fryguy9: has joined #RubyOnRails
[14:39:20] Grundell_: has joined #RubyOnRails
[14:39:27] disperso_: has joined #RubyOnRails
[14:39:31] jtdowney_: has joined #RubyOnRails
[14:39:33] ltd: has joined #RubyOnRails
[14:39:35] robotbrain_: has joined #RubyOnRails
[14:39:41] brandon: has joined #RubyOnRails
[14:39:41] ptierno_: has joined #RubyOnRails
[14:39:41] constantinexvi_: has joined #RubyOnRails
[14:39:43] exchgr`: has joined #RubyOnRails
[14:39:48] asdfoo_: has joined #RubyOnRails
[14:39:58] crankharder: has joined #RubyOnRails
[14:40:05] bratsche_: has joined #RubyOnRails
[14:40:12] bungoman: has joined #RubyOnRails
[14:40:16] Emily: has joined #RubyOnRails
[14:40:17] thoraxe_: has joined #RubyOnRails
[14:40:28] fumduq-: has joined #RubyOnRails
[14:40:28] xhoy: has joined #RubyOnRails
[14:40:35] vpnuser: has joined #RubyOnRails
[14:40:35] jpterry: has joined #RubyOnRails
[14:40:41] mcr-credil1: has joined #RubyOnRails
[14:40:59] Olipro_: has joined #RubyOnRails
[14:41:31] disgrntld: has joined #RubyOnRails
[14:41:46] swhitt_: has joined #RubyOnRails
[14:41:57] sk_keeper: has joined #RubyOnRails
[14:42:03] Voker57|2: has joined #RubyOnRails
[14:42:14] leslie: has joined #RubyOnRails
[14:42:14] Seich: has joined #RubyOnRails
[14:42:14] asi_: has joined #RubyOnRails
[14:42:14] epochwolf: has joined #RubyOnRails
[14:42:15] larissa: has joined #RubyOnRails
[14:42:15] urkle: has joined #RubyOnRails
[14:42:15] sfr^: has joined #RubyOnRails
[14:42:15] universa1: has joined #RubyOnRails
[14:42:15] DarkBushido: has joined #RubyOnRails
[14:42:15] markelite: has joined #RubyOnRails
[14:42:15] LBRapid: has joined #RubyOnRails
[14:42:15] drewdavis: has joined #RubyOnRails
[14:42:15] Elion: has joined #RubyOnRails
[14:42:15] FooBarWidget: has joined #RubyOnRails
[14:42:15] epochwolf: has joined #RubyOnRails
[14:42:18] leslie: has joined #RubyOnRails
[14:42:18] DarkBushido: has joined #RubyOnRails
[14:42:18] Elion: has joined #RubyOnRails
[14:42:18] markelite: has joined #RubyOnRails
[14:42:25] jalcine: has joined #RubyOnRails
[14:42:26] jxf: has joined #RubyOnRails
[14:42:33] george2: has joined #RubyOnRails
[14:42:48] ruurd: has joined #RubyOnRails
[14:42:53] davidcelis: has joined #RubyOnRails
[14:42:53] davidcelis: has joined #RubyOnRails
[14:42:58] DanKnox: has joined #RubyOnRails
[14:43:02] moneylotion: has joined #RubyOnRails
[14:43:07] ankhers: has joined #RubyOnRails
[14:43:08] corioliss: has joined #RubyOnRails
[14:43:09] heidar: has joined #RubyOnRails
[14:43:15] Scripore: has joined #RubyOnRails
[14:43:21] dustinm`: has joined #RubyOnRails
[14:43:32] Dfoolz: has joined #RubyOnRails
[14:43:34] zeitue: has joined #RubyOnRails
[14:44:08] feignt: has joined #RubyOnRails
[14:44:08] zz_timnovinger: has joined #RubyOnRails
[14:44:08] levifig: has joined #RubyOnRails
[14:44:35] djinni`: has joined #RubyOnRails
[14:44:38] terrellt: has joined #RubyOnRails
[14:44:39] zack6849: has joined #RubyOnRails
[14:44:39] zack6849: has joined #RubyOnRails
[14:44:39] aguynamedben: has joined #RubyOnRails
[14:44:47] AntiSpamMeta: has joined #RubyOnRails
[14:45:10] skarn: has joined #RubyOnRails
[14:45:25] avelldiroll: has joined #RubyOnRails
[14:45:39] mary5030: has joined #RubyOnRails
[14:46:53] p8m: has joined #RubyOnRails
[14:46:55] guillaume-rb: has joined #RubyOnRails
[14:47:08] danman: has joined #RubyOnRails
[14:47:15] bauruine: has joined #RubyOnRails
[14:48:13] diegoviola: do you use 'birthday' or what would you use as a field in your db for that?
[14:48:39] clamstar: has joined #RubyOnRails
[14:48:40] optikalmouse: has joined #RubyOnRails
[14:49:25] jkamenik: has joined #RubyOnRails
[14:49:45] elaptics: diegoviola: I'd use birth_date. If you were being totally rails-convention-y then arguably it should be birthed_on
[14:50:36] BaNzounet: Hey, is it a problem to do database call during a model validation? for example an user cannot like his own post? For this I'll have to write a customn validate right?
[14:50:51] dede: has joined #RubyOnRails
[14:51:42] chrise86: has left #RubyOnRails: ()
[14:51:53] PpPyg: has joined #RubyOnRails
[14:52:00] chouhoulis: has joined #RubyOnRails
[14:53:30] ElSif: BaNzounet: like `post.user != user`? (something here could probably be self in your actual code) should be fine i think. I don't think there is a validator hook for that situation, so you will need a custom one though (i think).
[14:53:37] strcmp1: BaNzounet, nope not a problem to do that, and yes sounds like a custom validation.
[14:53:50] ValicekB: has joined #RubyOnRails
[14:53:53] lethjakman: has joined #RubyOnRails
[14:54:46] optikalmouse: is there a nice guide for django users switching to rails?
[14:54:57] optikalmouse: I felt like I was struggling all weekend with the ORM differences
[14:55:03] rikkipitt: has left #RubyOnRails: ("Leaving...")
[14:55:06] rikkipitt: has joined #RubyOnRails
[14:58:11] Klumben: has joined #RubyOnRails
[14:58:14] bricker: has joined #RubyOnRails
[14:58:30] rikkipit1: has joined #RubyOnRails
[14:59:21] rikkipitt: has joined #RubyOnRails
[14:59:30] BaNzounet: ElSif: strcmp1: okay thank you :)
[14:59:43] mikecmpbll: has joined #RubyOnRails
[15:00:26] mcr-credil: has joined #RubyOnRails
[15:00:28] artto: has joined #RubyOnRails
[15:01:28] jkamenik: has joined #RubyOnRails
[15:02:15] schaerli: has joined #RubyOnRails
[15:04:54] dman777_alter: has joined #RubyOnRails
[15:05:41] KamalKaur: has joined #RubyOnRails
[15:06:00] nfk: has joined #RubyOnRails
[15:06:10] dman777_alter: respond_to do |format|; format.json { render :json => {foo: "hello there"}}; end. How come I get 406 Not acceptable format when I specified format.json?
[15:06:28] nettoweb_: has joined #RubyOnRails
[15:07:10] k4nd4lf: has joined #RubyOnRails
[15:10:18] julienk: has joined #RubyOnRails
[15:10:25] dman777_alter: Do I need to restart 'bundle exec rails server' every time I modify a conrtoller?
[15:10:27] charliesome: has joined #RubyOnRails
[15:11:53] Palsson: has joined #RubyOnRails
[15:12:22] Scripore: has joined #RubyOnRails
[15:12:51] optikalmouse: dman777_alter: shouldn???t have to AFAIK
[15:13:37] eGGsha: has joined #RubyOnRails
[15:17:40] simplyianm: has joined #RubyOnRails
[15:19:47] yardenbar: has joined #RubyOnRails
[15:21:04] lindii_: has joined #RubyOnRails
[15:21:53] s2013: has joined #RubyOnRails
[15:24:49] chouhoulis: has joined #RubyOnRails
[15:27:17] nickenchuggets: has joined #RubyOnRails
[15:27:17] nickenchuggets: has joined #RubyOnRails
[15:28:16] darrencauthon: has joined #RubyOnRails
[15:28:39] wydont: has joined #RubyOnRails
[15:28:49] Maletor: has joined #RubyOnRails
[15:33:29] dman777_alter: http://dpaste.com/0ZP7NDN would there be anything wrong with this that would be causing a http error 406 Not Acceptable?
[15:33:31] Papierkorb: dman777_alter: usually not, no. Only place where you have to restart anyway is changing anything in config/ or removing/adding/updating gems.
[15:33:52] riotjones: has joined #RubyOnRails
[15:33:59] sarink: has joined #RubyOnRails
[15:34:12] zorak8: has joined #RubyOnRails
[15:34:39] nerdsville: has joined #RubyOnRails
[15:35:00] Casty: has joined #RubyOnRails
[15:35:02] LudicrousMango: has joined #RubyOnRails
[15:35:02] garrypolley: has joined #RubyOnRails
[15:35:19] nerdsville: Hello, I made a rather horrifying discovery, why in the world does rails expect to handle all FK relationships implicitly, I don't like the idea of the DB not knowing about the foreign keys
[15:35:56] Papierkorb: nerdsville: nothing is stopping you from defining FKs in the migrations
[15:36:03] Papierkorb: Source: I do that all the time.
[15:36:04] nerdsville: How do you do that
[15:36:21] jschoolcraft: has joined #RubyOnRails
[15:36:27] nerdsville: I am having trouble finding resources on how to do that
[15:36:33] Papierkorb: e.g. t.foreign_key :galleries
[15:36:43] nerdsville: oh, it's that easy lol?
[15:36:52] nerdsville: let me try :P
[15:37:50] cnk: has joined #RubyOnRails
[15:38:13] optikalmouse: ^ is there a tutorial on that? :o that???s exactly what I was having trouble with when moving from django to rails :S
[15:39:35] cnk: optikalmouse: just joining - what do you need?
[15:39:45] Papierkorb: nerdsville: the column name will end up being gallery_id. continue using has_one, belongs_to, etc. as usual
[15:40:00] nerdsville: yup works perfectly
[15:41:35] AzaToth_: has joined #RubyOnRails
[15:42:04] Papierkorb: optikalmouse: um I think I just googled around. I think it's a 'new' feature with Rails4.2 ??? I can't really recommend anything. I think I ended up reading the docs
[15:42:30] Scripore: has joined #RubyOnRails
[15:42:39] nerdsville: add_foreign_key :tableFrom, :tableTo
[15:42:57] jarr0dsz: has joined #RubyOnRails
[15:43:20] delsol_: has joined #RubyOnRails
[15:43:57] delsol_: Anyone have a couple minutes to answer a question or two on activerecord?
[15:44:13] gambl0re: has joined #RubyOnRails
[15:44:14] cnk: probably
[15:44:37] nerdsville: lol, I'd try if I could
[15:44:45] nerdsville: who knows I might be able to
[15:44:49] delsol_: I'm seeing a TON of identical queries in my mysql query log, sometimes the same exact query 10-15 times in a row....
[15:45:17] delsol_: or, often the same query with a different ID..... select * from table where all sorts of stuff AND id = 1
[15:45:24] delsol_: then the same query for ID 2, 3,4,5,6,7,8 etc
[15:45:28] nerdsville: hmm, maybe post the controller that causes this?
[15:45:48] nerdsville: there has to be a route that is being hit that creates the queries
[15:46:22] hutch78: has joined #RubyOnRails
[15:46:31] srinidhi: has joined #RubyOnRails
[15:46:59] baweaver: has joined #RubyOnRails
[15:47:01] bricker: has joined #RubyOnRails
[15:47:22] Rubie: has joined #RubyOnRails
[15:47:50] cnk: delsol: that is probalby the n+1 query problem
[15:48:06] nerdsville: yeah, malformed queries
[15:48:17] cnk: usually it is because in your view you accessed an associated model in a loop
[15:48:35] cnk: you need to alter the query to prefetch that info when you do the main query
[15:48:45] nerdsville: prefetch and store in instance variable
[15:48:50] nerdsville: refer to in view and loop over that
[15:48:58] delsol_: Any easy way to explain what I need to look for as a php/mysql guy thats not really a ruby guy?
[15:49:11] cnk: read this: http://guides.rubyonrails.org/active_record_querying.html#eager-loading-associations
[15:49:35] delsol_: I've read that 3-4 times.. it makes sense, but I still don't know what I'm looking for.
[15:49:45] delsol_: and its hard when you're not the guy that wrote the code
[15:49:53] nerdsville: cnk: would that work what I am mentioning?
[15:50:00] nerdsville: @user = User.all
[15:50:06] nerdsville: and then refer to that in view
[15:50:08] cochise: has joined #RubyOnRails
[15:50:10] cnk: not if it is the assocaition
[15:50:24] cnk: and you really don't want to create objects for every user
[15:50:36] cnk: you want the databasae to do the heavy lifting where possible
[15:50:40] pixelhandler: has joined #RubyOnRails
[15:50:44] delsol_: so do I need to be looking in the controller, or the model?
[15:50:57] cnk: delsol: the logs that show the queries will tell you what action is doing this
[15:51:05] cnk: I would start in the view and then controller
[15:51:18] delsol_: don't really have a view..... no rails,
[15:51:26] delsol_: most of the view is in the controller in this case....
[15:52:17] ruurd: has joined #RubyOnRails
[15:52:24] delsol_: environment isn't ruby on rails... environment is ruby, active record, and rubyGTK
[15:52:28] cnk: OK. I am still betting that since you have a series of queries, you have a loop with a query in it
[15:52:29] cnk: look there
[15:52:43] KamalKaur: has joined #RubyOnRails
[15:54:24] nerdsville: cnk: so for references you have to query for all referencing model objects in two queries in the controller, and then you can loop the results in view right?
[15:54:40] nerdsville: I am new to rails so I am making sure I understand
[15:55:14] Guest54: has joined #RubyOnRails
[15:55:43] code1o6: has joined #RubyOnRails
[15:55:54] cnk: nerdsville: red the guide link I sent. If you use :includes, Rails will do the 2 queries for you and you can still say @thing.assoc.each in your view but Rails will already have a list of the thing.assoc so won't requery
[15:56:17] nerdsville: Oh so you don't need to do a join?
[15:56:31] cnk: includes does a join
[15:56:39] nerdsville: ok will read the guide, thanks :) you guys are helpful!
[15:56:45] cnk: read the guide it does a much better job than I can over IRC
[15:57:19] Guest6988: has joined #RubyOnRails
[15:57:29] LudicrousMango: has joined #RubyOnRails
[15:58:19] willywos: has joined #RubyOnRails
[15:58:24] gambl0re: has joined #RubyOnRails
[15:59:48] Guest6988: has joined #RubyOnRails
[16:00:02] _djbkd: has joined #RubyOnRails
[16:02:12] garrypolley: has joined #RubyOnRails
[16:03:04] optikalmouse: has joined #RubyOnRails
[16:03:10] garrypolley: has joined #RubyOnRails
[16:04:34] allcentury: has joined #RubyOnRails
[16:05:25] jkamenik: has joined #RubyOnRails
[16:09:34] fgo: has joined #RubyOnRails
[16:10:48] werelivinginthef: has joined #RubyOnRails
[16:11:06] dyulax: has joined #RubyOnRails
[16:11:45] Rubie: has joined #RubyOnRails
[16:12:01] crunk_bear: has joined #RubyOnRails
[16:12:07] bronson: has joined #RubyOnRails
[16:12:32] treehug88: has joined #RubyOnRails
[16:13:05] cac: has joined #RubyOnRails
[16:16:53] Lightsword: has joined #RubyOnRails
[16:17:30] dman777_alter: http://dpaste.com/0ZP7NDN would there be anything wrong with this that would be causing a http error 406 Not Acceptable? Do I need to specify JSON in the router?
[16:19:22] mikeric: has joined #RubyOnRails
[16:20:11] nahtnam: has joined #RubyOnRails
[16:20:39] nahtnam: If I have an object like this: `#<GameAchievement:0x000000055dda18>` How can I display all of the different properties in it?
[16:20:46] nahtnam: Im not sure if has name or not
[16:21:48] AugustoCesar: has joined #RubyOnRails
[16:21:58] jtperreault: nahtnam: obj.attributes
[16:22:18] jtperreault: nahtnam: you're welcome
[16:22:29] benlieb: has joined #RubyOnRails
[16:22:33] chinmay_dd: has joined #RubyOnRails
[16:23:08] nahtnam: jtperreault: I get this error: `undefined method `attributes' for #<GameAchievement:0x0000000566dfa0>`
[16:23:24] eggoez: has joined #RubyOnRails
[16:24:30] bungoman: has joined #RubyOnRails
[16:24:51] konsolebox: has joined #RubyOnRails
[16:25:37] nahtnam: .inspect worked
[16:26:27] IFrank00: has joined #RubyOnRails
[16:26:32] jtperreault: nahtnam: ahh, good. the attributes method comes from ActiveRecord::Base I believe. I made an assumption about GameAchievement there.
[16:26:33] crunk_bear: has joined #RubyOnRails
[16:27:18] optikalmouse: has left #RubyOnRails: ()
[16:27:27] chinmay_dd: has joined #RubyOnRails
[16:27:30] Scripore: has joined #RubyOnRails
[16:27:46] zpe: has joined #RubyOnRails
[16:27:48] codepete: has joined #RubyOnRails
[16:30:09] Maletor: has joined #RubyOnRails
[16:30:11] ruurd: has joined #RubyOnRails
[16:31:04] cac: has joined #RubyOnRails
[16:31:28] IFrank00: HI how do I know which database my Heroku rails app is using
[16:31:48] l0oky: has joined #RubyOnRails
[16:32:37] IFrank00: I have 2 databases the first was a Original and the second one is a Forked from the first
[16:32:51] charliesome: has joined #RubyOnRails
[16:33:27] IFrank00: on my database.yml file a change it to the the second DB
[16:34:03] IFrank00: but on heroku the primary DB it say is the first DB
[16:34:56] IFrank00: Is there any command that show me thet DB that the app is using for creating the records
[16:35:10] gambl0re: has joined #RubyOnRails
[16:35:47] chinmay_dd: has joined #RubyOnRails
[16:36:51] towski_: has joined #RubyOnRails
[16:37:18] Anakat: has joined #RubyOnRails
[16:40:04] Anakat_: has joined #RubyOnRails
[16:40:37] gambl0re: has joined #RubyOnRails
[16:41:55] Anakat__: has joined #RubyOnRails
[16:42:35] lethjakman: has joined #RubyOnRails
[16:43:37] Anakat: has joined #RubyOnRails
[16:44:03] garrypolley: has joined #RubyOnRails
[16:44:09] gambl0re: has joined #RubyOnRails
[16:44:11] Ludicrou_: has joined #RubyOnRails
[16:45:24] Anakat_: has joined #RubyOnRails
[16:45:24] timharding: has joined #RubyOnRails
[16:46:35] chinmay_dd: has joined #RubyOnRails
[16:46:53] dynomist: has joined #RubyOnRails
[16:47:15] Anakat__: has joined #RubyOnRails
[16:47:32] dynomist: How does one go about customizing the Exception pages that are shown in development? Like this one? http://asciicasts.com/system/photos/1437/original/E400I02.png
[16:47:38] arup_r: has joined #RubyOnRails
[16:47:56] paulcsmith: has joined #RubyOnRails
[16:48:05] cochise: has joined #RubyOnRails
[16:48:19] Hates_: dynomist: you dont normally
[16:48:28] dynomist: When I'm searching the web for "customize exception pages" I'm only seeing information about doing so for the production error pages
[16:48:30] Hates_: dynomist: what would you want to customise?
[16:48:47] dynomist: Hates_ I want to make the link to the file clickable so it would be easier to open in the editor
[16:49:00] Anakat: has joined #RubyOnRails
[16:49:05] garrypolley: has joined #RubyOnRails
[16:49:14] [H]unt3r: has joined #RubyOnRails
[16:50:22] cornerma1: has joined #RubyOnRails
[16:50:45] Anakat_: has joined #RubyOnRails
[16:50:46] jtperreault: dynomist: maybe check out the better_errors gem for some inspiration
[16:51:10] dynomist: nice - thanks jtperreault
[16:52:35] jtperreault: dynomist: you're welcome
[16:52:36] Anakat__: has joined #RubyOnRails
[16:54:29] Anakat: has joined #RubyOnRails
[16:54:55] thomasfedb: has joined #RubyOnRails
[16:54:55] thomasfedb: has joined #RubyOnRails
[16:55:09] Olipro: has joined #RubyOnRails
[16:55:26] Olipro_: has joined #RubyOnRails
[16:56:06] marcooliveira_: has joined #RubyOnRails
[16:56:18] Anakat_: has joined #RubyOnRails
[16:56:47] timdotrb: has joined #RubyOnRails
[17:00:11] poli_: has joined #RubyOnRails
[17:00:36] merryfett: has joined #RubyOnRails
[17:01:27] Anakat: has joined #RubyOnRails
[17:02:20] gambl0re: has joined #RubyOnRails
[17:02:51] garrypolley: has joined #RubyOnRails
[17:03:20] Anakat_: has joined #RubyOnRails
[17:04:26] hutch78: has joined #RubyOnRails
[17:04:55] silverdust: has joined #RubyOnRails
[17:05:03] simplyianm: has joined #RubyOnRails
[17:05:05] Anakat__: has joined #RubyOnRails
[17:05:50] delsol_: has joined #RubyOnRails
[17:06:47] mike___1234: has joined #RubyOnRails
[17:06:50] Anakat: has joined #RubyOnRails
[17:07:25] delsol_: :) Figured problem.
[17:07:53] delsol_: was re-loading all sorts of DB info for tooltip display text.
[17:08:01] delsol_: ACTION hangs his head.
[17:08:18] Anakat_: has joined #RubyOnRails
[17:08:25] Guest6988: has joined #RubyOnRails
[17:10:14] Anakat__: has joined #RubyOnRails
[17:10:37] gambl0re: has joined #RubyOnRails
[17:12:11] Anakat: has joined #RubyOnRails
[17:13:05] pedrosnk: has joined #RubyOnRails
[17:13:43] Anakat_: has joined #RubyOnRails
[17:13:57] bronson: has joined #RubyOnRails
[17:14:15] mikecmpbll: has joined #RubyOnRails
[17:14:47] jobewan: has joined #RubyOnRails
[17:15:39] Anakat__: has joined #RubyOnRails
[17:16:15] chinmay_dd: has joined #RubyOnRails
[17:16:45] Anakat: has joined #RubyOnRails
[17:18:23] DEA7TH_: has joined #RubyOnRails
[17:18:35] KamalKaur: has left #RubyOnRails: ()
[17:19:29] arup_r: I will create a N to N relationship between Property and Package using through: option.. Join table name will be PropertyPackage or PackageProperty ? I am bit confused
[17:20:02] arup_r: what's rails convention ?
[17:20:17] Anakat_: has joined #RubyOnRails
[17:21:34] towski_: has joined #RubyOnRails
[17:22:06] Anakat: has joined #RubyOnRails
[17:22:59] givanse_: has joined #RubyOnRails
[17:23:51] Anakat__: has joined #RubyOnRails
[17:24:50] erich: has joined #RubyOnRails
[17:24:54] Mendenhall: has joined #RubyOnRails
[17:25:26] momomomomo: has joined #RubyOnRails
[17:25:40] Anakat_: has joined #RubyOnRails
[17:25:41] alphaatom: has joined #RubyOnRails
[17:26:33] Hates_: arup_r: which ever rounds better
[17:26:49] ellisTAA: has joined #RubyOnRails
[17:26:57] simplyia_: has joined #RubyOnRails
[17:26:59] Hates_: that's how I normally do it
[17:27:24] Anakat: has joined #RubyOnRails
[17:27:28] arup_r: ok you mean it is upto me.. Rails don't care.. Thanks for confirming..
[17:27:32] smathy: arup_r, when you use `:through` you can name it whatever you like.
[17:28:14] ellisTAA: i???m trying to make a post api call to imgur to upload my photo. i???m still inexperienced with apis, so i was wondering if anyone could take a look at my api module and let me know if i???m missing anything https://api.imgur.com/endpoints/image ??? i don???t really understand the docs https://api.imgur.com/endpoints/image
[17:28:14] smathy: arup_r, only when you use habtm do you have to conform to the lexical ordering (which would be packages_properties)
[17:28:43] ellisTAA: oops, meant to paste this https://github.com/ellismarte/API-Flattr/blob/master/app/models/Imgur.rb
[17:28:46] kidoz: has joined #RubyOnRails
[17:29:11] Anakat__: has joined #RubyOnRails
[17:29:17] smathy: arup_r, you generally should name it something meaningful, like (I'm guessing what sort of packages you're dealing with here) maybe Delivery
[17:29:45] axl_: has joined #RubyOnRails
[17:29:52] arup_r: smathy, no it is hotel booking packages
[17:30:25] schaerli: has joined #RubyOnRails
[17:30:26] arup_r: there are packages and there are properties(hotels)
[17:30:53] cac: has joined #RubyOnRails
[17:31:01] smathy: arup_r, ah right, so maybe Deal ?
[17:31:05] smathy: arup_r, you get the idea.
[17:31:07] workmad3: arup_r: so the join table is probably a Booking (which also probably also joins in a User)
[17:31:13] Anakat_: has joined #RubyOnRails
[17:31:29] workmad3: could be a Deal too, I guess, depending on what exactly the join is doing
[17:32:04] user1138: has joined #RubyOnRails
[17:33:12] IFrank00: has joined #RubyOnRails
[17:33:32] arup_r: workmad3, I have a booking model already.. it is when you will book.. and what I am now going to define is to apply prices to the property season wise.. because join model will be having these fields - property_id, package_id, price, start_date, end_date
[17:34:03] arup_r: so smathy , I am thinking if Deal is proper or not... :)
[17:34:37] Anakat: has joined #RubyOnRails
[17:35:02] ellisTAA: has joined #RubyOnRails
[17:36:07] eGGsha: has joined #RubyOnRails
[17:36:23] Anakat_: has joined #RubyOnRails
[17:37:14] michael_mbp: has joined #RubyOnRails
[17:37:52] teadur: would it make sense to use activerecord for postgres db data migration ?
[17:38:06] teadur: currently the db has nothing todo with ror/ruby
[17:38:09] Anakat__: has joined #RubyOnRails
[17:38:25] teadur: it seems quite ideal for it, but i have feeling im missing smt
[17:39:11] tubbo: teadur: well, what exactly do you want to do? do you want to make classes and stuff?
[17:39:31] tubbo: if you're just looking to execute SQL commands, you could also just use the PG gem directly
[17:39:31] michael_mbp: has joined #RubyOnRails
[17:39:52] teadur: tubbo: i have on db with "old db structure" and new db with new structure, now i need to migrate the data from old db to new db
[17:39:53] bonhoeffer: has joined #RubyOnRails
[17:39:57] Rubie: has joined #RubyOnRails
[17:40:17] tubbo: i suppose you could
[17:40:20] teadur: last time i just wrote bunch of php/sql scripts for it, but it seems maybe activerecord could be better solution
[17:40:24] smathy: arup_r, yep, important takeaway is just to name it after what it's doing.
[17:40:29] tubbo: not sure if you can use two databases with one activerecord connection though
[17:40:37] toretore: has joined #RubyOnRails
[17:40:48] treehug88: teadur: yeah active record migrations are a decent way to do that - moduli tubbo's comment
[17:40:51] ellisTAA: has joined #RubyOnRails
[17:40:55] ellisTAA: ooo i got disconnected, did anyone respond to my question?
[17:41:02] tubbo: EllisTAA: no
[17:41:14] teadur: k ty everyone ill give it a try
[17:41:41] Anakat: has joined #RubyOnRails
[17:42:06] tubbo: EllisTAA: reading it though...what's the issue you're having with imgur?
[17:42:24] ellisTAA: i???m just not sure if itll work
[17:42:36] Hates_: EllisTAA: your POST params are wrong
[17:42:38] ellisTAA: the documentation doesn???t really say what to include, or if it does i don???t understand it
[17:42:49] ellisTAA: hates_ why is that
[17:43:11] Hates_: EllisTAA: you're passing the parameter base64, but there is no base64 parameter according to their API
[17:43:23] bricker: teadur: activerecord will make that easy. I've done it before. Just setup a simple program with a class for like, ArticleNewSchema and ArticleOldSchema, each pointing to their respective databases, then iterate. If you have millions of records there are some things you can do to optimize so it doesn't take hours to run.
[17:43:39] cac: has joined #RubyOnRails
[17:43:44] ellisTAA: ah yeah i guess that???s what i was wondering, what key do i assign my bass 64 to
[17:43:47] Anakat_: has joined #RubyOnRails
[17:44:04] Hates_: EllisTAA: it says in their API docs the parameter should be image
[17:44:14] _djbkd: has joined #RubyOnRails
[17:44:21] bonhoeffer: has joined #RubyOnRails
[17:44:23] ellisTAA: hates_: interesting ok ill try that
[17:44:23] Detch: has joined #RubyOnRails
[17:44:31] Hates_: EllisTAA: hopefully that works
[17:44:42] teadur: bricker: okey, thats what i was hope-ing for
[17:44:51] bricker: hope on, brother!
[17:45:23] _djbkd: has joined #RubyOnRails
[17:45:30] tubbo: oh yeah that'll do it :D
[17:47:00] bungoman: has joined #RubyOnRails
[17:47:18] Anakat: has joined #RubyOnRails
[17:48:00] bronson: has joined #RubyOnRails
[17:48:08] rickmasta: has joined #RubyOnRails
[17:50:38] Anakat_: has joined #RubyOnRails
[17:51:44] kazoo: has joined #RubyOnRails
[17:52:27] Anakat: has joined #RubyOnRails
[17:53:26] zpe: has joined #RubyOnRails
[17:54:15] Anakat__: has joined #RubyOnRails
[17:56:11] Anakat_: has joined #RubyOnRails
[17:57:40] musicnode: has joined #RubyOnRails
[17:57:49] Anakat: has joined #RubyOnRails
[17:58:32] axl_: has joined #RubyOnRails
[18:00:14] poli: has joined #RubyOnRails
[18:01:23] Anakat_: has joined #RubyOnRails
[18:01:29] alphaatom: has joined #RubyOnRails
[18:02:08] kidoz: has joined #RubyOnRails
[18:02:17] bungoman: has joined #RubyOnRails
[18:03:10] Anakat: has joined #RubyOnRails
[18:03:43] _djbkd: has joined #RubyOnRails
[18:04:16] erich: has joined #RubyOnRails
[18:04:50] noodman: has joined #RubyOnRails
[18:04:57] Anakat__: has joined #RubyOnRails
[18:06:47] Anakat_: has joined #RubyOnRails
[18:07:58] JoshL: has joined #RubyOnRails
[18:08:15] erichu: has joined #RubyOnRails
[18:08:19] Anakat: has joined #RubyOnRails
[18:08:22] mcr-credil: has joined #RubyOnRails
[18:09:24] sleungcy: has joined #RubyOnRails
[18:10:07] Anakat__: has joined #RubyOnRails
[18:10:11] sleungcy: I am using a gem called papertrail, and it implements the 'version' method. however my model also has an attribute with the same name 'version'.
[18:10:59] sleungcy: I am using double alias_method wrapper around the paper_trails' macro to preserve the .version attribute accessor
[18:11:14] sleungcy: Is there a better way to do that?
[18:11:31] jtdowney_: has left #RubyOnRails: ()
[18:11:52] Anakat_: has joined #RubyOnRails
[18:12:35] axl_: has joined #RubyOnRails
[18:12:39] jtdowney: has joined #RubyOnRails
[18:13:03] tenderlove: has joined #RubyOnRails
[18:13:40] Anakat: has joined #RubyOnRails
[18:14:24] Eminence_: has joined #RubyOnRails
[18:15:24] baweaver: has joined #RubyOnRails
[18:15:27] Anakat__: has joined #RubyOnRails
[18:16:13] bricker: sleungcy: If it were me I would rename the local version attribute
[18:17:09] Anakat_: has joined #RubyOnRails
[18:17:46] schaerli: has joined #RubyOnRails
[18:17:47] simplyianm: has joined #RubyOnRails
[18:18:56] Anakat: has joined #RubyOnRails
[18:19:50] bungoman: has joined #RubyOnRails
[18:19:50] momomomomo: has joined #RubyOnRails
[18:20:47] sleungcy: is there a way to dynamically un-declare a method?
[18:21:03] sleungcy: so any call to it goes back to method_missing?
[18:21:28] sleungcy: I am reluctant about renaming, because there are many references to this variable everywhere.
[18:21:55] DLSteve: has joined #RubyOnRails
[18:22:19] tbuehlmann: sleungcy, there are undef_method and remove_method: https://stackoverflow.com/questions/11894308/when-to-use-undef-method-and-when-to-use-remove-method
[18:22:29] Anakat_: has joined #RubyOnRails
[18:23:15] user1138: has joined #RubyOnRails
[18:23:16] nerdsville: cnk: are you there
[18:24:15] Anakat: has joined #RubyOnRails
[18:26:19] erich__: has joined #RubyOnRails
[18:27:47] Anakat_: has joined #RubyOnRails
[18:28:35] lethjakman: has joined #RubyOnRails
[18:29:43] riotjones: has joined #RubyOnRails
[18:29:49] Anakat: has joined #RubyOnRails
[18:30:20] dopie: has joined #RubyOnRails
[18:30:47] DoubleMalt: has joined #RubyOnRails
[18:31:25] Anakat__: has joined #RubyOnRails
[18:33:02] erich: has joined #RubyOnRails
[18:33:04] Anakat_: has joined #RubyOnRails
[18:33:13] doodlehaus: has joined #RubyOnRails
[18:34:24] smathy: sleungcy, read https://github.com/airblade/paper_trail#configuration - you can choose different names for the PaperTrail methods.
[18:36:10] ellisTAA: hey yall, i???m trying to make an api call to imgur, and the response i got back was authentication required, but it doesn???t say that on this page, https://api.imgur.com/endpoints/image ??? here is my code, would i just add Authorization: mykey to the query hash?
[18:36:12] ellisTAA: https://gist.github.com/ellismarte/1e5c9438427246516009
[18:36:36] Anakat: has joined #RubyOnRails
[18:36:46] symbol: has joined #RubyOnRails
[18:37:30] _djbkd: has joined #RubyOnRails
[18:37:31] schaerli: has joined #RubyOnRails
[18:38:25] Anakat_: has joined #RubyOnRails
[18:39:07] id3nt1t1: has joined #RubyOnRails
[18:39:56] broman: has joined #RubyOnRails
[18:40:17] Anakat__: has joined #RubyOnRails
[18:40:39] broman: Hi guys! I'm receiving a json through params.. how can i save them in my model? do i need to do a each to insert each of them individually?
[18:41:25] axl_: has joined #RubyOnRails
[18:42:02] Anakat: has joined #RubyOnRails
[18:42:29] l0oky: has joined #RubyOnRails
[18:42:41] alphaatom: has joined #RubyOnRails
[18:43:20] broman: i receive a json {"aproveitamentos":[{"ano":2015}, {"ano":2016}]} .. how can i insert both values to my model?
[18:43:29] ElSif: do the keys in the json match the attributes in your model?
[18:43:44] broman: ElSif, yes.. but theres more than one record..
[18:43:46] Anakat_: has joined #RubyOnRails
[18:44:33] erich: has joined #RubyOnRails
[18:44:34] nickenchuggets: has joined #RubyOnRails
[18:44:34] nickenchuggets: has joined #RubyOnRails
[18:45:34] Anakat__: has joined #RubyOnRails
[18:45:35] ElSif: hmmm, not sure if you can do them all at once, but you should be able to just pass each object in the json as a hash through to the creation statement for the model (.new or .create), though this will also depend on your data in the json not being anything too complicated
[18:45:50] bungoman: has joined #RubyOnRails
[18:45:57] ElSif: and the data will have to match the expected column data in your db
[18:46:57] ElSif: what kind of data is in the json?
[18:47:17] Anakat: has joined #RubyOnRails
[18:48:44] smathy: broman, is that JSON for creating new `aproveitamentos`?
[18:49:05] Anakat_: has joined #RubyOnRails
[18:49:10] broman: smathy, yes
[18:49:50] broman: ElSif, how do i pass each object separately?
[18:50:09] broman: ElSif, simple data like ints and strings
[18:50:16] ElSif: that depends somewhat on the json structure
[18:50:23] smathy: broman, create will take an array.
[18:50:57] Anakat__: has joined #RubyOnRails
[18:51:05] erich: has joined #RubyOnRails
[18:51:33] broman: smathy, so i just have to pass the json with the multi valuable data?
[18:51:44] ElSif: if it is a series of objects then it should convert to a hash or array pretty easily
[18:52:34] Anakat: has joined #RubyOnRails
[18:52:37] garrypolley: has joined #RubyOnRails
[18:52:42] broman: ElSif, how do i do that?
[18:53:43] ElSif: JSON.parse(your_json_string)
[18:54:25] Anakat_: has joined #RubyOnRails
[18:56:12] Anakat__: has joined #RubyOnRails
[18:56:40] ruurd: has joined #RubyOnRails
[18:56:55] zorak8: has joined #RubyOnRails
[18:57:15] meoblast001: has joined #RubyOnRails
[18:57:34] erich: has joined #RubyOnRails
[18:58:09] Anakat: has joined #RubyOnRails
[18:58:19] arBmind1: has joined #RubyOnRails
[18:59:06] vpnuser: has left #RubyOnRails: ()
[18:59:42] smathy: broman, Rails will do that for you assuming you're sending the Content-type: application/json header.
[18:59:42] Anakat_: has joined #RubyOnRails
[18:59:51] romdi: has joined #RubyOnRails
[19:00:58] carlosoliveira: has joined #RubyOnRails
[19:01:44] Anakat__: has joined #RubyOnRails
[19:01:54] erich: has joined #RubyOnRails
[19:01:58] timh: has joined #RubyOnRails
[19:02:01] ellisTAA: if i am just posting to my own imgur account it makes sense that i wouldn???t need to do oauth correct? or do i need to do oauth to post to my own imgur account?
[19:02:37] Papierkorb: EllisTAA: how should imgur know who you are?
[19:02:50] ellisTAA: with my client id?
[19:03:00] Papierkorb: And I'm santa claus
[19:03:03] Papierkorb: Do you believe me?
[19:03:18] ellisTAA: so i have to send over my secret too?
[19:03:21] Anakat: has joined #RubyOnRails
[19:03:45] Papierkorb: Not knowing their API, I'd guess: Yes, you have to do a normal OAuth request
[19:03:56] Papierkorb: *OAuth signed request
[19:04:28] hutch78: this is driving me nuts??? i know that this spree order can???t transition via ???next?????? but how do i find out why. Anyone familiar with Spree???s implementation of state_machine? or any idea how to debug this ?
[19:04:36] codepete: has joined #RubyOnRails
[19:05:12] Anakat_: has joined #RubyOnRails
[19:05:41] celestius: has joined #RubyOnRails
[19:05:46] ElSif: ooo spree!
[19:05:49] ElSif: what version?
[19:06:04] Papierkorb: Looks more like a bacteria splitting itself
[19:06:09] Papierkorb: like o O 8 oo
[19:06:18] bmalum: has joined #RubyOnRails
[19:06:21] lrocksmashtime1: has joined #RubyOnRails
[19:06:27] eGGsha: has joined #RubyOnRails
[19:06:50] Anakat__: has joined #RubyOnRails
[19:07:04] ElSif: i found that jumping into the spree gems with a hefty use of binding.pry was quite elucidating last time i was in that... fun place
[19:08:02] ElSif: often leading me to realize that they had some undocumented (or poorly documented) preference that loaded an additional step into the order validation state machine
[19:08:14] Rubie: has joined #RubyOnRails
[19:08:33] Anakat: has joined #RubyOnRails
[19:08:35] markalanevans: has joined #RubyOnRails
[19:08:37] kyrofa: has joined #RubyOnRails
[19:09:08] kyrofa: I have a question about Rails 4.2's actionmailer's integration with activejob
[19:10:03] jamesrward: has joined #RubyOnRails
[19:10:03] kyrofa: I'm trying to integrate it with sidekiq. I know the default queue name is "mailers." This works when I have one application on the server, but what do I do if I have multiple applications on the server?
[19:10:10] kyrofa: Just use a different queue name per application?
[19:10:19] Anakat_: has joined #RubyOnRails
[19:10:29] qejk: has joined #RubyOnRails
[19:11:15] kyrofa: I guess I just sort of assumed they'd be namespaced somehow in redis, but apparently that's not the case
[19:12:08] Anakat__: has joined #RubyOnRails
[19:13:20] smathy: kyrofa, yeah, just use different queues.
[19:13:44] kyrofa: smathy, is this (http://stackoverflow.com/questions/28245914/setting-a-default-queue-for-actionmailer-deliver-later) the standard way to do that?
[19:14:05] smathy: kyrofa, yes, read more here: http://guides.rubyonrails.org/active_job_basics.html#queues
[19:14:45] kyrofa: smathy, alright, thanks for the confirmation :)
[19:14:55] smathy: kyrofa, FWIW, I usually have a few queues per app (ie. not just one per app, but multiple within an app) so that functions of one part of my app are insulated against the queue becoming overloaded elsewhere in my app.
[19:15:20] smathy: kyrofa, mailers are a classic thing that I will split out, I don't want a user not getting an email because some backend processing queue is backed up.
[19:15:39] smathy: (although I generally use the same queue for all my emails)
[19:15:49] kyrofa: smathy, what do you mean by "split out?"
[19:15:58] kyrofa: smathy, in my case, the only async thing I have happening is emails
[19:15:59] smathy: kyrofa, split out into its own queue.
[19:16:04] smathy: Ok then, np.
[19:16:10] kyrofa: smathy, ah, okay, I'm with ya :)
[19:16:38] timh: has joined #RubyOnRails
[19:16:45] kyrofa: smathy, if I only have 1 sidekiq worker (remembering that I'm only sending emails), if that worker the queue will just build... right?
[19:17:02] kyrofa: smathy, if that worker *is busy*
[19:17:26] Anakat: has joined #RubyOnRails
[19:18:27] siemprefresco: has joined #RubyOnRails
[19:18:29] tim_h: has joined #RubyOnRails
[19:18:42] Mendenhall: has joined #RubyOnRails
[19:20:16] momomomomo: has joined #RubyOnRails
[19:20:38] smathy: Sure, but a worker is only busy during the execution of a given task.
[19:21:22] broman: undefined method `save' for #<Class:0x00000003852ae8> ... why am i getting this???
[19:22:14] dman777_alter: If I can do Devices.all().first() in the rails console, shouldn't I be able to do this in the controller? respond_to do |format|; format.json { render :json => {:devices => Devices.all().first() }}
[19:23:15] mcr-credil: has joined #RubyOnRails
[19:23:16] smathy: kyrofa, read more here: https://github.com/mperham/sidekiq/wiki/Advanced-Options
[19:23:38] smathy: broman, because you're calling `.save` on something that's not an ActiveRecord instance.
[19:23:59] VeryBewitching: has joined #RubyOnRails
[19:24:04] smathy: broman, based on what I know you're doing, you're probably calling .save on the return from your .create [array]
[19:24:15] chipotles: has joined #RubyOnRails
[19:24:35] yfeldblum: has joined #RubyOnRails
[19:24:53] chadwtaylor: has joined #RubyOnRails
[19:25:53] givanse_: has joined #RubyOnRails
[19:26:34] VeryBewitching: Does anyone who's used bootstrap-sass know of a JavaScript somewhere that will modify the viewport width and scale depending on screen width?
[19:26:40] dman777_alter: with mongoid, how would I show all in respond_to do |format|; format.json { render :json => {:devices => Device.all() }}?
[19:26:43] choke: has joined #RubyOnRails
[19:26:52] broman: smathy, actually i changed my strategy... and also im calling save from the model: class SimuladosAproveitamentos < ActiveRecord::Base
[19:27:09] broman: smathy, http://pastebin.com/aTXgCXtL
[19:27:28] bungoman: has joined #RubyOnRails
[19:27:34] helpa: broman: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[19:27:55] broman: smathy, http://pastie.org/10302923
[19:28:03] dman777_alter: Strange, Device.all() is significantly slower in the controller than in the rails console. Why is this since they are both the same orm and database?
[19:28:35] symbole: has joined #RubyOnRails
[19:28:48] smathy: broman, you're calling .save on the class.
[19:28:55] kies^: has joined #RubyOnRails
[19:29:00] smathy: broman, `save` isn't a class method.
[19:30:23] broman: what should i do to save the record in the model?
[19:30:59] crunk_bear: has joined #RubyOnRails
[19:31:00] cac: has joined #RubyOnRails
[19:31:02] bricker: broman: item.save
[19:31:12] jhack32: has joined #RubyOnRails
[19:31:21] baweaver: has joined #RubyOnRails
[19:31:35] Anakat: has joined #RubyOnRails
[19:31:39] broman: undefined method `save' for #<ActiveSupport::HashWithIndifferentAccess:0x00000008724f90>
[19:32:09] smathy: broman, seriously man, learn some rails please: http://guides.rubyonrails.org/getting_started.html You're all over the place.
[19:34:47] bricker: broman: yeah these are basic things, we can sit here and walk you through it but there are plenty of guides online that do that already
[19:35:27] kadoppe: has joined #RubyOnRails
[19:35:29] mike___1234: has joined #RubyOnRails
[19:36:15] tubbo: has left #RubyOnRails: ("outie 5000")
[19:36:18] tubbo: has joined #RubyOnRails
[19:37:02] lala: has joined #RubyOnRails
[19:37:11] Anakat: has joined #RubyOnRails
[19:38:47] Anakat_: has joined #RubyOnRails
[19:40:12] user1138: has joined #RubyOnRails
[19:40:49] Anakat__: has joined #RubyOnRails
[19:41:07] ruurd: has joined #RubyOnRails
[19:41:14] garrypolley: has joined #RubyOnRails
[19:44:02] timh: has joined #RubyOnRails
[19:44:19] SteenJobs: has joined #RubyOnRails
[19:44:19] Anakat: has joined #RubyOnRails
[19:44:29] werelivinginthef: has joined #RubyOnRails
[19:44:43] momomomomo_: has joined #RubyOnRails
[19:45:00] Axilla: has joined #RubyOnRails
[19:45:01] marr: has joined #RubyOnRails
[19:45:26] joedayvie: has joined #RubyOnRails
[19:46:17] Axilla: hi all, we're upgrading finally to rails 4(woop woop!) and we're moving to activejob instead of resque calls incase we ever want to switch..Wwe had all our jobs wrapped in a module so we could call them with a namespace like IRJob::JobName
[19:46:30] Axilla: is it possible, i can't seem to get it to work with activejob
[19:46:35] Ergo: has joined #RubyOnRails
[19:46:40] Axilla: i get a no method error for .perform_later
[19:47:37] Anakat_: has joined #RubyOnRails
[19:47:58] manfrin: has joined #RubyOnRails
[19:48:07] manfrin: Anyone here well versed in paperclip?
[19:48:20] manfrin: having a terrible time figuring out how to pass values to a paperclip postprocessor
[19:48:37] slash_nick: manfrin: gist your relevant code?
[19:49:15] manfrin: no code yet, just dont know how to pass attributes
[19:49:22] Anakat: has joined #RubyOnRails
[19:49:24] slash_nick: cant be done without code :)
[19:49:42] manfrin: has_attached_file :background_image,
[19:49:42] manfrin: path: ":class/:id/:attachment/:style.:extension",
[19:49:42] manfrin: processors: [:gift_card_design_rasterize]
[19:50:14] helpa: manfrin: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[19:50:19] manfrin: gift card design rasterize ihas a list of convert options
[19:50:25] nickenchuggets_: has joined #RubyOnRails
[19:50:25] manfrin: I'm not debugging anything
[19:50:31] manfrin: gist is pointless
[19:50:33] VeryBewitching: Please don't paste code in here.
[19:50:54] VeryBewitching: So you've defined Paperclip::GiftCardDesignRasterize ?
[19:51:20] manfrin: yes, and it passes convert options (imagemagick commands) to transformation_command
[19:51:31] manfrin: I want to conditionally add flags based on attributes of the original model
[19:51:48] manfrin: but I don't know how to access the original model in the postprocessor
[19:51:50] manfrin: or pass options
[19:52:57] Anakat_: has joined #RubyOnRails
[19:53:10] manfrin: nothing I've found sheds light on how to pass anything to a post processor, so the only solution I can think of is to make a postprocessor for every branch of options
[19:53:30] manfrin: I'm trying to composite an image with or without a logo, with or without a background, with or without a background color
[19:53:43] tubbo: manfrin: do you *have* to use paperclip?
[19:54:21] manfrin: no, but it was suggested to me since the backgrounds/logos are using paperclip; I thought about maybe using a gem to render/rasterize a view
[19:54:40] manfrin: but that would have to then interface with paperclip anyway
[19:54:49] slash_nick: manfrin: maybe this will be helpful... http://matthewhutchinson.net/2010/10/25/editing-file-uploads-with-a-paperclip-processor
[19:54:54] manfrin: (well maybe, or something to keep track of the image)
[19:54:58] Anakat: has joined #RubyOnRails
[19:55:09] allcentury: has joined #RubyOnRails
[19:55:26] tubbo: ahh i see how they want you to do it
[19:55:42] slash_nick: @attachment.instance ?
[19:55:59] netzfisch: has joined #RubyOnRails
[19:56:04] manfrin: I'll try that
[19:56:04] arBmind: has joined #RubyOnRails
[19:56:19] manfrin: did read that before slash_nick -- which is where the idea of conditionally calling different postprocessors came from
[19:56:22] VeryBewitching: It's a little inelegant, but whatever gets the job done :D
[19:56:26] bungoman: has joined #RubyOnRails
[19:56:37] Anakat__: has joined #RubyOnRails
[19:56:43] manfrin: yeah, its even more inelegant because to start all this, I'm using a 1x1 pixel as the 'original' image
[19:56:51] manfrin: then resizing/composing the images or colors on top
[19:57:09] manfrin: super hackish, if this doesnt work I'll probably nix using paperclip and just rasterize a view
[19:57:21] manfrin: this was a really poorly thought out feature :|
[19:57:25] VeryBewitching: Ideally it would be: :processors => [{:foo => { option_one: value } }]
[19:57:34] tubbo: manfrin: if you're just drawing stuff you might as well use cairo ;)
[19:57:55] uris: has joined #RubyOnRails
[19:57:59] manfrin: .google cairo
[19:58:17] Anakat_: has joined #RubyOnRails
[19:58:17] allcentury: having a strange issue with Rspec 2.14 -- running a test with just rspec spec/file_spec.rb makes the test pass but bundle exec rspec/file_spec.rb causes a failure. The issue is that with bundle exec it's loading a class from my app/workers instead of a class within the same namespace.
[19:58:40] tubbo: manfrin: it's not an image uploading lib, it's for drawing 2D content. you'll find it has a similar api to <canvas>
[19:59:39] jamesrward: Is there a way I can use an OR on a single line statement? I want to do something like check_authorization unless: :activeadmin_resource?||:devise_controller?
[20:00:38] tubbo: jamesrward: make a method called activeadmin_resource_or_devise_controller? that just returns `activeadmin_resource? || devise_controller?`, then call that in your `:unless`.
[20:00:52] tubbo: jamesrward: you can name the method whatever you want btw
[20:01:08] jamesrward: tubbo: Beautiful. thanks.
[20:01:35] SteenJobs: has joined #RubyOnRails
[20:01:46] kyrofa: has left #RubyOnRails: ("Leaving")
[20:01:54] Anakat: has joined #RubyOnRails
[20:02:31] michael_mbp: has joined #RubyOnRails
[20:03:41] baweaver: has joined #RubyOnRails
[20:04:14] uris: has joined #RubyOnRails
[20:05:25] Anakat_: has joined #RubyOnRails
[20:05:49] erichu: has joined #RubyOnRails
[20:07:13] smathy: manfrin, also the third arg to your Processor subclass's `make` method is an Attachment instance, this has an `.instance` method that returns the model instance.
[20:07:15] garrypolley: has joined #RubyOnRails
[20:08:33] drale2k: has joined #RubyOnRails
[20:08:40] lrocksmashtime1: has left #RubyOnRails: ()
[20:08:55] manfrin: danke smathy
[20:09:11] jarr0dsz: has joined #RubyOnRails
[20:09:22] jarr0dsz: has left #RubyOnRails: ()
[20:10:44] Anakat: has joined #RubyOnRails
[20:11:10] smathy: manfrin, you're welcome.
[20:12:30] Anakat_: has joined #RubyOnRails
[20:14:11] s2013: has joined #RubyOnRails
[20:14:16] Anakat__: has joined #RubyOnRails
[20:15:07] momomomomo: has joined #RubyOnRails
[20:15:09] pixelhandler: has joined #RubyOnRails
[20:15:21] Guest6988: has joined #RubyOnRails
[20:16:09] Anakat: has joined #RubyOnRails
[20:16:16] s2013: sup yall. anyone use best_in_place lately? for some reason the field updates but on the frontend, changes back to the old value.. so if someones name is john and i change it to james.. it will update to james but wont show that unless i refresh it.. format.json { respond_with_bip(@user) } <-- this is my response after the update action
[20:16:25] s2013: im probably missing some step
[20:16:50] werelivinginthef: has joined #RubyOnRails
[20:17:11] lethjakman: has joined #RubyOnRails
[20:17:21] netzfisch: has joined #RubyOnRails
[20:17:45] Anakat_: has joined #RubyOnRails
[20:17:54] thelastinuit: has joined #RubyOnRails
[20:19:01] tubbo: what's the request you're getting back from the server s2013?
[20:19:20] tubbo: err, response that tis*
[20:19:33] tubbo: also, make sure it's coming back as "200 OK" and not "304 Not Modified"
[20:19:41] tubbo: which it probably shouldn't be doing anyway :D
[20:19:48] Anakat__: has joined #RubyOnRails
[20:19:54] s2013: k one sec
[20:20:05] gambl0re: has joined #RubyOnRails
[20:20:16] rakm: has joined #RubyOnRails
[20:20:28] s2013: Completed 406 Not Acceptable in 29760.9ms (ActiveRecord: 37.4ms) interesting tubbo
[20:21:09] tubbo: took a fuckload of time just to throw an error
[20:21:36] Anakat: has joined #RubyOnRails
[20:22:03] erik_p: has joined #RubyOnRails
[20:22:26] p8m: has joined #RubyOnRails
[20:22:36] s2013: oh cause i was using pry
[20:22:38] rakm: has joined #RubyOnRails
[20:23:22] Anakat_: has joined #RubyOnRails
[20:23:43] s2013: tubbo (23.5ms) COMMIT
[20:23:44] s2013: Completed 406 Not Acceptable in 384.1ms (ActiveRecord: 100.7ms)
[20:23:45] symbole: has joined #RubyOnRails
[20:23:55] treehug88: has joined #RubyOnRails
[20:23:55] allcentury: has joined #RubyOnRails
[20:23:57] s2013: so it saves it.. then sends back that response.. it also sneds out a mailer.. i wonder if that has anything to do with that
[20:24:27] tubbo: i think a 406 is what rails throws when you're trying to access a format that it doesn't have a respond_to for
[20:24:28] arBmind1: has joined #RubyOnRails
[20:25:21] garrypolley: has joined #RubyOnRails
[20:25:42] gambl0re: has joined #RubyOnRails
[20:26:12] s2013: weird.. stilld oing that.. format.json { render json: @user }
[20:26:14] s2013: this is my response
[20:26:48] Anakat: has joined #RubyOnRails
[20:26:57] treehug88: (cross-posted from #ruby) - What is people's favorite REST Client gem?
[20:27:11] gloscombe: has joined #RubyOnRails
[20:27:50] ruurd: has joined #RubyOnRails
[20:28:23] s2013: ok i have it working now.. its cause the update method is like 300 lines long
[20:28:24] Anakat_: has joined #RubyOnRails
[20:31:56] Anakat: has joined #RubyOnRails
[20:32:51] nettoweb: has joined #RubyOnRails
[20:32:54] SteenJobs: has joined #RubyOnRails
[20:34:47] nerdsville: if I have an arr [Obj, Obj, Obj, Obj, Obj, Obj] is there a way to split it into [ [Obj, Obj, Obj], [Obj, Obj, Obj] ]
[20:35:13] xkickflip: has joined #RubyOnRails
[20:35:42] l0oky: has joined #RubyOnRails
[20:36:09] clamstar: has joined #RubyOnRails
[20:36:44] bricker: nerdsville: array.each_slice(3)
[20:37:22] nerdsville: ah sweet! Thanks
[20:37:33] Anakat: has joined #RubyOnRails
[20:38:06] user1138: has joined #RubyOnRails
[20:38:58] tubbo: treehug88: Net::HTTP.
[20:39:10] treehug88: thank you tubbo
[20:39:22] Anakat_: has joined #RubyOnRails
[20:39:40] tubbo: treehug88: it's actually just net/http from the ruby standard library. i find that when i need to build something like that, depending on 3rd-party gems is always a bit of a hassle.
[20:40:09] choke: has joined #RubyOnRails
[20:40:14] tubbo: best part about using net/http is no dependencies, though i'm not sure it's the "fastest" HTTP client around. if anyone would like to sway me to a different gem, i'd love to hear your argument!
[20:40:31] Euperia: has joined #RubyOnRails
[20:40:42] Euperia: has left #RubyOnRails: ()
[20:41:02] Anakat__: has joined #RubyOnRails
[20:41:35] eGGsha: has joined #RubyOnRails
[20:41:43] erichu: has joined #RubyOnRails
[20:41:45] bronson: has joined #RubyOnRails
[20:41:56] clamstar: has joined #RubyOnRails
[20:42:03] momomomomo: tubbo: faraday is a good abstraction which lets you swap out the actual fetcher
[20:42:10] momomomomo: i.e. for one that's thread safe
[20:42:18] momomomomo: oops, that should be e.g.
[20:42:27] avitzurel: has joined #RubyOnRails
[20:42:35] ruurd: has joined #RubyOnRails
[20:42:40] pipework: Mmm faraday.
[20:43:31] tubbo: faraday is a big favorite aroun dhere
[20:43:33] tubbo: around here*
[20:44:04] tubbo: i figured, however, i can just change out the "fetcher" myself since i already built a Client class for interfacing the HTTP library with the rest of the code.
[20:44:22] mrbubbles: has joined #RubyOnRails
[20:44:36] timh: has joined #RubyOnRails
[20:46:38] momomomomo_: has joined #RubyOnRails
[20:47:29] michaeldeol: has joined #RubyOnRails
[20:47:43] user1138: has joined #RubyOnRails
[20:50:40] fryguy9: has left #RubyOnRails: ()
[20:50:49] noodman: has joined #RubyOnRails
[20:50:52] fryguy: has joined #RubyOnRails
[20:53:49] fighella: has joined #RubyOnRails
[20:54:29] givanse_: has joined #RubyOnRails
[20:54:37] eggoez: has joined #RubyOnRails
[20:55:13] ruurd: has joined #RubyOnRails
[20:55:55] givanse_: has joined #RubyOnRails
[20:55:56] CheckYourSix: has joined #RubyOnRails
[20:56:00] mdel: has joined #RubyOnRails
[20:57:02] Zadrel: has joined #RubyOnRails
[20:57:23] Zadrel: hello there!
[20:57:31] Zadrel: anyone knows how do i get the expected output?
[20:57:32] Zadrel: https://gist.github.com/rmatuoka/011f89daec9136457842
[20:57:59] pico-pete: has joined #RubyOnRails
[20:58:12] tubbo: Zadrel: those indentations won't be reflected in the code unless you use <pre> which has its own side effects
[20:58:42] tubbo: Zadrel: you'll need to surround each name output with a tag of some kind that indents the content for you...that's how html works :)
[20:59:08] hahuang65: has joined #RubyOnRails
[20:59:11] CheckYourSix: has joined #RubyOnRails
[20:59:24] Zadrel: tubbo: i'm using the HAML gem, so it's all about identation. the code.html.haml is correct
[20:59:42] x-light: has joined #RubyOnRails
[20:59:45] SteenJobs: has joined #RubyOnRails
[21:00:40] tubbo: Zadrel: yeah, Haml has significant whitespace...but HTML doesn't, and that's inevitably what the browser reads when rendering your app. Haml won't do anything special if you indent, because indented content in your haml code doesn't necessarily translate as such when the view is actually rendered to html
[21:02:24] manfrin: Zadrel why print separators? just use css
[21:02:47] baweaver: has joined #RubyOnRails
[21:02:58] Zadrel: tubbo: sorry, i don't understand your point then. my focus is: how do i take the word " LAZOOORRRRR" out of the last loop of each "father"?
[21:03:14] tubbo: Zadrel: why didn't you just ask that...
[21:03:37] Zadrel: tubbo: i'm sorry, for some reason i thought it was clear... :(
[21:03:52] garrypolley_: has joined #RubyOnRails
[21:03:57] deol: has joined #RubyOnRails
[21:04:00] Zadrel: tubbo: but is it clear now?
[21:04:17] tubbo: Zadrel: you know much about CSS3? there's a :last-child pseudoclass you can use to apply or un-apply separators. like lets say you had a bunch of <li> tags, you can add border-right: 1px solid black; to everything *but* the last element.
[21:05:24] IFrank00: has joined #RubyOnRails
[21:06:03] Zadrel: tubbo: nice, is there a ruby-way that you know of?
[21:06:09] ur5us: has joined #RubyOnRails
[21:07:05] Zadrel: tubbo: i have to make it work in IE 8 :/
[21:07:08] manfrin: the ruby way is using the css
[21:07:26] manfrin: if what you're doing is trying to display them with a separator between the names, use css
[21:07:26] tubbo: might not work in IE 8 :)
[21:07:40] Zadrel: tubbo: w3 schools says it's not compatible
[21:07:55] tubbo: Zadrel: yeah, CSS3 was invented around the time IE 9 came out iirc
[21:08:08] dopie: hey Radar next time you don't have to goto another channel and say you laugh at my stupid questions.
[21:08:24] michaeldeol: has joined #RubyOnRails
[21:08:25] dopie: and ban me :)
[21:08:31] kanzure: has joined #RubyOnRails
[21:08:57] tubbo: Zadrel: if you have to do it with HTML (or Haml in this case), try a one-liner like `= " LAZOOORRRRR" unless @school.children.count == 0 || child == @school.children.last`
[21:09:02] tubbo: might be easier to understand
[21:10:03] DEA7TH_: has joined #RubyOnRails
[21:11:57] Zadrel: tubbo: same output Y-Y
[21:12:20] FernandoBasso: has joined #RubyOnRails
[21:12:23] mrbubbles: has joined #RubyOnRails
[21:12:35] tubbo: Zadrel: i have like no idea what you're going for here but you should know that SIGNIFICANT WHITESPACE IN HAML DOES NOT MEAN SIGNIFICANT WHITESPACE IN HTML
[21:12:43] Zadrel: tubbo: do you know a way to check it is any iteration left in an Array?
[21:12:58] tubbo: haven't seen the original output
[21:13:06] tubbo: so i don't know what it looks like, just the intended output
[21:13:11] arBmind: has joined #RubyOnRails
[21:13:14] Zadrel: tubbo: sry, the identation in the .txt file is just for easy-reading
[21:13:30] Zadrel: tubbo: i know that it woudn't render that way
[21:13:36] tubbo: ok cool :)
[21:13:42] tubbo: Zadrel: what did the original output look like?
[21:14:21] Zadrel: tubbo: it renders everything inline
[21:14:45] Zadrel: like GrandfatherFatherChild LAZOOORRRRRChild...(so on)
[21:15:15] s2013: has joined #RubyOnRails
[21:15:21] hutch78: Ugh this state_machine is so annoying??? what kind of error message is this !? ???Cannot transition state via :next from :payment (Reason(s): State cannot transition via "next???)???
[21:15:36] hutch78: i need to know WHY it cannot transition via next...
[21:15:37] tubbo: Zadrel: do you just want the separator on the next line?
[21:15:42] Zadrel: tubbo: but the only output difference is the instead of " LAZOOORRRRR" i have a comma","
[21:16:05] slash_nick: hutch78: you've gotta define your transitions... what have you got?
[21:16:24] zorak8: has joined #RubyOnRails
[21:16:41] tubbo: Zadrel: oh i see your output text is split between expected and what you recieved
[21:16:53] eggoez: has joined #RubyOnRails
[21:17:04] tubbo: Zadrel: you never wrote any code that says "if @school.children.count == 1, don't show the separator"
[21:17:11] Zadrel: tubbo: yeah, i need to write better my gists, sry about that
[21:17:12] tubbo: you need that code, because that's what you want :)
[21:17:49] doodlehaus: has joined #RubyOnRails
[21:17:53] hutch78: slash_nick: this is one of thej files that defines the transitions: https://github.com/spree/spree/blob/master/core/app/models/spree/order/checkout.rb
[21:17:59] nigelx344_: has joined #RubyOnRails
[21:18:03] Zadrel: tubbo: nope, never.
[21:18:06] Zadrel: i'll try that
[21:18:24] hutch78: slash_nick: also here: https://github.com/spree/spree/blob/master/core/app/models/spree/order.rb
[21:18:57] doodlehaus: has joined #RubyOnRails
[21:19:16] slash_nick: hutch78: sounds like your trying to use a transition called :next... but there's not one called next
[21:19:32] nigelx344: has joined #RubyOnRails
[21:19:54] nigelx344: Hey guys, in object oriented ruby, why do people do def self.methodName instead of def methodName?
[21:20:17] slash_nick: hutch78: I don't see any that can transition _from_ :payment... though some states can transition _to_ :payment
[21:20:24] pipework: nigelx344: They aren't necessarily interchangeable.
[21:20:36] roolo: nigelx344: Sometimes you need it. For example for factories
[21:20:53] hutch78: there are certain conditions that are not being met which enable this :next method
[21:20:58] nigelx344: what I thought was that they did the same thing
[21:21:08] hutch78: i just need to know which ones - i thought this error message would be more helpful but its so vague
[21:21:26] baweaver: has joined #RubyOnRails
[21:21:31] Eminence_: has joined #RubyOnRails
[21:22:04] roolo: nigelx344: In Ruby you can see more stuff which you are supposed to avoid ;)
[21:22:10] garrypolley: has joined #RubyOnRails
[21:22:17] roolo: nigelx344: It's there for some cases
[21:23:00] fryguy: man, capistrano is far too much magic for a deploy system
[21:23:01] codepete: has joined #RubyOnRails
[21:23:09] SteenJobs: has joined #RubyOnRails
[21:23:17] slash_nick: hutch78: sorry, i'm not seeing where a transition from :payment is defined
[21:24:57] alphaatom: has joined #RubyOnRails
[21:26:08] slash_nick: ok, maybe it's added, here https://github.com/spree/spree/blob/master/core/app/models/spree/order/checkout.rb#L132-L134... hutch78 this is pretty "clever"
[21:28:25] hutch78: slash_nick: i see it, but i still have no idea whats causing that transition tof ail
[21:29:12] allcentury: has joined #RubyOnRails
[21:29:50] slash_nick: hutch78: might need to see more of your code... stack traces... inspect the object in question... etc
[21:30:11] jhack32: has joined #RubyOnRails
[21:30:26] Hates_: hutch78: I've always found it difficult to track down transition errros
[21:32:06] Synthead: has joined #RubyOnRails
[21:32:40] kies^: has joined #RubyOnRails
[21:34:25] SteenJobs_: has joined #RubyOnRails
[21:34:40] ElSif: slash_nick: yes, spree is quite 'clever' ;)
[21:36:59] Rubie: has joined #RubyOnRails
[21:39:12] sinkensabe: has joined #RubyOnRails
[21:41:04] seank_: has joined #RubyOnRails
[21:42:24] marcoceppi: has joined #RubyOnRails
[21:42:24] marcoceppi: has joined #RubyOnRails
[21:42:37] killerbunny: has joined #RubyOnRails
[21:42:59] choke: has joined #RubyOnRails
[21:44:10] ElSif: looks like that traces to here https://github.com/spree/spree/blob/master/core/app/models/spree/order/checkout.rb#L48, which has a :next in it... promising?
[21:44:47] Zadrel: tubbo: i managed to figure it out, instead of aplying tha separator AFTER the first iteration, i added a counter and aplied the separator BEFORE the second iteration. "if counter==0 separator=false end"
[21:45:28] Zadrel: tubbo: so, if there's no second iteration, the separator won't apply;
[21:45:35] blindMoe: has joined #RubyOnRails
[21:46:04] Radar: dopie: I don't laugh at your stupid questions. What I talk about in that other channel is how... dopie you are.
[21:46:17] Radar: Despite my best efforts to explain something, you still fail to understand it.
[21:46:33] Radar: I'd expect you to pick up concepts quicker given the amount of time you've been here.
[21:46:58] ElSif: lol is this twitch chat?
[21:47:14] pipework: ho ho, dopie! :D
[21:48:15] polpak: has joined #RubyOnRails
[21:48:30] ElSif: hutch78: are you redefining anything with the state_machine (ie in a decorator)? or is it just vanilla Spree?
[21:49:20] dopie: Radar, you don't know my circumstances your expectations on a person you do not know seem to be unrealistic, and yes I do understand the concepts you explain to me. So you can make fun of people all you want since you are on such a high horse. I really must assume you are a dick in real life so getting your frustrations out on IRC is a way to help you, by all means go for it.
[21:49:38] Radar: dopie: I'm so glad that we can talk about this openly.
[21:49:40] dopie: If I don't understand I research it
[21:49:46] Radar: Yes, I am a gigantic asshole on IRC.
[21:49:49] Radar: Some call me a tyrant.
[21:50:11] dopie: Radar whatever makes you feel better...
[21:50:13] Radar: You don't understand it because it sometimes takes 3-4 tries to get the point across.
[21:50:17] ElSif: IRCexual healing
[21:50:23] Radar: dopie: And when I ask you for code, it takes again 3-4 tries to get you to share it
[21:50:29] Radar: and then when you do share it, it's 1/10th of what we ask for!
[21:50:40] Radar: dopie: You want me to treat you better? Follow my damn instructions.
[21:51:13] smathy: If only IRC had a means to speak privately between two people.
[21:51:19] Radar: smathy: If only!
[21:51:51] Radar: I'm so glad that dopie decided to take it up in PM first rather than rubbishing me publically.
[21:51:57] Radar: Just returning the favour here.
[21:51:59] smathy: dopie, did you reconcile the :on on: conundrum?
[21:52:05] _djbkd: has joined #RubyOnRails
[21:52:08] dopie: Yes I did :)
[21:52:24] dopie: smathy, thank you
[21:53:23] smathy: I'm usually a gigantic asshole on IRC too, but, y'know, I'm not at Radar's level.
[21:53:47] ElSif: we can't all be 1970s sitcom status
[21:53:53] Radar: smathy: You didn't pull a House of Cards on this channel, so no you're not.
[21:54:46] smathy: I wish I knew what that meant, I need to pay more attention here.
[21:55:14] calleerlandsson: has joined #RubyOnRails
[21:57:14] Radar: smathy: If you get time to watch HoC you'll understand :)
[21:57:53] smathy: Oh, the TV show.
[22:00:03] alphaatom: has joined #RubyOnRails
[22:01:25] ciree: has joined #RubyOnRails
[22:02:12] smathy: Doing the unpleasant yet necessary thing?
[22:02:54] Radar: hmmm not that bad
[22:03:05] ElSif: tough love?
[22:03:35] k776: has joined #RubyOnRails
[22:03:59] IFrank00: has joined #RubyOnRails
[22:04:25] pipework: Do I want to know?
[22:05:53] SteenJobs: has joined #RubyOnRails
[22:06:03] lethjakman: has joined #RubyOnRails
[22:08:31] nigelx344: has joined #RubyOnRails
[22:08:52] nigelx344: Hey guys, how do I post from a view to a custom .rb file?
[22:09:05] nigelx344: It's in the controller folder, and I named it Test.rb
[22:09:18] nigelx344: there are some actions in there that i'd like to post to the Test.rb folder
[22:09:54] Hates_: nigelx344: you need to make a controller
[22:10:07] nigelx344: The only way is to post to the controller?
[22:10:25] IceyEC: has joined #RubyOnRails
[22:10:39] mike: has joined #RubyOnRails
[22:10:42] Hates_: nigelx344: generally yes
[22:10:57] nigelx344: OKay thanks Hates
[22:11:08] pipework: nigelx344: !routing
[22:11:08] helpa: nigelx344: http://guides.rubyonrails.org/routing.html - Rails Routing From the Outside In - Rails Guide - by Mike Gunderloy
[22:11:22] pipework: You might want to read that.
[22:11:28] bruno-: has joined #RubyOnRails
[22:11:38] timh: has joined #RubyOnRails
[22:12:24] darrencauthon: has joined #RubyOnRails
[22:12:52] smathy: (and Getting Started)
[22:13:32] smathy: ACTION can't help reading nigelx as "nginx"
[22:13:34] nigelx344: Sweet, thanks
[22:13:54] nigelx344: wats an ngix
[22:14:23] Mike_R: has joined #RubyOnRails
[22:15:20] ElSif: its a web server, some say the best web server
[22:16:17] tsvenson: has joined #RubyOnRails
[22:16:24] momomomomo_: has joined #RubyOnRails
[22:16:55] siemprefresco: has joined #RubyOnRails
[22:18:04] merryfett: has joined #RubyOnRails
[22:18:13] ElSif: if you like paying money to get the most out of your web server i would have to agree with them ;)
[22:20:07] silverdust: has joined #RubyOnRails
[22:21:49] Palsson: has joined #RubyOnRails
[22:21:55] volsus: has joined #RubyOnRails
[22:24:05] christiandsg: has joined #RubyOnRails
[22:24:15] baweaver: has joined #RubyOnRails
[22:25:49] givanse: has joined #RubyOnRails
[22:27:13] k776: has left #RubyOnRails: ()
[22:30:10] ellisTAA: has joined #RubyOnRails
[22:30:55] Spami: has joined #RubyOnRails
[22:32:11] smathy: You don't have to pay any money to get the most out of nginx.
[22:32:20] dopie: has joined #RubyOnRails
[22:33:56] Papierkorb: smathy: I guess the money part refered to the server nginx is running on
[22:34:51] smathy: Papierkorb, doesn't make the comment any more comprehensible for me.
[22:35:55] htmldrum: has joined #RubyOnRails
[22:37:41] ElSif: lol it was just a joke about nginx plus
[22:37:48] ElSif: you are correct, the web server code is free
[22:38:07] justthisguy: has joined #RubyOnRails
[22:38:24] bricker: ElSif: don't open with that one
[22:38:31] bricker: at your next stand-up gig
[22:38:39] ElSif: point taken
[22:38:39] sankaber: has joined #RubyOnRails
[22:38:55] ElSif: i run nginx, it is beatiful, much love
[22:39:41] lindii_: is it possible to have link_to post method and also render a view with ujs?
[22:39:43] Lightsword: has joined #RubyOnRails
[22:40:48] ruurd: has joined #RubyOnRails
[22:41:02] Radar: What are people using in Rails to add events to apps like Calendar.app on OS X? Is it icalendar?
[22:42:49] VeryBewitching: Radar: I've only ever used iCalendar for that dating back to early 2000s
[22:43:10] VeryBewitching: Outlook and Calendar.app both support it afaik
[22:43:15] Radar: VeryBewitching: https://rubygems.org/gems/icalendar is what I meant.
[22:43:27] VeryBewitching: Radar: Ah, *nods*
[22:43:42] smathy: lindii_, link_to returns a link, it doesn't post anything or render anything. What are you actually asking?
[22:44:27] Radar: I want people to be able to download a file from this app which (when opened) adds an event to their calendar.
[22:44:39] Maletor: has joined #RubyOnRails
[22:45:02] lindii_: smathy: but i can do something like link_to "Send Message", conversation_path(sender_id: current_user.id, recipient_id: @user.id), method: :post
[22:46:13] smathy: lindii_, yes, that produces a link with some special code so that it gets turned into a form behind the scenes. I'm still not clear on your question.
[22:46:33] ur5us_: has joined #RubyOnRails
[22:46:37] ascarter: has joined #RubyOnRails
[22:47:21] JoshL: has joined #RubyOnRails
[22:47:29] ElSif: lindii_: you want the 'link_to' link to run some JS and change your current view?
[22:48:04] OS-14813: has joined #RubyOnRails
[22:48:24] VeryBewitching: Radar: cal.to_ical and set file to foo.ics
[22:48:31] lindii_: ElSif: yes
[22:48:32] Radar: oh, .ics. I am dumb.
[22:48:36] Radar: I had .ical
[22:49:44] givanse: has joined #RubyOnRails
[22:50:50] mike___1234: has joined #RubyOnRails
[22:52:19] workmad3: has joined #RubyOnRails
[22:52:23] ElSif: lindii_: are you used to using jquery?
[22:53:00] choke: has joined #RubyOnRails
[22:53:14] lindii_: ElSif: i believe that i will need to handle this situation with jquery
[22:53:47] ElSif: yea that is a decent approach :) sounds like you have used it before right
[22:53:55] GnuYawk: has joined #RubyOnRails
[22:53:55] GnuYawk: has joined #RubyOnRails
[22:54:15] wethu: has joined #RubyOnRails
[22:54:22] ElSif: cool, and do you have any other JS assets already?
[22:54:56] [H]unt3r: has joined #RubyOnRails
[22:56:10] fighella: has joined #RubyOnRails
[22:56:35] LeoDee: has joined #RubyOnRails
[22:57:12] ElSif: ok, anyways, either way, you will need to set the link to be 'remote: true'
[22:58:14] ur5us: has joined #RubyOnRails
[22:58:53] ElSif: does that make sense?
[22:59:46] alphaatom: has joined #RubyOnRails
[23:00:06] mary5030: has joined #RubyOnRails
[23:02:15] dcope: is it possible for a migration to go wrong and cause harm to the database?
[23:02:23] dcope: aside from writing a bad migration, that is.
[23:03:27] arBmind1: has joined #RubyOnRails
[23:08:24] zpe: has joined #RubyOnRails
[23:08:55] SteenJobs_: has joined #RubyOnRails
[23:10:16] bricker: dcope: sure, if you cancel the migration process half-way through
[23:10:26] bruno-: has joined #RubyOnRails
[23:10:56] bricker: dcope: transactions can help assure atomic transfer but if your migration is making more than one query then it could be half-migrated
[23:11:29] user1138: has joined #RubyOnRails
[23:13:16] Mendenhall: has joined #RubyOnRails
[23:16:33] SteenJobs_: hey guys, i???m in new waters - need to hook up an angularJS frontend with my rails backend for the stripe API. i obvs know how to do it if the entire app was rails, but this situation i???m unfamiliar with. any help would be appreciated as always
[23:19:18] hololeap: has joined #RubyOnRails
[23:20:03] bourbon: SteenJobs_: the workflow there is usually to define rails routes that angular can hit
[23:20:06] idd2d: has joined #RubyOnRails
[23:20:27] bourbon: angular would pass json/xml to the rails backend, and your controllers would get the contents of said json/xml as args
[23:20:35] bourbon: seems pretty straightforward if you already know how to do rails stuff
[23:20:53] SteenJobs_: bourbon: ah ok. so basically no different than having everything in my create action, in this case i would just be passing the data as json
[23:21:54] bourbon: you'd end up returning serialized objects instead of webpages
[23:22:00] bourbon: because angular would expect json/xml
[23:22:19] darrencauthon: has joined #RubyOnRails
[23:22:27] dcope: bricker: interesting, thanks
[23:22:47] Lytol: has joined #RubyOnRails
[23:22:52] SteenJobs_: bourbon: ok cool. have to read up on returning serialized objects, haven???t dealt with rails as an api yet. although if stripe does all the processing on their end, what is the purpose of passing the data from the angularJS frontend to the rails server?
[23:24:03] SteenJobs_: bourbon: nvrm. i found the answer to that Q.
[23:26:06] SteenJobs_: bourbon: do you have any working knowledge of angular?
[23:26:33] bungoman: has joined #RubyOnRails
[23:26:36] bourbon: to avoid liability
[23:27:02] bourbon: or something
[23:27:16] bourbon: well, the rails server needs to have the stripe auth token to make the purchase or whatever
[23:27:50] SteenJobs_: bourbon: right right. so do all of that stuff in the create action???do i need to save anything to the db?
[23:28:00] bourbon: depends on what you're doing here
[23:28:15] lytol_: has joined #RubyOnRails
[23:28:38] Lightsword: has joined #RubyOnRails
[23:29:14] SteenJobs: has joined #RubyOnRails
[23:29:27] SteenJobs: bourbon: looking to allow payment using CC, ideally want to allow a user to add CC to their account with us when they sign up - but i???m pretty sure even stored CC are done on Stripe???s end.
[23:29:37] bonhoeffer: has joined #RubyOnRails
[23:30:20] manfrin: do. not. save cc info
[23:30:37] manfrin: you auth the cc to stripe or whatever merchant, they'll give you back a user token, then use that to store/make payment calls
[23:30:46] manfrin: ever store cc info
[23:30:48] Radar: manfrin: stop
[23:31:04] Radar: manfrin: You triggered helpa's spam code :)
[23:31:26] SteenJobs: manfrin: that was my point dude???
[23:32:16] SteenJobs: manfrin: like i???m saying obviously i???m not storing CC info, so in that case what would i be storing in the db?
[23:32:57] manfrin: when you auth to whatever merchant you're using, they will send you back a client token
[23:33:10] Lytol: has joined #RubyOnRails
[23:33:10] erichu: has joined #RubyOnRails
[23:33:25] manfrin: that token represents your client's payment info, you then make another call to process a payment of X amount to token [that token you received]
[23:33:36] SteenJobs: manfrin: i???m using stripe. why would i need to ever save the token to the db?
[23:33:39] manfrin: save the token in your db -- it's tied to your merchant account
[23:33:43] SteenJobs: manfrin: ohhh i thought a new token is created every time.
[23:33:48] manfrin: so you can charge your user again without asking them to reenter payment details
[23:33:56] Radar: The token can be used to take payments on that card again.
[23:34:01] Radar: yeah, manfrin beat me to it :)
[23:34:02] manfrin: nope nope, a token is an id to tie your client's payment info to your merchant account
[23:34:13] manfrin: I like payment stuff
[23:34:16] SteenJobs: manfrin: right, although i think stripe has different methods for saving CC info, but i???ll look into it.
[23:34:21] manfrin: started in dev at a mobile payments company :D
[23:34:37] SteenJobs: manfrin: so tough to find someone that knows both angular and rails and stripe. it???s usually either rails or angular.
[23:34:46] manfrin: I dont know angular too well
[23:34:49] Radar: SteenJobs: Stripe gives you a token to use for cc payments.
[23:35:00] SteenJobs: Radar: fully aware.
[23:35:03] SteenJobs: Radar: thanks!
[23:35:14] SteenJobs: manfrin: so get on it man!
[23:35:21] manfrin: learning react
[23:35:27] SteenJobs: manfrin: obvs for the sole purpose of helping me
[23:35:41] manfrin: I'd recommend not using much angular to rails for stripe stuff
[23:35:50] SteenJobs: Radar: if i was building this in just rails i???d be fine. it???s getting it working with angular where i???m kind???ve lost.
[23:36:00] SteenJobs: manfrin: yea ideally, although i just inherited this app and the entire frontend is angular.
[23:36:04] blackmesa: has joined #RubyOnRails
[23:36:04] manfrin: have angular handle all stripe communication for auth, and then store token/handle processing payments on backend with that token
[23:36:04] Radar: SteenJobs: So stop using Angular? #trollface
[23:36:12] manfrin: so your rails app has no hand in passing off cc info
[23:36:26] baweaver: has joined #RubyOnRails
[23:36:29] SteenJobs: Radar: if only???
[23:36:47] SteenJobs: manfrin: yea that???s what i???m gonna do, angular just grabs the user input and sends it all in the token to the server for processing.
[23:37:08] manfrin: saves you the headache of possible liability for insecurity/whatever
[23:37:19] manfrin: also means you can use stripes drop-in js widget thingy
[23:37:21] manfrin: super easy
[23:37:46] SteenJobs: manfrin: yea i???m using the checkout feature
[23:37:47] manfrin: just make the callback post to your rails app some UserStripeAccount creation or whatever