« Back to channel list

#RubyOnRails - 08 September 2015

« Back 1 day Forward 1 day »
[00:00:14] huck5: Hm... A composite primary Key. Say, a Person has a composite PK of FirstName and LastName. So the constraint would be that the combination of FirstName and LastName be unique. No matter :)
[00:01:31] hoffmanc: has joined #RubyOnRails
[00:01:41] sevenseacat: you'll need a gem that supports composite FKs - Rails doesn't support them natively
[00:02:04] sevenseacat: plus, I hope your case isnt actually first name + last name because that will definitely not always be unique
[00:02:04] frzn: has joined #RubyOnRails
[00:02:04] frzn: has joined #RubyOnRails
[00:02:29] huck5: sevenseacat, OK. That basically confirms the information from my sources. And no, FirstName + LastName was just a [bad] example.
[00:03:55] mmb: has joined #RubyOnRails
[00:05:03] mmb: is there anything in rails that would reverse a string in a right-to-left language? the browser submits it correctly but when it gets to rails params it's reversed
[00:05:08] sevenseacat: how do i get some of these 'sources'? they sound mysterious
[00:06:43] nya: has joined #RubyOnRails
[00:08:35] lethan: has joined #RubyOnRails
[00:08:36] jholm: has joined #RubyOnRails
[00:08:49] huck5: sevenseacat, much farther from a source than I led on. Simply a Stack Overflow response. I thought I would get a more straight-forward answer from the source (here) rather than googling around. Not my intention to waste your time with a pointless question...
[00:10:00] cpg: anyone around to help with a query: i want to get all Brands, but sorted by number of Products of the brands
[00:10:09] cpg: a Brand has_many products
[00:10:31] cpg: a Product belongs_to :brand
[00:10:54] tdguy: has left #RubyOnRails: ("http://quassel-irc.org - Chat comfortably. Anywhere.")
[00:14:27] huck5: I have a form in a view, and there are fields like `<%= f.text_field :price %>`. In this case :price is obviously an attribute of the associated model. If I create a text_field for something that is not an attribute of the associated model, where would I access this?
[00:14:41] mmb: has left #RubyOnRails: ("WeeChat 1.1.1")
[00:15:52] FailBit: params[:attribute]
[00:16:07] FailBit: note that you will have to do = text_field_tag :attribute
[00:16:09] huck5: Cool, thanks FailBit. I was just going to mention that was my guess.
[00:16:20] huck5: Great, thanks a lot!
[00:16:28] FailBit: because f.text_field :missing_attribute will throw iirc
[00:22:38] Ropeney: has joined #RubyOnRails
[00:24:21] Radar: cpg: Use a counter cache field.
[00:25:39] cpg: Radar: thanks. i saw that in a search. however, my situation is slightly more complex
[00:25:49] Radar: cpg: You mean you used fake values?
[00:26:02] cpg: but yeah, that would simplify
[00:26:07] cpg: i have two kinds of products
[00:26:12] Radar: That is in contravention of Rule 3.2.
[00:26:14] cpg: in two different tables
[00:26:17] Radar: Admin plz ban?
[00:26:46] redondo: has joined #RubyOnRails
[00:27:19] cpg: i wanted to do it without counter cache fields for now
[00:27:46] Radar: before_create callbacks on products that increment the counters
[00:27:59] cpg: ah, that too
[00:28:34] chipotle: has joined #RubyOnRails
[00:28:48] rickmasta: has joined #RubyOnRails
[00:29:13] hydrozen: has joined #RubyOnRails
[00:29:30] FailBit: but how do you fix it if it fails to save
[00:29:39] FailBit: and it increments the counters
[00:30:24] blnkammo: has joined #RubyOnRails
[00:30:52] FailBit: I accidentally -4 counter cache
[00:30:55] idd2d: has joined #RubyOnRails
[00:31:28] cpg: you run queries to fix it
[00:31:34] cpg: but yeah
[00:31:35] hololeap: has joined #RubyOnRails
[00:31:35] cpg: i get it
[00:36:00] maz-dev: has joined #RubyOnRails
[00:37:18] Lycanii: has joined #RubyOnRails
[00:38:04] huck5: FailBit, trying the `f.text_field_tag :attribute`. I get a "Missing controller action" error. I'm just wondering if I need to make a controller action with this name, to set a variable etc, or if I'm implementing incorrectly?
[00:39:20] mices: Gem::FilePermissionError: You don't have write permissions for the /usr/local/bin directory.
[00:39:50] charliesome: has joined #RubyOnRails
[00:40:09] crdpink: has joined #RubyOnRails
[00:40:09] huck5: mices, thanks. Nevermind though, it was a syntax error. Should've proofed longer. Apologies.
[00:42:42] newtonianb: has joined #RubyOnRails
[00:43:12] mices: i'm reading that my problem is i should have installed both ruby and rails through rvm
[00:43:44] mices: is freebsd not popular in here?
[00:44:55] Rakunh0: has joined #RubyOnRails
[00:46:08] huck5: mices, I think more context is needed for your question. When are you encountering this error?
[00:46:34] mices: when i run bundle install
[00:47:58] huck5: mices, really hard to say. What guide are you following? You might have to change the permissions for the files and directories within your /bin directory. But I don't really want to advise this, as I imagine it causes some security issues..
[00:48:36] neilor: has joined #RubyOnRails
[00:48:50] mices: i was wondering myself what security issues it would cause if i just 777'd it
[00:49:21] mices: but the perms mask to /usr/local/bin is the same as my dev and that works fine
[00:49:43] charliesome: has joined #RubyOnRails
[00:49:47] huck5: did you maybe `sudo install` ruby or rails? I believe these should be installed _without_ sudo permission.
[00:50:11] mices: yea that would seem to be the problem, that's what i read elsewhere
[00:50:40] mices: it's just hard to accept that an interpreter i install as root isn't available to all users
[00:50:47] mices: i giant interpreter like ruby
[00:50:52] mices: seems crazy
[00:51:06] huck5: mices, I also struggled with this.
[00:51:27] huck5: mices, I'm afraid I can't offer any justification to the logic behind it, as my knowledge is not nearly that advanced.
[00:52:16] mices: it seems i at least should have installed rvm before ruby and ruby through rvm
[00:53:00] huck5: mices, that sounds right. I remember struggling with my initial setup. But once you get it working, rvm makes it pretty easy to manage different version of ruby across different projects..
[00:53:25] kegan_: has joined #RubyOnRails
[00:53:45] mices: ok gonna try ty
[00:53:54] huck5: mices, sorry I don't have more advice.
[00:53:57] huck5: Good luck!
[00:54:27] Axighi: has joined #RubyOnRails
[00:55:55] FailBit: huck5 | FailBit, trying the `f.text_field_tag :attribute`. I get a "Missing controller action" error. I'm just wondering if I need to make a controller action with this
[00:56:00] FailBit: = text_field_tag :attribute
[00:56:22] FailBit: not f.text_field_tag
[00:56:33] huck5: FailBit, yeah, I figured that out :). Thanks!
[00:56:59] huck5: And it's working well!
[00:58:26] nya: has joined #RubyOnRails
[00:59:13] one_zero: has joined #RubyOnRails
[01:04:07] nokiyem: has joined #RubyOnRails
[01:05:06] havenwood: mices: It looks like you have a system install of RVM which isn't recommended. A single user install is recommended. Just install without sudo as a non-root user.
[01:05:47] havenwood: mices: There's an `rvmsudo rvm fix-permissions` but just implode, delete the system rvm directory and reinstall.
[01:06:27] tejasmanohar: has joined #RubyOnRails
[01:06:48] havenwood: mices: Did you catch what I said yesterday about --user-install with the system Ruby?
[01:07:35] mices: no i missed that
[01:09:21] havenwood: mices: near the bottom of this page: http://logs.ryanbigg.com/RubyOnRails?date=2015-09-06
[01:10:30] havenwood: mices: no prob. if you have any questions just yell.
[01:10:40] huck5: havenwood, thanks for elaborating. I really wasn't sure what to advise to fix the situation, was only aware of probable causes.
[01:11:45] choke: has joined #RubyOnRails
[01:12:34] banjara: has joined #RubyOnRails
[01:12:44] Radar_: has joined #RubyOnRails
[01:12:48] jhack: has left #RubyOnRails: ()
[01:12:57] rakm: has joined #RubyOnRails
[01:13:00] weltzooo: has joined #RubyOnRails
[01:14:55] Nuck: has joined #RubyOnRails
[01:14:55] s2013: has joined #RubyOnRails
[01:15:04] mices: havenwood: why the user install switches, if i'm logged in as the user and not root
[01:15:35] s2013: https://gist.github.com/ss2k/3eeac5eb31f7903fefc1 can someone take a look at this and tell me what im doing wrong? getting a syntax error
[01:15:35] s2013: on the selected part
[01:15:42] havenwood: mices: The FreeBSD system Ruby is configured for system gem installs, like Debian. Not user installs like Fedora.
[01:15:58] sevenseacat: s2013: "Code..all" ?
[01:15:58] s2013: seems right tome
[01:16:02] havenwood: mices: I prefer user installs. That way no sudo for gems, everything in the user directory.
[01:16:09] s2013: oh ignore that.. thats a typo.. its on the selected part
[01:16:15] mices: i mean why that syntax why do i have to pass --user-install on a command line
[01:16:23] sevenseacat: ok, spot the syntax errors that arent just typos
[01:16:38] s2013: i fixed it
[01:16:42] FailBit: make sure you have everything exactly as you type it
[01:16:42] s2013: so refresh
[01:16:43] mices: why not while logged in as user just issue "gem install ..."
[01:16:49] s2013: not the syntax error
[01:16:55] sevenseacat: s2013: no error, no help
[01:17:03] mices: i didn't mean syntax
[01:17:13] mices: i mean why pass user install on the command line
[01:17:15] havenwood: mices: You can set `--no-user-install` or `--user-install` yourself with the command like `gem install rails --user-install` or you can persist the setting in a gemrc file like ~/.gemrc or see where your system confdir is with: ruby -retc -e 'puts Etc.sysconfdir'
[01:17:19] s2013: syntax error, unexpected ')', expecting tASSOC
[01:17:45] FailBit: s2013: see comment
[01:18:02] mices: i see i see, sorry
[01:18:03] s2013: gotcha FailBit thanks
[01:18:04] sevenseacat: s2013: your {:selected => @code} is being interpreted as a key in the hash of options you're passing to collection_select
[01:18:11] mices: you can do a user install as root
[01:18:37] sevenseacat: FailBit: thats not valid syntax either
[01:18:42] sevenseacat: {:message, :code} ?
[01:18:49] FailBit: sevenseacat: fixed it already
[01:18:56] FailBit: s2013: that hash style is so old :P
[01:19:03] s2013: its old rails 3
[01:19:15] s2013: i was responding to FailBit not you sevenseacat
[01:19:23] sevenseacat: rails version has nothing to do with hash syntax
[01:19:37] s2013: its a 6 year old app
[01:19:40] sevenseacat: ruby version does
[01:19:45] mices: havenwood: so now i have two alternatives install as the user or install as root and using --user-install, which should i follow
[01:19:48] FailBit: {this_is: :the_new_syntax}
[01:19:57] Radar: Did Freenode just netsplit hard about 10 mins or so ago?
[01:19:57] FailBit: {:this_is => :the_old_syntax}
[01:19:57] s2013: do you argue with about everything sevenseacat ?its not my code.. im going through fixing stuff on it
[01:20:01] Radar: My ZNC server is freaking out.
[01:20:03] s2013: so i pasted whatever wason it
[01:20:05] s2013: FailBit yes i know
[01:20:07] sevenseacat: s2013: I'm correcting your misinformation
[01:20:08] FailBit: Radar: not that I can see
[01:20:18] Radar: s2013: de-escalating now plzkthx
[01:20:21] sevenseacat: 'its a rails 3 app so i cnt use new hash syntax'
[01:20:24] havenwood: mices: I would use a non-root user with --user-install in the gemrc file.
[01:20:28] FailBit: Radar: is your ZNC on hetzner by any chance?
[01:20:33] Radar: FailBit: DO
[01:20:41] erich__: has joined #RubyOnRails
[01:20:47] s2013: ..when did i say i couldnt use new hash syntax? i wasnt even talking to you.. anyways thanks for your help.
[01:20:54] FailBit: my znc is on hetnzer and it was freaking out earlier
[01:20:59] havenwood: mices: So for example your ~/.gemrc file could be line 1: source: "https://rubygems.org"
[01:21:01] FailBit: first on freenode, then I couldn't connect to ponychat at all...
[01:21:05] havenwood: mices: And line 2: gem: "--no-document --user-install"
[01:21:15] smathy: has joined #RubyOnRails
[01:21:43] n99999i_: has joined #RubyOnRails
[01:22:08] s2013: FailBit hmm imgetting a diff syntax error now.. with unexpected ,
[01:22:24] FailBit: reload the page
[01:22:27] FailBit: I made a small mistake
[01:22:36] s2013: ah,okthanks
[01:22:40] sevenseacat: its so hard to fix syntax errors when everyone fixing them introduces more
[01:22:55] havenwood: mices: Then you'll just need to put the gem bin dir in your PATH. You can add the following to a dotfile that gets sourced: export PATH="$PATH:$HOME/.gem/ruby/2.1/bin"
[01:23:46] FailBit: yeah I know
[01:23:47] havenwood: mices: (For FreeBSD system Ruby gem executables like rails, bundle, etc.)
[01:23:50] FailBit: I herped pretty hard there
[01:24:07] FailBit: it's even funnier because I could literally just stick this into pry and tell whether it was valid or not
[01:24:13] FailBit: takes a second to check :V
[01:24:53] havenwood: mices: Make sense?
[01:30:55] Ecky7_: has joined #RubyOnRails
[01:33:12] euphoriaa: has joined #RubyOnRails
[01:33:58] euphoriaa: has joined #RubyOnRails
[01:34:42] sonofdirt: has joined #RubyOnRails
[01:36:37] DEac-: has joined #RubyOnRails
[01:37:09] FailBit: >tfw fanfic from 2011 is still marked incomplete
[01:37:12] FailBit: >author logged in yesterday
[01:37:17] FailBit: er, wrong channel
[01:37:35] Aeyrix: FailBit: Do you run derpi on bsd
[01:39:08] FailBit: Aeyrix: jessie
[01:39:41] FailBit: couple months ago it was on wheezy, then we had to do a server upgrade because the old server ran out of room
[01:40:20] Aeyrix: debian is now bronyian
[01:40:30] Aeyrix: Is there a MLP derivative?
[01:40:43] mices: havenwood: how should i install rvm
[01:40:46] Aeyrix: www.ponyos.org/
[01:40:48] Aeyrix: Of course there is.
[01:40:56] Aeyrix: Also yeah, that was way better than what I had.
[01:41:00] FailBit: https://derpibooru.org/735544
[01:41:29] Aeyrix: Can't click that tbh
[01:42:02] FailBit: employer won't let you look at ponies? heh
[01:42:02] baweaver: has joined #RubyOnRails
[01:42:36] platosha__: has joined #RubyOnRails
[01:42:45] Aeyrix: I value my employment enough to not look at cartoon horses during the course of my work day.
[01:42:45] Swappticon: has joined #RubyOnRails
[01:43:01] FailBit: you just googled ponyos
[01:45:28] fedexo: has joined #RubyOnRails
[01:47:30] mices: i have to install rvm as root
[01:47:42] FailBit: rvm is a bit of a pain
[01:47:50] mices: through ports on fbsd
[01:48:03] FailBit: I found rbenv easier to use, but that's just more my preference
[01:48:04] mices: i don't know another way unless i compile myself
[01:48:08] FailBit: take with a grain of salt
[01:48:19] quazimodo: any elastic beanstalk users here?
[01:48:29] quazimodo: need advice on a deployment
[01:48:31] mices: is it ok to install rvm as root
[01:48:45] FailBit: if you deploy as root.
[01:48:52] FailBit: or have a custom bundle path
[01:49:11] sevenseacat: ruby-install ftw
[01:49:17] FailBit: our production has rbenv installed into /opt
[01:49:25] mices: so if i compile from source i can install as a user
[01:49:28] FailBit: and a custom bundle path under shared/bundle
[01:51:18] choke: has joined #RubyOnRails
[01:51:26] havenwood: sudo pkg install chruby
[01:51:36] havenwood: but... no need to switch Rubies in production
[01:51:55] FailBit: havenwood: when you want to upgrade, it's handy
[01:52:07] FailBit: speaking of that current is still 2.2.2 right
[01:52:12] havenwood: FailBit: 2.2.3
[01:52:22] FailBit: time to upgrade
[01:52:38] ebbflowgo: has joined #RubyOnRails
[01:54:02] tweeeaks: has joined #RubyOnRails
[01:55:26] tweeaks: has joined #RubyOnRails
[01:56:41] jholm: has joined #RubyOnRails
[01:56:45] meatherly: has joined #RubyOnRails
[01:57:28] Swappticon: has joined #RubyOnRails
[01:58:41] higuys: has joined #RubyOnRails
[02:00:48] higuys: How would you detect users who manipulate photo ratings by creating fake accounts?
[02:01:07] FailBit: fingerprint match
[02:01:34] sevenseacat: don't let them create fake accounts?
[02:01:42] higuys: Can you explain more detail?
[02:01:59] FailBit: https://github.com/carlo/jquery-browser-fingerprint
[02:02:13] FailBit: IP+FP match is 90% certainty
[02:02:26] FailBit: geolocation+FP match is 90%
[02:02:34] FailBit: IP alone is 80%
[02:02:39] FailBit: FP alone is 30%
[02:03:34] s2013: you can also set rules and if something seems to not match with those set of rules you can auto flag it
[02:03:34] FailBit: actually, IP+FP is more like 97
[02:03:35] s2013: for manual reviewlater on
[02:03:42] mike___1234: has joined #RubyOnRails
[02:03:53] s2013: depends on how crazy you want to go with it
[02:04:23] FailBit: if you have a hit that matches IP and FP on multiple accounts, it's basically guaranteed to be the same user
[02:04:44] FailBit: however the imageboard I run isn't obsessed with preventing vote duping
[02:05:32] Pupeno: has joined #RubyOnRails
[02:05:57] pwnd_nsfw: Besides synergy, does anyone know of another mouse/keyboard sharing application that is OS agnostic?
[02:06:29] higuys: Interesting...
[02:07:06] FailBit: I have a lot of history of dealing with ban evaders
[02:07:08] pwnd_nsfw: Oh sorry, I meant to share between perhaps Win pc and Linux pc
[02:07:32] FailBit: I wish we could shadowban users. that would make me so happy
[02:08:17] FailBit: I think shimmie calls that a hellban, but nobody actually uses shimmie
[02:08:25] FailBit: plus it's in >php
[02:10:10] VeryBewitching: PHP still puts a lot of food on peoples tables, I'm just waiting for it to die.
[02:10:22] pontiki: has joined #RubyOnRails
[02:10:39] pwnd_nsfw: It's funny because... it has a lot of ease to getting an application up and running, but the code is so damn broken
[02:11:05] shoelessone: has joined #RubyOnRails
[02:11:19] FailBit: VeryBewitching: a language's popularity is always inversely proportional to its quality
[02:11:41] VeryBewitching: Qt C++ is really fun to write.
[02:11:58] pwnd_nsfw: if you smoke crack
[02:12:00] higuys: What should a junior rails developer know to work in an entry level rails developer position.
[02:12:01] FailBit: see: Javascript
[02:12:10] higuys: JavaScript?
[02:12:12] pontiki: so you're saying Ada is the language with the highest quality?
[02:12:24] pwnd_nsfw: People should use brainfuck more often then
[02:12:24] VeryBewitching: higuys: https://www.codefellows.org/blog/this-is-why-learning-rails-is-hard
[02:12:31] FailBit: pwnd_nsfw: yes
[02:12:39] pontiki: pwnd_nsfw: try Ook
[02:12:42] Ecky7_: has joined #RubyOnRails
[02:13:09] mices: after installing rvm, rvm command not found
[02:13:11] charliesome: has joined #RubyOnRails
[02:13:17] FailBit: VeryBewitching: ew agile
[02:13:23] pwnd_nsfw: I JUST WANT TO COPY PASTE TEXT BETWEEN MACHINES WITH DIFFERENT OS'S BAWWWWWWWW
[02:13:23] FailBit: agile. no.
[02:13:31] pontiki: mices: did you re-login like it says at the end of the rvm installation?
[02:13:36] FailBit: no, just no.
[02:13:42] higuys: I've read that article..
[02:13:50] mices: pontiki: not
[02:14:15] VeryBewitching: higuys: Look at the image and start searching on Google
[02:14:20] higuys: Are you guys rails professional developers or just hobbyists?.
[02:14:25] VeryBewitching: Anything you don't know :D
[02:14:31] pwnd_nsfw: higuys, prolly a mix
[02:14:33] pontiki: i get paid for it, does that count for anything?
[02:14:36] pwnd_nsfw: I do freelance work
[02:14:40] FailBit: higuys: I >do it for free
[02:14:45] pwnd_nsfw: and I'm still nub
[02:14:50] FailBit: but I do know a good deal
[02:14:54] pwnd_nsfw: I just knew the basics and threw myself into it
[02:15:02] FailBit: because maintaining a production site is hard
[02:15:02] pwnd_nsfw: Now I know a shit ton more
[02:15:03] higuys: Any rails professionals?
[02:15:12] pontiki: what does that *mean* higuys ??
[02:15:13] FailBit: especially because passenger is crap
[02:15:13] VeryBewitching: higuys: I've been writing code for money since the 90s
[02:15:15] pwnd_nsfw: But I'm sure my conventions are a bit off
[02:15:29] higuys: Freelancing?.
[02:15:30] FailBit: higuys: you'll find a lot of Dunning-Kruger asking that
[02:15:44] FailBit: (asking vaguely for professionals)
[02:16:10] FailBit: I consider myself more advanced in webdev because of rails
[02:16:11] mices: it's like asking for a kawasaki kz1000 in a bar
[02:16:16] higuys: I want to know what its like to work with rails in a large scale environment what I need to learn.
[02:16:37] FailBit: higuys: it's a pain in the butt
[02:16:38] higuys: I'm not interested in small stuff
[02:16:52] pwnd_nsfw: higuys, learn git, learn rails
[02:16:59] VeryBewitching: FailBit: After a while, it doesn't matter what language you use really, it's how well you choose to take advantage of it.
[02:17:00] pontiki: i eschew large scale environments. i worked for BigCo for a long time and will not go back, ever
[02:17:05] FailBit: VeryBewitching: yes
[02:17:11] mices: pontiki: logging out and back in didn't change anything
[02:17:21] mices: do i need to add it to path m
[02:17:22] pwnd_nsfw: mices, restart whole pc
[02:17:29] higuys: 500px uses rails...
[02:17:39] pontiki: mices, read the instructions, ensure it updated your various dot files correctly
[02:17:52] pontiki: i'm not interested in holding hands
[02:17:53] FailBit: higuys: github uses rails
[02:18:03] FailBit: a lot of places use rails
[02:18:21] FailBit: it's not new framework
[02:18:23] VeryBewitching: No, what was that?
[02:18:23] helpa: Ruby on Rails doesn't scale - nothing to see here - move along. http://twitter.com/
[02:18:26] FailBit: *not a new
[02:18:30] VeryBewitching: ACTION thanks sevenseacat
[02:18:48] pontiki: by the time you invent something on the scale of twitter, you'll realize how misleading that statement actually is
[02:19:10] FailBit: you're very limited by your database when it comes to scale
[02:19:11] frzn: has joined #RubyOnRails
[02:19:12] FailBit: also, don't use mongodb ever
[02:19:19] bronson: has joined #RubyOnRails
[02:19:32] VeryBewitching: There are no winners or heroes in web development, just a lack of time to do everything in :D
[02:20:00] pontiki: it's still the most fun ever
[02:20:00] FailBit: if you have a small dataset, you could run a DB server and load balance on 2 app servers
[02:20:05] FailBit: if that counts as scale
[02:20:18] pontiki: it does. scale doesn't have a bottom or a top
[02:20:18] pwnd_nsfw: PHP SCALES VERY WELL THEN
[02:20:24] sevenseacat: hella fun, or we wouldnt be here, given how hard it can be
[02:20:51] higuys: A lot of stuff in that rails diagram can be said to any framework not only rails
[02:21:09] pontiki: that is correct!
[02:21:37] VeryBewitching: Correct, but also subjective.
[02:21:39] FailBit: know how to do stuff in linux is my most important recommendation
[02:21:54] pwnd_nsfw: Yo, I'd rather kill myself than try to deal with ook
[02:22:02] pontiki: yes, indeed, the entire notion of "hard" is subjective
[02:22:05] FailBit: install, remove stuff, mess with files, check disk space, edit text
[02:22:15] higuys: So I don't know why they're saying rails is hard based off of that diagram. Its stupid
[02:22:30] FailBit: add CIDR ranges to the firewall, make sure you can do that
[02:23:09] FailBit: know your production server well
[02:23:32] FailBit: also don't spend late nights fixing stuff if things blow up
[02:23:36] VeryBewitching: higuys: Rails + Ruby is a bigger subject than it looks like when you're beginning.
[02:23:45] VeryBewitching: Then it baloons.
[02:23:56] pwnd_nsfw: It does baloon
[02:24:03] pwnd_nsfw: balloon rather
[02:24:11] VeryBewitching: And "being able to" does not mean you're going to the NBA
[02:24:16] higuys: Steep learning curve?
[02:24:22] pwnd_nsfw: I thought "aw ye, framework that does everything for you"
[02:24:22] sevenseacat: rails itself isnt that hard. everything you need to know to be productive using rails, is hard.
[02:24:25] VeryBewitching: Doing something and doing it well are two hemispheres, and you start it one
[02:24:37] shoelessone: has joined #RubyOnRails
[02:24:50] pwnd_nsfw: Then like... all of these differet things show up. polymorphic associations, habtm associations
[02:24:53] pwnd_nsfw: those are easy now
[02:24:56] pwnd_nsfw: But like, it adds up
[02:25:05] higuys: I can do make a simple crud app..
[02:25:06] pwnd_nsfw: all of the gems that are available
[02:25:18] pwnd_nsfw: rails new can make a simple crud app
[02:25:23] pwnd_nsfw: scaffold, dun
[02:25:29] higuys: Gems are suppose to make it easier..
[02:25:36] pwnd_nsfw: Yeah, but there's so many options
[02:25:40] VeryBewitching: Gems make it more
[02:25:49] maz-dev: has joined #RubyOnRails
[02:25:59] pwnd_nsfw: Which ones are better supported, which ones have better features, which ones run in current rails/ruby versions
[02:26:13] pontiki: less talk, more action
[02:26:14] VeryBewitching: But consider any development ecosystem, just because there's *lots* of gems doesn't mean they're all A1
[02:26:17] pontiki: show us what you know
[02:26:19] sevenseacat: ACTION goes back to being productive using rails
[02:26:21] higuys: They have documentation for that..
[02:26:40] VeryBewitching: Sifting through the gems takes time.
[02:26:42] FailBit: "show me the migration"
[02:26:47] pwnd_nsfw: When I was working with PHP back in the day, I ignored all of that because I didn't need it
[02:26:48] i: has joined #RubyOnRails
[02:26:52] pwnd_nsfw: Everything was just... "do it"
[02:27:01] pwnd_nsfw: With rails, I have to go shopping for best solutions lol
[02:27:04] FailBit: don't let your dreams be dreams
[02:27:12] FailBit: just DO IT
[02:27:14] VeryBewitching: pwnd_nsfw: Mmhmm. Been working with it since the release of PHP3
[02:27:27] pwnd_nsfw: Thanks Shia
[02:27:38] pwnd_nsfw: you made the internet break over jack fucking nothing
[02:27:56] FailBit: http://niceme.me
[02:28:08] pwnd_nsfw: thanks bruh
[02:28:13] dopie: has joined #RubyOnRails
[02:28:21] pwnd_nsfw: See, that's a website you'd write in PHP
[02:28:22] higuys: If there are any professional ruby on rails developers in here that work on large scale applications, send me a pm. I like to ask you some questions. Thanks!
[02:28:27] lea: has joined #RubyOnRails
[02:28:29] pwnd_nsfw: yano, to show how many hits the site got
[02:28:35] pwnd_nsfw: while ignoring solutions like analytics
[02:28:46] pontiki: what's large scale?
[02:28:52] sevenseacat: higuys: you can ask your questions here.
[02:28:54] pwnd_nsfw: "what do I need to know to be like you"
[02:28:59] pwnd_nsfw: is all he's asking
[02:29:07] FailBit: higuys: you can ask me
[02:29:12] pwnd_nsfw: higuys, all you need is passion m8
[02:29:16] FailBit: I work on some huge imageboard
[02:29:23] pwnd_nsfw: passion and at least half a brain that isn't high on inhalants
[02:29:30] sevenseacat: https://www.codefellows.org/blog/this-is-why-learning-rails-is-hard
[02:29:40] ebbflowgo: has joined #RubyOnRails
[02:29:40] sevenseacat: most of the things in that chart.
[02:30:00] sevenseacat: I won't claim to know them all.
[02:30:16] FailBit: ruby syntax feels better when you inhale compressed air, pwnd_nsfw
[02:30:18] higuys: I know there is more to just learning ruby on rails to be a rails developer.
[02:30:29] neilor: has joined #RubyOnRails
[02:30:34] pwnd_nsfw: compressed air though
[02:30:36] higuys: I have too many questions I would just flood the channel
[02:30:37] VeryBewitching: You have to own a Mac, depending on who you ask
[02:30:38] pwnd_nsfw: I'm talking about like.. duster
[02:30:46] sevenseacat: like, most of the deployment subtree I don't know.
[02:30:47] FailBit: higuys: hit me with your best shot
[02:30:49] redondo: has joined #RubyOnRails
[02:30:52] FailBit: fire awaaayyy~
[02:31:06] pwnd_nsfw: that's an ok song
[02:31:41] FailBit: higuys: you can ask me stuff if you want to, I'm pretty open about what I do
[02:31:50] Lightsword: has joined #RubyOnRails
[02:32:13] higuys: You're a freelancer?.
[02:32:19] sevenseacat: I'm happy to talk about things publicly. if you want private consultation, you pay private consultation rates.
[02:32:34] FailBit: I actually do rails dev as a hobby, and don't get paid for it
[02:32:47] FailBit: doesn't stop me from having a huge dataset
[02:33:51] pwnd_nsfw: It's better to keep it a hobby
[02:34:08] FailBit: in fact, this is probably a great setup for me, since I have access to the whole operation and I don't have to cut through red tape to get things done
[02:34:09] pwnd_nsfw: Like, to further my testing abilities, I was going to tell a client I'd write a test suite for him for free
[02:34:11] Aeyrix: that "why rails is hard" thing
[02:34:21] pwnd_nsfw: But I haven't popped the question yet because... like... I'm not really at that point yet
[02:34:21] Aeyrix: Feels good, I know most.
[02:34:30] sevenseacat: Aeyrix: :thumbsup:
[02:34:32] FailBit: also, I don't approve of Agile / Scrum
[02:34:39] Aeyrix: wait how did you
[02:34:46] FailBit: one less problem
[02:34:48] pontiki: don't do what you love for someone else for free, ffs
[02:35:08] pwnd_nsfw: I feel like the "why rails is hard" visual representation of why it's hard... is exaggerated visually
[02:35:21] FailBit: pontiki: booru-on-rails devs unite in their misery
[02:35:24] pontiki: FailBit: the main problem is that those things become mere words
[02:35:37] FailBit: pontiki: yeah.
[02:35:48] pontiki: the activity people do when they "Agile" and "Scrum" is just what they conceive of always having done
[02:35:58] pontiki: it's one of the hugest problems, this cargo culting
[02:36:19] FailBit: how many tickets have you fixed today? only 1? shame on you
[02:36:36] pontiki: if we agile enough, scrum every day, the gods of the internet will shine their light upon our code
[02:37:02] pontiki: this too, is not a new problem
[02:37:06] FailBit: that's the other thing I love about >doing it for free
[02:37:20] FailBit: i can do big refactors without getting interrupted
[02:37:21] pontiki: in the 80s, the BigCo decided to emulate the japanese culture of "TQC"
[02:38:21] higuys: Failbit what kind of rails apps do you make
[02:38:28] pontiki: and holy cow was the world then full of books, manuals, guides, gurus, consultants, and other much
[02:38:31] FailBit: higuys: I run an imageboard!
[02:38:40] higuys: What's that
[02:38:45] pontiki: you are 4chan
[02:38:48] FailBit: it's a website where you post images
[02:38:53] Aeyrix: ACTION is 4chan.
[02:38:55] FailBit: pontiki: a bit different
[02:39:03] pontiki: i know, seriously
[02:39:04] higuys: Like Instagram?
[02:39:06] pontiki: i did look at it
[02:39:10] FailBit: cause these images have tags and they can be searched, and filtered
[02:39:23] IrishGringo: has joined #RubyOnRails
[02:39:30] Aeyrix: You run a booru, not an imageboard.
[02:39:33] Aeyrix: Distinct difference.
[02:39:47] higuys: Can I see your site?.
[02:39:51] pwnd_nsfw: You know why rails is actually hard?
[02:39:53] pwnd_nsfw: I don't have two monitors
[02:40:24] pontiki: i write on a 13" macbook. it doesn't make rails hard
[02:40:32] pwnd_nsfw: ugh, that'd be brutal for me
[02:40:42] pwnd_nsfw: I'm getting used to doing it on my 17.5" laptop
[02:40:44] FailBit: higuys: do you take offense at my little pony?
[02:40:55] FailBit: the site is https://derpibooru.org/
[02:41:06] mary5030: has joined #RubyOnRails
[02:41:24] pwnd_nsfw: FailBit, where do your host your app?
[02:41:39] FailBit: Roubaix, specifically
[02:41:52] FailBit: 128G RAM, 4TB storage
[02:41:52] pwnd_nsfw: That's another facet of why rails is hard
[02:42:03] higuys: Is that your site?
[02:42:04] pwnd_nsfw: do that many bronies visit yourself?
[02:42:11] Aeyrix: derpibooru is p large
[02:42:13] pwnd_nsfw: ACTION is inhebriated
[02:42:18] FailBit: pwnd_nsfw: big dataset = bit memory requirements
[02:42:21] Aeyrix: largest(?) mlp image community
[02:42:34] pwnd_nsfw: yeah, no shit. 128G is a lot of memory haha
[02:42:37] pwnd_nsfw: Gratz on the success
[02:42:45] Aeyrix: >tfw still not profitable
[02:42:47] Aeyrix: come on FailBit
[02:42:57] FailBit: Aeyrix, we have a patreon now
[02:43:01] Aeyrix: Monetise your fellow fedora sporting lads/ladies
[02:43:05] pwnd_nsfw: well, when google ads doesn't have anything relevant to your content....
[02:43:09] FailBit: we've got the site covered now
[02:43:12] Aeyrix: pwnd_nsfw: Oh trust me
[02:43:15] Aeyrix: there's relevant ads
[02:43:20] Aeyrix: oh wait google ads
[02:43:26] FailBit: pwnd_nsfw: I think they would not want to be associated with our content
[02:43:31] pwnd_nsfw: you'd have to have brazzer ads
[02:43:33] higuys: You have a pony fetish or something?
[02:43:40] pwnd_nsfw: higuys, you don't even know
[02:43:42] FailBit: which includes some saucy content
[02:43:49] pwnd_nsfw: FailBit, I'm sure :P
[02:43:49] FailBit: really saucy
[02:44:00] pwnd_nsfw: you'd get the email about being against their TOS pretty quick
[02:44:14] pwnd_nsfw: You wouldn't even receive your first $100 check
[02:44:26] FailBit: anyway nobody wants to advertise on this site, so we don't bother
[02:44:32] pontiki: gah, which makes me think now of the current thing i have to put in our website
[02:44:38] FailBit: we allow community ads and stuff
[02:44:49] FailBit: most of funding comes from the patreon
[02:44:50] pontiki: they're concerned about cusswords appearing alongside adsense
[02:45:02] ncrmro: has joined #RubyOnRails
[02:45:08] pwnd_nsfw: SO, if rails is your hobby, may I ask what your source of income is to provide for such an amount of hosting
[02:45:19] Aeyrix: higuys: Yeah you don't
[02:45:20] Aeyrix: don't ask
[02:45:21] pwnd_nsfw: And ah I see
[02:45:43] pwnd_nsfw: higuys, have you ever heard of the term "brony"?
[02:45:43] higuys: You pay for hosting for that website?.
[02:45:46] FailBit: I'm also not the one dealing with the site's finances
[02:45:55] pwnd_nsfw: it's a cult of older men that love my little pony enough to touch themselves to it
[02:46:02] FailBit: pwnd_nsfw: lol
[02:46:05] higuys: Bunch of pony pics
[02:46:05] Aeyrix: s a v a g e
[02:46:12] pwnd_nsfw: Well, not just any pony pics
[02:46:18] pwnd_nsfw: MY LITTLE pony pics
[02:46:19] Aeyrix: d e v i l i s h b e h a v i o u r d e t e c t e d
[02:46:34] pwnd_nsfw: I can't be mad, sometimes while on /b/ I find myself aroused at the sight
[02:46:42] Aeyrix: I'm gonna
[02:46:47] FailBit: pwnd_nsfw: 11% of it is straight up lewd
[02:47:01] VeryBewitching: pwnd_nsfw: If you're sober, I worry for you.
[02:47:02] FailBit: 70% is completely safe
[02:47:07] pwnd_nsfw: No, I'm pretty drunk
[02:47:18] FailBit: the rest is a tossup
[02:47:27] pwnd_nsfw: I don't want to know what the other like.. 19% is
[02:47:30] banjara: has joined #RubyOnRails
[02:47:34] VeryBewitching: Pro Tip: Don't drink and deploy.
[02:47:36] pwnd_nsfw: I hope I did my math right
[02:47:42] pwnd_nsfw: Oh yeah, I'm not even touching code rynah
[02:47:51] pwnd_nsfw: Hence the slight trolling of #RubyOnRails
[02:47:51] pontiki: VeryBewitching: such good advice. Also never deploy on Friday.
[02:47:59] pwnd_nsfw: Why not Friday?
[02:48:04] VeryBewitching: pontiki: Tuesday morning.
[02:48:08] VeryBewitching: pontiki: Best time.
[02:48:10] FailBit: <VeryBewitching> Pro Tip: Don't drink and deploy.
[02:48:13] FailBit: I've done this
[02:48:17] FailBit: I've also broken the site while drunk
[02:48:20] VeryBewitching: FailBit: So have I.
[02:48:30] FailBit: I've also fixed the site while drunk too, so fuck yeah
[02:48:33] pontiki: these rules do not come cheap, that's for sure
[02:48:38] VeryBewitching: FailBit: 14 beers and 3 shots of Crown Royal
[02:48:44] Aeyrix: >Crown Royal
[02:48:46] Aeyrix: good choice
[02:48:46] VeryBewitching: That was a long night.
[02:49:14] FailBit: I stayed up nights for this site
[02:49:15] pwnd_nsfw: VeryBewitching, that'd have me hungover till 8pm next day. Shaking hungover..
[02:49:18] higuys: So youre only allowed to upload pony pictures?
[02:49:20] pwnd_nsfw: But I am a light weight anymore
[02:49:26] FailBit: higuys: that's correct.
[02:49:27] VeryBewitching: Meh, I'm Canadian.
[02:49:46] FailBit: I'm... something
[02:49:51] pwnd_nsfw: But not like.... From ireland irish
[02:49:57] pwnd_nsfw: So that probably doesn't count
[02:49:59] pontiki: the worst kind, then
[02:50:00] FailBit: higuys: because that's what the site was made for
[02:50:13] higuys: I still don't understand the ponies
[02:50:19] FailBit: if you ever hear booru-on-rails
[02:50:46] pwnd_nsfw: Don't tell him no
[02:50:46] pontiki: ponies are irrelevent
[02:50:50] higuys: Is it a fan site?
[02:50:59] pwnd_nsfw: My little pony
[02:51:05] FailBit: if it weren't, I wouldn't be here talking to you
[02:51:14] FailBit: I wouldn't even know what rails is.
[02:52:00] pwnd_nsfw: "My Little Pony is my inspiration for knowing any facet of programming"
[02:52:21] FailBit: I knew other languages before working on this site
[02:52:26] pwnd_nsfw: omg, there's MLP streams
[02:52:33] pwnd_nsfw: I can't even imagine
[02:52:36] pwnd_nsfw: what that'd be
[02:52:44] FailBit: episode streams
[02:52:51] pwnd_nsfw: "Dis is my cosplay with my tail buttplug"
[02:52:58] pwnd_nsfw: hmm..... not as exciting
[02:52:59] higuys: You learned rails so you can create a website about pony pics..that's cool if that's what you're into
[02:53:00] FailBit: some people like to stream themselves making art
[02:53:18] pwnd_nsfw: Are the streams handled through rails?
[02:53:24] pontiki: art is performance / performance is art
[02:53:40] FailBit: pwnd_nsfw: on derpibooru, all streams are hosted by livestream
[02:53:46] FailBit: we just link to them
[02:53:57] pwnd_nsfw: That's what I was thinkin'
[02:53:58] higuys: I can tell you used devise and paperclip gems
[02:54:10] pwnd_nsfw: You might need OVER 9000 gb of ram for that
[02:54:22] FailBit: not paperclip ??? https://derpibooru.org/dragonfly
[02:54:28] pontiki: that's "JiggaBytes"
[02:54:38] pwnd_nsfw: lol pontiki
[02:54:49] pwnd_nsfw: I would use cloudinary for image storage I think
[02:55:02] pwnd_nsfw: It's pretty cheap
[02:55:18] FailBit: how cheap are we talkin'
[02:55:39] pwnd_nsfw: Well, free you get to host like.. 75k images
[02:55:47] pwnd_nsfw: And it does transfomations in THE CLOUD
[02:55:50] FailBit: we have like
[02:55:53] pwnd_nsfw: so it takes strain off of server
[02:56:07] higuys: Failbit how much to maintain your site?
[02:56:07] pwnd_nsfw: http://cloudinary.com/pricing
[02:56:21] FailBit: +the 70k or so avatar images
[02:56:25] higuys: Monthly cost
[02:56:29] FailBit: and other random stuff
[02:56:59] FailBit: >200GB bandwidth
[02:57:04] higuys: Do you put that site in your portfolio? Lol
[02:57:12] FailBit: that's nowhere near enough for us
[02:57:21] pwnd_nsfw: Neverind then haha
[02:57:27] FailBit: we rake through around 100TB a month
[02:57:43] pwnd_nsfw: Totally interested in higuys 's question then
[02:57:47] FailBit: largely backed by cloudflare
[02:58:23] FailBit: higuys: I'm not in the programming field at this time, but I might consider going into it
[02:58:56] pwnd_nsfw: How much do you shell out for this site
[02:59:04] FailBit: but I look and it's agile, agile everywhere
[02:59:10] FailBit: pwnd_nsfw: around $600/mo
[02:59:21] higuys: Holy shit!!
[02:59:35] pwnd_nsfw: That's not terrible
[02:59:49] higuys: Why the hell would you pay that much to host pony pics?.
[02:59:50] ebbflowgo: has joined #RubyOnRails
[02:59:52] pwnd_nsfw: I'm surprised you're not on a dedi
[02:59:52] ncrmro: has left #RubyOnRails: ()
[02:59:53] VeryBewitching: That's less than half of the average mortgage payment.
[02:59:57] pwnd_nsfw: higuys, IF IT PAYS SON
[03:00:03] pontiki: FailBit: you can probably rest assured it's just a buzzword
[03:00:12] pwnd_nsfw: VeryBewitching, be careful. Here in NC, my parents pay basically that for their mortgage haha
[03:00:19] pwnd_nsfw: And they filed for bankruptcy, each, 2 years ago
[03:00:25] FailBit: higuys: because it's backed by the community
[03:00:42] higuys: You advertise?
[03:01:17] higuys: How many users do you have registered?
[03:01:35] VeryBewitching: pwnd_nsfw: Most homes that are sold in the city I live in are in the 450K - 900K range.
[03:01:53] VeryBewitching: pwnd_nsfw: And we're low for the country average.
[03:02:09] FailBit: higuys: 140k users registered
[03:02:14] FailBit: 100 new per day
[03:02:16] higuys: And how much are your profit margins to justify the high operating costs
[03:02:26] higuys: Wtf are you serious??
[03:02:34] pwnd_nsfw: I'm basically bumfuck nowhere, but only .5 acre with a 3bdr/2full bath home
[03:03:00] FailBit: higuys: we don't run the site for profit
[03:03:07] pwnd_nsfw: I used to live in NJ and would get 2bdr apt, 1 bath for $1300
[03:03:09] pwnd_nsfw: it was brutal
[03:03:12] higuys: Who are these users?.
[03:03:15] VeryBewitching: higuys: And those operating costs are *not* high
[03:03:37] higuys: Try buying a house in Toronto!!
[03:03:50] FailBit: as stated on the patreon page, all excess funds not needed to run the site will go to cancer research UK
[03:03:51] pwnd_nsfw: I want to. I ehar there's lots of ecstacy there
[03:03:53] Creeves: has joined #RubyOnRails
[03:03:55] VeryBewitching: pwnd_nsfw: I'm in a 2.5 bath, 3 bdrm home and it's $1500.00/mo.
[03:03:58] higuys: If you're lucky you can buy a shack for 800k
[03:04:12] pwnd_nsfw: I think my rents got lucky VeryBewitching
[03:04:56] higuys: Oh so most of your users are kids/teens?
[03:04:57] tfittsy: has joined #RubyOnRails
[03:05:12] FailBit: probably like 1/4 of them are horny teenagers
[03:05:16] higuys: I get it now..
[03:05:17] FailBit: the rest are adults
[03:05:30] pwnd_nsfw: adults that were teens when /b/ was popular
[03:05:42] FailBit: pwnd_nsfw: /b/ is still popular
[03:05:50] FailBit: not 4chan /b/
[03:05:52] pwnd_nsfw: I hear the mods are always awake now
[03:05:58] pwnd_nsfw: yeah, I meant 4chan/b/
[03:06:02] higuys: What do you mean Horny teens
[03:06:13] pwnd_nsfw: Like, a 16 year old that just figured out what his penis is for
[03:06:23] pwnd_nsfw: a 16 year old in this case, anyways
[03:06:33] higuys: What does that have to do with the site
[03:06:42] higuys: Just watch regular pirn
[03:06:44] FailBit: the site hosts a lot of saucy material
[03:06:51] pwnd_nsfw: You obviously don't know of other markets
[03:07:02] FailBit: also has a lot of non standard fetish material
[03:07:03] pwnd_nsfw: higuys, some people are "weird" to what may be your standards
[03:07:04] higuys: What other markets???
[03:07:14] FailBit: how often do you encounter watersports in regular porn?
[03:07:16] higuys: The pony market??
[03:07:23] pwnd_nsfw: If I go any further, I'm going to get b& from freenode
[03:07:37] tfittsy: I've recently finished migrating a project from MSSQL to PostGres. There were defaults in almost every database field before and I allow nulls in a lot of them now. Does anyone have an opinion on setting default of 0 vs having .to_i to account for null fields?
[03:10:34] VeryBewitching: tfittsy: 0 bytes per record vs 2 bytes per record (depending on the size of the number) plus time to cast it to an integer from nil
[03:11:25] braincrash: has joined #RubyOnRails
[03:11:53] tfittsy: VeryBewitching: any opinion on which is more appropriate?
[03:13:11] VeryBewitching: tfittsy: Well if you know it could be null now, it's probably not something you'd have indexed I would say set it to not null and default it to 0, but that's my opinion.
[03:14:34] baweaver: For future reference, keep it PG and on topic in here. We have ruby-offtopic for things like that.
[03:15:06] FailBit: sorry guys
[03:15:11] FailBit: got a little carried away
[03:15:25] wasserschlange_: has joined #RubyOnRails
[03:15:51] baweaver: Fairly basic, but new post on Aggregate functions in Rails: http://baweaver.com/blog/2015/09/07/aggregate-active-record/
[03:16:15] wasserschlange_: has joined #RubyOnRails
[03:16:17] VeryBewitching: baweaver: Cool, something to read with my coffee, thanks ;)
[03:16:37] baweaver: If there's anything else of interest I'll probably be writing more in the future
[03:17:13] Ecky7_: has joined #RubyOnRails
[03:17:37] wasserschlange_: has joined #RubyOnRails
[03:17:47] FailBit: the Model.count one never tripped me up for some reason
[03:18:33] baweaver: I've seen it happen a few times
[03:18:40] baweaver: Most of this one is very basic, granted
[03:19:00] baweaver: but I've been seeing more and more people forgetting that these functions exist and implementing some really heinous sql intensive functions to compensate.
[03:19:30] strcmp1: has joined #RubyOnRails
[03:20:18] FailBit: I throw aggregations at elasticsearch usually. :v
[03:20:25] hydrozen: has joined #RubyOnRails
[03:20:45] FailBit: date_histogram is my bae
[03:20:45] baweaver: I normally try and see how much I can sneak out of SQL before trying to set that one up.
[03:20:46] Swappticon: has joined #RubyOnRails
[03:21:37] tfittsy: elasticsearch +1
[03:21:52] s2013: has joined #RubyOnRails
[03:21:56] VeryBewitching: Pluck is really handy.
[03:22:09] baweaver: especially when you realize it can use aggregate functions
[03:22:12] tfittsy: baweaver: good stuff though. I used to write TONS of raw sql in php so I'm very aware of all of that but useful info
[03:22:15] Lightsword: has joined #RubyOnRails
[03:22:34] baweaver: I'll probably write up more later on some more advanced sql I've been brewing
[03:22:35] FailBit: baweaver: all of that is gud stuff
[03:22:48] baweaver: mainly around inner joins against the same table multiple times
[03:23:01] VeryBewitching: Sometimes are necessary
[03:23:16] VeryBewitching: I haven't had to work with one with Rails yet.
[03:23:46] VeryBewitching: That's a good topic for inclusion, if you feel like tackling it
[03:24:08] baweaver: heh, inclusion
[03:24:30] baweaver: Probably going over base sql and antipatterns as they apply to Rails
[03:24:37] esauOp: has joined #RubyOnRails
[03:26:48] erich__: has joined #RubyOnRails
[03:27:25] tfittsy: baweaver: kind of on topic for that same post, you can use something like Bar.where(:id => Foo.select(:bar_id).group(:bar_id).having("count(bar_id) > 1")) to select all Bars with more than one foo.
[03:28:26] baweaver: I'll definitely be writing more on SQL in the future, getting a tinge rusty.
[03:29:01] nnfak: has joined #RubyOnRails
[03:29:11] FailBit: it's kind of amazing how powerful SQL really is
[03:29:13] baweaver: you're missing an ids on the end though ;)
[03:29:22] FailBit: and I'm used to my mongoid queries
[03:29:26] baweaver: It really is, and AR basics barely scratch the surface.
[03:29:45] VeryBewitching: ActiveRecord is a great layer over SQL, but I think it can be a trap for those who think they'll never have to write SQL again.
[03:29:56] tfittsy: It's so fast for a lot of things. Like I said earlier, I just finished migrating an app from MSSQL to PostGres. For a long time the app was running half in one database and half in the other and had to rely on ruby to join the two. After getting stuff all into one database some operations are 100x faster
[03:30:37] arooni-mobile: has joined #RubyOnRails
[03:30:44] pwnd_nsfw: One of my motives for moving to rails was thinking ActiveRecord would take care of all of my problems
[03:30:51] tfittsy: baweaver: missing what ids on the end?
[03:30:55] pwnd_nsfw: I found out the diff
[03:31:16] baweaver: Probably going to use my "rapture" placeholder gem for migrating databases from one format to another.
[03:32:33] tfittsy: baweaver: it wasn't just a different format. Completely different table layout, I had to build SQL views for nearly every table, then write the code in rails to get rid of an MS Point-of-Sale system, then transfer data.
[03:32:49] strcmp1: pwnd_nsfw, there's still times when its preferable to use raw SQL over AR abstractions
[03:32:51] tfittsy: actually it was literally every table.
[03:32:59] baweaver: man, that's nasty stuff
[03:33:12] baweaver: Oh there are times when you want to reach for SQL
[03:33:18] tfittsy: yeah, it was in use for almost 16 years, still on SQL Server 2005
[03:33:30] baweaver: AR just makes some newbies think they'll never have to touch it
[03:33:36] baweaver: leading to some truly evil queries.
[03:33:55] strcmp1: AR shouldn't make you ignorant of SQL
[03:33:58] neilor: has joined #RubyOnRails
[03:34:03] tfittsy: It was end-of-lifed and was going to cost like $20k to upgrade the software and get a version of SQL Server with more space for db, all for a program that had no path going forward.
[03:34:20] stardiviner: has joined #RubyOnRails
[03:34:21] baweaver: that's the danger of abstractions some times
[03:34:31] baweaver: which is why I'm forcing myself to go back over SQL
[03:35:06] Rakunh0: has joined #RubyOnRails
[03:35:14] pwnd_nsfw: I started out in PHP with no frameworks (I actually have never tried any PHP frameworks), so I did get a good taste in my couple years of dev
[03:35:36] pwnd_nsfw: Then when I saw the magic of AR, I popped a slight chub. But, yes, it can't be for everything
[03:36:19] herbst: has joined #RubyOnRails
[03:36:43] baweaver: our instructor had us writing SQL by hand for weeks, shame I got rusty on it after that all.
[03:36:49] tfittsy: pwnd_nsfw: yeah, I was on php with no framework either for years. I learned about rails but wasn't sure it would work for my database. Looked into CakePHP for a while before figuring out a way to make my stuff work with Rails while I made the switch over almost 2 years. So glad I did.
[03:36:59] VeryBewitching: I've talked to some developers who were new in the field that thought all you could do with SQL was retrieve and store data. They had no idea what else the DBMS provided.
[03:37:45] VeryBewitching: The very badly attempted homage to Rails.
[03:37:55] kegan_: has joined #RubyOnRails
[03:37:59] baweaver: There's a new trend I've noticed
[03:38:09] baweaver: whenever a language gets popular, someone tries to make the next Rails
[03:38:10] tfittsy: I know. I wanted rails, saw the syntax of CakePHP and decided for sure I wouldn't be using it.
[03:38:17] baweaver: often times horribly, just to try and get fame.
[03:38:34] FailBit: luajit is weird
[03:40:21] VeryBewitching: baweaver: I think the key thing there is that Ruby introduces a very flexible way to express functionality.
[03:40:44] VeryBewitching: baweaver: Ruby is also a language that has a strong identity.
[03:41:05] baweaver: Python as well.
[03:41:13] tfittsy: yeah, PHP just can't be consise like ruby
[03:41:20] VeryBewitching: Could never get into Python
[03:41:24] tfittsy: not even close
[03:43:12] baweaver: Too strict for me honestly, but no denying it has a strong identity. That being said, I can still sling Python well enough for production.
[03:43:23] Cache_Money: has joined #RubyOnRails
[03:43:38] w0rd-driven: has joined #RubyOnRails
[03:43:49] sfr^: has joined #RubyOnRails
[03:43:54] VeryBewitching: baweaver: I can write Python too, but there's something about the way I have to think when writing it that doesn't feel right, if that makes any sense.
[03:44:12] baweaver: Why do you think I'm a Rails dev? ;)
[03:44:41] VeryBewitching: smoke break, bbs
[03:44:46] jholm: has joined #RubyOnRails
[03:44:52] universa1: has joined #RubyOnRails
[03:46:38] hydrozen: when using the mem_cache_store, do you need to add the dalli gem to your Gemfile?
[03:46:53] sevenseacat: has joined #RubyOnRails
[03:47:18] markelite: has joined #RubyOnRails
[03:48:04] hydrozen: documentation says "Rails uses the bundled dalli gem by default."
[03:48:12] hydrozen: but i don???t see it in Gemfile.lock
[03:49:38] Radar: hydrozen: You will need to add it yourself.
[03:50:50] Meow-J: has joined #RubyOnRails
[03:54:02] mary5030: has joined #RubyOnRails
[03:55:31] kegan_: i have a 4 tab panel with next/previous buttons. it's one giant form for a parent object, and the first two tabs have fields_for rendered into them from a partial for two models that the parent ANAF... the form submits fine, but i would like to have the buttons try to persist the record by ajax call and not advance if they fail... is there a better way to do this besides, say, a route for
[03:55:31] kegan_: each with controller methods in the parent that have js.erb views which advances on success or displays error if save is failed?
[03:55:38] kegan_: how might i do it with javascript only? is that advisable?
[03:56:43] kegan_: i guess i'm making an ajax request either way, with the rails helpers and routes or with just javascript
[03:57:22] hydrozen: Radar: thanks
[03:59:12] CBX: has joined #RubyOnRails
[04:00:49] NBarnes: has joined #RubyOnRails
[04:00:55] rickmasta: has joined #RubyOnRails
[04:01:37] VeryBewitching: has joined #RubyOnRails
[04:05:31] Pupeno: has joined #RubyOnRails
[04:12:45] wsaryada: has joined #RubyOnRails
[04:14:05] maz-dev: has joined #RubyOnRails
[04:26:24] zoidfarb: has joined #RubyOnRails
[04:31:48] doctorly: has joined #RubyOnRails
[04:32:00] jsuth_: has joined #RubyOnRails
[04:33:18] doctorly: I am having an issue trying to select a dynamically generated form. using `.submit` no longer works when the form is dynamically generated. What is the correct method for doing this?
[04:33:30] mike___1234: has joined #RubyOnRails
[04:33:54] drikerf: has joined #RubyOnRails
[04:34:09] doctorly: I am using Jquery by the way, sorry.
[04:34:53] towski_: has joined #RubyOnRails
[04:38:02] Radar: doctorly: !ncnh
[04:38:02] helpa: doctorly: If you don't provide any code, it becomes really difficult for us to help you. Providing code to reproduce the problem increases your chances of getting great, accurate help immensely.
[04:38:10] helpa: Show rather than tell. Explaining your problem with code, stacktraces or errors is always preferred to explaining it with just text. Show us what's happening, rather than telling us.
[04:39:48] zoidfarb: has left #RubyOnRails: ()
[04:40:35] doctorly: There isn't any code that I can show. Can't you give advice on the general problem? I am having the issue of dynamic content not being selectable by jQuery. I know it can be done with '.on', but I need something that will work with
[04:41:59] VeryBewitching: doctorly: Isn't this more of a #jquery question?
[04:42:18] Radar: "There is no code" "content not being selectable by jQuery"
[04:42:25] Radar: ACTION is so very damn confused right now
[04:42:36] VeryBewitching: ACTION gives Radar a cookie.
[04:42:38] Radar: "I am having a code issue but I have no code" <- literally what I'm hearing right now
[04:42:59] drikerf: has joined #RubyOnRails
[04:43:00] doctorly: I have code, there is no doe that I can show
[04:43:15] VeryBewitching: Hire a consultant doctorly
[04:43:47] VeryBewitching: sevenseacat: hah
[04:43:57] VeryBewitching: helpa is thwarting you too today!
[04:44:13] doctorly: I am not doing this for pay, I am still learning, but I still had to sign an nda on someone elses project.
[04:44:34] doctorly: not trying to get free work, literally need help learning.
[04:45:01] sevenseacat: doctorly: but we can't help you with your code if we can't see it
[04:46:42] doctorly: Yeah that sucks, if nobody has an idea of what I am talking about, I guess I will ask somewhere else and hope they will.
[04:46:50] Radar: doctorly: Rules are rules.
[04:47:15] VeryBewitching: doctorly: We have more than enough knowledge to assist you, but this isn't a training centre.
[04:47:18] Radar: "I am not doing this for the pay" "I can't show you any code legally"
[04:47:29] Radar: So you're legally bound to something, but they're not paying you?
[04:47:52] Radar: sevenseacat: !rule3.2
[04:47:52] helpa: sevenseacat: NO FAKE CODE. If you're under an NDA, we cannot help you with your problem. Go hire a consultant.
[04:47:58] Radar: That's the one you're after.
[04:48:24] sevenseacat: fun story, I had to sign my first NDA yesterday
[04:48:31] sevenseacat: Radar: ah hah.
[04:48:54] VeryBewitching: sevenseacat: How did you manage to avoid that for so long?
[04:48:58] sevenseacat: but I'm getting paid for my work here, and paid well, so all good
[04:49:23] sevenseacat: VeryBewitching: never really worked on anything critical
[04:49:52] sonofdirt: has joined #RubyOnRails
[04:50:00] Swappticon: has joined #RubyOnRails
[04:50:18] doctorly: Radar: In order to work on the project I needed to sign the nda, that isn't a big deal to me. I wasn't implying that you don't have the knowledge to help me either, I was saying that with the information I gave you, you can't assist me. I will just have to find somewhere else. I don't have another option lmao. I didn't realize the irc is so strict about code.
[04:50:34] VeryBewitching: Signed my first one at 20, building a build/QA system across 5 platforms, but they were in the security space, made sense to.
[04:50:41] Radar: doctorly: Surely you can understand why we're so strict about code though, right?
[04:50:57] Radar: doctorly: Without the code... you're expecting us to debug a problem *blind*
[04:51:04] Radar: Kind of like how those people play chess blindfolded.
[04:51:08] sevenseacat: yeah this project is in the medical space. all sekrit.
[04:51:10] doctorly: Radar: I understand ambiguity, I wasn't expecting you to do anything at all
[04:51:14] sevenseacat: sekrit: sorry for highlighting you.
[04:51:23] Radar: doctorly: ok, great. Making sure expectations are set correctly for next time.
[04:51:24] sevenseacat: doctorly: but you were asking for our help
[04:51:43] Radar: doctorly: We're always happy to help you as long as we can see the code and that you follow our instructions/requests.
[04:51:48] doctorly: I was, but I wasn't expecting it
[04:52:25] Aeyrix: I've signed more NDAs than any other type of document.
[04:52:29] minotep: has joined #RubyOnRails
[04:53:14] quazimodo: t1 instances suck at asset precompilation :(
[04:53:20] Aeyrix: You sound surprised.
[04:53:28] Aeyrix: Use AeyrixHost??? tbh
[04:53:33] VeryBewitching: doctorly: I think you need some direction rather than help really. Making an AJAX request with data from any form on a page is trivial. Just a quick Google search gave me this, maybe it'll point you in the right direction. https://pragmaticstudio.com/blog/2015/3/18/rails-jquery-ajax
[04:53:44] quazimodo: Aeyrix: is you cheap and gooda?
[04:53:55] rhizome: doctorly: what does that have to do with rails? you will likely have better luck in #jquery, which is a channel that exists
[04:54:02] quazimodo: with requirejs it just ends up dying
[04:54:12] Aeyrix: Not the cheapest, but I've been around the scene and the technology a *long* time.
[04:54:13] VeryBewitching: Aeyrix: I've probably signed more NDAs than anything else as well.
[04:54:22] Aeyrix: I know my way around and inside a hypervisor.
[04:54:28] quazimodo: Aeyrix: link plaese
[04:54:32] Aeyrix: Unfortunately I'm also not for sale yet. :(
[04:54:39] Aeyrix: #ror discount code as soon as I am I promise.
[04:54:43] rhizome: badass.gif
[04:54:56] quazimodo: do you hosting company or is this jokes?
[04:55:09] Aeyrix: I have written a large collection of software for a venture I want to turn into a hosting company.
[04:55:33] Aeyrix: Unfortunately, due to time, burnout, and a large amount of stress, it's not yet close enough to being an acceptable standard for me.
[04:56:20] doctorly: VeryBewitching: Yeah, my problem is dealing with elements that are rendered after the rest of the page, it definitely looks like I should ask on #jquery, but I probably won't be able to get much help from them either without posting code.
[04:56:36] doctorly: VeryBewitching: Thanks though, guys
[04:56:39] helpa: http://i.imgur.com/m9m3wr9.gif
[04:56:41] helpa: We're not all guys here - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
[04:56:42] Aeyrix: doctorly: There's a callback for that fam.
[04:57:39] ruurd: has joined #RubyOnRails
[04:57:54] VeryBewitching: doctorly: Hint: Inspect Element is your friend.
[04:58:03] Rakunh0: has joined #RubyOnRails
[05:00:22] theery: has joined #RubyOnRails
[05:04:34] Axsuul: has joined #RubyOnRails
[05:09:38] dopie: has joined #RubyOnRails
[05:09:55] charliesome: has joined #RubyOnRails
[05:14:23] Balzrael: has joined #RubyOnRails
[05:19:23] annlewis: has joined #RubyOnRails
[05:20:40] choke: has joined #RubyOnRails
[05:21:36] aceRacer: has joined #RubyOnRails
[05:21:54] naftilos76: has joined #RubyOnRails
[05:23:26] baweaver: has joined #RubyOnRails
[05:23:45] dhjondoh: has joined #RubyOnRails
[05:24:10] riotjones: has joined #RubyOnRails
[05:24:30] aceRacer: with activemodel serializer how do I return a json that looks like {users: { 1: {message.first.to_json} , 2: {message.second.to_json} } }
[05:24:41] aceRacer: where user has_many messages
[05:33:19] jholm: has joined #RubyOnRails
[05:34:08] kies: has joined #RubyOnRails
[05:36:22] EasyCo: has joined #RubyOnRails
[05:39:25] ayonkhan: has joined #RubyOnRails
[05:42:25] wldcordeiro: has joined #RubyOnRails
[05:42:53] oldbay: has joined #RubyOnRails
[05:42:54] tagrudev: has joined #RubyOnRails
[05:43:19] aganov: has joined #RubyOnRails
[05:46:05] riotjones: has joined #RubyOnRails
[05:47:29] bmalum_: has joined #RubyOnRails
[05:49:16] codenapper: has joined #RubyOnRails
[05:51:08] dionysus69: has joined #RubyOnRails
[05:51:38] dionysus69: hello, has anyone deployed to windows with mssql?
[05:51:58] deavid: has joined #RubyOnRails
[05:53:23] srinidhi: has joined #RubyOnRails
[05:53:31] CheckYourSix: has joined #RubyOnRails
[05:54:02] zlogan: has joined #RubyOnRails
[05:56:07] sevenseacat: I feel sorry for anyone that has.
[05:56:29] yardenbar: has joined #RubyOnRails
[05:56:50] Ropeney: sevenseacat: Though have you used mssql management interface? feel so nice compared to pgadmin
[05:56:52] dionysus69: you see for one of my projects I might have to, but if I deploy to a linux machine and I want to use mssql on windows remote pc?
[05:56:57] mwcmitchell: has joined #RubyOnRails
[05:57:05] sevenseacat: dionysus69: thats fine.
[05:57:09] sevenseacat: that I have done.
[05:57:25] Ropeney: dionysus69: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter looks to be your bet
[05:57:31] dionysus69: pgadmin is ok if it didn't crash on every right click, I am forced to use menus
[05:57:41] sevenseacat: Ropeney: I don't tend to use guis for my dbs
[05:57:59] iateadonut: has joined #RubyOnRails
[05:58:04] sevenseacat: when i've used mssql, I've used sequel and tinytds
[05:58:06] Ropeney: sevenseacat: Generally don't either, but when it makes sense to the MSSQL one is soooo nice
[05:58:09] sevenseacat: not activerecord
[05:58:19] dionysus69: ye my university is using windows stuff and I stubbornly want to use rails for my bachelor's thesis :D
[05:58:47] Aeyrix: >bachelors
[05:58:52] sevenseacat: our university had a rule, if they couldnt run the code we submitted, it was an instant fail
[05:59:11] Aeyrix: I created an entire container
[05:59:19] aceRacer: help me plz
[05:59:33] dionysus69: well I will make sure it runs, I am starting semester earlier that's why
[05:59:35] sevenseacat: aceRacer: what code do you have so far?
[06:00:00] dionysus69: thanks Ropeney )
[06:00:19] eGGsha: has joined #RubyOnRails
[06:00:34] sevenseacat: unless you control every bit of the stack (which you're not likely to do on university hardware) I think you're fighting a losing battle
[06:00:40] sevenseacat: but thats my personal opinion
[06:00:54] jonr22: has joined #RubyOnRails
[06:01:32] ranchodev: has joined #RubyOnRails
[06:02:43] AzaToth: has joined #RubyOnRails
[06:02:58] jonr2219: has joined #RubyOnRails
[06:03:11] Radar: aceRacer: Why do you want the messages to be returned like that and not a normal array?
[06:03:28] Radar: i.e. "messages": [message1, message2, ..., messageN] ?
[06:03:40] Radar: Seems like you're trying to make AMS do something it doesn't really want to do.
[06:03:41] dionysus69: the main IT guy in university is close to me so I can ask him anything :D I am sure they also have linux machine for something somewhere which I will probably use dunno, and if not I will ask them to get a pc for that, my project won't need supercomputer for sure core 2 duo server will suffice )
[06:03:42] VeryBewitching: sevenseacat: You could go through the effort to ask them to document the parameters under which your code will be running.
[06:04:31] sevenseacat: *shrugs* I stated my opinion and I'm sticking to it.
[06:04:43] arBmind: has joined #RubyOnRails
[06:05:05] arup_r: has joined #RubyOnRails
[06:05:06] aceRacer: https://gist.github.com/aghosh47/f5b9190bcd4735743325 I dunno, I mean it can be {2: {id: 1}} 2 is the user_id, I told to do something like users: [{id: 2, message: messages }] but....
[06:05:09] dionysus69: ok thanks :D I will take a risk at this beginning stage )
[06:05:43] towski_: has joined #RubyOnRails
[06:05:59] VeryBewitching: sevenseacat: I wasn't contesting your opinion actually, asking them to provide what I would consider to be suitable documentation would likely result in them saying stone-walling. ;)
[06:06:35] Radar: arup_r: !rule3
[06:06:35] helpa: arup_r: Clearly explain what is happening and create a Gist (http://gist.github.com), (formatted neatly please: http://bit.ly/1q75oia) of the code that is causing the problem you are encountering, as well as any useful output like stacktraces.
[06:06:47] Radar: oops I meant "hi" also sorry typo
[06:06:49] sevenseacat: pre-emptive attack lol
[06:07:04] VeryBewitching: dionysus69: Ask them if you can at least get information up front for where it's going to be running so you can plan ahead for it.
[06:07:52] dionysus69: VeryBewitching: yes that's what I am going to do, I have consultation meeting today :) thanks for insight :D
[06:07:56] arup_r: Radar: I was checking if I am authenticated or not.. I have no doubts right now. Just came to office and logging to my all needed tools..
[06:08:08] Radar: arup_r: ok :)
[06:09:03] aceRacer: the code in the gist I have for the index action its fine, now as a sample if I want to convert messages: [{id: 1}, {id: 2}] into messages: {1: {}, 2:{}} how do I proceed? I tried with key :id. but it says key is not defined
[06:09:27] Lightsword: has joined #RubyOnRails
[06:09:36] Radar: aceRacer: ok, you're not answering my questions so I'm assuming you don't want my help.
[06:09:52] drale2k: has joined #RubyOnRails
[06:11:52] w0rd-driven: has joined #RubyOnRails
[06:17:03] aceRacer: Radar , I actually don't know, :P but I mean without AMS can it be done?
[06:17:18] jas02: has joined #RubyOnRails
[06:17:39] aceRacer: the guys who are working on the react application want it like that
[06:18:50] aceRacer: none of them are online right now actually .. I just came and saw this on my story board
[06:19:05] Radar: aceRacer: the people working on the react component will listen to you when you tell them the data can't come back like that from active model serializers
[06:19:10] Radar: aceRacer: They'll learn to adapt, I am sure.
[06:19:33] Aeyrix: >the people working on the react component
[06:19:41] Aeyrix: >javascript frameworks were created so there wasn't a team division
[06:19:46] srinidhi: has joined #RubyOnRails
[06:20:03] kimegede: has joined #RubyOnRails
[06:20:23] finnnnnnnnnnn: has joined #RubyOnRails
[06:20:26] annlewis: has joined #RubyOnRails
[06:20:58] Aeyrix: aceRacer: It's not your thing to fix yo
[06:21:00] Aeyrix: or, well, it might be
[06:21:01] Radar: aceRacer: What you're asking to do... it's very hard to do it with active model serializers
[06:21:31] aceRacer: without serializer? like manually write a class and call to_json on it?
[06:21:32] VeryBewitching: You *can* do it without it, if you can't do it with it.
[06:21:33] Radar: aceRacer: So either you can ditch ams entirely and build it with jbuilder, which will take a LOT of work... or you could tell the react team that you can't do it that way and that there's a way that you CAN do it, but it's only a little bit of work for them to adapt.
[06:22:04] aceRacer: ok, I will comment on the story and see what they say.
[06:22:21] herbst: has joined #RubyOnRails
[06:24:35] deavid: has joined #RubyOnRails
[06:24:57] Radar: Thanks aceRacer.
[06:25:57] duncannz: has joined #RubyOnRails
[06:26:02] aceRacer: lala thank you
[06:27:25] jonr22: has joined #RubyOnRails
[06:28:25] Pupeno: has joined #RubyOnRails
[06:29:28] jonr22_: has joined #RubyOnRails
[06:30:32] sinkensabe: has joined #RubyOnRails
[06:31:36] jonr2219: has joined #RubyOnRails
[06:34:00] MartinElvar: has joined #RubyOnRails
[06:35:34] jonr22: has joined #RubyOnRails
[06:37:39] jonr2219: has joined #RubyOnRails
[06:38:26] mices: how am i supposed to install rvm on freebsd?
[06:38:41] Pupeno: has joined #RubyOnRails
[06:38:42] Pupeno: has joined #RubyOnRails
[06:39:44] jonr22_: has joined #RubyOnRails
[06:40:11] krz: has joined #RubyOnRails
[06:40:25] Ropeney: mices: have you tried anything?
[06:41:29] Kedare: has joined #RubyOnRails
[06:41:45] jonr22: has joined #RubyOnRails
[06:42:10] drale2k: has joined #RubyOnRails
[06:42:11] jgt: has joined #RubyOnRails
[06:43:31] jonr22: has joined #RubyOnRails
[06:45:36] Linuus: has joined #RubyOnRails
[06:45:51] jonr2219: has joined #RubyOnRails
[06:47:53] jonr22_: has joined #RubyOnRails
[06:48:28] Ropeney: mices: https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-on-freebsd-10-1-using-rvm looks pretty upto date as a starting point anyway :D
[06:48:53] Radar: mices: C'mon mate. You know the rules by now, surely :D
[06:49:36] Ven: has joined #RubyOnRails
[06:49:36] jonr22: has joined #RubyOnRails
[06:51:36] neutrino: has joined #RubyOnRails
[06:52:02] jonr2219: has joined #RubyOnRails
[06:53:24] roadt: has joined #RubyOnRails
[06:53:41] roadt: has left #RubyOnRails: ()
[06:53:46] roadt: has joined #RubyOnRails
[06:53:56] jonr22_: has joined #RubyOnRails
[06:55:45] jonr22: has joined #RubyOnRails
[06:57:01] psteyn: has joined #RubyOnRails
[06:57:48] psteyn: I need some help with transforming a SQL query into proper ActiveRecord syntax
[06:57:50] psteyn: Currently I have:
[06:57:58] jonr2219: has joined #RubyOnRails
[06:58:01] psteyn: time_checks = UserTimeCheck.select("sum(time_spent) as time_spent,min(check_in_time) as check_in_time,max(check_out_time) as check_out_time,user_id").where("check_out_time >= CURDATE()").includes(:user).group('user_id')
[06:58:08] psteyn: But the full query is:
[06:58:21] psteyn: SELECT sum(utc.time_spent) as time_spent,min(utc.check_in_time) first_check_in_time,max(utc.check_out_time) as last_check_in_time,utc.user_id,ifnull((select sum(hours) from time_entries where user_id = utc.user_id and date(created_on) = date(curdate())), 0) as hours FROM user_time_checks AS utc WHERE (date(utc.check_in_time) = date(CURDATE())) AND ((utc.check_in_time > '2015-03-07 15:05:27'))
[06:58:22] psteyn: GROUP BY utc.user_id;
[06:58:54] helpa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[06:58:56] psteyn: My question, I suppose is that in ActiveRecord I'm using UserTimeCheck.select, but I also need to do a TimeEntry.select
[06:58:59] arup_r: psteyn: What is the issue ?
[06:59:37] psteyn: How do I fix my active record statement to do the exact thing as the sql
[06:59:50] psteyn: (hours is missing from active record coz it needs to do a select from other table)
[07:00:34] Balzrael: has joined #RubyOnRails
[07:01:20] psteyn: https://gist.github.com/psteyn/18716cb5e5c542ab57ae
[07:02:00] jonr22: has joined #RubyOnRails
[07:02:04] psteyn: so im struggling to get the ifnull... part of the sql translated into activerecord
[07:02:15] Axsuul: has joined #RubyOnRails
[07:03:53] greenarrow: has joined #RubyOnRails
[07:04:03] jonr2219: has joined #RubyOnRails
[07:04:33] Ropeney: hi Balzrael
[07:05:07] comrad: has joined #RubyOnRails
[07:06:07] jonr22_: has joined #RubyOnRails
[07:07:21] alphaatom: has joined #RubyOnRails
[07:07:44] finnnnnnnnnnn: has joined #RubyOnRails
[07:08:05] jonr22: has joined #RubyOnRails
[07:09:54] jonr2219: has joined #RubyOnRails
[07:12:05] krz: has joined #RubyOnRails
[07:12:12] jonr22: has joined #RubyOnRails
[07:14:12] jonr22_: has joined #RubyOnRails
[07:14:37] alexhartley: has joined #RubyOnRails
[07:14:39] krz: has joined #RubyOnRails
[07:14:48] MartinElvar: has joined #RubyOnRails
[07:16:09] beauby: has joined #RubyOnRails
[07:16:13] jonr2219: has joined #RubyOnRails
[07:16:19] nya: has joined #RubyOnRails
[07:17:39] iloverubynoob: has joined #RubyOnRails
[07:17:49] futilegames: has joined #RubyOnRails
[07:18:02] jonr22: has joined #RubyOnRails
[07:18:41] roadt: hi, I was trying to install redmine 3.1.0 (rails 4.2.3) into a subdirectory using 'unicorn_rails -c /u/apps/redmine/shared/config/unicorn.rb -E development --path redmine', it doesn't take effect. use ENV['RAILS_RELATIVE_URL_ROOT'] = '/redmine' in unicorn.rb, doesn't take effect. I tried to dig a a little deep in rails 4.2.3 source code, in route_set.rb#find_script. I'm not sure but if I'm right, RAIL_RELATIVE_URL_ROOT support is not working proper
[07:18:41] roadt: ly/or removed in rails4.2.3?
[07:19:24] psteyn: Hi guys, whats the proper way to get 'hours' here? :time_checks = UserTimeCheck.select("sum(time_spent) as time_spent,min(check_in_time) as check_in_time,max(check_out_time) as check_out_time,user_id,(select sum(hours) from time_entries as hours)").where("check_out_time >= CURDATE()").includes(:user).group('user_id')
[07:19:35] psteyn: The UserTimeCheck model does not have 'hours', and as you can see I'm doing a subselect
[07:19:42] psteyn: But in MySQL it does work
[07:19:59] psteyn: But I need hours from the TimeEntries model
[07:20:13] psteyn: (and dont want to join)
[07:20:16] jonr2219: has joined #RubyOnRails
[07:20:33] darutoko: has joined #RubyOnRails
[07:21:13] annlewis: has joined #RubyOnRails
[07:22:21] jonr22_: has joined #RubyOnRails
[07:23:12] iloverubynoob: has joined #RubyOnRails
[07:23:59] pecpec: has joined #RubyOnRails
[07:24:06] towski_: has joined #RubyOnRails
[07:24:18] jonr22: has joined #RubyOnRails
[07:26:26] jonr2219: has joined #RubyOnRails
[07:27:45] wldcordeiro: has joined #RubyOnRails
[07:28:29] jonr22_: has joined #RubyOnRails
[07:29:28] wldcordeiro: has joined #RubyOnRails
[07:29:35] artto: has joined #RubyOnRails
[07:30:24] jonr22: has joined #RubyOnRails
[07:32:27] jonr2219: has joined #RubyOnRails
[07:34:13] jonr22_: has joined #RubyOnRails
[07:34:18] Rubie: has joined #RubyOnRails
[07:36:18] jonr22: has joined #RubyOnRails
[07:36:23] linus1: has joined #RubyOnRails
[07:38:33] jonr2219: has joined #RubyOnRails
[07:38:36] finnnnnnnnnnn: has joined #RubyOnRails
[07:39:02] rhizome: why don't you want to join?
[07:39:04] op84: has joined #RubyOnRails
[07:40:17] choke: has joined #RubyOnRails
[07:40:23] jonr2219: has joined #RubyOnRails
[07:41:31] op84: hi there - i???m currently doing fragment caching on my page navigation - works well so far except to flag the current page as ???active???.. is it possible to fragment cache that as well?
[07:41:34] linus1: has joined #RubyOnRails
[07:42:05] rhizome: what do you mean by "flag the current page as active?"
[07:42:37] jonr22: has joined #RubyOnRails
[07:44:27] op84: rhizome: just add class ???active??? to the html node when lets say @page.id = params[:id] something like that???
[07:44:42] jonr22_: has joined #RubyOnRails
[07:46:08] kimegede: has joined #RubyOnRails
[07:46:26] jonr2219: has joined #RubyOnRails
[07:48:17] ruurd: has joined #RubyOnRails
[07:48:52] jonr22: has joined #RubyOnRails
[07:49:14] op84: rhizome: maybe its easier to do it by javascript?
[07:49:54] chipotle: has joined #RubyOnRails
[07:50:28] arBmind: has joined #RubyOnRails
[07:50:45] jonr22: has joined #RubyOnRails
[07:52:10] zpe: has joined #RubyOnRails
[07:52:26] zpe: has joined #RubyOnRails
[07:52:30] moneylotion: has joined #RubyOnRails
[07:52:40] G: has joined #RubyOnRails
[07:53:02] jonr2219: has joined #RubyOnRails
[07:54:36] jonr22_: has joined #RubyOnRails
[07:56:44] Rubie: has joined #RubyOnRails
[07:56:49] jonr22: has joined #RubyOnRails
[07:58:05] safeforge: has joined #RubyOnRails
[08:00:55] jonr2219: has joined #RubyOnRails
[08:02:57] mices: well now that i've installed rvm the rvm page says i should now install ruby through ports
[08:02:57] jonr22: has joined #RubyOnRails
[08:03:29] mices: i thought i'd be installing ruby and rails through rvm, that's why i installed rvm
[08:04:33] jsrn_: has joined #RubyOnRails
[08:04:43] Balzrael: has joined #RubyOnRails
[08:04:48] jonr22_: has joined #RubyOnRails
[08:06:12] universa1: mices: which rvm page?
[08:06:22] x-light: has joined #RubyOnRails
[08:06:31] bronson: has joined #RubyOnRails
[08:06:39] mices: https://www.ixsystems.com/whats-new/manage-your-ruby-versions-under-freebsd/
[08:06:49] dionysus69: anyone knows any tutorial on how to create an API with rails? just a basic one like serving one line of json on some port
[08:06:57] jonr22: has joined #RubyOnRails
[08:07:07] jokke-: has joined #RubyOnRails
[08:07:41] arup_r: dionysus69: http://apionrails.icalialabs.com/book
[08:07:46] universa1: mices: ohh, maybe check the official rvm docs. have you tried ``rvm install 2.2`` ?
[08:08:51] dionysus69: arup_r: wow that is great! you helped me allot because I was worried for past time that I didn't know anything about API )))
[08:08:52] jonr2219: has joined #RubyOnRails
[08:09:30] mices: unversal1: why did i think that was the official docs?
[08:10:00] mices: never mind
[08:10:11] mices: i see plainly that's not the official site
[08:10:44] arup_r: dionysus69: cool :)
[08:10:45] universa1: mices: i have no clue, and i didn't want to suggest that you do. just that i'd check out the official docs in that case :-)
[08:10:53] duncannz: has joined #RubyOnRails
[08:11:03] universa1: mices: http://rvm.io/
[08:11:04] jonr22: has joined #RubyOnRails
[08:11:14] lxsameer: has joined #RubyOnRails
[08:11:15] lxsameer: has joined #RubyOnRails
[08:12:30] alexUaN: has joined #RubyOnRails
[08:15:33] jgt1: has joined #RubyOnRails
[08:15:46] kitsuneyo: has joined #RubyOnRails
[08:16:08] towski_: has joined #RubyOnRails
[08:16:36] wldcordeiro: has joined #RubyOnRails
[08:16:55] beauby: has joined #RubyOnRails
[08:17:10] solars: has joined #RubyOnRails
[08:19:23] atzorvas: has joined #RubyOnRails
[08:21:52] bmalum: has joined #RubyOnRails
[08:22:00] annlewis: has joined #RubyOnRails
[08:22:02] towski_: has joined #RubyOnRails
[08:22:54] startupality: has joined #RubyOnRails
[08:25:22] jonr2219: has joined #RubyOnRails
[08:28:20] kitsuneyo: has joined #RubyOnRails
[08:31:25] jonr22: has joined #RubyOnRails
[08:32:12] yfeldblum: has joined #RubyOnRails
[08:33:53] Spami: has joined #RubyOnRails
[08:36:21] patrick_star: has joined #RubyOnRails
[08:39:34] mices: so now install rails with rvm install or gem install?
[08:44:08] moeabdol: has joined #RubyOnRails
[08:45:04] DEA7TH_: has joined #RubyOnRails
[08:46:05] marr: has joined #RubyOnRails
[08:47:35] moeabdol: has joined #RubyOnRails
[08:52:07] Ven: has joined #RubyOnRails
[08:53:21] nhhagen: has joined #RubyOnRails
[08:54:06] Rubie: has joined #RubyOnRails
[08:57:50] maloik: has joined #RubyOnRails
[09:01:41] sevenseacat: has joined #RubyOnRails
[09:09:18] mugurel: has joined #RubyOnRails
[09:09:29] leslie: I keep getting a message saying mysql2 isn't loaded, but it's in the gemfile. even happens with a new install (rails new myapp --database=mysql2)
[09:09:57] leslie: the version is 0.4.0
[09:10:18] jholm: has joined #RubyOnRails
[09:10:59] leslie: "Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord)."
[09:11:23] riotjones: has joined #RubyOnRails
[09:12:46] voker57: has joined #RubyOnRails
[09:12:57] riotjones: has joined #RubyOnRails
[09:14:33] skullcrasher: has joined #RubyOnRails
[09:17:30] weckl: has joined #RubyOnRails
[09:17:43] beauby: has joined #RubyOnRails
[09:18:08] leslie: apparently rails doesn't like 0.4.0
[09:19:21] leslie: 0.3.20 works fine
[09:22:30] dideler: has joined #RubyOnRails
[09:22:31] Axsuul: has joined #RubyOnRails
[09:22:45] annlewis: has joined #RubyOnRails
[09:23:55] wpp: has joined #RubyOnRails
[09:25:08] wpp: Hi, is there a way to compile assets without having a database connection? I'm trying to run rake assets:precompile on a machine which will not be running the application and therefore does not have a database set up.
[09:25:43] wpp: As far as I understand there was an option for that in Rails < 4, (config.initialize_on_precompile) which has been removed in Rails 4.
[09:27:51] jozan: has joined #RubyOnRails
[09:28:31] bmalum_: has joined #RubyOnRails
[09:29:13] jozan: has left #RubyOnRails: ("Bye")
[09:29:19] jozan: has joined #RubyOnRails
[09:29:24] Ergo: has joined #RubyOnRails
[09:32:56] duncannz: has joined #RubyOnRails
[09:34:03] alaing: has joined #RubyOnRails
[09:35:44] psteyn: I have a model called UserTimeCheck, and one called TimeEntries. How can I include stuff from TimeEntries inside a UserTimeCheck.find ?
[09:35:57] psteyn: (without a join, I want to do a subquery for example)
[09:37:17] alaing: Hi I'm having problems with a cucumber test. I think its my matcher that needs tweaking but I'm not sure of the syntax
[09:37:24] alaing: this is my code http://pastie.org/10404850
[09:38:25] alaing: I'm looking for a table with a class of "claims_table" and then within that table I would like to find the tbody element and then check if there is specific content in the tbody
[09:39:18] alaing: I've used save_and_open_page and the output is returning what i'm expecting so its just the test thats at fault
[09:42:22] platzhirsch: has joined #RubyOnRails
[09:43:09] kimegede: has joined #RubyOnRails
[09:43:15] Node_966: has joined #RubyOnRails
[09:44:05] sevenseacat: has joined #RubyOnRails
[09:45:15] ch0ke: has joined #RubyOnRails
[09:46:23] Linuus: has joined #RubyOnRails
[09:47:32] DoubleMalt: has joined #RubyOnRails
[09:49:53] blackhuey: has joined #RubyOnRails
[09:50:31] frzn: has joined #RubyOnRails
[09:50:31] frzn: has joined #RubyOnRails
[09:50:36] Cervajz: has joined #RubyOnRails
[09:50:54] alexhartley: has joined #RubyOnRails
[09:52:19] Cervajz_: has joined #RubyOnRails
[09:52:36] pawnbox: has joined #RubyOnRails
[09:55:44] zlogan: has joined #RubyOnRails
[09:56:39] Cervajz: has joined #RubyOnRails
[09:58:57] nettoweb: has joined #RubyOnRails
[10:00:17] Detch: has joined #RubyOnRails
[10:04:39] jholm: has joined #RubyOnRails
[10:05:50] xcesariox: has joined #RubyOnRails
[10:09:47] Kallis: has joined #RubyOnRails
[10:11:10] cpg: has left #RubyOnRails: ()
[10:12:59] arup_r: has joined #RubyOnRails
[10:15:40] tvw: has joined #RubyOnRails
[10:20:21] rickmasta: has joined #RubyOnRails
[10:20:48] allcentury: has joined #RubyOnRails
[10:22:04] patrick_star: has joined #RubyOnRails
[10:23:31] annlewis: has joined #RubyOnRails
[10:26:45] merlinp: has joined #RubyOnRails
[10:26:58] charliesome: has joined #RubyOnRails
[10:28:15] petersaints: has joined #RubyOnRails
[10:30:06] jozan: has left #RubyOnRails: ("Bye")
[10:32:01] konsolebox: has joined #RubyOnRails
[10:32:15] wasp__: has joined #RubyOnRails
[10:32:53] chills42: has joined #RubyOnRails
[10:33:25] dhjondoh: has joined #RubyOnRails
[10:34:34] mostlybadfly: has joined #RubyOnRails
[10:34:47] snoobydoo: has joined #RubyOnRails
[10:34:49] no_parachute: has joined #RubyOnRails
[10:35:08] no_parachute: hey guys I have a noob rails problem, anyone care to help?
[10:36:17] no_parachute: NickServ register no_parachute
[10:36:49] wpp: no_parachute I think you should just go for it
[10:36:55] wpp: ask away
[10:37:30] no_parachute: cool, so I've created a scaffold for posts for a super simple blogging app
[10:37:37] psteyn: How can I modify an activerecord object after the select to contain an additional attribute 'hours' (but hours not a table)
[10:37:38] no_parachute: and a category object
[10:37:46] psteyn: So I want this,[#<UserTimeCheck id: 89, user_id: 164, check_in_time: "2015-09-08 06:47:01", check_out_time: "2015-09-08 06:47:04", comments: nil, time_spent: 3>]
[10:37:54] psteyn: To change to DEBUGTWO[#<UserTimeCheck id: 89, user_id: 164, check_in_time: "2015-09-08 06:47:01", check_out_time: "2015-09-08 06:47:04", comments: nil, time_spent: 3, hours: blahblah>]
[10:38:14] no_parachute: however when I create a new post with a "category" field no category is actually created (it creates a null object instead)
[10:38:46] no_parachute: for the form I have:
[10:38:47] no_parachute: <div class="category"> <%= f.label :category %><br> <%= f.text_area :category %> </div>
[10:39:23] no_parachute: I also setup the relationships between Category and Post in each model
[10:39:58] no_parachute: currently the create of posts_controller (where I think my mistake lies) is:
[10:40:00] no_parachute: @post = Post.new(post_params) @post.category = Category.new(post_params[:category])
[10:40:04] wpp: no_parachute you should post your code on gist.github.com
[10:40:15] no_parachute: sure, one sec
[10:41:18] wpp: psteyn not sure if I'm misunderstanding but what about a method? class UserTimeCheck; def hours puts "blabla" end end
[10:43:36] FailBit: no_parachute: is post_params just params[:post]?
[10:43:45] riotjones: has joined #RubyOnRails
[10:43:55] no_parachute: here's the gist: https://gist.github.com/BrennonTWilliams/a7f10fd9b91c36db9949
[10:43:57] FailBit: if so, you're doing it wrong - you'll leave yourself open to a mass assignment vulnerability
[10:44:18] no_parachute: this won't be deployed anywhere :)
[10:44:18] FailBit: ah okay, I see now
[10:45:15] FailBit: no_parachute:
[10:45:18] FailBit: @post.category = Category.new(post_params[:category])
[10:45:31] FailBit: make sure to save the category after creating it
[10:45:45] no_parachute: ah, so @post.category.save ?
[10:45:55] no_parachute: or do it in the category model?
[10:46:06] FailBit: likely you want something along the lines of @category = Category.create!(...); @post.category = @category
[10:46:19] FailBit: which does the create and save in one step
[10:46:54] wildlander: has joined #RubyOnRails
[10:47:50] no_parachute: ok so this in posts_controller: @post.category = Category.create(post_params[:category]) ?
[10:48:06] no_parachute: and @post.category = @category in the category controller?
[10:49:44] no_parachute: FailBit: is that right?
[10:50:04] rubyonrails452: has joined #RubyOnRails
[10:50:18] rodfersou: has joined #RubyOnRails
[10:51:13] rubyonrails452: has left #RubyOnRails: ()
[10:52:07] vachovskiy: has joined #RubyOnRails
[10:53:14] Detch: has joined #RubyOnRails
[10:54:07] no_parachute: FailBit: still there?
[10:55:06] wpp: no_parachute just chiming in here, I'm not sure where what belongs in what controller, but keep in mind that Category.new (or Anything.new) will only instantiate an object, it will not save it to the database.
[10:56:42] wpp: no_parachute when objects need to be saved to the database (often called "persisted") have a look at http://api.rubyonrails.org/classes/ActiveRecord/Persistence.html
[10:56:48] no_parachute: wpp: right, added @post.save, thanks for pointing it out!
[10:57:05] FailBit: no_parachute: that line is correct
[10:57:13] FailBit: create/create! persist the object.
[10:57:35] losvedir: has joined #RubyOnRails
[10:57:36] maz-dev: has joined #RubyOnRails
[10:58:14] no_parachute: FailBit: its still creating an empty object :/
[10:59:13] no_parachute: does this look right for the first 3 lines of my create in posts_controller?:
[10:59:19] no_parachute: @post = Post.new(post_params)
[10:59:24] no_parachute: @post.category = Category.create(post_params[:category])
[10:59:29] Detch: has joined #RubyOnRails
[10:59:39] FailBit: http://api.rubyonrails.org/classes/ActiveRecord/Persistence/ClassMethods.html#method-i-create
[11:00:13] FailBit: maybe validations are failing
[11:00:18] FailBit: try using create!
[11:00:23] FailBit: see if it throws
[11:00:25] workmad3: no_parachute: you could probably add `accepts_nested_attributes_for :category` to your Post form, and then you'd just need `@post = Post.create(post_params)`
[11:00:43] workmad3: *Post model
[11:00:53] FailBit: workmad3: or that :3
[11:00:55] no_parachute: workmad3: trying now, thank you for chiming in
[11:01:04] wpp: FailBit no_parachute arent you supposed to add params.require(:post).permit(:category)
[11:01:06] curses: has joined #RubyOnRails
[11:01:27] no_parachute: wpp: to which file?
[11:01:30] wpp: and add what workmad3
[11:01:50] wpp: no_parachute in posts_controller
[11:02:01] FailBit: it would actually need to require(:post).require(:category), if Category is a nested object
[11:02:03] workmad3: no_parachute: if you're using `f.fields_for :category do |category_form| ` in your form, that'll also change the posted parameter to `category_attributes`, which you'll need to permit in your posts controller
[11:02:48] no_parachute: just added, testing now
[11:03:03] no_parachute: undefined local variable or method `params' for PostsController:Class
[11:03:22] workmad3: no_parachute: !gist your code please (controller, model + HTML form)
[11:03:22] helpa: no_parachute: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[11:03:34] no_parachute: sure, ill make another gist. one sec
[11:03:42] curses: do any of you not use turbolinks? is there any danger in me removing it?
[11:03:48] no_parachute: old gist (99% the same) https://gist.github.com/BrennonTWilliams/a7f10fd9b91c36db9949
[11:03:57] wpp: no_parachute you can just update it
[11:04:07] no_parachute: yeah, ill do that :)
[11:04:58] Radar: no_parachute: when showing an error message, it's very helpful if you could show the stacktrace for the error message at the same time
[11:05:17] Radar: no_parachute: generally speaking, the stacktrace is more helpful than the error message itself since it indicates exactly where the problem is occurring
[11:06:10] pawnbox: has joined #RubyOnRails
[11:06:58] FailBit: curses: I use turbolinks
[11:07:04] FailBit: 'tis great
[11:07:37] Palsson: has joined #RubyOnRails
[11:07:37] FailBit: there's no danger in removing it
[11:07:43] losvedir: what do folks think is the best way to encapsulate logic related to cookies (say, visitor tracking, or a/b test)? I would normally want to put it into some sort of ruby class, but the interaction with cookies makes this complicated. OTOH, I don't want a ton of logic living in the controller related to this. thoughts? Right now, I'm just passing `self` into the object, and then `instance_exec`'ing it
[11:07:46] wpp: no_parachute yeah if you look in your posts_controller you have Category.create(post_params[:category])
[11:07:51] FailBit: just make sure to remove it from your manifest etc
[11:08:05] curses: FailBit: I love the idea, but I'm porting over a static site to Rails and it's causing me a ton of js problems, some of which aren't easy to track down..
[11:08:17] no_parachute: wpp: so i should remove that?
[11:08:17] wpp: no_parachute but post_params looks like params.require(:post).permit(:title, :content)
[11:08:35] wpp: no_parachute it is missing the category, that is what workmad3 and I mentioned earlier
[11:09:02] FailBit: (why would you make a static site into rails?)
[11:09:10] wpp: no_parachute do you have a server running in your terminal?
[11:09:15] workmad3: no_parachute: https://gist.github.com/workmad3/86986808669c2351576e <-- I've highlighted out all the changes by wrapping them with ------------------- lines
[11:09:26] no_parachute: yeah, running localhost
[11:09:43] curses: FailBit: static site was basically the design prototype before building the actual app
[11:09:43] workmad3: no_parachute: http://guides.rubyonrails.org/form_helpers.html#nested-forms is the guide on what you need
[11:09:53] sevenseacat: has joined #RubyOnRails
[11:10:18] wpp: no_parachute before you change the code to workmad3 have a look at the request when you submit the form
[11:10:35] Cervajz_: has joined #RubyOnRails
[11:10:35] wpp: no_parachute I have a feeling that will help you out in the future
[11:12:03] workmad3: yeah, I went with the modified gist because there's quite a few things that needed modifying in order to set things up... you should always try to understand why the changes are being made, and wpp's suggestion of looking @ the params before and after is a good place to observe differences :)
[11:12:44] wpp: workmad3 I agree
[11:13:05] artto: has joined #RubyOnRails
[11:13:10] wpp: workmad3 btw have you seen my question asset compilation?
[11:14:12] drale2k: has joined #RubyOnRails
[11:14:12] snoobydoo: This is probably not relevant to rails, but here's the thing. I'm working with the twitter gem, and i keep hitting the rate limit when i try to pull followers, friends, etc., Whats the best practice here, should I pull the data and store it in the db and poll for changes? or is there a simpler way to do this?
[11:14:21] Radar: wpp: Yes, there's an option for that. initialize_on_precompile I think is its name
[11:14:36] arup_r: Radar: still awake ?
[11:14:37] Radar: wpp: https://devcenter.heroku.com/articles/rails-asset-pipeline#failures-in-the-assets-precompile-task
[11:14:53] Radar: arup_r: Yes. Doing some writing while my wife reads her uni assignments.
[11:15:15] arup_r: what is the time there ?
[11:15:35] wpp: Radar "In Rails 4.x this option has been removed and is no longer needed."
[11:16:19] Radar: wpp: I don't know an answer to your question then.
[11:16:30] no_parachute: workmad3: oddly enough the category field is now gone from the form. i copy/pasted your change
[11:16:32] wpp: Radar np I'll keep looking
[11:16:34] Radar: I really wish Sprockets didn't have to instantiate Rails at all :\
[11:16:49] Radar: Probably only has to do it so that it's looking up in the right asset paths
[11:16:57] Radar: something that could be easily configured by default with something like a Sprocketsfile.
[11:17:16] workmad3: wpp: they also have suggestions just underneath that line on how to investigate what's trying to connect to the database
[11:19:06] turbo_MaCk: has joined #RubyOnRails
[11:19:18] wpp: workmad3 Radar Ahh yes looks like an initializer is causing it.
[11:19:24] Radar: there you go
[11:19:29] nyaa: has joined #RubyOnRails
[11:20:05] wpp: Radar yep removing it skips connection establishment
[11:20:06] closer: has joined #RubyOnRails
[11:20:24] neilor: has joined #RubyOnRails
[11:20:26] wpp: So I guess "In Rails 4.x this option has been removed and is no longer needed." is true :)
[11:21:15] pawnbox: has joined #RubyOnRails
[11:21:38] workmad3: wpp: it would be more accurate to say "Rails 4 forces you to do what you should have done in Rails 3 - don't load stuff from the database in initializers"
[11:22:17] no_parachute: workmad3: accepts_nested_attributes_for :category causes the category name field to become invisible
[11:23:27] workmad3: no_parachute: yeah, there's a small bug in the code I provided... the answer is in the guide, so maybe you should read it ;)
[11:23:59] Radar: gonight all
[11:24:18] annlewis: has joined #RubyOnRails
[11:24:28] workmad3: Radar: night!
[11:26:11] workmad3: no_parachute: btw, I didn't mean to add the bug... but it's a fortuitous circumstance as it happens to prevent copy-pasting without understanding :P
[11:27:45] no_parachute: workmad3: ah ha, figured it out. its categories_form not category_form :D
[11:28:43] no_parachute: workmad3: and its still creating a nilClass instead of a Category :( are there other hidden bugs as well?
[11:32:12] ldnunes: has joined #RubyOnRails
[11:34:09] no_parachute: workmad3: and about the bug, i gotcha :) i really do make an effort to read docs, I've just been at this problem for awhile and i just want it to be over
[11:34:27] ebbflowgo: has joined #RubyOnRails
[11:35:50] maz-dev: has joined #RubyOnRails
[11:39:34] mrchris: has joined #RubyOnRails
[11:39:43] chridal: What do you guys think would be a better way to write this: https://gist.github.com/christiandalsvaag/0e454f7debdc42a5f683 ?
[11:40:05] chridal: The issue is that I need to check @user.room first before trying to access @user.room.access_point because it might be nil.
[11:40:11] workmad3: has joined #RubyOnRails
[11:40:15] chridal: I remember reading something about that in Confident Ruby sometime, but I just can't remember it right now.
[11:40:21] chridal: Any suggestions?
[11:40:42] stamina: has joined #RubyOnRails
[11:41:14] losvedir: chridal: @user.room && @user.room.access_point could be `@user.room.try(:access_point)`
[11:41:34] chridal: losvedir: Nice. Is that standard ruby syntax?
[11:41:40] syath: has joined #RubyOnRails
[11:41:44] losvedir: oh, no. it's activesupport, i think
[11:41:52] FailBit: it's handy
[11:41:53] losvedir: so works in rails projects, but not in just standard ruby
[11:42:06] chridal: Ah. That's a nice one. Thanks!
[11:42:27] chridal: Anyone know about something that can be done in standard Ruby too?
[11:43:25] no_parachute: workmad3: added this to create in posts_controller:
[11:43:27] no_parachute: @category = Category.create(post_params[category_attributes:[:name]])
[11:43:36] no_parachute: @post.category = @category
[11:43:49] no_parachute: workmad3: still no dice :(
[11:44:10] rickmasta: has joined #RubyOnRails
[11:45:14] djinni`: has joined #RubyOnRails
[11:45:32] ebbflowgo: has joined #RubyOnRails
[11:47:03] zlogan: has joined #RubyOnRails
[11:47:11] Linuus: has joined #RubyOnRails
[11:47:37] no_parachute: If anyone else cares to help me out, I'm making a super simple blogging rails app with 2 models, posts and categories. For some reason the Category is not made correctly, its just a nilClass https://gist.github.com/BrennonTWilliams/a7f10fd9b91c36db9949
[11:47:49] no_parachute: this is driving me nuts, any help would be very much appreciated
[11:49:15] dustinm`: has joined #RubyOnRails
[11:51:26] no_parachute: workmad3: still there?
[11:51:46] universa1: no_parachute: check the submitted params!
[11:52:05] universa1: singular and plural versions are an important thing.
[11:52:24] universa1: and they should match what you have in your model.
[11:52:42] jholm: has joined #RubyOnRails
[11:53:06] rustymyers: has joined #RubyOnRails
[11:54:06] no_parachute: universa1: looking at the terminal feed's INSERT INTO it looks like they're all there
[11:54:20] universa1: your params... not your sql queries.
[11:54:53] no_parachute: sorry, its "Parameters: " right above the insert into
[11:55:10] no_parachute: looks like they're all there
[11:55:19] Coldblackice: has joined #RubyOnRails
[11:55:23] universa1: categories and category are NOT the same.
[11:55:37] no_parachute: namely "categories"=>{"name"=>"k"}
[11:56:01] universa1: singular and plural versions are an important thing.
[11:56:03] universa1: and they should match what you have in your model.
[11:56:28] neilor: has joined #RubyOnRails
[11:57:01] Macaveli: has joined #RubyOnRails
[11:57:13] universa1: your post belongs to a single category.
[11:58:23] no_parachute: universa1: @category = Category.create(post_params[categories:[:name]]) still isn't doing it
[11:59:27] universa1: no_parachute: did you read the guide workmad3 linked for you?
[11:59:43] curses: has joined #RubyOnRails
[11:59:46] universa1: no_parachute: http://railscasts.com/episodes/196-nested-model-form-revised
[11:59:50] no_parachute: yes, originally had the form: <%= f.fields_for :category do |category_form| %>
[11:59:59] no_parachute: but was told to change it to categories
[12:00:17] no_parachute: since category made the text field not show up for some reason
[12:00:33] universa1: no_parachute: this one is also very good,
[12:01:00] no_parachute: looks like that cast is behind a paywall
[12:01:15] no_parachute: are you saying my form is wrong?
[12:01:43] nya: has joined #RubyOnRails
[12:01:55] universa1: no_parachute: without having looked at the guide, it usually is written from the perspective of a one to many association, but you are doing a one to one association.
[12:02:56] universa1: no_parachute: so... show the submitted params if you do f.fields_for :category do |category_form| ; be aware that the category object needs to be initialized in the new action iirc.
[12:04:03] no_parachute: universal: doing category (which i was doing originally) makes the text field not appear, will initializing a category object fix that, and if so where do i init it?
[12:04:25] universa1: no_parachute: se above.
[12:05:38] no_parachute: univera1: sorry I'm not following, I've been at this problem for four hours. I read the doc workmad3 linked to about this
[12:05:51] universa1: no_parachute: be aware that the category object needs to be initialized in the new action iirc
[12:06:03] charliesome: has joined #RubyOnRails
[12:06:20] no_parachute: univera1: where?
[12:06:30] universa1: how many new actions do you have?
[12:06:49] erich__: has joined #RubyOnRails
[12:07:00] pecpec: has left #RubyOnRails: ("Leaving...")
[12:07:01] pecpec: has joined #RubyOnRails
[12:07:08] no_parachute: one new() in each controller for post and category
[12:07:33] universa1: no_parachute: ok. which controller you are currently using to get the form displayed?
[12:07:49] no_parachute: posts controller
[12:08:05] universa1: no_parachute: ok. so what enw action do you think it is?
[12:09:04] no_parachute: right, but doesn't the form call create? because i create an instance of category there and assign it to the newly initialized post
[12:09:19] universa1: no_parachute: what action renders the initial form?
[12:11:16] no_parachute: universa1: ok i initialized a Category along with post in new()
[12:11:30] no_parachute: still not creating the Category
[12:11:30] universa1: no_parachute: show
[12:11:48] universa1: how did you initialize it?
[12:11:57] no_parachute: @category = Category.new
[12:12:59] universa1: no_parachute: ok. you're creating a form for your post object, how does your @post instance variable know about the @category stuff?
[12:13:19] no_parachute: @category = Category.create(post_params[categories:[:name]])
[12:13:26] no_parachute: @post.category = @category
[12:13:43] G: has joined #RubyOnRails
[12:13:45] universa1: no_parachute: create is irrelevant right now.
[12:13:58] universa1: no_parachute: you want your form to be correctly rendered and filled with data.
[12:14:08] grillo: has joined #RubyOnRails
[12:14:13] universa1: no_parachute: so how does @post in new know about @category?
[12:14:15] universa1: does it at all?
[12:14:26] no_parachute: yes, its all ther
[12:14:47] no_parachute: when the form is submitted isn't create() being called?
[12:17:11] universa1: no_parachute: okay, so if you would do @post.category.nil? in your new action this would be false?
[12:17:34] no_parachute: by new action i assume you mean new method?
[12:17:54] universa1: the one that renders your form initially.
[12:18:07] bbrowning: has joined #RubyOnRails
[12:18:11] roxtrongo: has joined #RubyOnRails
[12:18:26] curses: has joined #RubyOnRails
[12:18:45] Pazician: has joined #RubyOnRails
[12:18:48] Pazician: has joined #RubyOnRails
[12:19:14] beauby: has joined #RubyOnRails
[12:20:23] no_parachute: univera1: yup, its nil. but we don't create a Category until the form is submitted right? at which point we create it when we create the post, giving its name value from params and assigning it to @post.category, or am I thinking about this wrong?
[12:21:26] fgo: has joined #RubyOnRails
[12:22:20] sebyx07: has joined #RubyOnRails
[12:23:26] wethu: has joined #RubyOnRails
[12:23:50] universa1: no_parachute: creating and initilializing are different things.
[12:24:11] universa1: no_parachute: you want @post.category = Category.new or @post.build_category
[12:24:23] universa1: no_parachute: then you can do f.fields_for :category do |category_form|
[12:24:33] universa1: no_parachute: then you need to look at your params(!!!) and use the correct one.
[12:25:02] annlewis: has joined #RubyOnRails
[12:26:00] meatherly: has joined #RubyOnRails
[12:27:29] turbo_MaCk: has joined #RubyOnRails
[12:29:17] carlosd: has joined #RubyOnRails
[12:30:05] jholm: has joined #RubyOnRails
[12:33:20] pawnbox: has joined #RubyOnRails
[12:36:57] bruno-: has joined #RubyOnRails
[12:38:25] Ergo^: has joined #RubyOnRails
[12:39:48] nightsh: has joined #RubyOnRails
[12:40:24] fschuindt: has joined #RubyOnRails
[12:40:38] weckl: has joined #RubyOnRails
[12:42:37] no_parachute: universa1: in posts_controller new() I added @post.category = Category.new
[12:44:00] JamesDH: has joined #RubyOnRails
[12:44:50] saip0902: has joined #RubyOnRails
[12:48:40] artto: has joined #RubyOnRails
[12:49:38] johnflux_: has joined #RubyOnRails
[12:49:57] johnflux_: How can I get the params from a helper?
[12:51:27] dzejms: has joined #RubyOnRails
[12:51:29] fschuindt: johnflux_: params[:key] ?
[12:52:18] johnflux_: NameError (undefined local variable or method `params' for ApplicationHelper:Module):
[12:52:20] johnflux_: fschuindt: ^^
[12:52:54] johnflux_: fschuindt: I'm calling it from config/initializers/markitup_rails.rb if that helps
[12:52:59] johnflux_: like: config.formatter = -> markup { ApplicationHelper.markdown(markup,-1) }
[12:54:00] fschuindt: johnflux_: I don't know if its possible, maybe something like metaprogramming work
[12:54:13] fschuindt: ut I really dont know so dont listen to me :D
[12:54:44] redondo: has joined #RubyOnRails
[12:55:53] jholm: has joined #RubyOnRails
[12:55:53] weckl: has joined #RubyOnRails
[12:56:22] losvedir: johnflux_: `config/initializers/` are run once when your app is starting up, so it doesn't have access to `params` since there aren't any requests yet
[12:57:22] johnflux_: losvedir: but the markup { ApplicationHelper.markdown(markup,-1) } must be making some sort of function
[12:57:25] johnflux_: losvedir: which is run later
[12:57:39] johnflux_: losvedir: so it should be possible to get the params inside that function
[12:58:16] johnflux_: the lambda literal
[12:58:35] allcentury: has joined #RubyOnRails
[12:58:41] shoelessone: has joined #RubyOnRails
[13:02:02] Scripore: has joined #RubyOnRails
[13:03:01] Scripore: has joined #RubyOnRails
[13:04:41] ramortegui: has joined #RubyOnRails
[13:06:11] dionysus69: has joined #RubyOnRails
[13:06:19] mugurel: Hello all. When i create a new post, i have a params[:post], and in that post i have an empty field called content_html, how can i edit it before saving the post in database?
[13:06:48] mugurel: how can i add something to params[:content_html]
[13:07:12] umgrosscol: has joined #RubyOnRails
[13:07:16] dexter91x: has joined #RubyOnRails
[13:07:34] Balzrael: params[:content_html] = "what you want"
[13:08:06] mugurel: @post = Blog.new(params[:blog])
[13:08:07] mugurel: @post.save
[13:08:15] mugurel: how would that fit into this workflow?
[13:08:23] NBarnes: has joined #RubyOnRails
[13:09:10] zlogan: has joined #RubyOnRails
[13:09:12] n1lo: has joined #RubyOnRails
[13:09:34] johnflux_: mugurel: before the .save
[13:10:02] mugurel: great, thank you
[13:10:12] johnflux_: mugurel: @post.content_html = "dd'
[13:10:13] johnflux_: mugurel: @post.content_html = "dd"
[13:10:23] Coldblackice: has joined #RubyOnRails
[13:10:25] johnflux_: or maybe @post[:content_html] = "dd"
[13:10:51] mugurel: johnflux_, can i do something like before_save :method and in that method to alter something from params?
[13:11:02] rickmasta: has joined #RubyOnRails
[13:11:11] mugurel: so it will modify it before creation and update?
[13:11:15] centrx: has joined #RubyOnRails
[13:11:53] mary5030: has joined #RubyOnRails
[13:12:40] nya: has joined #RubyOnRails
[13:13:49] mary5030: has joined #RubyOnRails
[13:13:50] Macaveli: has joined #RubyOnRails
[13:15:19] mikecmpbll: has joined #RubyOnRails
[13:17:10] shapeshifter: Hi. Basic question: Do rails migrations belong in the git repository? Stuff in db/migrate/*
[13:17:16] mikecmpbll: shapeshifter: yes
[13:17:23] shapeshifter: mikecmpbll: thanks.
[13:17:28] mikecmpbll: shapeshifter: how's anyone else going to migrate otherwise? :)
[13:17:45] mikecmpbll: anyone else = other devs + production env + etc
[13:17:46] greengriminal: has joined #RubyOnRails
[13:18:00] Lightsword: has joined #RubyOnRails
[13:18:29] shapeshifter: mikecmpbll: I wasn't sure because I previously ran into some errors like "migrations already performed" when trying out things. Don't remember exactly. But I was messing around with lots of things.
[13:19:32] mikecmpbll: shapeshifter: ok /shrugs
[13:19:58] shapeshifter: mikecmpbll: It's working fine now (deploying to staging with capistrano after adding the extension, incl. automatic migration)
[13:20:17] mikecmpbll: ???? capistrano is a beauty.
[13:21:29] stardiviner: has joined #RubyOnRails
[13:21:36] Pazician: has joined #RubyOnRails
[13:21:37] Silox|: has joined #RubyOnRails
[13:23:08] nyaa: has joined #RubyOnRails
[13:23:54] mcr-credil: has joined #RubyOnRails
[13:24:39] chouhoulis: has joined #RubyOnRails
[13:25:09] Silox|: I'm getting the following error while migrating on my production development, anyone any idea how or why this happens? `Can't create table 'tab.#sql-67b8_12a21' (errno: 150): ALTER TABLE `transactions` ADD CONSTRAINT `fk_rails_4876ab06ca``
[13:25:19] Silox|: Or why he tries to add a very strangely named table?
[13:25:21] svdb64: has joined #RubyOnRails
[13:25:52] annlewis: has joined #RubyOnRails
[13:27:29] schu: has joined #RubyOnRails
[13:30:22] dopie: has joined #RubyOnRails
[13:30:30] napterk: has joined #RubyOnRails
[13:32:26] Pazician: has joined #RubyOnRails
[13:32:27] mrchris: has joined #RubyOnRails
[13:33:23] smeade: has joined #RubyOnRails
[13:34:00] jgladwill: has joined #RubyOnRails
[13:34:01] jgladwill: has joined #RubyOnRails
[13:34:22] jgpawletko: has joined #RubyOnRails
[13:36:28] nettoweb: has joined #RubyOnRails
[13:37:08] Detch: has joined #RubyOnRails
[13:38:09] griffindy: has joined #RubyOnRails
[13:38:36] beauby: has joined #RubyOnRails
[13:39:02] artto: has joined #RubyOnRails
[13:42:08] victortyau: has joined #RubyOnRails
[13:42:28] alexhart_: has joined #RubyOnRails
[13:44:59] griffindy: has joined #RubyOnRails
[13:45:35] mugurel: i have a method in my controller for ex: modify, how can i access the params[:blog] in that method so i can modify the params array before updating the record?
[13:46:17] drale2k: has joined #RubyOnRails
[13:46:33] jsvgoncalves: has joined #RubyOnRails
[13:47:26] Pazician: has joined #RubyOnRails
[13:47:58] Linuus: has joined #RubyOnRails
[13:50:38] jsvgoncalves: has joined #RubyOnRails
[13:52:45] darrencauthon: has joined #RubyOnRails
[13:54:12] bronson: has joined #RubyOnRails
[13:54:31] jholm: has joined #RubyOnRails
[14:00:17] dede: has joined #RubyOnRails
[14:01:08] darkhex: has joined #RubyOnRails
[14:01:12] pwnd_nsfw: has joined #RubyOnRails
[14:01:46] jonr22: has joined #RubyOnRails
[14:01:59] dopamean_: has joined #RubyOnRails
[14:02:06] hashrocket: has joined #RubyOnRails
[14:02:51] turbo_MaCk: has joined #RubyOnRails
[14:02:57] smathy: has joined #RubyOnRails
[14:03:37] tonios57: has joined #RubyOnRails
[14:04:52] idd2d: has joined #RubyOnRails
[14:06:14] poli: has joined #RubyOnRails
[14:06:58] mary5030: has joined #RubyOnRails
[14:07:51] jpoo: has joined #RubyOnRails
[14:08:13] sebyx07: has left #RubyOnRails: ()
[14:08:33] tonios57_: has joined #RubyOnRails
[14:08:49] Linuus: has joined #RubyOnRails
[14:12:18] Ven: has joined #RubyOnRails
[14:13:30] mikecmpbll: Silox|: the output will show which migration caused the error.
[14:14:02] Caius: has joined #RubyOnRails
[14:14:57] chridal: https://gist.github.com/christiandalsvaag/3f5346a91d59c5b8b6d9
[14:15:05] chridal: any thoughts on why I am getting "ROLLBACK"?
[14:15:09] neruda: has joined #RubyOnRails
[14:15:17] chridal: not getting any errors... It's in `rails c`
[14:15:58] neruda: hi, trying to DRY up my models by writing a custom validator class for a nested object, all examples online refer to the object being validated as a 'record'
[14:16:08] chridal: Oh.. Validations xD
[14:16:22] neruda: my issue is how to access nested attributes of the record, its not a hash, is it?
[14:17:27] neruda: chridal: i was here yesterday asking about a related validation issue: not having to enumerate all the models fields that I want to apply a presence_of test on
[14:17:30] pwnd_nsfw: neruda, should you not validate it in it's own model?
[14:18:19] givanse: has joined #RubyOnRails
[14:18:33] leonardoajim: has joined #RubyOnRails
[14:18:53] jonr22: has joined #RubyOnRails
[14:18:57] wldcordeiro: has joined #RubyOnRails
[14:19:17] roxtrongo: has joined #RubyOnRails
[14:19:23] neruda: pwnd_nsfw: I'm not sure tbh, I'm pretty noob, my only issue there is how to reference and chain together the various validation calls for the different child objects, thats why i was favoring a monolithic custom validator for the object
[14:21:32] kaymation: has joined #RubyOnRails
[14:21:34] kaymation: has left #RubyOnRails: ()
[14:21:49] mikecmpbll: neruda: the validations happen on the individual models when instances are saved etc
[14:21:55] mikecmpbll: you don't typically need to worry about it
[14:22:43] neruda: mikecmpbll: so lets start at the beginning: is there a way to apply a presence_of validation to *all* attributes of a model without enumerating them all?
[14:23:08] tenderlove: has joined #RubyOnRails
[14:23:26] mikecmpbll: validates *column_names, presence: true
[14:23:27] mikecmpbll: or something
[14:23:54] neruda: mikecmpbll: my parent model is big and its seem Railsy to have to repeat the same validation over and over for each attribute
[14:24:05] mikecmpbll: hence the *self.column_names bit.
[14:24:50] mikecmpbll: there might be something more appropriate than column_names to use, but the idea is that gives you an array of attributes and splats (*) it to be equivalent to validates :foo, :bar, :baz, presence: true
[14:26:03] Ven: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[14:26:35] annlewis: has joined #RubyOnRails
[14:27:30] chouhoulis: has joined #RubyOnRails
[14:28:32] mikecmpbll: attribute_names is probably better although i'm not sure in what case it'd be different to column_names, /shrugs.
[14:30:00] Rakunh0: has joined #RubyOnRails
[14:31:18] dopie: has joined #RubyOnRails
[14:31:33] Jdubs: has joined #RubyOnRails
[14:32:27] paulcsmith: has joined #RubyOnRails
[14:32:38] moe129: has joined #RubyOnRails
[14:32:45] annlewis: has joined #RubyOnRails
[14:33:10] n99999i: has joined #RubyOnRails
[14:33:25] Jardayn: has joined #RubyOnRails
[14:34:00] bkxd: has joined #RubyOnRails
[14:34:35] Jdubs: has left #RubyOnRails: ()
[14:34:59] IceyEC: has joined #RubyOnRails
[14:35:00] jweissman: has joined #RubyOnRails
[14:35:14] sebyx07: has joined #RubyOnRails
[14:35:45] bmurt: has joined #RubyOnRails
[14:35:50] sebyx07: has left #RubyOnRails: ()
[14:37:11] Macaveli_: has joined #RubyOnRails
[14:38:36] krz: has joined #RubyOnRails
[14:41:34] badmadrad: has joined #RubyOnRails
[14:41:51] barendt: has joined #RubyOnRails
[14:42:02] chouhoulis: has joined #RubyOnRails
[14:42:15] esauOp: has joined #RubyOnRails
[14:42:47] jmignault: has joined #RubyOnRails
[14:43:22] Swappticon: has joined #RubyOnRails
[14:44:05] platzhirsch: has left #RubyOnRails: ()
[14:44:28] PlasmaStar: has joined #RubyOnRails
[14:44:40] redondo: has joined #RubyOnRails
[14:45:24] meatherly: has joined #RubyOnRails
[14:45:45] mices: http://pastie.org/10405411
[14:47:31] smathy: has joined #RubyOnRails
[14:47:40] NBarnes: has joined #RubyOnRails
[14:47:41] n1lo: mices, try to use rvm or rbenv.
[14:47:51] mary5030: has joined #RubyOnRails
[14:48:07] jmignault: has joined #RubyOnRails
[14:48:13] havenwood: mices: With a system install you'll need to use sudo to install gems.
[14:48:21] huck5: has joined #RubyOnRails
[14:48:42] havenwood: mices: Unless you use the `--user-local` flag, but we've already discussed.
[14:48:47] jmignault: has joined #RubyOnRails
[14:48:48] slash_nick: mikecmpbll: columns_hash carries a lot of data with it... not sure what you guys are doing
[14:48:49] mary5030: has joined #RubyOnRails
[14:49:09] havenwood: mices: Happy to help you get it setup if you decide how you want to proceed.
[14:49:13] zlogan: has joined #RubyOnRails
[14:49:32] mikecmpbll: slash_nick: carries a lot of data?
[14:52:02] sonofdirt: has joined #RubyOnRails
[14:52:53] mices: havenwood: i installed ruby through rvm as a user not as root
[14:53:12] idd2d: has joined #RubyOnRails
[14:53:27] havenwood: mices: What do you get for?: rvm current
[14:54:00] slash_nick: mikecmpbll: i guess it doesn't give rails validations, but it seems to return column types, primary keys, constraints...
[14:54:03] mices: i have to start the bash shell to run that?
[14:54:11] mices: havenwood: ^
[14:54:22] mikecmpbll: slash_nick: ah, columns_hash, i misread.
[14:54:32] mikecmpbll: slash_nick: yes indeed. we just needed the attribute names tho :)
[14:54:36] havenwood: mices: Yup.
[14:55:13] havenwood: mices: So that's the system Ruby. You can set a default like: rvm use --default 2.2.3
[14:55:13] mices: it seems that's not what i wanted
[14:55:15] slash_nick: mikecmpbll: took me a minute... i ran the method and was shocked at how much it returned... for some reason the return object in jruby is huge compared to the one from mri
[14:55:16] curses: has joined #RubyOnRails
[14:55:16] Cervajz: has joined #RubyOnRails
[14:55:31] havenwood: mices: Without a default the system Ruby will be default.
[14:55:32] mikecmpbll: slash_nick: oh weird!
[14:55:43] nya: has joined #RubyOnRails
[14:56:02] mices: havenwood: i don't understand, how could i install ruby otherwise
[14:56:27] mices: i mean is there another ruby besides the system ruby
[14:56:48] havenwood: mices: RVM is over ten thousand lines of shell scripts that install and switch Rubies for you. If you install a Ruby with RVM you can see it with: gem list
[14:57:39] n99999i_: has joined #RubyOnRails
[14:57:43] rogue_koder: has joined #RubyOnRails
[14:59:09] havenwood: mices: The complicated part of RVM are the scripts to install Ruby on all sorts of types of systems and also install exotic and dated Rubies. RVM is also a Ruby version switcher. Its default is to just use the system Ruby. You can switch Rubies like `rvm use 2.1.7` or `rvm use system` or set a default like I showed.
[14:59:37] mices: http://pastie.org/10405436
[15:00:14] havenwood: mices: So you have presumably two Rubies on your system. The FreeBSD pkg Ruby 2.1.6 and an RVM Ruby 2.2.3.
[15:00:22] mices: so i instead of system i could set my default to what?
[15:00:26] havenwood: mices: rvm use --default 2.2.3
[15:00:35] havenwood: mices: Then recheck: rvm current
[15:00:37] havenwood: mices: And: rvm list
[15:01:03] mices: might as well remove the 2.1.6 right?
[15:01:09] mices: first i mean?
[15:01:23] havenwood: mices: Up to you.
[15:02:14] Hagendi: has joined #RubyOnRails
[15:02:35] n99999i: has joined #RubyOnRails
[15:04:20] mices: http://pastie.org/10405447
[15:05:07] havenwood: mices: RVM wants a login shell to source the rvm function.
[15:05:16] poli: has joined #RubyOnRails
[15:05:45] mices: so i need to invoke bash with some argument to create a login shell
[15:07:06] havenwood: mices: Yeah, to use RVM interactively. But you can create "wrappers" for when you have dropped env. The wrappers are files that source the proper environment for the given Ruby. An example: https://rvm.io/deployment/init-d
[15:07:42] havenwood: Or: https://rvm.io/deployment/cron
[15:07:48] Jdubs: has left #RubyOnRails: ()
[15:08:18] havenwood: If anyone feels like writing up RVM docs specifically for wrappers it sure would be welcome. :)
[15:08:43] havenwood: mices: A bit more reading here: https://github.com/rvm/gem-wrappers#readme
[15:08:57] havenwood: mices: You can see your current wrappers with: gem wrappers
[15:09:30] svdb64: has joined #RubyOnRails
[15:09:32] IrishGringo: has joined #RubyOnRails
[15:09:56] symbol: has joined #RubyOnRails
[15:10:40] chouhoul_: has joined #RubyOnRails
[15:10:47] havenwood: Since I don't switch Rubies in production I don't use a Ruby version switcher in production. Simple has its wins.
[15:11:42] chouhoul_: has joined #RubyOnRails
[15:12:08] tubbo: not sure why people use ruby version managers in production
[15:12:23] tubbo: i think it's just "because it's easier to build ruby with the rbenv cookbook in chef" :P
[15:13:15] drale2k: has joined #RubyOnRails
[15:16:02] idd2d: has joined #RubyOnRails
[15:17:22] ch0ke: has joined #RubyOnRails
[15:18:55] disgrntld: has joined #RubyOnRails
[15:19:56] wpp: has joined #RubyOnRails
[15:19:59] mikecmpbll: tubbo: i used to think that, then i had a right palava once upgrading ruby which was compuled from source
[15:20:21] mikecmpbll: so, you do "switch" rubies in production, just more rarely!
[15:20:52] Cache_Money: has joined #RubyOnRails
[15:22:05] astrodog: The biggest advantage I've run into with rvm and friends in production is ensuring nothing at the system level impacts the environment the application I'm running is in.
[15:22:42] mices: bash: /usr/local/bin/gem: /usr/local/bin/ruby21: bad interpreter: No such file or directory
[15:22:50] mikecmpbll: the most painful thing for rvm in production is making sure all the auxiliary stuff like upstart jobs, cron jobs, all load rvm.
[15:22:55] mikecmpbll: (for me anyway)
[15:23:18] havenwood: mices: that's your system Ruby
[15:23:26] astrodog: mike: It can be an interesting problem. The things that make it useful are the same things that make it frustrating.
[15:23:31] mices: my dev machine is freebsd 10.1 also, i never used rvm and everything works fine
[15:23:34] astrodog: It's isolated from the system.
[15:23:40] astrodog: mices: Hooray Ruby on FreeBSD.
[15:24:21] mices: how do i re-create such an install, isolate from the system
[15:24:38] havenwood: mikecmpbll: Yeah, once setup it *just works* but explaining the wrappers is tough. A unified section of the docs that really covers wrappers would be lovely.
[15:24:43] MrFjords: has joined #RubyOnRails
[15:24:44] srinidhi: has joined #RubyOnRails
[15:24:44] astrodog: mices: On FreeBSD, it may also be worth considering jails over rvm. Depends on how much isolation you want.
[15:24:45] smeade: has joined #RubyOnRails
[15:25:10] mikecmpbll: havenwood: agreed. you read so much conflicting stuff about how to make rvm with with 'x'
[15:28:13] mices: how did my dev box get so perfect
[15:28:20] mices: without any of this stuff
[15:29:09] Rubie: has joined #RubyOnRails
[15:30:00] smeade: has joined #RubyOnRails
[15:30:16] n008f4g_: has joined #RubyOnRails
[15:30:36] TomyLobo: has joined #RubyOnRails
[15:31:11] astrodog: mices: If you're doing one thing, or your applications all have similar (or, at least, non-mutually exclusive) requirements, it all works pretty well out of the box.
[15:31:41] astrodog: It tends to blow up spectacularly when you end up needing to run two different things, that happen to require mutually exclusive things.
[15:31:44] mices: on freebsd what's out of the box, ruby intalled from ports?
[15:32:12] astrodog: mices: On FreeBSD, you also need to be a little careful on when you get gems using "gem", versus the port for the gem.
[15:32:27] astrodog: Some ports have bugfixes applied to them, that won't be applied if they're just installed with "gem".
[15:33:23] mices: could it be because sudo was installed on my dev box but not on my prod
[15:33:44] astrodog: What happened on your machine?
[15:34:17] alexhartley: has joined #RubyOnRails
[15:34:41] jonee: has joined #RubyOnRails
[15:34:42] mices: the problem now is ERROR: While executing gem ... (Errno::EACCES)
[15:34:42] mices: Permission denied @ rb_sysopen - /usr/local/lib/ruby/gems/2.1/gems/rails-4.2.4/README.md
[15:35:01] havenwood: mices: That's the system Ruby.
[15:35:06] chouhoulis: has joined #RubyOnRails
[15:35:25] astrodog: mices: What got you started down this particular path?
[15:35:27] mices: so i need "rvm use ..."
[15:35:52] havenwood: mices: What are you doing?
[15:36:18] mices: gem install rails
[15:36:32] havenwood: mices: With what for?: rvm current
[15:37:01] havenwood: mices: From an interactive login terminal?
[15:37:27] havenwood: mices: So you're using system Ruby. Did you not set the default to 2.2.2?
[15:37:47] mices: in what file?
[15:37:53] pixelhandler: has joined #RubyOnRails
[15:38:00] astrodog: mices: What has you poking at rvm in the first place?
[15:38:09] mices: i set some default about a half hour ago i forget what
[15:38:12] moei: has joined #RubyOnRails
[15:38:35] mices: i was getting the permissions error for /usr/local/bin
[15:38:52] havenwood: mices: If you `rvm list` what has the asterisk by it?
[15:39:54] idd2d: has joined #RubyOnRails
[15:39:57] roxtrongo: has joined #RubyOnRails
[15:39:58] mices: http://pastie.org/10405505
[15:40:08] havenwood: So no default is set.
[15:40:25] Hagendi: has joined #RubyOnRails
[15:40:25] oldbay: has joined #RubyOnRails
[15:40:31] mices: which file do i edit to set default
[15:40:48] havenwood: mices: rvm alias create default ruby-2.2.3
[15:41:12] havenwood: mices: ^ That's what the command you pasted suggests.
[15:41:29] havenwood: # Default ruby not set. Try 'rvm alias create default <ruby>'.
[15:42:01] djinni`: has joined #RubyOnRails
[15:42:14] havenwood: mices: Does that work?
[15:42:35] rubyonrails605: has joined #RubyOnRails
[15:42:43] mices: the command succeeded if that's what you mean
[15:42:58] IrishGringo: has joined #RubyOnRails
[15:43:03] jholm: has joined #RubyOnRails
[15:43:03] havenwood: mices: And now there's an asterisk by the Ruby you want with?: rvm list
[15:43:18] mices: http://pastie.org/10405517
[15:43:22] havenwood: And the warning saying to set a default is gone?
[15:43:45] nhhagen: has joined #RubyOnRails
[15:44:11] mices: one current, one default, and one current set as default ... i don't understand that
[15:44:11] havenwood: mices: You now have RVM set to use Ruby 2.2.3 by default. Look into wrappers for how to get it to work with init script or cron, etc.
[15:44:28] havenwood: mices: You can get RVM-specific help in #rvm.
[15:45:39] mices: if ruby2.2.3 is the only ruby installed why do i need rvm
[15:45:47] Kallis: has joined #RubyOnRails
[15:45:52] Bilbo-baggons: has joined #RubyOnRails
[15:46:29] nonparity: has joined #RubyOnRails
[15:47:14] meatherly: has joined #RubyOnRails
[15:47:28] jgt1: has joined #RubyOnRails
[15:48:12] Bilbo-baggons: Hey there all, I am struggling with a simple Javascript issue in one of my forms, essentially what I would like is if a radio button is clicked that the next field is hidden. I can see that my javascript is loading and the ids all seem correct, but my field isn???t hidding. I have added my gist here: https://gist.github.com/soilforlifeforms/463f6b0db0166cc71d6e
[15:48:34] huck5: How can I add an HTML class to an f.text_field ?
[15:48:48] Bilbo-baggons: any help would be greatly apprechiated, I am pulling my hair out here and I???m sure its a simple mistake.
[15:48:54] ledestin: has joined #RubyOnRails
[15:49:26] kies: has joined #RubyOnRails
[15:49:52] havenwood: mices: You certainly don't need it. Some people like it for commands like `rvm upgrade ruby-2.2.3 ruby-2.2.4` or for Gemsets. There's more than one way to do it.
[15:50:40] Bilbo-baggons: huck5: , { class: ???class_name??? }
[15:50:55] huck5: Bilbo-baggons, thanks! Just figured it out :P
[15:51:11] pwnd_nsfw: dev on linux compared to windows is insanely faster
[15:51:53] pwnd_nsfw: I don't know what I've been doing with my life
[15:52:16] fgo: has joined #RubyOnRails
[15:52:57] ngscheurich: has joined #RubyOnRails
[15:52:58] nhhagen: has joined #RubyOnRails
[15:54:17] andatche: has joined #RubyOnRails
[15:54:40] badmadrad: has joined #RubyOnRails
[15:55:37] lindii_: has joined #RubyOnRails
[15:55:39] dzejms: has joined #RubyOnRails
[15:56:48] safety_cut: has joined #RubyOnRails
[15:56:48] Palsson: has joined #RubyOnRails
[16:00:03] dzejms: How hard is to land a Rails job on upwork, and are there better places to look for one
[16:00:53] DLSteve: has joined #RubyOnRails
[16:01:04] smathy: has joined #RubyOnRails
[16:01:38] petricore: has joined #RubyOnRails
[16:01:49] dzejms: How hard is to land a Rails job on upwork, and are there better places to look for one?
[16:02:54] towski_: has joined #RubyOnRails
[16:03:34] smathy: dzejms, very easy, if your price is right.
[16:03:43] cornerma1: has joined #RubyOnRails
[16:04:27] greenarrow: has joined #RubyOnRails
[16:04:28] huck5: how can I specify the location of a partial I want to render?
[16:04:48] dzejms: what is the hourly price for the junior developers
[16:05:12] adam12: huck5: pass a mostly qualified path (ie, with a folder segment inside it).
[16:05:19] huck5: thanks adam12 !
[16:05:26] adam12: huck5: render "shared/some_partial_name" => app/views/shared/_some_partial_name.html.erb
[16:05:44] huck5: Ah, I should have omitted the underscore.
[16:07:04] dzejms: smathy, what is the hourly price for the junior developers?
[16:07:10] sam_weerasinghe: has joined #RubyOnRails
[16:07:27] theery: has joined #RubyOnRails
[16:08:04] rakm: has joined #RubyOnRails
[16:08:17] milesforrest: has joined #RubyOnRails
[16:08:28] smathy: dzejms, it has been a long while since I used a freelance site, but bid on a small job and if you get it easily then increase your rate for the next one, if you don't get it then decrease your rate.
[16:09:30] ruurd: has joined #RubyOnRails
[16:09:39] craysiii: has joined #RubyOnRails
[16:10:07] theery: has joined #RubyOnRails
[16:10:20] dzejms: smathy, well approximately is it 10$, 20$ an hour, and how much can you get on senior lvl
[16:10:58] smathy: dzejms, you will never get a great rate on your first contact with a client on those sites.
[16:11:08] smathy: (re your second question)
[16:11:45] smathy: Re your first question, I have no idea. Start with something you're happy to do a small job for, and then work up or down based on feedback and how easily you win the jobs.
[16:12:46] Altonymous: has joined #RubyOnRails
[16:13:13] craysiii: ive never done well on sites like odesk because im not willing to work for < $5/hr
[16:13:23] smathy: Last time I was on one of those sites was 15 years ago, and I was 10 years into my career then, so commanding great rates in real life, but on the freelance sites I still started at like $25-30 just to win the job. <-- dzejms
[16:13:53] smathy: dzejms, but the point of those sites isn't to keep doing work like that, it's to make contact with people for future work.
[16:13:54] Altonymous: Suppose I have 3 columns.. id, entity_id, & created_at. id is the primary key. entity_id can be the same across multiple records.. and created_at is unique. I want to get the the last inserted record for each entity_id. I can???t figure out how to do this in activerecord
[16:13:56] sam_weerasinghe: has joined #RubyOnRails
[16:13:56] nzst: has joined #RubyOnRails
[16:14:11] smathy: dzejms, I never had a client who didn't want more work done after the initial job.
[16:14:16] Altonymous: I can use: .group(:entity_id).maximum(:created_at) but that won???t return the ???id???
[16:14:18] smathy: dzejms, and that work would be at my full rate.
[16:14:20] nzst: Hi, can I have a conditional robots.txt based on environment? e.g. staging i don't want my site crawled and production i do?
[16:14:37] idd2d: has joined #RubyOnRails
[16:14:48] adam12: There is a demand for _good_ Ruby/Rails devs outside of the cheap job sites. Instead of burning up time earning below min wage, build a portfolio piece or two and hit companies local to you / etc.
[16:14:55] Altonymous: How do I get it to return the ID as well?
[16:15:08] pwnd_nsfw: dzejms, my second job on upwork was a rails job, but it didn't start out as a rails job.
[16:15:09] smathy: Altonymous, group by both fields but use order not maximum
[16:15:30] Altonymous: I tried that.. but I can???t figure out how to only return the max records..
[16:15:38] adam12: I wish I knew more _good_ Ruby devs looking for work.
[16:15:47] pwnd_nsfw: A friend had a client for a redesign of a site, but also the client was having PHP issues. Friend came to me asking about the site, I took one look at the site and said it basically had to be rewritten. The old code wasn't maintainable at all.
[16:15:54] pwnd_nsfw: So, basically pitched we make it in rails
[16:16:14] craysiii: adam12 in what area
[16:16:18] Altonymous: smathy: I can???t figure out the syntax for that.. because when I include created_at or id it returns all records since they are all unique.
[16:16:34] Altonymous: smathy: as one would expect..
[16:16:44] smathy: Altonymous, actually you'll need to ....heh, yeah, I was just saying - you'll need to do some date math on the created_at.
[16:16:59] nzst: adam12: projects on upwork are good portfolio pieces
[16:17:09] smathy: ...oh, actually, no that won't work either.
[16:17:27] craysiii: Altonymous, sort by created_at and then use #distinct?
[16:17:28] mices: gem: not found
[16:17:30] Altonymous: Right.. I need to get it to happen database side.. otherwise I end up pulling down all the records
[16:17:38] craigphares: has joined #RubyOnRails
[16:19:14] pawnbox: has joined #RubyOnRails
[16:19:20] mices: havenwood: if rails is installed why do i get "gem: not found"
[16:19:38] Altonymous: I think it???s a two part query I just can???t figure out how ...
[16:21:22] smathy: Altonymous, ah, it's a mysql feature to drop the other columns - that's why I thought that'd work.
[16:22:42] craysiii: Altonymous i think you need to work on the structure of your data before preceedin
[16:22:55] Altonymous: craysiii: Can???t change the data structure
[16:24:04] smathy: Altonymous, Foo.select('*', "MAX(bars.created_at)").group(:entity_id)
[16:24:24] mices: hmm my dev box has ruby 2 and 21 installed
[16:24:27] smathy: Sorry, 'bars' should be 'foos' (ie, your table name)
[16:24:49] mices: how can i see which is being used without bash or rvm installed?
[16:24:49] smathy: ...or even just `created_at` if you're not going to use this for any joins.
[16:26:28] jmignault: has joined #RubyOnRails
[16:26:31] Altonymous: smathy: that won???t work because :id is not in the group by.
[16:26:40] Altonymous: smathy: nor is :created_at
[16:27:52] smathy: Altonymous, oh, you're using Pg :(
[16:28:59] craysiii: Foo.order(:created_at).uniq,pluck(:entity_id)
[16:29:13] craysiii: Foo.order(:created_at).uniq.pluck(:entity_id) *
[16:31:06] jgt1: has joined #RubyOnRails
[16:31:27] carlosd: has joined #RubyOnRails
[16:31:47] Altonymous: smathy: mysql does..
[16:31:48] Altonymous: Select, wrong number of arguments
[16:33:17] smathy: Altonymous, that's a ruby error - because you've put the `select` in the wrong place.
[16:33:38] smathy: Altonymous, for pg you need to do one of these contortions: http://stackoverflow.com/q/13325583/152786
[16:33:54] NBarnes: has joined #RubyOnRails
[16:34:20] mices: is ruby 21 more stable than 22
[16:34:21] Altonymous: FYI: I???m a third party here.. friend asked for help and he doesn???t work at the same company.. trying to help him out.. but I use PG
[16:36:39] mices: how do i remove leftover gems
[16:36:48] mices: i have no ruby installed but a bunch of rubygems
[16:38:13] dexter91x: has joined #RubyOnRails
[16:39:14] Bilbo-baggons: has joined #RubyOnRails
[16:39:50] wpp: has joined #RubyOnRails
[16:42:19] siemprefresco: has joined #RubyOnRails
[16:42:33] sandstrom: has joined #RubyOnRails
[16:42:33] sonofdirt: has joined #RubyOnRails
[16:43:31] craysiii: any recommendations for something like has_permalink gem
[16:45:12] drale2k: has joined #RubyOnRails
[16:45:13] nonparity: has left #RubyOnRails: ("Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is")
[16:45:26] pragmatism: has joined #RubyOnRails
[16:46:31] mrchris: has joined #RubyOnRails
[16:46:57] Cervajz_: has joined #RubyOnRails
[16:47:36] alphaatom: has joined #RubyOnRails
[16:47:43] atomical: has joined #RubyOnRails
[16:50:28] smathy: mices, no, 2.2 and 2.1 will be equally stable.
[16:50:46] smathy: mices, just `rm -rf` the directory if you want.
[16:51:59] siempref_: has joined #RubyOnRails
[16:52:11] yardenbar: has joined #RubyOnRails
[16:53:28] nhhagen: has joined #RubyOnRails
[16:53:39] minotep: has joined #RubyOnRails
[16:53:45] fgo: has joined #RubyOnRails
[16:56:37] drale2k_: has joined #RubyOnRails
[16:58:48] ruurd_: has joined #RubyOnRails
[16:59:31] nzst: Hi :) Is there anyway to make my robots.txt conditional based on environment?
[16:59:53] NBarnes: (also, there's a really good trash command for osx that you can install with brew. I have it aliased to rm so that I can recover stuff that I rm.
[17:00:04] NBarnes: It makes rm -rf a little less... tense.
[17:01:44] Altonymous: has joined #RubyOnRails
[17:02:05] barendt: Does anybody have a diagram or something like that of the way connection pooling works in Rails? I???m trying to trace through the connection handling and pooling code in ActiveRecord and I think a diagram would be really handy.
[17:02:35] sam_weerasinghe: has joined #RubyOnRails
[17:02:55] barendt: Specifically, I???m trying to troubleshoot a really weird intermittent problem with our fork of the Oracle Enhanced Adapter and I think I need to have a pretty good mental model of the lifecycle of a connection in order to do that.
[17:03:21] moeabdol: has joined #RubyOnRails
[17:03:22] alexhartley: has joined #RubyOnRails
[17:07:00] krz: has joined #RubyOnRails
[17:08:31] veg: has joined #RubyOnRails
[17:09:51] IrishGringo: has joined #RubyOnRails
[17:10:41] veg: has joined #RubyOnRails
[17:12:37] sargas: has joined #RubyOnRails
[17:15:01] yardenbar: has joined #RubyOnRails
[17:15:05] kegan_: has joined #RubyOnRails
[17:15:21] roxtrongo: has joined #RubyOnRails
[17:15:40] mikecmpbll: has joined #RubyOnRails
[17:16:20] KensoDev: has joined #RubyOnRails
[17:17:24] nfk: has joined #RubyOnRails
[17:18:57] n008f4g_: has joined #RubyOnRails
[17:19:14] neutrino: has joined #RubyOnRails
[17:19:40] KensoDev_: has joined #RubyOnRails
[17:20:10] toretore: has joined #RubyOnRails
[17:21:05] badmadrad: has joined #RubyOnRails
[17:21:55] SloggerKhan1: Is there a way to pull a record from an ActiveRecord::Relation by ID without re-triggering a SQL query? Or is the triggering of a SQL query when calling find on the results of a query an artifact of being in development mode?
[17:22:48] craigphares: has joined #RubyOnRails
[17:28:53] roxtrongo: has joined #RubyOnRails
[17:30:35] havenwood: has joined #RubyOnRails
[17:31:13] jholm: has joined #RubyOnRails
[17:31:31] Rubie: has joined #RubyOnRails
[17:33:46] pecpec: has joined #RubyOnRails
[17:33:51] centrx: slogger, well you can use detect but it sounds like there might not actually be two queries being issued?
[17:36:24] arup_r: has joined #RubyOnRails
[17:36:42] EminenceHC: has joined #RubyOnRails
[17:37:59] Slogger: centrx: How can I tell? I see a bunch of selects printed in the dev console.
[17:38:36] NBarnes: am I being naive in thinking that this sounds like an eager loading problem?
[17:40:19] Slogger: I don't think it's eager loading - no associations involved.
[17:41:01] drale2k: has joined #RubyOnRails
[17:41:28] NBarnes: Well, at least notionally? Can you predict what might be the result of step 2 and grab the set at the same time at Step 1?
[17:42:25] aamador: has joined #RubyOnRails
[17:43:10] n00bDev: has joined #RubyOnRails
[17:44:38] nzst: slogger: Can you provide an example of what you're trying to accomplish?
[17:45:50] rustymyers: has joined #RubyOnRails
[17:46:31] Slogger: Not sure we're talking about the same things. I've a query along the lines of `result = Things.where(something: true)`, and then I need to reference a couple entries which may be in result by ID IE if thing with ID 23 is in result, do something with the thing having the ID 23 from result set, if not, do nothing, then return the result/collection.
[17:46:56] Slogger: (collection returned either way)
[17:47:10] centrx: slogger, I would map them into a hash like .map { |x| [x.id, x] }.to_h
[17:47:44] ruurd: has joined #RubyOnRails
[17:50:21] mylord: has joined #RubyOnRails
[17:50:44] mylord: any thoughts on this benchmark? http://www.techempower.com/benchmarks/
[17:50:47] cnk: has joined #RubyOnRails
[17:51:52] chouhoul_: has joined #RubyOnRails
[17:52:01] HalcyonicStorm: has joined #RubyOnRails
[17:53:14] NBarnes: And you're trying to avoid making a second DB call when/if you find object(id: 23) in the collection?
[17:53:14] renegadeandy: has joined #RubyOnRails
[17:53:43] Slogger: centrx: I may end up doing something like that. I'd hoped there'd be a more "native" way.
[17:53:54] Rakunh0: has joined #RubyOnRails
[17:54:47] Slogger: nbarnes: Yeah, I wanted to be able to reference a member of the collection without turning the whole collection into a new data structure or a new DB call.
[17:54:51] fgo: has joined #RubyOnRails
[17:55:40] renegadeandy: Can somebody please help me with this nested resource name error : https://gist.github.com/renegadeandy/42c7cedc6c802c97ee43
[17:57:04] baweaver: has joined #RubyOnRails
[17:57:20] Altonymous: has joined #RubyOnRails
[17:57:21] nhhagen: has joined #RubyOnRails
[17:58:16] FailBit: renegadeandy: because answers_path doesn't exist?
[17:58:19] someish: has joined #RubyOnRails
[17:58:38] FailBit: If it doesn't have a named helper, you can't use a named helper
[17:58:46] baweaver: has joined #RubyOnRails
[17:58:49] renegadeandy: im using nested resources for the first time
[17:58:58] arup_r: renegadeandy: <%= form_for [@question, @answer], :html => { :class => "form-horizontal answer" } do |f| %>
[17:58:58] renegadeandy: FailBit: what should i do to my routes.rb to add a route for this?
[17:59:13] arup_r: That is how it should be
[17:59:16] FailBit: = form_for [@question , @answer] do
[17:59:37] arup_r: Look at this /questions/:question_id/answers/:id
[18:00:04] slash_nick: ACTION looks
[18:00:19] renegadeandy: arup_r: thanks! I just didnt know the syntax
[18:03:20] rakm: has joined #RubyOnRails
[18:03:46] frzng: has joined #RubyOnRails
[18:03:53] MrFjords: has joined #RubyOnRails
[18:04:46] nzst: Is there anyway to have conditionals in my robots.txt depending on my environment, e.g. staging v. production?
[18:05:55] smathy: nzst, do it in your deploy scripts.
[18:06:06] NBarnes: what smathy said.
[18:06:21] badmadrad: has joined #RubyOnRails
[18:06:34] EminenceHC: has joined #RubyOnRails
[18:06:51] sonofdirt: has joined #RubyOnRails
[18:07:15] nzst: How? it just sits in my public folder?
[18:07:57] nzst: I've never done anything conditional for anything in the public folder, whether from a deploy script or otherwise
[18:09:13] sonofdirt: has joined #RubyOnRails
[18:09:50] slash_nick: nzst: symbolic links
[18:10:05] smathy: Yeah, that'd be the simplest./
[18:10:07] rhizome: how would robots.txt have any effect outside of production?
[18:10:27] nzst: rhizome: i deploy a staging environment remotely
[18:10:28] slash_nick: nzst: i.e. in staging, link staging.robots.txt to public/robots.txt.... in production, link production.robots.txt to public.robots.txt
[18:10:32] smathy: rhizome, it'd prevent your staging environment being indexed.
[18:10:53] nzst: slash_nick: cool, guess i'll have to set up that workflow to get what I want
[18:10:57] slash_nick: whoops... slight typo there, but you get it?
[18:11:03] rhizome: ok, carry on
[18:13:34] beauby: has joined #RubyOnRails
[18:13:37] pecpec: has joined #RubyOnRails
[18:13:39] pwnd_nsfw: Rails 4 in Action is a great book
[18:14:46] craysiii: anyone have a comparison of erb vs haml
[18:14:57] nzst: pwnd_nsfw: I think it's a good resource, just got my final copy
[18:15:00] pwnd_nsfw: personal preference vs personal preference
[18:15:26] pwnd_nsfw: Cool nzst :) I found some ebook online. Some typos and some things not updated, but it's pretty good. I've learned a lot about testing
[18:15:41] baweaver: has joined #RubyOnRails
[18:15:52] pwnd_nsfw: Feature testing seems to be a good way to start out
[18:16:04] pwnd_nsfw: I always lock up if I go straight to model testing like "uhh, I don't even know what I want"
[18:16:17] FailBit: craysiii: depends on how much you value performance
[18:16:32] FailBit: erb is the fastest
[18:16:43] pwnd_nsfw: haml is sexier though
[18:16:58] FailBit: slim is sexier
[18:17:08] pwnd_nsfw: I haven't used it
[18:17:09] FailBit: Has less % signs, and renders a bit faster
[18:17:13] ebbflowgo: has joined #RubyOnRails
[18:17:22] FailBit: slim-lang.com I think
[18:17:37] KensoDev: has joined #RubyOnRails
[18:17:42] pwnd_nsfw: it looks pretty similar
[18:17:53] pwnd_nsfw: less to type
[18:18:03] craysiii: i like less typing
[18:18:11] dmmoody: has joined #RubyOnRails
[18:18:14] pwnd_nsfw: Or well.. No, just the way it handles attributes is better
[18:18:43] craysiii: omg im in love
[18:18:53] FailBit: I've also tested it to be around 30% faster than haml in production which sounds insane
[18:18:53] ruurd: has joined #RubyOnRails
[18:18:55] pwnd_nsfw: Same haha. slim it is
[18:19:04] FailBit: I'm not sure how but it is
[18:19:13] pwnd_nsfw: Did you test between slim/erb?
[18:19:18] IrishGringo: has joined #RubyOnRails
[18:19:26] FailBit: ERB beats slim by around 5%
[18:19:31] pwnd_nsfw: Not terrible
[18:19:44] pwnd_nsfw: I bet there a haml/slim -> erb converter
[18:19:56] FailBit: there's slimrb -e
[18:20:07] FailBit: which outputs (bad) erb
[18:20:34] pwnd_nsfw: Bad as in ugly, or bad as in.. well, no use in using it because it doesn't speed anything up
[18:20:46] nhhagen: has joined #RubyOnRails
[18:20:51] FailBit: Bad as in it doesn't even work
[18:21:01] pwnd_nsfw: Well there goes that
[18:21:13] FailBit: It outputs ERB but ERB escapes everything and it doesn't account for that
[18:21:26] FailBit: So you just see angle brackets everywhere
[18:21:34] pwnd_nsfw: That's silly
[18:22:45] ranchodev: has joined #RubyOnRails
[18:23:01] FailBit: Also, slim has its quirks
[18:23:02] craysiii: i think i will try it in my next project, but i don't feel like converting everything i just wrote :P
[18:23:28] FailBit: Unlike haml it renders everything ugly; it doesn't put whitespace around stuff, you have to do that manually
[18:23:54] craysiii: is that what erb does?
[18:23:56] FailBit: Whitespace: =< leading, => trailing, =<> both
[18:23:59] arup_r: I use plain vanila HTML
[18:24:26] FailBit: a<> href="/"
[18:24:37] baweaver: makes it rather hard to use rails with plain html there.
[18:24:47] FailBit: Usually it's not a big deal e.g. with block level attributes
[18:25:00] paulcsmith: has joined #RubyOnRails
[18:25:02] FailBit: But inline and inline-block are affected by whitespace
[18:25:05] FailBit: So be careful
[18:26:15] renegadeandy: Hi everyone. How can I name all of my unamed routes in this example : https://gist.github.com/renegadeandy/42c7cedc6c802c97ee43
[18:26:25] greengriminal: has joined #RubyOnRails
[18:26:38] FailBit: They're all named
[18:26:58] FailBit: Every single one of those has a name
[18:27:03] JohnBat26: has joined #RubyOnRails
[18:27:09] craysiii: you dont need to 'name' them, you need to use the correct http action in your form/button/link
[18:27:10] FailBit: The method however is form sensitive
[18:28:05] j_suth: has joined #RubyOnRails
[18:29:32] renegadeandy: FailBit: what is the name for answers #destroy?
[18:29:56] renegadeandy: i want the prefix name
[18:29:58] FailBit: question_answer_path
[18:30:01] FailBit: The method is delete
[18:30:24] renegadeandy: FailBit: it would be nice if rake routes just displayed that...
[18:30:27] tubbo: FailBit: when you say "slim renders faster", what basis do you have for that assertion?
[18:30:29] renegadeandy: FailBit: any idea why it doesnt
[18:30:53] tubbo: i'd be interested to learn, because i like slim a lot better than haml
[18:31:08] baweaver: tubbo: their frontpage had some stat on that iirc
[18:31:28] craysiii: it makes more sense that way IMO
[18:32:00] baweaver: https://sephinrothcn.wordpress.com/2014/04/14/slim-vs-haml-performance-perspective/
[18:32:09] baweaver: that's fairly detailed at least.
[18:32:20] Maletor: has joined #RubyOnRails
[18:32:28] FailBit: tubbo: new relic transaction traces
[18:32:48] sararegan: has joined #RubyOnRails
[18:32:49] tubbo: baweaver: thanks
[18:33:04] FailBit: from months past, the time spent in the same template first in haml, then in slim
[18:33:05] Maletor: has joined #RubyOnRails
[18:33:08] baweaver: np. You'd think they'd render it to cached ERB for speed.
[18:33:20] rodferso1: has joined #RubyOnRails
[18:33:40] tubbo: very interesting
[18:33:58] hololeap: has joined #RubyOnRails
[18:33:59] baweaver: at least in production. It's the same logic as is present in scss / coffeescript for prod
[18:34:14] FailBit: Would it make sense that I don't like haml for the amount of monkeypatching it does to actionview code
[18:34:30] FailBit: it adds 5 extra levels to stacktraces there
[18:35:15] EminenceHC: has joined #RubyOnRails
[18:35:29] tubbo: monkeypatching?
[18:35:37] tubbo: guess i just never noticed
[18:35:38] baweaver: Also, today plug, new article - http://baweaver.com/blog/2015/09/07/aggregate-active-record/
[18:35:55] sararegan: has joined #RubyOnRails
[18:36:12] smathy: FailBit, you can dislike it for whatever reasons you want.
[18:36:41] tubbo: yeah, i had a boss disagree with me on how much i liked rspec for zero reason whatsoever
[18:36:42] FailBit: Just wondering if that's sensible because ruby is the monkeypatch lang
[18:36:55] tubbo: he just said "you know how some people just don't like eggplant? it's like that for me with rspec
[18:37:08] tubbo: possibly the #1 dumbest reasoning i've ever heard for a technology choice
[18:37:23] tubbo: as if one man's personal tastes should drive the entire company's toolchain
[18:37:33] slash_nick: baweaver: i like your curly bracket koi
[18:37:35] baweaver: as with most meta-code, pick battles wisely.
[18:37:37] craysiii: what's it contending with for #1 ;)
[18:37:54] tubbo: craysiii: most of the messages i see in #rubyonrails
[18:37:56] baweaver: slash_nick: thanks
[18:38:06] tubbo: at least people here are like "but <X blog> told me to do it"
[18:38:16] tubbo: this guy figured out his dumbass reason all by himself
[18:38:28] oldbay: has joined #RubyOnRails
[18:39:03] havenwood: has joined #RubyOnRails
[18:39:09] Altonymous_: has joined #RubyOnRails
[18:41:47] baweaver: I figure if someone gives good reason and the cost to implement isn't "pull out all the things" then why not
[18:41:48] choke: has joined #RubyOnRails
[18:41:53] sararegan: has joined #RubyOnRails
[18:42:23] wolfsoul: has joined #RubyOnRails
[18:42:40] wolfsoul: has joined #RubyOnRails
[18:43:22] baweaver: most of the same reason I shake my head whenever someone walks into a pure php shop and suggests replacing it all with better framework / language <x>
[18:43:58] baweaver: there are meta concerns beyond what's the best tool that people tend to forget about (or more aptly ignore)
[18:43:58] tubbo: i remember doing that when rails came out
[18:44:28] davidheward: has joined #RubyOnRails
[18:44:36] tubbo: but i honestly don't think i was in the wrong there :P we had a lot of issues with our deployment and development process, also our clientele did not pay nearly enough.
[18:44:49] tubbo: had we gone with Rails, we could have argued for bigger and better projects, which means more money.
[18:45:03] jlbenc: has joined #RubyOnRails
[18:45:05] baweaver: just saying it's not cheap to burn it all and start over in some cases.
[18:45:16] tubbo: it's never a good idea to do that
[18:45:36] sararegan: has joined #RubyOnRails
[18:45:44] baweaver: but mention php and groupthink flies in and you have a froth of nonsense and zealotry to contend with.
[18:46:21] baweaver: ACTION does not like php, but knows why legacy isn't exactly replaceable.
[18:47:44] tubbo: i always felt rails was great for consulting shops, but not that great to write your own product in
[18:48:00] baweaver: for starting out fast it's fine.
[18:48:11] tubbo: because it emphasizes "get the thing working and out there very quickly", but falls short on the ease of being able to modify it over time
[18:48:52] baweaver: depends on how strongly you force people to play by rules in the beginning.
[18:49:29] sararegan: has joined #RubyOnRails
[18:49:46] kegan_: do you have to refresh a form once it's submitted via ajax and fails?
[18:50:01] tubbo: kegan_: you shouldn't have to
[18:50:11] baweaver: off to lunch
[18:50:14] fschuindt: depends also in rails development experience, by the time you will learn how to write easy modificable apps
[18:50:15] tubbo: kegan_: but honestly no idea what "submitted via ajax" means
[18:50:18] tubbo: in this case
[18:50:55] kegan_: form_for :remote => true
[18:51:04] gambl0re: has joined #RubyOnRails
[18:51:06] kegan_: with a submit button that is linked to create or update
[18:51:10] tubbo: kegan_: what about the JS handlers?
[18:51:27] kegan_: i'm deciding if i need to refresh it in them or not. the button itself is just a f.submit
[18:51:49] kegan_: or whether or not to like... stop... check if valid with a call, then submit?
[18:51:55] kegan_: stop the default submit unless
[18:52:02] pecpec: has joined #RubyOnRails
[18:52:02] kegan_: record.valid? or something, i don't know
[18:52:23] astrodog: Keeping in mind that anything you do with JS can be ignore by a mean client.
[18:52:33] adavia: is it possible parameterize is not being called here http://pastie.org/10405936
[18:52:42] tubbo: kegan_: no idea where your head is at here...but generally when i make ajax-submitted forms, i just render back the entire response (without a layout) and ensure the flash messages exist in the returned response
[18:52:56] tubbo: astrodog: well considering he's submitting forms over ajax, whatever mean clients have in store for him is totally meaningless.
[18:53:38] vickleton: has joined #RubyOnRails
[18:53:48] tubbo: adavia: no, the most likely scenario is that @user.reload is not running the callback that is parameterizing the slug
[18:54:04] tubbo: or you have `def slug` defined which parameterizes on find which is also a stupid idea
[18:54:43] tubbo: the data in the DB should always be "right", it should never need the Rails app to "make it right".
[18:55:11] d5sx43: has joined #RubyOnRails
[18:55:44] adavia: tubbo: so thats why i get Expected: "example-user" Actual: "Example User"
[18:55:54] fgo: has joined #RubyOnRails
[18:56:25] tubbo: adavia: right, that makes perfect sense to me. you are expecting slug.parameterize
[18:56:33] tubbo: adavia: when in reality, slug has not changed at all
[18:56:54] tubbo: the first argument to assert_equal is the expected value, the second is the actual value
[18:56:56] finnnnnnnnnnn: has joined #RubyOnRails
[18:58:34] VeryBewitching: has joined #RubyOnRails
[18:58:51] qejk: has joined #RubyOnRails
[18:59:03] adavia: tubbo: the slug is being generated before_validation, guess should be before_save
[18:59:30] tubbo: adavia: ah, well you're never calling `valid?` there. and a `before_save` won't help you here either
[19:00:05] tubbo: adavia: you should call `save` on the model there, so that the callback you're doing here will *actually* get run
[19:00:21] tubbo: plus, the save process is more realistic to what you're doing, right? you don't ever set model.slug = '' before saving, right?
[19:00:43] adavia: make sense
[19:01:02] adavia: hate doing tests
[19:02:36] havenwood: Any advise on User birthday? One `dob` or `birthday` String like yyyy-mm-dd or `birthday_day`, `birthday_year`, etc?
[19:02:54] astrodog: haven: Store it as a date.
[19:03:03] astrodog: Every other option will be upsetting later.
[19:03:21] sonofdirt: has joined #RubyOnRails
[19:03:40] paulcsmith_: has joined #RubyOnRails
[19:03:55] wldcordeiro: has joined #RubyOnRails
[19:04:55] havenwood: astrodog: Thanks.
[19:06:21] sonofdirt: has joined #RubyOnRails
[19:06:23] rakm: has joined #RubyOnRails
[19:06:31] greengriminal: has joined #RubyOnRails
[19:06:32] DEA7TH: has joined #RubyOnRails
[19:06:47] ruurd: has joined #RubyOnRails
[19:06:49] kadoppe: has joined #RubyOnRails
[19:07:31] rakm: has joined #RubyOnRails
[19:11:01] nhhagen: has joined #RubyOnRails
[19:11:09] jgt1: has joined #RubyOnRails
[19:11:10] sandstrom: has joined #RubyOnRails
[19:11:57] esauOp: has joined #RubyOnRails
[19:12:38] wldcordeiro: has joined #RubyOnRails
[19:13:00] Altonymous: Using fixtures in my rails app and I???m trying to figure out how to associate two models together when the 2nd model doesn???t use the primary key of the first model.. but instead uses a different columns (one we are migrating to???) I found this call.. <%= ActiveRecord::Fixtures.identify(:reginald) %> Which gets me the primary key of the ???reginald??? user.. but what if I want to get a different column value off the fixtu
[19:13:01] Altonymous: I can???t figure out what the call would look like. Any ideas?
[19:13:17] nhhagen_: has joined #RubyOnRails
[19:14:23] symbol: has joined #RubyOnRails
[19:14:35] carlosd: I have the following code in my User model: https://gist.github.com/cerdiogenes/ebbf7593eb048f123cc7
[19:15:01] jsuth_: has joined #RubyOnRails
[19:15:08] carlosd: It's communicate with an external API called iugu
[19:15:50] annlewis: has joined #RubyOnRails
[19:15:55] carlosd: I like the code, it's simple, but it's annoying me when writing tests
[19:17:02] carlosd: for a lot of tests, this code is irrelevant
[19:17:59] dstarh: has joined #RubyOnRails
[19:18:09] Or1on: has joined #RubyOnRails
[19:19:22] carlosd: any suggestion on how I can improve it, so whenever I need to create an user in my test I don't need to communicate with iugu?
[19:20:32] finnnnnnnnnnn: has joined #RubyOnRails
[19:21:13] jeffmess: has joined #RubyOnRails
[19:22:04] meoblast001: has joined #RubyOnRails
[19:22:04] mylord: has joined #RubyOnRails
[19:22:24] wldcordeiro: has joined #RubyOnRails
[19:23:15] tubbo: Altonymous: not sure if that's possible
[19:23:39] tubbo: Altonymous: i mean you could hack it and just set the value to ActiveRecord::Fixtures.identify(:foo) and then recall that same :foo as the value of your other column
[19:23:56] Altonymous: they are two different column types
[19:24:01] Altonymous: one is an integer and the other a uuid
[19:24:25] kitsuneyo: has joined #RubyOnRails
[19:24:47] tubbo: Altonymous: lol how does that even relate in your app in the first place...you can't compare those two values
[19:24:49] Altonymous: I believe the model is setup since everything works in the application and rails c correctly.. but it doesn???t seem to want to use the primary_key I have defined on the association.
[19:25:06] Altonymous: No.. the old primary key is an integer..
[19:25:09] Altonymous: the new one is a uuid
[19:25:29] tubbo: Altonymous: well regardless you can't use Fixtures.identify to generate a UUID.
[19:25:42] Altonymous: the association between the two models are using the uuid.. but the model itself is still setup with the integer as the primary key
[19:25:42] tubbo: that method always generates numerical IDs
[19:26:19] Altonymous: tubbo: Yeah I know.. that???s why I???m trying to figure out another way to reference the uuid column of the parent model in the fixture
[19:26:39] tubbo: Altonymous: some code would probably help here, i'm having trouble wrapping my head around your problem
[19:26:44] Altonymous: tubbo: That???s really all I need to do.. is figure out a way to get the uuid column from the parent model that the fixture generates.
[19:26:45] jeffmess: Hey. I have a pretty large monolithic application which all users need to log into via devise. I am now wanting to create separate react javascript applications for certain screens and was wondering if anyone knows of any resources/blog posts of someone doing this?
[19:26:55] gambl0re: has joined #RubyOnRails
[19:27:04] tubbo: Altonymous: you could just call the fixture, posts(:post).uuid :)
[19:27:14] davidheward: has joined #RubyOnRails
[19:27:44] Altonymous: unless they aren???t inserted in the correct order..
[19:27:47] mikebonar: has joined #RubyOnRails
[19:28:01] tubbo: Altonymous: i don't get it
[19:28:11] tubbo: Altonymous: order doesn't matter
[19:28:22] Altonymous: is does in the fixtures..
[19:28:28] Altonymous: tubbo: So imagine this...
[19:28:33] Altonymous: tubbo: Imagine .. users belongs_to account, account has_many users
[19:28:35] tubbo: no it doesn't though
[19:28:43] tubbo: identify returns the same value every time for the symbo9l
[19:28:50] tubbo: so :foo => 12345, every time, always.
[19:29:18] Altonymous: tubbo: account has an old primary key called (:id) and a new column called (:ext_id) that will become the primary key.
[19:29:18] kitsuneyo: i have this edit form, which lets the user edit multiple records in a table called organization_game_credits. that table has a column called category, and i want to separate the records according to values in that column. here's the gist of what i have so far: https://gist.github.com/kitsuneyo/235527dca52e3bc4575a
[19:29:42] symbol: has left #RubyOnRails: ("WeeChat 1.1")
[19:29:55] esauOp: has joined #RubyOnRails
[19:30:01] Altonymous: tubbo: the new table created.. called users.. adds a column called :account_id and is of type uuid.. the association in the model points to the :ext_id column of account
[19:30:30] kitsuneyo: at the moment i'm trying to use hidden_fields to sort the records, but all the records appear in all the form sections
[19:31:42] Altonymous: tubbo: In the users.yml fixture I want to add `account: account_x` under a user and have it reference the account_x in the accounts.yml fixture.. but instead of it trying to populate with the :id column from account.. I want it to populate with the :ext_id column..
[19:32:04] Altonymous: tubbo: the assocition is correct.. but it still uses :id on account because :id is the ???primary_key??? of the table.. not the assocation.
[19:32:37] Palsson: has joined #RubyOnRails
[19:33:04] Altonymous: tubbo: in the fixture I already tried.. account: <%= accounts(:account_x).ext_id %> but it doesn???t recognize `accounts`
[19:33:05] baweaver: has joined #RubyOnRails
[19:34:40] Altonymous: tubbo: NoMethodError: undefined method `accounts' for #<#<Class:0x007fce62311608>:0x007fce62311478>
[19:35:45] tubbo: Altonymous: you can't really do that, you'd have to hard-code the UUID in
[19:35:52] tubbo: it won't happen for you automatically
[19:35:58] Altonymous: Well that???s what I???ve been doing.. just trying to avoid it.
[19:36:27] Altonymous: Was hoping there was a way to do it via ERB.
[19:36:30] Altonymous: thanks tubbo
[19:36:43] tubbo: Altonymous: theoretically there is, but it's a little harder and i'm not sure whether it will work :P
[19:37:02] tubbo: like if you could somehow set COMMON_UUID = SecureRandom.uuid before the fixtures are executed, it would...but i'm not sure that's a thing
[19:37:43] finnnnnnnnnnn: has joined #RubyOnRails
[19:37:51] Altonymous: seems interesting that there???s a way to do account: account_x and yet there???s not a way to do .. .account_id: account_x.ext_id or something :P
[19:38:54] EminenceHC: has joined #RubyOnRails
[19:39:01] kitsuneyo: i'm don't think i'm describing my problem very well
[19:39:01] paulcsmith_: has joined #RubyOnRails
[19:39:49] dionysus69: has joined #RubyOnRails
[19:39:51] davidheward: has joined #RubyOnRails
[19:40:42] rails323: any body here?
[19:40:54] tubbo: Altonymous: yaml is just key/value pairs
[19:40:56] tubbo: rails323: no
[19:41:14] renanoronfle: has joined #RubyOnRails
[19:41:17] rails323: Well!, Am I suppose to use a view if I only return a JSON?
[19:41:26] tubbo: Altonymous: so you can't "call a method" on a string there
[19:41:29] rails323: or is it best practice to return from controller?
[19:41:47] Altonymous: tubbo: Yeah I meant more generically. not that syntax explicitly
[19:41:56] arup_r: rails323: JBUILDER
[19:42:04] NBarnes: rails323; you want... what arup_r said
[19:42:09] Altonymous: I???d be happy with being able to use .. <%= accounts(:account_x).ext_id %>
[19:42:32] arup_r: rails323: it will make your life easy
[19:42:47] arup_r: shipped with Rails.. no extra cost rails323
[19:42:50] Corki_: has joined #RubyOnRails
[19:42:55] Corki_: Join #django !
[19:43:36] arup_r: Corki_: Please log out!
[19:46:19] EminenceHC: has joined #RubyOnRails
[19:46:46] someish: has joined #RubyOnRails
[19:47:15] Rubie: has joined #RubyOnRails
[19:48:38] rails323: Awesome its built in!
[19:50:07] MartinElvar: has joined #RubyOnRails
[19:50:34] tubbo: active_model_serializers doeeeeee
[19:54:14] yaymukund: has joined #RubyOnRails
[19:54:26] mdurbar_: has joined #RubyOnRails
[19:55:14] gusrub: has joined #RubyOnRails
[19:57:02] fgo: has joined #RubyOnRails
[19:57:47] shinnya: has joined #RubyOnRails
[19:57:57] LambdaSource: has joined #RubyOnRails
[19:58:03] idd2d: has joined #RubyOnRails
[19:59:41] strcmp1: has joined #RubyOnRails
[20:01:34] paulcsmith_: has joined #RubyOnRails
[20:01:46] vipaca: has joined #RubyOnRails
[20:02:47] Altonymous: How do you test controllers that are nested in routes?
[20:02:55] Altonymous: such as.. accounts/:id/users
[20:03:16] Altonymous: I???ve built my controller test but not sure how to get it to map to the route setup that???s nested under accounts.
[20:03:21] pecpec: has left #RubyOnRails: ("Leaving...")
[20:03:22] pecpec: has joined #RubyOnRails
[20:04:48] Altonymous: nevermind, I think I figured it out.. the parent resource id was getting wiped.. :(
[20:05:50] alexhartley: has joined #RubyOnRails
[20:07:21] krz: has joined #RubyOnRails
[20:08:56] craigphares: has joined #RubyOnRails
[20:12:00] barce: has joined #RubyOnRails
[20:13:12] yardenbar: has joined #RubyOnRails
[20:13:56] jholm: has joined #RubyOnRails
[20:16:19] nzst: has joined #RubyOnRails
[20:16:52] annlewis: has joined #RubyOnRails
[20:16:59] pwnd_nsfw: has joined #RubyOnRails
[20:17:41] mary5030: has joined #RubyOnRails
[20:18:50] eosinx: has joined #RubyOnRails
[20:18:50] violarium: has joined #RubyOnRails
[20:19:18] nzst: Hi, it was suggested i make a symbolic link for my robots.txt , but it seems to not stay named robots.txt, it ends up as staging.robots.txt still http://hastebin.com/lexabumiwo.avrasm
[20:19:51] yfeldblum: has joined #RubyOnRails
[20:20:29] yfeldblum: has joined #RubyOnRails
[20:21:12] rails323: Any one home??
[20:21:26] pwnd_nsfw: Is mayonnaise and instrument?
[20:21:26] rhizome: nzst: you have the link paths reversed
[20:21:48] rhizome: shared should have the env-specific files, you link them to robots.txt in release_path
[20:21:55] rails323: cab you recommend a bootcamp for rails?
[20:22:08] pwnd_nsfw: Skillcrush is ok
[20:22:20] rails323: you had it?
[20:22:41] nettoweb: has joined #RubyOnRails
[20:22:45] pwnd_nsfw: The content is a little off though. I'd give it a little bit. They're having a course auditor comthing through soon
[20:23:17] pwnd_nsfw: I'd recommend just reading Rails 4 in Action though
[20:23:37] rails323: can I ask you how much does a starting rails developer gets?
[20:23:48] rhizome: rails323: how long is a piece of string?
[20:24:03] Palsson: has joined #RubyOnRails
[20:24:08] pwnd_nsfw: rails323, if you actually are able to land a job, a junior dev could make upwards of ~75k to start
[20:24:20] pwnd_nsfw: There's plenty out of jobs, but
[20:24:31] rhizome: it depends on what part of the world you live in
[20:24:43] rails323: Say san fransisco
[20:25:02] pwnd_nsfw: rails323, google would have better information I'm sure.
[20:25:20] eosinx: check quora.com
[20:25:31] nzst: pwnd_nsfw: woah, that is not the case in a lot of cities
[20:25:48] jsvgoncalves: has joined #RubyOnRails
[20:25:54] pwnd_nsfw: nzst, I'd imagine. I just applied for a remote job that starts 75k-110k
[20:25:56] rhizome: someone on reddit the other day said they were making $9/hr
[20:25:59] pwnd_nsfw: For junior dev position.
[20:26:07] pwnd_nsfw: rhizome, that's brutal.
[20:26:12] pwnd_nsfw: He must be freelancing
[20:26:24] rhizome: it was all kinds of wrong, yes
[20:26:30] pwnd_nsfw: I'd rather work at chipotle
[20:26:41] tfitts: we had a very junior dev with no training in rails that was making $10 while he learned but now he makes $13
[20:26:56] Bilbo-baggons: has joined #RubyOnRails
[20:27:15] tfitts: he has a profit sharing components too though
[20:27:15] pwnd_nsfw: tfitts, that's a good start, I think.
[20:27:22] gusrub: has joined #RubyOnRails
[20:27:23] pwnd_nsfw: Getting paid to learn is pretty sweet
[20:27:35] rhizome: everybody gets paid to learn
[20:27:42] eosinx: bad negotiation skills get you bad pay, that simple
[20:28:14] rhizome: how many people here ask questions on irc from work?
[20:28:22] ebbflowgo: has joined #RubyOnRails
[20:28:38] pwnd_nsfw: Since I work from home, I ask all of my questions from work technically
[20:28:58] tfitts: I'm at work, but I don't ask too many questions
[20:29:26] pwnd_nsfw: It's cool to idle in here because you learn a bit from helping others, or by seeing other people get helped.
[20:29:29] violarium: I think, at work people more active on irc)
[20:29:54] nzst: i don't use irc, not at work
[20:30:00] violarium: asking or anwering - does not matter
[20:30:14] pwnd_nsfw: Yes, absolutely :)
[20:30:51] sinkensabe: has joined #RubyOnRails
[20:31:06] violarium: Actually, dosomebody know if it is possible to find person to work with on open source project for fun?
[20:31:28] pwnd_nsfw: Anyone with spare time
[20:31:28] mrtomme: has joined #RubyOnRails
[20:31:41] sararegan: has joined #RubyOnRails
[20:32:23] violarium: So, does somebody have a spare time to work with me on small project to track women "unhappy" days?)
[20:32:55] pwnd_nsfw: Haha! That sounds like a pretty good project
[20:33:00] violarium: no skills required
[20:33:05] violarium: https://github.com/violarium/ruby_moon
[20:33:08] cgrieger^away: has joined #RubyOnRails
[20:33:10] pwnd_nsfw: I even can reference someone who is pretty down with tracking unhappy days
[20:33:14] violarium: Ruby Moon :D
[20:33:34] pwnd_nsfw: I could be down lol
[20:33:36] smathy: "unhappy days"?
[20:33:47] pwnd_nsfw: Yano, "time of the month"
[20:33:50] violarium: Year, women cycles
[20:33:54] pwnd_nsfw: I have a bit going on currently though.
[20:34:11] pwnd_nsfw: I should be done this book within the week, and I'll have a lot more knowledge to contribute
[20:34:35] nzst: menstrual cycles, why flit around what you're doing? it's basic biology
[20:34:58] violarium: if you can reference somebody, I would be happy.I do is mostly for my girlfriend, but do it with partner will be more funny
[20:35:04] rhizome: because women's health is dirty
[20:35:04] pwnd_nsfw: It's probably less "offensive" to just call it menstrual cycle anyways
[20:35:49] violarium: now it just have prediction when you track days
[20:36:05] violarium: I'm going to realize notifications via email or sms
[20:36:24] mylord: what stacks are comparatively strong specifically at global chat type concurrency requirements (ie, all the same updates to all ~10k+ users)
[20:36:59] violarium: I have tryied to contact railsgirls, but they have no irc
[20:37:24] pwnd_nsfw: For some reason I feel that'd backfire
[20:37:31] rhizome: you should adjust your terminology if you're going to pursue the help of actual women.
[20:37:44] smathy: ...as opposed to fake women.
[20:38:02] rhizome: as opposed to "ew icky" men
[20:38:04] violarium: I just don't know the correct way to call it in english
[20:38:15] nzst: menstrual cycle
[20:38:30] violarium: I've called it critical periods :D
[20:38:32] eosinx: Need ERP, suggestions?
[20:38:38] rhizome: of which there are literally lots of existing applications
[20:38:41] fatephd: has joined #RubyOnRails
[20:38:58] rails323: Hey I can help you with the project! but I am new!
[20:39:14] rhizome: eosinx: you mean like salesforce? try salesforce.
[20:39:23] violarium: rails323: are you talking to me?
[20:39:28] mylord: how many concurrent users can newbie RoR attempt, at site like this, handle? csgojackpot.com
[20:39:37] eosinx: rhizome: more like OpenERP/Odoo
[20:39:41] momomomomo: has joined #RubyOnRails
[20:39:50] violarium: Yes you can if you would like
[20:40:16] rails323: I need something to work on, sounds like its doable
[20:40:16] violarium: But it's not paid project)
[20:40:25] neutrino: Hey guys, have you ever encountered CORS issue when you try to use amazon's cloudfront as CDN for you heroku app?
[20:40:50] rails323: dont worry I will only charge after the first million
[20:40:50] violarium: rails323: this is a current project: https://github.com/violarium/ruby_moon
[20:41:04] pixelhandler: has joined #RubyOnRails
[20:43:10] strcmp1: has joined #RubyOnRails
[20:45:02] notori0us: has joined #RubyOnRails
[20:45:59] DEA7TH_: has joined #RubyOnRails
[20:46:38] Or1on: has joined #RubyOnRails
[20:47:28] pwnd_nsfw: I'm kind of off-put about the "be_true" and "be_truthy" change
[20:47:52] nzst: rhizome: this you http://rhizome.org/ ?
[20:47:58] sararegan: has joined #RubyOnRails
[20:48:02] banister: has joined #RubyOnRails
[20:49:18] rhizome: no, those are the art ppl who snarfed it a little before i got my first domain
[20:51:31] x-light: has joined #RubyOnRails
[20:52:11] rakm: has joined #RubyOnRails
[20:52:12] Bilbo-baggons: has joined #RubyOnRails
[20:53:11] rhizome: ugh, testing AASM is a drag for me
[20:53:18] baweaver: has joined #RubyOnRails
[20:53:51] smathy: "AASM Callback Hell" has become an oft repeated cry for help in our team.
[20:55:03] ChoiKyuSang: has joined #RubyOnRails
[20:55:04] paulcsmith_: has joined #RubyOnRails
[20:55:13] rhizome: i'm rendering an action based on state, basically partial-name = state, do you think that's better just as an integration? asserting response just returns success for everything since validation errors simply return to the same page
[20:55:16] proboszc1: has joined #RubyOnRails
[20:55:25] seank__: has joined #RubyOnRails
[20:55:26] jhass|off: has joined #RubyOnRails
[20:55:35] roxtrongo: has joined #RubyOnRails
[20:55:35] tercenya: has joined #RubyOnRails
[20:55:47] rhizome: and assert_difference on model stuff breaks because FooController::User is not a thing that exists
[20:56:43] rhizome: sui generis checkout flow is an efficient path to impostor syndrome
[20:56:51] mcr-credil: has joined #RubyOnRails
[20:58:06] fgo: has joined #RubyOnRails
[20:59:23] smathy: rhizome, either an integration is maybe an assert_select in your controller test.
[21:00:28] k1t: has joined #RubyOnRails
[21:01:42] gambl0re: hey smathy whats up man..
[21:01:45] gambl0re: remember me?
[21:02:18] momomomomo: has joined #RubyOnRails
[21:02:27] duncannz: has joined #RubyOnRails
[21:03:18] mary5030: has joined #RubyOnRails
[21:03:27] pecpec: has joined #RubyOnRails
[21:03:42] violarium: has joined #RubyOnRails
[21:03:53] JamesDH: has joined #RubyOnRails
[21:04:12] mary5030: has joined #RubyOnRails
[21:06:24] jenrzzz: has joined #RubyOnRails
[21:08:36] jtthedev: has joined #RubyOnRails
[21:09:50] jtthedev: there are things in life that we take for granted because they are always there or always work. just got back home from my trip to india. Never again, will I ever take for granted stable internet access
[21:10:12] danielbucher: has joined #RubyOnRails
[21:11:30] jenrzzz: has joined #RubyOnRails
[21:11:37] Rubie: has joined #RubyOnRails
[21:11:40] danielbucher: has joined #RubyOnRails
[21:12:04] bendangelo: has joined #RubyOnRails
[21:12:14] ascarter: has joined #RubyOnRails
[21:13:51] zlogan: has joined #RubyOnRails
[21:17:23] annlewis: has joined #RubyOnRails
[21:17:47] smathy: gambl0re, I'm still trying to forget.
[21:18:16] n00bDev: has joined #RubyOnRails
[21:18:34] nhhagen: has joined #RubyOnRails
[21:21:17] fschuindt: has joined #RubyOnRails
[21:21:18] cjk101010: has joined #RubyOnRails
[21:22:27] sinkensabe: has joined #RubyOnRails
[21:22:35] weaksauce: has joined #RubyOnRails
[21:23:50] paulcsmith_: has joined #RubyOnRails
[21:25:36] paulcsmith_: has joined #RubyOnRails
[21:26:05] Altonymous: has joined #RubyOnRails
[21:26:34] Moonlight-Angel: has joined #RubyOnRails
[21:26:44] sam_weerasinghe: has joined #RubyOnRails
[21:26:46] choke: has joined #RubyOnRails
[21:28:25] nettoweb: has joined #RubyOnRails
[21:28:34] n99999i: has joined #RubyOnRails
[21:28:58] NBarnes: ACTION hands gambl0re the burn cream.
[21:29:34] alphaatom: has joined #RubyOnRails
[21:29:45] NBarnes: I keep feeling like my path to impostor syndrome isn't really very efficient and that if I were wiser in Rails, I'd know how to do it right.
[21:30:03] bronson: has joined #RubyOnRails
[21:30:11] tubbo: i've never heard of anyone who was on a path TO impostor syndrome
[21:30:15] tubbo: like, intentionally
[21:30:40] NBarnes: My experience is that it's very easy to end up on paths without entirely meaning to.
[21:30:43] NBarnes: But maybe I'm doing it wrong.
[21:31:08] alphaatom: has joined #RubyOnRails
[21:31:15] crystal77: has joined #RubyOnRails
[21:33:19] ekain_: has joined #RubyOnRails
[21:34:37] slash_nick: smathy: i know you're away... just respond to my pms when you get back plz.
[21:35:13] NBarnes: has joined #RubyOnRails
[21:35:44] smathy: slash_nick, I'm not away.
[21:36:22] rickmasta: has joined #RubyOnRails
[21:37:09] gambl0re: he's just ignoring me...thats fine
[21:38:05] annlewis: has joined #RubyOnRails
[21:38:09] Rakunh0: has joined #RubyOnRails
[21:40:00] badmadrad: has joined #RubyOnRails
[21:41:08] tubbo: gambl0re: ask your questions in here
[21:41:25] rakm: has joined #RubyOnRails
[21:42:40] ciree: has joined #RubyOnRails
[21:42:44] VeryBewitching: Hey guys, I've been trying to figure out a way to debug a validation issue that I encounter with FactoryGirl. Now and again, when I run the spec, the factory for member complains about the format for Username. I was trying to add a puts statement inside of the factory do block which blew up. Looking for a way to resolve this issue, any help is appreciated. https://gist.github.com/bewitchingme/
[21:42:46] VeryBewitching: acfa0ef084292503351e
[21:42:52] VeryBewitching: https://gist.github.com/bewitchingme/acfa0ef084292503351e
[21:43:29] Balzrael: do a binding.pry inside it
[21:43:34] rickmasta: has joined #RubyOnRails
[21:44:14] VeryBewitching: Balzrael: I actually haven't used pry yet, am I in for an evening of reading?
[21:46:29] netzfisch: has joined #RubyOnRails
[21:46:38] CanTonic: has joined #RubyOnRails
[21:47:48] a1fa: in activerecord, is it possible to associate two tables with "id" = "id" (has_one)
[21:48:14] a1fa: does it have to be model_id?
[21:49:48] tfitts: a1fa: foreign_key
[21:50:26] a1fa: so has_one: model :foreign_key id?
[21:50:39] a1fa: another question, is that a good idea?
[21:50:52] rhizome: no, because your model will already have an id
[21:51:18] a1fa: is it really necessary to have a unique id for another table, where "model_id" is also uniq?
[21:51:18] rhizome: so yes, for a belongs to, you need both :id and :something_id
[21:51:26] rhizome: what are you talking about
[21:51:28] a1fa: rhizome: has_one
[21:51:56] a1fa: do you need both, id, and model_id? why couldn't id be the same id
[21:51:56] rhizome: User has_one :profile # Profile has :id, :user_id
[21:52:16] rhizome: Profile belongs_to :user
[21:52:34] a1fa: it makes sense now
[21:54:17] jgpawletko: has joined #RubyOnRails
[21:54:20] rhizome: VeryBewitching: DatabaseCleaner.clean goes after, not before
[21:54:39] enitiz: has joined #RubyOnRails
[21:55:02] VeryBewitching: rhizome: I had it after prior to this, I encounter the same problem each time.
[21:55:44] VeryBewitching: Well, it's occasional, I just want to see what username it's failing with.
[21:58:05] x-light: VeryBewitching: pry is very easy to use, no eveing reading needed
[21:58:24] rhizome: VeryBewitching: use failure messages
[21:58:39] momomomomo: has joined #RubyOnRails
[21:58:59] carlosd: has joined #RubyOnRails
[21:59:07] VeryBewitching: rhizome: How do you mean?
[21:59:12] fgo: has joined #RubyOnRails
[21:59:29] VeryBewitching: Currently in a pry session inside FactoryGirl::Declaration::Static:0x007faa6b5a6b90; how do I inspect this?
[21:59:32] atomical: has joined #RubyOnRails
[21:59:33] Jasaka: has joined #RubyOnRails
[21:59:39] CanTonic: has joined #RubyOnRails
[22:00:23] smathy: VeryBewitching, just type `inspect` to see self.inspect
[22:02:03] jholm: has joined #RubyOnRails
[22:02:46] Kallis: has joined #RubyOnRails
[22:03:27] wethu: has joined #RubyOnRails
[22:03:46] wethu: has joined #RubyOnRails
[22:03:48] jgt1: has joined #RubyOnRails
[22:04:21] rickmasta: has joined #RubyOnRails
[22:04:22] seank_: has joined #RubyOnRails
[22:07:19] jtthedev: has joined #RubyOnRails
[22:08:12] petricore: has joined #RubyOnRails
[22:08:18] sonofdirt: has joined #RubyOnRails
[22:08:25] VeryBewitching: rhizome: Thank you, I added an after_validation and that's how I found the offending username.
[22:08:54] VeryBewitching: Will be making use of pry though, it will certainly come in handy.
[22:09:51] arooni-mobile: has joined #RubyOnRails
[22:10:05] allcentury: has joined #RubyOnRails
[22:10:33] Slogger: So I have an input type number step 0.1 because I'd like the up/down clicky arrows to change the values by 0.1, however I'd like my element to accept more significant digits (IE 1.25 rather than 1.2 or 1.3) if people type values in. However Firefox seems to believe that input values MUST be divisible by the step value (and maybe it's actually html spec, don't know)... Anybody know a way around this behavior? I want to control the increment size of
[22:10:51] rickmasta: has joined #RubyOnRails
[22:10:54] jscheel: has joined #RubyOnRails
[22:11:44] dan0034001: has joined #RubyOnRails
[22:13:09] havenwood: has joined #RubyOnRails
[22:15:35] ebbflowgo: has joined #RubyOnRails
[22:15:43] VeryBewitching: slogger: The step attribute specifies the legal number intervals for an element.
[22:16:05] VeryBewitching: You can set it to step="any"
[22:17:21] Slogger: I think they need a way to set the click increment behavior separate from significant digits.
[22:18:12] VeryBewitching: <input type='number' step='0.05' value='0.00' placeholder='0.00' /> try that?
[22:18:53] Slogger: Like if you're working with money, you'd rather it went up by a larger step per click than 0.01 even if people can put in 3.99.
[22:20:22] VeryBewitching: It's meant to define the interval, if you want something beyond that you should write some JavaScript for it.
[22:20:48] Maletor: Is it possible to add something like this to a where clause or must everything be a constant? WHERE `schools`.`program_id` = `institution_programs`.`program_id`
[22:20:49] Slogger: The problem I have with it is that the interval shouldn't be linked to form valid state IMO.
[22:21:06] smathy: maletor, just put it all in quotes.
[22:21:30] Maletor: because otherwise it's not possible?
[22:22:19] smathy: maletor, correct, the only things that are possible using the ActiveRecord syntax is testing a column against a literal value.
[22:22:21] dan0034001: has joined #RubyOnRails
[22:22:42] Maletor: are you sure i can't merge this as a scope?
[22:23:21] Maletor: ultimately i need to join on TWO columns. AR does not support this AFAIK but i can't find anything on google either
[22:23:37] smathy: maletor, well you could mangle an association to pretend that one or the other of those is the primary key of one of the tables, and mangle a join to fool AR into constructing the string you want.
[22:23:40] baweaver: Model.joins(:a, :b) # really?
[22:23:54] Maletor: that creates two joins
[22:23:55] n00bDev: any tips to make first load to app faster? mine is taking about 4 seconds according to chrome network
[22:23:58] Maletor: not one join on two columns
[22:24:38] baweaver: writing raw sql works y'know.
[22:25:03] Maletor: right. i guess i'll just go back to php then.
[22:25:03] VeryBewitching: n00bdev: That's a bit of a loaded question. Are you saying when you start rails server that your first visit to it is 4 sec. in length?
[22:25:17] baweaver: INNER JOIN model ON value = other AND value2 = other2
[22:25:24] Maletor: baweaver: correct.
[22:25:36] baweaver: yeah, just write the sql for it.
[22:26:34] Slogger: Also, even if I leave out step but still have a min/max it throws a fit when I put in a number that's a decimal.
[22:26:37] n00bDev: VeryBewitching: first visit on test server
[22:26:38] baweaver: not really a DSL for exotic joins.
[22:26:51] n00bDev: loading all those assets and what not
[22:26:56] smathy: maletor, every ORM has its limits, so definitely if you don't like the benefits of the ORM, then just use SQL - and if that makes Rails less useful to you than PHP then yes, pick the tool you think is right.
[22:27:05] Slogger: The html5 numeric input is frikn useless.
[22:27:29] VeryBewitching: n00bdev: Which environment are you running Rails in, test, development or production with the server in question?
[22:27:50] n00bDev: development
[22:27:54] dan0034001: has joined #RubyOnRails
[22:28:56] baweaver: there's no rule against extending AR to your own needs.
[22:29:17] smathy: slogger, yep.
[22:29:25] VeryBewitching: n00bdev: In development the assets are not compiled, so you get each asset separately. How many assets are you loading per page load?
[22:30:12] wldcordeiro: has joined #RubyOnRails
[22:31:09] n00bDev: looks like on average between 70~80 requests...
[22:31:13] n00bDev: and this is production too
[22:31:28] n00bDev: mind you i just got added to this project so i didnt handle this
[22:31:38] n00bDev: i just noticed it loads incredibly slow and want to fix this
[22:33:40] VeryBewitching: n00bdev: Take a look at application.css|scss|* and application.js|coffee|*
[22:33:43] smathy: n00bdev, like not the app itself starting up, you're talking about the app's started and you're just hitting it from a new browser?
[22:34:34] jamgood96: has joined #RubyOnRails
[22:34:40] n00bDev: smathy: correct
[22:34:45] n00bDev: u know how they say
[22:34:50] n00bDev: load time is crucial
[22:34:57] n00bDev: the longer the load, the worst it is
[22:35:02] n00bDev: its a heavy app no doubt
[22:35:46] n00bDev: VeryBewitching okay
[22:37:15] smathy: n00bdev, so in your Chrome log, does anything stand out as taking up all the tiem?
[22:37:26] jamgood96: I'm using CarrierWave for image upload/processing, and am dumping the images to an S3 bucket. All works fine except when form validation fails - a broken image is shown as the URL on S3 does not exist. I don't have this problem when just storing all files locally, only when using S3. Anyone had this issue before?
[22:39:14] dan0034001: has joined #RubyOnRails
[22:39:27] Radar: GOOD MORNING
[22:41:20] n00bDev: smathy: the document of the landing page took 19seconds lol
[22:41:23] n00bDev: other than that
[22:41:30] n00bDev: we have some videos on the landing page
[22:41:46] fschuindt: has joined #RubyOnRails
[22:41:53] n00bDev: 9.0 MB transferred, 43.47seconds to finish, this is after i cleared history and cache
[22:41:56] smathy: n00bdev, umm, ok - you said 4 seconds before.
[22:42:05] n00bDev: i didn t clear cache forgot too
[22:43:06] smathy: Ok, so yeah - obviously that's not going to be acceptably quick for most internet connections.
[22:43:16] n00bDev: 7.4 mb is from 3 files
[22:43:32] n00bDev: the rest is just typical assets css/js
[22:43:55] n00bDev: the 3 vidoes are hosted on s3
[22:43:55] smathy: Looks like you have your answer for improving load then :)
[22:44:53] stardiviner: has joined #RubyOnRails
[22:46:07] MarkTR: has joined #RubyOnRails
[22:50:13] baweaver: has joined #RubyOnRails
[22:55:16] drale2k: has joined #RubyOnRails
[22:55:50] nettoweb: has joined #RubyOnRails
[22:56:49] someish: has joined #RubyOnRails
[22:59:57] dopamean_: has joined #RubyOnRails
[23:00:23] fgo: has joined #RubyOnRails
[23:01:35] michael_mbp: has joined #RubyOnRails
[23:02:41] astrodog: n00b: There's probably not a lot you can do about that.
[23:02:48] astrodog: On marginal connections, those videos will hurt.
[23:04:56] Ecky7_: has joined #RubyOnRails
[23:07:14] mary5030: has joined #RubyOnRails
[23:07:59] mary5030: has joined #RubyOnRails
[23:08:07] [H]unt3r: has joined #RubyOnRails
[23:09:15] FCser: has joined #RubyOnRails
[23:09:33] sankaber: has joined #RubyOnRails
[23:13:36] smathy: astrodog, they don't have to hurt the page load itself.
[23:14:20] astrodog: smathy: Thought he was talking about the start->finish time, rather than the page itself becoming usable.
[23:14:36] Lightsword: has joined #RubyOnRails
[23:16:41] carlosd: has joined #RubyOnRails
[23:17:00] smathy: astrodog, even so, unless they are autoplaying (in which case it'd be very weird for him to be confused about the load time) they don't have to be preloaded.
[23:17:09] hololeap: has joined #RubyOnRails
[23:18:00] jonr22: has joined #RubyOnRails
[23:18:17] notori0us: has joined #RubyOnRails
[23:19:00] baweaver: has joined #RubyOnRails
[23:21:18] jonr2219: has joined #RubyOnRails
[23:27:22] darrencauthon: has joined #RubyOnRails
[23:27:27] Ropeney: has joined #RubyOnRails
[23:28:42] dan0034001: has joined #RubyOnRails
[23:30:22] sargas: has joined #RubyOnRails
[23:30:43] sevenseacat: has joined #RubyOnRails
[23:32:35] pecpec: has joined #RubyOnRails
[23:34:38] leonardoajim: has joined #RubyOnRails
[23:40:49] hahuang61: has joined #RubyOnRails
[23:41:17] huck5: has joined #RubyOnRails
[23:42:04] blnkammo: has joined #RubyOnRails
[23:42:06] Xiti: has joined #RubyOnRails
[23:47:14] craigphares: has joined #RubyOnRails
[23:50:16] jholm: has joined #RubyOnRails
[23:52:35] barendt: has joined #RubyOnRails
[23:53:50] blnkammo: has joined #RubyOnRails
[23:55:36] adavia: any idea why i get ActionController::UrlGenerationError: ActionController::UrlGenerationError: No route matches {:action=>"show", :controller=>"users", :id=>nil} missing required keys: [:id] I am using a slug instead an id. Error in line 5 http://pastie.org/10406349#5
[23:57:07] sevenseacat: because youre missing the required key id
[23:57:25] sevenseacat: need a full error
[23:59:24] baweaver: and not defining an alt route to get the other part
[23:59:57] Radar: adavia: It'd be nice to know what @user is there.