« Back to channel list

#RubyOnRails - 07 September 2015

« Back 1 day Forward 1 day »
[00:00:15] quazimodo: has joined #RubyOnRails
[00:01:00] glennt: has joined #RubyOnRails
[00:01:56] mary5030: has joined #RubyOnRails
[00:08:25] Swappticon: has joined #RubyOnRails
[00:10:38] lindii_: why im not able to access @posts.comments in posts_controller? i get undefined method comments http://pastie.org/10401999
[00:10:41] theery: has joined #RubyOnRails
[00:10:42] drale2k: has joined #RubyOnRails
[00:11:26] nya: has joined #RubyOnRails
[00:11:30] Radar: lindii_: exact error messages are useful, but I can see from the code what you're doing wrong
[00:11:40] Radar: You're trying to paginate through ALL comments for ALL posts
[00:11:45] Radar: comments is only an association on a single post.
[00:12:25] lindii_: Radar: i get undefined method `comments' for #<Post::ActiveRecord_Relation:0x103f2e78>
[00:12:45] Radar: Why oh why do people not read what I spend time typing?
[00:12:49] Radar: lindii_: I ask you this quesdtion.
[00:12:57] Radar: [10:11:39] <Radar> You're trying to paginate through ALL comments for ALL posts
[00:13:04] Valeness_: has joined #RubyOnRails
[00:13:17] lindii_: you said "exact error messages are useful"
[00:13:34] ledestin: has joined #RubyOnRails
[00:13:53] Radar: Yesssss and then I said "but I can see from the code..."
[00:14:45] lindii_: anyway if i remove the pagination i still get the same error
[00:15:00] Radar: ACTION gets extremely exasperated
[00:15:07] rickmasta: has joined #RubyOnRails
[00:15:09] Radar: lindii_: mate
[00:15:28] Radar: current_user.feed returns a COLLECTION of posts; more than one post
[00:15:37] Radar: .comments is a method available on a SINGLE post
[00:15:49] michael_mbp: has joined #RubyOnRails
[00:15:52] Radar: You're doing current_user.feed.comments, which is attempting to call the comments method on the COLLECTION of posts.
[00:17:35] quazimodo: you need a join lindii_
[00:17:45] Radar: ACTION blinks a few times
[00:17:48] Radar: quazimodo: plz explain
[00:18:06] fgo_: has joined #RubyOnRails
[00:18:53] jholm: has joined #RubyOnRails
[00:19:15] annlewis: has joined #RubyOnRails
[00:19:49] mary5030: has joined #RubyOnRails
[00:20:26] lindii_: i can access in my view post.comments.paginate(page: params[:page], per_page: 2) but doesnt look quiet well in a view
[00:20:28] khgfd: has joined #RubyOnRails
[00:21:53] Radar: lindii_: That explanation does not help me understand what is happening or even if you need help at all./
[00:23:17] roshanavand: has joined #RubyOnRails
[00:23:26] one_zero: has joined #RubyOnRails
[00:24:17] lindii_: Radar: basically i cant do <%= will_paginate micropost.comments %>
[00:25:31] rhizome: is micropost the result of a .where without a .first?
[00:27:26] lindii_: rhizome: just a .where http://pastie.org/10402014
[00:28:16] rhizome: so then you're doing like render @microposts ?
[00:28:34] rhizome: i.e. you forgot the view
[00:28:34] lindii_: rhizome: yes
[00:29:33] Radar: lindii_: Full context of where this <%= will_paginate call is please.
[00:32:09] lindii_: rhizome: there it is http://pastie.org/10402018
[00:32:43] Radar: Why do you have two pagination calls?
[00:32:48] Radar: And what does it show as?
[00:32:50] pwnd_nsfw: I get usr/bin/ruby2.1: No such file or directory -- /usr/bin/bundle (LoadError) with rails new call
[00:32:58] pwnd_nsfw: But I can call bundle install with no issue
[00:33:01] djbkd: has joined #RubyOnRails
[00:33:03] pwnd_nsfw: I basically just have to do it manually....
[00:33:08] ariedler: debugging really slow tests ... anything better than ruby-prof ?
[00:33:10] pwnd_nsfw: But that's annoying
[00:33:10] Radar: pwnd_nsfw: /usr/bin/ruby2.1? How did you install Ruby?
[00:33:23] Radar: No, really, how did you install Ruby?
[00:33:31] Radar: looks like you have an apt-get package which is taking precedence
[00:33:34] ariedler: he install with rvm + something else probably
[00:33:48] quazimodo: Radar: to get all the comments for the given posts lindii_ could use an inner join, no?
[00:34:08] pwnd_nsfw: https://gorails.com/setup/ubuntu/15.10
[00:36:05] lindii_: anyways im kinda confused about how can i paginate comments. Any suggestion is welcome
[00:36:27] pwnd_nsfw: will_paginate is pretty straight forward
[00:36:30] Radar: lindii_: I still don't understand what is wrong with your code despite asking more than once.
[00:36:40] Radar: pwnd_nsfw: I still think there's an apt package that you've installed previously
[00:36:45] Radar: RVM does not install at /usr/bin
[00:36:48] rhizome: you want each post to have its own paginated comments?
[00:36:58] lindii_: Radar: with my last paste i get this error undefined method `total_pages' for
[00:37:21] pwnd_nsfw: Radar, I followed that to a t :P
[00:37:23] Radar: lindii_: I'm sorry, I can't help you. That error message means nothing to me.
[00:37:31] quazimodo: Radar: it does if your stupid hosting company installs it there /end bad experience
[00:37:35] lindii_: rhizome: yes
[00:37:50] pwnd_nsfw: quazimodo, this is local however
[00:38:28] Radar: pwnd_nsfw: apt-get remove ruby2.1 shows what?
[00:38:30] lindii_: rhizome: actually i want to show more "comments". Thought maybe using will_paginate would help
[00:38:38] quazimodo: pwnd_nsfw: i didn't read it all. if you can get into chruby. Remove all system rubies first
[00:38:59] pwnd_nsfw: Radar, rails new shows that when it gets to bundle install --local
[00:39:00] quazimodo: unless osx, i dno hw that works
[00:39:04] newtonianb: has joined #RubyOnRails
[00:39:11] Radar: This channel today
[00:39:27] Radar: What the fuck is wrong with you people? Why aren't you following my instructions?
[00:39:30] pwnd_nsfw: Sorry, I read "shows that"
[00:39:37] Radar: One more time and I'm quitting for the day.
[00:39:38] pwnd_nsfw: Because my eyes are tired, I apologize
[00:39:53] lindii_: Radar: Dude you really need some sleep. We are not genius like you
[00:40:05] Radar: lindii_: You really need to show your damn code and explain properly how it's not working
[00:40:12] Radar: An app which reproduces the issue would be really handy.
[00:40:30] pwnd_nsfw: https://gist.github.com/SirUncleCid/bd9d3e960619bbe78d5f
[00:40:39] quazimodo: brain just exploode
[00:40:44] Radar: pwnd_nsfw: oh look it was installed as a system package
[00:41:01] pwnd_nsfw: I'm incredibly linux naive
[00:41:05] Radar: pwnd_nsfw: np
[00:41:19] pwnd_nsfw: Is that an issue?
[00:41:21] Radar: pwnd_nsfw: Uninstall it and then I _think_ RVM's ruby will take precedence when you open a new terminal window
[00:41:43] pwnd_nsfw: Is that meaning I probably have two ruby installations?
[00:42:11] Radar: If it went through with the removal after "apt-get remove ruby2.1" then you'd only have one
[00:42:25] Radar: Likely that "rails new" was using the RVM version which looks like it didn't have bundler available.
[00:42:31] rhizome: lindii_: i don't like using params in views, but there is this http://stackoverflow.com/a/23493408/135845
[00:42:31] lindii_: someone needs pussy and less code
[00:42:47] Radar: +q lindii_!*@*
[00:42:52] workmad3: has joined #RubyOnRails
[00:43:02] Radar: lindii_: I am trying to help you and you're not helping yourself. Go away for 15 mins.
[00:43:16] Radar: That kind of comment is not on in this channe..
[00:43:41] charliesome: has joined #RubyOnRails
[00:43:52] quazimodo: he meant kittens Radar http://www.welikeviral.com/files/2014/12/8325_8_site.jpeg
[00:44:09] Radar: Got one of those already
[00:44:20] Radar: I know what he meant and it's an extremely rude and sexist thing to say.
[00:44:59] pwnd_nsfw: Ruby is available after that, but I believe I have to reinstall rvm
[00:45:04] Radar: pwnd_nsfw: Why?
[00:45:12] Radar: pwnd_nsfw: What does `ruby -v` and `which ruby` show you?
[00:45:57] pontiki: has joined #RubyOnRails
[00:46:01] pwnd_nsfw: When I did rails new, it complained about permissions
[00:46:15] pwnd_nsfw: And with my limited linux knowledge, I ran sudo su for the lulz
[00:46:17] pwnd_nsfw: and that broke it
[00:46:32] FailBit: has joined #RubyOnRails
[00:46:42] Radar: Did you install RVM as root?
[00:46:57] FailBit: adfasldfsdf
[00:47:07] pwnd_nsfw: I'm going to say yes. I can't quite remember honestly
[00:47:11] Radar: FailBit: Yes, it works.
[00:47:26] Radar: FailBit: I forget the command to test for it. It _might_ be `which rvm`
[00:47:33] pwnd_nsfw: But, with a fresh terminal window, ruby -v, rvm all are recognized
[00:47:39] Radar: If that doesn't show a path at your home directory then it's installed as root
[00:47:53] pwnd_nsfw: it's in home
[00:48:12] FailBit: how do I find objects that match an array element
[00:48:21] FailBit: (using postgres)
[00:48:27] Radar: FailBit: Example, please.
[00:48:31] Radar: Hello pontiki
[00:48:50] FailBit: in mongo I could do Image.in(tag_names: ['red'])
[00:49:08] Radar: FailBit: Show us your data as it is now.
[00:49:14] Radar: And show us what you want to retrieve.
[00:49:44] ariedler: 51 controller specs... 7 minutes 0-0
[00:50:11] drale2k: has joined #RubyOnRails
[00:50:16] Radar: ariedler: ruby-prof is good for that. Tailing your test.log and seeing the SQL statements executed can help too I've found.
[00:50:18] rhizome: FailBit: .where or .find_by
[00:50:43] fgo_: has joined #RubyOnRails
[00:51:46] pontiki: FailBit: you want to match on some value in the array? Look at http://www.postgresql.org/docs/9.3/static/arrays.html#ARRAYS-SEARCHING
[00:51:54] FailBit: ERROR: operator does not exist: string[] = string
[00:52:10] Radar: Ok, FailBit has trigged the third and final time today. Goodbye for today, everyone. Enjoy.
[00:52:14] rhizome: what is that you're saying
[00:52:18] Radar: -q lindii_!*@*
[00:52:47] FailBit: ACTION flails wildly
[00:52:51] Radar: I ask for something to help diagnose someone's issue, and they don't give it. I don't know what's wrong with this channel today but I can't handle it and I'm close to banning repeat offenders... which is not very nice at all. Bye.
[00:54:07] pwnd_nsfw: If it makes you feel better, you helped me. Just had to additionally set permissions of the folder I was working in
[00:54:24] valetudo: has joined #RubyOnRails
[00:54:26] pwnd_nsfw: Thanks a bunch!
[00:54:29] FailBit: pontiki: thank you
[00:54:41] FailBit: rhizome: that was what I tried initially; guess I need a query string here
[00:54:50] FailBit: Image.where('? = ANY (tag_names)', 'red')
[00:55:16] chipotle: has joined #RubyOnRails
[00:55:41] Cache_Money: has joined #RubyOnRails
[00:55:42] FailBit: I have a GIN index on the field for this purpose :p
[00:56:27] rhizome: no, you shouldn't need a parameterized query
[00:57:51] pwnd_nsfw: In Rails in Action, it specifies that you should only use rails when creating applications and bin/rails anywhere else. Is this an issue with multiple rails versions?
[00:58:32] lindii_: rhizome: that worked. but as you said it doesnt look nice
[00:59:50] FailBit: Radar: I'm sorry; I'm not usually like that, I was just somewhat desperate and trying to search for my problem at the same time
[00:59:54] pontiki: pwnd_nsfw: using bin/rails when working on your app will use the version of rails it was created with, or whatever version is specified in your Gemfile
[00:59:58] FailBit: turns out I needed to look in a different direction
[01:00:27] pwnd_nsfw: Thanks pontiki
[01:01:25] Aeyrix: tfw you fuckers killed Radar
[01:01:36] Aeyrix: goddamn I go away for like an hour and a half and I get back to this mess.
[01:02:07] pwnd_nsfw: Everyone needs to take a deep breath, I think :P
[01:03:27] ariedler: 0-0 no idea what happened here.
[01:04:15] FailBit: rhizome: what can I use instead of the parameterized query? I'm itching to remove it
[01:04:17] charliesome: has joined #RubyOnRails
[01:04:27] rhizome: .where or .find_by
[01:04:30] emba: has joined #RubyOnRails
[01:10:10] pontiki: i'm interested in a demonstration when searching in an array column contains a specific element.
[01:11:24] FailBit: a crude tagging system?
[01:11:54] pontiki: no, using a non-parameterized query in that instance. i don't know how it could be done. i'd like tolearn.
[01:12:18] rakm: has joined #RubyOnRails
[01:12:18] FailBit: ah, as would I
[01:13:23] Swappticon: has joined #RubyOnRails
[01:16:27] darrencauthon: has joined #RubyOnRails
[01:20:44] annlewis: has joined #RubyOnRails
[01:21:28] MDK_S01012412: has joined #RubyOnRails
[01:27:59] kaymation1: has joined #RubyOnRails
[01:28:23] zoidfarb: has joined #RubyOnRails
[01:28:39] jher: has joined #RubyOnRails
[01:28:50] zoidfarb: hello, is there a way to get the absolute path (in the filesystem, not url) for an image asset in rails?
[01:30:18] FailBit: you'll want to do a pathname join with Rails.root
[01:30:27] mary5030: has joined #RubyOnRails
[01:30:56] FailBit: File.join(Rails.root, "assets", "images", "image.svg")
[01:31:18] nya: has joined #RubyOnRails
[01:31:27] nya: has joined #RubyOnRails
[01:33:20] pontiki: needs to start with "app"
[01:33:51] jher: Would probably be joined with a `asset_path` anyway, so it doesn't really matter
[01:34:25] jher: Actually, I think Rails root has a #join method
[01:34:57] ur5us: has joined #RubyOnRails
[01:35:04] kegan_: has joined #RubyOnRails
[01:35:14] pontiki: could do Rails.root.join "app", image_path('image.svg')
[01:35:26] zoidfarb: sounds good
[01:35:36] zoidfarb: I'll give it a shot
[01:35:51] zoidfarb: is image_path() available in `rails console`?
[01:35:51] charliesome: has joined #RubyOnRails
[01:35:59] quazimodo: has joined #RubyOnRails
[01:36:17] pontiki: i think it's on helper: irb> helper.image_path
[01:36:24] jher: You have to include ActionView::Helpers::AssetUrlHelper I believe
[01:36:48] pontiki: not something i normally try :)
[01:36:48] Guest34516: has joined #RubyOnRails
[01:37:36] quazimodo: We have made an architecture decision that I'm not sure I condone
[01:37:45] quazimodo: ACTION flails wildly
[01:40:39] ProLoser: has joined #RubyOnRails
[01:40:56] Rakunh0: has joined #RubyOnRails
[01:40:56] ProLoser: has joined #RubyOnRails
[01:42:23] bonhoeffer: has joined #RubyOnRails
[01:42:50] jholm: has joined #RubyOnRails
[01:42:56] zoidfarb: pontiki: I think this is the right track, but I don't full understand the behavior of image_path()
[01:43:15] lampshades: has joined #RubyOnRails
[01:43:19] zoidfarb: helper.image_path('templates/canvas/Red.png') => "/assets/templates/canvas/Red.png"
[01:43:35] zoidfarb: but the file is in /images/templates/canvas/
[01:43:53] zoidfarb: Does it get compiled/moved into /assets/ ?
[01:44:20] lampshades: has joined #RubyOnRails
[01:44:31] bruno-: has joined #RubyOnRails
[01:45:29] bonhoeffer: has joined #RubyOnRails
[01:45:41] pontiki: are you wanting the absolute path before asset compilation?
[01:46:45] bonhoeffer: how could i save a @records.to_csv from the console
[01:46:45] bonhoeffer: just open a file and write that too it i guess
[01:46:56] zoidfarb: pontiki: No, I think I want it after compilation, at run-time. I have a Carrierwave uploader that needs to superimpose user-submitted content on top of some existing template images. I need the paths of the template images in order to read them in with RMagick
[01:47:42] pontiki: will the template images themselves be directly downloaded by a client?
[01:48:06] pontiki: if not, then i wouldn't actually treat them as downloadable assets
[01:48:14] bonhoeffer: has joined #RubyOnRails
[01:49:10] zoidfarb: pontiki: They won't be intentionally downloadable, but it's not harmful or a risk if somebody did
[01:49:34] rickmasta: has joined #RubyOnRails
[01:49:37] zoidfarb: pontiki: Where else would be a good place to put them? I was just considering them 'assets' because they seemed like an asset my application would use
[01:49:54] pontiki: assets are things that are downloadable by a client
[01:50:13] pontiki: it sounds like they are another form of data
[01:50:42] FailBit: bonhoeffer: File.open("/path/to/file.csv","w"){|f| f.write(@records.to_csv)}
[01:50:44] zoidfarb: pontiki: Is there a standard Rails place to put something like that? Forgive my ignorance, I'm coming from a Python background and this is my first Rails project
[01:50:58] pontiki: no, not particularly, zoidfarb
[01:51:22] pontiki: you can leave them in assets, but you'll have to access them directly from the app, and not use the image_path() helper
[01:52:04] zoidfarb: If I just made an /app/image_templates/ directory, is that sensible?
[01:52:16] FailBit: not really
[01:52:34] FailBit: it sounds like you might want to put it in public/ ?
[01:52:47] pontiki: no, because they aren't to be served to the public
[01:52:56] Klumben: has joined #RubyOnRails
[01:52:57] bonhoeffer: FailBit: thanks!
[01:52:58] pontiki: they are data for the application
[01:53:13] FailBit: ACTION should read
[01:53:19] zoidfarb: FailBit: They're going to be read by the application and used to *generate* output the user will see
[01:53:21] nyaa: has joined #RubyOnRails
[01:53:30] pontiki: zoidfarb: here's a case where Rails doesn't specifically provide a convention
[01:53:31] zoidfarb: FailBit: but the templates themselves aren't shown to the user
[01:53:40] FailBit: app/assets/ or lib/assets/
[01:53:53] pontiki: creating an app/templates/ is just fine
[01:54:07] zoidfarb: FailBit: if I put them in app/assets, won't they get "compiled" back to public?
[01:54:19] zoidfarb: pontiki: Great, that's what I'll do.
[01:54:21] soahccc: I noticed that there are configs in dubious forums for sentry MBA (dictionary login / scraper) targeting our website. Generally it's the users fault if someone has their credentials but what can you possible do to prevent this or make it harder? The only thing I could came up with is the paypal style 10 second login to make it just slow as shit :/
[01:54:37] pontiki: something as in app/templates/something_images
[01:54:49] pontiki: where "something" is the type of thing they are images for
[01:55:18] zoidfarb: Rails.root.join seems to return a #<Pathname:/assets/templates/canvas/Red.png> object instead of just a string. Is that expected?
[01:55:22] FailBit: soahccc, firewalled their IPs?
[01:55:34] FailBit: zoidfarb: call to_s
[01:55:35] pontiki: the potential problem with that would have to do with dropping .rb files in that folder, as they'll be included in Rails' autoloading
[01:55:54] w0rd-driven: has joined #RubyOnRails
[01:56:01] pontiki: yes, zoidfarb, most things that want a path string are happy to take a pathname object, but if it's an issue, just give it a .to_s
[01:56:13] soahccc: FailBit: that is the problem, we have thresholding in place and they don't attack single accounts. they just have their dictionary of email/password and with proxies try to login and scrape information
[01:56:43] soahccc: FailBit: It looks like this: http://i.imgur.com/np0yAel.jpg
[01:57:01] zoidfarb: pontiki: Great. Going to go give this a try. Thanks for your help, both of you.
[01:57:30] FailBit: soahccc: we have a "stupid" automated login defense on one of my rails sites
[01:57:39] FailBit: as in, it's very stupid
[01:57:50] soahccc: FailBit: so no captcha? I'm interested :D
[01:58:14] FailBit: it uses the jquery.fingerprint library
[01:58:38] FailBit: on homepage load, JS takes the browser fingerprint and stores it in a cookie
[01:58:50] FailBit: then the server checks for the presence and validity of the cookie
[01:58:54] FailBit: that's how stupid it is
[01:59:23] ur5us: has joined #RubyOnRails
[01:59:35] kegan_: if i have a form solely for a nested attribute of that object, how can i differentiate in the appropriate controller action which kind of submission it is?
[02:00:03] soahccc: I guess that is no security at all is it? I mean they have to aquire a session and CSRF token anyway so can this protect against a targeted configuration?
[02:00:15] FailBit: probably not
[02:00:36] FailBit: and it has a second purpose besides stopping automated logins: you can use it to ban a certain browser configuration
[02:00:50] FailBit: but only with some degree of certainty
[02:01:05] FailBit: other than that, I'm not sure how to help if captcha is out of the question
[02:01:11] soahccc: Failbit: Since our service requires javascript I thought about tracking mouse movement and require captcha if you have no mousemovent, etc.
[02:02:20] Exuma: has joined #RubyOnRails
[02:02:42] soahccc: FailBit: I guess when I rename the parameter every other day that could also be pretty annoying :D
[02:03:17] chipotle: has joined #RubyOnRails
[02:04:02] FailBit: we've not had any issues afaik with people doing account enumeration or dictionary attacks
[02:04:20] michael_mbp: has joined #RubyOnRails
[02:04:26] FailBit: we've also lasted through about 25 DDoSes (yay ovh)
[02:05:12] soahccc: FailBit: yeah I guess this is different for every site :) We never got ddosed except once when we kinda ddosed ourselfes (funny story). We sell games and they want to scrape keys :)
[02:05:35] FailBit: we don't offer anything to buy, so there's where we differ from you
[02:06:19] FailBit: soahccc: we get DDoSed a hell of a lot
[02:06:33] FailBit: been attacked at least 25 times since jan 2012
[02:06:36] krz: has joined #RubyOnRails
[02:07:05] tfitts: has joined #RubyOnRails
[02:07:45] FailBit: but I mean
[02:07:47] Travis-42_: has joined #RubyOnRails
[02:07:52] hololeap: has joined #RubyOnRails
[02:07:53] FailBit: what can you do when 4chan and 8ch both hate your guts
[02:08:07] soahccc: well :) not the best enemies to have
[02:08:08] chancancode_: has joined #RubyOnRails
[02:08:11] mdel_: has joined #RubyOnRails
[02:08:34] crdpink2: has joined #RubyOnRails
[02:08:47] FailBit: we've not had any downtimes related to external attacks
[02:08:51] FailBit: so there is that
[02:10:07] cornerma1: has joined #RubyOnRails
[02:10:09] Derasi: has joined #RubyOnRails
[02:10:19] QKO_: has joined #RubyOnRails
[02:10:38] hydrozen: has joined #RubyOnRails
[02:10:51] creature_: has joined #RubyOnRails
[02:11:01] frigidco1e: has joined #RubyOnRails
[02:11:31] FailBit: oh, one time some skiddies from 'keksec' tried a layer 7 attack on our search engine
[02:11:45] FailBit: bragged loudly that it would take us down
[02:12:05] FailBit: (hint: it didn't. elasticsearch handled it without issue.)
[02:12:52] soahccc: I'm glad that we currently don't need such a sophisticated search :) We only have product titles basically
[02:13:46] webdestroyaz: has joined #RubyOnRails
[02:13:54] tris-: has joined #RubyOnRails
[02:13:58] flxsource: has joined #RubyOnRails
[02:13:58] sfr^^: has joined #RubyOnRails
[02:14:04] Papierko-: has joined #RubyOnRails
[02:14:14] Olipro-: has joined #RubyOnRails
[02:14:19] skakri`: has joined #RubyOnRails
[02:14:20] cschneid-: has joined #RubyOnRails
[02:14:29] northfurr: has joined #RubyOnRails
[02:14:31] Plas: has joined #RubyOnRails
[02:14:55] universal: has joined #RubyOnRails
[02:15:11] braincrash: has joined #RubyOnRails
[02:15:13] iooner-: has joined #RubyOnRails
[02:15:31] creature: has joined #RubyOnRails
[02:16:04] lupine: has joined #RubyOnRails
[02:16:18] TheMoonMaster_: has joined #RubyOnRails
[02:16:53] Xiti: has joined #RubyOnRails
[02:17:47] urkle: has joined #RubyOnRails
[02:18:06] Seich: has joined #RubyOnRails
[02:18:11] epochwolf: has joined #RubyOnRails
[02:18:51] sonofdirt: has joined #RubyOnRails
[02:19:57] givanse: has joined #RubyOnRails
[02:20:06] pontiki: i'm curious where you're at, FailBit, but i don't want to pry if you don't want to say
[02:20:27] w0rd-driven: has joined #RubyOnRails
[02:20:57] n1lo: has joined #RubyOnRails
[02:21:31] annlewis: has joined #RubyOnRails
[02:21:49] FailBit: haven't I already answered that in the past?
[02:21:52] FailBit: derpibooru.org
[02:21:57] strcmp1: has joined #RubyOnRails
[02:22:07] pontiki: you very well may have, but i don't read logs
[02:22:10] royvandermeij: has joined #RubyOnRails
[02:22:30] buhman: has joined #RubyOnRails
[02:22:58] sparr: has joined #RubyOnRails
[02:23:57] DarkBushido: has joined #RubyOnRails
[02:23:57] DarkBushido: has joined #RubyOnRails
[02:24:10] nya: has joined #RubyOnRails
[02:24:32] cball: has joined #RubyOnRails
[02:25:56] ChoiKyuSang: has joined #RubyOnRails
[02:26:21] seank__: has joined #RubyOnRails
[02:26:44] FailBit: >inb4 "you run a porn site" etc
[02:26:55] pwnd_nsfw: porn for weirdos
[02:27:03] FailBit: you should see aryion
[02:27:23] pwnd_nsfw: That's pretty interesting
[02:27:29] pwnd_nsfw: Not in like.. the good way
[02:27:34] synfinatic_: has joined #RubyOnRails
[02:27:34] pwnd_nsfw: like, that I'll pursue it kind of interesting
[02:27:42] pwnd_nsfw: "oh, this exists" kind of interesting
[02:27:45] _fortis_: has joined #RubyOnRails
[02:28:43] FailBit: I've seen some of the weirdest fetish fuel ever moderating derpibooru
[02:28:56] FailBit: I'm sure there's weirder elsewhere
[02:29:44] webhat_: has joined #RubyOnRails
[02:29:51] dima_: has joined #RubyOnRails
[02:30:29] cfloare_: has joined #RubyOnRails
[02:30:30] erich__: has joined #RubyOnRails
[02:30:45] AlHafoudh_: has joined #RubyOnRails
[02:31:01] Rakunh0: has joined #RubyOnRails
[02:31:51] KnownSyntax_: has joined #RubyOnRails
[02:32:33] aguynamedben: has joined #RubyOnRails
[02:32:36] jxie_: has joined #RubyOnRails
[02:32:52] [epitron]: has joined #RubyOnRails
[02:33:35] danshultz_: has joined #RubyOnRails
[02:33:42] ur5us_: has joined #RubyOnRails
[02:34:09] darrencauthon: has joined #RubyOnRails
[02:34:13] ur5us__: has joined #RubyOnRails
[02:34:15] rlomax: has joined #RubyOnRails
[02:35:19] segy: has joined #RubyOnRails
[02:35:27] cgrieger^away: has joined #RubyOnRails
[02:35:32] michaellippold: has joined #RubyOnRails
[02:36:06] cgfbee: has joined #RubyOnRails
[02:37:11] hydrozen: has joined #RubyOnRails
[02:38:49] russt: has joined #RubyOnRails
[02:44:44] Swappticon: has joined #RubyOnRails
[02:49:18] jenrzzz: has joined #RubyOnRails
[02:51:05] Klumben: has joined #RubyOnRails
[02:51:09] cajone1: has joined #RubyOnRails
[02:51:21] ur5us: has joined #RubyOnRails
[02:53:50] ur5us: has joined #RubyOnRails
[02:54:24] beauby: has joined #RubyOnRails
[02:57:41] SteenJobs: has joined #RubyOnRails
[02:59:15] Dwarf: has joined #RubyOnRails
[02:59:15] ProLoser: has joined #RubyOnRails
[02:59:40] mozzarella: has joined #RubyOnRails
[03:01:08] sevenseacat: has joined #RubyOnRails
[03:02:20] rickmasta: has joined #RubyOnRails
[03:02:21] Marquel: has joined #RubyOnRails
[03:02:42] northfurr: has joined #RubyOnRails
[03:04:38] terrellt: has joined #RubyOnRails
[03:06:10] tenderlo_: has joined #RubyOnRails
[03:08:03] sonofdirt: has joined #RubyOnRails
[03:08:15] epochwolf|vps: has joined #RubyOnRails
[03:08:15] epochwolf|vps: has joined #RubyOnRails
[03:08:36] Lycanii_: has joined #RubyOnRails
[03:08:57] nightsh_: has joined #RubyOnRails
[03:09:57] Skelz0r: has joined #RubyOnRails
[03:10:04] w0bni: has joined #RubyOnRails
[03:10:10] quazimodo: has joined #RubyOnRails
[03:10:16] jcm: has joined #RubyOnRails
[03:10:29] codelahoma: has joined #RubyOnRails
[03:10:39] sevenseacat: why is the opposite of `vagrant up` not `vagrant down`? grumble
[03:10:55] hive-mind: has joined #RubyOnRails
[03:11:09] braincrash: has joined #RubyOnRails
[03:12:03] quazimodo: vagrant sideways
[03:12:21] roxtrongo: has joined #RubyOnRails
[03:12:48] pontiki: vagrant halt or vagrant suspend
[03:12:48] Kuukunen: has joined #RubyOnRails
[03:12:58] sevenseacat: yeah I know that now :P is silly though
[03:13:05] pontiki: i guess because one needs two different ways of doing it?
[03:13:20] pontiki: idk, my alias is `vdn` :)
[03:13:47] seank_: has joined #RubyOnRails
[03:14:12] sevenseacat: alias sounds like a good idea
[03:14:14] okdas: has joined #RubyOnRails
[03:14:15] okdas: has joined #RubyOnRails
[03:14:19] strcmp1: sevenseacat, yep. i wondered that too.
[03:14:21] pontiki: theoretically suspend is just putting the box into some sort of hibernate mode. i've never had much luck with that, so i always crowbar it
[03:14:29] DanKnox: has joined #RubyOnRails
[03:14:35] strcmp1: there is vagrant halt/suspend
[03:14:39] danshultz: has joined #RubyOnRails
[03:14:40] strcmp1: i would expect halt = down
[03:14:54] pontiki: ACTION looks around
[03:15:24] strcmp1: pontiki, what do u see
[03:15:31] pontiki: my words, repeated
[03:16:21] markelite: has joined #RubyOnRails
[03:16:47] strcmp1: not exactly cuz halt is different than to suspend, unless crowbar it = halt.
[03:19:21] evillution: has joined #RubyOnRails
[03:19:30] strcmp1: ok apologies then
[03:21:43] existensil: has joined #RubyOnRails
[03:21:45] [epitron]: has joined #RubyOnRails
[03:21:46] givanse: has joined #RubyOnRails
[03:21:47] Encapsulation: has joined #RubyOnRails
[03:22:04] hydrozen: has joined #RubyOnRails
[03:22:17] annlewis: has joined #RubyOnRails
[03:22:20] bmurt: has joined #RubyOnRails
[03:23:33] shoelessone: has joined #RubyOnRails
[03:27:02] Scripore: has joined #RubyOnRails
[03:27:51] cki: has left #RubyOnRails: ()
[03:28:02] kaymation: has joined #RubyOnRails
[03:29:24] tprpc: has joined #RubyOnRails
[03:29:31] nya: has joined #RubyOnRails
[03:30:49] ghostlines: has joined #RubyOnRails
[03:32:56] shoelessone: has joined #RubyOnRails
[03:35:40] skarn: has joined #RubyOnRails
[03:36:25] ProLoser_: has joined #RubyOnRails
[03:36:47] kegan_: can you have a remote form_for with several nested fields_for objects it has_one relation to... and each has their own submit button?
[03:36:58] kegan_: that stays on the page and allows advancement through the form
[03:39:31] jholm: has joined #RubyOnRails
[03:43:55] enkristoffer: has joined #RubyOnRails
[03:45:16] bruno-: has joined #RubyOnRails
[03:51:19] ProLoser: has joined #RubyOnRails
[03:58:56] sonofdirt: has joined #RubyOnRails
[03:59:53] nya: has joined #RubyOnRails
[04:04:26] i: has joined #RubyOnRails
[04:05:07] digitalknk: has joined #RubyOnRails
[04:07:07] gambl0re: has joined #RubyOnRails
[04:13:04] gambl0re: anyone here use cocoon gem before??
[04:13:10] mary5030: has joined #RubyOnRails
[04:17:03] hololeap: has joined #RubyOnRails
[04:17:10] fedexo: has joined #RubyOnRails
[04:18:56] Oog_: has joined #RubyOnRails
[04:20:23] workmad3: has joined #RubyOnRails
[04:20:42] sonofdirt: has joined #RubyOnRails
[04:23:03] annlewis: has joined #RubyOnRails
[04:24:59] moeabdol: has joined #RubyOnRails
[04:27:13] bootstrappm: has joined #RubyOnRails
[04:29:53] Ropeney: has joined #RubyOnRails
[04:33:51] mary5030: has joined #RubyOnRails
[04:33:52] jholm: has joined #RubyOnRails
[04:34:06] oddalot: has joined #RubyOnRails
[04:35:31] mloy: has joined #RubyOnRails
[04:39:37] banjara: has joined #RubyOnRails
[04:41:03] theery: has joined #RubyOnRails
[04:44:44] sevenseacat: has joined #RubyOnRails
[04:44:49] Swappticon: has joined #RubyOnRails
[04:48:53] Oog_: has joined #RubyOnRails
[04:48:53] wdev1: has left #RubyOnRails: ("Leaving")
[04:48:55] eggoez: has joined #RubyOnRails
[04:50:15] drale2k: has joined #RubyOnRails
[04:52:11] nya: has joined #RubyOnRails
[04:53:10] bootstrappm: has joined #RubyOnRails
[04:56:52] KnownSyntax: has joined #RubyOnRails
[04:56:52] KnownSyntax: has joined #RubyOnRails
[04:59:48] beauby: has joined #RubyOnRails
[05:02:15] chipotle: has joined #RubyOnRails
[05:02:58] Spami: has joined #RubyOnRails
[05:04:10] northfurr: has joined #RubyOnRails
[05:04:42] nya: has joined #RubyOnRails
[05:05:20] sevenseacat: has joined #RubyOnRails
[05:05:35] digitalknk: has joined #RubyOnRails
[05:06:18] bootstrappm: has joined #RubyOnRails
[05:07:51] mikajo: has joined #RubyOnRails
[05:09:30] Voxxit: has joined #RubyOnRails
[05:11:17] emba: has joined #RubyOnRails
[05:12:12] Oog_: has joined #RubyOnRails
[05:13:30] riotjones: has joined #RubyOnRails
[05:15:13] yardenbar: has joined #RubyOnRails
[05:15:54] nya: has joined #RubyOnRails
[05:17:11] czerasz: has joined #RubyOnRails
[05:21:40] n008f4g_: has joined #RubyOnRails
[05:23:20] roxtrongo: has joined #RubyOnRails
[05:23:44] duncannz: has joined #RubyOnRails
[05:23:49] annlewis: has joined #RubyOnRails
[05:25:32] Oog_: has joined #RubyOnRails
[05:25:45] Mendenhall: has joined #RubyOnRails
[05:27:04] tejasmanohar: has joined #RubyOnRails
[05:33:25] zlogan: has joined #RubyOnRails
[05:34:58] sinkensabe: has joined #RubyOnRails
[05:35:24] aganov: has joined #RubyOnRails
[05:41:36] epitron: has joined #RubyOnRails
[05:42:13] tagrudev: has joined #RubyOnRails
[05:42:45] mostlybadfly: has joined #RubyOnRails
[05:43:20] michael_mbp: has joined #RubyOnRails
[05:43:47] codenapper: has joined #RubyOnRails
[05:44:28] mary5030: has joined #RubyOnRails
[05:45:20] ur5us: has joined #RubyOnRails
[05:45:24] stardiviner: has joined #RubyOnRails
[05:46:00] bruno-: has joined #RubyOnRails
[05:46:35] srinidhi: has joined #RubyOnRails
[05:49:12] Tahr64-user: has joined #RubyOnRails
[05:51:00] drale2k: has joined #RubyOnRails
[05:52:02] ur5us: has joined #RubyOnRails
[05:57:32] djbkd: has joined #RubyOnRails
[05:59:02] nya: has joined #RubyOnRails
[06:04:16] baweaver: Are there any well known ActiveRecord extensions out there? Looking to not repeat work if I can.
[06:04:39] baweaver: found an old abandoned project named ActiveRecord::Extensions
[06:05:06] baweaver: mainly just adding the ability to do multiple inner-joins against the same table in an abstract way.
[06:05:32] evillution: has joined #RubyOnRails
[06:05:36] kimegede: has joined #RubyOnRails
[06:05:40] dionysus69: has joined #RubyOnRails
[06:07:52] ghostlines: has joined #RubyOnRails
[06:09:13] workmad3: has joined #RubyOnRails
[06:11:26] MartinElvar: has joined #RubyOnRails
[06:21:55] jholm: has joined #RubyOnRails
[06:23:14] Klumben: has joined #RubyOnRails
[06:24:35] annlewis: has joined #RubyOnRails
[06:25:49] michael_mbp: has joined #RubyOnRails
[06:25:55] riotjones: has joined #RubyOnRails
[06:26:24] timiyay: has joined #RubyOnRails
[06:26:41] drale2k: has joined #RubyOnRails
[06:27:48] timiyay: gday folks
[06:29:00] krz: has joined #RubyOnRails
[06:30:23] timiyay_: has joined #RubyOnRails
[06:32:28] timiyay_: so I'm working on a Rails app, and my mate has just made a request. It doesn't sound possible, but I wanted to throw it out to the community, and see if I'm missing something
[06:32:38] timiyay_: so let's call my app Site A
[06:33:01] timiyay_: and Site A links to 2 external sites (Site B and Site C)
[06:33:12] timiyay_: my mate wants to be able to login into Site A
[06:33:17] beauby: has joined #RubyOnRails
[06:33:19] michael_mbp: has joined #RubyOnRails
[06:33:20] timiyay_: and have that login authorise the user for Sites B and C as well
[06:33:32] Ropeney: timiyay_: CAS
[06:33:42] timiyay_: the goal is to essentially pretend these 3rd-party sites are us, and eventually replace them
[06:33:50] timiyay_: sounds impossible to me, unless the 3rd-party sites support
[06:34:04] timiyay_: CAS? http://www.urbandictionary.com/define.php?term=CAS
[06:34:21] Ropeney: Central Authentication System
[06:35:08] timiyay_: ah ok, ropeney. that sounds interested. i'll read up on it
[06:35:23] timiyay_: so is it possible to use that to log in to 3rd-party sites you don't own?
[06:35:23] nya: has joined #RubyOnRails
[06:35:25] Ropeney: Also to log in the other sites, just log there 'remember_me' token
[06:35:30] Ropeney: in your login
[06:35:32] Ropeney: with some hacky stuff
[06:39:41] arup_r: has joined #RubyOnRails
[06:41:39] eGGsha: has joined #RubyOnRails
[06:42:26] charliesome: has joined #RubyOnRails
[06:45:15] Aeyrix: Architecture question for y'all
[06:45:22] Aeyrix: i've asked this once before but i kind of forgot the answer i got
[06:45:35] Aeyrix: full rails app, also need an api
[06:45:52] Aeyrix: add to existing app, or new app, or convert old app to some reactJS fuckery and new app?
[06:46:12] Aeyrix: please note i will be writing this answer down
[06:47:09] Ropeney: Aeyrix: Very open ended but why are you looking to not do it in rails?
[06:47:22] Aeyrix: Ropeney: I'm kind of looking for "best form"
[06:47:27] Aeyrix: more that than do it / not do it in rails
[06:47:54] Radar: Add to existing app.
[06:48:03] Ropeney: If all your code is already in rails, I think thats best form
[06:48:07] Aeyrix: just namespace it?
[06:48:12] Aeyrix: what about now duplicate logic?
[06:48:18] Aeyrix: It's one of my triggers. :(
[06:48:20] i: has joined #RubyOnRails
[06:48:32] Ropeney: Aeyrix: What are you duplicating?
[06:48:48] Aeyrix: Logic between frontend and API endpoints
[06:49:04] Ropeney: Aeyrix: but you keep business logic
[06:49:17] Ropeney: Aeyrix: You get to re-use alot more then making a new app
[06:49:25] Aeyrix: most of the db-side stuff aye
[06:49:52] Aeyrix: playing ignorant here for a sec: Wouldn't you duplicate less if you had API + fadJS frontend?
[06:50:43] Ropeney: you'd duplicate same logic in a different language?
[06:50:45] arBmind: has joined #RubyOnRails
[06:52:08] Aeyrix: Ropeney: view
[06:52:18] ur5us_: has joined #RubyOnRails
[06:52:23] Aeyrix: Radar: hey is there a usermode for "literally a moron"?
[06:52:24] Aeyrix: I need it.
[06:52:55] Aeyrix: Ropeney: Thanks, I'm not sure what happened to me.
[06:53:08] Ropeney: Aeyrix: :D
[06:53:10] Aeyrix: You're right though. Sorry, I'm not normally this idiotic.
[06:55:37] finnnnnnnnnnn: has joined #RubyOnRails
[06:55:48] Radar: Aeyrix: no worries )
[06:56:33] Aeyrix: It's just because I've spent the entire day legitimately believing it'd be less work (LOC wise) to do API + JS frontend
[06:56:36] Aeyrix: I don't know much JS
[06:56:47] Aeyrix: but I was convinced I'd be duplicating logic otherwise
[06:57:16] Aeyrix: Now it's kind of like when you discover that you can eat ice-cream out of a mug and then your hands don't get cold holding the bowl
[06:57:22] Aeyrix: and you wonder why anyone would do it any other way
[06:57:50] mloy: I have two models, Event and Calendar, where calendars belong_to events. If I want to initialize and save a calendar that belongs_to a new, unsaved event in my event's 'new' action, should I do that using callbacks?
[06:58:24] roxtrongo: has joined #RubyOnRails
[06:59:25] ledestin: has joined #RubyOnRails
[07:00:08] mloy: and a tangential question: if I want to update that calendar in the event's 'new' view upon form submission, and refresh just the calendar, what's the best practices way to do it?
[07:00:52] Aeyrix: mloy: Not in Callbacks, no.
[07:02:06] mary5030: has joined #RubyOnRails
[07:02:20] tvw: has joined #RubyOnRails
[07:03:01] greenarrow: has joined #RubyOnRails
[07:03:12] stardiviner: has joined #RubyOnRails
[07:04:00] hololeap: has joined #RubyOnRails
[07:07:04] Radar: calendars belong to events? huh?
[07:07:35] Ven: has joined #RubyOnRails
[07:07:47] artto: has joined #RubyOnRails
[07:08:18] mloy: Collaborative event scheduling. Think of the calendars just as tables of time slots to choose from with specified starting and ending dates
[07:08:34] Radar: Seems like a bad name for it.
[07:08:39] Radar: just my opinion
[07:08:48] mloy: Fair enough, but that aside,
[07:08:53] bootstrappm: gave the Slim templating engine a shot this time around on a new project - really liking it!
[07:09:43] mloy: should I even have the models broken up into two separate models?
[07:09:47] mloy: Or just combined into one
[07:10:29] mloy: Well actually ignore that question.
[07:18:11] MartinElvar: has joined #RubyOnRails
[07:18:29] finnnnnnnnnnn: has joined #RubyOnRails
[07:18:41] comrad: has joined #RubyOnRails
[07:18:47] comrad: has joined #RubyOnRails
[07:21:23] ruurd: has joined #RubyOnRails
[07:25:21] annlewis: has joined #RubyOnRails
[07:25:22] bePolite: has joined #RubyOnRails
[07:25:57] czerasz: has joined #RubyOnRails
[07:26:31] bePolite: has joined #RubyOnRails
[07:35:02] towski_: has joined #RubyOnRails
[07:38:28] Pazician: has joined #RubyOnRails
[07:38:28] Pazician: has joined #RubyOnRails
[07:45:23] Spami: has joined #RubyOnRails
[07:46:00] gamov: has joined #RubyOnRails
[07:46:36] bruno-: has joined #RubyOnRails
[07:47:57] wpp: has joined #RubyOnRails
[07:48:11] darutoko: has joined #RubyOnRails
[07:52:09] exadeci: has joined #RubyOnRails
[07:58:27] DeweyD: has joined #RubyOnRails
[08:00:16] robbyoconnor: has joined #RubyOnRails
[08:02:01] Pupeno: has joined #RubyOnRails
[08:04:14] dhjondoh: has joined #RubyOnRails
[08:04:37] robbyoconnor: has joined #RubyOnRails
[08:05:07] arup_r: has joined #RubyOnRails
[08:06:13] sg19: has joined #RubyOnRails
[08:07:51] alexhartley: has joined #RubyOnRails
[08:07:59] jsrn_: has joined #RubyOnRails
[08:08:14] ruurd: has joined #RubyOnRails
[08:08:56] sg19: After signup which is just email and password I want a user (teacher) to setup his profile in multiple steps. If someone logout, I want them to still setup their profile before using anything on my app. So how can I ensure that the user has completed his profile before sending him to the dashboard?
[08:10:42] webhat: has joined #RubyOnRails
[08:10:44] sg19: And maybe the user might have left in the middle of the multistep form and logged out. So how to ensure that he comes back to the same step if he logs in again
[08:13:58] tonios57: has joined #RubyOnRails
[08:15:00] jbrinkmusic: I'm getting a "Bundler::HTTPError Could not fetch specs from https://rubygems.org/" when trying to run bundle install... does anyone have an idea what might cause this?
[08:15:31] x-light: has joined #RubyOnRails
[08:15:58] jbrinkmusic: I'm running rails on the Cloud9 IDE
[08:18:51] Jasaka: has joined #RubyOnRails
[08:21:56] adre: has joined #RubyOnRails
[08:21:59] arup_r: I will be here for now with you people.. :)
[08:22:24] sg19: arup_r i have posted my query above
[08:23:11] arup_r: sg19: Very simple.. Let me know first know .. Are you using Devise ?
[08:23:58] arup_r: So you are actually doing kind of onboarded thing?
[08:25:13] arup_r: or whatever... You will add a column onboarded_at something like that in your users table
[08:26:04] sg19: yes. i am building an app for teachers where they need to setup their profile before anything. profile will have things like their details, address and qualification
[08:26:15] annlewis: has joined #RubyOnRails
[08:26:28] arup_r: then.. before sending any user after sign in.. check if the value is empty to the field or not.. if empty send himback to the profile complete page.. and if completed then to the dashboard
[08:26:42] bmalum: has joined #RubyOnRails
[08:27:03] sg19: okay then I got this part. Another thing is this: maybe the user might have left in the middle of the multistep form and logged out. So how to ensure that he comes back to the same step if he logs in again
[08:27:44] marr: has joined #RubyOnRails
[08:28:37] arBmind: has joined #RubyOnRails
[08:28:48] arup_r: yes.. add a method inside the application controller where you will be doing this check with the current_user.onboarded_at.present? then go the the dashboard else profile page
[08:29:09] Linuus: has joined #RubyOnRails
[08:29:28] krisquigley: has joined #RubyOnRails
[08:29:54] sg19: no i got that. So if my onboard form has like 5 steps. User filled first 2 and then logged out. How can I ensure that he gets back to the 3rd step whenever he logs in next. I sense I have to use multistep form for this.
[08:32:10] arup_r: umm sg19 Are those steps are different controller actions ?
[08:32:44] kitsuneyo: has joined #RubyOnRails
[08:33:26] sg19: arup_r I can do that!
[08:33:26] fxn: has joined #RubyOnRails
[08:34:13] jgt: has joined #RubyOnRails
[08:34:16] gamov: hello guys. quick question, can I check if yield will yield anything (without passing a symbol). I tried content_for(nil) but it doesn't work
[08:34:18] kitsuneyo: i have 3 models: games, organizations and organization_game_credits. organization_game_credits has a string column called category. in my game form, i want to have a section for each category. so far, i tried to do this with hidden fields that specify the category for each partial, but it doesn't work. here's my gist: https://gist.github.com/kitsuneyo/235527dca52e3bc4575a
[08:34:25] yfeldblum: has joined #RubyOnRails
[08:35:03] arup_r: sg19: add one more column say "profile_complted_action" and once each page is getting completed store the currently completed action name there .. and then check till where he has completed and send him to the next page
[08:35:08] arup_r: sg19: makes sense ?
[08:35:43] sg19: arup_r yes man! totally
[08:35:49] sg19: you were a big help!
[08:35:58] arup_r: This is a idea.. you can furnish it .. Like storing a Hash inside the model and each action name and its correspoding url
[08:36:10] mugurel: has joined #RubyOnRails
[08:36:41] arup_r: sg19: :) Yes. I will be helpful when I am in helping mode. But I am dumb when I am in working mode
[08:37:12] arup_r: gamov: code please..
[08:41:32] jgt: has joined #RubyOnRails
[08:42:50] mike___1234: has joined #RubyOnRails
[08:42:54] gamov: https://gist.github.com/gamov/4e3368c17d5164dec3ce
[08:44:35] wildlander: has joined #RubyOnRails
[08:45:43] Ven: has joined #RubyOnRails
[08:46:21] bmalum: Community - whats better, one view (Application.html.erb) to load the Angular.JS and then load the Views with AngularJS and use an API built with Rails, or load sometimes a new A.js View from the Rails Views?
[08:47:24] Motoservo: has joined #RubyOnRails
[08:48:22] arup_r: gamov: You were doing wrong.. You need to use content_for? method
[08:49:19] arup_r: gamov: http://apidock.com/rails/v4.2.1/ActionView/Helpers/CaptureHelper/content_for%3F
[08:49:53] gamov: :arup_r, I thought of that??? but content_for? <what?>
[08:50:18] arup_r: gavit: content_for works with the label you gave it
[08:50:26] beauby: has joined #RubyOnRails
[08:50:31] arup_r: so you need to use the lable name
[08:51:09] gamov: I don't have a label??? I just pass block to the render method (with layout: my_layout)
[08:52:52] gamov: arup_r: I don't want to call content_for(:my_label ) before calling render; it reads horribly in views
[08:52:54] arup_r: https://gist.github.com/gamov/4e3368c17d5164dec3ce#gistcomment-1568086
[08:53:07] arup_r: gavit: it works on that way
[08:53:29] gamov: arup_r: alright,,, thanks for the help!
[08:53:46] arup_r: if you have 3 content fors for example.. and there is no way to find out which one you want.. without the label name
[08:54:32] gamov: arup_r: but it works when I call yield. I just want to know if yield will return anything
[08:55:04] sinkensabe: has joined #RubyOnRails
[08:55:05] AzaToth: has joined #RubyOnRails
[08:55:14] Linuus: has joined #RubyOnRails
[08:56:07] arup_r: Yield will paste the content right there ... where you are using it as you used `<%=`
[08:56:32] arup_r: Yield will paste the content right there ... where you are using it as you used `<%= yield :my_label`
[08:57:58] kitsuneyo: has joined #RubyOnRails
[08:58:39] jsvgoncalves: has joined #RubyOnRails
[08:59:32] roxtrongo: has joined #RubyOnRails
[09:00:57] qejk: has joined #RubyOnRails
[09:01:24] qwertme: has joined #RubyOnRails
[09:02:09] qwertme: has joined #RubyOnRails
[09:04:41] emba: has joined #RubyOnRails
[09:07:07] startupality: has joined #RubyOnRails
[09:07:26] dideler: has joined #RubyOnRails
[09:09:26] DoubleMalt: has joined #RubyOnRails
[09:10:25] solars: has joined #RubyOnRails
[09:11:23] CheckYourSix: has joined #RubyOnRails
[09:12:14] neutrino: has joined #RubyOnRails
[09:12:24] hefest: has joined #RubyOnRails
[09:12:39] hefest: any ideas how to get log verbosity in heroku logs?
[09:12:55] hefest: s/verbosity/severity/
[09:13:45] SPYGAME: has joined #RubyOnRails
[09:14:44] Pazician: has joined #RubyOnRails
[09:16:31] weckl: has joined #RubyOnRails
[09:26:53] annlewis: has joined #RubyOnRails
[09:26:58] ereslibre: has joined #RubyOnRails
[09:27:22] blnkammo_: has joined #RubyOnRails
[09:28:21] bonhoeffer: has joined #RubyOnRails
[09:30:57] arup_r: has joined #RubyOnRails
[09:33:33] beauby: has joined #RubyOnRails
[09:33:47] elaptics: hefest: probably this? https://github.com/heroku/rails_stdout_logging
[09:33:53] hololeap: has joined #RubyOnRails
[09:34:22] elaptics: hefest: more info https://devcenter.heroku.com/articles/logging#writing-to-your-log
[09:35:29] arup_r: has joined #RubyOnRails
[09:37:31] emba: has joined #RubyOnRails
[09:39:40] emba: has joined #RubyOnRails
[09:42:06] Pumukel: has joined #RubyOnRails
[09:42:56] otherj: has joined #RubyOnRails
[09:44:30] Nowaker: has joined #RubyOnRails
[09:44:49] Mendenhall: has joined #RubyOnRails
[09:46:23] Jasaka: has joined #RubyOnRails
[09:46:41] hefest: elaptics: the last one is how it works now, and I'm not getting information about log severity printed to the stdout
[09:48:01] kramsee: has joined #RubyOnRails
[09:48:22] nya: has joined #RubyOnRails
[09:49:50] kramsee: has joined #RubyOnRails
[09:50:55] kramsee: has joined #RubyOnRails
[09:51:41] jsvgoncalves: has joined #RubyOnRails
[09:55:16] startupality_: has joined #RubyOnRails
[09:55:42] astrodog: has joined #RubyOnRails
[09:55:51] mugurel: hello folks, i have a question. I created a resource named blog and i have two routes, get blog => index and get blog/id => show. The problem is when i create a link to the index method from a show page it automatically picks up the id. <li><%= link_to "Blog", blog_path %></li> it links to the current show page like app.com/blog/103
[09:57:10] srinidhi: has joined #RubyOnRails
[09:57:27] patrick_star: has joined #RubyOnRails
[09:57:29] bruno-: has joined #RubyOnRails
[09:59:13] kitsuneyo: has joined #RubyOnRails
[10:00:43] nya: has joined #RubyOnRails
[10:01:04] weckl: mugurel, should't the route be blogs_path instead of blog_path?
[10:01:08] frzn: has joined #RubyOnRails
[10:01:08] frzn: has joined #RubyOnRails
[10:02:02] greenarrow: has joined #RubyOnRails
[10:02:46] mary5030: has joined #RubyOnRails
[10:02:54] bruno-: has joined #RubyOnRails
[10:03:09] mugurel: weckl, i created a map to use the singural name because i wanted the url to look good like blog not blogs
[10:03:25] mugurel: scope "/blog" do
[10:03:25] mugurel: get "/" => "blogs#index", :as => "blog"
[10:03:25] mugurel: match "/feed" => "blogs#feed", :as => "blog_feed"
[10:03:25] mugurel: get "/:id" => "blogs#show", :as => "blog"
[10:06:17] mugurel: i will use link_to "Blog", :controller => :blogs, :action => :index, but i was curios why i can't do it normally with link_to "Blog", blog_path
[10:07:06] weckl: yeah, I get you.
[10:08:13] bruno-: has joined #RubyOnRails
[10:09:44] kitsuneyo: has joined #RubyOnRails
[10:10:42] weckl: I'm not really sure if you can give the same namespace expecting an :id in one case and not in the other. Hope some more experienced guy can answer that for you.
[10:11:00] weckl: (and for me) :)
[10:11:51] lukad: has joined #RubyOnRails
[10:13:03] Ven: has joined #RubyOnRails
[10:21:08] emba: has joined #RubyOnRails
[10:22:58] Palsson: has joined #RubyOnRails
[10:23:06] blackhuey: has joined #RubyOnRails
[10:24:29] Pazician: has joined #RubyOnRails
[10:25:21] pontiki: mugurel: weckl is correct, you can't use the same path name like that
[10:25:54] bruno-_: has joined #RubyOnRails
[10:26:55] weckl: Thanks pontiki
[10:27:12] mugurel: ok, thanks
[10:27:23] sevenseacat: has joined #RubyOnRails
[10:27:48] annlewis: has joined #RubyOnRails
[10:31:18] bruno-: has joined #RubyOnRails
[10:34:12] kitsuneyo: has joined #RubyOnRails
[10:36:39] bruno-: has joined #RubyOnRails
[10:37:00] workmad3: has joined #RubyOnRails
[10:41:41] jeadre: has joined #RubyOnRails
[10:42:05] bruno-: has joined #RubyOnRails
[10:43:40] workmad3: has joined #RubyOnRails
[10:46:06] otherj: has joined #RubyOnRails
[10:47:14] turbo_MaCk: has joined #RubyOnRails
[10:47:33] bruno-: has joined #RubyOnRails
[10:50:50] stamina: has joined #RubyOnRails
[10:50:57] masscrx: Im trying to show object errors on view by @object.errors.full_messages.each do |msg| ... end
[10:51:05] masscrx: but on view is displayed: Account not found. ["Account not found."]
[10:51:12] masscrx: so, msg and array, how to show only msg ?
[10:52:30] masscrx: ok resolved
[10:52:35] bruno-: has joined #RubyOnRails
[10:53:04] jholm: has joined #RubyOnRails
[10:54:00] mclee_: has joined #RubyOnRails
[10:54:31] mugurel: has joined #RubyOnRails
[10:55:52] MartinElvar: has joined #RubyOnRails
[10:55:58] mugurel: is there any way i can truncate a table from seeds? I have a legacy application and i can't just run rake db:reset. I just want to seed two rows, but first truncate them automatically.
[10:56:09] mugurel: i found ActiveRecord::Base.connection.execute("TRUNCATE TABLE #{blogs}"), but it does not work
[10:56:23] konsolebox: has joined #RubyOnRails
[10:56:40] Trynemjoel: has joined #RubyOnRails
[10:58:00] bruno-: has joined #RubyOnRails
[10:58:13] lsone: has joined #RubyOnRails
[10:58:21] zpe: has joined #RubyOnRails
[10:58:23] epochwolf|vps: has joined #RubyOnRails
[11:00:17] roxtrongo: has joined #RubyOnRails
[11:00:32] srinidhi: has joined #RubyOnRails
[11:00:49] Wingar: has joined #RubyOnRails
[11:01:24] insu: has joined #RubyOnRails
[11:01:28] rocknrollMarc: has joined #RubyOnRails
[11:01:39] pontiki: i would have expected that to work. does it give an error?
[11:02:06] arup_r: has joined #RubyOnRails
[11:02:24] pontiki: in the meantime, you can also say Blog.destroy_all
[11:02:59] Brando753: has joined #RubyOnRails
[11:03:22] bruno-: has joined #RubyOnRails
[11:06:03] wwalker: has joined #RubyOnRails
[11:13:50] bruno-: has joined #RubyOnRails
[11:15:36] bonhoeffer: ok ??? using oauth on heroku ??? logged in to find that another user was logged in by default and i couldn???t log him out ??? any troubleshooting options?
[11:16:33] Ven: has joined #RubyOnRails
[11:18:02] lukad: mugurel: are you truncating multiple tables? i think your tables need to be comma seperated "TRUNCATE TABLE #{blogs.join ', '}"
[11:18:59] lukad: append RESET IDENTITY if you want to reset the associated sequences
[11:19:11] bruno-: has joined #RubyOnRails
[11:19:43] mugurel: lukad, i want to truncate only one table
[11:20:09] lukad: alternatively you can use delete_all as pontiki suggested and then reset the sequences with ActiveRecord::Base.connection.reset_pk_sequence!('blogs')
[11:20:21] lukad: hmm... then i'm not sure what the problem is
[11:22:30] lukad: mugurel: what does `blogs` evaluate to? why are you not simply doing "TRUNCATE TABLE blogs"?
[11:22:37] dhjondoh: has joined #RubyOnRails
[11:24:27] mugurel: pontiki, sorry i did not read your message, i am working now and i only saw the message i was tagged in. It gives an error, let me give it another try and i will post the error.
[11:24:38] bonhoeffer: i???m wondering if there is a session loaded on the server that has the oauth user logged in
[11:25:01] Pazician: has joined #RubyOnRails
[11:25:12] mugurel: pontiki, undefined local variable or method `blogs' for main:Object
[11:26:41] mugurel: pontiki, lukad , Blog.destroy_all as pontiki mentioned works well, that was what i needed
[11:28:26] annlewis: has joined #RubyOnRails
[11:29:14] jgt: has joined #RubyOnRails
[11:29:28] bruno-: has joined #RubyOnRails
[11:30:00] bonhoeffer: is there a way to see on the server what the active sessions are and kill them
[11:30:33] weckl: has joined #RubyOnRails
[11:31:26] eGGsha: has joined #RubyOnRails
[11:32:00] otherj: I'm having an issue where when I deploy with cap, it seems that rails connects to the db (because I don't get the error that one would expect when the db can't be contacted), but it seem that the actual records aren't accessible. For example, in console if I do Model.all, it's just => #<ActiveRecord::Relation []>. How should I start to troubleshoot this? I did notice that I have to do bundle exec gem list to actually see the gems installed from
[11:32:00] otherj: the Gemfile, but I'm not sure if that's related
[11:32:17] emba: has joined #RubyOnRails
[11:32:56] lukad: bonhoeffer: you should be able to clear the sessions with `rake tmp:sessions:clear`
[11:33:03] lukad: i don't know how to list them
[11:35:59] drale2k: has joined #RubyOnRails
[11:36:08] yaw: has joined #RubyOnRails
[11:44:51] bonhoeffer: has joined #RubyOnRails
[11:47:19] bonhoeffer: lukad: ok ??? i???m thinking the console should have the session
[11:48:08] havenwood: has joined #RubyOnRails
[11:48:10] bonhoeffer: anyway ??? right now the wrong session is loaded ??? everyone logs in as one user
[11:50:31] bonhoeffer: how do i see if the session is stored in the db
[11:51:15] Ven: has joined #RubyOnRails
[11:51:52] arup_r: This is how I am doing sign in .. How would I implement sign out ? https://gist.github.com/josevalim/fb706b1e933ef01e4fb6#file-2_safe_token_authentication-rb
[11:52:48] voker57: has joined #RubyOnRails
[11:54:16] alexhart_: has joined #RubyOnRails
[11:59:28] sami: Can anyone see what's wrong with this? https://gist.github.com/samimb/86fc27ce8da809dfaead it breaks on 5. Don't get why..
[12:00:23] arup_r: breaks means ?
[12:00:31] dionysus69: has joined #RubyOnRails
[12:01:00] dionysus69: I need guidance with this :\ https://github.com/berkmancenter/connected_scholar I don't get it, I run rake etherpad:run as the guide says and doesn't do anything, guide is missing something so can anyone let me know what I am missing ?
[12:02:26] Cervajz: has joined #RubyOnRails
[12:02:54] bonhoeffer: this is so confusing, i removed all sessions, but a user is still ???logged in??? by default that session is loaded for all
[12:02:59] bonhoeffer: and i can???t remove it
[12:04:17] bonhoeffer: the only thought i have is that: session[:user_id] = user.id has the wrong user in it
[12:05:06] Cervajz_: has joined #RubyOnRails
[12:05:32] bonhoeffer: i can???t get them off ??? restarted heroku, cleared all sessions
[12:06:19] sami: arup_r: Any idea?
[12:06:34] arup_r: I didn't get what is the error
[12:06:44] jsvgoncalves: has joined #RubyOnRails
[12:06:49] sami: Oh, I thought I pasted haha. Sorry
[12:07:07] sami: seeds.rb:5: syntax error, unexpected tIDENTIFIER, expecting '}'
[12:07:37] sami: Obvious error but not making sense, or am I blind?
[12:08:29] Cervajz: has joined #RubyOnRails
[12:10:17] sfr^^: has joined #RubyOnRails
[12:10:17] arup_r: sami: did you copy paste this any other source ?
[12:10:36] sami: arup_r: copy-paste
[12:11:06] bonhoeffer: yeah ??? redeploying the app didn???t help
[12:11:20] arup_r: Yes.. It seems some invisible character is inserted which causing error.. and It happens very often..
[12:11:47] arup_r: sami: Just try to write the code by hand till line number 10 and see.. I am sure it will be fine
[12:11:49] ranchodev: has joined #RubyOnRails
[12:13:02] Kallis: has joined #RubyOnRails
[12:13:06] Pazician: has joined #RubyOnRails
[12:14:01] cac: has joined #RubyOnRails
[12:14:05] iateadonut: has joined #RubyOnRails
[12:15:01] w0rd-driven: has joined #RubyOnRails
[12:16:19] kitsuneyo: has joined #RubyOnRails
[12:21:47] jgt: has joined #RubyOnRails
[12:23:05] arup_r: has joined #RubyOnRails
[12:24:32] quazimodo: has joined #RubyOnRails
[12:26:31] centrx: has joined #RubyOnRails
[12:27:31] IrishGringo: has joined #RubyOnRails
[12:28:35] centrx: has joined #RubyOnRails
[12:29:12] annlewis: has joined #RubyOnRails
[12:30:06] mike___1234: has joined #RubyOnRails
[12:36:23] bonhoeffer: has joined #RubyOnRails
[12:36:28] maloik: has joined #RubyOnRails
[12:37:06] rushed: has joined #RubyOnRails
[12:40:09] Zggb: has joined #RubyOnRails
[12:40:46] drale2k: has joined #RubyOnRails
[12:41:17] jholm: has joined #RubyOnRails
[12:45:47] Ven: has joined #RubyOnRails
[12:46:33] akemrir: has joined #RubyOnRails
[12:47:13] hefest: i have the same configuration in config/environments/development.rb and config/environments/staging.rb. It's setting config.log_formatter = LogFormatter.new . When RAILS_ENV=development rails s it's using custom formatter, but when RAILS_ENV=staging rails s is executed for some reason it's not using custom log formatter. any ideas why?
[12:47:26] neilor: has joined #RubyOnRails
[12:47:41] workmad3: has joined #RubyOnRails
[12:50:48] mostlybadfly: has joined #RubyOnRails
[12:52:51] kitsuneyo: has joined #RubyOnRails
[12:55:36] ruurd: has joined #RubyOnRails
[12:56:47] bonhoeffer: yeah ??? so strange: session[:user_id] is stuck at 2
[12:56:51] bonhoeffer: and i can???t change it
[12:57:34] bonhoeffer: reset_session doesn???t clear it
[12:57:45] bonhoeffer: any options?
[12:57:55] weckl: has joined #RubyOnRails
[12:59:11] krisquigley: has joined #RubyOnRails
[13:00:26] Scripore: has joined #RubyOnRails
[13:02:13] beauby: has joined #RubyOnRails
[13:03:13] maz-dev: has joined #RubyOnRails
[13:04:29] sonOfRa: has joined #RubyOnRails
[13:05:01] victortyau: has joined #RubyOnRails
[13:08:52] Sylario: I want to select the users that have no paid contract, all i can get is user that does not have all contracts paid : User.includes(:contrats).where.not("contrats.state='paid'")
[13:09:23] Sylario: how can i ask for user that have no paid contrat amongst their existing ones?
[13:09:40] wethu: has joined #RubyOnRails
[13:10:01] johnflux: has joined #RubyOnRails
[13:10:41] mugurel: i have a question. I have a resource named blogs, and i would like to have a route inside that where i can pass a slug and look for a category with that slug. For example get /:slug, and i would like to link that route to the same controller but with a category action. I already have a get /:id resource that i need, and i don't want to use a different controller to have /blog/category/slug. And i can't pass the name of the slug because it will be dy
[13:12:18] Sylario: mugurel: what?
[13:13:12] Sylario: you want /blog/category/:slug and /blog/category/:id ?
[13:15:00] pwnd_nsfw: get '/blog/:category/:slug', to: 'controller#action' ??
[13:15:09] spiman: has joined #RubyOnRails
[13:15:26] habitullence: has joined #RubyOnRails
[13:15:39] prettiestPony11: has joined #RubyOnRails
[13:16:27] Cervajz_: has joined #RubyOnRails
[13:17:18] habitullence: Can someone tell me the best way of dealing with migrations and changes to model interface? How do I keep them in sync so I don't get broken interface calls?
[13:17:47] johnflux: in a function like: remove: function(userID, doc) { } is userID always equal to Meteor.user().id() ?
[13:17:49] mugurel: Sylario, pwnd_nsfw thanks for the solution. I am curios if it's possible to do something like blog/:slug so i can get categories dynamically without using /blog/category/slug but just blog/slug
[13:18:08] Sylario: mugurel: it is not a solution, i do not understand the question
[13:18:17] pwnd_nsfw: Oh, does the blog have an association to a category?
[13:18:21] johnflux: or rather, Meteor.userId() ?
[13:18:21] Sylario: yes it is possible
[13:18:22] pwnd_nsfw: or whatever is retrieved by slug
[13:19:22] dionysus69: has joined #RubyOnRails
[13:19:31] mugurel: pwnd_nsfw, yes one blog(post) belongs to a category
[13:19:32] strcmp1: has joined #RubyOnRails
[13:20:07] mugurel: can you guys help me figure it out, because it's seems hard to do, i don't really understand using slugs in rails, just id's
[13:20:09] drale2k: has joined #RubyOnRails
[13:20:16] dionysus69: is it possible to connect to an mssql server which is on remote pc?
[13:20:18] johnflux: oh wait, wrong channel :-D
[13:20:27] pwnd_nsfw: So, just do regular blog resource route, and there's already helper methods to get the category from the model
[13:20:43] pwnd_nsfw: resource :blog, param: :slug
[13:20:48] pwnd_nsfw: will change it from id to slug
[13:21:11] PotatoChipz: has joined #RubyOnRails
[13:21:13] pwnd_nsfw: Then make sure you change it in your controllers to support the new param name.
[13:22:06] kitsuneyo: has joined #RubyOnRails
[13:23:22] mugurel: pwnd_nsfw, how can i do that without having to use resources, i have a special case on my blog, so i need to use scope "/blog" do
[13:23:45] pwnd_nsfw: Basically the way I showed you before... just omitting the :category part
[13:24:34] mugurel: great, thanks
[13:24:44] lxsameer: has joined #RubyOnRails
[13:25:27] PotatoChipz: so I'm making custom validators...i wanted to pass some params from a method but I couldnt http://pastie.org/private/6z0ea5jzwwii3tseolya
[13:26:33] arup_r: PotatoChipz: What is not working ?
[13:27:31] PotatoChipz: For some reason, it's giving me this: ActiveRecord::SubclassNotFound (The single-table inheritance mechanism failed to locate the subclass: ???SomeType::SubType'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite ResponseType.inheritance_column to use another col
[13:27:44] PotatoChipz: I am calling the validator from an STI model
[13:27:47] jgt: has joined #RubyOnRails
[13:27:48] mrtomme_: has joined #RubyOnRails
[13:28:31] PotatoChipz: it's a totally different thing, why is it giving me that. If i uncomment my validator it's back to norma...
[13:28:32] arup_r: PotatoChipz: your code and errors is not matching
[13:28:42] nya: has joined #RubyOnRails
[13:28:56] arup_r: well. show the content of the method some_method
[13:29:05] arup_r: there is the problem it seems
[13:29:10] habitullence: Anyone know how to handle migrations and changes to models?
[13:29:57] annlewis: has joined #RubyOnRails
[13:30:04] PotatoChipz: arup_r the method is just a string! :S like.. a 'please output me' saved in a method
[13:30:29] arup_r: Well then show the Stacktrace of the error
[13:30:37] arup_r: full statcktrace
[13:31:25] givanse: has joined #RubyOnRails
[13:31:34] otherj: has joined #RubyOnRails
[13:32:14] habitullence: Should I be putting partial model definitions in migration? Don't like duplication but what are the options?
[13:32:39] Glyphik: has joined #RubyOnRails
[13:32:53] otherj: has joined #RubyOnRails
[13:33:07] pontiki: habitullence: !migrations
[13:33:07] helpa: habitullence: http://guides.rubyonrails.org/migrations.html - Migrations Guide by Frederick Cheung
[13:34:00] esauOp: has joined #RubyOnRails
[13:34:11] otherj: has joined #RubyOnRails
[13:34:57] habitullence: pontiki, can't see anything in there that tells me how to use migrations with models and avoid brittle migrations
[13:35:17] pontiki: that is what the entire page is about
[13:35:33] pontiki: the. entire. page.
[13:36:21] otherj: has joined #RubyOnRails
[13:36:48] strcmp1: has joined #RubyOnRails
[13:37:19] arup_r: habitullence: Can you tell us what is the requirement or what are you trying to do ?
[13:37:30] habitullence: pontiki, can check the toc to see that it's not...
[13:37:38] krz: has joined #RubyOnRails
[13:38:28] pontiki: what exactly does it look like it uses migrations with if not models?
[13:38:56] pontiki: is there some other part of rails besides models that use migrations in rails that i'm not aware of?
[13:40:36] habitullence: arup_r, I'm using a migration with a call to a model method, problem is when migrations are run again from scratch the earlier migration breaks because the latest model checked out is different. When I last looked at it I came across datafixes but I'd like to handle this without another gem if there's a cheaper way
[13:40:45] arup_r: sami: It worked ?
[13:41:41] charliesome: has joined #RubyOnRails
[13:41:54] shoelessone: has joined #RubyOnRails
[13:42:17] arup_r: habitullence: The thing you are doing has to go in the seeds.rb file.. migrations are not the correct way of doing that
[13:42:37] arup_r: migrations are all related to schema set up.. that's it.
[13:43:02] strcmp1: has joined #RubyOnRails
[13:43:33] alexUaN: has joined #RubyOnRails
[13:46:28] alexUaN: Hi. How can I convert hash like this: {:a => "a", :b => ["b1", "b2"]} to query with index: "a=a&b[0]=b1&b[1]=b2" ?
[13:47:10] habitullence: arup_r, thanks and for taking the time to understand, most helpful :) This is the article if you're interested http://railsguides.net/change-data-in-migrations-like-a-boss/. Would be interested in further thoughts...
[13:48:04] arup_r: alexUaN: {:a => "a", :b => ["b1", "b2"]}.to_query
[13:48:18] dionysus69: when is rails 5 scheduled to release and where can I find upcoming changes?
[13:49:23] spiman: Is there a way to send a plain jquery ajax request to my controller and have rails respond with a .js.erb template? It seems to only work with remote: true
[13:49:37] strcmp1: has joined #RubyOnRails
[13:50:15] alexUaN: arup_r: CGI.unescape({:a => "a", :b => ["b1", "b2"]}.to_query) => "a=a&b[]=b1&b[]=b2". Without indexes ((
[13:50:55] roxtrongo: has joined #RubyOnRails
[13:51:10] alexUaN: I'm on 3.2 by the way
[13:51:29] arup_r: alexUaN: http://apidock.com/rails/Hash/to_query
[13:51:36] neilor: has joined #RubyOnRails
[13:51:38] Axighi: has joined #RubyOnRails
[13:51:46] arup_r: baiscally we don't make query string, like that
[13:51:53] Axighi: hello, I'm a rails a girl
[13:51:57] Axighi: any tutor?
[13:52:18] arup_r: If you are in Rails you can use http://apidock.com/rails/v3.2.1/Hash/to_query
[13:52:23] bendangelo: has joined #RubyOnRails
[13:52:37] Axighi: arup_r: talk to me
[13:53:04] arup_r: axighi: :)
[13:53:16] Axighi: arup_r: bye
[13:53:36] andywww: has joined #RubyOnRails
[13:53:36] alexUaN: arup_r: I know it but it creates without indexes. I need it for some api (not rails)
[13:53:57] andywww: is there a helper i can use in views to build a url from a hash?
[13:54:14] andywww: like url_something({controller: :ignore_list, action: :show, format: :json})
[13:54:24] elaptics: andywww: url_for
[13:54:27] arup_r: axighi: why are you looking for a tutor ?
[13:54:33] charliesome: has joined #RubyOnRails
[13:54:35] rails323: has joined #RubyOnRails
[13:54:36] andywww: yeah i tried that, its doesn???t like it
[13:54:46] someish: has joined #RubyOnRails
[13:54:52] bonhoeffer: has joined #RubyOnRails
[13:54:53] elaptics: andywww: what are you trying to do exactly?
[13:55:47] andywww: trying to build an ajax url in a .js.erb file
[13:55:54] arup_r: habitullence: Mate, use seeds.rb
[13:56:22] mderm: has joined #RubyOnRails
[13:56:24] arup_r: alexUaN: You want to make an API ?
[13:56:30] andywww: https://gist.github.com/anonymous/977ca0e51398198273b1
[13:56:31] bronson: has joined #RubyOnRails
[13:56:32] arup_r: Rails API i meant
[13:56:35] ledestin: has joined #RubyOnRails
[13:57:17] mderm: hi, I'm working on a rails project and am totally stuck. It's not for work or school but amateur for a charity.
[13:57:23] rails323: Any one got time for a small question?
[13:57:38] habitullence: arup_r, so you would use this for initial seeding, deployment updates, and just keep it up-to-date?
[13:57:42] alexUaN: arup_r: no, in Rails project I used some additional API. And it requires these indexes
[13:58:02] arup_r: habitullence: yes.. Otherwise you will be in trouble
[13:58:11] mderm: http://pastebin.com/Hv1zUPKN
[13:58:21] arup_r: if you change the name of the table in future then.. what you will do ?
[13:58:48] FailBit: idunno, pastebin is pretty fast for me, but those ads are killing me
[13:58:51] andywww: url_for isn???t playing, it says:
[13:58:56] andywww: throw Error("NoMethodError: undefined method `url_for' for #<#<Class:0x000001104a0f40>:0x000001104c16a0>
[13:59:02] arup_r: alexUaN: Ok.. Can you tell me the API url how looks like
[13:59:05] ebbflowgo: has joined #RubyOnRails
[13:59:33] habitullence: arup_r, word! Much appreciated :)
[13:59:36] mderm: https://gist.github.com/anonymous/baeedcf69808b0f26ecc
[14:00:10] rails323: I am using a view to generate an AJAX response, I had to use .to_jason.html_safe, If I dont use .html_safe ERB will add sings that will mess up the JSON, Am I suppose to use views for JSON response? or do it somehow in the controller?
[14:00:56] annlewis: has joined #RubyOnRails
[14:01:17] moeabdol: has joined #RubyOnRails
[14:01:17] elsurudo: has joined #RubyOnRails
[14:01:33] alexUaN: arup_r: It's closed APi. But parameters (POST) should be like this (variables[item][0][headlink], variables[item][1][headlink] ...)
[14:02:05] shapeshifter: has joined #RubyOnRails
[14:02:06] mderm: problem: I have a before_action callback that determines before show, edit if a model has related lines in submodel tables. If yes, 'show', if not 'create'. That works fine. Problem is updating/editing. After hitting update button, app redirects to 'new'.
[14:02:57] djinni`: has joined #RubyOnRails
[14:02:59] mderm: it should only do that where no existing related lines exist
[14:03:00] reber: has joined #RubyOnRails
[14:03:52] stardiviner: has joined #RubyOnRails
[14:04:01] Ropeney: has joined #RubyOnRails
[14:04:06] spiman: has joined #RubyOnRails
[14:05:06] rails323: any kind stranger?
[14:05:13] dustinm`: has joined #RubyOnRails
[14:05:18] quazimodo: has joined #RubyOnRails
[14:09:20] moeabdol: has joined #RubyOnRails
[14:09:28] jher: has joined #RubyOnRails
[14:09:40] ariedler: has joined #RubyOnRails
[14:11:03] ebbflowgo: has joined #RubyOnRails
[14:13:50] Swappticon: has joined #RubyOnRails
[14:14:05] arup_r: alexUaN: You want to post to the thrird party API right ?
[14:14:20] alexUaN: arup_r: yes
[14:14:43] arup_r: Are you using views ?
[14:15:01] arup_r: like .html.erb ?
[14:15:02] alexUaN: no, only models
[14:16:52] arup_r: create your own class inside the lib/ and there write your own code with this http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html#method-i-post and POST it
[14:16:59] arup_r: alexUaN: ^^
[14:17:08] g3funk: has joined #RubyOnRails
[14:18:03] arup_r: This is another way to do POST and it will WORK
[14:18:57] northfurr: has joined #RubyOnRails
[14:21:05] arup_r: alexUaN: check this http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html#class-Net::HTTP-label-POST
[14:21:18] arup_r: sorry this http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html#class-Net::HTTP-label-POST+with+Multiple+Values
[14:21:30] arup_r: And this is what you exactly want
[14:22:31] alexUaN: arup_r: I know how to do POST query. And it will not work without explicit indexes in params. I have a very complex and nested data (with arrays and hashes). I can build that query with own method but I want to find a more simple solution
[14:22:52] kegan_: has joined #RubyOnRails
[14:23:20] arup_r: Ok.. I am not aware of then.. I do most POST request that way.. When I am not posting using any HTML form
[14:23:56] kitsuneyo: has joined #RubyOnRails
[14:25:03] pontiki: alexUaN: if you have a method you've built already, and it works, i'd suggest going forward with the rest of your project and not getting stuck in this area.
[14:26:43] charliesome: has joined #RubyOnRails
[14:28:28] chills42_: has joined #RubyOnRails
[14:29:28] jholm: has joined #RubyOnRails
[14:29:55] moeabdol: has joined #RubyOnRails
[14:30:17] rails323: I am using a view to generate an AJAX response, I had to use .to_jason.html_safe, If I dont use .html_safe ERB will add sings that will mess up the JSON, Am I suppose to use views for JSON response? or do it somehow in the controller?
[14:30:20] nettoweb: has joined #RubyOnRails
[14:31:15] Scripore: has joined #RubyOnRails
[14:31:56] arup_r: rails323: I think you can't show HTML and JSON altogether .. Do you ?
[14:32:33] astrodog: Has anyone here tried using Ruby on Rails with R?
[14:32:39] arup_r: create a view like action_name.jbuilder.erb and there you write the rendered data and it will make nice JSON for you
[14:32:43] centrx: astrodog, yes
[14:33:00] yaw: has joined #RubyOnRails
[14:33:13] astrodog: centrx: I have them sharing a Postgres database... just curious as to if there's a gem or R package that makes the process a little smoother.
[14:33:17] arup_r: centrx: R is for Data analysis right ?
[14:33:24] astrodog: Ideally, I want to dispatch jobs from Ruby to R for processing.
[14:33:38] centrx: arup_r, Yes it's similar to S
[14:33:47] arup_r: what is S ?
[14:34:03] centrx: arup_r, S is the predecessor to T
[14:34:38] pwnd_nsfw: why "be_truthy". That seems a bit ridiculous lol
[14:34:39] arup_r: Ok.,, I knew C
[14:34:53] centrx: astrodog, I use RSRuby, so you can use R directly in Ruby
[14:35:16] centrx: astrodog, There is also RinRuby, which is slower and has a different interface, but is sometimes more reliable
[14:35:29] rodfersou: has joined #RubyOnRails
[14:36:04] zeknox: has joined #RubyOnRails
[14:36:22] astrodog: centrx: Ah! Interesting. That seems it'd be worth trying out. My current method through the database can be a little cumbersome.
[14:38:12] shoelessone: has joined #RubyOnRails
[14:38:16] w0rd-driven: has joined #RubyOnRails
[14:38:43] centrx: astrodog, Last I checked, this is the most up to date/stable branch - https://github.com/custora/rsruby
[14:38:56] kitsuneyo: has joined #RubyOnRails
[14:39:24] gavit: arup_r: you meant gamov right?
[14:39:25] arup_r: alexUaN: http://stackoverflow.com/a/803067/2767755
[14:39:32] astrodog: centrx: Any gotchas I should be aware of with using it? (Things like data.frames or zoos behaving oddly.)
[14:40:03] arup_r: May be.. I forgot all now.. My sessions is cleared :(
[14:40:08] arup_r: gavit: ^^
[14:40:28] alexUaN: arup_r: Thanks, it's exactly I needed
[14:40:55] arup_r: alexUaN: Hehe.. I am hopeless guy
[14:41:39] centrx: astrodog, To pass data frames in/out, see instructions at top of https://github.com/alexgutteridge/rsruby/blob/master/examples/dataframe.rb
[14:41:46] arup_r: alexUaN: Les Brown made me wild (http://lesbrown.com/)
[14:41:49] centrx: astrodog, have to initialize the RSRuby instance with some boilerplate
[14:42:08] centrx: astrodog, and require 'rsruby/dataframe'
[14:42:14] centrx: astrodog, So there are some quirks, but it works and is very fast
[14:42:28] astrodog: centrx: Any support for running zoos in and out, or do I need to "wash" them through dataframes?
[14:42:36] i: has joined #RubyOnRails
[14:43:05] arup_r: I am leavuing guys.. heavily raining
[14:43:42] centrx: astrodog, What's a zoo?
[14:43:45] rushed: has joined #RubyOnRails
[14:43:53] dopie: has joined #RubyOnRails
[14:44:11] astrodog: centrx: Irregular Time Series package.
[14:44:28] centrx: yeah I don't know, may need to whip up a little method for it
[14:44:45] astrodog: Worst case, I can always turn it into a data frame first, I suppose.
[14:45:17] w0rd-driven: has joined #RubyOnRails
[14:45:20] astrodog: Sort of blows me away that all of this works on FreeBSD, running on armv6. *grin*
[14:45:25] oscarb92: has joined #RubyOnRails
[14:45:38] pwnd_nsfw: Really digging Rails in Action
[14:45:40] oscarb92: nickserv /identify oscarb92 20506388
[14:45:49] pwnd_nsfw: Nice pass m8
[14:48:58] alex88: has joined #RubyOnRails
[14:51:06] charliesome: has joined #RubyOnRails
[14:52:30] Sylario: has joined #RubyOnRails
[14:53:49] jhack: has joined #RubyOnRails
[15:00:21] oscarb92: has joined #RubyOnRails
[15:00:23] krz: has joined #RubyOnRails
[15:00:26] Quintasan: Anyone using Devise with polymorphic model? I'm trying to create an edit form for Volunteer and Organization (inheriting from User). Is it possible save the object without providing the password?
[15:01:34] northfurr: has joined #RubyOnRails
[15:03:38] oscarb92: Would you recommend a gem to manage a daily events calendar with rails? say doctors appointments schedule
[15:04:32] shoelessone: has joined #RubyOnRails
[15:04:50] jgladwill: has joined #RubyOnRails
[15:04:50] oscarb92: Or any compatible front end solution?
[15:05:33] astrodog: oscar: What are you hoping for it to do with the daily events?
[15:05:44] jhack: has joined #RubyOnRails
[15:06:10] givanse: has joined #RubyOnRails
[15:07:42] disgrntld: has joined #RubyOnRails
[15:09:46] oscarb92: astrodog: I'm building a scheduling app for a health center. First I'd like to save each doctor's particular schedule (schedule table) and then I'd like to display to the patients who search for a specific doctor her schedule and let them assign an appointment (appointments table)
[15:10:35] oscarb92: astrodog: the tables store datetime fields
[15:11:25] astrodog: What do you want the gem to do?
[15:12:18] northfurr: has joined #RubyOnRails
[15:12:31] workmad3: has joined #RubyOnRails
[15:17:05] oscarb92: astrodog: help me build the calendar in html and setup parameters, send formatted data to the controller, restrict some actions in the view, maybe?
[15:17:13] motown: has joined #RubyOnRails
[15:17:25] astrodog: Ah! I understand now.
[15:19:30] charliesome: has joined #RubyOnRails
[15:19:50] astrodog: oscar: Something like icalendar with calendar_helper seems like it'd work well.
[15:19:51] SPYGAME: has joined #RubyOnRails
[15:20:37] jholm: has joined #RubyOnRails
[15:22:37] SPYGAME: i need to validate a model object where association_id is not blank. how do i validate this ?
[15:22:47] lindii_: has joined #RubyOnRails
[15:23:04] Axighi: has joined #RubyOnRails
[15:23:52] charliesome: has joined #RubyOnRails
[15:24:45] strcmp1: spygame, validates :association_id, presence: true
[15:25:00] strcmp1: and NOT NULL constraint in DB probably
[15:25:41] habitullence: has joined #RubyOnRails
[15:26:17] tejasmanohar: has joined #RubyOnRails
[15:26:47] havenwood: has joined #RubyOnRails
[15:29:41] kitsuneyo: has joined #RubyOnRails
[15:31:23] pushpak: has joined #RubyOnRails
[15:32:32] zeknox: has joined #RubyOnRails
[15:33:43] zeknox: has joined #RubyOnRails
[15:35:12] The_Phoenix: has joined #RubyOnRails
[15:35:17] tvon: has joined #RubyOnRails
[15:36:22] turbo_MaCk: has joined #RubyOnRails
[15:36:28] charliesome: has joined #RubyOnRails
[15:41:58] oscarb92: astrodog: http://fullcalendar.io/docs/ something like this would work with calendar_helper?
[15:44:25] cornerma1: has joined #RubyOnRails
[15:45:00] maz-dev: has joined #RubyOnRails
[15:45:10] otherj: has joined #RubyOnRails
[15:45:21] kitsuneyo: has joined #RubyOnRails
[15:46:04] chills42: has joined #RubyOnRails
[15:46:32] otherj: has joined #RubyOnRails
[15:47:51] Tinyyy: has joined #RubyOnRails
[15:48:02] otherj: has joined #RubyOnRails
[15:49:08] otherj: has joined #RubyOnRails
[15:50:35] Lightsword: has joined #RubyOnRails
[15:54:11] otherj: any ideas for what would cause rails to be able to connect to a database but not return any records? rails seems to be able to connect but if I go to the console and put Model.all, I just get => #<ActiveRecord::Relation []>
[15:54:20] otherj: not sure where to begin troubleshooting this
[15:54:33] centrx: Look at the log file to see what query is being issued
[15:54:35] kegan_: has joined #RubyOnRails
[15:54:38] centrx: Are there actually any records in the table?
[15:55:31] Jardayn: has joined #RubyOnRails
[15:55:38] otherj: it's weird, because basically if I run it locally with just rails s it's working
[15:55:57] otherj: but I'm in a vagrant virtual machine with this and it shows the behavior I mentioned
[15:56:13] otherj: the production log shows wht one might expect
[15:56:34] n008f4g_: has joined #RubyOnRails
[15:56:43] otherj: so I'm wondering if it's some kind of environment problem
[16:00:17] J30: has joined #RubyOnRails
[16:00:42] J30: hey guys, is rails plugin new uhoh --mountable still a valid syntax for rails 4? or is it something from rails 3?
[16:00:53] kitsuneyo: has joined #RubyOnRails
[16:01:26] shoelessone: has joined #RubyOnRails
[16:01:41] otherj: man, this is really weird
[16:01:49] Linuus: has joined #RubyOnRails
[16:02:16] otherj: I even switched from rbenv to just system ruby, thinking that might be the problem
[16:02:41] chrise86: has joined #RubyOnRails
[16:03:27] turbo_MaCk: has joined #RubyOnRails
[16:03:31] chrise86: does anyone know if it's possible to set a non-secure cookie inside a rails app that has config.force_ssl = true set?
[16:03:53] dcope: has left #RubyOnRails: ()
[16:05:02] ascarter: has joined #RubyOnRails
[16:05:45] prettiestPony11: has joined #RubyOnRails
[16:07:43] andywww: has joined #RubyOnRails
[16:08:04] riotjones: has joined #RubyOnRails
[16:09:39] Rakunh0: has joined #RubyOnRails
[16:09:48] neutrino: has joined #RubyOnRails
[16:11:19] pwnd_nsfw: Shouldn't sudo service postgresql restart return a message?
[16:11:43] pyemkey: has joined #RubyOnRails
[16:11:49] pwnd_nsfw: I tried to edit pg_hba.conf, but the changes aren't taking. Trying to fix peer authentication issue.
[16:13:34] pyemkey: Hello. I would like to know is it possible to share devise session between 2 rails apps. I have the same cookie name and secret key base. Problem is when I log in on rails app X and go to app Y and go back to X. After this actions my user is logged out. Any idea why this happens?
[16:14:30] krz: has joined #RubyOnRails
[16:14:57] prasselpikachu: has joined #RubyOnRails
[16:15:20] dopie: How do i run validations with a non model backed form?
[16:15:59] jgt: has joined #RubyOnRails
[16:17:06] neilor: has joined #RubyOnRails
[16:17:27] AlHafoudh: has joined #RubyOnRails
[16:19:23] Rakunh0: has joined #RubyOnRails
[16:21:14] pwnd_nsfw: has joined #RubyOnRails
[16:21:17] maz-dev: has joined #RubyOnRails
[16:21:35] xcesariox: has joined #RubyOnRails
[16:25:04] Ven: has joined #RubyOnRails
[16:27:25] infoget: has joined #RubyOnRails
[16:27:28] [H]unt3r: has joined #RubyOnRails
[16:27:56] yardenbar: has joined #RubyOnRails
[16:28:16] chills42: has joined #RubyOnRails
[16:28:43] infoget: Hi guys, I would like to two merge two activerecords and sort by date, is it possible?
[16:30:31] herbst: has joined #RubyOnRails
[16:30:31] herbst: has joined #RubyOnRails
[16:30:35] ruurd: has joined #RubyOnRails
[16:32:36] pwnd_nsfw: I feel I've blown up my psql lol
[16:32:43] violarium: has joined #RubyOnRails
[16:32:47] maz-dev: has joined #RubyOnRails
[16:33:12] TomyLobo: has joined #RubyOnRails
[16:34:39] nicholson_: has joined #RubyOnRails
[16:35:57] DLSteve: has joined #RubyOnRails
[16:36:01] nicholson_: Hi, what's the best way to update the value of a div without refreshing the page? The div gets its value from Stripe API. I've tried various AJAX methods but they don't seem to work.
[16:36:06] Swappticon: has joined #RubyOnRails
[16:36:18] habitullence: has joined #RubyOnRails
[16:37:44] violarium: Hello, does somebody known a channel of railsgirls?
[16:38:22] kegan_: what is the minimum I have to do to make proper associations if i create a new model without using a generator
[16:39:06] FailBit: kegan_: you'll have to create a migration that does add_reference on the proper models
[16:39:21] FailBit: or if you have a HABTM relationship you'll need a third table to manage the relations
[16:39:25] kegan_: here's where I'm confused
[16:39:45] kegan_: if I do that, do I have to add the id to the model that contains the foreign key
[16:39:50] kegan_: or does that do it for me
[16:39:59] kegan_: like t.belongs_to :object, index: true
[16:40:06] kegan_: or should I just use add_reference instead?
[16:40:22] neilor: has joined #RubyOnRails
[16:40:50] sonofdirt: has joined #RubyOnRails
[16:41:03] ruurd: has joined #RubyOnRails
[16:42:12] allcentury: has joined #RubyOnRails
[16:42:16] kitsuneyo: has joined #RubyOnRails
[16:42:21] l1meon: has joined #RubyOnRails
[16:42:57] arup_r: has joined #RubyOnRails
[16:44:45] pwnd_nsfw: Postgres fuckin' my day up
[16:44:52] violarium: Hello, does somebody want to take a part in small opensource project? https://github.com/violarium/ruby_moon
[16:45:20] roshanavand: has joined #RubyOnRails
[16:45:57] kegan_: how does indexing differ from
[16:46:13] jas02: has joined #RubyOnRails
[16:46:18] kegan_: add_reference(:foo, :bar) with foo table containing bar_id integer column
[16:46:35] kegan_: does that allow you to foo.bar? or what
[16:46:46] banister: has joined #RubyOnRails
[16:47:43] kegan_: clearly I am reading the fucking docs
[16:47:46] kegan_: I am just stupid
[16:47:52] kegan_: so can you help a stupid guy out
[16:49:39] arup_r: Guys, any bod use Sublimetext as your devlopment editor? if so tell me some names of the plugin which will ease devlopment speed.
[16:49:39] FailBit: let's go with a more practical example than foo and bar
[16:49:51] FailBit: if I have 2 tables
[16:49:55] FailBit: reports, and users
[16:50:02] FailBit: and a report belongs_to a user
[16:50:07] FailBit: and a user has_many reports
[16:50:13] FailBit: add_reference :reports, :user
[16:50:19] FailBit: will create a user_id column on the reports table
[16:50:37] FailBit: rails will recognize that when you do report.user
[16:51:10] pwnd_nsfw: has joined #RubyOnRails
[16:51:20] habitullence: has joined #RubyOnRails
[16:51:49] zpe: has joined #RubyOnRails
[16:52:14] kegan_: thank you very much, FailBit. understood. so then what is the index: true option doing, then?
[16:52:21] eGGsha: has joined #RubyOnRails
[16:52:29] pwnd_nsfw: E: Unable to locate package postgres
[16:52:31] pwnd_nsfw: Are you fucking kidding me
[16:52:34] kegan_: is that only necessary in polymorphic associations or
[16:52:36] pwnd_nsfw: WHY LINUX WHY
[16:52:40] FailBit: it's postgresql-9.3
[16:52:46] FailBit: or postgresql-9.4 etc
[16:52:54] yfeldblum: has joined #RubyOnRails
[16:52:59] kegan_: because I just manually added an object_id field via migration
[16:53:04] pwnd_nsfw: E: Couldn't find any package by regex 'postgres-9.4'
[16:53:08] pwnd_nsfw: same for 9.3
[16:53:20] kegan_: and the associations in their respective models
[16:53:25] FailBit: kegan_: the index option will also add an index on that column (btree)
[16:53:39] FailBit: so that while you may be able to look up a user by its primary key on a report
[16:53:45] FailBit: you would also want to be able to find reports a user made
[16:54:00] FailBit: the other side of the has_many relationship.
[16:54:33] kegan_: index: true in that case would allow user.reports?
[16:54:41] FailBit: it would allow fast lookup of user.reports
[16:54:52] FailBit: otherwise it would be doing a tablescan
[16:54:52] kegan_: whereas it would work before but it would be slower
[16:54:54] kegan_: because it was not indexed
[16:54:56] kegan_: that makes sense
[16:55:05] kegan_: wow fucking thank you
[16:55:11] j4d: has joined #RubyOnRails
[16:55:39] esauOp: has joined #RubyOnRails
[16:55:39] chouhoulis: has joined #RubyOnRails
[16:56:11] maz-dev: has joined #RubyOnRails
[16:56:13] FailBit: you don't need to have that index, mind you, if you have other ways of looking that up
[16:56:22] FailBit: like if you fed stuff into elasticsearch, for example
[16:57:13] prettiestPony11: has joined #RubyOnRails
[16:57:19] rakm: has joined #RubyOnRails
[16:58:15] sonofdirt: has joined #RubyOnRails
[16:58:58] J30: hey guys, is "rails plugin new uhoh --mountable" still a valid syntax for rails 4? or is it something from rails 3?
[16:58:58] alphaatom: has joined #RubyOnRails
[17:00:33] yaw: has joined #RubyOnRails
[17:01:27] ruurd: has joined #RubyOnRails
[17:01:50] johnflux: has joined #RubyOnRails
[17:02:04] petricore: has joined #RubyOnRails
[17:02:14] johnflux: has left #RubyOnRails: ()
[17:02:18] violarium: J30: when I've been creating gem for rails 4 it was valid
[17:02:49] Maletor: has joined #RubyOnRails
[17:03:21] acti0nman: has joined #RubyOnRails
[17:03:52] Maletor: has joined #RubyOnRails
[17:03:59] pwnd_nsfw: https://gist.github.com/SirUncleCid/3b19a5591e59a1199d69 This is ridiculous.
[17:04:11] pwnd_nsfw: Been through several SO pages to no avail
[17:05:23] FailBit: you checked the obvious stuff, right?
[17:05:34] pwnd_nsfw: I honestly don't know the obvious stuff
[17:05:38] ruurd_: has joined #RubyOnRails
[17:05:40] pwnd_nsfw: Linux is pretty foreign to me.
[17:05:44] FailBit: service postgresql status
[17:05:46] pwnd_nsfw: I installed it yesterday, in fact.
[17:06:16] pwnd_nsfw: https://gist.github.com/SirUncleCid/eaa4199dcc84ef1fc8ef
[17:06:43] neilor: has joined #RubyOnRails
[17:06:55] FailBit: okay, do sudo -u postgres -s
[17:07:00] FailBit: then `psql`
[17:07:24] pwnd_nsfw: bash: /root/.bashrc: Permission denied
[17:07:25] arooni-mobile: has joined #RubyOnRails
[17:07:30] pwnd_nsfw: for sudo -u postgres -s
[17:07:44] northfurr_: has joined #RubyOnRails
[17:08:11] FailBit: that's amusing
[17:08:19] FailBit: does it bring you to a shell, or kick you out
[17:08:21] pwnd_nsfw: Tell me about it... haha
[17:08:35] pwnd_nsfw: I just remain in the same terminal window
[17:10:00] qejk: has joined #RubyOnRails
[17:10:06] allcentury: has joined #RubyOnRails
[17:10:35] wpp: has joined #RubyOnRails
[17:11:51] mary5030: has joined #RubyOnRails
[17:13:19] chouhoulis: has joined #RubyOnRails
[17:14:59] ariedler: has joined #RubyOnRails
[17:15:49] mary5030: has joined #RubyOnRails
[17:16:03] baweaver: has joined #RubyOnRails
[17:16:45] pwnd_nsfw: This is rough
[17:17:04] pwnd_nsfw: Tried uninstalling postgres, removing whatever directories, deleting users/groups
[17:17:08] pwnd_nsfw: and starting over
[17:17:37] chills42: has joined #RubyOnRails
[17:18:00] Ven: has joined #RubyOnRails
[17:21:36] vmatiyko_: has joined #RubyOnRails
[17:24:01] jholm: has joined #RubyOnRails
[17:24:12] sundhell: has joined #RubyOnRails
[17:28:10] Sylario: has joined #RubyOnRails
[17:28:25] northfurr: has joined #RubyOnRails
[17:30:33] gambl0re: has joined #RubyOnRails
[17:30:53] yfeldblum: has joined #RubyOnRails
[17:31:20] Meow-J: has joined #RubyOnRails
[17:33:49] emba: has joined #RubyOnRails
[17:33:56] hololeap: has joined #RubyOnRails
[17:34:51] yfeldblum: has joined #RubyOnRails
[17:36:51] Zamerick: has joined #RubyOnRails
[17:37:48] yfeldblum: has joined #RubyOnRails
[17:38:16] Swappticon: has joined #RubyOnRails
[17:38:39] HAL2328: has joined #RubyOnRails
[17:39:42] sonofdirt: has joined #RubyOnRails
[17:40:40] naftilos76: has joined #RubyOnRails
[17:41:36] sonofdirt: has joined #RubyOnRails
[17:42:03] pwnd_nsfw: FailBit, thanks for your help earlier. Ended up being able to get it finally.
[17:43:13] kinduff: has joined #RubyOnRails
[17:44:32] ecky7: has joined #RubyOnRails
[17:44:55] ruurd: has joined #RubyOnRails
[17:48:20] jgt: has joined #RubyOnRails
[17:48:34] northfurr: anyone know a good vim plugin for erb snippets? Mainly for <%= %> and <% %>
[17:48:55] nya: has joined #RubyOnRails
[17:49:26] fedexo: has joined #RubyOnRails
[17:49:38] Cervajz: has joined #RubyOnRails
[17:50:47] dionysus69: has joined #RubyOnRails
[17:51:22] dionysus69: has anyone ever deployed rails on windows with a MS SQL db ?
[17:52:43] srinidhi: has joined #RubyOnRails
[17:53:36] acti0nman: has joined #RubyOnRails
[17:54:45] krisquigley: has joined #RubyOnRails
[17:55:17] finnnnnnnnnnn: has joined #RubyOnRails
[17:57:10] neilor: has joined #RubyOnRails
[17:59:17] gambl0re: how do i access the bootstrap css file?
[18:00:38] iszak: has joined #RubyOnRails
[18:01:30] pwnd_nsfw: gambl0re, is it not in your assets? Are you loading it from the CDN?
[18:01:34] rhizome: just override whatever you want to change
[18:01:57] gambl0re: i tried...its not working
[18:02:26] rhizome: https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity
[18:03:14] gambl0re: i cant even change the color of the navbar header
[18:03:28] Ecky7_: has joined #RubyOnRails
[18:04:09] pwnd_nsfw: When I run commands in root, they work (subl, psql, env, etc.), but when I run them as user they go "blah blah is located at /hur/dur/cmd"
[18:04:12] gambl0re: .navbar-brand {color:red} should change the font color but when i inspect the css its still using the default bootstrap colors
[18:04:20] FailBit: pwnd_nsfw: add it to your $PATH
[18:04:40] FailBit: export PATH="/sbin:/usr/sbin/:$PATH"
[18:04:49] FailBit: that is one thing that annoys me about debian
[18:05:08] rhizome: i bet bootstrap has built-in ways of changing colors
[18:05:33] gambl0re: so theres no way to access the bootstrap css file? you can only overwrite?
[18:06:14] pwnd_nsfw: Thanks FailBit
[18:07:35] kegan_: has joined #RubyOnRails
[18:07:53] infoget: has left #RubyOnRails: ()
[18:10:24] cpg: has joined #RubyOnRails
[18:11:41] hardtail: has joined #RubyOnRails
[18:11:43] hardtail: join #python
[18:12:04] hardtail: lol sorry for the mt
[18:17:13] roxtrongo: has joined #RubyOnRails
[18:17:33] Lycanii: has joined #RubyOnRails
[18:18:54] corioliss: has joined #RubyOnRails
[18:20:51] Cervajz_: has joined #RubyOnRails
[18:24:14] w0rd-driven: has joined #RubyOnRails
[18:24:25] Swappticon: has joined #RubyOnRails
[18:26:35] mclee_: has joined #RubyOnRails
[18:28:29] alexhartley: has joined #RubyOnRails
[18:28:36] Lightsword: has joined #RubyOnRails
[18:28:53] DmitryBochkarev: has joined #RubyOnRails
[18:29:59] Sylario: has joined #RubyOnRails
[18:31:12] yardenbar: has joined #RubyOnRails
[18:31:26] alexhartley: has joined #RubyOnRails
[18:32:00] herbst: has joined #RubyOnRails
[18:35:03] pontiki: has joined #RubyOnRails
[18:35:13] w0rd-driven: has joined #RubyOnRails
[18:36:35] gambl0re: yes i got it...custom bootstrap css working.!
[18:37:35] rhizome: did you need to access the bootstrap css file?
[18:37:43] maz-dev: has joined #RubyOnRails
[18:38:27] chouhoul_: has joined #RubyOnRails
[18:39:47] dopie: Hey rhizome
[18:40:55] dopie: I have one where I'm pretty much stuck, the overview I am trying to make sure that validations are used on whatever the customer submits to update his CC ... his information isn't in the DB so its a non model backed form I looked at the rails cast on this but got some errors
[18:40:56] dopie: https://gist.github.com/staycreativedesign/6a16489e0f2b937cd4c7
[18:41:01] Ecky7_: has joined #RubyOnRails
[18:41:35] dopie: getting NoMethodError (undefined method `valid?' for #<ActiveSupport::HashWithIndifferentAccess:0x007fce6ba52648>):
[18:41:35] dopie: app/controllers/credit_card_update_controller.rb:34:in `update'
[18:41:59] dopie: I know I can't run .valid? on a hash but on a object
[18:42:15] dopie: but did I set the params hash to an object called test?
[18:43:57] rromanchuk: has joined #RubyOnRails
[18:44:22] Wizek: has joined #RubyOnRails
[18:44:38] kegan_: my fields_for a has_one accepts_nested_attributes_for polymorphic do not save with the parent create method
[18:44:41] kegan_: common troubleshooting?
[18:45:37] n00bDev: has joined #RubyOnRails
[18:45:54] krz: has joined #RubyOnRails
[18:46:25] jgt: has joined #RubyOnRails
[18:46:51] iszak: has joined #RubyOnRails
[18:46:51] iszak: has joined #RubyOnRails
[18:47:17] n00bDev: has left #RubyOnRails: ()
[18:54:02] neruda: has joined #RubyOnRails
[18:54:08] Swappticon: has joined #RubyOnRails
[18:54:27] neruda: hi, is there a shorthand way to validate *all* fields in a model are present?
[18:54:42] neruda: rather than enumerate all of them with :presence => true
[18:54:58] yardenbar: has joined #RubyOnRails
[18:56:35] maz-dev: has joined #RubyOnRails
[18:57:08] idd2d: has joined #RubyOnRails
[18:57:22] iszak: has joined #RubyOnRails
[18:57:42] pontiki: seems that you have to enumerate them somehow...
[18:57:54] pwnd_nsfw: has joined #RubyOnRails
[18:58:10] craysiii: has joined #RubyOnRails
[18:58:37] arup_r: validates *model.column_names, presence: true
[18:58:42] arup_r: neruda: ^^
[18:59:06] pontiki: that's still enumerating them...
[18:59:07] habitullence: has joined #RubyOnRails
[18:59:41] arup_r: Then no other way
[19:00:44] FailBit: I didn't even know about that trick
[19:00:46] banjara: has joined #RubyOnRails
[19:00:47] FailBit: that's prety cool
[19:01:07] arup_r: ACTION feels proud
[19:01:20] toretore: has joined #RubyOnRails
[19:02:13] pontiki: indeed, well done, arup_r
[19:03:48] Tinyyy: has joined #RubyOnRails
[19:03:53] DEA7TH: has joined #RubyOnRails
[19:03:53] dopie: has joined #RubyOnRails
[19:04:07] FailBit: column_names is an array of string tho
[19:04:18] FailBit: so you may want column_names.map(&:to_sym)
[19:06:06] pontiki: that may still work
[19:06:16] pontiki: but it's workable either way
[19:07:21] Linuus: has joined #RubyOnRails
[19:08:21] pwnd_nsfw: has joined #RubyOnRails
[19:09:05] esauOp: has joined #RubyOnRails
[19:09:23] Swappticon: has joined #RubyOnRails
[19:14:15] iszak: has joined #RubyOnRails
[19:14:34] sonofdirt: has joined #RubyOnRails
[19:14:46] Pupeno: has joined #RubyOnRails
[19:14:57] esauOp_: has joined #RubyOnRails
[19:19:30] workmad3: has joined #RubyOnRails
[19:20:07] rodfersou: has joined #RubyOnRails
[19:20:38] iszak: has joined #RubyOnRails
[19:20:38] iszak: has joined #RubyOnRails
[19:24:23] rogue_koder: has joined #RubyOnRails
[19:25:24] futilegames: has joined #RubyOnRails
[19:26:54] kitsuneyo: has joined #RubyOnRails
[19:26:59] minotep: has joined #RubyOnRails
[19:28:52] kegan_: this form is using patch no matter what I seem to do
[19:29:53] yaw: has joined #RubyOnRails
[19:30:32] chipotle: has joined #RubyOnRails
[19:31:13] iszak: has joined #RubyOnRails
[19:31:13] iszak: has joined #RubyOnRails
[19:32:37] herbst: has joined #RubyOnRails
[19:32:49] rickmasta: has joined #RubyOnRails
[19:32:57] roxtrongo: has joined #RubyOnRails
[19:37:22] jholm: has joined #RubyOnRails
[19:38:00] newtonianb: has joined #RubyOnRails
[19:38:34] chills42: has joined #RubyOnRails
[19:38:49] MartinElvar: has joined #RubyOnRails
[19:40:21] drikerf: has joined #RubyOnRails
[19:42:31] nahtnam: has joined #RubyOnRails
[19:43:06] prettiestPony11: has joined #RubyOnRails
[19:43:13] nahtnam: Is there a release candidate for rails 5 I can use or do I have to go with bleeding edge? I want to use the new rails 5 api and I dont want to wait until the release (which is probably a few months out)
[19:43:14] DLSteve: has joined #RubyOnRails
[19:43:51] drikerf: has joined #RubyOnRails
[19:44:34] maz-dev: has joined #RubyOnRails
[19:45:06] iloverubynoob: has joined #RubyOnRails
[19:45:06] alexhartley: has joined #RubyOnRails
[19:45:30] dzejms: has joined #RubyOnRails
[19:46:27] dzejms: How well do you need to know ROR so you can land a real job?
[19:47:02] dzejms: I'm kinda new to it lets say about 2weeks and I'm curious how long will it take me to earn some cash
[19:47:09] alexhartley: has joined #RubyOnRails
[19:47:13] northfurr: has joined #RubyOnRails
[19:50:23] arooni-mobile: has joined #RubyOnRails
[19:51:04] neilor: has joined #RubyOnRails
[19:55:44] krisquigley: has joined #RubyOnRails
[19:56:43] VeryBewitching: has joined #RubyOnRails
[19:58:31] zoidfarb: has joined #RubyOnRails
[19:59:44] zoidfarb: I'm trying to send an email with ActionMailer, but on my development system (a vagrant virtual machine) I wind up with a weird 500 error: Launchy::CommandNotFoundError (Unable to find a browser command. If this is unexpected, Please rerun with environment variable LAUNCHY_DEBUG=true or the '-d' commandline option and file a bug at https://github.com/copiousfreetime/launchy/issues/new)
[19:59:56] zoidfarb: I don't understand why it would be trying to launch a browser at all
[20:00:29] zoidfarb: That error makes sense, in that the virtual machine doesn't have a browser installed, but I don't see why it thinks it needs a browser
[20:00:35] FailBit: dzejms: how well can you problem solve
[20:00:51] alexhartley: has joined #RubyOnRails
[20:00:55] FailBit: your ability to use google makes much more a difference than trying to know all of rails will
[20:01:22] cac: has joined #RubyOnRails
[20:01:28] alexhartley: has joined #RubyOnRails
[20:01:53] smathy: has joined #RubyOnRails
[20:03:42] schaary: has joined #RubyOnRails
[20:04:32] tejasmanohar: has joined #RubyOnRails
[20:06:46] jlebrech: has joined #RubyOnRails
[20:06:53] alexhartley: has joined #RubyOnRails
[20:08:41] neilor: has joined #RubyOnRails
[20:09:42] mostlybadfly: has joined #RubyOnRails
[20:10:45] Mendenhall: has joined #RubyOnRails
[20:13:08] huck5: has joined #RubyOnRails
[20:14:12] workmad3: has joined #RubyOnRails
[20:14:24] czerasz: has joined #RubyOnRails
[20:14:39] huck5: I have two erb links, one links to `effects_path` and one to `species_path`. Why might one of these routes be directing to the /show action, and the other seems to be directing to the /index action?
[20:15:30] stevednd: has joined #RubyOnRails
[20:17:12] huck5: I mean, I know I can get around it by just linking 'species#index', but I am curious as to why they might be linking to different actions. The routes appear to be setup the same in the routes.config file, and the controllers are both just default generated.
[20:17:32] habitullence: has joined #RubyOnRails
[20:18:30] FailBit: that's interestimg
[20:18:44] FailBit: effects_path and species_path should both go to #index
[20:19:00] FailBit: pluralization
[20:19:18] FailBit: one species, many species
[20:19:38] FailBit: damn engrish
[20:20:22] w0rd-driven: has joined #RubyOnRails
[20:21:17] metalic: has joined #RubyOnRails
[20:23:34] huck5: Lol, no real way to get around that is there? Or would Rails maybe see it as Specieses?
[20:24:42] huck5: Besides re-thinking my model name, I mean. And also thanks FailBit.
[20:25:02] startupality: has joined #RubyOnRails
[20:25:19] FailBit: see what 'rake routes' says
[20:25:22] w0rd-driven: has joined #RubyOnRails
[20:25:40] futilegames_: has joined #RubyOnRails
[20:25:43] FailBit: you should probably just link to the index page tho
[20:25:53] jsrn_: has joined #RubyOnRails
[20:26:37] gambl0re: with using devise, i want to edit the log in template but the /devise/sessions/ folder is empty
[20:26:52] FailBit: gambl0re: rails g devise:views
[20:26:55] gambl0re: yet the log in page still renders
[20:27:08] gambl0re: i have the devise folder
[20:27:20] gambl0re: but sessions folder is empty.
[20:27:27] gambl0re: but the log in page still renders the form
[20:27:58] FailBit: um, it generated views/devise/sessions last time I did it
[20:28:18] gambl0re: i have views/devise/sessions
[20:28:32] gambl0re: but inside the sessions folder is empty
[20:28:41] gambl0re: theres no template files inside
[20:28:53] hololeap: has joined #RubyOnRails
[20:29:25] FailBit: https://github.com/liamwhite/litebooru/blob/master/app/views/devise/sessions/new.html.slim
[20:29:33] FailBit: that's the only template it places in there
[20:29:40] northfurr_: has joined #RubyOnRails
[20:30:30] Radar: GOOD MORNING
[20:30:32] FailBit: and it also uses labels and <br>
[20:30:38] FailBit: I'm sorry about last night
[20:30:47] Radar: FailBit: That's ok. Please don't do it again.
[20:31:23] gambl0re: wtf....when i create a new.html.erb file inside the sessions folder, it says the filenmae already exists
[20:31:27] yfeldblum: has joined #RubyOnRails
[20:31:38] gambl0re: unless im blind, i dont see any file
[20:31:46] Radar: gambl0re: what OS are you on?
[20:32:07] iloverubynoob: gambl0re try ls -a in the folder?
[20:32:09] Radar: gambl0re: ls app/views/devise/sessions | wc -l
[20:32:15] x-light: has joined #RubyOnRails
[20:33:14] Radar: What number odes that return?
[20:33:53] ruurd: has joined #RubyOnRails
[20:34:31] mike___1234: has joined #RubyOnRails
[20:34:50] iloverubynoob: gambl0re: ls -al directly in the folder should be more readable... How could the devise:views have created a hidden file though?
[20:35:38] MartinElvar: has joined #RubyOnRails
[20:36:30] Radar: 1 is the correct number
[20:36:33] Radar: File must exist?
[20:39:04] arBmind: has joined #RubyOnRails
[20:39:08] Kedare: has joined #RubyOnRails
[20:39:38] michaelpri: has joined #RubyOnRails
[20:40:20] Kedare: I have a little question, I have 2 many to many models ???Recipe??? and ???Ingredient??? and I want to be able do an ActiveRecord search for a recipe that includes all the ingredients, how can I do this ?
[20:40:25] Kedare: I can???t find how to do this
[20:40:41] rickmasta: has joined #RubyOnRails
[20:40:51] michaelpri: Hello everyone o/
[20:41:06] northfurr_: has joined #RubyOnRails
[20:41:29] FailBit: https://www.youtube.com/watch?v=1Pt95JqXmxY this is me using dragonfly
[20:41:43] FailBit: don't use dragonfly
[20:43:02] chipotle: has joined #RubyOnRails
[20:43:27] jhack: has joined #RubyOnRails
[20:45:05] krisquigley: has joined #RubyOnRails
[20:48:58] northfurr_: has joined #RubyOnRails
[20:51:03] northfurr_: has left #RubyOnRails: ()
[20:53:07] rickmasta: has joined #RubyOnRails
[20:55:41] pecpec: FailBit: Why do you not recommend it?
[20:56:02] FailBit: use paperclip or something sane
[20:56:15] FailBit: dragonfly likes to mess with your files a lot
[20:56:17] Limix: has joined #RubyOnRails
[20:56:30] FailBit: and then it complains if you do so much as touch the timestamps on it
[20:56:45] FailBit: occasionally just pretends things don't exist
[20:57:47] pecpec: so better off to break it into two steps: upload with paperclip and process with something else?
[20:58:14] otherj: has joined #RubyOnRails
[20:58:22] acti0nman: has joined #RubyOnRails
[20:59:25] otherj: has joined #RubyOnRails
[20:59:50] netzfisch: has joined #RubyOnRails
[21:00:38] otherj: has joined #RubyOnRails
[21:01:19] habitullence: has joined #RubyOnRails
[21:01:46] otherj: has joined #RubyOnRails
[21:02:59] otherj: has joined #RubyOnRails
[21:03:56] michaelpri: has joined #RubyOnRails
[21:04:17] michaelpri: Can anyone help me with something for Rails?
[21:04:33] tejasmanohar: has joined #RubyOnRails
[21:06:23] givanse: has joined #RubyOnRails
[21:07:18] otherj: you'll probably have more success if you just ask
[21:12:31] craysiii: anyone use has_permalink gem? any other recommendations for something similar?
[21:17:18] idd2d: has joined #RubyOnRails
[21:18:52] SteenJobs: has joined #RubyOnRails
[21:18:55] Xiti: has joined #RubyOnRails
[21:23:10] finnnnnnnnnnn: has joined #RubyOnRails
[21:24:22] blackmesa: has joined #RubyOnRails
[21:25:34] dzejms: How well do you need to know ROR so you can land a real job?
[21:25:39] jholm: has joined #RubyOnRails
[21:25:54] FailBit: dzejms: see my answer earlier
[21:25:55] Rakunh0: has joined #RubyOnRails
[21:25:57] rickmasta: has joined #RubyOnRails
[21:26:46] otherj: why would you even want a ror job without knowing it extremely well?
[21:27:59] ferz_: has joined #RubyOnRails
[21:28:27] dzejms: because I need money really bad atm :/
[21:29:14] Balzrael: has joined #RubyOnRails
[21:29:58] bruno-: has joined #RubyOnRails
[21:30:27] newtonianb: has joined #RubyOnRails
[21:31:59] dzejms: ah I agree on that FailBit, was thinking other then basic understanding in MVC, how hard is to put it live on server? What is most important to know?
[21:32:32] FailBit: are you proficient with linux?
[21:32:41] lele: has joined #RubyOnRails
[21:33:15] dzejms: I'm using it for a few weeks
[21:33:20] otherj: FailBit, what was your comment earlier on this topic?
[21:34:22] dzejms: <FailBit> your ability to use google makes much more a difference than trying to know all of rails will
[21:34:32] dzejms: <FailBit> dzejms: how well can you problem solve
[21:35:05] dzejms: Is there working around security how well grounded is it, and how hard is to implement API's?
[21:35:35] dzejms: FailBit, what do I need to know around linux that is important?
[21:37:15] FailBit: if you work on production, you'll at least need to know how to use cap, how to ssh in if something blows up, and how to restart stuff
[21:39:02] FailBit: I've had one too many a bad deploy
[21:39:22] FailBit: one too many a late night spent repairing stuff in the database
[21:39:35] Radar: dzejms: What books have you read to learn Rails?
[21:39:53] Radar: FailBit: I deployed a change this morning that deleted data from a production database that I didn't mean to delete.
[21:40:00] Radar: Luckily it's only my own app.
[21:40:27] huck5: That's scary.
[21:40:46] Radar: It was a silly combination of things that made it happen.
[21:40:49] FailBit: (by the way, DON'T make methods ending with ? that have side effects!)
[21:40:53] cashnguns: has joined #RubyOnRails
[21:40:58] olausm: has joined #RubyOnRails
[21:41:17] ebbflowgo: has joined #RubyOnRails
[21:41:22] FailBit: (in my case, it was that Tag#is_destroyable? literally started killing the tag when called)
[21:41:37] dzejms: Radar, Why's (Poignant) Guide to Ruby
[21:41:38] FailBit: let me dig that sauce on that up
[21:42:16] dzejms: Radar, what do you recommend
[21:42:24] Radar: dzejms: Rails 4 in Action, the book that I wrote :P
[21:42:26] Radar: dzejms: !r4ia
[21:42:26] helpa: dzejms: Rails 4 in Action - http://manning.com/bigg2 - An excellent book combining Rails and TDD/BDD development. Written by Rebecca Skinner, Steve Klabnik, Ryan Bigg, Yehuda Katz
[21:43:07] FailBit: https://i.imgur.com/NMDMoLQ.png
[21:43:15] FailBit: that one was a fun bug
[21:43:28] newtonianb: has joined #RubyOnRails
[21:44:43] elaptics: FailBit: that's one big method
[21:44:44] Radar: That method is doing at least 18 different things
[21:45:06] elaptics: I'm guessing it's not tested :)
[21:45:13] dzejms: thanks guys
[21:45:31] FailBit: the latter part was moved into #remove_associations!
[21:45:41] neilor: has joined #RubyOnRails
[21:45:42] Balzrael: /msg NickServ VERIFY REGISTER Balzrael oxjhvhrtumld
[21:45:48] FailBit: and then the committer wrote a nice big test for that block
[21:45:55] dzejms: Btw what is the BDD development ?
[21:46:29] dzejms: What job do you spend most the time doing?
[21:46:53] dzejms: And can you tell me about security how good is it from the scratch
[21:47:02] Balzrael: /msg NickServ VERIFY REGISTER Balzrael oxjhvhrtumld
[21:47:07] elaptics: Balzrael: hope you're changing your password :D
[21:47:22] FailBit: Balzrael, you just pasted your confirmation code into the channel
[21:47:32] elaptics: dzejms: BDD is Behaviour Driven Development
[21:47:40] Balzrael: haven't used IRC since I was a teenager
[21:47:55] FailBit: IRC is a pretty friggin old protocol
[21:48:06] elaptics: dzejms: reading code
[21:48:06] dzejms: Balzrael, thanks
[21:48:06] Balzrael: I am getting old also
[21:48:24] elaptics: dzejms: not quite sure what you mean about security
[21:48:39] dzejms: elaptics, what kinda, you spend most the time in controller for example or modifying gems or
[21:48:41] Balzrael: /msg NickServ
[21:49:36] FailBit: Balzrael: don't put a space before your message
[21:49:46] FailBit: also don't put two slashes
[21:50:03] Radar: Balzrael: Perhaps start a PM session with nickserv and authenticate through that?
[21:50:19] elaptics: dzejms: what are you asking me?
[21:50:24] Radar: dzejms: BDD is why my code doesn't break as often as it used to.
[21:50:25] dzejms: Do you have to configure something except default for making e-com platform for example
[21:51:04] dzejms: I'll check that one for sure :D
[21:51:36] dzejms: But the problem is I'm new now, and just wanna know what tasks are in front of me and what will be the hardest part
[21:51:37] shinnya: has joined #RubyOnRails
[21:51:43] roxtrongo: has joined #RubyOnRails
[21:52:07] FailBit: getting into the hang of activerecord migrations was a bit daunting coming from mongoid, but it turned out to be pretty easy
[21:52:07] elaptics: dzejms: are you new to programming in general? New to web development, or both?
[21:52:12] dzejms: elaptics, do you have some book for Behaviour Driven Development?
[21:52:23] Radar: dzejms: Rails 4 in Action will teach you Rails AND BDD.
[21:52:26] Radar: Two for the price of one
[21:52:30] Radar: buy buy buy
[21:52:57] elaptics: dzejms: There is the Rspec book which covers BDD whilst teaching rspec and cucumber, etc
[21:53:17] elaptics: or you could buy Radar's book
[21:53:25] dzejms: Well know the basic of programming was doing front-end but not so much with javascript only some jQuery stuff
[21:53:29] Radar: (which Radar worked very hard on)
[21:53:33] yaw: has joined #RubyOnRails
[21:53:45] FailBit: could you shill yourself any harder? :D
[21:53:54] elaptics: doubtful :)
[21:55:14] rodfersou: has joined #RubyOnRails
[21:55:46] elaptics: dzejms: no offense but doing a bit of jquery based javascript isn't going to get you too far. You probably want to start off with concentrating on just ruby before getting too far into rails as well
[21:56:10] FailBit: I try to avoid writing JS
[21:56:23] Radar: FailBit: Yeah, I could put the link to the book in the topic... or I could make the entire topic just "BUY RAILS 4 IN ACTION TODAY https://manning.com/bigg2"
[21:56:26] elaptics: dzejms: it's a huge topic overall, just start somewhere and keep plugging away, bit by bit
[21:56:30] dzejms: Well I'm willing to work my ass of as much as needed to learn it :)
[21:56:32] Radar: But since this channel is not mine to do that to...
[21:56:47] FailBit: cs topicappend
[21:56:55] dzejms: Well I covered basic of 10h on codecademy for ruby
[21:57:01] dnewkerk: has joined #RubyOnRails
[21:57:03] nettoweb: has joined #RubyOnRails
[21:57:08] dzejms: and rails 5h work + codeschool stuff for ROR
[21:57:53] elaptics: dzejms: and do you feel like you understood it all?
[21:58:31] dzejms: I was pretty dedicated
[21:59:05] elaptics: great! just keep going then, start building things and when you get stuck come here or the #ruby channel to ask questions
[21:59:12] FailBit: interestingly, I never derived much value from programming books, I'd read the first few chapters, and then start programming what interested me, and google what I didn't know
[21:59:15] pecpec: dzejms: Incidentally I just discovered a podcast by starthere.fm/category/rubyonrails, whose first episode is about how to start learning rails (among others)
[21:59:29] dzejms: I know experience and google are most important but how long will it take me from this lvl to actually working something
[21:59:39] elaptics: FailBit: when I started programming, google didn't exist :)
[21:59:51] FailBit: *cough* old
[21:59:59] FailBit: I started in like
[22:00:01] elaptics: dzejms: that's very much dependent on you
[22:00:07] FailBit: and that was VB.NET
[22:00:13] FailBit: (which is now dying a horrible death)
[22:00:24] frzn: has joined #RubyOnRails
[22:00:25] dzejms: for example I'm working 6 hours a day
[22:00:31] frzn: has joined #RubyOnRails
[22:00:31] elaptics: FailBit: I have clothes older than that :)
[22:00:36] Sylario: has joined #RubyOnRails
[22:00:55] dzejms: how long will I need month, two, five, year?
[22:01:08] elaptics: dzejms: all of the above
[22:01:16] huck5: I have a scaffolded view, with `<%= render 'form %>`. I'm wondering what this equates to? Is it similar to `<%= form_for @my_model do |m| %>` ?
[22:01:32] FailBit: huck5: isn't that just a partial render?
[22:01:39] quazimodo: has joined #RubyOnRails
[22:01:41] huck5: FailBit: *facepalm*
[22:02:01] FailBit: I prefer to clarify partial renders
[22:02:06] FailBit: = render partial: 'form'
[22:02:13] dzejms: elaptics, but when do you think I could actually take a job at lvl of 5 month developing or if I work hard is it doable in like 2 months
[22:02:29] FailBit: I'm also a hipster and prefer slim over erb where performance is not critical
[22:02:33] huck5: FailBit, `<%= render partial: 'form' %>` ?
[22:02:37] FailBit: huck5: yes
[22:02:52] elaptics: dzejms: that depends on so many factors it's impossible to say
[22:02:57] workmad3: has joined #RubyOnRails
[22:03:13] erich__: has joined #RubyOnRails
[22:03:15] huck5: Thanks. I have zero exposure to Slim. Any good resources you'd care to share?
[22:03:18] dzejms: What are the most important factors it can depend on
[22:03:21] elaptics: FailBit: haml or go home ;)
[22:03:47] helpa: http://i.imgur.com/tyViD.gif
[22:03:52] Radar: give me erb or give me death
[22:03:56] dzejms: Where should I be focused max, and what is the hardest part for you to get well known elaptics
[22:04:09] elaptics: ACTION gives Radar some death
[22:04:09] Radar: dzejms: I want you to spend a week reading Rails 4 in Action
[22:04:13] FailBit: elaptics: what I've found with haml is that slim tends to outperform it by a bit
[22:04:15] FailBit: ACTION gives Radar cake
[22:04:17] Radar: dzejms: After that, then please ask more questions
[22:04:18] pecpec: dzejms: it's hard to tell from here... but what about getting in touch with employers or face to face with people in the vicinity of where you live?
[22:04:28] pecpec: Maybe attend Meetups?
[22:04:30] dzejms: roger that my friend :)
[22:04:30] Radar: dzejms: Right now you should be focussing on learning as much rails as you can, and that book is the best for you.
[22:04:31] Radar: bbl, walking
[22:04:39] x-light: has joined #RubyOnRails
[22:04:49] elaptics: FailBit: ahaha, I applaud your Eddie Izzard reference :)
[22:04:50] FailBit: not by a lot, but enough that in production it did make a difference
[22:05:05] FailBit: elaptics: how many people do you know, know that one?
[22:05:24] elaptics: FailBit: most of my *old* friends
[22:06:06] Balzrael: can you guys recommend any resources on advanced rails stuff, especially extending the framework and adding new functionality to it?
[22:06:28] dzejms: Radar, does the book cover much of the stuff or it goes deep in some subjects you need well grounded ?
[22:06:32] elaptics: Balzrael: crafting rails book was pretty good
[22:06:36] FailBit: huck5: it's like haml but with less % symbols
[22:06:44] Balzrael: I am reading that now
[22:06:53] huck5: FailBit, thanks!
[22:06:59] Balzrael: but I couldn't find anything else besides it
[22:07:12] FailBit: huck5: https://raw.githubusercontent.com/liamwhite/litebooru/master/app/views/comments/_form.html.slim
[22:07:15] elaptics: no, most books are focussed on beginner to intermediate level
[22:07:32] elaptics: don't really know of any others
[22:07:36] Balzrael: that is pretty depressing
[22:07:58] huck5: FailBit, woah. That's pretty neat!
[22:08:33] FailBit: I prefer it to writing erb, for larger templates
[22:08:36] rickmasta: has joined #RubyOnRails
[22:08:39] FailBit: for smaller templates, erb is fine
[22:08:51] elaptics: FailBit: is line 5 a typo or some specific slim syntax?
[22:09:22] workmad3: has joined #RubyOnRails
[22:09:25] FailBit: elaptics: it means put html whitespace after it
[22:09:36] DeweyD: has joined #RubyOnRails
[22:09:37] FailBit: by default slim renders ugly and does not insert whitespace
[22:10:00] FailBit: there are 3 ways to insert whitespace, =< (before), => (after), =<> (before+after)
[22:10:10] rocknrollMarc: has joined #RubyOnRails
[22:10:20] FailBit: same idea with element tags (a<>)
[22:10:50] Rakunh0: has joined #RubyOnRails
[22:11:25] FailBit: html whitespace was one of the sore spots when I migrated a codebase from haml to slim
[22:11:25] elaptics: haml has similar with < and > and ~
[22:11:43] FailBit: because haml always inserts whitespace I think
[22:12:27] roxtrongo: has joined #RubyOnRails
[22:13:21] FailBit: and then ofc there was some haml bug that we had to work around, that got tossed when I replaced the relevant template with erb
[22:14:37] FailBit: https://i.imgur.com/2D7tiZ8.png
[22:15:19] elaptics: yeah, I probably wouldn't use haml to render rss
[22:16:09] FailBit: I looked into the slim docs to see if slim could render rss, and I think it can, but it was probably better to just stick with erb for that one
[22:16:23] elaptics: that or use xml builder or similar
[22:16:29] FailBit: builder was a pita
[22:16:33] FailBit: I tried it.
[22:17:03] FailBit: I also wasn't quite sure how to insert CDATA so I was also somewhat screwed
[22:17:10] Balzrael: or just write your own renderer for rails and it will do whatever you want based on your templates
[22:17:22] FailBit: yeah but nobody wants to do that
[22:17:40] Balzrael: it might be easier that working around the problem
[22:17:42] FailBit: if you do that you might as well just rewrite the framework
[22:18:00] Balzrael: the framework offers hooks and api endpoints to do it
[22:18:12] Balzrael: but they aren't that well documented unfortunately
[22:18:14] FailBit: yes, which is how temple works
[22:18:29] FailBit: if you write a rails template language, chances are it can use temple
[22:18:42] elaptics: what is temple?
[22:18:44] Coldblackice: has joined #RubyOnRails
[22:19:04] acti0nman: has joined #RubyOnRails
[22:19:51] allcentury: has joined #RubyOnRails
[22:20:23] jholm: has joined #RubyOnRails
[22:23:16] VeryBewitching: https://github.com/judofyr/temple
[22:23:56] elaptics: FailBit: fwiw, just checked an old app, to add cdata with builder it is just xml.cdata!("Your stuff here") - assuming `xml` is your builder object
[22:24:56] FailBit: I just took the youtube survey. :I
[22:25:19] FailBit: https://i.imgur.com/WJjNPSD.png
[22:26:26] Balzrael: that is a good one
[22:26:58] Radar: Ok, I'm now at work :)
[22:27:10] Radar: dzejms: Read Well-Grounded Rubyist first if you haven't already, then R4IA.
[22:27:31] Balzrael: have a good work day without too many bugs
[22:27:55] Rakunh0: has joined #RubyOnRails
[22:27:57] jonr22: has joined #RubyOnRails
[22:28:23] Radar: I hope so :)
[22:28:54] Balzrael: we can all hope so but the the odds are against us
[22:28:57] hydrozen: has joined #RubyOnRails
[22:29:17] elaptics: Balzrael: best way I've found is to write no code :)
[22:29:20] FailBit: I always write bug free code every time
[22:29:24] FailBit: guaranteed
[22:29:27] Balzrael: how easy is it to find a remote job as a rails dev?
[22:29:29] FailBit: ACTION gets shot
[22:29:47] Balzrael: in our minds we always write bug free code
[22:29:58] FailBit: Balzrael: it didn't take me much effort to find my position deving for a quite well known rails imageboard
[22:30:10] Balzrael: running the darn thing is always problematic
[22:30:12] FailBit: of course, just like the 8ch mods I >do it for free
[22:30:20] hydrozen: did something change with actionmailer in rails 4.2? When I check the html_part.body of the mailer, it actually looks like headers and the actual content of the email is nowhere to be found.... what I receive instead is this: <html>\n <body>\n Date: Mon, 07 Sep 2015 18:26:23 -0400\nFrom: noreply@paul-hus.com\nReply-To: hydrozen@gmail.com\nTo: daniel@paul-hus.com\nMessage-ID: &lt;55ee0f0fc39a_ba973fcfd8c60204740c7@pph.local.mail&g
[22:30:21] hydrozen: t;\nSubject: Message\nMime-Version: 1.0\nContent-Type: text/plain\nContent-Transfer-Encoding: 7bit\n\n\n\n </body>\n</html>\n"
[22:30:30] havenwood: has joined #RubyOnRails
[22:31:25] Balzrael: @FailBit and are you from the US working for a US company?
[22:31:34] Spami: has joined #RubyOnRails
[22:32:07] FailBit: I don't work as a programmer
[22:32:13] FailBit: but I do live in the US and work for a US company
[22:32:47] Balzrael: I'm from Europe but I would love to work remote for a US company
[22:32:50] huck5: If I have a model in my database that I don't want to be edited through my application, but I want to be included in some collections (e.g. for a dropdown list), I would still need to include a model file?
[22:33:00] huck5: But not any of the associated controllers/views?
[22:33:29] Radar: huck5: yes
[22:33:34] huck5: Thanks Radar!
[22:34:10] pecopeco: has joined #RubyOnRails
[22:34:16] huck5: The model would then hold any of the required associative data, and the absence of a controller would prevent a user from accessing any of the model's CRUD via the application. Thanks!
[22:34:30] FailBit: I still have an obsession for programming
[22:34:43] FailBit: and not being in the field currently makes me hungry for application
[22:34:57] Balzrael: are you in management now?
[22:35:05] Balzrael: did you go to the dark side
[22:35:07] FailBit: so I picked up development for booru-on-rails. ??\_(???)_/??
[22:35:24] FailBit: Balzrael: I work as that guy who sits in his office imaging laptops
[22:37:23] elaptics: huck5: there's no specific requirement that a model and controller have to be related in any way
[22:37:38] Radar: What elaptics said
[22:37:47] huck5: That makes sense.
[22:37:50] elaptics: huck5: e.g. you can create a UsersController and then use that to load Article models, etc
[22:38:25] huck5: elaptics, right... but wouldn't that be a little counter-intuitive?
[22:38:42] elaptics: yes, but the point is that there's no requirement, either way
[22:38:49] Balzrael: it depends on what your business logic needs
[22:39:37] crystal77: has joined #RubyOnRails
[22:41:09] ch0ke: has joined #RubyOnRails
[22:42:56] ducklobster: hi all, rails newbie here
[22:43:08] ducklobster: following rails guide and something doesn't doesn't make sense
[22:43:09] ducklobster: https://gist.github.com/anonymous/5e8d1842ef1f21534bd7
[22:43:13] erich__: has joined #RubyOnRails
[22:43:17] ducklobster: i used the resource :articles
[22:43:30] ducklobster: but the new articles is a GET request
[22:43:33] ducklobster: shouldn't it be POST?
[22:44:59] FailBit: there's a difference between #new and #create
[22:45:04] FailBit: new fetches the form
[22:45:06] FailBit: create posts the model
[22:45:22] Radar: What FailBit said
[22:47:42] neilor: has joined #RubyOnRails
[22:50:04] wethu: has joined #RubyOnRails
[22:51:26] nya: has joined #RubyOnRails
[22:52:36] rubyonrails052: has joined #RubyOnRails
[22:53:26] stardiviner: has joined #RubyOnRails
[22:56:16] startupality: has joined #RubyOnRails
[22:56:33] NBarnes: has joined #RubyOnRails
[22:56:51] Aeyrix: FailBit: Now you answer to derpibooru
[22:56:58] Aeyrix: I kind of feel bad for you.
[22:59:43] sgre: has joined #RubyOnRails
[23:02:29] Pupeno: has joined #RubyOnRails
[23:02:40] superlou: has joined #RubyOnRails
[23:02:54] Mendenhall: has left #RubyOnRails: ("WeeChat 1.0.1")
[23:03:55] FailBit: Aeyrix, but why
[23:03:59] mike___1234: has joined #RubyOnRails
[23:04:42] Aeyrix: The type of community that is the brony community makes me really feel for anyone that has to answer to it.
[23:05:02] Aeyrix: This includes Hasbro, McDonald's when they were giving away MLP happy meal toys, etc.
[23:05:15] shoelessone: has joined #RubyOnRails
[23:05:29] FailBit: I don't identify as the sterotypical fedora neckbeard brony :v
[23:05:45] FailBit: although I happen to use fedora 22 and have a slight neckbeard, ironically
[23:05:58] petricore: has joined #RubyOnRails
[23:06:02] FailBit: I don't have any merchandise
[23:07:17] Aeyrix: >I have a neckbeard ironically
[23:07:38] Aeyrix: I'm not yet awake enough to laugh this much at the structure of that sentence.
[23:07:38] FailBit: https://i.imgur.com/gJujK8U.jpg
[23:07:53] FailBit: see I also have an insane knife collection
[23:08:26] sevenseacat: has joined #RubyOnRails
[23:08:46] arBmind1: has joined #RubyOnRails
[23:08:46] nettoweb: has joined #RubyOnRails
[23:08:52] Aeyrix: Moin sevenseacat
[23:08:55] Aeyrix: You're up early.
[23:08:59] sevenseacat: bonan matenon
[23:09:07] sevenseacat: I am in Canberra, so, time difference
[23:09:20] Aeyrix: What're you doing out this way? :p
[23:09:37] sevenseacat: consulting for a week on-site with a client
[23:10:34] x-light: good morning sevenseacat
[23:10:47] theery: has joined #RubyOnRails
[23:11:53] Aeyrix: FailBit: wew lad
[23:12:02] NBarnes: has joined #RubyOnRails
[23:12:11] Aeyrix: So you own no merchandise
[23:12:16] Aeyrix: Do you even count as a brony then
[23:12:22] Aeyrix: I don't really know how it works
[23:12:23] FailBit: I watch the show
[23:12:23] x-light: sevenseacat: I always wanted to be one of those flash consulting types, but I never had the chops. *sigh*
[23:12:26] FailBit: I've made art
[23:12:29] FailBit: I mean does that count
[23:12:48] Aeyrix: But from what I gathered on the internet you have to have a pony blow up doll
[23:12:51] Aeyrix: Or whatever
[23:12:56] sevenseacat: x-light: wanna swap? :P
[23:12:59] FailBit: and also a bad dragon MLP toy
[23:13:07] FailBit: (don't google that if you don't know what it is)
[23:13:17] FailBit: (I don't have one)
[23:13:47] cball: has joined #RubyOnRails
[23:14:07] FailBit: that's like
[23:14:15] FailBit: 30% of the art on the site
[23:14:21] Aeyrix: That's a lot
[23:14:32] FailBit: https://derpibooru.org/970269 here's my amazing graph showing it
[23:14:58] FailBit: (not really)
[23:16:13] Aeyrix: Doesn't work on mobile.
[23:16:44] FailBit: what browser and os
[23:16:59] FailBit: I put some work into making a half working mobile version for the site
[23:19:51] FailBit: https://derpicdn.net/img/view/2015/9/1/970269.svg there :V
[23:19:57] FailBit: raw chart file
[23:21:01] allcentury: has joined #RubyOnRails
[23:24:00] Aeyrix: Nice meme
[23:25:10] Palsson: has joined #RubyOnRails
[23:26:43] kaymation: has joined #RubyOnRails
[23:27:05] n00bDev: has joined #RubyOnRails
[23:27:22] n00bDev: has left #RubyOnRails: ()
[23:28:13] jhack: has joined #RubyOnRails
[23:30:36] Kedare: has joined #RubyOnRails
[23:33:26] FailBit: http://niceme.me
[23:34:05] corioliss: has joined #RubyOnRails
[23:34:46] herbst: has joined #RubyOnRails
[23:36:21] x-light: sevenseacat: on second thought....
[23:38:03] LiquidInsect: has joined #RubyOnRails
[23:41:01] pwnd_nsfw: Loving the approach of Rails in Action
[23:45:22] VeryBewitching: has joined #RubyOnRails
[23:46:02] huck5: I have an Effect model, made up of fk's to a Feeling and a Level model. In my Strain/new view, I want the user to be able to individually chose a Feeling and a Level from DDL's. Then, if an Effect with the corresponding Level and Feeling FK's exists, link to that; otherwise create a new Effect. The way to achieve this is through back-end coding, right? Or is there maybe a shortcut or relationship that I am missing?
[23:46:18] Swappticon: has joined #RubyOnRails
[23:47:17] rickmasta: has joined #RubyOnRails
[23:48:08] ascarter: has joined #RubyOnRails
[23:48:47] neilor: has joined #RubyOnRails
[23:48:59] NBarnes: I'm getting a ForbiddenAttributesError (i.e. strong params violation) here https://gist.github.com/nbarnes/b6e4331ced2699aea13d
[23:49:14] NBarnes: Does anybody know how to permit that sort of creation of a model in that fashion?
[23:49:41] sevenseacat: nbarnes: you're not using your palette_params method
[23:49:59] sevenseacat: also why are you creating colours in a palettes controller instead of a colors controller
[23:50:04] NBarnes: How would I set that up so that it serves both create_color and create itself?
[23:50:10] NBarnes: Because colors are created in the context of a palette.
[23:50:13] ascarter: has joined #RubyOnRails
[23:50:31] NBarnes: Worth thinking about, though.
[23:51:08] sevenseacat: need some more context on what exactly you're trying to do, I think
[23:51:20] sevenseacat: are you trying to submit one form and create a palette with multiple colours at the same time?
[23:51:46] NBarnes: No, it's a form that makes a single color, as r g b, on the page that displays a palette (a collection of colors)
[23:52:00] Jasaka: has joined #RubyOnRails
[23:52:12] NBarnes: Which is why the create_color is in the palette controller, because the page it comes from is on the palette controller.
[23:52:20] NBarnes: Which is not a necessary reason, but is the current reason.
[23:52:58] sevenseacat: ok, then you should have a colours controller
[23:53:15] Moonlight-Angel: has joined #RubyOnRails
[23:53:16] sevenseacat: and post to something like /palettes/2/colors to create a color on palette ID 2
[23:53:29] dnewkerk: has joined #RubyOnRails
[23:53:47] NBarnes: And send that post to the ColorsController via a route in routes.rb?
[23:54:20] NBarnes: (I do already have a colors controller that does all the things you'd expect)
[23:54:59] yaw: has joined #RubyOnRails
[23:55:47] quazimodo: has joined #RubyOnRails
[23:56:04] huck5: I read somewhere that composite-PKs are to be avoided in RoR, as they work against the design principles of the framework. Could anyone comment on this? I feel that a composite PK is what I want in my data structure, though I am also sure I can achieve the results I need by coding my controllers correctly. Are composite-pk's to be avoided?
[23:56:16] NBarnes: What's a PK?
[23:56:19] huck5: Primary Key*
[23:56:25] huck5: My apologies.
[23:56:30] chipotle: has joined #RubyOnRails
[23:56:57] huck5: My bad. I really didn't give the context I needed to for that question.
[23:57:27] FailBit: a composite primary key?
[23:59:51] unreal: has joined #RubyOnRails