« Back to channel list

#RubyOnRails - 09 September 2015

« Back 1 day Forward 1 day »
[00:00:36] towski__: has joined #RubyOnRails
[00:01:26] fgo: has joined #RubyOnRails
[00:03:04] pecpec: has joined #RubyOnRails
[00:08:01] bmurt: has joined #RubyOnRails
[00:08:24] iateadonut: has joined #RubyOnRails
[00:10:34] johnflux: has joined #RubyOnRails
[00:10:34] johnflux: has joined #RubyOnRails
[00:11:38] JulioPapel: has joined #RubyOnRails
[00:17:33] ngscheurich: has joined #RubyOnRails
[00:18:10] ElSif: has joined #RubyOnRails
[00:19:23] dstarh: has joined #RubyOnRails
[00:20:41] Rakunh0: has joined #RubyOnRails
[00:20:47] k1t: has joined #RubyOnRails
[00:20:56] nym: has joined #RubyOnRails
[00:21:29] Radar: adavia: Solved it yet?
[00:23:51] k1t_: has joined #RubyOnRails
[00:26:56] nahtnam: has joined #RubyOnRails
[00:30:49] superlou: has joined #RubyOnRails
[00:32:18] rhizome: 95degree naptime
[00:32:18] towski_: has joined #RubyOnRails
[00:32:28] LambdaSource: has joined #RubyOnRails
[00:33:34] pwnd_nsfw: has joined #RubyOnRails
[00:33:49] michaellippold: has joined #RubyOnRails
[00:37:29] ciree: any reason why my url helpers would use a . instead of a / ?
[00:37:44] ciree: customers_url(customer) returns /customers.34 for example
[00:39:17] higuys: has joined #RubyOnRails
[00:39:21] pawnbox: has joined #RubyOnRails
[00:39:41] higuys: Is ror considered a full stack framework
[00:41:27] sevenseacat: welcome back higuys
[00:42:29] ChanServ: +o baweaver
[00:42:32] stormriderf: has joined #RubyOnRails
[00:42:41] Aeyrix: <higuys> Hi guys
[00:42:44] Aeyrix: why am i laughing at this
[00:43:00] rhizome: ciree: customers_url is a collection route by default. use customer_url
[00:43:05] rhizome: (singular)
[00:43:28] rhizome: Aeyrix: "you already said that"
[00:44:12] Aeyrix: Pretty much lol
[00:44:45] baweaver: ACTION whistles
[00:45:06] rhizome: baweaver has air conditioning
[00:45:06] jholm: has joined #RubyOnRails
[00:45:12] higuys: Is ror considered full stack?
[00:45:26] rhizome: no, it's a framework
[00:45:57] higuys: Is it a full stack framework?
[00:46:03] one_zero: has joined #RubyOnRails
[00:46:35] rhizome: what do you mean by "full stack?"
[00:46:45] ruurd_: has joined #RubyOnRails
[00:46:58] higuys: Never mind..
[00:49:24] ChanServ: +o baweaver
[00:49:29] ChanServ: -o baweaver
[00:49:33] ruurd: has joined #RubyOnRails
[00:49:49] asi_: has joined #RubyOnRails
[00:50:00] jonr22: has joined #RubyOnRails
[00:50:10] wldcordeiro_: has joined #RubyOnRails
[00:50:20] hydrozen: has joined #RubyOnRails
[00:50:23] nym: has joined #RubyOnRails
[00:50:25] robotbrain: has joined #RubyOnRails
[00:50:48] one_zero: has joined #RubyOnRails
[00:51:03] gs: has joined #RubyOnRails
[00:51:34] EasyCo: has joined #RubyOnRails
[00:51:50] fryguy: has joined #RubyOnRails
[00:52:18] yfeldblum: has joined #RubyOnRails
[00:52:56] Altonymous: has joined #RubyOnRails
[00:53:01] Ratler: has joined #RubyOnRails
[00:53:09] larissa: has joined #RubyOnRails
[00:53:25] Shidash: has joined #RubyOnRails
[00:53:25] george2: has joined #RubyOnRails
[00:53:31] FastJack: has joined #RubyOnRails
[00:53:40] lupine: has joined #RubyOnRails
[00:53:40] meatherly: has joined #RubyOnRails
[00:53:49] epochwolf: has joined #RubyOnRails
[00:53:50] urkle: has joined #RubyOnRails
[00:53:53] DarkBushido: has joined #RubyOnRails
[00:53:54] arooni-mobile: has joined #RubyOnRails
[00:54:02] a1fa: rhizome:
[00:54:28] iooner: has joined #RubyOnRails
[00:54:32] sfr^: has joined #RubyOnRails
[00:54:33] FooBarWidget: has joined #RubyOnRails
[00:54:34] Seich: has joined #RubyOnRails
[00:54:39] fluxsource: has joined #RubyOnRails
[00:54:39] cschneid: has joined #RubyOnRails
[00:54:59] arooni-mobile: has joined #RubyOnRails
[00:55:03] LBRapid: has joined #RubyOnRails
[00:55:23] terrellt: has joined #RubyOnRails
[00:55:57] arooni-mobile: has joined #RubyOnRails
[00:56:06] skarn: has joined #RubyOnRails
[00:56:35] aguynamedben: has joined #RubyOnRails
[00:56:53] arooni-mobile: has joined #RubyOnRails
[00:57:45] arooni-mobile: has joined #RubyOnRails
[00:57:54] egtann: has joined #RubyOnRails
[00:58:22] egtann: has joined #RubyOnRails
[00:58:32] mordocai: has joined #RubyOnRails
[00:58:40] adavia: Radar: yes sorry. i forgot to add the slug attr in my users fixture
[00:58:42] arooni-mobile: has joined #RubyOnRails
[00:58:55] Radar: adavia: np
[00:59:23] a1fa: if i have to update two models with one controller, should i call do model.update(same-parameters) or should i do custom validation inside model1?
[00:59:35] arooni-mobile: has joined #RubyOnRails
[01:00:04] a1fa: call do model1.update and model2.update from within same controller* or custom validate inside model1. in order to update model2)
[01:00:12] adavia: testing is giving me headaches. I left all tests to be done before finishing my app
[01:00:13] Radar: a1fa: call it in the same controller
[01:00:36] arooni-mobile: has joined #RubyOnRails
[01:00:49] a1fa: Radar: any way to make each dependent on eachother
[01:00:57] Radar: a1fa: explain with real code please
[01:01:01] crystal77: has joined #RubyOnRails
[01:01:04] a1fa: Radar: User, Profiles
[01:01:09] a1fa: no real code at the moment
[01:01:10] Radar: a1fa: That is not code./
[01:01:20] Radar: What do you mean by "depend"?
[01:01:21] rhizome: you can use associations to set one through the other
[01:01:25] a1fa: working on it, should have something in 30 minutes
[01:01:32] Radar: And why the hell do people keep separating users + profiles?
[01:01:38] Radar: Is there some school of thought that teaches this?
[01:01:44] a1fa: rhizome: so associations will also update?
[01:01:46] arooni-mobile: has joined #RubyOnRails
[01:01:57] Radar: imo a User record should contain the user's profile information. It shouldn't be abstracted out to another table.
[01:02:02] Radar: It's maddening
[01:02:03] rhizome: a1fa: just guessing, if you can explain in a sentence or two it would be helpful
[01:02:11] a1fa: rhizome: what if a record does not exist?
[01:02:16] a1fa: inside profiles
[01:02:17] arooni-mobile: has joined #RubyOnRails
[01:02:25] a1fa: so i have Users table, password, email, etc, etc
[01:02:26] fgo: has joined #RubyOnRails
[01:02:41] rhizome: sentence or two, not 14 lines with three words apiece
[01:02:48] arooni-mobile: has joined #RubyOnRails
[01:02:55] a1fa: the curse of enter key :(
[01:03:09] rhizome: this isn't ICQ
[01:03:26] Radar: a1fa: Answer me: why do you need BOTH a User model and a Profile model?
[01:03:29] a1fa: that explains it. i started with ICQ before joining IRC server
[01:03:34] Radar: Isn't it making it more complex than it needs to be?
[01:03:36] arooni-mobile: has joined #RubyOnRails
[01:04:06] a1fa: Radar: yeah it is, but if users table is big, then it gets bigger with more schema and more data
[01:04:20] arooni-mobile: has joined #RubyOnRails
[01:04:21] Radar: a1fa: How many billions of users are you expecting to have?
[01:04:32] Radar: a1fa: News flash: databases are designed to handle large amounts of data.
[01:04:33] a1fa: rhizome: rhizome i still remember my ICQ# :}
[01:04:39] arooni: has joined #RubyOnRails
[01:04:42] Radar: Sounds like refactorbation to me
[01:05:08] arooni: has joined #RubyOnRails
[01:05:23] a1fa: ACTION has to google refactorbation
[01:05:39] a1fa: To stimulate oneself through endless refactoring exercises towards unattainable perfection
[01:05:43] moeabdol: has joined #RubyOnRails
[01:05:45] Radar: It seems like you're wanting to scale before you need to scale.
[01:06:41] a1fa: good point
[01:06:48] rhizome: google indicates arguments for both approaches
[01:07:30] draig: has joined #RubyOnRails
[01:08:04] duncannz: has joined #RubyOnRails
[01:08:07] a1fa: both approaches to using a reference model vs. non-reference?
[01:08:36] draig: I'm new to rails and liking it a lot, but running into a small issue with active record validating data from a form
[01:08:50] rhizome: a1fa: 1 vs 2 models, yeah
[01:09:35] a1fa: as a workbench user i get mad when i have to join tables, but as a "freshman" dba, i enjoy having more tables, as a novice programmer i try to follow the footsteps of what has been laid before me
[01:10:01] Dwarf: has joined #RubyOnRails
[01:10:04] draig: https://gist.github.com/jhoughjr/83c5b2e189f9f608d87d shows what i have
[01:10:18] Radar: I have never once, in ~15 years of programming, needed to have a separate table for my users and a separate table for their profile data.
[01:10:49] a1fa: Radar: security wise, we've been thought its always good to keep those two separate
[01:10:54] Radar: I can understand the reasoning of keeping email/password data separate, but really it is a crappy reason to make the system twice as complex as it needs to be.
[01:10:59] a1fa: (thanks PHP)
[01:11:06] Radar: a1fa: Don't do shit like render json: user.attributes
[01:11:08] pecpec: has joined #RubyOnRails
[01:11:09] Radar: boom secure
[01:11:20] draig: my validator always thinks that scale isnt in the SCALES inclusion arg
[01:11:22] a1fa: thats a new one
[01:11:28] a1fa: may have to use that one
[01:11:30] Radar: draig: controller please
[01:11:36] a1fa: ^ stupid enter key
[01:12:11] a1fa: ACTION needs to train himself to stop hitting RETURN key so often. Increase_Buffer(80 characters)
[01:12:23] draig: https://gist.github.com/jhoughjr/83c5b2e189f9f608d87d updated gist
[01:13:09] a1fa: needless to say, ror is growing on me. the more experience i rack up, the more i enjoy it
[01:13:18] draig: im sort of experiementing and trying to learn by doing. been watching some rails fro zombies vids and just got the rails 4 way today
[01:13:23] rhizome: there you go, all one line!
[01:14:00] Radar: draig: all seems good there. Can you show me what the request logs show as in the console or log/development.log too?
[01:14:21] draig: ok ill check, just starting to mes with it for the night
[01:15:26] Jon30: has joined #RubyOnRails
[01:15:29] draig: derp maybe i fixed it in the wee hours of the morning lol
[01:17:59] draig: I have some more general questions also, such as how to have a landing page that doesnt have any resources behind them
[01:19:02] Radar: draig: rails g controller home
[01:19:09] Radar: create new file app/views/home/index.html.erb
[01:19:13] Radar: add route, root to: "home#index"
[01:19:28] draig: I was thinking i could do something like that
[01:19:51] draig: i worked next to a rails team at my old job, now im seeing why they were so fast
[01:19:52] chills42: has joined #RubyOnRails
[01:20:04] rhizome: or create public/index.html, but it depends on what you mean by "doesn't have any resources"
[01:20:19] JulioPapel: has joined #RubyOnRails
[01:20:21] Radar: public/index.html won't let you inherit from the application layout
[01:20:22] draig: mainly just an html page at the root of the site
[01:20:36] draig: that i can hard code links to other endpoints i guess
[01:20:47] draig: though later i may make it show summaries of data
[01:21:02] atomical: has joined #RubyOnRails
[01:21:02] BongoShaftsbury: has joined #RubyOnRails
[01:21:05] rhizome: i'd imagine a landing page would have its own layout anyway
[01:21:08] draig: ideally i want user login and registration there. I did play with using devise a bit
[01:21:46] draig: so much stuff to take in at once though. I've put off doing web development for a while
[01:24:40] Radar: draig: Are you reading anything atm to learn Rails?
[01:25:16] kegan_: has joined #RubyOnRails
[01:26:10] draig: The Rails 4 Way, i signed up to codeschool also
[01:26:19] draig: and i also have a ruby programming book
[01:26:25] Radar: sounds good
[01:26:38] draig: done ios/mac dev for about 5 years now
[01:27:55] Aeyrix: !r4ia tbh
[01:27:55] helpa: Rails 4 in Action - http://manning.com/bigg2 - An excellent book combining Rails and TDD/BDD development. Written by Rebecca Skinner, Steve Klabnik, Ryan Bigg, Yehuda Katz
[01:28:35] pawnbox: has joined #RubyOnRails
[01:28:53] Aeyrix: Aaaand I just crashed winword.
[01:28:55] Aeyrix: Ffffffffffff-
[01:29:11] Aeyrix: This is why I petitioned for us to move to writing reports in LaTeX.
[01:29:46] Radar: Asciidoc or ban
[01:29:53] sevenseacat: asciidoc is the shit.
[01:29:58] Aeyrix: LaTeX is far better for what I'm doing.
[01:30:16] rickmasta: has joined #RubyOnRails
[01:30:54] larryisthere: has joined #RubyOnRails
[01:31:43] moneylotion: has joined #RubyOnRails
[01:32:51] larryisthere: Hi, I got a Completed 500 Internal Server Error when I saved a duplicated record to a table which has validate of uniqueness and a composite index. Is 500 correct ? Shouldn't it be 200 or something, it's just a common server response somehow.
[01:33:06] rhizome: composite index you say?
[01:33:17] Radar: real error message please?
[01:33:25] helpa: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[01:33:26] Radar: 500 Internal Server Error is not indicative of the real error
[01:33:53] northfurr: has joined #RubyOnRails
[01:34:04] larryisthere: Radar, yes I got the real error message as well.
[01:34:16] Radar: larryisthere: When are you going to share it with us?
[01:34:22] Radar: Remember: sharing IS caring
[01:34:57] draig: athanks helpa
[01:35:02] larryisthere: Radar thank you, I'm new and learn
[01:35:13] draig: i do more test after in practice :)
[01:35:32] draig: but my former job educated me a lot on tdd and bdd
[01:35:32] w0rd-driven: has joined #RubyOnRails
[01:37:47] annlewis: has joined #RubyOnRails
[01:37:57] workmad3: has joined #RubyOnRails
[01:39:09] Lightsword: has joined #RubyOnRails
[01:39:43] k1t_: Has anyone experienced an issue when deploying like this when deploying? "Sprockets::FileOutsidePaths" full error: https://gist.github.com/whitmanc/f53761c599aad076d376
[01:40:10] k1t_: i'm almost certain it has something to do with sprockets, but I can't seem to figure out how to fix/debug better...
[01:40:27] vipaca: has joined #RubyOnRails
[01:41:02] k1t_: it happens during precompilation of assets during heroku deployments
[01:41:51] k1t_: It's saying a CSS file from actionpack isn't in the paths.
[01:42:02] charliesome: has joined #RubyOnRails
[01:43:06] farkerhaiku: has joined #RubyOnRails
[01:46:08] n00bDev: is there a big performance hit if i do a check on html.erb to render specific fields?
[01:46:55] n00bDev: im debating if serving a entirely new page for this specific condition since most of it will be copy/paste and changing some fields
[01:47:34] smathy: n00bdev, you're asking if: foo.bar.present? takes a long time?
[01:47:53] n00bDev: like <%= if foo.bar.present? %>
[01:48:00] n00bDev: without the =
[01:50:37] siemprefresco: has joined #RubyOnRails
[01:51:03] smathy: n00bdev, puts Benchmark.measure { nil.present? }
[01:53:47] n00bDev: ok ill try that out thanks
[01:55:57] centrx: has joined #RubyOnRails
[01:56:36] larryisthere: Radar, Hi, here is the gist: https://gist.github.com/larryisthere/a17366a8be29ec124500
[01:57:05] Radar: larryisthere: Can't help. There's no information there for me to know what is going on.
[01:57:18] adam12: larryisthere: check line 26. missing an 'u'
[01:57:41] Radar: adam12: well spotted
[01:57:48] drale2k: has joined #RubyOnRails
[01:58:04] adam12: Radar: likely would of glazed over it a hundred times if it was my own code. lol.
[01:58:29] larryisthere: adam12 so fast ..
[01:58:56] larryisthere: adam12 give me 422 instead
[01:59:07] adam12: larryisthere: expected response code
[01:59:07] sevenseacat: and what are the errors?
[01:59:23] sevenseacat: there you go, thats as expected
[01:59:28] sevenseacat: "{"user_id":["Has been taken."]}"
[01:59:36] larryisthere: sevenseacat yes
[02:01:22] smeade: has joined #RubyOnRails
[02:01:52] larryisthere: I've learnt this time where to locate unexpected responding, and how to ask. Thank you all.
[02:03:19] sonofdirt: has joined #RubyOnRails
[02:03:52] fgo: has joined #RubyOnRails
[02:04:31] a1fa: in ar, delegate should automatically update the delegated table?
[02:05:11] Maletor: has joined #RubyOnRails
[02:05:17] jonee: has joined #RubyOnRails
[02:05:58] Creeves: has joined #RubyOnRails
[02:06:23] tjbiddle: has joined #RubyOnRails
[02:06:56] centrx: a1fa, delegate just maps to the method
[02:07:13] centrx: on the delegatee object
[02:07:17] tjbiddle: Hey all - Attempting to use accepts_nested_attributes and have the option to add fields dynamically. Looks like some of the functions necessary explained in RailsCast #197 have been removed in Rails 4
[02:07:54] tjbiddle: Specifically the link_to_function method. Anyone know of a way to do this in Rails 4?
[02:08:49] centrx: tjbiddle, Search Google for 'link_to_function'
[02:08:52] rhizome: link_to_function doesn't exist anymore. use regular javascript
[02:09:12] tjbiddle: centrx: Been doing so. IRC is always my last resort.
[02:09:41] a1fa: http://wyeworks.com/blog/2009/6/4/rails-delegate-method
[02:09:49] a1fa: so i did this, but i cant get mine to update
[02:10:01] a1fa: it reads correctly from profile but no update
[02:10:08] a1fa: and i didnt do it this way
[02:10:10] a1fa: delegate :name, :name=, :email, :email=, :to => :user
[02:10:18] a1fa: instead i did :name, :email
[02:10:35] a1fa: guss i'll try adding = and see if that helps
[02:10:36] roadt: has joined #RubyOnRails
[02:10:42] a1fa: not sure why it would work that way
[02:11:14] tjbiddle: a1fa: Getters and setters - :name to retrieve, :name= to set
[02:11:18] quazimodo: I have a nested form 3 layers deep, and I make changes to the 1st and 3rd nodes (meaning the middle node's changed? returns false). If i do 1stnode.save, it won't propagate tha instruction down to the 3rd node will it
[02:11:24] tjbiddle: Two separate methods - that's why both are included
[02:12:16] pecpec: has joined #RubyOnRails
[02:12:29] a1fa: tjbiddle: thanks
[02:12:47] a1fa: http://api.rubyonrails.org/classes/Module.html < not documented
[02:13:36] quazimodo: that's notit
[02:13:43] quazimodo: it's not assigning the attributes :/
[02:14:35] a1fa: tjbiddle: and it still didnt work :(
[02:14:44] bmurt: has joined #RubyOnRails
[02:15:28] LambdaSo_: has joined #RubyOnRails
[02:15:45] tjbiddle: a1fa: Pastebin your code
[02:16:55] a1fa: tjbiddle: basically the same what's in the guide
[02:17:01] a1fa: at this point, i made it match
[02:18:22] tjbiddle: a1fa: Are you trying this in the console or server? Restart both, try it in the console, ensure customer.user and customer.user.name and customer.user.name= all work as expected first
[02:19:07] ebbflowgo: has joined #RubyOnRails
[02:19:59] a1fa: ^ there is my fail
[02:20:12] a1fa: customer.name
[02:20:19] a1fa: lol. thanks
[02:21:23] a1fa: even in the blog/guide he has it as customer.name
[02:22:28] k1t: has joined #RubyOnRails
[02:22:58] a1fa: tjbiddle: which funny. i'm able to read it from correct table
[02:23:03] a1fa: using customer.name
[02:23:14] a1fa: just when it comes to setting the values, no update occurs
[02:24:07] fgo: has joined #RubyOnRails
[02:24:13] Cache_Money: has joined #RubyOnRails
[02:24:43] sonofdirt: has joined #RubyOnRails
[02:28:25] a1fa: tjbiddle: no update statement occurs when i change the specific delegated entries
[02:28:49] tjbiddle: a1fa: Are you saving the object?
[02:28:52] theery: has joined #RubyOnRails
[02:29:03] a1fa: .Update()
[02:29:12] a1fa: with parms
[02:29:33] a1fa: does this only work on .save?
[02:29:40] mheld: has joined #RubyOnRails
[02:29:40] tjbiddle: .update_attributes()? Ensure that your parameters are whitelisted and passed correctly
[02:29:52] tjbiddle: Test in console first
[02:30:23] a1fa: they should be whitelisted, they worked prior to delegation :)
[02:30:30] a1fa: i'll double check
[02:32:37] a1fa: whitelisted, and i am basically using .Update(params)
[02:33:08] jholm: has joined #RubyOnRails
[02:37:15] a1fa: hm, documentation doesnt say anything about =
[02:37:17] LambdaSource: has joined #RubyOnRails
[02:37:20] a1fa: even the source code is not clear
[02:37:25] a1fa: https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/module/delegation.rb
[02:37:51] mices: havenwood: got everything working now, ty
[02:38:01] mices: got everything working
[02:38:49] annlewis: has joined #RubyOnRails
[02:39:28] LambdaSource: has joined #RubyOnRails
[02:41:23] michael_mbp: has joined #RubyOnRails
[02:42:26] FailBit: I'm so mad
[02:43:04] FailBit: Internet has been down all day
[02:43:12] northfurr: has joined #RubyOnRails
[02:43:18] tjbiddle: FailBit: Well not now, clearly :p
[02:43:51] k1t: has joined #RubyOnRails
[02:44:03] LambdaSource: has joined #RubyOnRails
[02:44:24] jtthedev: has joined #RubyOnRails
[02:47:43] LambdaSource: has joined #RubyOnRails
[02:49:40] tjbiddle: Answer to my previous question regarding nested forms: https://github.com/nathanvda/cocoon
[02:51:39] xcesariox: has joined #RubyOnRails
[02:53:32] sevenseacat: cocoon is awesome.
[02:54:00] moeabdol: has joined #RubyOnRails
[02:54:11] tfitts: cocoon +1
[02:54:21] Aeyrix: HTTP 418 is gone
[02:54:33] Aeyrix: I had a server returning that for ages that was actually a remote shell. :(
[02:55:58] CGibsonmm: has joined #RubyOnRails
[02:58:04] theery: has joined #RubyOnRails
[02:58:49] Rubie: has joined #RubyOnRails
[02:59:48] CGibsonmm: Hey I have a question I am buliding a dating website that is locals only. at this time i am building the comming soon mailer and I want to validate in my User model that at this time only people withen a certin range of zip codes can register. i figured i would validate :zip_code, :in 11111..11190 as example but it is nt working for me
[03:00:53] farkerhaiku: @cgibsonmm is it because your zip code is a string?
[03:01:13] jonr2219: has joined #RubyOnRails
[03:01:50] farkerhaiku: because zip codes should be strings.
[03:02:30] CGibsonmm: I realize that, how in my User validation can i change say 11123.to_s
[03:03:19] drale2k: has joined #RubyOnRails
[03:04:43] tfitts: you could do (11111..11190).to_a.map(&:to_s).include?(zip.first(5))
[03:06:14] ranchodev: has joined #RubyOnRails
[03:07:37] sonofdirt: has joined #RubyOnRails
[03:08:52] GPrime: has joined #RubyOnRails
[03:09:24] braincrash: has joined #RubyOnRails
[03:10:01] havenwood: has joined #RubyOnRails
[03:10:43] tjbiddle: has joined #RubyOnRails
[03:12:45] baweaver: has joined #RubyOnRails
[03:13:02] pecpec: has joined #RubyOnRails
[03:16:14] theery: has joined #RubyOnRails
[03:16:21] zlogan: has joined #RubyOnRails
[03:17:59] JamesDH: has joined #RubyOnRails
[03:19:44] krz: has joined #RubyOnRails
[03:20:21] mary5030: has joined #RubyOnRails
[03:20:53] dopie: has joined #RubyOnRails
[03:23:27] acti0nman: has joined #RubyOnRails
[03:23:28] charliesome: has joined #RubyOnRails
[03:26:22] dopieee: has joined #RubyOnRails
[03:26:42] workmad3: has joined #RubyOnRails
[03:27:04] jonr2219: has joined #RubyOnRails
[03:27:20] djbkd: has joined #RubyOnRails
[03:27:51] krz: has joined #RubyOnRails
[03:29:42] draig: anyone wanna help me get a post working?
[03:29:56] theery: has joined #RubyOnRails
[03:30:13] draig: im trying to curl, but i keep getting that there is no route in the log even though it appears to be set up from the scaffold
[03:30:14] krz: has joined #RubyOnRails
[03:31:01] towski_: has joined #RubyOnRails
[03:32:06] nettoweb: has joined #RubyOnRails
[03:32:48] mcr-credil: has joined #RubyOnRails
[03:33:26] pwnd_nsfw: has joined #RubyOnRails
[03:33:50] tfitts: what's the route?
[03:34:04] pawnbox: has joined #RubyOnRails
[03:34:34] helpa: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[03:34:54] quazimodo: what's the action job default backend?
[03:35:12] quazimodo: i didn't specify anything so i presume it has some limited in memory que system?
[03:35:19] Sigma00: afaik it's immediate execution
[03:35:22] quazimodo: queue, rather
[03:35:31] quazimodo: Sigma00: unless we specify a backend?
[03:35:44] Sigma00: >Rails by default comes with an "immediate runner" queuing implementation. That means that each job that has been enqueued will run immediately.
[03:35:46] Sigma00: http://edgeguides.rubyonrails.org/active_job_basics.html
[03:35:52] smathy_: has joined #RubyOnRails
[03:36:53] draig: code and url incoming
[03:37:10] Maletor: has joined #RubyOnRails
[03:37:14] ebbflowgo: has joined #RubyOnRails
[03:37:17] ebbflowgo: has left #RubyOnRails: ()
[03:38:05] circ-user-ESGHi: has joined #RubyOnRails
[03:38:42] draig: https://gist.github.com/jhoughjr/83c5b2e189f9f608d87d
[03:38:58] draig: updated with the model, controller, form, url curled and output
[03:39:40] draig: everything is from a scaffold except the validation and altering the form
[03:39:45] annlewis: has joined #RubyOnRails
[03:39:55] Sigma00: draig: rake routes please
[03:40:04] Sigma00: or your routes.rb
[03:41:23] draig: cool i updated the gist
[03:41:41] draig: it doesnt seemto show as many routes as the empty root page i have
[03:41:42] cnk: has joined #RubyOnRails
[03:41:55] draig: but post seems to be there for that endpoint
[03:42:35] fedexo: has joined #RubyOnRails
[03:43:11] pawnbox: has joined #RubyOnRails
[03:43:56] pontiki: has joined #RubyOnRails
[03:43:57] Sigma00: actually nevermind, I hadn't seen the error
[03:44:12] w0rd-driven: has joined #RubyOnRails
[03:44:19] Sigma00: this: "Could not resolve host: Accept" makes it seem like your curl command is being misinterpreted
[03:44:21] mcr-credil: has joined #RubyOnRails
[03:44:37] Sigma00: why are the other lines of the command quoted? are you writing literal '>'s?
[03:45:03] draig: im cpying and pasting lol
[03:45:15] draig: editing it in Atom now though
[03:45:36] Sigma00: there should not be any `>`s in the curl command
[03:45:50] duncannz: has joined #RubyOnRails
[03:49:02] draig: ive elimnated them and am using this
[03:49:08] draig: curl -v -X POST -H "Accept: application/json" -H "Content-Type: application/json" -d '{"temperature_reading": {"temperature" : 25, "scale" : "Celsisus"}}'
[03:49:13] adam12: draig: 411 likely means no data posted.
[03:49:17] arathald: has joined #RubyOnRails
[03:49:20] adam12: You'll likely run into CSRF issues next.
[03:49:21] sfr^: has joined #RubyOnRails
[03:49:29] draig: it looks ok but im getting lenght required
[03:49:34] universa1: has joined #RubyOnRails
[03:49:37] draig: whivh would make sense i guess if its not posting data
[03:50:13] Aeyrix: Are you posting?
[03:50:17] Aeyrix: use -F fam
[03:51:20] Aeyrix: oh wait, no don't
[03:51:27] Aeyrix: not if you're doing it that way
[03:51:32] Aeyrix: that curl you've got should work
[03:53:05] n99999i: has joined #RubyOnRails
[03:53:46] banjara: has joined #RubyOnRails
[03:54:20] krz: has joined #RubyOnRails
[03:54:32] fgo: has joined #RubyOnRails
[03:54:36] draig: heh yeah i saw a couple of records
[03:54:46] draig: it seems when i try to post it rolls back the transaction
[03:55:03] moeabdol: has joined #RubyOnRails
[03:56:07] Sigma00: draig: that's because you've typoed Celsius as Celsisus
[03:56:18] draig: curl -v -X POST -H "Accept: application/json" -H "Content-Type: application/json" -d '{"temperature_reading" : {"temperature" : 25, "scale" : "Celsius"}}'
[03:56:27] Sigma00: and you have a validation that checks that
[03:58:24] draig: now i sem to be getting the autenticity issues
[03:58:36] craigphares: has joined #RubyOnRails
[03:58:43] draig: the question is, why would whomever posted two records not have had that
[03:59:38] draig: would authenticty issues reuslt in 411?
[04:00:05] Sigma00: you know you get a very comprehensive output on the rails console right?
[04:02:16] draig: i keep seeing messages about it not being able to render the console and allowed netoworks in the 127 range
[04:02:38] draig: (im developing on a linode atm, hoped to get something for a friend to play with tonight)
[04:03:05] draig: switching to :null_session for protect_from_forgery worked
[04:03:34] pontiki: sorry if this is obvious, rails server defaults to receiving from localhost
[04:05:16] drale2k: has joined #RubyOnRails
[04:06:01] pawnbox: has joined #RubyOnRails
[04:06:01] tfitts: can anyone point me in the right direction on Puma, most of the time it loads almost instantly, but sometimes (frequently after I make a change to code, but not always) it takes like 10-20 seconds before it does anything. It sits there with the route and then waits.
[04:06:15] sonofdirt: has joined #RubyOnRails
[04:07:20] nahtnam: has joined #RubyOnRails
[04:07:21] jeremieberduck: has joined #RubyOnRails
[04:07:23] farkerhaiku: am I reading this right? serve_static_files needs to be true for page caching to work, or for files under /public to be served?
[04:07:49] farkerhaiku: guides.rubyonrails.org/configuring.html
[04:08:59] draig: pontiki yeah, but i used the -b option to bind it to the public ip so it can be accessed from the outside
[04:10:03] draig: but idk how to get to the rails console outside of the <% console %> erb
[04:10:42] farkerhaiku: go to the root of your app and type 'bundle exec rails c'
[04:10:44] pontiki: that's the webconsole thing; i've never worked with that
[04:11:23] pontiki: i just stick pry in where i want to debug
[04:12:46] Bilbo-baggons: has joined #RubyOnRails
[04:13:49] Rubie: has joined #RubyOnRails
[04:13:50] pecpec: has joined #RubyOnRails
[04:14:15] blnkammo: has joined #RubyOnRails
[04:14:18] CanTonic: has joined #RubyOnRails
[04:14:59] jenrzzz: has joined #RubyOnRails
[04:18:19] draig: well i appreciate the help guys. thats a small step towards me figuring this out
[04:18:53] bronson: has joined #RubyOnRails
[04:19:27] tejasmanohar: has joined #RubyOnRails
[04:20:44] sevenseacat: has joined #RubyOnRails
[04:21:21] jholm: has joined #RubyOnRails
[04:22:03] x-light: has joined #RubyOnRails
[04:24:03] erts: has joined #RubyOnRails
[04:28:56] mary5030: has joined #RubyOnRails
[04:29:33] yfeldblum: has joined #RubyOnRails
[04:30:53] michael_mbp: has joined #RubyOnRails
[04:34:55] roxtrongo: has joined #RubyOnRails
[04:37:57] tjbiddle_: has joined #RubyOnRails
[04:38:21] mary5030: has joined #RubyOnRails
[04:40:23] annlewis: has joined #RubyOnRails
[04:42:22] rhizome: ACTION begins svn-git conversion
[04:43:41] fedexo: has joined #RubyOnRails
[04:47:30] melonstorm: has joined #RubyOnRails
[04:52:28] nhhagen: has joined #RubyOnRails
[04:52:33] fgo: has joined #RubyOnRails
[04:52:54] yfeldblum: has joined #RubyOnRails
[04:56:01] moeabdol: has joined #RubyOnRails
[04:56:30] xcesariox: has joined #RubyOnRails
[04:56:37] JohnBat26: has joined #RubyOnRails
[05:02:13] wildlander: has joined #RubyOnRails
[05:03:13] banjara: has joined #RubyOnRails
[05:05:42] x-light: has joined #RubyOnRails
[05:06:05] drale2k: has joined #RubyOnRails
[05:06:36] srinidhi: has joined #RubyOnRails
[05:07:07] mary5030: has joined #RubyOnRails
[05:07:20] fxn: has joined #RubyOnRails
[05:08:06] zlogan: has joined #RubyOnRails
[05:08:15] veg: has joined #RubyOnRails
[05:08:37] chipotle: has joined #RubyOnRails
[05:12:55] pawnbox: has joined #RubyOnRails
[05:14:15] mary5030: has joined #RubyOnRails
[05:14:32] riotjones: has joined #RubyOnRails
[05:14:37] pecpec: has joined #RubyOnRails
[05:15:26] workmad3: has joined #RubyOnRails
[05:17:21] dhjondoh: has joined #RubyOnRails
[05:17:38] IvanLing_: has joined #RubyOnRails
[05:18:58] sandstrom: has joined #RubyOnRails
[05:19:48] rhizome: ok, not fun
[05:20:14] jgladwill: has joined #RubyOnRails
[05:20:50] IvanLing_: has left #RubyOnRails: ()
[05:24:55] jas02: has joined #RubyOnRails
[05:26:34] roadt: has joined #RubyOnRails
[05:29:48] JohnBat26: has joined #RubyOnRails
[05:30:39] Rubie: has joined #RubyOnRails
[05:31:31] mary5030: has joined #RubyOnRails
[05:32:04] tagrudev: has joined #RubyOnRails
[05:32:25] CanTonic: has joined #RubyOnRails
[05:32:51] LambdaSource: has joined #RubyOnRails
[05:33:58] codenapper: has joined #RubyOnRails
[05:34:47] DeweyD: has joined #RubyOnRails
[05:35:12] aganov: has joined #RubyOnRails
[05:37:45] blnkammo: has joined #RubyOnRails
[05:39:59] moeabdol: has joined #RubyOnRails
[05:40:19] dhjondoh: has joined #RubyOnRails
[05:41:09] annlewis: has joined #RubyOnRails
[05:44:02] wildlander: has joined #RubyOnRails
[05:46:08] shinnya: has joined #RubyOnRails
[05:48:07] DeweyD: has joined #RubyOnRails
[05:52:11] nya: has joined #RubyOnRails
[05:52:44] blnkammo: has joined #RubyOnRails
[05:53:35] nhhagen: has joined #RubyOnRails
[05:54:25] mcr-credil: has joined #RubyOnRails
[05:54:31] n008f4g_: has joined #RubyOnRails
[05:55:57] kimegede: has joined #RubyOnRails
[05:56:40] KensoDev: has joined #RubyOnRails
[05:57:19] TomyLobo: has joined #RubyOnRails
[05:57:41] zlogan: has joined #RubyOnRails
[06:00:51] jonr22: has joined #RubyOnRails
[06:01:01] oldbay: has joined #RubyOnRails
[06:03:04] wildlander: has joined #RubyOnRails
[06:05:31] kiki_lamb: has joined #RubyOnRails
[06:05:33] eGGsha: has joined #RubyOnRails
[06:06:51] drale2k: has joined #RubyOnRails
[06:08:00] Macaveli: has joined #RubyOnRails
[06:09:32] jholm: has joined #RubyOnRails
[06:12:33] w0rd-driven: has joined #RubyOnRails
[06:15:22] pecpec: has joined #RubyOnRails
[06:17:24] riotjones: has joined #RubyOnRails
[06:19:32] ascarter: has joined #RubyOnRails
[06:20:23] CheckYourSix: has joined #RubyOnRails
[06:20:59] comrad: has joined #RubyOnRails
[06:21:33] riotjones: has joined #RubyOnRails
[06:22:23] mcr-credil: has joined #RubyOnRails
[06:24:00] k1t: has joined #RubyOnRails
[06:24:18] k1t: has joined #RubyOnRails
[06:26:54] solars: has joined #RubyOnRails
[06:28:42] sinkensabe: has joined #RubyOnRails
[06:29:23] moeabdol: has joined #RubyOnRails
[06:35:15] sandstrom: has joined #RubyOnRails
[06:36:14] sinkensabe: has joined #RubyOnRails
[06:39:02] yardenbar: has joined #RubyOnRails
[06:41:54] annlewis: has joined #RubyOnRails
[06:41:59] Balzrael: has joined #RubyOnRails
[06:42:00] mary5030: has joined #RubyOnRails
[06:43:10] jsvgoncalves: has joined #RubyOnRails
[06:45:35] ruurd: has joined #RubyOnRails
[06:46:04] Balzrael: hello and a good morning
[06:46:57] arup_r: has joined #RubyOnRails
[06:47:17] Linuus: has joined #RubyOnRails
[06:47:27] JamesDH: has joined #RubyOnRails
[06:48:26] dopamean1: has joined #RubyOnRails
[06:51:28] nhhagen: has joined #RubyOnRails
[06:52:18] arup_r: Nothing.. Just swiped my card in this channel..
[06:53:34] johnflux: has joined #RubyOnRails
[06:54:04] greenarrow: has joined #RubyOnRails
[06:56:08] zpe: has joined #RubyOnRails
[07:01:09] finnnnnnnnnnn: has joined #RubyOnRails
[07:04:14] workmad3: has joined #RubyOnRails
[07:07:29] alphaatom: has joined #RubyOnRails
[07:09:25] sandstrom: has joined #RubyOnRails
[07:09:42] pecpec: has joined #RubyOnRails
[07:09:44] braincrash: has joined #RubyOnRails
[07:12:04] neutrino: has joined #RubyOnRails
[07:13:29] drale2k: has joined #RubyOnRails
[07:14:09] MartinElvar: has joined #RubyOnRails
[07:14:48] darutoko: has joined #RubyOnRails
[07:17:04] dopamean_: has joined #RubyOnRails
[07:20:08] tjbiddle: has joined #RubyOnRails
[07:23:07] RTG`: has joined #RubyOnRails
[07:23:18] finnnnnnnnnnn: has joined #RubyOnRails
[07:23:23] LambdaSource: has joined #RubyOnRails
[07:23:43] john: has joined #RubyOnRails
[07:27:06] blnkammo: has joined #RubyOnRails
[07:30:07] moeabdol: has joined #RubyOnRails
[07:31:55] srinidhi1: has joined #RubyOnRails
[07:32:05] artto: has joined #RubyOnRails
[07:32:06] konsolebox: has joined #RubyOnRails
[07:32:16] Spami: has joined #RubyOnRails
[07:32:20] ascarter: has joined #RubyOnRails
[07:35:21] pawnbox_: has joined #RubyOnRails
[07:35:32] moeabdol: has joined #RubyOnRails
[07:35:58] inspectah_stack: has joined #RubyOnRails
[07:39:43] zlogan85: has joined #RubyOnRails
[07:40:14] DoubleMalt: has joined #RubyOnRails
[07:42:40] annlewis: has joined #RubyOnRails
[07:43:01] walidvb: has joined #RubyOnRails
[07:44:55] jeremieberduck: has joined #RubyOnRails
[07:48:09] krz: has joined #RubyOnRails
[07:48:23] jsvgoncalves: has joined #RubyOnRails
[07:48:40] robbyoconnor: has joined #RubyOnRails
[07:48:47] robbyoconnor: has joined #RubyOnRails
[07:49:43] srinidhi: has joined #RubyOnRails
[07:52:58] uchihaitachi08: has joined #RubyOnRails
[07:53:07] lipoqil: has joined #RubyOnRails
[07:54:01] walidvb: has joined #RubyOnRails
[07:54:18] walidvb: hey guys, i'm having issues running my app in production(first time i host it myself, too)
[07:55:03] walidvb: i'm running rails 4.1.6, and am trying to use mysql2 db adapter, but i keep getting this error:
[07:55:04] walidvb: 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)
[07:56:03] tbuehlmann: walidvb, I read something like this yesterday in here. what version of mysql2 are you using/declaring in your gemfile?
[07:56:05] arup_r: walidvb: error is ?
[07:56:52] walidvb: tbuehlmann: https://gist.github.com/walidvb/1caf4d83cdd9e5f81161
[07:57:02] walidvb: 0.3 (but same with 0.4)
[07:57:38] nhhagen: has joined #RubyOnRails
[07:57:44] walidvb: arup_r: error is the gem is not loaded.
[07:57:49] jholm: has joined #RubyOnRails
[07:59:59] walidvb: tbuehlmann: at some point i felt it was because i had both pg AND mysql2 in the gemfile, but have now isolated both in :development and :production, respectively
[08:00:32] marr: has joined #RubyOnRails
[08:01:06] Janno: so you are using pg in production? Did you update database.yml to use it on production?
[08:01:45] jenrzzz: has joined #RubyOnRails
[08:02:02] walidvb: janno: i'm not, no
[08:03:23] walidvb: janno: this is my repo: https://github.com/walidvb/alice/tree/prod
[08:04:06] walidvb: tbuehlmann: ^
[08:05:28] krisquigley: has joined #RubyOnRails
[08:05:44] Janno: are you sure you are running your app on production mode?
[08:05:50] mikecmpbll: has joined #RubyOnRails
[08:06:14] Janno: well probably, if its trying to load mysql2
[08:07:07] jsrn_: has joined #RubyOnRails
[08:07:15] walidvb: RAILS_ENV=production rails s, right? ^^
[08:07:21] moeabdol: has joined #RubyOnRails
[08:09:07] Janno: you probably need to run bundle install in production mode
[08:09:24] Janno: I feel its not loading gems inside production group currently
[08:09:59] walidvb: i tried: bundle install --deployment, as well as RAILS_ENV=production bundle install
[08:10:14] walidvb: (i just realize i haven't specified the mysql host, which is not localhost
[08:10:19] walidvb: will update now
[08:10:42] naftilos76: has joined #RubyOnRails
[08:11:11] adre: has joined #RubyOnRails
[08:12:51] walidvb: janno: no, tried again, no luck...
[08:13:06] walidvb: not sure what the --no-deployment and --deployment switches do exactly?
[08:13:57] universa1: walidvb: deployment should install the gems locally into the directory you're currently in, --no-deployment will install them quite similar to what a gem install does.
[08:14:07] tbuehlmann: just to be safe: can you remove the .bundle directory and run `$ bundle install` again?
[08:14:13] universa1: walidvb: ^^ +1 ;)
[08:15:01] walidvb: tbuehlmann: then?
[08:15:14] tbuehlmann: then try again
[08:15:24] walidvb: in prod, right?
[08:15:42] walidvb: same error
[08:16:07] mices: where can i see all the attributes of an email object
[08:16:13] tbuehlmann: what's in your Gemfile.lock?
[08:16:26] michael_mbp: has joined #RubyOnRails
[08:16:38] mices: a listing like subject, to, body ...
[08:16:40] universa1: walidvb: can you gist the terminal output?
[08:16:54] kitsuneyo: has joined #RubyOnRails
[08:17:11] universa1: mices: object.class -> look it up in the api documentation / mail gem documentation ;)
[08:17:18] pawnbox: has joined #RubyOnRails
[08:17:27] universa1: mices: object.methods.sort and object.methods(false).sort
[08:17:37] walidvb: universa1: https://gist.github.com/walidvb/1caf4d83cdd9e5f81161
[08:18:26] mices: universa1: what's false do?
[08:18:55] universa1: mices: it should only show methods directly defined in the class, not inherited ones. (iirc)
[08:19:39] walidvb: added database.yml to gist: https://gist.github.com/walidvb/1caf4d83cdd9e5f81161
[08:19:56] tvw: has joined #RubyOnRails
[08:20:17] universa1: ok, so you did: rm -rf .bundle; rm -rf vendor/bundle; bundle ?
[08:20:34] walidvb: no i didn't rm vendor/bundle
[08:20:38] walidvb: will do now, yes?
[08:20:53] universa1: ok, show the output of those commands too please ;)
[08:21:11] walidvb: hah! i see vendor/bundle/ has 2.1.0, whereas my app uses 2.1.5
[08:22:06] walidvb: universa1: https://gist.github.com/walidvb/d186a5c66ecd585461e6
[08:22:24] AzaToth: has joined #RubyOnRails
[08:23:16] universa1: walidvb: ok.
[08:23:33] universa1: walidvb: bundle exec rails s -e production
[08:24:47] ascarter: has joined #RubyOnRails
[08:24:50] walidvb: universa1: (fyi: i can use mysql and connect to the server using the credentials i give database.yml, if this makes any difference)
[08:25:59] universa1: walidvb: it's not a credentials error. just cloned your repo.
[08:26:23] universa1: but good to know that they work :-)
[08:26:30] walidvb: (don't look at the code too much, had to finish in a _big_ rush)
[08:27:48] exadeci: has joined #RubyOnRails
[08:29:35] djbkd: has joined #RubyOnRails
[08:30:11] walidvb: i'm totally up to chaning rails version if it works in another version, need to get this up asap
[08:32:42] miguelff: has joined #RubyOnRails
[08:33:02] ascarter: has joined #RubyOnRails
[08:33:02] jgt1: has joined #RubyOnRails
[08:33:19] roxtrongo: has joined #RubyOnRails
[08:33:55] Janno: did you check that vendor/bundle contains mysql2 gem installed?
[08:34:16] Janno: and does .bundle/config path to vendor/bundle ?
[08:34:20] walidvb: there is no such folder, i removed it
[08:34:32] universa1: janno: i'm reproducing the error locally
[08:34:55] universa1: janno: and yes, the folder is there and bundle install lists it as installed.
[08:36:20] sinkensabe: has joined #RubyOnRails
[08:36:54] walidvb: should running "bundle" create that folder? (it didn't, after i rm'd it)
[08:38:53] walidvb: universa1: i'm getting a slightly different error on my local machine, btw:
[08:39:03] walidvb: .../Alice/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require': dlopen(/Users/gaston/Sites/Alice/vendor/bundle/ruby/2.1.0/extensions/x86_64-darwin-14/2.1.0-static/mysql2-0.4.0/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib (LoadError)
[08:39:12] universa1: walidvb: no, just bundle will not create it
[08:39:19] universa1: walidvb: only if you run bundle with the --deployment flag
[08:39:23] drale2k: has joined #RubyOnRails
[08:39:27] walidvb: (can't see why it says 2.1.0 though? )
[08:39:29] walidvb: universa1: ok
[08:39:47] universa1: all 2.1.x versions will install gems in 2.1.0
[08:41:09] universa1: walidvb: need to finish local installation of mysql server
[08:41:45] walidvb: thanks a bunch, universa1. spent the most part of yesterday trying to figure this out, with no luck
[08:42:42] K0nserv-: has joined #RubyOnRails
[08:43:24] annlewis: has joined #RubyOnRails
[08:43:48] mcr-credil: has joined #RubyOnRails
[08:44:29] universa1: walidvb: might have found the fix ;)
[08:46:16] universa1: walidvb: https://github.com/brianmario/mysql2/issues/675 -- restrict mysql2 to 0.3.18: gem 'mysql2', '~> 0.3.18'
[08:46:40] universa1: walidvb: 0.4.0 will not work ;) and it has been released yesterday (chuckle)
[08:46:58] walidvb: tried with 0.3.7, though, also didn't work
[08:47:08] walidvb: didn't find this issue when i googled, though.
[08:47:19] walidvb: should've went straight to the gem repo
[08:47:33] merlinp: has joined #RubyOnRails
[08:47:50] universa1: walidvb: well, i created a new blank rails app without any changes, and there it didn't work either... so i was set off by that.
[08:48:00] walidvb: fair enough
[08:48:04] kitsuneyo: has joined #RubyOnRails
[08:48:44] walidvb: now i need to figure out the rest of self-hosting an app, but that's a good start already!
[08:48:53] universa1: so this was fun *cough* ;)
[08:49:24] walidvb: hey again, thanks a lot, this really helped!
[08:50:25] charliesome: has joined #RubyOnRails
[08:51:22] yfeldblum: has joined #RubyOnRails
[08:52:59] srinidhi: has joined #RubyOnRails
[08:53:24] pontiki: has joined #RubyOnRails
[08:53:54] ascarter: has joined #RubyOnRails
[08:55:51] jgt1: has joined #RubyOnRails
[08:57:47] kitsuneyo: has joined #RubyOnRails
[08:59:07] ascarter: has joined #RubyOnRails
[09:00:35] kitsuneyo: has joined #RubyOnRails
[09:01:09] jonr22: has joined #RubyOnRails
[09:01:25] sg19: has joined #RubyOnRails
[09:02:01] sg19: How can i override error messages on validation?
[09:02:13] DEA7TH: has joined #RubyOnRails
[09:02:16] pontiki: sg19: with message:
[09:03:37] sg19: pontiki with message i still get name of the field which is not user friendly
[09:03:54] ascarter: has joined #RubyOnRails
[09:03:59] sg19: universa1 you mean using locales?
[09:04:30] universa1: sg19: the i18n facilities of rails can be used to change the messages, and the format of the messages, etc...
[09:04:36] universa1: format as in what text is there ,)
[09:04:44] universa1: not the actual formatting ;)
[09:04:49] sg19: okay. i will check. thanks
[09:04:50] arup_r: has joined #RubyOnRails
[09:05:16] universa1: sg19: http://guides.rubyonrails.org/i18n.html#translations-for-active-record-models
[09:06:06] pontiki: you can definitely change the friendly name of the field with i18n
[09:08:07] rails690: has joined #RubyOnRails
[09:08:15] sg19: universa1 already there :D
[09:08:31] rails690: need help with Globalize gem
[09:08:35] liquid-silence: has joined #RubyOnRails
[09:08:38] universa1: sg19: :thumbsup: -- was looking at the wrong guide first ;)
[09:08:38] rails690: anyone ready to help?
[09:08:42] liquid-silence: has joined #RubyOnRails
[09:08:51] universa1: rails690: !rules -- just for clarification, no offense meant ;)
[09:08:51] helpa: rails690: https://gist.github.com/996779
[09:09:14] liquid-silence: has anyone here used the sync gem, I am currently trying to re-render a partial of partials when a change happens to a model
[09:09:15] rails690: yeah ive tried googling
[09:09:34] universa1: liquid-silence: !anyone
[09:09:34] helpa: liquid-silence: Nope. No one. Ever. In the history of the world.
[09:09:57] rails690: the problem with Globalize, is it expects me to translate every single model. But what i want to do is just translate 1 word that is used on the same field for every single Person instance
[09:10:29] liquid-silence: but it seems by passing in something like = sync partial: 'annotations', collection: @annotations, scope: @asset tries to render the the incorrect way, the _annotations partial renders multiple _annotation partials
[09:10:32] rails690: kind of like a global translation that, such and such word = this, so everywhere it is found, translate it
[09:10:41] ascarter: has joined #RubyOnRails
[09:10:41] liquid-silence: @universa1 if you would just have waited for a second
[09:10:45] universa1: rails690: so do not use globalize, but use plain default rails i18n, which allows the translation for values of fields
[09:10:59] universa1: liquid-silence: !spacenotenter (chuckle) ;)
[09:10:59] helpa: liquid-silence: The enter key should not be used as a space bar. Lines on IRC can be up to 400 characters long.
[09:11:03] rails690: that doesnt translate fields in the database tho
[09:11:30] rails690: for example, if i translate "Married", and then I change the language, then save, the model will now have the spanish word for marriage in the database
[09:11:56] liquid-silence: so universa1 any idea
[09:12:11] rails690: and if i try to display it, it will not display in english when my locale=english, it will display in spanish
[09:12:12] universa1: rails690: hmm, i'd use an enum like field from rails 4.2, and then translating is easy.
[09:12:51] rails690: how would i use an enum in this case?
[09:12:54] universa1: rails690: so your database ends up with a 0 (zero) for married, a 1 (one) for single, ...
[09:13:24] universa1: rails690: enum :relationship, [married: 0, single: 1, open_relationship: 2, polygamous: 3]
[09:13:43] universa1: rails690: http://api.rubyonrails.org/v4.1.0/classes/ActiveRecord/Enum.html
[09:13:52] universa1: http://api.rubyonrails.org/v4.2.0/classes/ActiveRecord/Enum.html
[09:13:52] pontiki: could have fun with that...
[09:14:21] universa1: liquid-silence: !code ;)
[09:14:21] helpa: liquid-silence: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[09:14:39] liquid-silence: @universa1 but I explained it pretty nicely
[09:14:45] gavit: anyone know if you can send PCL commands to a client wanting to print some content on your page?
[09:15:38] universa1: liquid-silence: i've never used the sync gem, but i'm usually good at spotting errors if i actually see the full code with the generated output, the error / a description of the expected output.
[09:15:45] rails690: wait how would i map t('married') to the integer
[09:16:41] neutrino: has left #RubyOnRails: ()
[09:16:42] pontiki: use the symbol
[09:17:05] pontiki: you may want to use the scope: param as well
[09:17:58] rails690: has left #RubyOnRails: ()
[09:20:20] workmad3: has joined #RubyOnRails
[09:20:37] gavit: guess noone knows
[09:20:37] liquid-silence: https://gist.github.com/jeanres/3b09dc651723c455a47e, so when I create a new annotation, it never updates the annotations partial
[09:21:19] pontiki: PCL: Printer Control Language??
[09:22:06] quazimodo: So the rails guys are thinking bout going balls deep into Celluloid ecosystem for action cable
[09:22:10] quazimodo: sounds like a good plan
[09:24:02] quazimodo: ACTION clones happily to read source :D
[09:24:40] Bilbo-baggons: has joined #RubyOnRails
[09:25:08] liquid-silence: universa1 the console should output rendering sync/assets/_annotations.html.haml
[09:25:10] liquid-silence: but it does not
[09:25:25] andywww: has joined #RubyOnRails
[09:25:58] workmad3: has joined #RubyOnRails
[09:26:50] charliesome: has joined #RubyOnRails
[09:27:59] liquid-silence: and universa1 if I do = sync partial: 'annotations', collection: @asset.annotations, then I get some weird effects, where the _annotations.html.haml partial has not idea what asset is because it is obviously rendering the _annotations.html.haml partial more than once
[09:28:02] andywww: i???m working on a mixins module to be used in a class which inherits from Prawn::Document. From a best practices standpoint, how should i use the prawn classes methods in the module? Is it safe to just assume they???re available or would it be better to pass it in as a parameter and use it that way?
[09:28:47] liquid-silence: universa1 when the collection: param is passed it things that the partial is in singular for
[09:29:04] liquid-silence: so it renders the _annotations.html.haml for each annotation
[09:29:36] liquid-silence: the only thing I can think of is to change the way I render the annotations
[09:29:56] yashinbasement: has joined #RubyOnRails
[09:32:05] losvedir: has joined #RubyOnRails
[09:32:12] losvedir: has left #RubyOnRails: ()
[09:34:21] sg19: has joined #RubyOnRails
[09:34:25] roxtrongo: has joined #RubyOnRails
[09:36:08] toomus: has joined #RubyOnRails
[09:36:18] maz-dev: has joined #RubyOnRails
[09:36:19] levifig: has joined #RubyOnRails
[09:38:07] toomus: I have something like this: User.where("name LIKE %:query%", { query: params[:query] })
[09:38:53] Bilbo-baggons_: has joined #RubyOnRails
[09:39:29] toomus: But don't know why generated query looks like: SELECT `users`.* FROM `users` WHERE name LIKE %'some_name'%
[09:40:14] toomus: Why quotes in %'some_name'% ??
[09:41:34] chridal: For model name: Resident or Residency? What do you guys think?
[09:41:40] chridal: Sophies choice over here...
[09:41:53] universa1: toomus: prevention for sql insertion attacaks.
[09:42:07] universa1: liquid-silence: sorry, had a meeting with my prof ;)
[09:42:24] toomus: universa1: ok, so how this query should looks like?
[09:42:30] mercerist: has joined #RubyOnRails
[09:42:46] chridal: The model basically have two columns `user_id` and `room_id`. Oh, and a terminated_at date. So it represent residencies in rooms.
[09:42:51] universa1: toomus: http://stackoverflow.com/questions/19105706/rails-4-like-query-activerecord-adds-quotes
[09:42:56] Macaveli: has joined #RubyOnRails
[09:43:04] Linuus: has joined #RubyOnRails
[09:43:40] Macaveli: has joined #RubyOnRails
[09:43:54] liquid-silence: universa1 no worries
[09:44:10] liquid-silence: but I am not sure this is solvable without changing the sync gem
[09:44:11] annlewis: has joined #RubyOnRails
[09:44:57] artto: has joined #RubyOnRails
[09:44:57] universa1: liquid-silence: hmm, your annotation partial needs a root tag: https://github.com/chrismccord/sync#current-caveats
[09:45:38] jenrzzz: has joined #RubyOnRails
[09:45:50] w0rd-driven: has joined #RubyOnRails
[09:46:00] liquid-silence: @universa1 it does
[09:46:10] jholm: has joined #RubyOnRails
[09:46:18] zlogan85: has joined #RubyOnRails
[09:46:41] Bilbo-baggons: has joined #RubyOnRails
[09:46:57] dideler: has joined #RubyOnRails
[09:47:15] universa1: liquid-silence: and just guessing, my guess would be you want: render partial: 'annotiations'; and inside: syn partial: 'annotiation', resource: annotiation; and your annotiation partial should probably start with %li.stacked-annotation...
[09:47:15] liquid-silence: I think the _annotations partial should be removed
[09:47:54] liquid-silence: yeah but the problem with that is that I call transformed_annotations on the asset
[09:47:59] liquid-silence: so that I can render in order
[09:48:04] liquid-silence: I dont just want to render on annotation
[09:48:10] liquid-silence: I want to re-render all the annotations
[09:48:25] liquid-silence: because it needs to recalculate the stacking and postions
[09:48:27] universa1: liquid-silence: ok, so you don't want to sync the annoation, you want to sync the asset
[09:49:01] liquid-silence: this is what am doing currently now
[09:49:28] liquid-silence: = sync partial: 'annotations', resource: @asset, and in the controller I am doing the following, ync_update @asset, partial: 'annotations'
[09:49:48] liquid-silence: but its not displaying the new annotations that I have created, even though the asset.annotations.count increases
[09:50:00] sg19: has left #RubyOnRails: ()
[09:51:50] universa1: liquid-silence: ok, then my guess would be you need to call something like: sync_new @asset in your controller
[09:51:50] universa1: liquid-silence: and not sync_new annotation
[09:51:55] universa1: liquid-silence: i would need to set up an actual project and play around with it more ;)
[09:52:25] universa1: liquid-silence: hmm, do you load @asset before creating the new annotation?
[09:52:27] sloggerkhan: has joined #RubyOnRails
[09:52:33] universa1: liquid-silence: @asset.reload before the sync call?
[09:54:38] srinidhi: has joined #RubyOnRails
[09:58:19] charliesome: has joined #RubyOnRails
[09:59:28] Cervajz: has joined #RubyOnRails
[10:01:44] bkxd: has joined #RubyOnRails
[10:01:49] Cervajz_: has joined #RubyOnRails
[10:02:13] Ergo: has joined #RubyOnRails
[10:03:11] toomus: universa1: now I have '%johnny%'
[10:03:27] universa1: toomus: ok?
[10:03:31] toomus: universa1: nope
[10:03:48] toomus: universa1: still quotes, but this time in other place
[10:04:58] toomus: User.where("name LIKE :query", { query: "%#{params[:query]}%" })
[10:05:06] universa1: toomus: soo?
[10:05:38] toomus: universa1: This query returns MySQL error
[10:05:55] universa1: toomus: code + error => gist
[10:06:26] bronson: has joined #RubyOnRails
[10:08:03] arup_r: How would you update while filtering with .where .. update_attribute just don't work. https://gist.github.com/aruprakshit/c05f08e170671fa9d710
[10:08:33] universa1: arup_r: update_all
[10:08:48] arup_r: That is SQL delete.. Any other choice
[10:08:53] liquid-silence: @universa1 I do @asset = annotation.asset
[10:09:22] universa1: arup_r: where is update_all an sql delete?!
[10:09:47] universa1: arup_r: Conversation.where(whatever_conditions).update_all some_attribute: "foobar"
[10:10:05] arup_r: :) confused with delete_all :)
[10:11:17] arup_r: universa1: What I meant is -- "this method constructs a single SQL UPDATE statement and sends it straight to the database. It does not instantiate the involved models and it does not trigger Active Record callbacks."
[10:11:18] liquid-silence: universa1 that should reload the asset in any event
[10:11:23] arup_r: I have callbacks
[10:11:44] arup_r: update_all do the SQL query.. and it wouldn't run any callbacks
[10:11:53] universa1: arup_r: so iterate over your stuff
[10:12:07] arup_r: humm.. No direct stuff.. ok
[10:14:04] liquid-silence: universa1 yeah this is going to be a pain in my ass
[10:14:24] universa1: liquid-silence: hmm, did you try with an explicit @asset.reload ?
[10:14:40] liquid-silence: the asset is the updated asset
[10:14:50] liquid-silence: but I dont see the annotations partial reloading
[10:15:14] mostlybadfly: has joined #RubyOnRails
[10:15:18] universa1: liquid-silence: ok :-) might try it after lunch, though not directly relevant for me now, this is somewhat interesting for one project
[10:15:25] universa1: liquid-silence: you see other partials reloading?
[10:15:41] universa1: liquid-silence: so does the sync stuff work at all ;)
[10:15:41] liquid-silence: @universa1 what is weird though
[10:15:53] liquid-silence: is that my create.js.erb is not alerting
[10:16:08] liquid-silence: even though its saying it is being renderedc
[10:16:22] xcesariox: has joined #RubyOnRails
[10:16:30] liquid-silence: @universa1 the sync stuff works, have it in some other places
[10:16:34] stamina: has joined #RubyOnRails
[10:16:40] universa1: liquid-silence: errors in the browser console?
[10:16:44] universa1: liquid-silence: ok :-)
[10:16:53] universa1: just checking the big, obvious ones ;)
[10:17:50] liquid-silence: @universa1 can I pm, paste something to you?
[10:18:01] liquid-silence: and we keep the conversation here
[10:18:14] universa1: liquid-silence: ok
[10:19:54] w0rd-driven: has joined #RubyOnRails
[10:19:55] xylotism: has joined #RubyOnRails
[10:20:19] rickmasta: has joined #RubyOnRails
[10:20:25] quazimodo: has joined #RubyOnRails
[10:20:54] arBmind: has joined #RubyOnRails
[10:22:29] xylotism: has joined #RubyOnRails
[10:23:29] xylotism: has joined #RubyOnRails
[10:24:05] universa1: liquid-silence: ok, this looks like it's rendering something.
[10:24:17] srinidhi: has joined #RubyOnRails
[10:24:20] universa1: but something is interacting with your form
[10:26:24] universa1: liquid-silence: i think i have some time after lunch, which is about now ;) to create a demo application and try something in the lines of your problem :-)
[10:26:54] liquid-silence: @universa1 that would be appreciated
[10:27:32] liquid-silence: ah universa1 I think I have an idea
[10:27:33] xylotism: Hey guys... I'm new to Rails. I've got a basic understanding of Ruby and wanted to bring that onto a web platform, but I was wondering where I could find a good explanation for the bundle/rake/routes business? I can't wrap my head around it.
[10:27:40] liquid-silence: removed all annotations, created only 1
[10:27:56] alex88: has joined #RubyOnRails
[10:28:02] liquid-silence: I see it saying, Rendered annotations/_annotation.html.haml (2.7ms)
[10:28:02] liquid-silence: Rendered sync/assets/_annotations.html.haml (9.8ms)
[10:28:02] liquid-silence: Rendered annotations/create.js.erb (0.0ms)
[10:28:49] liquid-silence: with two annotations I see the exact thing
[10:28:58] liquid-silence: but redering annotations/_annotation twice
[10:29:07] liquid-silence: but alas nothing on the screen
[10:29:35] patrick_star: xylotism: https://www.railstutorial.org/book
[10:29:38] patrick_star: http://www.amazon.com/Agile-Development-Rails-Facets-Ruby/dp/1937785564/ref=sr_1_1?ie=UTF8&qid=1441794566&sr=8-1&keywords=rails+book
[10:30:41] xylotism: Great, thanks, I appreciate it.
[10:32:27] artto: has joined #RubyOnRails
[10:32:42] Macaveli: has joined #RubyOnRails
[10:34:35] bkxd_: has joined #RubyOnRails
[10:34:54] yardenbar: has joined #RubyOnRails
[10:38:29] sysrex: has joined #RubyOnRails
[10:42:21] Bilbo-baggons: has joined #RubyOnRails
[10:44:46] rodfersou: has joined #RubyOnRails
[10:44:57] annlewis: has joined #RubyOnRails
[10:45:22] turbo_MaCk: has joined #RubyOnRails
[10:46:49] artto: has joined #RubyOnRails
[10:47:11] jsvgoncalves: has joined #RubyOnRails
[10:47:45] bmurt: has joined #RubyOnRails
[10:53:27] poli: has joined #RubyOnRails
[10:55:40] sg19: has joined #RubyOnRails
[10:55:56] sg19: any gem for building a timetable?
[11:00:23] zpe: has joined #RubyOnRails
[11:01:23] maz-dev: has joined #RubyOnRails
[11:01:46] zlogan85: has joined #RubyOnRails
[11:03:06] liquid-silence: @universa1 so it says its rendering
[11:03:09] liquid-silence: but it aint really
[11:03:56] sevenseacat: has joined #RubyOnRails
[11:04:58] liquid-silence: @universa1 now the question is should I just move to using rails 5 and action cable?
[11:04:59] greenarrow: has joined #RubyOnRails
[11:06:13] sevenseacat: anyone using rails 5 now is gonna have a bad time
[11:07:45] Linuus: has joined #RubyOnRails
[11:09:06] liquid-silence: sevenseacat I know this :(, but this issue is taking too much time
[11:10:12] liquid-silence: I dont understand how the rails console can say render 'partial' 6 times but the UI still only shows 5
[11:10:43] liquid-silence: where the hell is it rendering too
[11:16:47] tvw: has joined #RubyOnRails
[11:17:48] dhjondoh: has joined #RubyOnRails
[11:17:55] fgo: has joined #RubyOnRails
[11:19:22] maz-dev: has joined #RubyOnRails
[11:19:44] allcentury: has joined #RubyOnRails
[11:19:47] universa1: liquid-silence: :-)
[11:20:15] greenarrow: has joined #RubyOnRails
[11:21:09] jgt1: has joined #RubyOnRails
[11:21:15] liquid-silence: @universa1 this is a mind fuck
[11:21:26] universa1: liquid-silence: async stuff usually is ;)
[11:22:01] northfurr: has joined #RubyOnRails
[11:22:09] liquid-silence: its saying its rendering
[11:22:36] doerteDev: has joined #RubyOnRails
[11:23:32] user121212: has joined #RubyOnRails
[11:23:40] drale2k: liquid-silence: are you maybe iterating over a collection and rendering a partial per object ?
[11:24:09] drale2k: if so, are you building an instance of it via .build or .new
[11:24:22] drale2k: that could be your 6th object
[11:24:34] syath: has joined #RubyOnRails
[11:24:35] user121212: hello, I'm planning to read the source of entire rails projects, where from I start reading?
[11:24:47] frzn: has joined #RubyOnRails
[11:24:47] frzn: has joined #RubyOnRails
[11:25:03] universa1: user121212: github.com/rails/rails
[11:25:03] liquid-silence: drale2k yes I am
[11:25:15] liquid-silence: drale2k the issue is
[11:25:22] liquid-silence: it "should" render 6
[11:25:22] turbo_MaCk: has joined #RubyOnRails
[11:25:25] liquid-silence: but I see only 5
[11:25:30] quazimodo: has joined #RubyOnRails
[11:25:37] liquid-silence: even though the rails console is outputting 6 render events
[11:27:12] user121212: universa1: I was confused between the folders like actionmailer, activejob, activesupport etc
[11:27:46] northfurr: has joined #RubyOnRails
[11:27:52] Macaveli: has joined #RubyOnRails
[11:28:05] northfurr_: has joined #RubyOnRails
[11:28:07] jonr22: has joined #RubyOnRails
[11:28:17] universa1: user121212: before reading the complete rails source code i suggest you do at least some toy porjects, to familiarize yourself with the basics of rails. the rest makes sense
[11:28:23] universa1: *makes more sense then
[11:30:26] turbo_MaCk: has joined #RubyOnRails
[11:30:38] fighella: has joined #RubyOnRails
[11:33:32] arup_r: liquid-silence: How are you rendering ? small code please
[11:33:55] quazimodo: has joined #RubyOnRails
[11:34:16] jenrzzz: has joined #RubyOnRails
[11:34:16] arup_r: liquid-silence: Yes
[11:34:26] arup_r: Your issue is fixed ?
[11:34:34] jholm: has joined #RubyOnRails
[11:34:34] liquid-silence: https://gist.github.com/jeanres/3b09dc651723c455a47e
[11:34:59] liquid-silence: that has however changed a little bit now
[11:35:04] alex88: has joined #RubyOnRails
[11:35:11] roxtrongo: has joined #RubyOnRails
[11:35:23] arup_r: ok.. the sync gem :) No idea. I thought vanilla Rails :D
[11:35:26] northfurr_: has joined #RubyOnRails
[11:35:27] pontiki: has joined #RubyOnRails
[11:36:07] banister: has joined #RubyOnRails
[11:37:49] ldnunes: has joined #RubyOnRails
[11:39:01] atzorvas: has joined #RubyOnRails
[11:40:58] turbo_MaCk: has joined #RubyOnRails
[11:45:43] annlewis: has joined #RubyOnRails
[11:49:23] xylotism: has joined #RubyOnRails
[11:50:53] dionysus69: has joined #RubyOnRails
[11:51:44] zlogan85: has joined #RubyOnRails
[11:53:15] Kallis: has joined #RubyOnRails
[11:54:33] Kallis: has joined #RubyOnRails
[11:54:39] nettoweb: has joined #RubyOnRails
[11:55:07] ayonkhan: has joined #RubyOnRails
[11:55:43] ruurd: has joined #RubyOnRails
[11:57:38] bmurt: has joined #RubyOnRails
[11:58:31] tagrudev: has joined #RubyOnRails
[12:01:34] CanTonic: has joined #RubyOnRails
[12:04:25] nzst: has joined #RubyOnRails
[12:06:11] zlogan85: has joined #RubyOnRails
[12:07:30] Macaveli: has joined #RubyOnRails
[12:08:17] someish: has joined #RubyOnRails
[12:09:15] zpe: has joined #RubyOnRails
[12:12:00] aaronr: has joined #RubyOnRails
[12:13:24] chridal: I have `params.require(:access_point).permit(:ap_no, :password)` but I don't want to allow them to submit this request with including `ap_no` and `password`, sort of like not allowing them to submit without nesting them under `access_point`.
[12:13:30] chridal: What are my options on achieving that?
[12:16:10] rickmasta: has joined #RubyOnRails
[12:16:17] arup_r: chridal: You have a form for that right ? Then how are they submitting wrongly ?
[12:16:26] chridal: arup_r: No, it's an API
[12:16:32] arup_r: The params will comes as per the Form design..
[12:16:36] arup_r: Ah.. I see
[12:16:56] chridal: Usually I'd instantiate a model, and then let the model validation lead to a 400
[12:17:14] mcr-credil: has joined #RubyOnRails
[12:17:24] chridal: But I don't want to handle anything like that in the controller, really.
[12:17:24] pawnbox: has joined #RubyOnRails
[12:17:36] chridal: At the design I am using now, that is.
[12:17:47] arup_r: I know the Ansewr
[12:18:03] MaDErroR123: has joined #RubyOnRails
[12:18:03] beauby: has joined #RubyOnRails
[12:18:11] arup_r: chridal: read this doc http://api.rubyonrails.org/classes/ActionController/ParamsWrapper.html
[12:18:36] arup_r: and it will teach you how param wrapping happens and how you will control it
[12:18:42] arup_r: You have a full controll
[12:19:02] fgo: has joined #RubyOnRails
[12:19:03] arup_r: Just read it and come back to me.. if your question not answered.. But READ it
[12:19:35] chridal: arup_r: I don't see how that will solve my issue?
[12:19:51] chridal: That document is concerning how the parameters are actually wrapped. It's not the wrapping that is my issue
[12:20:18] chridal: I just want to validate that the params are actually coming in, and render a 400 if not. This already happens if you do `params.require(:access_point)` and you don't include `:access_point`
[12:20:44] turbo_MaCk: has joined #RubyOnRails
[12:20:46] code1o6: has joined #RubyOnRails
[12:20:48] Fire1o6: has joined #RubyOnRails
[12:21:14] arup_r: chridal: Why you want to nest them.. Let them send and then you wrap it ,, as the link said. Then filter which you want and which you don't want
[12:21:23] chridal: My issue is that the fields I want to 'require' is nested under access_point like so: `{ 'access_point': { 'ap_no': '1', 'password': '1234' } }`. I want to make sure that ap_no and password has been passed without having to get too much into it in the controller action.
[12:21:34] sha1sum: has joined #RubyOnRails
[12:21:37] w0rd-driven: has joined #RubyOnRails
[12:22:02] sha1sum: Is it possible to have a production.log file for untagged log entries and have separate log files for different log entry tags?
[12:22:07] chridal: Ah! So you suggest to just do `params.require(:ap_no)` and `params.require(:password)` and them wrap them myself inside `access_point`?
[12:22:26] atomical: has joined #RubyOnRails
[12:22:49] alex88: has joined #RubyOnRails
[12:23:10] sha1sum: arup_r: sorry, who was that meant for?
[12:23:50] arup_r: I meant if you do wrap_parameters :access_point, and let them send data inside the params and then rails will wrap it inside the access_point for you
[12:23:51] arup_r: chridal: ^^
[12:24:03] arup_r: And then you handle what to take and what to not
[12:24:10] arup_r: makes sense ?
[12:24:17] chridal: Well, how does that lead to the 400?
[12:24:29] chridal: I want to use the same 400 that params.require(:access_point) triggers
[12:24:32] arup_r: sha1sum: no idea what you said me :D
[12:24:33] chridal: I don't want to render the 400 myself
[12:24:46] chridal: The wrapping of the parameters is not the issue at all
[12:24:54] chridal: It's the 400 that I want to render w/o having to do it in the action.
[12:25:08] arup_r: Just try what I said and see what happens.
[12:25:21] Bilbo-baggons: has left #RubyOnRails: ()
[12:25:34] nzst: What toolchain is doing application deployment 'right'? I'm having an awful time finding a workable toolset
[12:26:48] greenarrow: If i wanted to have a local gem within my rails app whats the best folder to put it lib/ ?
[12:27:31] arup_r: chridal: Why are you stressing on 400 ? Because if they don't ass root params.. Right ?
[12:28:19] chridal: That won't solve my issue. I'm going with another solution now: actually checking that the params are being passed, and rendering a 400 if not.
[12:28:23] nzst: greenarrow: I think lib is good
[12:28:27] a1fa: has anyone uses delegations successfully with activerecord?
[12:28:55] arup_r: a1fa: yes
[12:29:48] a1fa: well, for some reason, i cant get my updates to work
[12:29:49] arup_r: chridal: You are misunderstanding .. The error comes when root key is absent http://stackoverflow.com/q/20810660/2767755 not the permits one
[12:29:58] JulioPapel: has joined #RubyOnRails
[12:30:02] arup_r: There you got confused.
[12:30:03] a1fa: if i use delegate to:, it only works for reading, not setting
[12:30:09] chridal: Yes, I know. That's what I want to apply to the ones in permit.
[12:30:09] arup_r: a1fa: code please
[12:30:18] chridal: arup_r: I want that to work for the ones in permit.
[12:30:38] a1fa: http://wyeworks.com/blog/2009/6/4/rails-delegate-method
[12:30:44] a1fa: this exact thing
[12:31:07] rushed: has joined #RubyOnRails
[12:31:12] a1fa: buuut. i am doing the updates to Model.update(attributes)
[12:31:42] a1fa: i am not setting @model.model2s = whatever.
[12:31:46] a1fa: so is that not supported?
[12:32:29] nzst: alfa: let's see your code, not what you want it to be
[12:33:18] arup_r: chridal: do there params.require(:cast_profile => [ :name, :email, :public ])
[12:33:24] arup_r: try n saay
[12:33:26] a1fa: having issues with copy and paste (remmina is buggy)
[12:34:05] pokmo: has joined #RubyOnRails
[12:34:29] mikecmpbll: has joined #RubyOnRails
[12:34:29] pokmo: i'm trying to run 'bundle exec rake db:create' to create a db, but i keep getting an error saying couldn't create database. does anyone know where to find a more detailed error?
[12:34:55] nzst: pokmo: can you add a --trace to that?
[12:34:58] a1fa: so, i guess the question is, are delegations going to update automatically if you use Model.update method?
[12:35:49] herbst: has joined #RubyOnRails
[12:35:50] herbst: has joined #RubyOnRails
[12:36:12] jonr22: has joined #RubyOnRails
[12:36:39] chridal: arup_r: That did not work.
[12:36:47] chridal: Getting errors even if I am including them.
[12:37:25] jonr22: has joined #RubyOnRails
[12:37:26] sha1sum: a1fa: iirc, the update call just calls the setter before saving, so you would want to delegate ":my_attribute=" as well as ":my_attribute" I believe
[12:37:47] fgo: has joined #RubyOnRails
[12:38:33] sha1sum: a1fa: but I'm not so sure that the model you're delegating to will save as part of the update call
[12:39:33] sha1sum: a1fa: but you could use :autosave on the assocation
[12:39:44] sha1sum: (if that's what you want)
[12:40:22] mtmcfarl: has joined #RubyOnRails
[12:41:07] pokmo: nzst: well i did, but it's not very informative. i'd like to see if it was a permission denied error or something else
[12:41:09] northfurr: has joined #RubyOnRails
[12:41:47] a1fa: sha1sum: i am also doing that delegate :my_attribute, :my_attribute=, :to => :profile
[12:41:58] nzst: pokmo: can you make a gist of the trace? i can take a gander
[12:42:18] mtmcfarl: I am calling out to a rake task that runs every minute via cron that finds a set of records. Is there a way that I can cache the rails environment as to not load it on each rake call?
[12:42:56] pokmo: nzst: sure https://dpaste.de/F5AX thanks
[12:43:34] rushed: mtmcfarl: have whenever (or whatever you're using for cron) drop a task in something like resque for a worker to pick up
[12:43:58] sha1sum: a1fa: so what problem are you running into? After save it does not update the assocation?
[12:44:05] xylotism: has joined #RubyOnRails
[12:44:41] dici: has joined #RubyOnRails
[12:45:23] a1fa: i issue an .update(params) through a controller,
[12:45:37] a1fa: and everything gets updated but delegations
[12:45:57] a1fa: remove delegations, and add those columns to the model, and it works fine
[12:46:22] sha1sum: a1fa: you may need to add "autosave: true" on the assocation in the model you're delgating from
[12:46:29] annlewis: has joined #RubyOnRails
[12:46:33] mtmcfarl: rushed: we are seeing a steady increase in memory for the ruby process by loading the environment every minute like that. Perhaps they are overlapping on each other and ruby is not garbage collecting appropriately.
[12:46:47] sha1sum: a1fa: while the setters are delegated, the call to "save" is not called.
[12:46:57] a1fa: sha1sum: ok, let me try that. unfortunatley, delegate: is not well documentd ;(
[12:47:43] nzst: pokmo: http://stackoverflow.com/questions/5952265/rake-dbcreate-generated-if-you-set-the-charset-manually-make-sure-you-have-a
[12:47:50] rushed: mtmcfarl: not sure how that's related to my suggestion, but sorry to hear it :)
[12:48:02] a1fa: sha1sum: how is delegation going to work for new records .new should create a new record in delegation as well, right?
[12:48:03] nzst: pokmo: there's a bunch out there on that charset line
[12:49:05] pokmo: nzst: right. hmm if i'm reading it correctly, the mysql gem needs to be reinstalled?
[12:49:32] otherj: has joined #RubyOnRails
[12:49:44] arup_r: chridal: seems have to do manually
[12:49:50] victortyau: has joined #RubyOnRails
[12:49:52] Linuus: has joined #RubyOnRails
[12:49:53] mrchris: has joined #RubyOnRails
[12:50:04] chridal: Yes, indeed. Just doing `raise ActionController::ParameterMissing, "password"` now
[12:50:08] chridal: Thanks though.
[12:50:15] arup_r: https://github.com/rails/strong_parameters#require-multiple-parameters
[12:50:15] wethu: has joined #RubyOnRails
[12:50:17] arup_r: chridal: ^^
[12:50:22] arup_r: red the lines
[12:50:39] otherj: has joined #RubyOnRails
[12:50:39] arup_r: You have to write the requires multiple times
[12:51:00] chridal: arup_r: That's just for root elements though.
[12:51:08] chridal: Mine are nested.
[12:51:22] arup_r: chridal: I know
[12:51:22] i: has joined #RubyOnRails
[12:51:39] centrx: has joined #RubyOnRails
[12:51:44] arup_r: anyway handle it manually
[12:51:46] otherj: has joined #RubyOnRails
[12:51:58] maz-dev: has joined #RubyOnRails
[12:52:23] sankaber: has joined #RubyOnRails
[12:52:48] nzst: pokmo: oh, i'm not sure exactly what you need to do, but there are plenty of resources and tactics to try out there
[12:52:53] otherj: has joined #RubyOnRails
[12:52:56] jkamenik: has joined #RubyOnRails
[12:53:30] chridal: arup_r: https://gist.github.com/4f2365fb4cd75ebd5198
[12:53:32] davispuh: has joined #RubyOnRails
[12:53:38] a1fa: sha1sum: that worked. thank you
[12:53:42] chridal: doing that now, and calling `check_required_parameters` from the action
[12:53:43] otherj: has joined #RubyOnRails
[12:54:00] Quintasan: Hi, I'm using ransack and I want to sort according to name of a place (which is a String) but in ascending search empty string is "higher" than "Alabama" any ideas on how to push down the entires that have empty string?
[12:54:31] zlogan85: has joined #RubyOnRails
[12:54:50] otherj: has joined #RubyOnRails
[12:54:50] arup_r: chridal: perfect
[12:55:12] pawnbox: has joined #RubyOnRails
[12:55:55] otherj: has joined #RubyOnRails
[12:56:53] rushed: Quintasan: re-sort in ruby? sort based on a calculated field instead?
[12:57:15] Quintasan: rushed: Thanks.
[12:58:15] sha1sum: a1fa: you're welcome
[12:59:20] JamesDH: has joined #RubyOnRails
[13:00:43] charliesome: has joined #RubyOnRails
[13:01:31] barendt: has joined #RubyOnRails
[13:03:15] Pazician: has joined #RubyOnRails
[13:03:15] Pazician: has joined #RubyOnRails
[13:03:26] arup_r: chridal: https://gist.github.com/christiandalsvaag/4f2365fb4cd75ebd5198#gistcomment-1569679
[13:03:29] ramortegui: has joined #RubyOnRails
[13:03:56] arup_r: try ... I think it is little helpful .. and save some manual work
[13:04:10] symbol: has joined #RubyOnRails
[13:04:21] rubyonrails126: has joined #RubyOnRails
[13:04:30] zpe: has joined #RubyOnRails
[13:04:46] siddart_: has joined #RubyOnRails
[13:04:58] chridal: arup_r: Hm? What do you mean? You aren't raising the exception
[13:05:17] davispuh: has joined #RubyOnRails
[13:05:28] zpe: has joined #RubyOnRails
[13:05:30] arup_r: chridal: it will raise ActionController::ParameterMissing if the keys are missing
[13:05:54] edry: has joined #RubyOnRails
[13:06:09] edry: has left #RubyOnRails: ()
[13:06:17] chridal: oh! I didn't know that. is that default behaviour for #fetch?
[13:06:27] arup_r: chridal: http://api.rubyonrails.org/classes/ActionController/Parameters.html#method-i-fetch
[13:07:08] pwnd_nsfw: is that validations I see in the controller?
[13:07:19] arup_r: pwnd_nsfw: model
[13:07:57] pwnd_nsfw: check_require_parameters looks to be in the controller
[13:08:39] arup_r: I thought you are asking something new
[13:08:58] JamesDH: has joined #RubyOnRails
[13:09:13] arup_r: pwnd_nsfw: yes.. it should be inside the controller
[13:09:22] pwnd_nsfw: If you say so
[13:09:31] Ergo: has joined #RubyOnRails
[13:10:08] charliesome: has joined #RubyOnRails
[13:10:17] griffindy: has joined #RubyOnRails
[13:11:31] a1fa: sha1sum: ugh.. is there an auto_create feature too?
[13:12:48] rubyonrails126: I'm having a bit of difficulty with collection_select
[13:12:52] a1fa: sha1sum: or do i now have to go and setup :before_save
[13:13:22] pawnbox_: has joined #RubyOnRails
[13:13:25] JamesDH: has joined #RubyOnRails
[13:13:37] rubyonrails126: Would anyone be able to help me
[13:14:01] rubyonrails126: the symptom is that I can't update a value
[13:14:24] rubyonrails126: I press submit, and nothing happens
[13:14:35] rubyonrails126: the console doesn't show any requests
[13:14:56] rushed: rubyonrails126: what does the network console on your browser suggest?
[13:15:17] rushed: rubyonrails126: might also check the js console on your browser for errors
[13:15:29] rubyonrails126: param is missing or the value is empty
[13:15:56] rubyonrails126: I've been tweaking the controller as I thought it might be to do with whitelisted params
[13:16:05] jscheel: has joined #RubyOnRails
[13:16:18] rubyonrails126: but it seems like the collection select helper isn't handing over the right data
[13:16:21] a1fa: sha1sum: do i need to use this gem? https://github.com/jqr/has_one_autocreate or is there a trick to make this work
[13:16:56] cammm: has joined #RubyOnRails
[13:17:09] rubyonrails126: it terms of the data, here is where I think the issue is
[13:17:19] rubyonrails126: I have a table called departments
[13:17:31] rubyonrails126: departments can be located within another
[13:17:43] kp666: has joined #RubyOnRails
[13:17:50] rubyonrails126: so i have a variable called Department.viaDepartmentID
[13:18:06] rubyonrails126: which is a interger
[13:18:31] rubyonrails126: Im using the collection select to pass a choosen department ID as the value for viaDepartmentID
[13:19:14] w0rd-driven: has joined #RubyOnRails
[13:19:51] JamesDH: has joined #RubyOnRails
[13:20:19] JamesDH: has left #RubyOnRails: ()
[13:22:09] jonr2219: has joined #RubyOnRails
[13:22:22] gambl0r3: has joined #RubyOnRails
[13:22:52] jholm: has joined #RubyOnRails
[13:23:10] darrencauthon: has joined #RubyOnRails
[13:24:11] redmaverick: has joined #RubyOnRails
[13:25:51] chipotle: has joined #RubyOnRails
[13:26:15] Guest49: has joined #RubyOnRails
[13:26:29] dionysus69: has joined #RubyOnRails
[13:27:54] charliesome: has joined #RubyOnRails
[13:28:13] Polysics: has joined #RubyOnRails
[13:28:54] roxtrongo: has joined #RubyOnRails
[13:29:07] Polysics: I have built this view where a modal gathers a signature, which is put into a hidden as SVG and sent over
[13:30:10] Polysics: there's a bunch of JS and other support
[13:30:20] Polysics: how do you usually package that so it can be used on multiple forms?
[13:31:09] Polysics: I was thinking of simply using a partial but I end up duplicating JS that way
[13:31:18] centrx: has joined #RubyOnRails
[13:31:18] n99999i: has joined #RubyOnRails
[13:31:28] Polysics: I know there is no one true solution but figuring this out has proven harder than it should
[13:32:36] nettoweb: has joined #RubyOnRails
[13:33:54] n99999i: has joined #RubyOnRails
[13:35:14] esauOp: has joined #RubyOnRails
[13:35:47] greengriminal: has joined #RubyOnRails
[13:35:57] theery: has joined #RubyOnRails
[13:36:01] jobewan: has joined #RubyOnRails
[13:37:04] n99999i: has joined #RubyOnRails
[13:37:27] arup_r: rubyonrails126: any chance to see ur code ?
[13:37:51] rubyonrails126: which site you prefer
[13:38:58] givanse: has joined #RubyOnRails
[13:39:35] pwnd_nsfw: https://gist.github.com/SirUncleCid/bf50a02f847966ee1b90
[13:39:46] pwnd_nsfw: I don't understand why rspec is returning that..
[13:40:43] rushed: pwnd_nsfw: current_user is nil
[13:40:44] pwnd_nsfw: it should redirect
[13:40:46] pwnd_nsfw: yeah no shit
[13:41:07] audy: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[13:41:20] pwnd_nsfw: If it's nil, it should redirect before it gets to that point
[13:41:34] rubyonrails126: https://gist.github.com/anonymous/ce1dfa36f62e78941440
[13:41:40] rubyonrails126: sorry meant to do dm not pm
[13:41:42] beauby: has joined #RubyOnRails
[13:42:23] rushed: pwnd_nsfw: redirect doesn't stop ruby execution
[13:42:34] pwnd_nsfw: Interesting
[13:42:45] melter: has joined #RubyOnRails
[13:42:48] rushed: pwnd_nsfw: if you put it in a before filter it won't hit a later action, but it's not like throwing an error
[13:43:58] theery: has joined #RubyOnRails
[13:45:50] redmaverick: I am done with 70% of Eloquent Ruby and it was great. After I am 100% done with ER, which Ruby book should I target next which is good in 2015? Well Grounded Rubyist or Pick Axe. I am junior to intermediate in skill level (probably).
[13:46:44] pwnd_nsfw: rushed, it seems to be working properly in browser.
[13:46:50] pwnd_nsfw: I'm following Rails 4 in Action
[13:46:51] quazimodo: has joined #RubyOnRails
[13:47:14] annlewis: has joined #RubyOnRails
[13:47:55] krz: has joined #RubyOnRails
[13:48:04] pwnd_nsfw: current_user shouldn't return nil in the specs anyways
[13:49:33] allcentury: has joined #RubyOnRails
[13:49:36] pwnd_nsfw: It creates a user and sets the session variable appropriately
[13:50:41] Linuus: has joined #RubyOnRails
[13:52:59] husanu: has joined #RubyOnRails
[13:53:31] Pazician: has joined #RubyOnRails
[13:54:55] mary5030: has joined #RubyOnRails
[13:55:19] zlogan85: has joined #RubyOnRails
[13:55:35] mary5030: has joined #RubyOnRails
[13:56:54] JamesDH: has joined #RubyOnRails
[13:59:17] greengriminal: has joined #RubyOnRails
[14:02:24] xcesariox: has joined #RubyOnRails
[14:02:43] Dopagod: has joined #RubyOnRails
[14:02:43] Dopagod: has joined #RubyOnRails
[14:05:10] oflannabhra: has joined #RubyOnRails
[14:05:39] MrFjords: has joined #RubyOnRails
[14:06:21] moei: has joined #RubyOnRails
[14:06:24] rickmasta: has joined #RubyOnRails
[14:07:27] moeabdol: has joined #RubyOnRails
[14:08:18] idd2d: has joined #RubyOnRails
[14:08:59] erich__: has joined #RubyOnRails
[14:10:07] theery: has joined #RubyOnRails
[14:10:28] Rubie: has joined #RubyOnRails
[14:10:54] johnflux: has joined #RubyOnRails
[14:12:12] patrick_star: has joined #RubyOnRails
[14:12:29] otherj: has joined #RubyOnRails
[14:12:41] theery: has joined #RubyOnRails
[14:15:29] Guest3285: has joined #RubyOnRails
[14:17:16] jholm: has joined #RubyOnRails
[14:17:33] annlewis: has joined #RubyOnRails
[14:20:04] idd2d: has joined #RubyOnRails
[14:20:42] bejar37: has joined #RubyOnRails
[14:21:05] mrchris: has joined #RubyOnRails
[14:21:19] Trynemjoel: has joined #RubyOnRails
[14:23:02] jbzt: has joined #RubyOnRails
[14:24:38] srinidhi: has joined #RubyOnRails
[14:24:57] jbzt: Instead of ./app/(models | views | controllers), I???d like to have ./app/my_component/(models | views | controllers), is there a simple way to do that in rails 4? It seems I would get namespace issues by just moving them into that structure, e.g. MyComponent::Controllers::SomeController where I just want MyComponent::SomeController
[14:25:31] universa1: app/controllers/your_component
[14:26:06] jbzt: We have different teams working on different areas and they would rather roll up all of their code into a single directory
[14:26:14] jbzt: I thought about going the engines route, but it???s overkill for what I really need
[14:26:17] universa1: if you want to seperate functionality, have a lookt at engines.
[14:26:53] universa1: jbzt: namespace inside the different directories, so app/{models, views, controllers}/your_component/...
[14:27:02] jbzt: I was also thinking unbuilt gems, but this code will not be used outside of this app so I???m not sure why the gem route would make sense
[14:27:44] jbzt: I have went that route, apparently you and I (and probably everyone in here) share that opinion, but no one else I work with does
[14:28:13] centrx: has joined #RubyOnRails
[14:28:20] universa1: hmm, you're trying to fight against the "rails way" ;) which puts you in for a lot of trouble ;)
[14:28:35] universa1: jbzt: you can probably play around with load paths...
[14:28:36] someish: has joined #RubyOnRails
[14:28:53] dopamean_: has joined #RubyOnRails
[14:29:29] jbzt: thanks, I wansn???t sure if there was a default way to do this and I was just overlooking it
[14:29:49] moeabdol: has joined #RubyOnRails
[14:30:51] fschuindt: has joined #RubyOnRails
[14:31:06] n008f4g_: has joined #RubyOnRails
[14:31:31] jgt1: has joined #RubyOnRails
[14:32:18] darrencauthon: has joined #RubyOnRails
[14:35:15] havenwood: has joined #RubyOnRails
[14:35:21] dopamean_: has joined #RubyOnRails
[14:36:35] chipotle: has joined #RubyOnRails
[14:36:40] bendangelo: has joined #RubyOnRails
[14:36:53] darrencauthon: has joined #RubyOnRails
[14:38:27] darrenca_: has joined #RubyOnRails
[14:38:43] larryisthere: has joined #RubyOnRails
[14:40:16] jgpawletko: has joined #RubyOnRails
[14:42:51] turbo_MaCk: has joined #RubyOnRails
[14:44:42] hardtail: has joined #RubyOnRails
[14:44:57] ingusmat: has joined #RubyOnRails
[14:46:16] robotbrain: has joined #RubyOnRails
[14:46:17] ciree: has joined #RubyOnRails
[14:46:21] larissa: has joined #RubyOnRails
[14:46:54] a1fa: ||= (or equal?)
[14:47:16] pwnd_nsfw: rushed, heh, figured out the issue. I hadn't updated those specs yet. I was running all of the specs, but the example just runs the spec I was working on.
[14:48:00] centrx: a1fa, yeah
[14:48:31] polishdub: has joined #RubyOnRails
[14:49:09] sparr: has joined #RubyOnRails
[14:50:17] patrick_star: has joined #RubyOnRails
[14:51:20] robotbrain: has joined #RubyOnRails
[14:51:22] larissa: has joined #RubyOnRails
[14:51:49] ciree: has joined #RubyOnRails
[14:52:14] sparr: has joined #RubyOnRails
[14:52:54] a1fa: dealing with delegated and having to manually create associations or at least through some code
[14:53:02] a1fa: too bad there isnt dependent: create
[14:54:19] nzst: Hi, how do I decorate Dummy::Answer::Help#display http://hastebin.com/zakotewuco.rb ?
[14:55:01] universa1: what do you mean with decorate?!
[14:55:25] idd2d: has joined #RubyOnRails
[14:55:34] nzst: trying this http://hastebin.com/xosedoluca.rb
[14:55:49] LambdaSource: has joined #RubyOnRails
[14:55:55] nzst: with class_evals , idk if it's because the class is private or what
[14:56:08] tubbo: nzst: you probably want to do Dummy::Answer::Help.class_eval, the other class_eval is pointless
[14:56:20] tubbo: who makes a private class lol
[14:56:35] nzst: ..legacy code >.<
[14:56:36] universa1: what are you actually trying to achieve? this sounds/looks like way to complicated
[14:56:38] DmitryBochkarev: has joined #RubyOnRails
[14:56:39] tubbo: i feel ya
[14:57:00] nzst: overwrite a method in an application instance so i can crush a ticket and work on something else
[14:57:01] tubbo: nzst: if you actually control the code, just change the method. if you don't, well...i suppose you'll just have to class_eval in an initializer
[14:57:04] tubbo: or whatever
[14:57:13] tubbo: nzst: you can't subclass it?
[14:57:14] pwnd_nsfw: has joined #RubyOnRails
[14:57:44] nzst: tubbo: What do you mean subclass it?
[14:57:45] universa1: tubbo: hmm if you can do class eval in an initializer, why not just overwrite it their? ruby open-classes ;-)
[14:58:21] CheckYourSix: has joined #RubyOnRails
[14:58:27] tubbo: nzst: class NzstsAwesomeDummyHelp < Dummy::Answer::Help
[14:58:35] tubbo: not sure if that will work since it's under that pesky private keyword
[14:59:24] pawnbox: has joined #RubyOnRails
[14:59:45] tubbo: universa1: you just have to make sure you load the library code that initially defines the class in the initializer, and make sure it doesn't get reloaded later at any point. class_eval is, i believe, a bit safer than just reopening the class.
[15:00:25] tubbo: universa1: the rails guides tell you to use class_eval http://edgeguides.rubyonrails.org/engines.html#improving-engine-functionality, we actually built our own system similar to AS::Concern which uses Module#prepend to decorate our classes at my job
[15:00:31] tubbo: it's pretty damn nice actually, if you need to do that kind of thing
[15:01:10] universa1: tubbo: ok :-) i think i never needed the one or the other yet ;)
[15:01:25] universa1: and as::concerns... i always have to delete those useless folders...
[15:01:26] tubbo: universa1: you probably work on reasonable rails apps then :)
[15:01:28] xylotism: has joined #RubyOnRails
[15:01:36] universa1: tubbo: my own *cough* ;)
[15:01:42] universa1: but yeah, they are somewhat smallish
[15:01:55] safety_cut: has joined #RubyOnRails
[15:02:05] tubbo: i guess Scient might appreciate that more because he's also buried in a pile of engines for his app(s), last i checked
[15:02:36] Scient: I dont jave any engines :P
[15:02:39] mices: using actionmailer to receive emails and place them in a database but how can i verify the emails aren't spoofed in other words the sender is the owner of the email address
[15:02:47] jkamenik1: has joined #RubyOnRails
[15:03:08] Scient: I have a gem, leveraging railtie stuff to inject some loadpath doodads but thats about it
[15:03:21] jonr2219: has joined #RubyOnRails
[15:03:26] tubbo: Scient: oh cool
[15:03:39] mices: i'm only gonna give the email address to a few friends
[15:03:59] jonr2219: has joined #RubyOnRails
[15:04:05] Glyphik: has joined #RubyOnRails
[15:04:09] Linuus: has joined #RubyOnRails
[15:04:12] safety_cut: has joined #RubyOnRails
[15:04:14] universa1: mices: so don't worry about authentication... or use some other means of authentication... ...because email authentication is a somewhat complicated field.
[15:04:16] tubbo: mices: hopefully whoever is sending you the email has DKIM auth set up on their domain so that kind of thing can't happen...
[15:04:17] a1fa: mices: send them an email to confirm email
[15:04:41] tubbo: tbh if your app is taking email it should probably be using sendgrid or that other free service that POSTs messages to an endpoint on your app in JSON format
[15:04:48] mices: a1fa: i can't
[15:05:26] mices: when i said "friends" i really meant email coming in from mailing list
[15:05:46] Rubie: has joined #RubyOnRails
[15:05:56] oflannab_: has joined #RubyOnRails
[15:06:05] adavia: has joined #RubyOnRails
[15:06:13] mices: i create the email address, subscribe to the mailing lists with that email address and as the email comes in i insert it into a database after verifying the sender and that the sender's not spoofed
[15:06:19] universa1: generate a unique address per sender, using something like your_server+SOME_HASH@whatever.com
[15:06:36] mices: otherwise a spoofed email will turn into a news item on my site
[15:06:55] The_Phoenix: has joined #RubyOnRails
[15:07:14] mices: but there's nobody to click the verify link in a returned email
[15:07:16] Cervajz: has joined #RubyOnRails
[15:07:52] nzst: tubbo: universa1: thanks, i'm done fighting it. I just copied in the whole class from the gem/engine, changed that line of code, and dropped it in the instance. Know what I'm sayin?
[15:08:10] mices: first choice a solution that requires no effort on the senders part
[15:08:18] nzst: it's a not supported (actually still get tickets for) line of releases
[15:08:54] universa1: mices: so scan the mail and check if the initial mail is a confirmation mail?
[15:09:19] mices: what confirmation email?
[15:09:33] universa1: <mices> but there's nobody to click the verify link in a returned email
[15:10:03] mices: i can't send anything back to them
[15:11:06] mices: can't i check the message path to look for certain values
[15:11:09] umgrosscol: has joined #RubyOnRails
[15:11:25] w0rd-driven: has joined #RubyOnRails
[15:11:35] mices: they're gonna be sending across the same server every time
[15:11:38] universa1: mices: you said you were receiving the mails? so mark those which look like confirmation mails?!
[15:11:58] bruno-: has joined #RubyOnRails
[15:12:26] LambdaSource: has joined #RubyOnRails
[15:12:29] mices: you mean have some shared attribute with the original confirmation email?
[15:12:59] nettoweb: has joined #RubyOnRails
[15:13:33] universa1: mices: sorry, i don't really understand what you're trying to say.
[15:13:51] mices: receive the email, if not spoofed, insert into database
[15:13:56] LambdaSource: has joined #RubyOnRails
[15:14:48] pokmo: i'm trying to follow this answer, but i keep getting an error saying "export: no valid in this context: --" is this even a valid command?
[15:14:49] pokmo: http://stackoverflow.com/a/6261165/233798
[15:15:11] mices: havenwood: do you have any ideas for me on this
[15:15:14] naftilos76: has joined #RubyOnRails
[15:16:03] towski_: has joined #RubyOnRails
[15:16:10] universa1: pokmo: your code + your error => gist.
[15:16:16] havenwood: mices: pre-coffee for me, so my ideas are foggy
[15:16:39] mices: it's time to begin your post coffee life
[15:17:26] voker57: has joined #RubyOnRails
[15:18:41] safety_c_: has joined #RubyOnRails
[15:19:27] pokmo: here's the gist https://gist.github.com/hoonkai/4052de75bcf70822c890
[15:19:36] meatherly: has joined #RubyOnRails
[15:19:36] disgrntld: has joined #RubyOnRails
[15:19:39] pokmo: i'm basically having problems running 'bundle exec rake db:create'
[15:20:49] universa1: pokmo: not using mysql, but: https://gist.github.com/hoonkai/4052de75bcf70822c890#file-out-rb-L7 -- are you setting that collation? is it valid one?
[15:20:50] chipotle: has joined #RubyOnRails
[15:21:13] havenwood: pokmo: Either export the ARCHFLAG or prefix it to the command, not both.
[15:21:14] a1fa: https://gist.github.com/anonymous/0c0e59d6a234beeb5d79
[15:21:31] a1fa: ^ i dont understand why this does not work? record gets created, but name does not get updated
[15:22:26] symbol: has joined #RubyOnRails
[15:22:33] sargas: has joined #RubyOnRails
[15:22:40] a1fa: lol its working now :(
[15:22:45] xylotism: has joined #RubyOnRails
[15:23:14] pokmo: universa1: yeah it's valid
[15:23:15] jtthedev: has joined #RubyOnRails
[15:23:29] pokmo: havenwood: i've tried putting a semicolon before 'gem install' in that command, but i get this
[15:23:58] pokmo: https://gist.github.com/hoonkai/22d298082f9dd4b35349
[15:24:29] pokmo: should mysql gem be installed with sudo
[15:24:32] havenwood: pokmo: You don't have permission to write your own user directory?
[15:25:49] pokmo: havenwood: that file is owned by root. maybe it should be deleted?
[15:25:57] universa1: pokmo: the gem is installed
[15:26:07] universa1: if it would not been installed, you would get a different error.
[15:26:12] pokmo: i should have already uninstalled it though
[15:26:13] michaeldeol: has joined #RubyOnRails
[15:26:28] havenwood: pokmo: Yeah, install your gems as the user you're using.
[15:26:29] pokmo: i've already run sudo gem uninstall mysql
[15:26:42] pokmo: could i just manually delete that .info file?
[15:27:39] jholm: has joined #RubyOnRails
[15:29:00] [Butch]: has joined #RubyOnRails
[15:29:25] jocuman: has joined #RubyOnRails
[15:29:37] dionysus69: has joined #RubyOnRails
[15:30:29] havenwood: pokmo: RVM has an `rvm fix-permissions` command and with chruby nobody has borked permissions (sudo installs to a different location than non-sudo). I'd think with rbenv you'd want to never install with sudo.
[15:31:10] pokmo: i've manually deleted them now, and the gem has been installed successfully
[15:31:20] pokmo: however, the error with rake db:create still persists :(
[15:31:34] CanTonic: has joined #RubyOnRails
[15:31:49] patrick_star: has joined #RubyOnRails
[15:31:56] havenwood: pokmo: What's that error?
[15:32:06] pokmo: havenwood: (If you set the charset manually, make sure you have a matching collation)
[15:32:26] pokmo: it works very smoothly on ubuntu though
[15:32:32] shinnya: has joined #RubyOnRails
[15:32:36] pokmo: just not on osx
[15:33:05] havenwood: pokmo: Assuming you installed MySQL with?: brew install mysql
[15:33:24] pokmo: havenwood: i'm trying to build thingspeak. the comment in its yml is quite interesting https://github.com/iobridge/thingspeak/blob/master/config/database.yml.example
[15:33:47] pokmo: havenwood: it suggests that the mysql gem should be installed with sudo
[15:33:59] havenwood: pokmo: That's probably assuming the system Ruby.
[15:34:01] pokmo: havenwood: yes, i have mysql all running
[15:34:03] a1fa: https://gist.github.com/anonymous/0c0e59d6a234beeb5d79 < anybody have idea, why this would not work?
[15:34:13] a1fa: the record is created, but the name is not updated
[15:34:34] maz-dev: has joined #RubyOnRails
[15:34:41] pokmo: havenwood: but i shouldn't use sudo?
[15:36:38] jenrzzz: has joined #RubyOnRails
[15:39:57] centrx: has joined #RubyOnRails
[15:40:16] mwlang: has joined #RubyOnRails
[15:40:23] jtthedev: Anyone want to offer some guidance please?? I have a method on my model that calls a remote api and fetches data. I will do this fetch a couple of times through out the day (every 15 minutes exactly) and do not want to download duplicate data, however in the interim of fetches some data can change... so what I want to do is to check for 5 records/objects, if they exist, then update a set of specified
[15:40:23] pokmo: is there a way to get a more informative error from rake?
[15:40:28] Ronll: has joined #RubyOnRails
[15:40:29] jtthedev: columns in my model, if it does not exist, create a new record
[15:40:31] jtthedev: http://pastie.org/10407836
[15:40:34] jtthedev: please see pastie for more information
[15:40:39] sandstrom: has joined #RubyOnRails
[15:40:53] nomadicoder: has joined #RubyOnRails
[15:40:54] pokmo: it's throwing the same error even with the mysql gem uninstalled
[15:41:41] sam_weerasinghe: has joined #RubyOnRails
[15:42:31] pontiki: has joined #RubyOnRails
[15:43:12] a1fa: https://gist.github.com/anonymous/0c0e59d6a234beeb5d79
[15:43:39] centrx: look like you've got some code there
[15:44:10] a1fa: heh, centrx trying to figure out why this creates a record, but does not assign a name
[15:45:41] centrx: a1fa, where is attributes["name"] coming from?
[15:46:30] a1fa: form submit
[15:46:59] oflannabhra: has joined #RubyOnRails
[15:47:03] centrx: a1fa, 'params' ? but that should be in the controller?
[15:47:20] Balzrael: still would be aout of scope
[15:48:42] pokmo: ok i've got it sorted
[15:48:51] pokmo: i had to use the 'host' field rather than 'socket'
[15:48:58] pokmo: no idea why
[15:49:01] a1fa: centrx: yes
[15:49:14] rogue_koder: has joined #RubyOnRails
[15:49:26] pwnd_nsfw: instead of doing after_init, you should maybe just do it in the controller?
[15:49:46] valetudo: has joined #RubyOnRails
[15:49:57] a1fa: well, i also have after_create
[15:50:23] pwnd_nsfw: What does that handle?
[15:51:15] lbwski: has joined #RubyOnRails
[15:51:32] a1fa: hopefully nothing
[15:51:43] a1fa: but its there just in case things get out of flow, i guess
[15:51:50] Cache_Money: has joined #RubyOnRails
[15:52:33] lbwski: has joined #RubyOnRails
[15:52:49] pwnd_nsfw: You should have the controller call add_product, I think
[15:52:59] a1fa: is attributes not the correct way of catching form params in module?
[15:53:12] bricker: has joined #RubyOnRails
[15:53:13] a1fa: i tried just "name"
[15:53:21] a1fa: that didnt work,
[15:53:30] maz-dev: has joined #RubyOnRails
[15:53:39] a1fa: should it be self.name?
[15:54:04] troyready: has joined #RubyOnRails
[15:54:17] patrick_star: has joined #RubyOnRails
[15:54:26] bronson: has joined #RubyOnRails
[15:56:10] sonofdirt: has joined #RubyOnRails
[15:57:44] a1fa: adding = 1 works. so that piece of the code iktw !!
[15:58:46] artto: has joined #RubyOnRails
[15:59:41] towski_: has joined #RubyOnRails
[16:00:55] momomomomo: has joined #RubyOnRails
[16:01:52] xylotism: has joined #RubyOnRails
[16:01:59] yardenbar: has joined #RubyOnRails
[16:02:42] djbkd: has joined #RubyOnRails
[16:02:56] xylotism: has joined #RubyOnRails
[16:03:50] craysiii: has joined #RubyOnRails
[16:06:56] smathy: has joined #RubyOnRails
[16:09:10] a1fa: ACTION almost gives up!
[16:09:41] a1fa: thank god for liquid spirits
[16:10:52] xylotism: has joined #RubyOnRails
[16:12:09] xylotism: has joined #RubyOnRails
[16:12:57] krisquigley: has joined #RubyOnRails
[16:13:19] xylotism: has joined #RubyOnRails
[16:13:37] ruurd: has joined #RubyOnRails
[16:14:04] riotjones: has joined #RubyOnRails
[16:14:36] zpe: has joined #RubyOnRails
[16:14:55] MartinElvar: has joined #RubyOnRails
[16:15:44] tubbo: a1fa: no, attributes is not the correct way of catching form params in a module, whatever that means
[16:16:03] tubbo: a1fa: you pass the params from the controller into the model. looks like you're just doing Product.create(name: name) here
[16:16:09] theery: has joined #RubyOnRails
[16:16:21] tubbo: well, self.product = Product.create(name: name) if new_record?
[16:16:30] pecpec: has joined #RubyOnRails
[16:16:46] pecpec: has joined #RubyOnRails
[16:16:53] tubbo: a1fa: there's also a built-in rails method that will do this for you... whatever_this_class_is_called.create_product
[16:17:08] afrianska: has joined #RubyOnRails
[16:20:01] jkamenik: has joined #RubyOnRails
[16:20:06] turbo_MaCk: has joined #RubyOnRails
[16:20:48] bigredboots: has joined #RubyOnRails
[16:22:21] arooni: has joined #RubyOnRails
[16:23:32] meatherly: has joined #RubyOnRails
[16:23:38] safety_cut: has joined #RubyOnRails
[16:23:53] marr: has joined #RubyOnRails
[16:24:10] siemprefresco: has joined #RubyOnRails
[16:24:20] rromanchuk: has joined #RubyOnRails
[16:24:57] xcesariox: has joined #RubyOnRails
[16:25:18] safety_c_: has joined #RubyOnRails
[16:25:31] JamesDH: has joined #RubyOnRails
[16:27:41] a1fa: well thats what I am basically doing
[16:28:07] a1fa: however "name" is not available at that point
[16:28:12] jobewan: has joined #RubyOnRails
[16:28:13] a1fa: i cant use "name" in after_initialize
[16:28:44] a1fa: i can use it in after_create
[16:29:19] a1fa: but this is also messing with rollback now
[16:30:04] a1fa: why is that that dependent destroy exist, but not dependent create?
[16:30:12] rubyonrails166: has joined #RubyOnRails
[16:30:29] Dzejmskrokan: has joined #RubyOnRails
[16:30:44] blackmesa: has joined #RubyOnRails
[16:31:30] pawnbox: has joined #RubyOnRails
[16:31:54] safety_cut: has joined #RubyOnRails
[16:31:55] Balzrael: actually dependent create exists, you just have to use the relationship
[16:32:03] ed-beo: has joined #RubyOnRails
[16:32:11] a1fa: Balzrael: what do you mean?
[16:32:14] Jardayn: has joined #RubyOnRails
[16:32:14] smathy: a1fa, your code works fine for me.
[16:32:56] Dzejmskrokan: is command bin/rails faster then just rails ?
[16:33:07] jholm: has joined #RubyOnRails
[16:33:17] Guest3285: has joined #RubyOnRails
[16:34:01] strcmp1: has joined #RubyOnRails
[16:34:02] a1fa: smathy: not working for me for some rason
[16:34:09] jtthedev: Anyone that can really help with this, would greatly appreciate it... I have a method on my model that fetches remote records. If a record exist, then I want to update it, if it doesnt exist. then I want to create a new record... when I fetch for the second time, I am getting new records inserted that are duplicates.. it doesn't happen on all records, just some, however the data is exactly the same
[16:34:15] jtthedev: , i dont want duplicate data...
[16:34:17] jtthedev: http://pastie.org/10407960
[16:34:36] jtthedev: short version of what I am trying to do.. check certain fields, if those fields exist, update the row, if they do not, new record
[16:34:43] smathy: a1fa, I just pasted my pry session to your gist.
[16:34:49] ckinniburgh: has joined #RubyOnRails
[16:35:23] smathy: It's a peculiar way to do what you're doing, but it does work. Something else is messing things up for you.
[16:36:13] Lightsword: has joined #RubyOnRails
[16:38:03] elsurudo: has joined #RubyOnRails
[16:39:06] Linuus: has joined #RubyOnRails
[16:39:16] elsurudo: Hi all, my app works perfectly on my mac dev environment, as well as in production on heroku. I???m trying to get a collaborator up and running (he???s using windows), but he hets the following every time he tries to run `rails s`: `NameError: uninitialized constant ActionView::Helpers::ActiveModelHelper`. Anyone have any experience with this?
[16:40:04] theery: has joined #RubyOnRails
[16:40:10] Balzrael: setup a vagrant box for your app with the whole dev environment and no more problems
[16:41:19] cornerma1: has joined #RubyOnRails
[16:42:29] deol: has joined #RubyOnRails
[16:42:47] momomomomo: has joined #RubyOnRails
[16:43:49] pwnd_nsfw: has joined #RubyOnRails
[16:44:54] FailBit: I'M BACK HAHA
[16:45:01] FailBit: verizon brought the net back
[16:45:15] naftilos76: has joined #RubyOnRails
[16:45:26] Balzrael: lol FailBit
[16:46:00] FailBit: if I was in charge I would have kicked people's asses to get their switches rebooted
[16:46:13] FailBit: I spent about 24 hours with no home internet
[16:46:21] FailBit: impossiburu amirite
[16:46:36] Balzrael: bet it was a nightmare
[16:46:45] FailBit: I could barely sleep
[16:47:11] fschuindt: has joined #RubyOnRails
[16:48:59] elsurudo: @Balzrael not worth it in this instance, especially since we???re using different OSes
[16:49:27] xylotism: has joined #RubyOnRails
[16:49:59] safety_cut: has joined #RubyOnRails
[16:50:58] craysiii: did you even look at what vagrant was or did you just dismiss the idea altogether
[16:51:10] elsurudo: No, I know what vagrant is...
[16:51:22] arup_r: has joined #RubyOnRails
[16:51:55] nhhagen: has joined #RubyOnRails
[16:51:57] elsurudo: It???s a good suggestion, but in my circumstances it???s just not worth it from a time perspective
[16:52:17] craysiii: neither is trying to fix rails errors in windows :)
[16:52:24] elsurudo: heh, perhaps
[16:52:37] craysiii: to each their own though i guess
[16:53:10] elsurudo: i know. trying to allow a designer to run the server on his box
[16:53:54] n99999i: has joined #RubyOnRails
[16:54:28] elsurudo: we???ve already solved so many issues, but this one is proving more difficult
[16:54:52] n99999i: has joined #RubyOnRails
[16:55:00] nhhagen: has joined #RubyOnRails
[16:55:05] bejar37: I'm hoping to periodically call http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html#method-i-reconnect-21 from a custom middleware in order to force connecting to a new DB master
[16:55:08] bejar37: is taht a horrible idea?
[16:55:59] n99999i: has joined #RubyOnRails
[16:56:05] craysiii: http://stackoverflow.com/questions/32411841/webrick-does-not-bootup-gives-an-error-white-accessing-new-rails-app/32412231#32412231
[16:56:07] bronson: has joined #RubyOnRails
[16:56:14] minotep: has joined #RubyOnRails
[16:56:46] LambdaSource: has joined #RubyOnRails
[16:58:05] elsurudo: rack 1.6.4 is already required by other gems, and it???s in the Gemfile.lock, so i don???t think that???s the issue
[16:58:37] someish: has joined #RubyOnRails
[16:59:17] cajone1: has left #RubyOnRails: ()
[16:59:24] gusrub: has joined #RubyOnRails
[16:59:38] dionysus69: has joined #RubyOnRails
[17:00:06] cajone: has joined #RubyOnRails
[17:01:01] tubbo: bejar37: periodically?
[17:01:15] tubbo: like, every X seconds or whatever?
[17:01:31] bejar37: tubbo: Yeah, going to check to see if the connection is > X seconds old
[17:01:52] jtthedev: What would be the proper way to pass a where clause to a connection.execute ? can i do something like this. HandshakeOrderItem.connection.execute("delete from handshake_order_items").where("xdate = ?", Date.today.beginning_of_day)
[17:02:00] tubbo: bejar37: yeah that does seem like a horrible idea. why would you need to do that?
[17:02:55] tubbo: jtthedev: that's not the right way of doing what you're trying to do.
[17:02:56] jtthedev: or something more like this? HandshakeOrderItem.connection.execute("delete from handshake_order_items where xdate = ?",Date.today.beginning_of_day)
[17:03:00] bejar37: I want to make sure that if a master on my DB cluster goes down, that my rails instance eventually reconnects to the master after some period of time
[17:03:01] tubbo: jtthedev: !querying
[17:03:01] helpa: jtthedev: http://guides.rubyonrails.org/active_record_querying.html - ActiveRecord Querying Guide by Ryan Bigg
[17:03:10] bejar37: (after connecting to the slave)
[17:03:29] jtthedev: tubbo, would it be best if I use the databases built in sysdate function ?
[17:03:49] tubbo: jtthedev: why can't you do HandshakeOrderItem.where(xdate: Date.today.beginning_of_day).destroy_all? why are you dropping down to SQL when you have a whole ORM and querying language at your disposal?
[17:03:59] bejar37: the time period will probably be on the time scale of minutes or hours, rather than seconds
[17:04:23] tubbo: bejar37: what's the database? i know postgres absolutely has that shit built in and you just specify the amount of workers you want active at any given point (pool: 5 in database.yml)
[17:05:08] tubbo: bejar37: don't know what that is.
[17:05:39] tubbo: googling it seems to be some kind of mongodb or mysql hosting service
[17:05:42] bejar37: it's an enterprise MySQL product
[17:05:50] bejar37: we locally host it, but yeah
[17:06:08] tubbo: bejar37: it seems like just support for MySQL, but yeah...your database is MySQL.
[17:06:30] erich: has joined #RubyOnRails
[17:07:22] momomomomo: has joined #RubyOnRails
[17:07:53] bejar37: tubbo: All I see about resetting mysql connections is wait_timeout, which only resets connections that have been inactive for a certain period of time
[17:07:59] bejar37: I don't expect my connections to ever be active
[17:08:16] atmosx: Can I ask a HAML + controller (ruby) question although the app is sinatra (MVC)? :-) - but I don't think that it's relevant I need some HAML magic probably.
[17:08:18] shinnya: has joined #RubyOnRails
[17:08:29] tubbo: bejar37: yeah i'm not so sure how mysql handles this kind of stuff. percona, however, might be slightly different if it's not just a support contract for mysql :)
[17:08:42] tubbo: atmosx: you can ask whatever you want, we just may or may not be able to help you
[17:08:51] bejar37: Do you have a particular reason why calling reconnect! in the middleware is a bad idea? I don't disagree with you, but I'm also not aware of a hard technical reason why it's bad to
[17:09:08] kimegede: has joined #RubyOnRails
[17:10:04] habitullence: has joined #RubyOnRails
[17:10:17] atmosx: I have this result: http://atmosx.clarify-it.com/d/hhlj2y ... I wanna put a tooltip above the 1st line (collored one). The problem is that in the controller (code: https://gist.github.com/atmosx/5b1612757fd0128fbd76#file-mafftseq_protein_results-haml-L4 ) I have huge 'strings'. I'm not iterating or anything. So, is it possible to have tooltips displaying the position of each letter above them?
[17:10:19] d08z: has joined #RubyOnRails
[17:10:26] xylotism: has joined #RubyOnRails
[17:10:52] tubbo: bejar37: as an application dev, you aren't privy to nor should you have to care about the internal workings of the database, such as when exactly it's running those queries, how it's analyzing your queries, and what it's taking from the filesystem or e.g. an in-memory cache store.
[17:10:54] Balzrael: bejar37: your sever configuration should take care of restarting stuff not the app itself.
[17:11:01] ed-beo: has joined #RubyOnRails
[17:11:02] tubbo: (that's the in-memory cache for the DB, not a memcached instance for your web app cache)
[17:11:07] d08z: hi, i would like to know what is the accepted convention as where to put my custom executables/scripts in the ROR directory?
[17:11:27] elsurudo: @d08z ???script???
[17:11:28] jtthedev: I've tried calling that within a method in my model and it doiesn't seem to work for some reason
[17:11:30] tubbo: bejar37: so by reconnecting to the DB, you *could* be fucking over a query in your app that's supposed to get run, like if you reconnect when someone is trying to access the DB.
[17:11:32] broman: has joined #RubyOnRails
[17:11:32] atmosx: hm, I need a helper method to create an equally huge string of tooltips.
[17:11:39] d08z: elsurudo: there is no "/script"
[17:11:40] tubbo: d08z: i put them in bin/
[17:11:47] tubbo: eff script/
[17:11:53] elsurudo: @d08z you can make it (it used to be default)
[17:12:06] tubbo: bin/ happens to be in my $PATH as $PWD/bin so the scripts automatically become commands when i enter my rails dir
[17:12:10] d08z: ok and then i just use "runner" ?
[17:12:10] elsurudo: but it really doesn???t matter whether you use script or bin or whatever
[17:12:13] tubbo: only reason why i change dit
[17:12:14] broman: Can somebody help me?? im trying to put my app to run on a nginx/unicorn server (i installed myself)... when i navigate to the pure url, it works.. but after i click something it gives me an 404 error
[17:12:15] tubbo: changed it*
[17:12:41] d08z: tubbo: thats actually a very good idea
[17:12:45] tubbo: bejar37: that's why postgresql takes care of the nuances of when to re-establish a connection. TBH you shouldn't really ever need to, the DB should be able to handle this shit for you.
[17:13:04] tubbo: d08z: the credit goes to unix and their naming conventions ;)
[17:13:11] symbole: has joined #RubyOnRails
[17:13:14] atrius: has joined #RubyOnRails
[17:13:49] d08z: tubbo: i thought only "provided-with-rails" binaries had to go in bin/
[17:14:45] elsurudo: @tubbo that was my impression as well
[17:14:55] elsurudo: hence script
[17:15:02] srinidhi1: has joined #RubyOnRails
[17:15:28] drale2k: has joined #RubyOnRails
[17:15:33] petricore: has joined #RubyOnRails
[17:15:40] tubbo: d08z / elsurudo - what brought you to that conclusion? besides the fact that rails generates its script stuff in there...i figured it was fine to put my scripts in there given the existence of ./bin/setup as of rails 4.1
[17:16:02] tubbo: after all, the rails binstub used to be in ./script/rails :D
[17:16:26] elsurudo: @tubbo true, but ???script??? dir used to be generated by default IIRC(?), just seems a better place to put user stuff
[17:16:29] jtthedev: tubbo: http://pastie.org/10408036
[17:16:33] d08z: tubbo: ok so, my own libs in libs/, my script in bin/ and the 3rd party lib i need for the script in vendor/, am i getting this right?
[17:16:38] jtthedev: i'm trying it this way
[17:16:43] jtthedev: but it donesn't delete the data
[17:17:17] jtthedev: from a button, i call delete_today method, from delete_today method i redirect to a fetch new method, both are properly setup in my routes
[17:17:26] jtthedev: however, delete_Today, doesn't drop the desired data
[17:18:17] arup_r: jtdowney: Are you sure `HandshakeOrderItem.where(xdate: Date.today.beginning_of_day)` returns results
[17:18:19] liquid-silence: has joined #RubyOnRails
[17:18:34] arup_r: Did you check in rails console ?
[17:18:55] cnk: has joined #RubyOnRails
[17:18:56] jtthedev: arup, yes, the view that I am calling to delete from, is displaying the data in that table now
[17:19:01] patrick_star: has joined #RubyOnRails
[17:19:50] jtthedev: i'm going to try via created_at
[17:19:53] arup_r: Well. can you just do `raise 1.inspact` before the deletion line and run it
[17:20:12] MartinElvar: has joined #RubyOnRails
[17:20:44] afrianska: has joined #RubyOnRails
[17:20:50] krisquigley: has joined #RubyOnRails
[17:20:50] arup_r: and in browser window, run the query with where, not the delete.. and see the count
[17:20:53] arup_r: HandshakeOrderItem.where(xdate: Date.today.beginning_of_day).count
[17:20:57] pontiki: has joined #RubyOnRails
[17:21:02] arup_r: and let me know if it is 0 there
[17:21:28] podman: has joined #RubyOnRails
[17:21:30] tubbo: elsurudo: it did, now bin/ is generated by default. and i saw people put their own scripts in script/
[17:21:32] tubbo: all the time
[17:22:02] rogue_koder: has joined #RubyOnRails
[17:22:16] broman: Can somebody help me?? im trying to put my app to run on a nginx/unicorn server (i installed myself)... when i navigate to the pure url, it works.. but when i try to log in the application it gives me an 404 error
[17:22:31] tubbo: jtthedev: did you verify that the destroy_all actually worked? clearly not because you're just doing extra shit without checking whether destroy_all returned true :)
[17:22:51] tubbo: jtthedev: i bet there's a validation error somewhere...
[17:22:52] andywww: has joined #RubyOnRails
[17:23:00] arup_r: me too sure
[17:23:16] otherj: has joined #RubyOnRails
[17:23:37] krisquigley: has joined #RubyOnRails
[17:23:55] jtthedev: creating a new section in view to test that method without the redirect, im working on it now give me 2 minues
[17:24:14] sargas: has joined #RubyOnRails
[17:24:21] nizmow: has joined #RubyOnRails
[17:25:05] andywww: when you make a mixin/module and you want to use an attribute of the original class in it, is it best practice to pass it in as an attribute, or can you just reference it directly, knowing it will always be part of the class that includes the model?
[17:25:08] mordocai: has joined #RubyOnRails
[17:25:23] andywww: as a parameter sorry
[17:25:25] smathy: broman, what's your nginx log say about the 404?
[17:25:40] Balzrael: nobody here loves binding.pry for debugging :(
[17:25:47] mloy: has joined #RubyOnRails
[17:25:48] smathy: andywww, reference it directly.
[17:25:55] broman: smathy, the error.log is empty
[17:25:59] smathy: Balzrael, nope, use byebug for debugging.
[17:26:02] andywww: cool beans, thanks
[17:26:10] arup_r: Balzrael: byebug is quite nice ;)
[17:26:16] Balzrael: just do some debugging
[17:26:26] cnk: broman: the 404 will be in the access log
[17:26:47] andywww: has left #RubyOnRails: ()
[17:27:01] jtthedev: keep getting a undefined method for "each"
[17:27:03] jtthedev: don't get why.
[17:27:20] jtthedev: http://pastie.org/10408058
[17:27:25] jtthedev: that's the entirety of the method
[17:27:35] jtthedev: have tried it without calling a variable as well
[17:28:05] fschuindt: has joined #RubyOnRails
[17:30:21] tubbo: jtthedev: paste the error and its backtrace
[17:31:08] xcesariox: has joined #RubyOnRails
[17:31:23] Balzrael: jtthedev: just format the date to the format you have in your db
[17:31:31] Balzrael: it should work then
[17:31:38] Ace20: has joined #RubyOnRails
[17:31:47] mikecmpbll: has joined #RubyOnRails
[17:33:20] Ace20: could somebody advise on how to go about writing end-to-end acceptance tests for an app whose backend and frontend are separate Rails projects?
[17:33:58] huck5: has joined #RubyOnRails
[17:34:02] broman: smathy, it says nothing! using the tail -f i was able to see the first request (200) and again when i try to log in, i get a 404 that's not in the logs
[17:34:13] oflannabhra: has joined #RubyOnRails
[17:34:49] Dzejmskrokan: has joined #RubyOnRails
[17:35:52] Ace20: not really sure how the basic setup should look, I would think it would need to start up the frontend and backend on different ports, then drive the UI and reset the master DB between tests
[17:35:54] HAL2328: has joined #RubyOnRails
[17:36:12] smathy: broman, is the login SSL? Maybe you're not looking in the right log?
[17:36:58] JimmyNeutron: has joined #RubyOnRails
[17:38:59] kimegede_: has joined #RubyOnRails
[17:39:29] broman: smathy, not ssl! im looking to a log that i can see being updated while i navigate through the rails app... but that particular url (post) gives me an 404
[17:39:37] broman: i think this is something related to vhosts
[17:39:47] jtthedev: Balzrael: why would I need to if these records are getting created by the same app.. wouldn't it default to using the same date format that was used when the records were being created ?
[17:40:03] herbst: has joined #RubyOnRails
[17:41:52] Balzrael: jtthedev: not always. I had problems with scopes and the date format. Just check that they look the same
[17:41:54] broman: now im getting a unable to connect error
[17:42:15] xylotism: has joined #RubyOnRails
[17:42:25] atmosx: yay! I did it.
[17:42:29] smathy: broman, the URL is under a different hostname?
[17:42:36] broman: back to 404 :)
[17:42:39] arup_r: Balzrael: you made a wild guess I see
[17:42:42] broman: same hostname
[17:43:11] arup_r: atmosx: what? completed the project ?
[17:43:25] baweaver: has joined #RubyOnRails
[17:43:57] havenwood: has joined #RubyOnRails
[17:44:20] skyjumper: anyone here work as a freelancer?
[17:45:12] artto: has joined #RubyOnRails
[17:45:34] dman777_alter: has joined #RubyOnRails
[17:45:37] alphaatom: has joined #RubyOnRails
[17:45:46] atmosx: arup_r: https://github.com/atmosx/dogma/commit/094e2132d34c48a7fbf1d0b62095afe056d20109 :-)
[17:45:47] dman777_alter: is response.body a hash?
[17:46:13] arup_r: dman777_alter: haha.. you can see .. ot like logger.info response.body
[17:46:25] atmosx: arup_r: the CSS method, now I have the position of each element That's it hehe
[17:46:32] arup_r: dump it into the log and see how it looks like
[17:46:39] finnnnnnnnnnn: has joined #RubyOnRails
[17:47:03] towski_: has joined #RubyOnRails
[17:47:17] atmosx: I use p response.body and watch the logs on the 2nd tmux window
[17:47:35] atmosx: thin is really good at displaying only relevant info, there are a couple of gems too that remove the noise
[17:47:37] smathy: broman, then it won't be a separate vhost. Is this a public site?
[17:47:52] smathy: skyjumper, many do.
[17:48:00] skyjumper: smathy: i figured as much
[17:48:25] skyjumper: i'm looking to get into the business... wondering where to start finding clients
[17:48:42] skyjumper: everyone says freelancer.com and odesk and whatnot are close to worthless
[17:48:42] arup_r: atmosx: `p` works in only dev env :( so I made a habbit to use logger.info
[17:49:00] broman: smathy, i got it :) was on the vhost file
[17:49:04] baweaver: has joined #RubyOnRails
[17:49:23] smathy: skyjumper, not sure who "everyone" is but I disagree with that. I think those sites are great lead gen tools.
[17:49:29] towski__: has joined #RubyOnRails
[17:49:33] mcr-credil: has joined #RubyOnRails
[17:49:37] shock_one: has joined #RubyOnRails
[17:49:38] centrx: skyjumper, Someone was talking about https://www.upwork.com/ yesterday, seems to be a merger of Elance and Odesk
[17:49:41] oflannabhra: has joined #RubyOnRails
[17:49:45] elsurudo: has joined #RubyOnRails
[17:49:56] atmosx: arup_r: do you fix the errors in production?! :-P on the fly?
[17:50:30] smathy: centrx, yeah, elance got bought.
[17:50:30] arup_r: lol ... na. we have 3 servers .. QA -> Stage -> Production
[17:50:42] arup_r: atmosx: in QA I sometimes do..
[17:50:42] smathy: broman, cool.
[17:50:49] Rubie: has joined #RubyOnRails
[17:50:50] skyjumper: smathy: have you had luck there yourself?
[17:51:12] skyjumper: "people" say that the clients are mostly expecting dirt cheap commodity work
[17:51:31] smathy: skyjumper, well, dirt cheap definitely.
[17:51:44] smathy: skyjumper, most of them don't expect it to be shoddy - which is why it's great for making contacts.
[17:51:57] Guest3285: has joined #RubyOnRails
[17:52:14] smathy: skyjumper, but you have to view the discount as basically a customer acquisition cost.
[17:52:37] skyjumper: that makes sense, and jives with my past experience
[17:52:55] bendangelo: has joined #RubyOnRails
[17:53:58] smathy: skyjumper, I would generally sell my services on those sites (elance (now upwork) and scriptlance (now freelancer)) for virtually nothing, like $30 per hour. But in dozens of jobs I got through those sites I had only one or two people who didn't want more work done (which would always be at a real rate).
[17:54:51] Linuus: has joined #RubyOnRails
[17:54:55] Jasaka: has joined #RubyOnRails
[17:56:00] afrianska: has joined #RubyOnRails
[17:56:06] smathy: skyjumper, the other way I used to get clients was to take short term (like maximum of 3 months) contracts with a company. They would often have that sort of contract because they a self-contained project that they needed doing. Those sorts of things also commonly led to a lot of freelance work over the years.
[17:56:11] ranchodev: has joined #RubyOnRails
[17:56:29] skyjumper: hmmm. that's another good idea.
[17:56:40] zpe: has joined #RubyOnRails
[17:57:22] skyjumper: smathy: do you still freelance?
[17:57:55] smathy: skyjumper, the other thing I'd do would be cross-channel partners. Mostly it'd be designers, but also some specialists like javascript guys. So other programmers would be grooming their contacts in programming groups/meetups etc., but I'd be going to designer meetings, getting to know those people, because they were always looking for a good contact to offload development work to.
[17:58:32] wldcordeiro_: has joined #RubyOnRails
[17:58:52] skyjumper: yeah, that's smart. i'm always on the lookout for a designer, so makes sense
[17:59:20] FailBit: I wish my project had staging
[17:59:48] nzst: FailBit: you can setup a vagrant box
[17:59:57] nzst: FailBit: no cost to anyone
[17:59:59] banjara: has joined #RubyOnRails
[18:00:12] FailBit: I'll have to read more into vagrant
[18:00:15] pwnd_nsfw: has joined #RubyOnRails
[18:00:19] FailBit: I admittedly don't know anything about it
[18:00:20] huck5: I'm getting confused by the has_one and belongs_to relationships. If I have an Effect model that has a reference to a Feeling and an Adjustment model, then my Effect has_one Feeling and has_one Adjustment? And the Feeling/Adjustment models both belong_to the Effect? Does this require an effect_id attribute in my Feeling/Adjustment models?
[18:00:29] smathy: skyjumper, I wanted to move to the US, which I needed a visa for, hence a full time job. So I've had a full time job for the past 6 years, and I scaled back the freelance. I changed jobs last October, but wouldn't you know it, my previous employer wanted me to do some projects for them - so I'm back doing freelance but with a full time job too.
[18:00:55] oflannab_: has joined #RubyOnRails
[18:00:58] FailBit: huck5: yes
[18:01:05] pwnd_nsfw: anything with belongs_to is going to have a foreign key for each
[18:01:10] huck5: My application seems to be working with that relationship in place, but my Feeling/Adjustment models do not have an effect_id attribute. Is this OK provided I do not need the relationship to go in that direction?
[18:01:13] FailBit: in AR, the foreign key is always on the foreign table
[18:01:38] FailBit: (in mongoid it can be on both, and that especially makes HABTM relationships much easier)
[18:01:48] skyjumper: smathy: similar story here... past clients (PHP) still want work
[18:02:06] huck5: FailBit, I haven't heard of mongoid before?
[18:02:22] FailBit: huck5: Rails ORM for mongodb
[18:02:41] FailBit: is like ActiveRecord but also a lot different
[18:02:56] fschuindt: has joined #RubyOnRails
[18:02:58] SteenJobs: has joined #RubyOnRails
[18:03:16] smathy: skyjumper, good for you, so yeah - it definitely takes some work to establish a freelance career - and there are many parts of it which are not great, but if you yearn for the flexibility and excitement of it then it's a lot of fun.
[18:03:23] FailBit: personally I don't recommend using mongodb for anything
[18:03:31] eosinx: has joined #RubyOnRails
[18:03:41] huck5: FailBit, yeah. I didn't really like the sound of it. I'd rather get to know AR better
[18:03:44] FailBit: it blew up on production a couple days ago, doing table scans on an indexed field
[18:03:48] skyjumper: smathy: i'm in a full-time corporate job and feeling very restless. really miss the freedom of being independent
[18:04:00] FailBit: so I kicked it out of my in-dev project.
[18:04:02] skyjumper: plus as a freelancer you can often use whatever tech you want
[18:04:16] skyjumper: joining a corporate team means you use what they use... whether it's outdated or not
[18:04:34] huck5: FailBit, that sounds like a wise decision.
[18:04:37] smathy: skyjumper, yeah, you need to pick and choose the right full time role if you're going that way.
[18:04:52] smathy: skyjumper, it took me 3 months to find the first job, and 3 again to find my current one.
[18:04:59] skyjumper: smathy: definitely. i wasn't picky enough and am suffering the consequences
[18:05:19] someish: has joined #RubyOnRails
[18:05:41] skyjumper: they enticed me with boatloads of $, so going freelance would be a rough transition
[18:05:51] srinidhi: has joined #RubyOnRails
[18:06:23] crystal77: has joined #RubyOnRails
[18:07:15] jholm: has joined #RubyOnRails
[18:08:00] jas02: has joined #RubyOnRails
[18:08:01] cantonic_: has joined #RubyOnRails
[18:08:14] huck5: FailBit, I think the part that is confusing me is that, in my case, an Effect is made up of a Feeling and an Adjustment. So it makes sense to me that an Effect has_one Feeling/Adjustment. and likewise a Feeling/Adjustment belongs_to an effect. But I want the foreign key to be in my Effect model, so that I can go Effect.Feeling ?
[18:08:46] FailBit: that's not a foreign key tho :V
[18:08:59] huck5: OK. That clears things up a bit.
[18:09:23] FailBit: and effect.feeling is a lookup on the feelings table on effect_id
[18:09:31] rickmasta: has joined #RubyOnRails
[18:09:37] huck5: Right. Now it makes sense. Thank you!
[18:10:10] smathy: skyjumper, sure, cashflow is one of the hardest things to manage in freelance work.
[18:11:04] skyjumper: right. i did it by living cheaply and having lots of cash on hand
[18:11:08] smathy: skyjumper, definitely doing overflow work for a company with an existing dev team is something that worked well for me in those situations. Teams often have a bunch of lower priority tasks which they're happy for someone to chip away at whenever they have time.
[18:11:11] skyjumper: different situation now though
[18:11:42] smathy: I would always have a handful of clients like that, very often people I'd done contracts with previously.
[18:11:49] baweaver: has joined #RubyOnRails
[18:11:54] smathy: (so I'd know about those low priority tasks already)
[18:11:59] skyjumper: seems like you'd get stuck on a lot of busywork
[18:12:17] smathy: Depends what it is, but sure - some of it was shitty work - better than going hungry.
[18:12:40] oflannabhra: has joined #RubyOnRails
[18:12:56] smathy: I eventually had 4 employees, so cashflow was crucial to keeping the business ticking over. So those shitty things were often important.
[18:13:37] smathy: Increasing test coverage, fixing performance bottlenecks, refactoring ugly code, adding error handling, all those sorts of things.
[18:13:38] Linuus: has joined #RubyOnRails
[18:13:54] nja: has joined #RubyOnRails
[18:13:55] j_suth: has joined #RubyOnRails
[18:14:09] hardtail: has joined #RubyOnRails
[18:14:24] FailBit: that's like what I currently do for free for the board I run... lol
[18:14:35] skyjumper: you have to mix it up, i guess
[18:14:38] skyjumper: some of the boring, some of the fun
[18:14:50] nja: I'm allowed to ask Rails question here, right? This isn't like a general only chat or something?
[18:14:52] baweaver: has joined #RubyOnRails
[18:15:03] rhizome: nja: absolutely
[18:15:05] FailBit: also, goddamn newrelic is shit, how on earth are they charging $200/mo for trash
[18:15:11] lwu: has joined #RubyOnRails
[18:15:20] lwu: i have a question
[18:15:49] smathy: skyjumper, well, you have to keep clients happy so they love you, because those are the clients that will send you a project when they're on the fence about doing it themselves - and you have to keep the cash flowing.
[18:15:55] michael_mbp: has joined #RubyOnRails
[18:16:10] nja: Could anyone think of how I could select all models which have all of another type of model (array)? (has_and_belongs_to_many relationship)
[18:16:15] FailBit: lwu: you would do well to ask it
[18:16:23] skyjumper: smathy: right... any contact could lead to a great new client / new project
[18:16:26] smathy: FailBit, they were the first (or at least one of the very first) - so they're the default go-to for many companies.
[18:16:29] skyjumper: have to nurture all of them
[18:16:36] smathy: skyjumper, exactly.
[18:16:42] smathy: I mean I would have my clients actually looking for other work for me.
[18:16:50] FailBit: smathy: and I find no cheaper alternative for the site I run... :(
[18:16:52] nja: ModelA.selectallwhere({modelBs: somearray}) or something
[18:16:53] rhizome: nja: what do you mean by "all?"
[18:16:58] smathy: ...because they wanted to ensure I was successful so that I was there when they needed me.
[18:17:16] nja: rhizome: I mean it must have every one of the models (sorry if my phrasing sucks)
[18:17:23] rhizome: nja: @foo.bars.where(attr: somearray)
[18:17:28] skyjumper: sounds like what the MBAs call "synergy"
[18:17:29] lwu: I have a model, it has a property "hobbies", then in the model I was doing new_hobbies = hobbies<<"running" , self.update_attribute(:hobbies=>new_hobies)
[18:17:36] lwu: but the db never got updated
[18:17:54] lwu: but the instance self.hobbies has the all the hobbies
[18:18:11] tubbo: FailBit: you probably weren't using it correctly.
[18:18:22] tubbo: mongo is starting to grow on me, there are lots of good things about it.
[18:18:23] FailBit: tubbo: I mean its UX
[18:18:30] FailBit: oh, mongo?
[18:18:31] tubbo: FailBit: UX?
[18:18:34] tubbo: yeah mongodb :)
[18:18:43] tubbo: i've been forced into using it here at work but i've grown accustom to it
[18:18:52] smathy: FailBit, I suppose it depends on what you use them for, they've got a lot of lock-in, errr, "features", these days. Honeybadger is everything I need.
[18:18:53] FailBit: we were using it correctly, and here's something fun
[18:18:54] eGGsha: has joined #RubyOnRails
[18:19:05] lwu: but if I do new_hobbies = hobbies + ["running"], then self.update_attribute(:hobbies=>new_hobies) everything works
[18:19:13] lwu: i was using couch rest model
[18:19:20] smathy: skyjumper, mutually assured destruction? ;)
[18:19:31] sinkensabe: has joined #RubyOnRails
[18:19:31] FailBit: tubbo: half the _id queries on the tags collection it got would use the index, but half of them would do a table scan
[18:19:35] CanTonic: has joined #RubyOnRails
[18:19:57] tubbo: hmm, we've never had a situation like that
[18:19:57] nja: rhizome: Select all Models of type A which have all of the models of type B (as an array) under one of their properties. Not just from a single model.
[18:20:03] FailBit: they were all $ins, granted, but every single one should have been able to do an index lookup
[18:20:08] tubbo: FailBit: is it just 1 mongo server?
[18:20:10] smathy: skyjumper, oh, speaking of destruction. Don't fall into the trap of having clients all from the same industry (or all dependent on the same industry).
[18:20:13] lwu: anyone can help me to discuss
[18:20:18] skyjumper: hah, synergy = mutually assured success
[18:20:28] skyjumper: smathy: i already fell into that trap before
[18:20:37] smathy: skyjumper, eg. a lot of my clients were from insurance and banking. Well guess what happened to my business in 2008/9 :(
[18:20:52] bender_unit: has joined #RubyOnRails
[18:20:59] FailBit: tubbo: and about 6mo ago
[18:21:10] FailBit: we upgraded production to 3.0 from 2.6
[18:21:15] skyjumper: smathy: those are still good industries to work for... willing and able to pay for things
[18:21:20] tubbo: yeah we're using 3.0 now i believe
[18:21:26] tubbo: in a cluster
[18:21:26] rhizome: nja: convert to a has_many through so you can query on the join
[18:21:35] FailBit: and got this horrid pagination regression with selecting on one field and sorting on another
[18:21:37] tubbo: FailBit: we're not using mongo to return collections pretty much
[18:21:58] FailBit: ie Post.where(topic_id: t).asc(:created_at)
[18:22:12] FailBit: there are separate indexes and a compound index on those fields
[18:22:12] smathy: lwu, look at the docs for update_attribute: http://devdocs.io/rails/activerecord/persistence#method-i-update_attribute
[18:22:29] smathy: lwu, especially at the arguments it accepts.
[18:22:32] FailBit: do you like waiting 50 seconds for a query in your webapp?
[18:22:56] tubbo: heh, yeah
[18:23:29] tubbo: FailBit: we've never had that happen
[18:23:30] smathy: skyjumper, great industries, as clients they have bucket loads of cash and don't play the same games as many others.
[18:23:39] FailBit: you can't realistically use mongo 3.0 to back a forum
[18:23:41] FailBit: don't do it
[18:23:47] skyjumper: smathy: yeah i'd imagine less BS with that crowd
[18:23:50] FailBit: you will hit this regression
[18:23:55] FailBit: it is a nightmare
[18:23:58] smathy: skyjumper, just gotta not have them as 80% of your business in a insurance/banking recession :)
[18:24:05] skyjumper: i focused on custom CMS/light apps for small business, and wix.com killed me
[18:24:10] FailBit: we have had to use elasticsearch to paginate posts
[18:24:16] lwu: @smathy I was using couchrest
[18:24:16] smathy: skyjumper, ah, right :)
[18:24:24] skyjumper: hell of a rally for a few years though
[18:24:29] tubbo: FailBit: we use elasticsearch for almost all of our collection retrieval, which is probably why we haven't hit it yet
[18:24:45] lwu: and I think it should be something wrong with the way I assign to the hobbies
[18:24:46] tubbo: FailBit: all of my queries are coming back in sub-second time frames
[18:24:58] smathy: lwu, for future - you should lead with anything you're doing that is not latest-version standard Rails.
[18:25:01] lwu: update_attribute works fine
[18:25:04] FailBit: tubbo: we have 2ms queries on some collections
[18:25:06] tubbo: so all the "indexing" is really being done with ES
[18:25:10] FailBit: but $in is like
[18:25:17] FailBit: it can't handle it
[18:25:19] bender_unit: quick question: I have a datetime field in a model that's not initializing properly. It works for "09/09/2015 11:16 AM", but not "09/23/2015 03:15 PM".
[18:25:31] FailBit: oh and even better, $nin can't use indexes
[18:25:32] bender_unit: I have Time::DATE_FORMATS[:default] = "%m/%d/%Y %I:%M %p" set in an initializer
[18:25:37] tubbo: FailBit: i suppose we *are* using $in somewhere, to get all the actual records for search results
[18:25:37] smathy: lwu, so, CouchRest doesn't even have an update_attribute method.
[18:26:05] lwu: @smathy http://www.rubydoc.info/github/couchrest/couchrest_model/CouchRest%2FModel%2FPersistence%3Aupdate_attributes
[18:26:09] bender_unit: but calling .to_datetime on the second string still causes ArgumentError: invalid date
[18:26:37] lwu: @smathy, I sent the link, it has~
[18:26:38] eosinx: has left #RubyOnRails: ()
[18:26:38] smathy: lwu, right, as I said, CouchRest doesn't have an update_attribute method.
[18:26:56] rhizome: bender_unit: do we already know what "not initializing properly" means?
[18:27:07] oldbay: has joined #RubyOnRails
[18:27:33] jgt1: has joined #RubyOnRails
[18:27:35] lwu: smithy, I am confused. I saw the method on couch rest model page
[18:27:42] bender_unit: rhizome as I've said below, it's probably because .to_datetime fails on the second string but not the first
[18:27:50] greengriminal: has joined #RubyOnRails
[18:28:16] bender_unit: rhizome i.e. on the console, "09/23/2015 03:15 PM".to_datetime fails, but "09/09/2015 11:16 AM".to_datetime works
[18:28:21] lwu: and I think the issue is not about update_attribute
[18:28:30] baweaver: has joined #RubyOnRails
[18:28:45] rhizome: bender_unit: that's weird.
[18:29:04] Dzejmskrokan: has joined #RubyOnRails
[18:29:08] bender_unit: rhizome right?
[18:29:13] lwu: @smathy, because I tried to change the way to make hobbies array with the same update_attribute, it works
[18:29:14] rhizome: i haven't had great luck with date format initializers
[18:29:20] bender_unit: rhizome so I'm just wondering if I've missed something here
[18:29:25] xybre: has joined #RubyOnRails
[18:29:27] oflannab_: has joined #RubyOnRails
[18:29:30] lwu: @smathy,which means it is not update_attributes issue
[18:29:54] bender_unit: rhizome I have a config/initializers/date_format.rb with the following content:
[18:29:54] bender_unit: Date::DATE_FORMATS[:default] = "%m/%d/%Y"
[18:29:55] bender_unit: Time::DATE_FORMATS[:default] = "%m/%d/%Y %I:%M %p"
[18:30:28] dman777_alter: does rails have a convience method on request.body to test if it is a string or json?
[18:31:00] smathy: lwu, no, what it means is that you're not showing us the actual code you're using, which makes it impossible to help you with your issue.
[18:31:02] smathy: lwu, !code
[18:31:02] helpa: lwu: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[18:31:09] baweaver: has joined #RubyOnRails
[18:31:21] dman777_alter: I guess that is a bad question....does it have convience method to see if response.body would be a valid json?
[18:31:36] dman777_alter: like body.to_j?
[18:31:59] FailBit: response.format == :json ?
[18:32:14] FailBit: ACTION cannot brain rn
[18:32:28] rhizome: u misspelled brane
[18:32:42] bronson: has joined #RubyOnRails
[18:33:26] rhizome: nja: have you tried this way? http://stackoverflow.com/a/17870763/135845
[18:33:30] lwu: @smathy, I showed the code just now. I think it was swallowed by those huge messages......Let me type again
[18:34:20] nja: rhizome: wrong person?
[18:34:31] nja: rhizome: /link
[18:34:37] smathy: lwu, just while you're typing, if it's not in a gist then I'm not looking at it.
[18:34:39] rhizome: ahaha, sorry
[18:34:42] rhizome: bender_unit: ^^
[18:35:00] huck5: Hey FailBit, I've now set up (what I hope is) the correct relationship in my application. I'm now trying to create an f.collection_select within my Effects view, that should be populated with all the Feelings in the database. https://gist.github.com/Huck5/fa8efa62fc455e99fc79#file-_form-html-erb-L18
[18:35:42] huck5: I'm not sure what to put as the first parameter in the f.collection_select. The snippet in the gist is what I used in my previous relationship configuration, where an Effect belonged_to a Feeling. (Which I have now reversed).
[18:35:50] yaymukund: has joined #RubyOnRails
[18:36:41] bender_unit: rhizome: I did. I have the same formats set there as in the initializer
[18:37:40] lwu: class Queue < CouchRest::Model::Base
[18:37:41] lwu: collection_of :av_port_groups
[18:37:41] lwu: def add_port_group(port_group)
[18:37:41] lwu: #this does not work
[18:37:41] lwu: #new_port_group_ids = av_port_group_ids << port_group.id
[18:37:41] Dzejmskrokan: has joined #RubyOnRails
[18:37:41] lwu: #this works
[18:37:43] lwu: new_port_group_ids = av_port_group_ids + [port_group.id]
[18:37:45] lwu: self.update_attributes(:av_port_group_ids => new_port_group_ids)
[18:37:51] lwu: @smathy
[18:37:51] huck5: Oh hold on. I must have just made a typo somewhere, sorry. The Feeling is populating properly, it's just the Adjustment that isn't.
[18:37:52] rhizome: i would test it by disabling the initializer
[18:38:00] smathy: lwu, !rules
[18:38:00] helpa: lwu: https://gist.github.com/996779
[18:38:02] oflannabhra: has joined #RubyOnRails
[18:38:05] smathy: Do not do that again please.
[18:38:24] lwu: sorry~~~
[18:38:31] lwu: let me take a look
[18:39:10] cantonic_: has joined #RubyOnRails
[18:39:21] nja: has joined #RubyOnRails
[18:39:55] drale2k: has joined #RubyOnRails
[18:40:19] huck5: FailBit, I figured it out. Just pass the model name in instead.
[18:40:22] blackmesa: has joined #RubyOnRails
[18:40:36] ruurd: has joined #RubyOnRails
[18:41:07] liquid-silence: has joined #RubyOnRails
[18:41:20] ArTiSTiX: has joined #RubyOnRails
[18:42:09] dnewkerk: has joined #RubyOnRails
[18:42:19] alphaatom: has joined #RubyOnRails
[18:42:37] ernesto_jimenez: has joined #RubyOnRails
[18:42:55] aep: has joined #RubyOnRails
[18:43:00] masscrx: has joined #RubyOnRails
[18:44:14] oldbay: has joined #RubyOnRails
[18:44:17] ciree: anyway to get index using enumerable find? like I'd like to have that passed into the block
[18:44:26] ciree: or another way to solve my problem
[18:45:33] alexUaN: has joined #RubyOnRails
[18:45:57] nja: rhizome: In rails c, I'm now at "pp ModelA.joins(:modelBs).where(modelBs: {id: [1,2]})"
[18:46:02] artto: has joined #RubyOnRails
[18:46:10] arup_r: >> a = [1,2,3]; p a.each_index.find { |i| a[i] == 2 }
[18:46:15] rhizome: bender_unit: wait, are you calling on a datetime, from your model attr, or on a string? your description and examples are at odds
[18:46:20] arup_r: ciree: ^^
[18:46:38] rhizome: nja: not into doing the HMT conversion?
[18:46:38] nja: rhizome: I just want it to find model As that have all of those model Bs
[18:46:39] someish: has joined #RubyOnRails
[18:47:16] CanTonic: has joined #RubyOnRails
[18:47:21] bender_unit: rhizome, I have a model with datetime fields, but when I initialize it with a hash the datetime fields don't get set
[18:47:42] bender_unit: rhizome: I tracked it down to .to_datetime not working properly
[18:48:01] bender_unit: rhizome: AFAIK that's what the model initializer does when setting the fields
[18:48:09] arup_r: bender_unit: A gist with rails console try please
[18:48:12] ciree: arup_r: thanks!
[18:48:40] rhizome: bender_unit: where did you track it down?
[18:49:12] pecpec: has joined #RubyOnRails
[18:49:22] choke: has joined #RubyOnRails
[18:50:41] artto: has joined #RubyOnRails
[18:52:21] greengriminal: has joined #RubyOnRails
[18:52:55] momomomomo: has joined #RubyOnRails
[18:53:20] nja: Any idea how to make `Category.joins(:roles).where(roles: {id: [1,2]})` match only categories which have roles of id 1 AND 2 (not 1 or 2)?
[18:53:21] pecpec_: has joined #RubyOnRails
[18:53:26] bender_unit: arup_r you bet: https://gist.github.com/PandaWhisperer/57a5e4c7435e492bb691
[18:53:48] smathy: nja, how would something have an id of both 1 and 2 ?
[18:54:12] nja: smathy: Categories have multiple roles
[18:55:25] smathy: Oh, sorry - I see what you're after. So you want to see all categories that are associated to both Role(id=1) and Role(id=2)?
[18:55:36] nja: smathy: exactly
[18:55:55] bender_unit: rhizome: https://gist.github.com/PandaWhisperer/57a5e4c7435e492bb691
[18:56:18] bender_unit: rhizome: that's essentially the steps I took
[18:56:58] Palsson: has joined #RubyOnRails
[18:57:19] rhizome: sure. this is odd: appointment: nil
[18:57:33] bender_unit: rhizome: EXACTLY
[18:57:38] rubyonrails588: has joined #RubyOnRails
[18:57:56] bender_unit: rhizome: it looks like whatever rails is doing to convert things, it silently swallows up the exception
[18:58:03] platzhirsch: has joined #RubyOnRails
[18:58:13] rhizome: are you overriding appointment= in that model? is it actually a datetime data type in the db?
[18:58:17] platzhirsch: Is there a way to find all subclasses of ActiveRecordError?
[18:58:19] bender_unit: rhizome: nope
[18:58:23] nja: smathy: have you got any ideas?
[18:58:40] turbo_MaCk: has joined #RubyOnRails
[19:00:58] rubyonrails588: are you able to see this
[19:01:00] jsuth_: has joined #RubyOnRails
[19:01:04] platzhirsch: http://www.rubydoc.info/docs/rails/4.0.0/ActiveRecord/ActiveRecordError thanks
[19:01:17] bender_unit: rhizome: arup_r: just added my model and migration to the gist as well
[19:01:19] rubyonrails588: Am I muted right now
[19:01:48] lwu: Sorry about it, I am new to free node. I read the rules, and created my questions on https://gist.github.com/lianwu/ec429458067ec80341e6
[19:01:57] arup_r: I see rubyonrails588
[19:02:03] AllNamesTaken99: has joined #RubyOnRails
[19:03:04] smathy: nja, is there a join table between Category and Role?
[19:04:07] TomyLobo: has joined #RubyOnRails
[19:04:15] hatefreelancing: has joined #RubyOnRails
[19:04:18] nja: smathy: yeah. the line "Category.joins(:roles).where(roles: {id: [1,2]})" works but I want AND not OR
[19:04:36] rhizome: smathy: HABTM
[19:04:36] smathy: nja, so Role has_many :categories?
[19:04:59] nja: smathy: Both has_and_belongs_to_many each other
[19:05:14] mylord: has joined #RubyOnRails
[19:05:20] hatefreelancing: Is anyone able to see my text
[19:05:27] FailBit: you're fine
[19:05:28] smathy: (shh everyone, ultimate troll)
[19:05:33] rhizome: hey everone its the guy who dislikes the idea of freelancing
[19:05:36] smathy: Damnit FailBit !
[19:05:44] hatefreelancing: freelancing makes me want to give up on life
[19:05:47] craysiii: does anyone here like freelancing
[19:05:51] FailBit: oh right I forgot I can't kickban people here :C
[19:05:55] centrx: haven't you given up already by coming here?
[19:05:57] FailBit: I'm used to having all da powah
[19:06:25] Linuus: has joined #RubyOnRails
[19:06:38] hatefreelancing: The problem I have with freelancing is I'm just a freaking beginner, if I'm legitimately stuck on something I can't just show the project and someone solve it for me
[19:06:41] hatefreelancing: I just stay stuck
[19:06:41] arup_r: craysiii: why ?
[19:06:54] craysiii: i was joking lol
[19:06:57] rhizome: hatefreelancing: well, the world needs ditch diggers too
[19:07:29] hatefreelancing: freelancing would make sense if you're actually a good programmer, if you're not then everything you do is a nightmare cause it's on your own
[19:07:37] lwu_: has joined #RubyOnRails
[19:07:43] craysiii: then why are you freelancing?
[19:07:50] rhizome: you probably shouldn't freelance then
[19:07:53] Scriptonaut: has joined #RubyOnRails
[19:07:59] hatefreelancing: can't find a full-time job, so I'm always stuck as a sole developer
[19:08:24] hatefreelancing: I'm stuck on something that's likely extremely simple but I can't figure it out, I have to import my sql file into the rails database
[19:08:26] mustmodify: has joined #RubyOnRails
[19:08:34] FailBit: rake db:schema:load
[19:08:36] hatefreelancing: I tried stackoverflow but I get my own errors, meaning my comprehension level is low
[19:08:50] hatefreelancing: so people tell me the answers but I don't understand still
[19:09:30] hatefreelancing: I read the documentation and I still don't understand, it's why I think I should be on a team instead of freelancing to survive
[19:10:06] blackmesa: has joined #RubyOnRails
[19:10:16] hatefreelancing: Am I the only person who legitimately gets stuck on something in rails, even if I ask questions on stackoverflow I'm still stuck for a long time?
[19:10:23] mustmodify: So according to Tell Don't Ask, if I have a Message and it may be in one of two formats, and I want it parsed, I should tell some object to do that. But according to other philosophical bits whose names I've forgotten, you should have verb-objects, just noun-objects... though I never really understood that one. So should I create a MessageHandler object that determins the format of the message and delegates to the correct parser? OR what?
[19:10:38] smathy: nja, I think this will work: Category.joins(:roles).where(roles:{id:[1,2]}).having("COUNT(bars.id) = 2").group("bars.id")
[19:10:42] maz-dev: has joined #RubyOnRails
[19:10:51] smathy: Sorry, >= 2
[19:11:00] smathy: Oh no, = 2 was right.
[19:11:39] arup_r: mustmodify: You need to implement ducktyping and you are done as per your problem statement
[19:11:43] oflannabhra: has joined #RubyOnRails
[19:12:02] hatefreelancing: Does anyone have a guide to improve my comprehension level when coding?
[19:12:04] momomomomo: smathy: can't you do substitution in having? .having('COUNT(bars.id) = ?', 2)
[19:12:18] arup_r: momomomomo: no
[19:12:18] momomomomo: hatefreelancing: try reading railstutorial.org
[19:12:24] momomomomo: arup_r: oh, well that's wack
[19:12:33] momomomomo: why not just do a .where(....)
[19:12:42] hatefreelancing: I read a couple rails & ruby books. But by comprehension I mean my problem solving abilities and understanding what people are talking about
[19:12:47] Maletor: has joined #RubyOnRails
[19:12:50] momomomomo: ah it actually uses HAVING
[19:12:51] bender_unit: has joined #RubyOnRails
[19:12:59] hatefreelancing: I know how to use rails & ruby but if let's say I get stuck and ask for help, I don't understand what people are talking about
[19:13:03] smathy: hatefreelancing, freelancing (and the unavoidable autodidactic aspect of it) is not for everyone.
[19:13:05] cnk: hatefreelancing: Are there any Rails meetups near you?
[19:13:15] momomomomo: hatefreelancing: so enhance your knowledge by reading a book or documentation
[19:13:17] cnk: that might give you folks to talk to
[19:13:33] cnk: there are a ton of study groups in the Los Angeles area.
[19:13:36] momomomomo: go through the rails guides, read through rails tutorial, read a ruby book like
[19:13:41] helpa: Learn Ruby by reading this book - http://manning.com/black3 - The Well-Grounded Rubyist by David A. Black
[19:13:49] rhizome: how does a baby learn to talk?
[19:13:55] smathy: momomomomo, yes, don't know that that gains you anything here because you're creating 2
[19:14:00] momomomomo: rhizome: by watching tv
[19:14:15] hatefreelancing: I read at least 15 rails guides possibly at this point.
[19:14:30] arup_r: hatefreelancing: shut up please
[19:14:30] rhizome: you've really done all you can do. maybe time to choose a different line of work
[19:14:40] momomomomo: hatefreelancing: or try learning more about comp sci
[19:14:43] smathy: momomomomo, not sure if where will work here with the join and the count and so forth.
[19:14:43] arup_r: I am already frustrated..
[19:14:46] momomomomo: hatefreelancing: cs50.net is a great resource
[19:14:52] momomomomo: to get started at least
[19:15:23] HAL2328: what's all the commotion
[19:15:46] fschuindt: has joined #RubyOnRails
[19:16:07] smathy: I *still* occasionally need to tell clients that I don't know something and will need to spend some time learning it (which I won't bill them for).
[19:16:11] ngscheurich: has joined #RubyOnRails
[19:16:14] momomomomo: smathy: also where will work, or at least a sub query would, but I don't know how to do that in AR
[19:16:21] alphaatom: has joined #RubyOnRails
[19:16:30] smathy: ...but, if you're not autodidactic then freelancing (or any individual pursuit) is probably not for you.
[19:16:49] HAL2328: anyone here familiar with conemu + rails console? i'm not sure if this is a general behavior but, when I write long command, it just truncates it
[19:16:51] smathy: momomomomo, so you're saying where will work, but it might not ;)
[19:16:52] hatefreelancing: I think the problem is there's no peer feedback in freelancing. You read some books, ask some questions online and just try to do things
[19:17:00] smathy: momomomomo, having.group will work - which is why I used it :)
[19:17:03] hatefreelancing: but you will never ever get any kind feedback from developers on your work
[19:17:03] craysiii: anyone ever have pry console just freak the fk out and crash your terminal?
[19:17:15] momomomomo: smathy: true, but dat raw sql input variable
[19:17:44] mustmodify: has left #RubyOnRails: ()
[19:18:06] momomomomo: hatefreelancing: nah, you just have to be hungry to always learn about convention, idiomatic techniques, etc.
[19:18:11] oldbay: has joined #RubyOnRails
[19:18:18] momomomomo: and truly understand the system you're using, not just *how* to use it
[19:18:19] smathy: hatefreelancing, clients would often have their own dev team that they'd get to review my work, and you can always find friends online to bounce things back and forth with.
[19:18:52] smathy: hatefreelancing, but yeah, for the most part, a freelancer *is* the expert. So you're expected to know your stuff.
[19:19:06] smathy: It's only a problem if you're not autodidactic.
[19:19:34] jtperreault: hatefreelancing: if you have not peers to review your code, you might try posting things here for a bit of feedback: http://codereview.stackexchange.com/
[19:19:40] tubbo: hatefreelancing: everyone gets stuck sometimes
[19:20:04] craysiii: https://gist.github.com/craysiii/0b0cde2c668fce5dbade can anyone see why my pundit .destroy? policy isn't working correctly
[19:20:15] JamesDH: has joined #RubyOnRails
[19:20:17] craysiii: its allowing users who aren't the owner or admin to delete entries.
[19:20:30] cnk: What is that site with the peer code reviews, exorcism.io or something like that?
[19:20:48] hatefreelancing: thanks I bookmarked it, I think the biggest problem is I take on work that always involves something different, and 100% of projects I done have been out of my comfort.
[19:20:51] smathy: tubbo, I disagree.
[19:21:01] cnk: hatefreelancing: you might like that site. Katrina Owen started ithttp://exercism.io/
[19:21:03] smathy: tubbo, I think everyone falls back to code that they know is not ideal.
[19:21:09] smathy: tubbo, but I've never been stuck.
[19:21:15] smathy: (and I don't think I'm alone)
[19:21:17] tubbo: oh i just mean like, "fuck i can't figure out why i'm getting this error"
[19:21:35] tubbo: but not having anyone to help me
[19:21:44] jtperreault: hatefreelancing: frustrating to feel that way, but feel good that you're expanding knowledge quickly and by force. usually happens much slower
[19:21:45] smathy: tubbo, sure, but you'll just find a workaround.
[19:22:11] arup_r: cnk: you are really helpful. Hatsoff!
[19:22:19] sandstrom: has joined #RubyOnRails
[19:22:29] tubbo: hatefreelancing: why can't you get a job on a team?
[19:22:48] craysiii: can you guys take it into #ruby-offtopic
[19:22:52] craysiii: sorry people
[19:22:58] cnk: Been in that position so...
[19:23:03] esauOp: has joined #RubyOnRails
[19:23:21] hatefreelancing: ok what I'm stuck on https://gist.github.com/Polyglotting/f8584a0fd8338e748c9a importing the sql file to my database.yml file
[19:23:34] arup_r: I see now
[19:24:03] lwu_: I have one here too https://gist.github.com/lianwu/ec429458067ec80341e6
[19:24:08] banister: has joined #RubyOnRails
[19:24:11] arup_r: craysiii: I lost your question :p
[19:24:14] hatefreelancing: I assume it's mysql -u AETL -p aepm_production < AETL-production.sql but I get "access denied for user AETL @ localhost" password: NO
[19:24:22] tubbo: arup_r: your client sucks :P
[19:24:23] nja: smathy: That wouldn't necessarily work. I could be looking for [1,2] and it has [1,3] and it will still be returned.
[19:24:29] craysiii: arup_r https://gist.github.com/craysiii/0b0cde2c668fce5dbade my pundit policy is being a bad person
[19:24:34] tubbo: craysiii: you might need to provide the source for `policy`, is that even a pundit method?
[19:24:37] krisquigley: has joined #RubyOnRails
[19:24:39] lwu_: i am just curious why it is happening
[19:24:45] craysiii: it is a pundit method
[19:25:13] borodin: has joined #RubyOnRails
[19:25:26] cnk: hatefreelancing: So your connection to the db is wrong. Ignore the import part and just figure out how to connect
[19:25:34] GJdan: has joined #RubyOnRails
[19:25:50] smathy: nja, only if you put [1,3] in the `where` clause.
[19:25:55] craysiii: i love it when bing loads faster than google on chromium -.-
[19:26:08] hatefreelancing: cnk this is where my comprehension fails, I don't know how to connect.
[19:26:45] nja: smathy: It will check whether it has a role ID of 1 or 2 which it will by having [1,3] and then check that there are two roles and still be returned
[19:26:55] cnk: so where is this database? local? installed how?
[19:27:06] cnk: at a guess you need something like -h
[19:27:21] cnk: try adding that to your mysql command and see if you can get in
[19:27:27] safety_cut: has joined #RubyOnRails
[19:27:36] smathy: nja, what? It will only return records which match that `where`, so bars.id=3 will not be returned in the result set.
[19:27:54] cnk: this is probably something like a socket connection vs binding to localhost
[19:27:58] smathy: ...err roles.id
[19:28:21] hatefreelancing: I don't know it was pointing to a local IP in someones office at first and I changed it to localhost
[19:28:41] nja: smathy: then I don't understand your solution
[19:28:43] smathy: So for the category which has roles.id 1 and 3 the Category.joins(:roles).where(roles:{id:[1,2]}) will only return one row, the roles.id=1 row, and therefore the having will fail because the count will be 1 not 2.
[19:28:46] ruurd: has joined #RubyOnRails
[19:28:54] smathy: nja, did you try running it and it didn't work?
[19:29:15] sargas: has joined #RubyOnRails
[19:29:38] nja: smathy: Category.joins(:roles).where(roles:{id:[1,2]}).having("COUNT(bars.id) = 2").group("bars.id") What is bar and bars in this case?
[19:30:24] nja: role and roles?
[19:30:36] yfeldblum: has joined #RubyOnRails
[19:30:53] smathy: Sorry, all "bars" in there should be "roles"
[19:31:02] smathy: COUNT(roles.id) and group("roles.id")
[19:31:22] nja: Well that's what I tried and I get `ActiveRecord::StatementInvalid: PG::GroupingError: ERROR: column "categories.id" must appear in the GROUP BY clause or be used in an aggregate function
[19:31:45] cnk: hatefreelancing: so do you have a local MySQL database running on your machine?
[19:31:50] arBmind: has joined #RubyOnRails
[19:31:51] smathy: nja, that says you changed the count to COUNT(categories.id) instead of COUNT(roles.id) as I just said to.
[19:31:59] hatefreelancing: I'm not sure cnk, all I did was install mysql
[19:32:04] oldbay: has joined #RubyOnRails
[19:32:06] craysiii: arup_r it was because User#admin? had code as such: role = 'admin', instead of role == 'admin'
[19:32:17] nja: smathy: Category.joins(:roles).where(roles:{id:[1,2]}).having("COUNT(roles.id) = 2").group("categories.id") returns a value
[19:32:22] artto: has joined #RubyOnRails
[19:32:35] FailBit: our code isn't structured quite like that. :p
[19:32:36] smathy: nja, c'mon.
[19:32:43] FailBit: we use cancancan for authorization
[19:32:43] smathy: nja, [13:30:52] smathy: Sorry, all "bars" in there should be "roles"
[19:32:49] jenrzzz: has joined #RubyOnRails
[19:32:50] smathy: nja, [13:31:01] smathy: COUNT(roles.id) and group("roles.id")
[19:32:55] rhizome: so glad this is taking hours
[19:33:15] jgladwill: has joined #RubyOnRails
[19:33:15] jgladwill: has joined #RubyOnRails
[19:33:25] nja: smathy: that throws the error I posted, replacing the group with categories.id it returns something
[19:33:30] rhizome: ACTION dying
[19:33:56] valetudo: has joined #RubyOnRails
[19:34:03] maz-dev: has joined #RubyOnRails
[19:34:08] artto: has joined #RubyOnRails
[19:34:27] smathy: nja, no, your error came because you had COUNT(categories.id) with group("roles.id")
[19:34:36] smathy: COUNT is the aggregate function.
[19:34:54] nja: pp Category.joins(:roles).where(roles:{id:[1,4]}).having("COUNT(roles.id) = 2").group("roles.id") ==> Error
[19:35:00] rhizome: ACTION dead
[19:35:08] nja: pp Category.joins(:roles).where(roles:{id:[1,4]}).having("COUNT(roles.id) = 2").group("categories.id") ==> Relation
[19:36:00] jholm: has joined #RubyOnRails
[19:36:07] smathy: nja, ok, I'm surprised, but I suppose that would work - yeah, because you're grouping by the source table.
[19:36:12] elsurudo: has joined #RubyOnRails
[19:36:37] smathy: nja, so, you're saying that this shows Categories which don't have BOTH Role 1 and 4 associations?
[19:37:39] nja: smathy: I can't actually prove it (very little data in DB) but surely that is just getting all categores which have a role of id 1 or 4 and which have 2 roles?
[19:37:51] arup_r: I have to relook at your problem craysiii
[19:38:01] arup_r: What is the error ?
[19:38:03] craysiii: its already solved
[19:38:05] nja: therefore if a category had a role of 1 and 3 it meets the above conditions
[19:38:11] craysiii: i used = instead of == in User.admin?
[19:38:13] nja: *roles of
[19:38:52] smathy: nja, "surely" :)
[19:39:11] smathy: nja, you think that the HAVING issues a new query against the DB?
[19:39:37] nja: smathy: I'm very very new to rails
[19:40:04] smathy: nja, it just operates on the results returned. Ie. the HAVING only ever sees the results of the JOIN query that HAS ALREADY LIMITED the results to only those that match the WHERE clause.
[19:40:04] nja: smathy: I really don't follow
[19:40:44] smathy: nja, so instead of guessing that it won't work, why don't you ask more questions about the explanations for how it does work that I'm giving you.
[19:41:12] bender_unit: has joined #RubyOnRails
[19:42:28] oflannab_: has joined #RubyOnRails
[19:43:31] mcr-credil: has joined #RubyOnRails
[19:43:44] nja: smathy: What does .having("COUNT(roles.id) = 2").group("categories.id") actually do then?
[19:43:46] rakm: has joined #RubyOnRails
[19:43:51] Kallis: has joined #RubyOnRails
[19:44:02] smathy: nja, adds the corresponding HAVING and GROUP BY clauses to the SQL.
[19:44:14] nja: smathy: Why does it not just find all of the previous records which have two roles?
[19:44:18] smathy: nja, you should be able to see that SQL in your rails console (or logs).
[19:44:36] smathy: nja, what do you mean "previous records"?
[19:45:08] nja: smathy: All the categories which have id 1 or 4
[19:45:11] FreeKevi_: has joined #RubyOnRails
[19:47:56] smathy: nja, do you know how an SQL join works?
[19:48:12] greengriminal: has joined #RubyOnRails
[19:48:46] nja: smathy: makes it so that the columns from the other table are usable?
[19:48:53] smathy: nja, ok, so no :)
[19:48:55] gerep: has joined #RubyOnRails
[19:49:07] smathy: nja, so in your rails console just run: Category.joins(:roles) and see the output.
[19:49:44] smathy: ...specifically, see how you get the same Category record output over and over again.
[19:50:20] gerep: Hello good people! I have these validations and I need to add a uniqueness validation to "from" and "to" but just for that RangeCost that belongs to TransactionCost
[19:50:25] gerep: https://gist.github.com/gerep/6412fcce25e0ca4e6259
[19:50:31] nja: smathy: ?
[19:50:57] ruurd: has joined #RubyOnRails
[19:51:13] nja: smathy: The records seem to be in a different order
[19:51:20] nja: smathy: that's all I notice
[19:51:32] nja: (comapred with Category.all)
[19:51:35] nja: *compared)
[19:51:36] smathy: gerep, http://devdocs.io/rails/activerecord/validations/classmethods#method-i-validates_uniqueness_of look at the :scope option.
[19:51:58] smathy: nja, you're not seeing the same record repeated more than once?
[19:51:59] roxtrongo: has joined #RubyOnRails
[19:52:09] gerep: smathy, thanks ;)
[19:52:22] nja: smathy: no, just in some arbitrary but repeatable order
[19:52:48] smathy: nja, so you mustn't have more than one role for any category right now.
[19:52:58] smathy: nja, add an extra role for a single category.
[19:53:10] sinkensabe: has joined #RubyOnRails
[19:53:12] greengriminal: has joined #RubyOnRails
[19:53:17] nja: Some categories do have multiple roles though
[19:53:51] smathy: nja, then you'll see those categories repeated in the Category.joins(:roles) output.
[19:53:53] safety_cut: has joined #RubyOnRails
[19:53:59] someish: has joined #RubyOnRails
[19:54:33] Cervajz_: has joined #RubyOnRails
[19:54:36] nja: smathy: using pp ... (to see more categories) yes some are repeated
[19:54:46] nja: smathy: oh I see now
[19:55:03] nja: smathy: the ones with 1 and 4 for example get matched twice so will appear twice?
[19:56:03] workmad3: has joined #RubyOnRails
[19:56:34] da7id_: has joined #RubyOnRails
[19:56:53] smathy: nja, right, so what you don't see in the Rails output is the other side of the join.
[19:56:53] nja: smathy: Category.joins(:roles).where(roles:{id:[1,2]}).having("COUNT(categories.id) = 2").group("categories.id") might make more sense though because it will be that particular categories ID which will occur twice
[19:57:25] smathy: nja, so just to demonstrate, run this: Category.joins(:roles).pluck('*')
[19:57:45] smathy: nja, that will show you all the fields, from both tables (all three tables actually, including the habtm join table).
[19:58:00] nja: smathy: yes
[19:58:05] smathy: nja, you will be able to see the two different roles.
[19:58:10] qejk: has joined #RubyOnRails
[19:58:18] smathy: (for the same category)
[19:58:30] VeryBewitching: has joined #RubyOnRails
[19:59:02] smathy: nja, no, the above query makes no sense because when you group by categories.id then you are collapsing the multiple rows for each categories.id into a single row.
[19:59:21] smathy: ...so COUNT(categories.id) for a group("categories.id") will always be 1
[19:59:31] sandstrom: has joined #RubyOnRails
[20:00:28] tejasmanohar: has joined #RubyOnRails
[20:00:37] smathy: nja, anyway, don't jump ahead.
[20:01:24] smathy: nja, now that you've seen the raw results of the Category.joins(:roles) I want you to add the where clause. Add the pluck onto the end again so you can see the full results, so: Category.joins(:roles).where(roles:{id:[1,4]}).pluck('*')
[20:01:38] turbo_MaCk: has joined #RubyOnRails
[20:02:16] yaymukund: has joined #RubyOnRails
[20:02:18] greengriminal: has joined #RubyOnRails
[20:03:03] benlieb: has joined #RubyOnRails
[20:03:18] umgrosscol: has joined #RubyOnRails
[20:04:03] Coldblackice: has joined #RubyOnRails
[20:04:16] lwu_: has joined #RubyOnRails
[20:05:01] drale2k: has joined #RubyOnRails
[20:05:02] nja: smathy: yup, some show more than once with there matched role showing respectively
[20:05:06] FailBit: how do composite indexes work?
[20:05:31] JamesDH: has joined #RubyOnRails
[20:05:37] bricker: B-Tree usually
[20:05:55] hatefreelancing: Thanks for the help everyone, my problem has been fixed thanks to cnk, but still thanks for advice.
[20:05:56] FailBit: I understand btree
[20:06:00] FailBit: but how is it implemented
[20:06:02] smathy: nja, right, so now add the WHERE as I mentioned above
[20:06:05] FailBit: is it 2 levels of btree?
[20:06:31] nja: smathy: having and group?
[20:06:43] smathy: No, the where.
[20:06:49] momomomomo_: has joined #RubyOnRails
[20:07:02] smathy: Oh, you did that already?
[20:07:04] dman777_alter: Rails keeps giving a 204 no content, although I have have verified that there is content in the response with puts: response = JSON.parse("{ \"message\": \"#{response.body}\" }"); respond_with response, location: nil. Any idea why?
[20:07:17] FailBit: dman777_alter: cooooode
[20:07:17] smathy: When you said that some showed more than once, you mean that some showed twice right?
[20:07:25] smathy: This is kinda the important bit.
[20:07:30] nja: smathy: yes
[20:07:40] nja: smathy: twice
[20:07:53] smathy: Right, so that's why when we group them we're only ever going to get a count of 1 or 2
[20:08:18] smathy: ...because we've got that WHERE in there that cut the total records to only those which matched the roles.id you specified.
[20:09:23] nja: smathy: I group_by records with the same ID so they kinda merge?
[20:09:27] dman777_alter: FailBit: http://dpaste.com/0QF5VG1 This is only with the DELETE case. I have verified with puts there is a json {"message"=>"Record was deleted"}
[20:10:01] finnnnnnnnnnn: has joined #RubyOnRails
[20:10:13] craysiii: is there a way i can test if a certain param is being sent in a form in my controller? say I have Model X with attribute private, and I want to see in #update if the attribute is being set or not
[20:11:22] annlewis: has joined #RubyOnRails
[20:11:29] smathy: nja, kinda, different DBs handle it a bit differently. Postgres requires the SQL to tell it what to do with the fields that are being lost - there has to be some sort of aggregation.
[20:11:59] arup_r: craysiii: http://api.rubyonrails.org/classes/ActiveModel/Dirty.html#method-i-changed-3F
[20:12:01] smathy: nja, mysql, for example, will just pick the first non-grouped results and display them with the grouped results.
[20:12:15] SteenJobs: has joined #RubyOnRails
[20:12:36] smathy: nja, we don't need to worry because our HAVING clause is really what we're interested in. It will count the "merged" (as you said) records from the roles table.
[20:12:38] craysiii: arup_r does that work before @model.update_attributes?
[20:12:59] dman777_alter: I think I know... can I just make a json called foo and use it with respond_with foo? or does it have to be a respond.body object?
[20:13:03] smathy: So when we add both the group and having we end up being able to limit the Category results to only those which had two roles rows each.
[20:13:22] nja: smathy: I'm now just a little confused why you don't call the group before the having
[20:13:23] krisquigley: has joined #RubyOnRails
[20:13:24] smathy: (ie. the Categories which contained both roles.id 1 and 4 in their joined results)
[20:13:25] craysiii: im trying to test this before updating the model, so that i can use pundit to verify the private policy.
[20:13:51] nja: smathy: it works when I swap them actually
[20:13:53] smathy: nja, the order in Rails doesn't matter, but yes - calling the group before the having makes more sense.
[20:14:00] smathy: (it's how the SQL will be)
[20:14:03] arup_r: use assing_attributes method
[20:14:09] arup_r: and then do
[20:14:13] smathy: "...GROUP BY ... HAVING ..."
[20:14:19] nja: smathy: Awesome. Thank you so much for this.
[20:14:36] smathy: nja, you're welcome.
[20:14:57] arup_r: craysiii: http://apidock.com/rails/ActiveRecord/AttributeAssignment/assign_attributes
[20:15:51] craysiii: hm im not explaining this well enough.
[20:15:58] gerep: smathy, your suggestion worked but I still need one more validation, if possible: http://i.imgur.com/o4d7Bj3l.png for instance, the first "to" field is 100 so the "for" field bellow cannot be 100
[20:16:07] arup_r: but none of them will work is you used update_attribute
[20:16:11] rromanchuk: has joined #RubyOnRails
[20:16:59] arup_r: gerep: custom validation will work.. write it and integrate it thir inside the model
[20:17:40] gerep: arup_r, these are validations I have so far: https://gist.github.com/gerep/fbfeb84e9e599287c0c1
[20:17:49] craysiii: https://gist.github.com/craysiii/0e65392791e4ac01c5e7
[20:17:51] bronson: has joined #RubyOnRails
[20:17:53] gerep: arup_r, I'll add one more for the case I explained above
[20:17:53] sinkensabe: has joined #RubyOnRails
[20:17:58] gerep: arup_r, thanks
[20:19:54] arup_r: crankharder: wiki_params[:private].prsent?
[20:20:34] craysiii: wrong person :P i think i found it
[20:20:47] craysiii: i didn't know params was actually a hash
[20:21:20] rails477: has joined #RubyOnRails
[20:21:29] w0rd-driven: has joined #RubyOnRails
[20:21:31] arup_r: craysiii: http://api.rubyonrails.org/classes/ActionController/Parameters.html#method-i-5B-5D
[20:21:51] arup_r: They are not a Hash, but they have a method like Hash#[]
[20:21:56] i: has joined #RubyOnRails
[20:21:57] sysrex: has joined #RubyOnRails
[20:22:11] rails477: /msg NickServ VERIFY REGISTER Byrd_ kbdfatkfsjwe
[20:22:13] kadoppe: has joined #RubyOnRails
[20:22:37] arup_r: rails477: What are you doing >
[20:22:40] gerep: rails477, change your password =)
[20:23:04] rails477: why did it paste that?
[20:23:21] FailBit: at least it's not a password..
[20:23:29] FailBit: not your password*
[20:23:32] craysiii: "authorize @wiki, :private? if params[:private] == true" pretty sexy.
[20:23:41] arup_r: FailBit: you tried to login using that ;)
[20:23:49] cesarstafe: has joined #RubyOnRails
[20:24:16] FailBit: arup_r: nope
[20:24:21] cesarstafe: how can avoid first line in cvs files?
[20:24:25] arup_r: ok FailBit
[20:24:29] cesarstafe: CSV.foreach(file, return_headers: false not works
[20:24:33] rails477: is anybody using ansicon?
[20:24:43] FailBit: arup_r: my passwords are all regexes
[20:24:48] FailBit: nobody will ever guess them
[20:25:12] smathy: rails477, the web client needs /PRIVMSG or something, not /MSG
[20:25:12] FailBit: also, /\Alol ruby for being weird with
[20:25:21] arup_r: cesarstafe: :headers => true
[20:25:38] cnk: cesarstafe: check if there is a headers option to CSV - one of the libs i used ahd at attr for skipping header rowl
[20:25:52] arup_r: cnk it has
[20:25:58] arup_r: http://ruby-doc.org/stdlib-2.0.0/libdoc/csv/rdoc/CSV.html#method-c-new
[20:26:04] rails477: is anyone using anicon?
[20:26:17] yashinbasement: has joined #RubyOnRails
[20:26:36] arup_r: rails477: what is that?
[20:26:48] rails477: win32console doesnt work so i tried ansicon but it isnt working either
[20:27:00] FailBit: >ansicon - Process ANSI escape sequences for Windows console programs.
[20:27:04] arup_r: rails477: what are you trying to do ?
[20:27:06] rails477: its supposed to add color to your command terminal, so like when you run rake test
[20:27:09] FailBit: ah, windows.
[20:27:12] FailBit: windows windows windows
[20:27:16] cnk: my condolences
[20:27:21] FailBit: ACTION don't use windows
[20:28:18] smathy: rails477, rails console might be detecting your terminal and not including the ANSI escapes because it thinks you don't have color support.
[20:28:23] cesarstafe: ok guys.. I will try
[20:28:36] smathy: ...or rake or whatever.
[20:28:37] Rubie: has joined #RubyOnRails
[20:29:37] gerep: My validate: unique_range is not being called, what am I doing wrong? https://gist.github.com/gerep/fbfeb84e9e599287c0c1
[20:29:38] rails477: smathy: you're probably right, I get the message to run 'gem install win32console' but win32console doesn't work so I tried ansicon but like you said It's probably not detecting it
[20:29:39] jenrzzz: has joined #RubyOnRails
[20:29:53] gerep: The other validations are working, just unique_range isn't
[20:30:15] rails477: oh well, I just wanted the nice green and reds for my test, ill survive
[20:30:20] smathy: rails477, these will be the first of thousands of problems because the toolsets aren't very Windows aware/friendly.
[20:30:42] rails477: smathy: yea you're right
[20:30:58] tvw: has joined #RubyOnRails
[20:31:05] FailBit: it's maintained like for the hell of it
[20:31:11] liquid-silence: has joined #RubyOnRails
[20:32:43] smathy: gerep, why do you think it's not being called?
[20:33:31] gerep: smathy, it is returning false and the controller is saving the record and also tried adding a byebug there and nothing
[20:33:54] smathy: gerep, I don't believe the last part, maybe you failed to reload your model (in the console) or something.
[20:34:07] smathy: gerep, re the first part, yeah, returning false doesn't make a validation fail.
[20:34:36] smathy: gerep, http://devdocs.io/rails/activemodel/validations/classmethods#method-i-validate
[20:34:48] artto: has joined #RubyOnRails
[20:35:06] tejasmanohar: has joined #RubyOnRails
[20:35:33] x-light: has joined #RubyOnRails
[20:35:50] someish: has joined #RubyOnRails
[20:36:01] darrencauthon: has joined #RubyOnRails
[20:36:10] smathy: (hopefully the examples there will show you how to make a model invalid)
[20:36:30] choke: has joined #RubyOnRails
[20:36:34] gerep: smathy, this is not working :( https://gist.github.com/gerep/fbfeb84e9e599287c0c1
[20:37:04] gerep: smathy, I'm saving a RangeCost from a TransactionCost model which I don't think is a problem, since the other validations are working
[20:37:36] choke: has joined #RubyOnRails
[20:38:05] craysiii: hey gerep o/
[20:38:16] gerep: craysiii, hey! :D
[20:38:22] smathy: gerep, and you're running the code in rails console?
[20:38:30] gerep: smathy, rails s
[20:38:37] gerep: smathy, and I have restarted the server
[20:38:55] smathy: gerep, `spring stop` maybe, it should break at that point.
[20:39:15] gerep: smathy, sorry, spring stop?
[20:39:23] havenwood: has joined #RubyOnRails
[20:39:41] smathy: gerep, ^C from your rails s, then run spring stop, then restart your rails server and try again.
[20:39:51] smathy: gerep, it shouldn't get stuck, but sometimes it does.
[20:39:59] gerep: smathy, got it, will try
[20:40:15] Pharaoh2: has joined #RubyOnRails
[20:40:25] smathy: gerep, if that doesn't work then change the `byebug` to a `raise` and retry.
[20:40:43] gerep: smathy, no spring command
[20:40:53] gerep: smathy, I'll try raise
[20:40:58] smathy: gerep, which version of rails are you using?
[20:41:09] gerep: smathy, 4.2.3
[20:41:16] gerep: smathy, ruby 2.2.2
[20:41:36] herbst: has joined #RubyOnRails
[20:41:44] smathy: Hmm, weird that you have no spring command, did you remove that from your Gemfile? Or did you upgrade to 4.2.3 from some prior version of Rails?
[20:42:10] gerep: smathy, upgrade Rails
[20:42:24] smathy: gerep, ah, ok.
[20:42:28] gerep: smathy, not even raise works, I'm definitely doing something really wrong here hahaha
[20:42:36] gerep: smathy, I'll install spring and test what you said earlier
[20:42:52] smathy: Spring won't make things better (many people disable it).
[20:43:20] gerep: I tried commenting all other validations but nothing :(
[20:43:32] gerep: the validate :unique_range doesn't get called!
[20:43:47] pwnd_nsfw: I ended up disabling Spring on Windows. After I switched to Linux, I have NFI what I was doing trying to dev on Windows.
[20:43:48] smathy: I still think this is a load thing.
[20:43:56] smathy: Stick a raise as the first line in the file and restart your server again.
[20:44:05] gerep: smathy, ok
[20:45:02] smathy: (then hit anything in the browser that will load that model file)
[20:45:31] pwnd_nsfw: Should really implement a testing framework if you haven't already, gerep
[20:45:50] pwnd_nsfw: That's also another life saver. Leave Windows, get better with RSpec. Life feels so much easier now
[20:45:51] craysiii: just the thought of writing tests wears me out.
[20:46:02] pwnd_nsfw: It's so worth it
[20:46:05] FailBit: write tests
[20:46:16] FailBit: then you will sleep well
[20:46:18] craysiii: ive seen the value, but i guess i still dont have a full understanding of the methodology behind it
[20:46:29] FailBit: try test-driven development, at that
[20:46:29] pwnd_nsfw: Especially BDD, it'll basically hold your hand writing the code to satisfy the tests.
[20:46:42] smathy: craysiii, every command you run in console or everything you do in a browser where you actually look and see the results is a test - you're just not recording them so they're easy to re-run later.
[20:47:02] pwnd_nsfw: Good way to put that smathy
[20:47:11] craysiii: right, but i mean with rspec. I even have it installed for my projects but haven't used it in any beyond my first
[20:47:24] smathy: Everyone tests, it's just that the smart people save their tests so they can re-run them later.
[20:47:26] alphaatom: has joined #RubyOnRails
[20:48:07] finnnnnnnnnnn: has joined #RubyOnRails
[20:48:07] craysiii: yeah i should really get on that
[20:48:14] pwnd_nsfw: "Rails 4 in Action" has helped me out a lot
[20:48:36] smathy: craysiii, whether rspec or xunit, whether before app code or after, none of that matters. Point is that each time you fire up a browser and check some part of your site, or do something in a console, you've just run a test but discarded it immediately instead of saving it so you can re-run it later.
[20:48:53] benlieb: has joined #RubyOnRails
[20:48:57] workmad3: has joined #RubyOnRails
[20:49:00] smathy: Instead of typing it into the console, just type it into an editor and hit save :)
[20:49:03] pwnd_nsfw: It's much harder to pinpoint where your app has blown up too
[20:49:21] pwnd_nsfw: You've made a change but something on the other side of the application is failing... now you have to trace it back
[20:49:30] smathy: (and thanks pwnd_nsfw - it's my go-to for "I don't like/write tests"
[20:49:46] Maletor: has joined #RubyOnRails
[20:49:50] safety_cut: has joined #RubyOnRails
[20:49:56] craysiii: okay. you've convinced me. i am now going to write tests for my current project before continuing
[20:50:02] pwnd_nsfw: It's really opened up my eyes. I really wanted to get into testing, but the other approaches I've seen in different books and tutorials haven't been so good.
[20:50:25] gerep: has joined #RubyOnRails
[20:50:34] gerep: smathy, connection problems here, sorry
[20:50:37] pwnd_nsfw: Like, "do I write a model test first? controller test? etc?" Nah bruh, just write a feature.
[20:50:51] smathy: pwnd_nsfw, yeah, it's definitely an area left wanting for some clearer best practices.
[20:50:56] gerep: smathy, so, the only way to get that method called is when on of the other validations fail
[20:51:06] smathy: gerep, no problem.
[20:51:13] gerep: smathy, if all the previous validations are ok, my custom validation is not called
[20:51:14] pwnd_nsfw: There's so many different ways to do it, just have to find out which works for you best. Luckily I have some time before getting to my next project.
[20:51:21] Anubix: has joined #RubyOnRails
[20:51:36] gerep: smathy, isn't that weird?
[20:51:46] smathy: gerep, makes no sense.
[20:51:58] pwnd_nsfw: That's interesting
[20:52:07] craysiii: wait so should i mainly write feature tests?>
[20:52:11] pwnd_nsfw: put the custom validator first? idk
[20:52:23] gerep: pwnd_nsfw, tried that
[20:52:23] smathy: gerep, add the code from TransactionCost into that gist (as a separate file)
[20:52:24] pwnd_nsfw: craysiii, like I said, whatever works better for you. But feature tests have been the best for me.
[20:52:47] gerep: smathy, update: it works only when I'm adding a new RangeCost not when editing
[20:52:50] pwnd_nsfw: You can almost ignore testing controller/model if the features are comprehensive enough.
[20:52:58] gerep: smathy, I will update the gist
[20:53:10] craysiii: thats what i wanted to know, i have trouble with the model and controller because so much of it seems self evident
[20:53:16] siddart_: has joined #RubyOnRails
[20:53:17] smathy: craysiii, write tests for anything you check in the console (generally model tests) or browser (generally feature tests).
[20:53:18] pwnd_nsfw: Yeah, definitely
[20:53:25] craysiii: or like, testing devise to make sure you can log in
[20:53:36] gerep: smathy, https://gist.github.com/gerep/fbfeb84e9e599287c0c1
[20:54:13] pwnd_nsfw: could the reject_if be doing something?
[20:54:37] pwnd_nsfw: Nevermind, I'm just throwing that out there
[20:55:12] darrencauthon: has joined #RubyOnRails
[20:55:18] smathy: gerep, and this is coming in from your controller through a normal: TransactionCost.new(transaction_cost_params).save ?
[20:55:40] Anubix: Hello, how can i get id from this hash? {"weather":[{"id":800,"main":"Clear","description":"Sky is Clear","icon":"01n"}]},
[20:55:44] gerep: smathy, yes
[20:56:05] smathy: Anubix, hash["weather"][0]["id"]
[20:57:50] smathy: gerep, oh, wait...
[20:57:53] fxn: has joined #RubyOnRails
[20:58:10] smathy: gerep, I just noticed you say that it works only when adding a new RangeCost.
[20:58:21] smathy: gerep, yes, that's how associations work.
[20:58:25] Pharaoh2: has joined #RubyOnRails
[20:58:52] smathy: gerep, I can't explain why your other validations get run, but I'm starting to think that they don't and you're just confused.
[20:59:37] gerep: smathy, so the validations shouldn't run when updating a RangeCost?
[20:59:39] Anubix: has joined #RubyOnRails
[21:00:08] Anubix: smathy: thanks why is there [0] ?
[21:00:25] gerep: Anubix, because you have an array as value
[21:00:29] FailBit: I'm getting this in my tests when checking the devise current_user
[21:00:31] FailBit: NoMethodError: undefined method `authenticate' for nil:NilClass
[21:00:38] arup_r: Anubix: because you have hash of array of has
[21:00:50] smathy: ...actually, I don't think what I just said is true when using anaf
[21:00:55] gerep: FailBit, You need to include a devise helper, I guess
[21:01:16] smathy: Anubix, because the []s indicate that the value of "weather" is an array.
[21:01:22] rakm: has joined #RubyOnRails
[21:01:23] FailBit: gerep, where?
[21:01:27] smathy: (the []s in the has you showed)
[21:01:32] gerep: FailBit, in your test files: include Devise::TestHelpers
[21:01:48] havenn: has joined #RubyOnRails
[21:02:07] smathy: gerep, sorry, no clue about your issue. Doesn't make sense.
[21:02:15] someish: has joined #RubyOnRails
[21:02:19] Anubix: smathy, gerep, arup_r: thanks
[21:02:31] gerep: smathy, Like you said, I may be confused, I'll test it again and see what happens :D
[21:02:39] gerep: smathy, anyway, thanks a lot for your patience!
[21:02:41] alphaatom: has joined #RubyOnRails
[21:02:41] gerep: Anubix, ;)
[21:03:23] SteenJobs: has joined #RubyOnRails
[21:04:37] alphaatom: has joined #RubyOnRails
[21:05:06] djbkd: has joined #RubyOnRails
[21:07:56] smathy: gerep, np
[21:09:48] craysiii: does anyone ever write tests generated by rspec for views?
[21:10:48] dan0034001: has joined #RubyOnRails
[21:11:03] dan0034001: I have a hstore of booleans, can i make them all check boxes in activeadmin?
[21:11:06] drale2k: has joined #RubyOnRails
[21:12:00] alphaatom: has joined #RubyOnRails
[21:12:08] annlewis: has joined #RubyOnRails
[21:12:26] nya: has joined #RubyOnRails
[21:12:45] dan0034001: I currently have https://github.com/wild-r/activeadmin_hstore_editor installed but i have to manually type 'true' or 'false'
[21:13:05] dan0034001: would prefer them to all be check_boxes
[21:16:31] pwnd_nsfw: dan0034001, I had a similar problem. I would juast build them with dat
[21:16:34] w0rd-driven: has joined #RubyOnRails
[21:16:38] pwnd_nsfw: empty data*
[21:16:48] dan0034001: what do you mean?
[21:16:53] craysiii: okay brain fart, where is rails_helper
[21:17:49] pwnd_nsfw: Oh, neverind
[21:18:03] pwnd_nsfw: I didn't really read your question thoroughly. You'd have to edit the gem
[21:18:23] dan0034001: is there a way to not use the gem?
[21:18:34] dan0034001: and how check boxes for all the hstore attributes?
[21:18:55] nettoweb: has joined #RubyOnRails
[21:18:59] VeryBewitching: craysiii: rails_helper should be in your spec folder
[21:19:07] VeryBewitching: craysiii: alongside spec_helper
[21:19:13] craysiii: ya i forgot to do the rspec:install
[21:19:14] Pharaoh2: has joined #RubyOnRails
[21:19:28] qsdqsd: has joined #RubyOnRails
[21:20:59] SteenJobs: has joined #RubyOnRails
[21:21:31] chouhoulis: has joined #RubyOnRails
[21:22:18] banjara: has joined #RubyOnRails
[21:22:36] SteenJobs: has joined #RubyOnRails
[21:22:45] smathy: ...and yes craysiii, people write rspec view tests.
[21:23:01] craysiii: i guess im just going to stick to feature tests for now
[21:23:21] arup_r: dan0034001: Use fields_for.. Rails core method and very useful
[21:23:34] arup_r: Why Gem for all stuffs
[21:23:42] dan0034001: arup_r you have a link?
[21:23:55] dan0034001: not sure i understand
[21:24:04] jholm: has joined #RubyOnRails
[21:24:05] arup_r: http://apidock.com/rails/ActionView/Helpers/FormHelper/fields_for
[21:24:18] SteenJobs: has joined #RubyOnRails
[21:25:35] pwnd_nsfw: arup_r, hstore for activeadmin is a great tool... unless it's not working as you want it to :p
[21:26:20] SteenJobs: has joined #RubyOnRails
[21:26:25] arup_r: may be.. pwnd_nsfw I handle most of the things using fields_for
[21:27:07] oldbay: has joined #RubyOnRails
[21:27:11] arup_r: Using it you can create a Hash and then do update n lots of thing
[21:27:19] pwnd_nsfw: hstore is tricky because it's largely dynamic
[21:27:25] pwnd_nsfw: in the sense that you can put whatever you want in there.
[21:27:32] symbole: has joined #RubyOnRails
[21:27:40] x-light: has joined #RubyOnRails
[21:28:16] SteenJobs: has joined #RubyOnRails
[21:28:22] dan0034001: mine is basically a bunch of booleans for the hours of the day
[21:28:28] dan0034001: hours of opperation basically
[21:29:15] arup_r: ok.. guys. Bye
[21:29:52] SteenJobs: has joined #RubyOnRails
[21:30:34] pwnd_nsfw: dan0034001, do you HAVE to use hstore?
[21:30:53] dan0034001: i mean i guess i could make a ton of boolen attributes...
[21:31:13] dan0034001: its 24 for all hours of day
[21:31:22] greengriminal: has joined #RubyOnRails
[21:31:33] dan0034001: maybe switch it to just a bunch of booleans
[21:31:53] pwnd_nsfw: If those booleans are always used, I'd suggest that def
[21:31:57] tubbo: that's an awful user experience
[21:32:29] tubbo: you might as well just let them type their own date/time into the fields with datepickers
[21:32:43] dan0034001: tubbo its not a range...
[21:32:46] tubbo: it would be easier on you *and* your users won't wish you had died
[21:32:54] dan0034001: it can be for random hours of the day
[21:33:22] dan0034001: like 2, 3, 4, 8, 9, 10
[21:33:23] tubbo: dan0034001: this isn't modelling a range of time? i thought it was describing hours of operation
[21:33:24] orikremer: has joined #RubyOnRails
[21:33:32] shinobi_: has joined #RubyOnRails
[21:34:02] dan0034001: not always a start and end, its more flexible than that, it can be a few sections of the day
[21:34:10] pwnd_nsfw: 24 checkboxes would look silly in activeadmin
[21:34:14] tubbo: i mean, it doesn't have to be all in one go...but i feel like this could be modeled like "starts at this time and is this long"
[21:34:22] pwnd_nsfw: Well, partial could handle it better
[21:34:29] tubbo: oh yeah this is AA i forgot
[21:34:33] tubbo: so user experience is not an issue :D
[21:34:37] tubbo: whatever's easiest for you then
[21:35:29] artto: has joined #RubyOnRails
[21:35:53] tubbo: you probably want to spend the least amount of time mucking with AA as possible :D
[21:36:51] rakm: has joined #RubyOnRails
[21:36:58] pwnd_nsfw: I wish I had written my own admin tbh
[21:37:07] bruno-: has joined #RubyOnRails
[21:37:08] pwnd_nsfw: AA is a pretty hacky solution for some/lots of things
[21:37:18] pwnd_nsfw: Client is pleased though, so f it
[21:37:43] pwnd_nsfw: Limits me a bit though
[21:38:20] finnnnnnnnnnn: has joined #RubyOnRails
[21:39:41] turbo_MaCk: has joined #RubyOnRails
[21:39:50] wldcordeiro: has joined #RubyOnRails
[21:40:49] pwnd_nsfw: http://www.truthcoin.info/images/cloud-ignorance.png
[21:41:10] momomomomo_: has joined #RubyOnRails
[21:41:23] Anubix: has joined #RubyOnRails
[21:41:34] Anubix: Have somebody experience with openweathermap api?
[21:41:35] drale2k: has joined #RubyOnRails
[21:44:08] pwnd_nsfw: Anubix, got an issue?
[21:44:53] Anubix: pwnd_nsfw: I am using ruby_open_weather_map gem . I already done current weather, but i have problems with forecast
[21:46:25] Anubix: pwnd_nsfw: I just wanna show forecast for tomorrow, so i am using @forecast = OpenWeather::ForecastDaily.geocode(9.94, 76.26)
[21:47:11] Anubix: pwnd_nsfw: so i have array with 16 daily forecast, but i dunno how to get forecast only for tomorrow
[21:47:33] bruno-: has joined #RubyOnRails
[21:47:43] Anubix: pwnd_nsfw: I am at http://openweathermap.org/forecast16 but i didnt find solution
[21:47:51] hekin: has joined #RubyOnRails
[21:47:57] mary5030: has joined #RubyOnRails
[21:47:57] pwnd_nsfw: Welp, it seems you're going to get a minimum of 5
[21:48:10] pwnd_nsfw: The gem might only return the 16
[21:48:44] hekin: I'd like to know if it's possible to read barcode scanner from within a web app, seems there's no such a barcode scanner manufacturer providing a SDK for that
[21:48:51] pwnd_nsfw: Looking into it though
[21:49:55] Anubix: pwnd_nsfw: When i add parametr cnt OpenWeather::ForecastDaily.city_id("1273874", cnt: 1) then i am getting error
[21:49:56] pwnd_nsfw: Anubix, without modifying the gem, you may just have to sort your data and take the one off top.
[21:50:41] pwnd_nsfw: What's the error?
[21:51:34] rickmasta: has joined #RubyOnRails
[21:51:51] Anubix: pwnd_nsfw: If i use @forecast = OpenWeather::Forecast.geocode(50.76, 15.05, cnt: 1, options) then i am getting error, in options is language, apiid etc..
[21:52:36] Anubix: pwnd_nsfw: just syntax error, unexpected ')', expecting =>
[21:52:57] bruno-: has joined #RubyOnRails
[21:52:57] petricore: has joined #RubyOnRails
[21:53:43] pwnd_nsfw: What's the full bit of your code look like?
[21:54:01] Anubix: pwnd_nsfw: this line is all
[21:54:20] bricker: has joined #RubyOnRails
[21:54:40] Anubix: pwnd_nsfw: and this one for options - options = { units: 'metric', lang: 'de', APPID: 'xxxxxxxxxxxxxxxxx' }
[21:55:00] smathy: hekin, not sure what you mean, barcode scanners generally emulate a keyboard so just produce the right text wherever the cursor is.
[21:55:02] Anubix: pwnd_nsfw: options is used in current weather and its okey
[21:55:02] pwnd_nsfw: Can I see the full method or na
[21:55:14] brandon: has joined #RubyOnRails
[21:55:36] smathy: (and when I say "generally" I mean "100% of the time as far as I'm aware")
[21:56:22] Anubix: pwnd_nsfw: there 2 lines (options and forecast) are all
[21:56:58] hekin: smathy: i mean most of the barcode scanner provides SDK for iOS, Android platforms, but not for web app
[21:57:37] pwnd_nsfw: Anubix, I don't know why that error is showing up
[21:57:44] pwnd_nsfw: However, I think cnt should be in your optiosn hash
[21:57:46] hekin: smathy: i can integrate a barcode scanner from within a iOS app by incorporating the provided SDK
[21:57:47] smathy: hekin, ok, so now you're talking about software for iOS or Android that allows you to read a barcode using the camera on your smartphone?
[21:57:53] pwnd_nsfw: so, geocode(lat, lon, options)
[21:58:09] hekin: smathy: nope, not from camera, from barcode scanner gun
[21:58:11] erichu: has joined #RubyOnRails
[21:58:26] pwnd_nsfw: That is the method signature if you look into the code
[21:58:28] smathy: hekin, I'm not familiar with scanner guns that you plug into smartphones.
[21:58:30] bruno-: has joined #RubyOnRails
[21:58:30] Anubix: pwnd_nsfw: i am using options for current weather where isn't cnt parameter so i cant
[21:58:49] smathy: hekin, the scanner guns that you plug into computers are the things I was talking about above, they just emulate a keyboard.
[21:58:50] hekin: @smathy actually, you could have it work from bluetooth
[21:59:03] pwnd_nsfw: ..., then like options[:cnt] = 1 before you call the geocode
[21:59:19] hekin: smathy: for the scanner guns plug into PC, we do need a client to read the scanner, right?
[21:59:23] smathy: hekin, so you click anywhere in the screen, like the field in a web form, then you scan the code and the numbers are entered wherever the cursor is on the screen.
[21:59:30] jgt1: has joined #RubyOnRails
[21:59:41] hekin: really? wow, that's nice :D
[21:59:52] smathy: hekin, yeah, hence my confusion about your question :)
[22:00:01] hekin: smathy: thank you for the info, i thought i need a SDK to do that :D
[22:00:02] hekin: thank you
[22:00:08] smathy: hekin, as far as the computer is concerned the scanner looks just like a keyboard.
[22:00:16] Anubix: pwnd_nsfw: wuf nice solution, now i am getting another error in show.html.erb - undefined method `[]' for nil:NilClass
[22:00:18] Jon30: has joined #RubyOnRails
[22:00:37] SteenJobs: has joined #RubyOnRails
[22:00:37] Anubix: pwnd_nsfw: on this line <%= @forecast['list'][0]['main']['temp'] %>
[22:00:51] pwnd_nsfw: p @forecast.inspect
[22:01:10] pwnd_nsfw: to checkif you're indexing the hash correctly
[22:01:21] pwnd_nsfw: Or whatever ithappens to return.
[22:02:04] SteenJobs: has joined #RubyOnRails
[22:02:18] safety_cut: has joined #RubyOnRails
[22:03:29] Anubix: pwnd_nsfw: it works correctly, hash is okey
[22:03:42] pwnd_nsfw: post in gist?
[22:03:52] bruno-: has joined #RubyOnRails
[22:03:54] SteenJobs: has joined #RubyOnRails
[22:04:56] craysiii: can i infinitely nest describes inside a spec?
[22:05:08] smathy: craysiii, yes.
[22:05:29] SteenJobs: has joined #RubyOnRails
[22:05:53] wethu: has joined #RubyOnRails
[22:06:02] craysiii: these feature tests actually feel really good to write once i read the docs of capybara again.
[22:06:44] symbole: has joined #RubyOnRails
[22:07:09] SteenJobs: has joined #RubyOnRails
[22:08:22] yfeldblum: has joined #RubyOnRails
[22:08:39] SteenJobs: has joined #RubyOnRails
[22:08:53] bruno-_: has joined #RubyOnRails
[22:09:42] blackmesa: has joined #RubyOnRails
[22:09:48] eduardodeoh: has joined #RubyOnRails
[22:10:11] SteenJobs: has joined #RubyOnRails
[22:12:04] SteenJobs: has joined #RubyOnRails
[22:12:59] annlewis: has joined #RubyOnRails
[22:14:32] bruno-_: has joined #RubyOnRails
[22:15:29] Pharaoh2: has joined #RubyOnRails
[22:16:42] Radar: GOOD MORNING
[22:17:07] chouhoul_: has joined #RubyOnRails
[22:17:27] marahin: has left #RubyOnRails: ("Leaving")
[22:17:33] mcr-credil: has joined #RubyOnRails
[22:19:33] poli: has joined #RubyOnRails
[22:20:40] oldbay: has joined #RubyOnRails
[22:20:50] choke: has joined #RubyOnRails
[22:21:21] havenwood: has joined #RubyOnRails
[22:22:15] craysiii: im confused because capybara says that scenario is an alias for describe but i keep getting an error saying "`scenario` is not available from within an example (e.g. an `it` block) or from constructs that run in the scope of an example (e.g. `before`, `let`, etc). It is only available on an example group (e.g. a `describe` or `context` block)."
[22:22:19] benlieb: has joined #RubyOnRails
[22:23:10] craysiii: https://gist.github.com/craysiii/3f5c02e9dccd397bee26
[22:24:03] rhizome: describe/scenario goes outside the its, iirc
[22:24:14] rhizome: might need to invert your logic
[22:24:20] craysiii: im not using "it"
[22:24:55] shinobi_: has joined #RubyOnRails
[22:25:08] bricker: craysiii: "scenario" == "it"
[22:25:16] bricker: craysiii: "feature" == "deacribe"
[22:25:20] craysiii: so i would nest features
[22:25:44] rhizome: https://robots.thoughtbot.com/how-we-test-rails-applications
[22:26:15] bricker: craysiii: sure, you can also use "context
[22:27:25] craysiii: hm it just seems to make sense the way i did it :P ill read
[22:28:15] jenrzzz: has joined #RubyOnRails
[22:30:08] da7id: has joined #RubyOnRails
[22:30:39] shinobi_: has joined #RubyOnRails
[22:31:45] dopamean_: has joined #RubyOnRails
[22:32:03] johnflux: has joined #RubyOnRails
[22:32:13] shinobi_: has joined #RubyOnRails
[22:32:50] shinobi_: I thought everyone switched off of RSpec for the speed ;p
[22:33:40] havenwood: <3 Minitest
[22:34:26] jenrzzz: has joined #RubyOnRails
[22:35:15] shinobi_: Rspec is sexy, but IMO you should learn the typical unittest dsl that many languages seem to employ.
[22:35:52] craysiii: im not worried about DSL's as much as i am about methodology
[22:36:16] craysiii: also my program promotes using rspec so that's what im using
[22:36:34] craysiii: by program i mean coding school whatever you want to call it.
[22:37:27] shinobi_: Ah. That's interesting I guess
[22:37:32] rhizome: hartl uses rspec, doesn't he?
[22:38:13] HAL2328: has joined #RubyOnRails
[22:38:37] cnk: rhizome: I think he switched to minitest for the last version - rails 4
[22:38:51] cnk: but originally, yes, Rails Tutorial used rspec for testing
[22:39:13] rhizome: ah, well that still means a lot of people have a lot of time invested in rspec just through curriculum origins
[22:39:38] darrencauthon: has joined #RubyOnRails
[22:39:48] cnk: Yes. That and LOTS more blog posts
[22:40:47] craysiii: is there a reason people shouldn't be using rspec?
[22:40:53] rhizome: i feel like i know rspec pretty good just from having to translate answer posts to testunit
[22:40:55] mostlybadfly: has joined #RubyOnRails
[22:41:33] rhizome: craysiii: not really, just preference
[22:44:11] gambl0re: has joined #RubyOnRails
[22:44:14] cgfbee: has joined #RubyOnRails
[22:46:14] michaeldeol: has joined #RubyOnRails
[22:47:16] cfloare: has joined #RubyOnRails
[22:47:17] zlogan85: has joined #RubyOnRails
[22:47:58] havenn: has joined #RubyOnRails
[22:48:27] beauby: has joined #RubyOnRails
[22:49:57] darrencauthon: has joined #RubyOnRails
[22:50:56] sevenseacat: has joined #RubyOnRails
[22:50:59] RandyT: has joined #RubyOnRails
[22:51:32] shinobi_: Just because people have a lot of time invested in something doesn't necessarily make it better, or worse. Hartl switched back to the basics for speed and learning.
[22:51:32] Radar: Minitest zealots argue that RSpec encourages bad practice (i.e. allow_any_instance_of type methods)
[22:52:33] shinobi_: Radar I would hope the zealots care more about speed. Nobody wants to run 10 minute tests
[22:53:13] Radar: shinobi_: lol if you think the speed differences between RSpec + Minitest are significant
[22:53:26] Radar: PARSING the tests initially is faster, sure. Running the tests? Nope.
[22:53:30] astrodog: In the end.... the fact that people are doing any real tests at all works for me.
[22:53:34] Radar: We're talking like 3 seconds fast
[22:54:09] moneylotion: has joined #RubyOnRails
[22:54:19] rhizome: i read a post once that talked about rspec instantiating a zillion objects. probably not the hugest deal on modern hardware, but that'd be a complexity argument.
[22:54:30] pwnd_nsfw: 10 min test? Might as well just deploy and hope for the best
[22:54:52] rhizome: shinobi_: yeah, but it would contribute to an explanation of its prevalence
[22:55:02] havenn: Here's a nice presentation explaining why you might want to consider Minitest: http://www.zenspider.com/presentations/2015-railsconf.html
[22:55:06] smathy: has joined #RubyOnRails
[22:55:22] drale2k_: has joined #RubyOnRails
[22:55:24] jenrzzz: has joined #RubyOnRails
[22:55:31] Radar: Is there a tl;dr version of that for people who don't have very long attention spans and who's name is "Ryan"?
[22:55:47] nahtnam: has joined #RubyOnRails
[22:55:47] Lightsword: has joined #RubyOnRails
[22:55:54] Radar: probably wrong grammar there with "who's" but I'm all out of fucks to give today
[22:55:59] rhizome: the presentation is by a guy named ryan :P
[22:56:01] pwnd_nsfw: What about people who's name is "Robert"
[22:56:05] havenn: Radar: Just Ruby instead of first class Object means easier for new folk. With a touch of try it, you'll like it. :)
[22:56:07] n00bDev: has joined #RubyOnRails
[22:56:12] pwnd_nsfw: who's sounded right in my head
[22:56:17] astrodog: Radar: "Ryan, it's a fun new thing. Everyone will switch to it eventually and all of the rspec documentation will be out of date."
[22:56:18] pwnd_nsfw: I didn't even read it in your sentence when I had typed out mine
[22:56:27] Radar: astrodog: I doubt it.
[22:56:42] astrodog: Really... the bane of writing in Ruby is is the documentation problem.
[22:56:52] n00bDev: does anyone know any good duallistbox for rails?
[22:57:25] pwnd_nsfw: I don't understand
[22:57:40] gniquil: has joined #RubyOnRails
[22:57:43] craysiii: UGH. in my app,, when I go to /new/wiki as a guest, it should redirect me to my referrer (in this case /) and display a message. It was working perfectly fine, but in my tests, it goes to the page anyway.
[22:57:44] Radar: non sequiturs are hard
[22:58:16] chills42: has joined #RubyOnRails
[22:58:20] Radar: ACTION is considering kicking people who explain code problems with words after more than a month of being in this channel.
[22:58:33] Radar: The rules are there for a god damned reason and to ignore them is an affront to all.
[22:58:38] craysiii: um. excuse you? i wasnt done
[22:58:44] Radar: craysiii: Neither am I.
[22:58:55] Radar: craysiii: !rule0
[22:58:55] helpa: craysiii: 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.
[22:58:59] Radar: It's literally the first rule.
[22:59:00] pwnd_nsfw: "I try to do this and I get an error"
[22:59:05] pwnd_nsfw: gr8, good for you!
[22:59:27] pwnd_nsfw: "I do this, and I want this to happen. Here's the code and any errors"
[22:59:31] havenn: Also a Unix philosophy rule. :D
[22:59:33] Radar: pwnd_nsfw has it
[22:59:34] michaeldeol: has joined #RubyOnRails
[22:59:47] FailBit: "I tried to do your mom once but I couldn't find any openings in all the fat folds"
[22:59:48] pwnd_nsfw: Trying to help people has taught me that
[22:59:49] Radar: craysiii: Happy to help you if I can see some code that reproduces the issue.
[22:59:50] craysiii: i dont need your sass, i was writing the gist as i typed that but was revising it
[22:59:57] EasyCo: has joined #RubyOnRails
[22:59:58] havenn: "it is easier for humans to understand complex data compared with complex logic"
[22:59:59] pwnd_nsfw: Having to ask what the error or problem is.. well, it's quite annoying.
[23:00:16] banister: has joined #RubyOnRails
[23:00:17] AndChat|748001: has joined #RubyOnRails
[23:00:29] bruno-: has joined #RubyOnRails
[23:00:40] Radar: !unworthy
[23:00:40] helpa: You are not worthy of this bot!
[23:00:46] havenn: Bought my copy of R4IA... anything else before I'm ready to Rails? I guess read it...
[23:00:55] Radar: havenn: know some Ruby?
[23:01:02] havenn: Radar: Sure do!
[23:01:09] Radar: havenn: You're set!
[23:01:28] FailBit: lol, why can't I use !since
[23:01:41] craysiii: Radar maybe you should take some time off, you're always a miserable sack
[23:01:48] havenn: craysiii: That's not nice.
[23:01:55] Radar: +q craysiii!*@*
[23:02:02] Radar: Either you follow the rules or you don't.
[23:02:10] Radar: You want to provoke the ops? Please continue.
[23:02:21] Radar: I'll unmute you after my standup.
[23:02:30] smathy_: has joined #RubyOnRails
[23:02:34] Radar: I'm really fucking tired of people coming into this channel and asking for help without following the rules.
[23:02:35] FailBit: ACTION does his taxes and pays all the bills
[23:02:45] Radar: I try and promote the ways to get good help, and people ignore it.
[23:02:46] Scriptonaut: has left #RubyOnRails: ()
[23:02:46] astrodog: Haven't seen an IRC slap-fest in awhile.
[23:02:48] Radar: So now I'm being an asshole about it.
[23:02:52] Radar: Congratulations.
[23:03:24] sevenseacat: ACTION gives Radar a Snickers
[23:03:29] FailBit: astrodog: I mod an IRC channel where people dump spam regularly
[23:03:35] FailBit: it's not that fun
[23:03:51] FailBit: I also mod a channel on freenode where I literally ignore everyone
[23:03:53] baweaver: has joined #RubyOnRails
[23:04:05] pwnd_nsfw: You've all done pissed Radar off already
[23:04:13] astrodog: Radar: You mind a PM?
[23:04:14] pwnd_nsfw: I was going to msg earlier "I wonder how long it's going to take..."
[23:04:38] totimkopf: has joined #RubyOnRails
[23:04:51] michaeldeol: has joined #RubyOnRails
[23:05:55] bruno-: has joined #RubyOnRails
[23:06:09] michaeldeol: has joined #RubyOnRails
[23:06:19] symbole: has joined #RubyOnRails
[23:07:21] bender_unit: has joined #RubyOnRails
[23:08:02] benlieb: has joined #RubyOnRails
[23:08:02] alphaatom: has joined #RubyOnRails
[23:08:21] krz: has joined #RubyOnRails
[23:10:06] arBmind1: has joined #RubyOnRails
[23:13:02] Radar: -q craysiii!*@*
[23:13:03] Radar: craysiii: wb
[23:13:18] Radar: astrodog: go ahead
[23:13:41] annlewis: has joined #RubyOnRails
[23:13:48] FailBit: I've had so much shit flung at me before :/
[23:14:42] Radar: craysiii: Do you have that Gist handy?
[23:14:54] benlieb: has joined #RubyOnRails
[23:14:55] StevePotayTeo: has joined #RubyOnRails
[23:15:01] craysiii: i'll figure it out myself.
[23:15:56] baweaver: has joined #RubyOnRails
[23:15:57] FailBit: 8chan are quite a formidable force
[23:16:17] FailBit: (but lol, after what happened to /baph/, ...)
[23:18:30] Radar: astrodog: Ping?
[23:18:38] gambl0re: why do you hide your op status?
[23:18:45] sevenseacat: freenode recommends it.
[23:18:48] n99999i: has joined #RubyOnRails
[23:18:52] gambl0re: for what reason
[23:19:09] ciree: ops = target
[23:19:12] rhizome: attractive nuisance probably
[23:19:29] VeryBewitching: It likely lowers PM spam.
[23:19:32] hekin: has joined #RubyOnRails
[23:19:52] sevenseacat: we get little spam in here anyway, due to requiring registration.
[23:20:06] sevenseacat: though that doesnt limit PM spam
[23:20:24] VeryBewitching: Well, bot joins, reads ops list, PM each
[23:20:41] Radar: Is that a thing that people do?
[23:20:43] VeryBewitching: It's a way to prevent it by no one holding +o
[23:20:52] VeryBewitching: It used to a lot
[23:21:05] VeryBewitching: We had to have 2 war bots to hold our channel back in the day
[23:21:16] rhizome: i think freenode's *Serv features cut down on a lot of that efnet stuff
[23:21:37] VeryBewitching: But people still stir up #$#^
[23:22:11] astrodog: As someone who helps run a couple of the political channels on efnet... the issues people think you run into doing that are.... overstated. :P
[23:22:27] gambl0re: why does simple gem always fail to install...i have simple_form included in my gems file, yet i keep getting "[Simple Form] Simple Form is not configured in the application and will use the default values. Use `rails generate simple_form:install` to generate the Simple Form configuration.
[23:22:41] sevenseacat: gambl0re: did you run the command specified
[23:22:41] gambl0re: and i dont get any errors when i do bundle install
[23:23:08] gambl0re: i still need to run that command even after bundle install?
[23:23:25] sevenseacat: it wouldnt tell you to do so if you didnt need to.
[23:23:42] FailBit: <Radar> Is that a thing that people do?
[23:23:59] rhizome: astrodog: maybe now, but 10-15 years ago it was certainly an issue there
[23:24:01] VeryBewitching: gambl0re: bundle install installs gems that are new to your bundle, but you still have to perform some work with the gem on the CLI after it's installed.
[23:24:11] meatherly: has joined #RubyOnRails
[23:24:19] VeryBewitching: Sometimes anyway.
[23:24:31] Radar: Yeah, Devise is like that too
[23:24:36] Radar: just installing the gem won't run the generators for you
[23:24:42] VeryBewitching: CanCanCan as well.
[23:24:43] Radar: You need to run `rails g devise:install` and `rails g devise`
[23:25:52] FailBit: migrations are fun
[23:26:31] stardiviner: has joined #RubyOnRails
[23:28:05] charliesome: has joined #RubyOnRails
[23:32:02] greister: has joined #RubyOnRails
[23:34:56] dan0034001: has joined #RubyOnRails
[23:37:07] artto: has joined #RubyOnRails
[23:39:26] quazimodo: has joined #RubyOnRails
[23:39:53] dan0034001: has joined #RubyOnRails
[23:40:33] SteenJobs: has joined #RubyOnRails
[23:40:53] safety_cut: has joined #RubyOnRails
[23:46:56] ranchodev: has joined #RubyOnRails
[23:47:58] shock_one: has joined #RubyOnRails
[23:48:12] rromanchuk: has joined #RubyOnRails
[23:49:45] WillAmes: has joined #RubyOnRails
[23:50:39] chills42: has joined #RubyOnRails
[23:50:40] Rubie: has joined #RubyOnRails
[23:52:31] rhizome: Gonna come up with a meme for "monotone rails presentation guy"
[23:52:41] nettoweb: has joined #RubyOnRails
[23:53:21] MartinElvar: has joined #RubyOnRails
[23:54:15] rhizome: railsconf speakers should be shortened from 30min to 20min
[23:54:19] Aeyrix: Monotone Mike.
[23:54:19] maz-dev: has joined #RubyOnRails
[23:54:52] rhizome: "and then you"
[23:55:49] rhizome: maybe i'll come up with a parody that jumbles together all of the tropes
[23:56:45] bricker: there aren't a lot of programmers who are also great public speakers
[23:56:47] bricker: in my experience
[23:56:52] rhizome: you can say that again
[23:57:47] craysiii: i am in agreement with you but i want to hear your reasoning
[23:58:03] bricker: I don't really know why, I can guess but that's not useful
[23:59:04] bricker: no it's observation
[23:59:11] FailBit: can also confirm: I'm not very good at public speaking, and I'm a programmer
[23:59:12] rhizome: on a presentation level, lots of vocal fry
[23:59:16] FailBit: I tend to ramble a lot
[23:59:18] bricker: I have watched a lot of programmers speak publicly and most of them aren't very good at it.