« Back to channel list

#RubyOnRails - 19 November 2015

« Back 1 day Forward 1 day »
[00:00:01] thorgi: matthewd: what sort of cache?
[00:01:00] matthewd: thorgi: http://guides.rubyonrails.org/caching_with_rails.html#low-level-caching
[00:01:13] lacrymology: Ropeney: same code plus the output of routes: http://dpaste.com/16ZDQCN the comments I mentioned are L5 and L81 now
[00:01:19] Ropeney: lacrymology: I think you need :password_confirmation in your strict params as a start, but seems a bit out of the time required that im willing to commit sorry
[00:02:06] andatche: has joined #RubyOnRails
[00:03:18] lacrymology: Ropeney: no problem.
[00:03:39] thorgi: matthewd: lovely, even with a similar external API example to what I need, thanks!
[00:04:45] simplyianm: has joined #RubyOnRails
[00:05:43] s2013: has joined #RubyOnRails
[00:06:17] ewnd9: has joined #RubyOnRails
[00:06:17] demonlove: has joined #RubyOnRails
[00:06:29] notnoyyyyy: has joined #RubyOnRails
[00:07:21] jessemcgilallen: has joined #RubyOnRails
[00:08:28] jessemcgilallen: has joined #RubyOnRails
[00:10:45] ellisTAA: has joined #RubyOnRails
[00:11:19] ellisTAA: i???m trying to test that a variable is getting assigned the session bc i pass it to the view, but when i run this spec i get nil ???. https://gist.github.com/ellismarte/973fed92aa24ed4042bf#file-convo_controller_spec-rb-L14
[00:12:01] Radar: EllisTAA: assigns(:user), not @user
[00:12:33] Radar: EllisTAA: instance variables from controller methods are not available inside of controller specs as instance variables. They're running in different instances. one instance is the instance of the controller. The other instance is the instance of the test itself.
[00:12:49] Radar: EllisTAA: Both instances have separate instance variables... but you can access controller ivars with assigns(:user)
[00:13:40] livecano: has joined #RubyOnRails
[00:14:30] tuelz: has joined #RubyOnRails
[00:15:01] ellisTAA: radar: ok i change the expectation to say but now i???m just getting :user instead of 1 https://gist.github.com/ellismarte/973fed92aa24ed4042bf#file-convo_controller_spec-rb-L14
[00:15:20] xcesariox: has joined #RubyOnRails
[00:15:28] Radar: EllisTAA: Your brackets are wrong. That'll be homework for you to figure it out :)
[00:15:37] juddey: has joined #RubyOnRails
[00:15:47] Radar: That should actually be throwing a syntax error.
[00:16:04] ellisTAA: ok cool. well shit why didn???t i see that anywhere in the docs ???
[00:16:25] SteenJobs: has joined #RubyOnRails
[00:16:27] riotjones: has joined #RubyOnRails
[00:16:46] ellisTAA: Radar: thanks
[00:17:10] Radar: EllisTAA: which docs?
[00:17:22] ellisTAA: https://www.relishapp.com/rspec/rspec-rails/docs/controller-specs
[00:17:35] Radar: Damn, that's where I was about to link you :)
[00:17:49] Radar: The examples do show it, but it doesn't explain it that well.
[00:23:07] manfrin: has joined #RubyOnRails
[00:26:44] htmldrum: has joined #RubyOnRails
[00:27:42] tenderlo_: has joined #RubyOnRails
[00:28:51] B1n4r10: has joined #RubyOnRails
[00:31:31] sbarg: has joined #RubyOnRails
[00:32:46] TheNet: has joined #RubyOnRails
[00:35:25] colleenmcguckin: has joined #RubyOnRails
[00:37:44] jamto11: has joined #RubyOnRails
[00:37:58] pwnd_nsfw: has joined #RubyOnRails
[00:40:06] flip_digits: has joined #RubyOnRails
[00:40:29] rromanchuk: has joined #RubyOnRails
[00:40:31] rromanch_: has joined #RubyOnRails
[00:40:39] sevenseacat: has joined #RubyOnRails
[00:41:48] lemur: has joined #RubyOnRails
[00:43:32] K_r3aPeR_: has joined #RubyOnRails
[00:44:05] RegulationD: has joined #RubyOnRails
[00:45:33] Rubie: has joined #RubyOnRails
[00:45:51] owenjones: has joined #RubyOnRails
[00:46:08] ismael_: has joined #RubyOnRails
[00:46:23] Scripore: has joined #RubyOnRails
[00:49:40] andatche: has joined #RubyOnRails
[00:50:45] patrick2: has joined #RubyOnRails
[00:52:33] one_zero: has joined #RubyOnRails
[00:54:11] kies: has joined #RubyOnRails
[00:56:29] Pazician: has joined #RubyOnRails
[00:57:15] benlieb: has joined #RubyOnRails
[00:57:48] baweaver: has joined #RubyOnRails
[00:58:10] nettoweb: has joined #RubyOnRails
[00:59:08] gentle_giant: has joined #RubyOnRails
[01:02:26] nya: has joined #RubyOnRails
[01:06:16] chry: has left #RubyOnRails: ("WeeChat 1.3")
[01:06:49] arcanez_: has joined #RubyOnRails
[01:07:45] arcanez_: has left #RubyOnRails: ()
[01:07:46] banister: has joined #RubyOnRails
[01:07:51] arcanez: has joined #RubyOnRails
[01:08:04] arcanez: identify kristin
[01:08:07] arcanez: how can I do != within a :conditions without raw sql? :conditions => { :foo => 'bar' } will give WHERE foo = 'bar'..
[01:08:28] Aeyrix: Did you just paste your nickserv password into #ror?
[01:08:51] craysiii: all i see is *******
[01:09:06] Aeyrix: craysiii: you can go kristin my kristin kristin
[01:09:18] arcanez: Aeyrix: that's what I get for pressing up too many times.
[01:09:32] Aeyrix: I wonder if I can ghost you.
[01:09:57] Aeyrix: Why would you not reset your password?
[01:10:12] craysiii: if you used /msg nickserv it wouldn't have happened ;)
[01:10:17] Aeyrix: I know right
[01:10:34] Axsuul: has joined #RubyOnRails
[01:10:55] |RicharD|: guys there is a way
[01:10:56] nickjj: or had an irc client to auto-sign in over sasl
[01:11:12] flip_digits: Question: I'm importing some csv data that I needs to be activerecord objects, I can't create valid objects because the datetime field needs a date, not a string which is how its' represented in the csv
[01:11:15] |RicharD|: for import rails routes in a sidekiq worker ?
[01:12:22] flip_digits: is there a standard way to get valid activerecord objects from csv data?
[01:12:41] smathy: flip_digits, http://devdocs.io/rails/activesupport/timezone#method-i-parse
[01:13:08] smathy: |RicharD|, can you explain what you're trying to do more please.
[01:13:13] arcanez: has joined #RubyOnRails
[01:13:20] Radar: flip_digits: You're missing the T of ETL.
[01:13:36] Radar: flip_digits: Date.strptime is your friend.
[01:13:40] Radar: Time.strptime also
[01:13:40] arcanez: how can I do != within a :conditions without raw sql? :conditions => { :foo => 'bar' } will give WHERE foo = 'bar'..
[01:13:51] sevenseacat: :conditions is really old-school
[01:13:52] Radar: arcanez: Why are you using conditions still?
[01:13:52] smathy: arcanez, http://guides.rubyonrails.org/active_record_querying.html#not-conditions
[01:13:58] Radar: smathy: Too fast
[01:14:02] arcanez: Radar: 2.3.8 is a fail :(
[01:14:08] Radar: arcanez: I am sorry, so sorry.
[01:14:11] arcanez: 2.3.18 rather
[01:14:16] arcanez: but the condolences are the same.
[01:14:23] Radar: conditions: "foo != 'bar'"
[01:14:33] smathy: Radar, they should lead with that, otherwise I assume current versions and ignore superfluous.
[01:14:33] Radar: :conditions => "foo != 'bar'"
[01:14:38] Radar: smathy: Correct.
[01:14:44] arcanez: does that do magic with :includes / :join?
[01:14:52] arcanez: prefixing the column name with the joined table :(
[01:15:01] arcanez: _that_ is why I want :foo => 'bar'
[01:15:27] smathy: arcanez, *that* is (one of the many many reasons) why using 2.3 is crazy.
[01:15:29] arcanez: .where.not sounds cool
[01:15:57] arcanez: smathy: part of me would rather use named_scope and 2.3 over raw sql itself though
[01:15:58] sevenseacat: welcome to... 2010?
[01:16:05] arcanez: through .connection.execute
[01:16:09] Radar: sevenseacat: not everyone gets to work on the new shinies.
[01:16:13] Aeyrix: I saw Rails 1 mentioned... Yesterday?
[01:16:17] smathy: arcanez, != just wasn't implemented then.
[01:16:21] Radar: arcanez: specify the joined table in the raw query.
[01:16:23] |RicharD|: smathy: I need to create a url for have it in a message that then I send to slack via API
[01:16:35] sevenseacat: I'm not sure I'd call 'released within the past five years' to be 'new shinies'
[01:16:39] sevenseacat: but I see your point
[01:17:03] arcanez: upgrading from 2.3 to 3 or 4 would require a fair amount of work
[01:17:12] smathy: |RicharD|, sounds like you just want to use a path helper then?
[01:17:12] sevenseacat: right. today cloudinary in this app is going *down*.
[01:17:19] riotjones: has joined #RubyOnRails
[01:17:24] Radar: smathy: Can't do that in a Sidekiq worker
[01:17:31] Radar: Rails.application.routes.url_helpers.root_path mighht work
[01:18:48] |RicharD|: Radar: you think it's a good solution Rails.application.routes.url_helpers.root_path ?
[01:18:59] |RicharD|: or better write it manually ?
[01:19:14] smathy: Radar, no, I'd put it in the job when he sends it. /cc |RicharD|
[01:19:16] Aeyrix: Use the url helper.
[01:19:26] bruno-: has joined #RubyOnRails
[01:19:37] ellisTAA: has joined #RubyOnRails
[01:19:46] chipotle: has joined #RubyOnRails
[01:21:30] rickmasta: has joined #RubyOnRails
[01:22:29] EminenceHC: has joined #RubyOnRails
[01:23:26] |RicharD|: ok works :) thx
[01:23:45] bruce_lee2: has joined #RubyOnRails
[01:24:33] Radar: You can put it in the job when you send it.
[01:27:15] roxtrongo: has joined #RubyOnRails
[01:28:36] ellisTAA: has joined #RubyOnRails
[01:29:19] ellisTAA: i???m trying to write tests and i???m assuming i need to create data for my test database ??? i can???t find anything on the internet that explains how to create data specificaly for the test database?? how can i seed the test db
[01:30:11] sevenseacat: EllisTAA: you're probably looking for factories. also, how did you not find anything on the internet about this?
[01:30:34] ellisTAA: sevenseacat: i just didn???t. maybe if i search for factories ill find something
[01:30:35] sevenseacat: https://github.com/thoughtbot/factory_girl is common in Rails.
[01:30:52] ellisTAA: i dont even know what a factory is
[01:37:41] ewnd9_: has joined #RubyOnRails
[01:38:50] jamto11: has joined #RubyOnRails
[01:41:54] Aeyrix: https://en.wikipedia.org/wiki/Factory_%28object-oriented_programming%29
[01:42:48] lemur: has joined #RubyOnRails
[01:46:15] Cervajz_: has joined #RubyOnRails
[01:46:31] ellisTAA: under ???configure your test suite??? it keeps refering to a file spec/support/factory_girl.rb but i don???t have that ??? do i have to create it? http://www.rubydoc.info/gems/factory_girl/file/GETTING_STARTED.md
[01:47:11] sevenseacat: you can make it, or you can put that `config.include` line inside your RSpec.configure block in spec/rails_helper.rb
[01:48:02] jahbrewski: has joined #RubyOnRails
[01:48:58] ellisTAA: sevenseacat: thank you
[01:52:54] nonmadden: has joined #RubyOnRails
[01:54:49] Megamos: has joined #RubyOnRails
[01:54:49] ellisTAA: do i define all of my factories in each spec?
[01:54:58] ellisTAA: at the beginning of the file?
[01:56:50] Scripore: has joined #RubyOnRails
[01:57:38] Megamos: has joined #RubyOnRails
[01:57:50] colleenmcguckin: has joined #RubyOnRails
[02:00:27] skiz: has joined #RubyOnRails
[02:02:30] dideler: has joined #RubyOnRails
[02:04:07] juddey: has joined #RubyOnRails
[02:05:04] hardtail: has joined #RubyOnRails
[02:05:39] nya: has joined #RubyOnRails
[02:06:43] ellisTAA: has joined #RubyOnRails
[02:07:02] SteenJobs: has joined #RubyOnRails
[02:11:38] bruce_lee2: has joined #RubyOnRails
[02:11:54] tater: has joined #RubyOnRails
[02:12:35] diegoviola: I have this code I want to improve but I'm not sure how, I just don't think the code in the create method should be there: https://github.com/diegoviola/avaliacao_desenvolvedor/blob/master/app/controllers/orders_controller.rb https://github.com/diegoviola/avaliacao_desenvolvedor/blob/master/app/models/concerns/parser_concern.rb
[02:12:44] diegoviola: if you have any suggestions, please let me know
[02:13:08] AntiSpamMeta: has joined #RubyOnRails
[02:13:19] diegoviola: I mean, it's straightforward, I'm just not sure about it
[02:13:22] iateadonut: has joined #RubyOnRails
[02:13:32] matthewd: diegoviola: What exception are you expecting?
[02:13:40] owenjones: has joined #RubyOnRails
[02:14:02] tater: has joined #RubyOnRails
[02:14:02] tater: has joined #RubyOnRails
[02:14:06] nya: has joined #RubyOnRails
[02:14:19] sevenseacat: "This challenge must be made by you in your home" not by us :P
[02:14:41] DarkBushido: has joined #RubyOnRails
[02:16:05] diegoviola: sevenseacat: it's already done, really. I've already submitted it yesterday, I just wanted to know how I could improve it further so I could do it better next time
[02:18:04] riotjones: has joined #RubyOnRails
[02:18:06] diegoviola: matthewd: not sure about that :/
[02:18:24] matthewd: diegoviola: Then why did you add the rescue?
[02:18:38] diegoviola: good questions
[02:19:46] diegoviola: I don't remember why I added that, I think I added that when I added the return false from my Parser
[02:19:48] diegoviola: return false if data.empty?
[02:20:41] flip_dig1ts: has joined #RubyOnRails
[02:20:55] build22: has joined #RubyOnRails
[02:21:08] jessemcgilallen: has joined #RubyOnRails
[02:21:18] diegoviola: so instead of getting an error of the data being empty, I would just redirect with an error
[02:22:03] krramos__: has joined #RubyOnRails
[02:22:10] maxx88_: has joined #RubyOnRails
[02:22:53] deavid: has joined #RubyOnRails
[02:22:59] antn: has joined #RubyOnRails
[02:23:07] axsuul_: has joined #RubyOnRails
[02:23:12] bronson_: has joined #RubyOnRails
[02:23:48] adamholt_: has joined #RubyOnRails
[02:23:48] masscrx: has joined #RubyOnRails
[02:23:49] The_Kingdutch: has joined #RubyOnRails
[02:23:52] pavelz: has joined #RubyOnRails
[02:23:57] neanderslob: has joined #RubyOnRails
[02:23:59] sptq: has joined #RubyOnRails
[02:24:03] matt_d: has joined #RubyOnRails
[02:24:11] phon: has joined #RubyOnRails
[02:24:12] gusrub: has joined #RubyOnRails
[02:24:16] dmarr: has joined #RubyOnRails
[02:24:20] kramsee: has joined #RubyOnRails
[02:24:20] waseem_: has joined #RubyOnRails
[02:24:28] Silex: has joined #RubyOnRails
[02:24:28] kaspergrubbe: has joined #RubyOnRails
[02:24:34] atrius: has joined #RubyOnRails
[02:24:37] AlHafoudh: has joined #RubyOnRails
[02:24:43] hfp_work: has joined #RubyOnRails
[02:24:44] skiz: has joined #RubyOnRails
[02:24:45] wenchenx_: has joined #RubyOnRails
[02:24:49] LambdaSource: has joined #RubyOnRails
[02:24:52] rickmasta: has joined #RubyOnRails
[02:25:01] dlitz: has joined #RubyOnRails
[02:25:07] Sadama: has joined #RubyOnRails
[02:25:21] Haydos: has joined #RubyOnRails
[02:25:21] tubbo: has joined #RubyOnRails
[02:25:43] sankaber: has joined #RubyOnRails
[02:25:51] existensil: has joined #RubyOnRails
[02:27:59] Cache_Money: has joined #RubyOnRails
[02:28:02] roxtrongo: has joined #RubyOnRails
[02:28:16] ellisTAA: has joined #RubyOnRails
[02:28:16] colleenmcguckin: has joined #RubyOnRails
[02:28:43] skullcrasher: has joined #RubyOnRails
[02:29:08] towski_: has joined #RubyOnRails
[02:30:37] tuelz: has joined #RubyOnRails
[02:30:57] cgfbee: has joined #RubyOnRails
[02:35:24] njero: has joined #RubyOnRails
[02:35:35] malcolmva: has joined #RubyOnRails
[02:35:35] ellisTAA: has joined #RubyOnRails
[02:41:10] hardtail: has joined #RubyOnRails
[02:41:16] sbarg: has joined #RubyOnRails
[02:41:57] koprom: has joined #RubyOnRails
[02:45:59] pdoogs: has joined #RubyOnRails
[02:46:11] nickenchuggets: has joined #RubyOnRails
[02:46:11] nickenchuggets: has joined #RubyOnRails
[02:47:10] ellisTAA: has joined #RubyOnRails
[02:47:21] EminenceHC: has joined #RubyOnRails
[02:47:28] wldcordeiro: has joined #RubyOnRails
[02:47:56] pdoogs: has left #RubyOnRails: ()
[02:48:09] darrencauthon: has joined #RubyOnRails
[02:49:31] Antoine59: has joined #RubyOnRails
[02:53:01] colleenmcguckin: has joined #RubyOnRails
[02:55:17] jamto11: has joined #RubyOnRails
[02:56:05] framling: has joined #RubyOnRails
[02:56:05] sbarg: has joined #RubyOnRails
[02:57:17] Pazician: has joined #RubyOnRails
[03:00:32] non: has joined #RubyOnRails
[03:03:53] flip_digits: has joined #RubyOnRails
[03:04:00] Cache_Money: has joined #RubyOnRails
[03:10:28] jahbrewski: has joined #RubyOnRails
[03:11:16] benlieb: has joined #RubyOnRails
[03:11:18] darrenca_: has joined #RubyOnRails
[03:14:11] owenjones: has joined #RubyOnRails
[03:16:37] surrealanalysis: has joined #RubyOnRails
[03:18:55] riotjones: has joined #RubyOnRails
[03:20:09] gambl0re: has joined #RubyOnRails
[03:20:16] Fire-Dragon-DoL: ok .as_null_object is evil, even if I really love it
[03:20:32] Fire-Dragon-DoL: evil because it loses sync with main object :S
[03:21:06] sevenseacat: evil for many reasons
[03:21:50] Fire-Dragon-DoL: I wonder if instance_double.as_null_object allows the auto nil-return only for method existing for the given class?
[03:22:43] Fire-Dragon-DoL: although they should have used a better keyword, `spy` is very short, perfect for a double. `instance_double` it's extremely long, lol
[03:31:22] tuelz: has joined #RubyOnRails
[03:37:46] baweaver: has joined #RubyOnRails
[03:39:53] nya: has joined #RubyOnRails
[03:41:31] AnhMV: has joined #RubyOnRails
[03:42:43] dlitz: has joined #RubyOnRails
[03:47:13] Cervajz_: has joined #RubyOnRails
[03:48:30] nya: has joined #RubyOnRails
[03:49:20] ellisTAA: has joined #RubyOnRails
[03:50:47] nya: has joined #RubyOnRails
[03:52:45] djbkd: has joined #RubyOnRails
[03:52:47] armyriad: has joined #RubyOnRails
[03:54:52] EminenceHC: has joined #RubyOnRails
[03:56:07] jamto11: has joined #RubyOnRails
[03:57:47] Cache_Money: has joined #RubyOnRails
[04:01:35] flip_digits: has joined #RubyOnRails
[04:02:01] Fire-Dragon-DoL: :O channel surprisingly silent, I thought I had connection issues, lol
[04:02:19] baweaver: don't ruin the moment
[04:03:06] sevenseacat: we were having a *moment*.
[04:03:29] nya: has joined #RubyOnRails
[04:04:38] w0rd-driven: has joined #RubyOnRails
[04:07:13] chouhoulis: has joined #RubyOnRails
[04:12:26] ewnd9_: has joined #RubyOnRails
[04:12:47] EminenceHC: has joined #RubyOnRails
[04:16:21] braincras: has joined #RubyOnRails
[04:17:34] pydave6367: has joined #RubyOnRails
[04:17:35] Axsuul: has joined #RubyOnRails
[04:18:27] nya: has joined #RubyOnRails
[04:19:43] riotjones: has joined #RubyOnRails
[04:22:07] Guest33405: has joined #RubyOnRails
[04:22:20] braincrash: has joined #RubyOnRails
[04:27:14] duncannz: has joined #RubyOnRails
[04:27:48] ibouvousaime: has joined #RubyOnRails
[04:28:02] duncannz: has joined #RubyOnRails
[04:28:29] camilasan: has joined #RubyOnRails
[04:28:47] roxtrongo: has joined #RubyOnRails
[04:30:25] camt: has joined #RubyOnRails
[04:33:27] nya: has joined #RubyOnRails
[04:34:58] framling: has joined #RubyOnRails
[04:36:09] bruno-: has joined #RubyOnRails
[04:36:14] pkrnj: has joined #RubyOnRails
[04:36:20] duncannz: has joined #RubyOnRails
[04:37:15] krz: has joined #RubyOnRails
[04:37:37] duncannz: has joined #RubyOnRails
[04:38:13] darrencauthon: has joined #RubyOnRails
[04:39:02] framling: has left #RubyOnRails: ()
[04:39:03] camt: has left #RubyOnRails: ()
[04:40:02] fedexo: has joined #RubyOnRails
[04:40:15] duncanm: has joined #RubyOnRails
[04:40:21] shinenelson: has joined #RubyOnRails
[04:40:58] duncanm: has joined #RubyOnRails
[04:42:09] Antoine59: has joined #RubyOnRails
[04:43:28] mary5030: has joined #RubyOnRails
[04:43:52] None: has joined #RubyOnRails
[04:50:03] SteenJobs: has joined #RubyOnRails
[04:53:05] Maletor: has joined #RubyOnRails
[04:53:22] build22_: has joined #RubyOnRails
[04:55:17] yfeldblum: has joined #RubyOnRails
[04:57:07] jamto11: has joined #RubyOnRails
[04:57:49] pawnbox: has joined #RubyOnRails
[04:58:17] Pazician: has joined #RubyOnRails
[05:00:01] pawnbox_: has joined #RubyOnRails
[05:00:11] owenjones: has joined #RubyOnRails
[05:01:11] LambdaSource: has joined #RubyOnRails
[05:02:52] arcanez: is it possible to have named_scope _add_ to :select?
[05:03:06] sevenseacat: try it and see
[05:03:23] arcanez: so far, my aunts say no.
[05:03:42] B1n4r10: has joined #RubyOnRails
[05:03:53] arcanez: :select does not seem to be cummulative.
[05:09:50] quazimodo: has joined #RubyOnRails
[05:10:22] sbarg: has joined #RubyOnRails
[05:10:39] pawnbox: has joined #RubyOnRails
[05:13:23] sye: has joined #RubyOnRails
[05:14:11] arcanez: q&d testing seems to say first :select wins
[05:14:16] freezevee: has joined #RubyOnRails
[05:17:05] SteenJobs: has joined #RubyOnRails
[05:17:30] dikaio: has joined #RubyOnRails
[05:18:19] ur5us: has joined #RubyOnRails
[05:19:06] chouhoulis: has joined #RubyOnRails
[05:19:25] kohrVid: has joined #RubyOnRails
[05:19:56] trosborn: has joined #RubyOnRails
[05:20:31] riotjones: has joined #RubyOnRails
[05:20:45] juddey: has joined #RubyOnRails
[05:21:07] apg: has joined #RubyOnRails
[05:21:07] apg: has joined #RubyOnRails
[05:21:55] djbkd: has joined #RubyOnRails
[05:22:41] youngbaks: has joined #RubyOnRails
[05:22:51] krz: has joined #RubyOnRails
[05:26:21] diegoviola: I'm using <%= f.file_field :file %> -- is there a way to validate that?
[05:26:34] sevenseacat: validate what?
[05:28:13] sevenseacat: validates_presence_of?
[05:28:20] sevenseacat: same way you'd validate anything other field?
[05:29:31] roxtrongo: has joined #RubyOnRails
[05:29:48] arcanez: appears there are add_* methods, but not an add_select.. looking at construct_finder_sql,
[05:29:59] arcanez: sql = "SELECT #{options[:select] || (scope && scope[:select]) || default_select(options[:joins] || (scope && scope[:joins]))} "
[05:30:10] Radar: diegoviola: depends on what you're using. Paperclip has validations for fioles.
[05:30:43] diegoviola: sevenseacat: I don't have a file field in my model so I can't really use that
[05:31:24] diegoviola: Radar: I'm not using any gems for that, just params[:order][:file].tempfile.path
[05:31:28] diegoviola: in the controller
[05:32:05] diegoviola: I'll try paperclip I guess
[05:32:18] Ropeney: diegoviola: <%= f.file_field :file, required: true %> for just the form validation if u want that
[05:32:20] codezomb: has joined #RubyOnRails
[05:32:22] tuelz: has joined #RubyOnRails
[05:32:49] diegoviola: Ropeney: I guess that works too, thanks
[05:33:06] diegoviola: this is embarassing, I should have looked at the api
[05:33:21] Ropeney: did you read the tutorial i sent you yesterday?
[05:33:21] diegoviola: embarrassing*
[05:33:34] Ropeney: or day before rather
[05:33:43] diegoviola: Ropeney: not yet
[05:34:16] Ropeney: it'll be + less embarrassing once you have finished it :)
[05:37:04] yogeshrt: has joined #RubyOnRails
[05:37:07] bruno-: has joined #RubyOnRails
[05:37:41] smathy: Being embarrassed is the first step.
[05:38:13] diegoviola: the first time I read a rails tutorial was in 2007, I don't remember
[05:38:16] slash_quit: ... rails_12factor joke
[05:38:20] diegoviola: but yes, I agree with you, it's always good to go back to the basics
[05:39:17] sevenseacat: diegoviola: don't take this the wrong way, but you really need to get a good grip on the basics.
[05:43:19] diegoviola: yeah sure, I've been writing PHP lately, maybe that f*cked me up a bit
[05:43:28] diegoviola: http://i.imgur.com/lgOJR4T.jpg
[05:44:05] Helheim: has joined #RubyOnRails
[05:44:14] kanzure: has joined #RubyOnRails
[05:44:20] slash_quit: *gasp*... IlluminatiHttpRequest?
[05:44:44] diegoviola: I really miss that monitor
[05:44:55] slash_quit: *gasp* "No Battery"?!
[05:45:09] SteenJobs: has joined #RubyOnRails
[05:45:49] pydave6367: has joined #RubyOnRails
[05:45:52] arcanez: *gasp* PHP?!
[05:46:04] kanzure: has joined #RubyOnRails
[05:46:14] arcanez: with the \ namespace separator
[05:46:45] diegoviola: I'll go through that tutorial, should get up to speed again quickly
[05:46:57] RegulationD: has joined #RubyOnRails
[05:48:06] Cervajz_: has joined #RubyOnRails
[05:48:28] arcanez: wish I could add to options[:select] or scope[:select] :(
[05:48:46] slash_quit: arcanez: context?
[05:49:16] Radar: arcanez: !xy so hard right now
[05:49:16] helpa: arcanez: It seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[05:49:19] dviola: slash_quit: that's i3status, it says that there is no battery, because there is no battery :)
[05:49:44] arcanez: I want my chained named_scopes to append the :select
[05:50:00] arcanez: some testing shows first scope 'wins'
[05:50:15] dionysus69: has joined #RubyOnRails
[05:50:22] AnhMV: has joined #RubyOnRails
[05:50:28] slash_quit: what chained named_scopes? what version of rails are you using?
[05:50:34] Radar: arcanez: Please take the time to read the link that helpa shows.
[05:50:41] srinidhi: has joined #RubyOnRails
[05:50:45] Radar: arcanez: You're explaining what you need rather than the why of you needing it.
[05:51:10] johnflux: has joined #RubyOnRails
[05:51:25] arcanez: I have a complex SQL query that I'm splitting into a few named_scopes, based on what they add to the query
[05:51:40] tildes: has joined #RubyOnRails
[05:52:01] arcanez: :with_time_window filters based on time, :with_no_pending_running filters out Pending & Running jobs, :with_job_status_counts adds SUMs
[05:52:34] arcanez: but :with_job_status_counts has :select, I'd prefer if I could specify additional :select outside of the named_scope so it is more generic and reusable
[05:52:41] arcanez: only selecting the SUMs it needs to
[05:53:09] arcanez: :conditions, :joins, they are additive
[05:54:03] slash_quit: i see... but what are you trying to do?
[05:54:09] build22_: has joined #RubyOnRails
[05:54:35] arcanez: break out the parts of the query into reusable parts
[05:54:54] arcanez: so I can run queries with only parts of the query
[05:55:04] arcanez: right now, the query is just raw SQL run through .connection.execute
[05:56:27] kanzure: has joined #RubyOnRails
[05:56:45] arcanez: but once I call a named_scope with a :select, I can't set :select again or add to it
[05:57:46] jamto11: has joined #RubyOnRails
[05:57:59] dviola: slash_quit: that IlluminateHttpRequest was some Laravel thing
[05:59:33] slash_quit: arcanez: do you have some code? the scopes... how you're chaining... what it returns... what you'd expect/prefer?
[05:59:55] mclee: has joined #RubyOnRails
[06:01:29] ur5us: has joined #RubyOnRails
[06:01:46] slash_quit: dviola: so no connection to the illuminati?
[06:02:45] dviola: slash_quit: maybe #laravel probably knows
[06:02:53] camt: has joined #RubyOnRails
[06:03:01] None: has joined #RubyOnRails
[06:03:46] arcanez: preferred pastebin?
[06:03:56] dviola: slash_quit: when I was using laravel though, it just felt like rails, except that it was still PHP :p
[06:08:42] slash_quit: arcanez: gists are good... i'll be asleep in a few minutes, myself, but the more info your provide, the more likely it is someone can help...
[06:08:56] helpa: It seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[06:09:11] srinidhi1: has joined #RubyOnRails
[06:09:19] kohrVid: Hi there. Does anyone know if there's a built-in way to stop get requests that are sent to a post controller action in the current version of Ruby on Rails? There was a way to do this in Rails 2&3 using the before_filter - has the functionality been dropped since then?
[06:09:23] dviola: arcanez: I tend to use ix, sprunge and gist
[06:09:23] quazimodo: has joined #RubyOnRails
[06:09:47] arcanez: I think I'll skip putting the :select into a named_scope and just put it in the final .find(:all, { }) for now
[06:16:42] skiz: has joined #RubyOnRails
[06:16:52] bmalum: has joined #RubyOnRails
[06:17:47] apg: has joined #RubyOnRails
[06:17:56] chrissonar: has joined #RubyOnRails
[06:18:43] dopie: has joined #RubyOnRails
[06:19:18] duncannz: has joined #RubyOnRails
[06:19:52] asianMike: has joined #RubyOnRails
[06:19:55] Fire-Dragon-DoL: has joined #RubyOnRails
[06:20:11] duncannz: has joined #RubyOnRails
[06:20:20] raunicolae: has joined #RubyOnRails
[06:20:28] dhjondoh: has joined #RubyOnRails
[06:21:19] riotjones: has joined #RubyOnRails
[06:21:25] ewnd9: has joined #RubyOnRails
[06:21:35] smathy: kohrVid, no, there are still before filters in current Rails: http://guides.rubyonrails.org/action_controller_overview.html#filters
[06:22:05] Radar: kohrVid: before_filter will work in Rails 1, 2, 3 and 4, but has been renamed to before_action in Rails 5.
[06:22:46] kohrVid: smarthy & Radar: so is it possible to use this to prevent get requests in Rails 4?
[06:23:09] Radar: kohrVid: !8ball
[06:23:13] Radar: HELPA HAS SPOKEN
[06:23:27] Radar: I don't know what you mean by "stop" exactly. You have to give some sort of response back to the user from the server.
[06:23:30] slash_nick: it seems you'd prevent a get request to some path by not defining a route for that path
[06:23:42] smathy: kohrVid, you can't really prevent the get request, but you can prevent a response.
[06:24:18] Radar: kohrVid: What does your routes.rb look like?
[06:25:10] kohrVid: My routes file is just two lines:
[06:25:11] kohrVid: root "people#index"
[06:25:23] kohrVid: resources :people
[06:25:29] Radar: kohrVid: !xy
[06:25:29] helpa: kohrVid: It seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[06:25:39] Radar: kohrVid: Please explain the why of this
[06:26:08] ruurd: has joined #RubyOnRails
[06:26:15] kohrVid: I was watching a video that mentioned that search engines can fill up a DB with get requests in a create action...
[06:26:35] mary5030: has joined #RubyOnRails
[06:26:51] kohrVid: ...when I googled this all I could find on the subject was references to captchas (which is fine but has JS implications).
[06:26:52] slash_nick: well... with resources :people... a get request would never go to a create action... that's explained in the routing guides
[06:27:11] lxsameer: has joined #RubyOnRails
[06:27:21] rvanlieshout: has joined #RubyOnRails
[06:27:49] kohrVid: slash_nick: oh sorry. It's ust when I tried to test for this, the get requests were going through. It was probably a bad test.
[06:28:37] kohrVid: Anyway, thanks everyone.
[06:28:40] slash_nick: so... a get to /people would go to the index action... a post to /people would go to the create action... i'm not sure there's a problem here. maybe consume the routing guides so you can explain why it's not a problem yourself
[06:29:33] kohrVid: slash_nick: will do, thanks.
[06:29:35] Radar: kohrVid: Thanks for explaining the why.
[06:29:36] helpa: http://guides.rubyonrails.org/routing.html - Rails Routing From the Outside In - Rails Guide - by Mike Gunderloy
[06:29:37] lxsameer: has joined #RubyOnRails
[06:29:38] Radar: For more info
[06:29:56] AnhMV: has joined #RubyOnRails
[06:30:40] Cervajz_: has joined #RubyOnRails
[06:31:03] yoongkang: has joined #RubyOnRails
[06:31:58] SteenJobs: has joined #RubyOnRails
[06:32:42] yogeshrt: has joined #RubyOnRails
[06:35:35] duncannz: has joined #RubyOnRails
[06:36:03] yardenbar: has joined #RubyOnRails
[06:36:50] youngbaks: has joined #RubyOnRails
[06:39:34] bruno-: has joined #RubyOnRails
[06:40:50] ibouvousaime: has joined #RubyOnRails
[06:41:22] pydave6367: has joined #RubyOnRails
[06:45:55] ruurd: has joined #RubyOnRails
[06:48:32] norc: has joined #RubyOnRails
[06:51:54] tagrudev: has joined #RubyOnRails
[06:55:51] Fire-Dragon-DoL: good night everyone
[06:56:08] build22_: has joined #RubyOnRails
[06:57:42] kanzure: has joined #RubyOnRails
[06:58:38] jamto11: has joined #RubyOnRails
[06:59:59] arBmind: has joined #RubyOnRails
[07:00:32] rickmasta: has joined #RubyOnRails
[07:00:58] Rubie: has joined #RubyOnRails
[07:03:04] yfeldblum: has joined #RubyOnRails
[07:03:41] darutoko: has joined #RubyOnRails
[07:04:30] emilkarl: has joined #RubyOnRails
[07:07:46] jessemcgilallen: has joined #RubyOnRails
[07:08:01] emilkarl: has joined #RubyOnRails
[07:12:03] riotjones: has joined #RubyOnRails
[07:12:52] emilkarl: has left #RubyOnRails: ()
[07:16:51] Pazician: has joined #RubyOnRails
[07:17:06] justinbutt3r: has joined #RubyOnRails
[07:17:35] norc: Hi, I have a use case where my application needs to authenticate and authorize users based on JWT. Unfortunately our clients do not support OAuth, so I cannot use that infrastructure.
[07:18:58] GirafficPark: has joined #RubyOnRails
[07:19:10] arBmind1: has joined #RubyOnRails
[07:19:53] norc: Should I just roll my own here, or is there some decent gem that helps me here?
[07:20:01] sinkensabe: has joined #RubyOnRails
[07:21:31] Pazician: has joined #RubyOnRails
[07:23:02] krz: has joined #RubyOnRails
[07:23:12] None: has joined #RubyOnRails
[07:23:55] simplyianm: has joined #RubyOnRails
[07:25:25] solars: I need to iterate over a table with ~6mio entries and trigger an update action on each. Is Model.all.each the way to go or is there anything better instead of .all I should use? not sure about loading etc
[07:25:32] trosborn: has joined #RubyOnRails
[07:26:40] emilkarl: has joined #RubyOnRails
[07:27:33] norc: solars: Is this a one time action?
[07:28:10] norc: solars: http://apidock.com/rails/ActiveRecord/Relation/update_all # is probably what you want if you want to do it in Rails.
[07:28:12] aganov: has joined #RubyOnRails
[07:28:38] rvanlieshout: but do take not of some major differences in using update_all and using .each tu update
[07:28:54] rvanlieshout: one of them being that callbacks are _not_ executed
[07:28:58] rvanlieshout: nor are validations
[07:29:10] rhizome: what's jwt
[07:29:25] solars: yeah that won't work, I have to not only set a single field, but calculate stuff
[07:29:29] solars: so I call a custom method in .each
[07:29:35] norc: rhizome: https://tools.ietf.org/html/rfc7519
[07:29:43] rvanlieshout: solars: if it's only calculation you might want to have your db calculate it
[07:29:45] solars: I was just unsure how .all works in detail regarding loading objects
[07:29:52] norc: solars: If you can do it in SQL, you should do it.
[07:29:57] rvanlieshout: find_each is a better approach then, solars
[07:30:02] rvanlieshout: if in the db is not an option
[07:30:06] solars: I also can't calculate it in the db
[07:30:16] roxtrongo: has joined #RubyOnRails
[07:30:22] solars: rvanlieshout, I see, why is find_each better?
[07:30:24] rvanlieshout: find_each uses find in batches and doesn't create a full set of objects before starting the each
[07:30:36] solars: ah in batches
[07:30:39] rhizome: norc: ruby-jwt doesn't do it for you?
[07:30:41] solars: alright I will use it then
[07:30:54] norc: rhizome: Ideally I want something like a decent warden strategy for JWT.
[07:31:05] solars: thanks guys
[07:31:48] benhuda: has joined #RubyOnRails
[07:31:54] yoongkang: has joined #RubyOnRails
[07:33:09] tuelz: has joined #RubyOnRails
[07:35:04] montagne_goat: has joined #RubyOnRails
[07:37:44] jahbrewski: has joined #RubyOnRails
[07:40:51] ur5us: has joined #RubyOnRails
[07:42:08] tetraktys: has joined #RubyOnRails
[07:44:14] mloy: has joined #RubyOnRails
[07:48:37] jccnd: has joined #RubyOnRails
[07:49:37] akshat: has joined #RubyOnRails
[07:50:17] None: has joined #RubyOnRails
[07:51:04] _djbkd: has joined #RubyOnRails
[07:51:44] MaDErroR123: has joined #RubyOnRails
[07:53:48] justinbutt3r: has joined #RubyOnRails
[07:56:36] ereslibre: has joined #RubyOnRails
[07:56:36] ereslibre: has joined #RubyOnRails
[07:56:57] build22_: has joined #RubyOnRails
[07:59:10] jamto11: has joined #RubyOnRails
[08:01:24] krz: has joined #RubyOnRails
[08:01:29] htmldrum: has joined #RubyOnRails
[08:01:38] lulzmachine: has joined #RubyOnRails
[08:03:34] Giorgio: has joined #RubyOnRails
[08:05:14] ruurd: has joined #RubyOnRails
[08:06:43] flip_digits: has joined #RubyOnRails
[08:08:02] simplyianm: has joined #RubyOnRails
[08:15:18] Cervajz_: has joined #RubyOnRails
[08:17:15] build22: has joined #RubyOnRails
[08:17:36] moei: has joined #RubyOnRails
[08:18:41] Cervajz_: has joined #RubyOnRails
[08:19:06] None: has joined #RubyOnRails
[08:19:24] kimegede: has joined #RubyOnRails
[08:19:48] emilkarl: has joined #RubyOnRails
[08:20:23] Pumukel: has joined #RubyOnRails
[08:21:18] Ergo: has joined #RubyOnRails
[08:21:30] The_Kingdutch: has left #RubyOnRails: ()
[08:22:03] rhizome: has joined #RubyOnRails
[08:22:09] Kingdutch: has joined #RubyOnRails
[08:25:19] artto: has joined #RubyOnRails
[08:29:11] arBmind: has joined #RubyOnRails
[08:29:27] nettoweb: has joined #RubyOnRails
[08:31:21] riotjones: has joined #RubyOnRails
[08:32:31] yoongkang: has joined #RubyOnRails
[08:32:51] helpa: has joined #RubyOnRails
[08:32:59] adac: has joined #RubyOnRails
[08:33:19] DoubleMalt: has joined #RubyOnRails
[08:33:56] rhizome: has joined #RubyOnRails
[08:34:53] srinidhi: has joined #RubyOnRails
[08:38:13] ss_much: has joined #RubyOnRails
[08:40:06] marr: has joined #RubyOnRails
[08:41:14] B1n4r10: has joined #RubyOnRails
[08:42:20] dionysus69: how do I make capistrano do git pull instead of git clone? set :deploy_via, :remote_cache ??
[08:42:54] artto: has joined #RubyOnRails
[08:46:01] roxtrongo: has joined #RubyOnRails
[08:46:14] rvanlieshout: dionysus69: isn't that described in the docs?
[08:46:55] dionysus69: ok will open it up :D
[08:49:09] toomus: has joined #RubyOnRails
[08:49:52] toomus: I have problem with saving new record
[08:50:05] artto: has joined #RubyOnRails
[08:50:20] sevenseacat: i hate when that happens.
[08:50:59] toomus: record is valid, no errors, but save! raise ActiveRecord::RecordNotSaved
[08:51:10] helpa: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[08:51:17] dionysus69: lol I can't really find documentation mentioning set :deploy_via ...
[08:53:40] toomus: sevenseacat: http://pastie.org/10566903#
[08:53:50] toomus: sevenseacat: I want join together two gems
[08:54:03] toomus: sevenseacat: markable and public_activity
[08:54:06] sevenseacat: theres no evdence of any kind of error there
[08:54:24] pawnbox: has joined #RubyOnRails
[08:55:28] dviola: pastie is really awful
[08:55:41] rvanlieshout: toomus: callback
[08:55:53] dviola: their raw is not really raw as it has HTML in it: http://pastie.org/pastes/10566903/text
[08:55:57] rhizome: joining together of gems is what the programming part does
[08:55:57] rvanlieshout: toomus: that returns false
[08:56:02] rvanlieshout: toomus: = no saving
[08:56:26] dviola: raw should be plain text
[08:56:42] toomus: rvanlieshout: Ah, right, probably something inside public_activity
[08:56:51] sevenseacat: dviola: take it up with Dreamer3
[08:57:41] build22_: has joined #RubyOnRails
[09:00:07] jamto11: has joined #RubyOnRails
[09:00:26] yashinbasement: has joined #RubyOnRails
[09:00:52] sevenseacat: toomus: or the callback you just showed us
[09:01:00] baweaver: has joined #RubyOnRails
[09:01:14] andatche: has joined #RubyOnRails
[09:01:54] teclator: has joined #RubyOnRails
[09:03:12] pawnbox: has joined #RubyOnRails
[09:04:12] dideler: has joined #RubyOnRails
[09:05:08] jsrn_: has joined #RubyOnRails
[09:06:20] dopie: how I turn #<BigDecimal:7ff577122c20,'0.895E6',9(18)> object into cents ??
[09:06:48] zpe: has joined #RubyOnRails
[09:06:52] norc: dopie: Find someone who is willing to pay for it.
[09:07:17] dopie: norc, that was so funny you should shove your mouse up your bum and hope jerry finds it
[09:07:29] norc: dopie: http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#method-i-number_to_currency
[09:07:46] flip_digits: has joined #RubyOnRails
[09:08:14] curses: has joined #RubyOnRails
[09:09:27] LambdaSource: has joined #RubyOnRails
[09:13:31] dionysus69: pathToapplication/**current** this should be the root directory I set in nginx if I use capistrano is it right
[09:14:51] dopie: ok i get this
[09:14:52] dopie: p.current_list_price.to_i
[09:14:53] dopie: => 895000
[09:16:28] yogeshrt: has joined #RubyOnRails
[09:17:05] freezevee: has joined #RubyOnRails
[09:17:23] nertzy2: has joined #RubyOnRails
[09:18:32] rhizome: integer, not decimal
[09:20:10] andatche: has joined #RubyOnRails
[09:21:30] Cervajz_: has joined #RubyOnRails
[09:23:47] krzkrz: has joined #RubyOnRails
[09:27:38] Peg-leg: has joined #RubyOnRails
[09:29:01] Cervajz_: has joined #RubyOnRails
[09:29:16] GirafficPark: has left #RubyOnRails: ()
[09:31:55] freezevee: has joined #RubyOnRails
[09:33:53] tuelz: has joined #RubyOnRails
[09:41:12] bruno-: has joined #RubyOnRails
[09:43:39] None: has joined #RubyOnRails
[09:48:20] ruurd: has joined #RubyOnRails
[09:48:35] RegulationD: has joined #RubyOnRails
[09:53:38] dionysus69: I am trying to reuse just one block of code, which one would be more suitable in this case mixin or module?
[09:53:43] build22_: has joined #RubyOnRails
[09:54:11] norc: Is it possible that the HAML output might differ between production and development?
[09:55:00] norc: dionysus69: mixins are implemented with modules
[09:55:36] dionysus69: so module files are called mixins also? I thought those were two different
[09:57:16] emilkarl: has joined #RubyOnRails
[09:59:57] norc: dionysus69: No.
[10:00:43] jamto11: has joined #RubyOnRails
[10:01:26] rodfersou: has joined #RubyOnRails
[10:01:27] Megamos: has joined #RubyOnRails
[10:01:36] norc: dionysus69: module Foo; A = 1; end
[10:01:42] norc: That for example is just a module.
[10:01:57] dionysus69: ok I get it, its called mixin only after its included in some class
[10:02:14] norc: Or prepended. But yeah
[10:02:34] dionysus69: its a surplus word I think, I would instead stick with convention and say, import a module instead of mixin a module
[10:02:50] norc: *include :)
[10:02:58] dionysus69: haha ye include :D
[10:03:22] norc: dionysus69: Honestly I don't hear the word "mixin" used much outside teaching basic module stuff in the Ruby world.
[10:03:41] baweaver: has joined #RubyOnRails
[10:04:26] dionysus69: google is full of it, thats how I heard about it and i got confused :) i thought it was a "different" way to include different kinds of code lmfo
[10:05:21] norc: dionysus69: Also, there are interesting hooks to how Ruby modules work (def included; end) - these are utilized to great effect in concerns.
[10:05:38] norc: These together with prepend turn modules into powerful things.
[10:06:18] dionysus69: I will lookup what you just said
[10:06:45] norc: dionysus69: And remember you can also extend, which is different from include.
[10:07:04] norc: But to understand all of this, it really is the best to get a basic understand of the ruby object model.
[10:07:35] norc: That removes so much of the mystery about most of this topic.
[10:08:09] dionysus69: I went through all that because of this was duplicated in two different views https://gist.github.com/webzorg/5222205c53cdcd83dcd2, I wondered if its even worse drying that up
[10:08:47] flip_digits: has joined #RubyOnRails
[10:09:26] norc: dionysus69: Partials are a great way of providing the same view snippets in various parts.
[10:09:52] norc: dionysus69: Or mixin the common functionality into decorators/presenters.
[10:11:32] rhizome: dionysus69: render @products
[10:11:44] bmalum: has joined #RubyOnRails
[10:11:57] dionysus69: so I should use partial instead of module? :D
[10:12:11] dionysus69: theres not much difference in my case as I see it
[10:12:57] norc: dionysus69: I just named you the various tools you can use in Rails to DRY up code. We would have to see the other part that duplicates to see how to deal with it the best way
[10:13:04] norc: Ideally together with the respective controllers
[10:14:33] Fery: has joined #RubyOnRails
[10:14:42] dionysus69: I ll investigate module class and ruby object model, enough material really :) thanks
[10:15:13] DoubleMalt: has joined #RubyOnRails
[10:15:40] norc: dionysus69: https://www.youtube.com/watch?v=by5fFOBhtPQ
[10:15:47] norc: This is a decent introduction into the ruby object model.
[10:16:01] norc: It goes somewhat deep into the internals though.
[10:16:07] dionysus69: cool thanks!
[10:16:46] roxtrongo: has joined #RubyOnRails
[10:21:05] ibouvousaime: has joined #RubyOnRails
[10:21:18] moeabdol: has joined #RubyOnRails
[10:24:11] Fery: has left #RubyOnRails: ()
[10:24:25] arup_r: has joined #RubyOnRails
[10:24:37] rhizome: i'm a fan of partials
[10:26:49] Fery: has joined #RubyOnRails
[10:27:02] Fery: good day all
[10:27:08] AnhMV: has joined #RubyOnRails
[10:29:11] Fery: ActionView::Template::Error (undefined method `purch_subcon_id' for #<PurchSubconAddress::ActiveRecord_Relation:0x00000006949070>): 58: <%= hidden_field_tag 'record[created_by]', session[:id] %>
[10:29:16] Fery: 59: <table>
[10:29:18] Fery: 60: <tr>
[10:29:21] Fery: 61: <td>Subcon ID</td><td> <%= text_field_tag 'record[purch_subcon_id]', @record.purch_subcon_id %></td>
[10:29:30] TPBallbag: has joined #RubyOnRails
[10:31:08] emrox_: has joined #RubyOnRails
[10:31:27] n1ck7: has joined #RubyOnRails
[10:32:06] raunicolae: has left #RubyOnRails: ("Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is")
[10:32:08] norc: Fery: Obviously your @record has no such column purch_subcon_id
[10:34:01] yoongkang: has joined #RubyOnRails
[10:34:21] norc: http://pastie.org/10567097 -- Why does this produce extra whitespace inside the button tag in development mode?
[10:34:30] norc: But not in production
[10:34:40] tuelz: has joined #RubyOnRails
[10:35:06] Fery: norc: ok, i'll take a look more
[10:35:20] braincrash: has joined #RubyOnRails
[10:35:42] norc: Fery: Did you perhaps mean @record.id ?
[10:36:09] ldnunes: has joined #RubyOnRails
[10:38:38] lubekpl: has joined #RubyOnRails
[10:39:06] Cervajz_: has joined #RubyOnRails
[10:39:55] yoongkang: has joined #RubyOnRails
[10:41:08] Fery: class PurchSubcon < ActiveRecord::Base has_many :purch_subcon_addresses
[10:41:09] Fery: class PurchSubconAddress < ActiveRecord::Base
[10:41:09] Fery: belongs_to :purch_subcon
[10:41:25] Fery: i have 2 model, there it's relationship
[10:42:36] dramagods: has joined #RubyOnRails
[10:42:43] Fery: below from _form.html.erb
[10:42:45] Fery: <% if params[:tbl]=="subcon_address" %>
[10:42:46] Fery: <%= form_tag("/purch/cu/" + (job) + "&tbl="+params[:tbl], remote: true) do %>
[10:42:49] Fery: <%= hidden_field_tag 'record[created_by]', session[:id] %>
[10:42:56] Fery: <td>Subcon ID</td><td> <%= text_field_tag 'record[purch_subcon_id]', @record.purch_subcon.id %></td>
[10:43:04] Fery: <td>City</td><td> <%= text_field_tag 'record[city]', (@record.city if @record.present?) %></td>
[10:43:12] Fery: <td>Province</td><td> <%= text_field_tag 'record[province]', (@record.province if @record.present?) %></td>
[10:43:20] Fery: <td>Country</td><td> <%= text_field_tag 'record[state]', (@record.state if @record.present?) %></td>
[10:43:24] rhizome: really goin for it huh
[10:43:29] Fery: <tr><td>
[10:43:31] Fery: <%= submit_tag "Save" %>
[10:43:34] Fery: </td></tr>
[10:43:36] Fery: </table>
[10:43:39] Fery: <% end %>
[10:44:10] Fery: purch_subcon_id exist on table purch_subcon_addresses, i want it relate to table purch_subcon.id
[10:44:11] rhizome: now what do you say
[10:44:55] tvw: has joined #RubyOnRails
[10:44:56] DefV: ah, so no bot to tell people about gist?
[10:46:12] rhizome: dunno if any with power are around
[10:46:21] norc: Fery: Did you perhaps forget add/run the migration that adds the association?
[10:47:08] rhizome: Fery: you did a ,where without a .first, right?
[10:48:53] waseem_: Fery: !gist
[10:48:53] helpa: Fery: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[10:49:23] norc: rhizome: Oh, yeah. It was a relation :)
[10:50:55] Fery: i'm sorry, i'll do it there
[10:51:25] njero: has joined #RubyOnRails
[10:52:26] moeabdol: has joined #RubyOnRails
[10:57:02] ibouvousaime: has joined #RubyOnRails
[10:58:43] helpa-bot: has joined #RubyOnRails
[10:59:04] _lazarevsky__: has joined #RubyOnRails
[10:59:10] _lazarevsky__: hey gals and boys
[10:59:22] _lazarevsky__: using the mail gem I get a Mail object
[10:59:26] _lazarevsky__: the body seems to be encoded
[10:59:45] _lazarevsky__: I think it only happens when a mail is received from a windows outlook client (as far as I can tell)
[10:59:50] _lazarevsky__: how does one go about decoding that
[10:59:53] _lazarevsky__: is it trivial?
[11:00:17] owenjones: has joined #RubyOnRails
[11:00:52] nightsh: has joined #RubyOnRails
[11:01:10] Downtime: has joined #RubyOnRails
[11:01:30] mhenrixon: has joined #RubyOnRails
[11:01:31] prasselpikachu: has joined #RubyOnRails
[11:01:38] kitallis: has joined #RubyOnRails
[11:01:38] jamto11: has joined #RubyOnRails
[11:01:39] comrad: has joined #RubyOnRails
[11:02:04] Puffball: has joined #RubyOnRails
[11:02:11] rodferso1: has joined #RubyOnRails
[11:02:12] contradictioned: has joined #RubyOnRails
[11:02:39] helpa: has joined #RubyOnRails
[11:03:21] rodferso1: has joined #RubyOnRails
[11:03:23] Prira: has joined #RubyOnRails
[11:04:27] LambdaSource: has joined #RubyOnRails
[11:04:34] ruid: has joined #RubyOnRails
[11:04:39] baweaver: has joined #RubyOnRails
[11:06:04] quazimodo: has joined #RubyOnRails
[11:06:15] roxtrongo: has joined #RubyOnRails
[11:07:47] The_Phoenix: has joined #RubyOnRails
[11:08:00] srinidhi: has joined #RubyOnRails
[11:08:41] Fery: https://gist.github.com/anonymous/049be76f3f41794ddcc6
[11:09:00] Fery: let me if you need other infos
[11:09:48] flip_digits: has joined #RubyOnRails
[11:11:38] Fery: actually it's error on line 43 on _form.html.erb
[11:12:05] boom1992: has joined #RubyOnRails
[11:12:42] norc: Fery: The issue was spotted already
[11:13:26] moeabdol: has joined #RubyOnRails
[11:13:39] Fery: norc : okay
[11:15:04] Fery: norc: would you mention where is it ?
[11:16:46] dhjondoh: has joined #RubyOnRails
[11:18:49] n1ck7: has joined #RubyOnRails
[11:18:54] artto: has joined #RubyOnRails
[11:19:35] flip_digits: has joined #RubyOnRails
[11:20:28] rickmasta: has joined #RubyOnRails
[11:21:45] bruno-: has joined #RubyOnRails
[11:21:48] danieldocki: has joined #RubyOnRails
[11:21:58] marcoceppi: has joined #RubyOnRails
[11:25:34] Megamos: has joined #RubyOnRails
[11:26:16] norc: Fery: You are not passing an instance of ActiveRecord, but a Relation object.
[11:26:48] Cervajz_: has joined #RubyOnRails
[11:27:05] norc: Fery: Please gist us the related controller code.
[11:27:19] norc: Oh its there sorry.
[11:27:27] artto: has joined #RubyOnRails
[11:27:56] norc: Fery: .where() returns a Relation #=> http://api.rubyonrails.org/classes/ActiveRecord/Relation.html
[11:28:14] hoodow__: has left #RubyOnRails: ()
[11:28:16] norc: Either select the record you want from that relation, or if you are sure there can be only one object, use .find() instead.
[11:28:17] yoongkang: has joined #RubyOnRails
[11:29:22] hoodow: has joined #RubyOnRails
[11:30:08] marcoceppi: has joined #RubyOnRails
[11:30:43] SalexW: has joined #RubyOnRails
[11:31:52] Fery: norc: sorry i don't get what you said, it's my trial and error coding, i just learning this rails for about 1 week , from zero knowledge about coding or web development
[11:32:34] freezevee: has joined #RubyOnRails
[11:32:35] Fery: i just find and complete the puzzle from googling
[11:33:07] norc: Fery: Alright. So when you do SomeModel.where() you do not get an object immediately.
[11:33:10] roxtrongo: has joined #RubyOnRails
[11:33:28] norc: The reason is your where() could return multiple objects.
[11:33:41] norc: And other performance reasons.
[11:33:48] _lazarevsky_: has joined #RubyOnRails
[11:34:24] norc: Fery: So instead you get a Relation object, which acts as a proxy container (an array would be an extremely simplified way of looking at it)
[11:34:41] _lazarevsky_: "s3bucket{\"bucketName\":\"bucketName\",\"keyName\":\"asdasdasd-2343242-asdas\"}" <- I have the following string. How can I parse it?
[11:34:44] _lazarevsky_: what format is this?
[11:35:23] tuelz: has joined #RubyOnRails
[11:35:34] norc: _lazarevsky_: Looks like JSON to me.
[11:36:01] _lazarevsky_: ya but can'tbe parsed using JSON.parse
[11:36:07] _lazarevsky_: lemme wrap it in {}
[11:36:32] norc: Ah I see what you mean.
[11:36:43] Megamos: has joined #RubyOnRails
[11:37:59] stamina: has joined #RubyOnRails
[11:38:21] norc: Fery: What if PurchSubconAddress.where(:purch_subcon_id=>params[:id]) returns multiple rows?
[11:38:27] Fery: norc : i am trying to understand
[11:39:07] _lazarevsky_: norc: m.sub!("s3bucket", "")
[11:39:10] _lazarevsky_: makes it a json
[11:39:20] Fery: norc: if so, we can't get instant variable to use
[11:40:47] norc: Fery: Let me be specific.
[11:40:52] Pazician: has joined #RubyOnRails
[11:42:14] norc: Fery: a = User.where("id > ?", 200) #=> ActiveRecord::Relation
[11:43:49] norc: Fery: a = User.where("id > ?", 200).where(user: "norc").offset(1) # => ActiveRecord::Relation
[11:44:37] norc: Fery: Just use find() or find_by() if you want to get a specific record. :)
[11:44:48] Pazician: has joined #RubyOnRails
[11:44:52] norc: where() returns an object that you can chain with other methods or iterate over.
[11:46:04] lacrymol1gy: has joined #RubyOnRails
[11:47:28] Fery: norc : i use @record = PurchSubconAddress.find(params[:id])
[11:47:37] Fery: and it's working
[11:47:54] youngbaks: has joined #RubyOnRails
[11:47:57] bruno-: has joined #RubyOnRails
[11:48:14] solars: has joined #RubyOnRails
[11:48:39] norc: Fery: The beautiful thing now is, if that call fails, a ActiveRecord::RecordNotFound exception will be raised.
[11:48:52] norc: Fery: Which will get automatically caught in production, rendering a 404 Error.
[11:49:03] norc: Magically, just like that.
[11:49:49] Fery: norc: thank a lot, and know my first form dialog showing PurchSubcon disappeared, only showing form dialog for PurchSubconAdress
[11:50:18] nya: has joined #RubyOnRails
[11:50:42] Fery: it's JS matter ?
[11:51:22] Fery: i want 2 form dialog to be shown all
[11:52:11] iateadonut: has joined #RubyOnRails
[11:54:39] spiman: has joined #RubyOnRails
[11:54:52] zvive: has joined #RubyOnRails
[11:57:03] tetraktys: has joined #RubyOnRails
[11:58:11] Scripore: has joined #RubyOnRails
[11:59:49] Fery: norc: what if my PurchSubconAddress table is empty ?
[11:59:49] Fery: how to handle if empty, so i cant fill the data
[11:59:49] Fery: for the first time
[11:59:49] Fery: with corresponding purch_subcon.id
[11:59:54] krz: has joined #RubyOnRails
[11:59:57] johnflux_: has joined #RubyOnRails
[12:00:23] machuga: has joined #RubyOnRails
[12:00:34] bmalum: has joined #RubyOnRails
[12:01:07] moeabdol: has joined #RubyOnRails
[12:01:15] jahbrewski: has joined #RubyOnRails
[12:01:20] norc: Fery: What do you mean?
[12:01:28] spiman: hello i am having some problems with rbenv after i upgraded to os x el capitan. even though everything points to the fact that i am using ruby 2.2.2, bundler starts the rails server and installs gems with ruby 2.0.0 . Here's a gist with some of the output of my shell : https://gist.github.com/spiman/228c54e6073f5f1a689c
[12:02:17] jamto11: has joined #RubyOnRails
[12:03:35] Rubie: has joined #RubyOnRails
[12:04:00] circ-user-hgOzR: has joined #RubyOnRails
[12:04:25] Fery: norc : can i send you a video about my application going ?
[12:04:38] Fery: under 1mb
[12:05:07] norc: spiman: Mind my asking, what is be?
[12:05:19] spiman: norc: my alias for bundle exec
[12:05:42] suchness: spiman: Does your Gemfile specify the right ruby version?
[12:05:49] norc: spiman: What does which bundle give you? The appropriate rbenv shim?
[12:06:56] spiman: suchness: no, i don't specify a specific ruby version
[12:07:08] rickmasta: has joined #RubyOnRails
[12:07:21] suchness: spiman: put ruby '2.2.2' in your gemfile
[12:07:23] spiman: norc: it points to the system bundler , might that be the culprit?
[12:07:28] norc: spiman: Yes.
[12:08:19] spiman: suchness: is it ok if i leave it blank? a guy at my project had troubles installing 2.2 and runs with 2.1
[12:08:40] norc: spiman: Either your .bash_profile/.bashrc needs fixing for rbenv, or you don't have the bundler gem installed in rbenv
[12:08:47] suchness: If you can resolve it by getting the rbenv bundler working then probably
[12:08:54] ibouvousaime_: has joined #RubyOnRails
[12:09:38] diego2: has joined #RubyOnRails
[12:09:44] suchness: spiman: put this in your .bash_profile: if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
[12:09:53] spiman: norc: just did an rbenv rehash that fixed this, but i am absolutely positive that i ran it multiple times before
[12:09:55] norc: spiman: Maybe you just need to manually rbenv rehash
[12:10:16] norc: Too slow. :-)
[12:11:08] spiman: thanks, that's not the first this chat room saves my ass
[12:13:13] saimancroy: has joined #RubyOnRails
[12:13:21] diego3: has joined #RubyOnRails
[12:14:04] diego3: has joined #RubyOnRails
[12:16:16] Fery: norc: https://www.sendspace.com/file/6rdel7
[12:18:56] B1n4r10: has joined #RubyOnRails
[12:19:29] carlosd: has joined #RubyOnRails
[12:19:39] flip_digits: has joined #RubyOnRails
[12:21:34] surrealanalysis: has joined #RubyOnRails
[12:26:08] LambdaSource: has joined #RubyOnRails
[12:26:51] emilkarl: has joined #RubyOnRails
[12:26:52] flip_digits: has joined #RubyOnRails
[12:27:34] yardenbar: has joined #RubyOnRails
[12:28:44] SteenJobs: has joined #RubyOnRails
[12:29:39] sevenseacat: has joined #RubyOnRails
[12:30:44] jas02: has joined #RubyOnRails
[12:32:04] yoongkang: has joined #RubyOnRails
[12:36:06] njero: has joined #RubyOnRails
[12:38:51] Coldblackice: has joined #RubyOnRails
[12:40:37] mentero: has joined #RubyOnRails
[12:42:24] srinidhi: has joined #RubyOnRails
[12:45:52] daivyk: has joined #RubyOnRails
[12:45:58] banister: has joined #RubyOnRails
[12:49:57] eXist: has joined #RubyOnRails
[12:49:58] badhatter: has joined #RubyOnRails
[12:50:25] nya: has joined #RubyOnRails
[12:53:36] roxtrongo: has joined #RubyOnRails
[12:55:10] jkamenik: has joined #RubyOnRails
[12:56:15] solars: after_create hooks don't fire on .new; .save - right?
[12:57:14] LambdaSource: has joined #RubyOnRails
[12:57:41] njero: has joined #RubyOnRails
[12:59:59] SteenJobs: has joined #RubyOnRails
[13:00:12] ewnd9: has joined #RubyOnRails
[13:01:20] danneu: solars: yeah. tho of course after_create only fires after insertion (once) and after_save fires on every .save
[13:01:22] emrox: has joined #RubyOnRails
[13:01:33] Megamos: has joined #RubyOnRails
[13:03:04] jamto11: has joined #RubyOnRails
[13:04:45] flip_digits: has joined #RubyOnRails
[13:05:57] solars: need to check for new_record then in after_save so I can create records with .new
[13:06:07] tuelz: has joined #RubyOnRails
[13:06:34] ruid: has joined #RubyOnRails
[13:07:18] baweaver: has joined #RubyOnRails
[13:08:14] roxtrongo: has joined #RubyOnRails
[13:08:31] Sigfrid: has joined #RubyOnRails
[13:08:45] atomical: has joined #RubyOnRails
[13:08:46] solars: does anyone know what the difference between find_each and find_in_batches is?
[13:09:05] Antoine59: has joined #RubyOnRails
[13:10:44] secretsignal: has left #RubyOnRails: ()
[13:10:48] shibabu: has joined #RubyOnRails
[13:11:05] workmaster2n: has joined #RubyOnRails
[13:14:28] emilkarl: has joined #RubyOnRails
[13:15:47] Antoine59: has joined #RubyOnRails
[13:16:12] danneu: solars: apparently find_each is just find_in_batches with batch_size of 1000
[13:18:15] ddv: solars: https://github.com/rails/rails/blob/2a7cf24cb7aab28f483a6772b608e2868a9030ba/activerecord/lib/active_record/relation/batches.rb#L48
[13:18:59] pawnbox: has joined #RubyOnRails
[13:20:13] Antoine59: has joined #RubyOnRails
[13:20:40] hoodow_: has joined #RubyOnRails
[13:21:18] solars: ah, thanks
[13:21:37] rgtk: has joined #RubyOnRails
[13:21:40] solars: I wondered because it behaved weird somehow, and in the docs it looked like it only works on Model, not on Model.where.
[13:21:52] solars: so I thought it might just iterate over all the records, not over the subset
[13:21:57] solars: but in this case it's the same
[13:22:07] danneu: man, weechat (terminal irc client) inside tmux cannot click on links that span more than one line
[13:22:09] pawnbox: has joined #RubyOnRails
[13:22:34] solars: are you using mouse mode in tmux?
[13:22:48] artto: has joined #RubyOnRails
[13:22:52] danneu: i am if it's default
[13:22:54] danneu: i'll check it out
[13:23:03] solars: might help
[13:23:18] solars: not sure if it's a terminal or tmux issue, I think it's not related to weechat
[13:25:49] Antoine59: has joined #RubyOnRails
[13:27:55] hoodow: has joined #RubyOnRails
[13:27:59] pawnbox: has joined #RubyOnRails
[13:28:23] diego2: has joined #RubyOnRails
[13:28:49] diego2: has joined #RubyOnRails
[13:31:29] SalexW: has joined #RubyOnRails
[13:34:35] flip_digits: has joined #RubyOnRails
[13:42:45] jschoolcraft: has joined #RubyOnRails
[13:43:10] hardtail: has joined #RubyOnRails
[13:44:26] danneu: oh https://weechat.org/files/doc/weechat_faq.en.html#urls
[13:44:31] edward_: has joined #RubyOnRails
[13:45:50] emrox: has joined #RubyOnRails
[13:46:58] umgrosscol: has joined #RubyOnRails
[13:47:46] solars: so which callback to use if I want to catch both .create as well as .new+.save ? (once)
[13:50:56] tuelz: has joined #RubyOnRails
[13:52:56] waseem_: solars: What do you mean by once?
[13:53:15] adac: has joined #RubyOnRails
[13:54:41] waseem_: solars: Here are all the callbacks: http://api.rubyonrails.org/classes/ActiveRecord/Callbacks.html choose which suits your use case.
[13:55:07] kenpoint: has joined #RubyOnRails
[13:56:38] solars: waseem_, sometimes new records are created with .new+.save in my app, and sometimes with .create
[13:56:43] solars: so I need a way to catch both
[13:57:06] elaptics: solars: after_create
[13:57:09] waseem_: solars: The create callback will catch both.
[13:57:51] solars: hm really? I thought it didn't
[13:57:52] solars: have to check
[13:58:09] elaptics: what do you want to do in the callback?
[13:58:16] waseem_: !try is for this same use case.
[13:58:16] helpa: Why don't you try it and find out for yourself?
[13:59:42] solars: I of course have tried it, that's what led me to think it doesn't work
[13:59:45] drewdfw: has joined #RubyOnRails
[13:59:50] solars: elaptics, I have to create additional objects
[14:00:33] elaptics: solars: always, every time? Just making sure that callbacks are what you really want
[14:00:41] emilkarl: Using SimpleForm, is it possible to use a hash as multiple fields in some way? <% f.input :config.title, as: :string 5>
[14:00:47] solars: every time a new object is created
[14:00:51] solars: not on every save
[14:00:58] dramagods: has joined #RubyOnRails
[14:01:21] mag42c: has joined #RubyOnRails
[14:01:22] elaptics: solars: so even in your tests, etc? Or in a console, etc?
[14:01:53] elaptics: emilkarl: not sure what you're asking - your code there makes no sense
[14:01:54] w0rd-driven: has joined #RubyOnRails
[14:02:04] djbkd: has joined #RubyOnRails
[14:02:08] emilkarl: I have a model with a field Config.
[14:02:12] emilkarl: which is a hash
[14:02:14] SteenJobs: has joined #RubyOnRails
[14:02:16] solars: elaptics, yes in tests too
[14:03:06] emilkarl: this is what I would like to achvieve??? but config is the field on user <input name=???user[config][title]??????
[14:03:21] emilkarl: title is just a hash key.
[14:03:51] jamto11: has joined #RubyOnRails
[14:06:58] emilkarl: solved it by using: f.simple_fields_for :config do |cf|
[14:07:35] Mia: has joined #RubyOnRails
[14:07:35] Mia: has joined #RubyOnRails
[14:07:35] B1n4r10: has joined #RubyOnRails
[14:08:14] baweaver: has joined #RubyOnRails
[14:12:32] shibabu: has joined #RubyOnRails
[14:12:42] s2013: has joined #RubyOnRails
[14:14:25] LambdaSource: has joined #RubyOnRails
[14:14:27] sankaber: has joined #RubyOnRails
[14:16:34] ramortegui: has joined #RubyOnRails
[14:17:02] tuelz: has joined #RubyOnRails
[14:17:18] htmldrum: has joined #RubyOnRails
[14:18:43] joshkovach: has joined #RubyOnRails
[14:19:04] sankaber: has joined #RubyOnRails
[14:20:11] umgrosscol: has joined #RubyOnRails
[14:20:37] mary5030: has joined #RubyOnRails
[14:22:30] pawnbox_: has joined #RubyOnRails
[14:23:26] roxtrongo: has joined #RubyOnRails
[14:27:24] B1n4r10: has joined #RubyOnRails
[14:30:39] spiman: has joined #RubyOnRails
[14:31:00] dionysus69: what does yield return by default in application_controller ?
[14:31:45] moeabdol: has joined #RubyOnRails
[14:31:55] jhass: dionysus69: add some more context please
[14:32:32] youngbaks: has joined #RubyOnRails
[14:33:12] dionysus69: i created app and in its application_controller theres <%= yield %>, I wonder what it does because stock rails welcome page still appears after I removed yield
[14:33:45] jhass: erb? in a controller?
[14:34:37] bruno-: has joined #RubyOnRails
[14:35:36] ruurd: has joined #RubyOnRails
[14:36:16] adac: has joined #RubyOnRails
[14:37:01] jhass: that's not called application controller
[14:37:16] jhass: the application controller lives in app/controllers/application_controller.rb
[14:37:41] dionysus69: sorry application.html.erb I meant :S
[14:37:55] elaptics: dionysus69: is that in the layout??
[14:38:04] elaptics: the yield I mean
[14:38:29] elaptics: dionysus69: if so, then it's where the view template is inserted
[14:38:54] jhass: the default page, as it explains, is shown because you have no route. It does not use your applications layout
[14:39:17] vasilakisfil_: has joined #RubyOnRails
[14:39:58] dionysus69: oh I see, ugh
[14:41:29] vasilakisfil_: has left #RubyOnRails: ()
[14:42:14] vasilakisFiL: has joined #RubyOnRails
[14:42:33] CodingWolf: has joined #RubyOnRails
[14:42:35] vasilakisFiL: > hey, in my puma configuration that has many workers, should I manually reconnect to Redis after forking ?
[14:43:23] dionysus69: so yield loads anything specified as a root route? I don't get how welcome#index file gets loaded through template application.html.erb
[14:44:08] workmaster2n: has joined #RubyOnRails
[14:45:00] jhass: dionysus69: the template gets rendered, that resulting string is then returned by yield as the layout is rendered
[14:47:30] doodlehaus: has joined #RubyOnRails
[14:48:31] darrencauthon: has joined #RubyOnRails
[14:48:48] spiman_: has joined #RubyOnRails
[14:49:25] yoongkang: has joined #RubyOnRails
[14:51:14] roxtrongo: has joined #RubyOnRails
[14:51:24] dionysus69: ok thx makes more sense
[14:51:37] RegulationD: has joined #RubyOnRails
[14:52:35] ElSif: has joined #RubyOnRails
[14:55:04] adavia_: has joined #RubyOnRails
[14:55:48] dramagods: has joined #RubyOnRails
[14:56:48] cam: has joined #RubyOnRails
[14:57:32] chouhoulis: has joined #RubyOnRails
[14:58:08] tbuehlmann: vasilakisfil, I think that's not necessary anymore
[14:58:21] TPBallbag: has joined #RubyOnRails
[14:58:47] ellisTAA: has joined #RubyOnRails
[14:58:51] vasilakisFiL: tbuehlmann puma says that you should, ruby-rb says that there is an auto_reconnect option
[15:00:59] AzaToth: has joined #RubyOnRails
[15:01:44] brendan-: has joined #RubyOnRails
[15:02:05] jkamenik1: has joined #RubyOnRails
[15:02:30] carlosd: has joined #RubyOnRails
[15:03:00] SteenJobs: has joined #RubyOnRails
[15:04:25] Phoop: has joined #RubyOnRails
[15:04:28] jamto11: has joined #RubyOnRails
[15:04:38] rafaelfranca: has joined #RubyOnRails
[15:05:50] Hates_: has joined #RubyOnRails
[15:06:36] tbuehlmann: vasilakisfil, that option is no more, iirc
[15:07:51] simplyianm: has joined #RubyOnRails
[15:07:57] tbuehlmann: https://github.com/redis/redis-rb/blob/ea894350961683e14adebf1adfe5f9d41bd44eba/lib/redis/client.rb#L75
[15:08:57] baweaver: has joined #RubyOnRails
[15:09:09] vasilakisFiL: ok so it reconnects automatically
[15:10:07] ibouvousaime: has joined #RubyOnRails
[15:10:39] jimbeaudoin: has joined #RubyOnRails
[15:10:51] bePolite_: has joined #RubyOnRails
[15:11:02] tbuehlmann: that's what I read from it, yeah
[15:11:24] bePolite_: has joined #RubyOnRails
[15:12:56] momomomomo: has joined #RubyOnRails
[15:13:06] bePolite_: has joined #RubyOnRails
[15:13:47] ruurd: has joined #RubyOnRails
[15:14:08] banister: has joined #RubyOnRails
[15:15:09] bePolite: has joined #RubyOnRails
[15:16:02] n1ck7: has joined #RubyOnRails
[15:18:58] ruurd_: has joined #RubyOnRails
[15:19:21] Ergo^: has joined #RubyOnRails
[15:21:32] n1ck7: has joined #RubyOnRails
[15:21:45] smathy: has joined #RubyOnRails
[15:22:37] rgtk: has joined #RubyOnRails
[15:25:00] ruurd: has joined #RubyOnRails
[15:26:00] crankharder: anyone know if paperclip can be made to process different styles on the fly? I don't need to store things on disk or in AWS since I'm pretty much using it as a glorified one-time image resizer
[15:26:26] mozzarella: has joined #RubyOnRails
[15:26:46] danieldocki: has joined #RubyOnRails
[15:29:35] bePolite: has joined #RubyOnRails
[15:29:36] bePolite: has joined #RubyOnRails
[15:31:52] big|bad|wolf: has joined #RubyOnRails
[15:33:33] arthurix: has joined #RubyOnRails
[15:34:46] jamto11: has joined #RubyOnRails
[15:37:51] zpe: has joined #RubyOnRails
[15:39:02] jamto11_: has joined #RubyOnRails
[15:39:34] bePolite_: has joined #RubyOnRails
[15:40:24] smathy: crankharder, you mean like this: https://github.com/thoughtbot/paperclip#dynamic-styles ?
[15:42:47] dsimon: has joined #RubyOnRails
[15:43:36] lowsider: has joined #RubyOnRails
[15:45:16] ruurd: has joined #RubyOnRails
[15:45:24] dsimon: is there a way, without writing raw sql, to filter find results on values in multiple associations to the same table?
[15:45:46] dsimon: e.g. a Ticket model which belongs_to a creator User and also belongs_to a resolver User
[15:45:57] axl_: has joined #RubyOnRails
[15:46:02] dsimon: suppose I'm looking for Tickets where created by user 3 and resolved by user 4
[15:46:04] lacrymology: validate_confirmation doesn't work if the field is present but the confirmation is null
[15:46:07] lacrymology: isn't that a bug?
[15:46:34] dsimon: I cannot do Ticket.joins(:creator, :resolver).where(:creator => {:id => 3}, :resolver => {:id => 4}), because where expects table names rather than relation names
[15:46:50] lacrymology: this is the code: if (confirmed = record.send("#{attribute}_confirmation")) && (value != confirmed)
[15:47:10] lacrymology: notice that if "#{attribute}_confirmation" is nil then this doesn't fail
[15:47:33] leslie: has joined #RubyOnRails
[15:47:33] leslie: has joined #RubyOnRails
[15:47:34] corioliss: has joined #RubyOnRails
[15:47:42] dsimon: is this a fundamental issue in how arel and assocations work together, or am i missing something?
[15:47:47] bePolite__: has joined #RubyOnRails
[15:48:11] smathy: lacrymology, right, are you sure your confirmation is nil? It's very unlikely to be present but nil. If it's present, from a form, then it'll be ""
[15:48:34] carlosd: has joined #RubyOnRails
[15:49:15] tuelz: so, weird question, but I'm in someone elses oldish code base and there is a model being seeded with data in the tests that isn't anywhere in the fixtures....where would you look next?
[15:49:49] lacrymology: smathy: it's a REST API, I'm sending a request where it's absent
[15:50:02] tuelz: I've grep'd the codebase looking for some stray create or something weird, but I haven't done anything but load up the test env and it's there
[15:50:06] lacrymology: i.e., it's not a form, and I'm not relying on the client for validation
[15:50:14] smathy: dsimon, they're `belongs_to`s, just where( :createor_id: 3, :resolved_by_id: 4 )
[15:50:28] lacrymology: (validation in this case meaning "all required fields are present"
[15:51:24] YankNYC: has joined #RubyOnRails
[15:53:09] lowsider: tuelz: kinda obvious one.. but did you check the seeds ?
[15:53:31] tuelz: lowsider: yeah I did, thanks though
[15:53:52] tubbo: tuelz: did you `git grep` the codebase for maybe the data that is being set?
[15:54:05] tuelz: and somehow in the process of running this failing test over and over and over without changing anything ANOTHER row appeared in the table
[15:54:07] djbkd: has joined #RubyOnRails
[15:54:07] tubbo: i find myself doing that sometimes to find where things are being persisted
[15:54:18] lowsider: tuelz: could also maybe be something environmental? check for config/application.yml or a .env file maybe?
[15:55:08] tuelz: tubbo: yeah, I've looked for everywhere the model is being called, but I don't see any methods that could be creating anything in the model other than inheritted activerecord methods which I've grepped for as well
[15:55:23] SalexW: has joined #RubyOnRails
[15:55:26] tuelz: lowsider: yeah, in the process of crawling those files now
[15:55:37] tuelz: lots of initializers in the project so it'll take a bit
[15:55:59] lowsider: tuelz: glhf :)
[15:56:19] RegulationD: has joined #RubyOnRails
[15:56:34] Regulati_: has joined #RubyOnRails
[15:57:40] smathy: lacrymology, I see. Can you gist your logs showing the params coming into your app, and gist your model with the confirmation validation.
[15:58:25] freezevee: has joined #RubyOnRails
[15:58:53] teclator: has joined #RubyOnRails
[15:59:36] dramagods: has joined #RubyOnRails
[16:00:05] lowsider: here's a weird one. I have a partial i'm rendering with some local vars. I do something like <%= foo %> and render it to the dom. The first time i load the partial, its blank. After that it works fine. Here's the weird part: If i render it as a javascript var instead, it shows up.
[16:00:27] lowsider: or rather, it gets set.
[16:00:33] erich__: has joined #RubyOnRails
[16:00:43] lowsider: I haven't done any sort of manual caching yet.
[16:00:48] lowsider: and it only happens in production.
[16:01:06] lowsider: does that jump out to anyone as something they've seen before?
[16:01:15] doodlehaus: has joined #RubyOnRails
[16:02:08] surrealanalysis: has joined #RubyOnRails
[16:02:10] Rubie: has joined #RubyOnRails
[16:02:14] lowsider: oh geeze...
[16:02:18] lowsider: config.action_controller.perform_caching = true
[16:02:25] lowsider: i bet that might have something to do with it huh?
[16:02:34] smathy: lowsider, explain the "first time I load the partial" vs "after that" - specifically, what does that mean, like "when I click a link to the page it isn't loaded, but then if I refresh it is" or just literally "the first time that page is hit after the app is started it isn't loaded, but every other time for all other browser users from then on it works untilt he app is restarted"...
[16:03:43] CodingWolf: has joined #RubyOnRails
[16:03:49] crankharder: smathy: that just modifies the styles built based on the current model
[16:03:51] crankharder: still writes them all to disk
[16:05:16] smathy: crankharder, I don't understand your objection. You can use a lambda for your styles, so you can make your styles whatever you want.
[16:05:33] smathy: crankharder, explain how that's not what you meant by "process different styles on the gly"
[16:06:19] SalexW: has joined #RubyOnRails
[16:06:37] ruurd: has joined #RubyOnRails
[16:06:49] arup_r: has joined #RubyOnRails
[16:07:04] SteenJobs: has joined #RubyOnRails
[16:07:27] lowsider: smathy: The first time the partial is loaded, it is passed a date variable. then I should have said, upon loading that partial AGAIN with the same date variable. it will render properly for all further requests.
[16:08:02] lowsider: smathy: (Its a page where you give it a date, and i display some records that match that date)
[16:08:14] smathy: lowsider, so the second thing I suggested you mean? "The first time" means "The first time after I start my Rails app" ?
[16:08:45] lowsider: smathy: i believe so
[16:09:08] a1fa: time to make dynamic drop downs - this is going to be painful
[16:09:11] lowsider: smathy: I'll double check though.
[16:09:25] smathy: lowsider, ok.
[16:09:47] baweaver: has joined #RubyOnRails
[16:11:04] arthurix_: has joined #RubyOnRails
[16:11:29] lowsider: smathy: correct. Its just the first time that date variable is loaded on ANY browser. Any other browser that makes the request afterwards, will get the proper results
[16:11:46] vasilakisFiL: having heroku logs open on my test API app, when I send a get request to an endpoint >1 times I see that the app returns 304 ( at least that's what heroku logs) but on my client that sends the request (a chrome plugin) I get 200.. I don't have any caching anywhere.. why I see 304 on logs ?
[16:11:58] smathy: lowsider, and if you restart the app then you see it once again?
[16:12:07] IFrank00: has joined #RubyOnRails
[16:12:47] lowsider: smathy: checking. :) appreciate the help btw
[16:13:00] shibabu: has joined #RubyOnRails
[16:13:01] sankaber: has joined #RubyOnRails
[16:13:30] njero: has joined #RubyOnRails
[16:14:07] momomomomo: has joined #RubyOnRails
[16:14:34] banister: has joined #RubyOnRails
[16:15:00] tuelz: I still have no idea how the rows are being created, but does the lack of a fixture to a model in minitest mean it won't wipe that table clean?
[16:15:02] crankharder: smathy: because it still stores the processed styles on disk
[16:15:09] crankharder: I want them generated when they are requested
[16:15:31] IFrank00: quick question on my view visitors/index I like to call a view from pages/about.html.erb <%= render :partial => "pages/about" %> to make this work I have to change about.html.erb to _about.thml.erb. Is there a way to call that pages/about with out adding the _about.
[16:15:56] smathy: vasilakisfil, if your information is accurate (mainly if you are correctly correlating the server response and browser information to the same request) then your browser is broken. A 304 from a server should be reported in the browser as a 304.
[16:15:59] flip_dig1ts: has joined #RubyOnRails
[16:16:00] n1ck7: has joined #RubyOnRails
[16:16:05] tuelz: huh, apparently that's what is happening...TIL super random unpredictable stuff happens with fixtures/minitest if you don't have a fixture for a each model
[16:16:22] lowsider: smathy: ok. using the same date value i used previously worked. It looks like its only when i search new unique dates. I have enough to debug now.
[16:16:26] tuelz: zero idea at all wtf, but those are the symptoms
[16:16:35] lowsider: smathy: thanks for the help
[16:16:44] smathy: crankharder, ohhhhhhhh. So no, that's not how Paperclip works.
[16:17:15] ruurd: has joined #RubyOnRails
[16:17:54] smathy: crankharder, you might want to look into something in your httpd, nginx for example has a great image_filter module which allows you to specify dimensions and other things in the URL and it does the conversion at request time: http://nginx.org/en/docs/http/ngx_http_image_filter_module.html
[16:18:11] smathy: lowsider, you're welcome.
[16:18:12] drewdfw: has joined #RubyOnRails
[16:18:35] dramagods: has joined #RubyOnRails
[16:18:45] Cervajz: has joined #RubyOnRails
[16:19:37] i: has joined #RubyOnRails
[16:19:59] njero: has joined #RubyOnRails
[16:20:19] baweaver: has joined #RubyOnRails
[16:20:34] MaDErroR123: has joined #RubyOnRails
[16:21:14] johnflux_: has joined #RubyOnRails
[16:21:14] johnflux_: has joined #RubyOnRails
[16:22:02] simplyianm: has joined #RubyOnRails
[16:22:59] uri: has joined #RubyOnRails
[16:25:15] smathy: IFrank00, not that I know of.
[16:25:48] smathy: IFrank00, FWIW, I've been known to use a symlink to make a "foo" view available as "_foo"
[16:27:15] sarink: has joined #RubyOnRails
[16:27:59] alex88: has joined #RubyOnRails
[16:28:41] njero: has joined #RubyOnRails
[16:29:09] big|bad|wolf: has joined #RubyOnRails
[16:29:40] IFrank00: smathy, yeah it just to make it look better in my files no biggie
[16:30:01] IFrank00: Now im exploring rails
[16:30:25] smathy: ACTION wishes all views were (handled like) partials, having to pass in local vars explicitly.
[16:30:57] tubbo: smathy: would it be almost as good if you were referencing private methods within your view?
[16:32:11] njero: has joined #RubyOnRails
[16:32:47] hnanon: has joined #RubyOnRails
[16:32:51] arthurix: has joined #RubyOnRails
[16:33:11] hnanon: I need some help modeling some data.
[16:33:31] smathy: tubbo, like from some sort of view controller? If only something like that existed ;)
[16:33:46] a1fa: when modifying coffee scripts, do i need to rake something afterwards?
[16:33:46] Macaveli: has joined #RubyOnRails
[16:33:50] hnanon: I have Employees, Stores, and Deposits.
[16:33:50] tubbo: smathy: no i mean like from the initial controller's context.
[16:34:04] dsimon: smathy, okay, how about an analogous situation with has_many associations?
[16:34:13] smathy: a1fa, not in dev, unless you did a precompile and so old versions are in your public/assets already.
[16:34:17] hnanon: Employees make Deposits that belong to Stores.
[16:34:32] tubbo: a1fa: nope
[16:34:47] allcentury: has joined #RubyOnRails
[16:34:47] a1fa: i'm running prod
[16:35:11] a1fa: i am not picking up my changes on passenger restart, so i am wondering if those assets need to be regenerated
[16:35:50] smathy: dsimon, not sure, I'd have to see the code and tinker.
[16:36:02] matthewd: dsimon: where wants the table alias, not necessarily the table *name*... it leaves you dependent on exactly how we construct that alias, but it will work
[16:36:02] hnanon: I need to ultimately show a list of deposits at /2015/11/19, for example.
[16:36:11] tubbo: a1fa: yeah, they definitely have to be recompiled if you're on prod.
[16:36:18] smathy: a1fa, !assets - yes.
[16:36:18] helpa: a1fa: http://guides.rubyonrails.org/asset_pipeline.html - The Asset Pipeline Guide by Ryan Bigg, Richard Hulse & Mohammad Typaldos
[16:36:19] matthewd: dsimon: .. and at this point, we're effectively locked into the alias construction, because of that
[16:36:21] hnanon: For all employees/deposits.
[16:36:47] disgrntld: has joined #RubyOnRails
[16:37:01] matthewd: dsimon: e.g., I'm pretty sure a recentish refactoring went out of its way to ensure it iterated the associations in the same order, to keep the aliases consistent
[16:37:05] tubbo: hnanon: wait who belongs to a store? the employee or the deposit?
[16:37:09] bratsche: has joined #RubyOnRails
[16:37:19] hnanon: tubbo: Deposit.
[16:37:22] tubbo: is this "accounts payable", essentially?
[16:37:36] tubbo: hnanon: so how does this work in the real world?
[16:37:42] tubbo: what are you modeling?
[16:37:52] a1fa: smathy: that was it.. thank youi
[16:38:03] hnanon: Employee's need to deposit yesterday's money.
[16:38:16] hnanon: They will have to record that deposit for that store in the app.
[16:38:36] hnanon: They will actually go to the bank to make the deposit.
[16:39:19] raunicolae: has joined #RubyOnRails
[16:39:26] tubbo: hnanon: i see. so yeah, the Employee part of this whole thing is more of an ownership role. an Employee belongs to a Deposit, because that Employee made that Deposit.
[16:39:34] tubbo: the Deposit also belongs to a Store.
[16:39:46] tubbo: because it was made in store's name.
[16:39:50] Cache_Money: has joined #RubyOnRails
[16:40:27] hnanon: So what about the routing issue?
[16:40:38] a1fa: passenger is such a pain in the butt
[16:40:52] hnanon: What's the best way to show a list of deposits?
[16:40:54] defsdoor: a1fa, how so ?
[16:40:58] momomomomo: I'm not a fan of passenger, but I've rarely heard that a1fa
[16:41:11] hnanon: Ideally, I want to be able to select a data and show all deposits for that day.
[16:41:15] a1fa: defsdoor: i am doing it wrong(TM)
[16:41:17] Yomero3: has joined #RubyOnRails
[16:41:46] zoidfarb: has joined #RubyOnRails
[16:42:31] zoidfarb: Hi, in rails 4, if I want to refer to a background image in CSS, do I have to write that as SCSS instead of standard CSS? So it will get processed/templated out?
[16:43:24] matthewd: zoidfarb: Yes; either that, or .css.erb
[16:44:19] dionysus69: has joined #RubyOnRails
[16:44:38] zoidfarb: oh, interesting. I can just do css.erb in my /assets/stylesheets folder?
[16:44:40] smathy: a1fa, you're welcome.
[16:45:05] zoidfarb: maybe scss is is cleaner looking?
[16:46:06] zoidfarb: matthewd: Are there docs for what helpers I can use in scss?
[16:46:22] SalexW: has joined #RubyOnRails
[16:47:06] livecano: has joined #RubyOnRails
[16:47:08] hnanon: Will I need something like the friendly id gem?
[16:47:46] matthewd: zoidfarb: http://guides.rubyonrails.org/asset_pipeline.html#css-and-sass
[16:48:02] matthewd: Those are the only ones we add, beyond what sass provides natively
[16:48:04] Spami: has joined #RubyOnRails
[16:48:59] cgfbee: has joined #RubyOnRails
[16:49:56] n1ck7: has joined #RubyOnRails
[16:52:05] Rubie: has joined #RubyOnRails
[16:52:58] yoongkang: has joined #RubyOnRails
[16:53:01] frozenfoxx: has joined #RubyOnRails
[16:53:06] frozenfoxx: Need some advice on using a websocket to connect a Ruby app to a Rails app, anyone here familiar with that stuff or could point me in the right direction?
[16:53:13] frozenfoxx: I've got a command-line Ruby app that sends some output, expects some input in real-time. I need to have a Rails app send the input to this program over a websocket, then change values and/or force a refresh in the rails app via the output of this program over teh websocket.
[16:53:18] frozenfoxx: Anyone have an example I could look off of for this sort of thing?
[16:53:28] cam: has left #RubyOnRails: ()
[16:54:43] dsimon: matthewd, yeah, i noticed that the alias names seemed to depend on the order in which i passed things to includes() or joins() :-\
[16:55:53] dsimon: frozenfoxx, force a refresh in the rails app?
[16:56:03] matthewd: dsimon: Yup. I'd like to support association names in where(), but doing so properly (i.e., not just translating them to the base table name, but to the "right" alias) is tricky
[16:56:19] dsimon: cause of compatibility stuff?
[16:56:19] jahbrewski: has joined #RubyOnRails
[16:56:32] dsimon: as in, having to be compatible with prior where calls?
[16:57:04] frozenfoxx: dsimon: I've been asked to limit my question, I'm sorry.
[16:57:06] frozenfoxx: has left #RubyOnRails: ()
[16:57:26] dsimon: np, i was just confused by what you meant
[16:57:48] dsimon: "refresh" is normally more associated with web clients, but in your scenario there's a server and a headless client
[16:58:05] smathy: ACTION wonders what "asked to limit my question" meant.
[16:59:17] a1fa: huh, this is frustrating :(
[16:59:19] jerin: has joined #RubyOnRails
[16:59:19] [Butch]: has joined #RubyOnRails
[16:59:38] a1fa: i have an ajax call calling a controller#update_applications, which responds with js
[17:00:29] a1fa: https://gist.github.com/anonymous/e021255d1e8af7c8bc20
[17:00:41] a1fa: the ajax call works fine, it invokes the controller
[17:00:54] flip_digits: has joined #RubyOnRails
[17:01:01] a1fa: but i get a 500 error: ActionView::Template::Error (Missing partial applications/_application with {:locale=>[:en], :formats=>[:js, :html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :jbuilder]}. Searched in:
[17:01:24] a1fa: and then it complains about the gist i posted
[17:01:54] a1fa: maybe i need to rename my file to .coffee?
[17:02:06] nickenchuggets: has joined #RubyOnRails
[17:02:28] roxtrongo: has joined #RubyOnRails
[17:02:34] crankharder: smathy: ty! :)
[17:02:38] njero: has joined #RubyOnRails
[17:04:26] towski_: has joined #RubyOnRails
[17:04:27] zoidfarb: has left #RubyOnRails: ()
[17:06:30] tuelz: has joined #RubyOnRails
[17:07:50] a1fa: the error is starting to make sense now
[17:08:03] a1fa: 2: .append("<%= escape_javascript(render(:partial => @applications)) %>")
[17:08:25] a1fa: ActionView::Template::Error (Missing partial applications/_application
[17:10:00] n1ck7: has joined #RubyOnRails
[17:11:08] a1fa: i foo:barred it
[17:11:52] smathy: crankharder, you're welcome.
[17:12:26] a1fa: wonder if i add ,layout: "schedule" will that work
[17:12:40] a1fa: and then have a file called _applications under schedule
[17:13:57] momomomomo_: has joined #RubyOnRails
[17:14:20] ankhers: has joined #RubyOnRails
[17:14:25] EminenceHC: has joined #RubyOnRails
[17:14:53] Axsuul: has joined #RubyOnRails
[17:17:40] andrewvos: has joined #RubyOnRails
[17:18:13] matthewd: dsimon: From memory, it's problematic to work out what the aliases are/will be, at the right layer
[17:18:59] andrewvos: I have an one to many, Parent => Child... I want to have Parent.latest_child where latest Child is whatever was added most recently. Is there any way to do this with a latest:boolean column on the Child? Are there any gems that do this sort of "default single association"?
[17:18:59] s2013: has joined #RubyOnRails
[17:19:17] dsimon: i was about to suggest adding some alternate form of where, e.g. where_associations(...), but if the issue is that it's tricky to even find the aliases, that wouldn't help :-\
[17:19:24] matthewd: There are edge cases, where you could have an association named foos that currently doesn't resolve to the foos table alias... but we could catch those, treat give them the old interpretation, along with a deprecation warning
[17:19:45] dsimon: andrewvos, add a latest scope on Child, then you can do some_parent.children.latest
[17:20:06] andrewvos: Is that easy to query though?
[17:20:22] dsimon: oh, as in, find the parent with latest child X?
[17:20:34] andrewvos: Can I do stuff like `Parennt.where(child: {state: "something"})
[17:20:48] Rubie: has joined #RubyOnRails
[17:20:59] andrewvos: I previously did has_one with order: created_at: "desc" but that's kind of hacky
[17:21:07] andrewvos: And doesn't work well when you want to query
[17:21:32] dsimon: yeah, you can do Parent.includes(:children).references(:children).where(:children => {:latest => true})
[17:21:37] andrewvos: This person explains it better http://stackoverflow.com/a/15824477/128167
[17:21:40] dsimon: assuming that "children" is both the name of the association and the table
[17:22:00] andrewvos: dsimon: Ok but if I want to find the latest child with some attribute
[17:22:17] dsimon: regardless of Parent? then that's even easier, that's a straight query on Child, right?
[17:22:24] andrewvos: Not regardless of parent
[17:22:41] andrewvos: I want a list of Parents that have a Child with an attribute of x
[17:22:49] andrewvos: A unique list
[17:22:52] dsimon: ah, ok, yeah
[17:22:59] dsimon: the Parent query i gave you above will do that
[17:23:12] smathy: joins instead of includes
[17:23:17] dsimon: yes, good point
[17:23:25] dsimon: includes is only if you need the Child information as well as the Parent
[17:23:25] smathy: ...whereupon references is moot
[17:23:32] rgtk: has joined #RubyOnRails
[17:23:33] dsimon: ACTION nods
[17:23:40] SteenJobs: has joined #RubyOnRails
[17:24:00] andrewvos: ok, so latest in that case is a scope?
[17:24:04] matthewd: includes would work.. but might give you a surprising .children later
[17:24:11] dsimon: actually in that case you don't even need the scope
[17:24:16] dsimon: latest is just an attribute
[17:24:32] andrewvos: And now I have to babysit that attribute :)
[17:24:39] matthewd: and references is still unneeded, I think... we work that out for ourselves with hash syntax
[17:24:44] andrewvos: Ok well that's what I'm refactoring to... Thanks
[17:26:32] baweaver: has joined #RubyOnRails
[17:26:37] ubersapiens: has joined #RubyOnRails
[17:26:53] trekr5_: has joined #RubyOnRails
[17:27:03] ubersapiens: whats up everyone
[17:27:10] ruurd: has joined #RubyOnRails
[17:28:20] fedexo: has joined #RubyOnRails
[17:28:30] shopify: has joined #RubyOnRails
[17:29:01] lapidary: has joined #RubyOnRails
[17:29:21] matthewd: dsimon: https://github.com/rails/rails/pull/13555
[17:29:50] SalexW: has joined #RubyOnRails
[17:30:31] jkamenik: has joined #RubyOnRails
[17:30:41] owenjones: has joined #RubyOnRails
[17:31:22] SteenJobs: has joined #RubyOnRails
[17:31:58] a1fa: dynamic dropdowns working ;)
[17:32:18] ubersapiens: anyone out there used spree or solidus?
[17:32:32] meoblast001: has joined #RubyOnRails
[17:32:40] matthewd: ubersapiens: !used
[17:32:40] helpa: ubersapiens: Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
[17:34:41] benlieb: has joined #RubyOnRails
[17:36:55] simplyianm: has joined #RubyOnRails
[17:37:16] wilsonc91: has joined #RubyOnRails
[17:38:54] B1n4r10: has joined #RubyOnRails
[17:39:07] anagha: has joined #RubyOnRails
[17:39:34] safety_cut: has joined #RubyOnRails
[17:40:44] atmosx: has joined #RubyOnRails
[17:41:37] l4v2: has joined #RubyOnRails
[17:42:16] dsimon: matthewd, i heart pretty much everything you say on that thread :-)
[17:42:23] thezanke: has joined #RubyOnRails
[17:42:49] thezanke: I am making a helper that will look up a word in a hash by a numerical index
[17:42:58] shopify: has left #RubyOnRails: ()
[17:43:07] thezanke: where do I put that hash such that it exists already and is not recreated within the helper method
[17:43:25] thezanke: I cant seem to put it in the helper module (neither as a constant or a @@variable)
[17:44:24] dramagods: has joined #RubyOnRails
[17:44:39] dsimon: does the hash have data that's generated in advance and is never changed again?
[17:44:46] dsimon: or, is it something you need to be able to update on the fly?
[17:45:08] thezanke: it's just text, it wont change
[17:45:20] thezanke: this is it so far http://pastie.org/10567924
[17:45:35] dsimon: ah, i see
[17:45:58] dsimon: i tend to put stuff like that in lib/ under its own module
[17:46:01] thezanke: I feel like its going to be way easier than it seems
[17:46:20] thezanke: the hash or the whole thing?
[17:46:25] dsimon: e.g. lib/human_category.rb containing a module HumanCategory
[17:46:59] dsimon: which has a method like describe(n) or something, basically the same as the method in your example
[17:47:35] lxsameer: has joined #RubyOnRails
[17:47:45] thezanke: I'd still hit the same wall though right? Since it'd still be a module? Where would the hash go?
[17:48:00] dsimon: a constant in the module
[17:48:04] banister: has joined #RubyOnRails
[17:48:16] thezanke: why doesnt that work for a helper module T_T
[17:48:54] ascarter: has joined #RubyOnRails
[17:49:04] dsimon: oh, hm, let me back up a sec
[17:49:08] dsimon: what do you mean by it not working?
[17:49:22] dsimon: or rather, how do you know when it's being recreated or not?
[17:49:52] thezanke: syntaxerror on the has creation
[17:49:56] jwaldrip: has joined #RubyOnRails
[17:50:20] dsimon: oh, i think that's just because you're trying to use integers as hash keys
[17:50:31] dsimon: which i don't think works in that particular form of hash creation
[17:50:46] ibouvousaime: has joined #RubyOnRails
[17:50:56] dsimon: try {1 => "foo"} instead of {1: "foo"}
[17:51:14] dsimon: also, you don't need to convert the incoming number to a symbol in your method
[17:52:00] dsimon: if a number is indeed what you're getting, it won't have "to_sym" anyways :-)
[17:52:26] thezanke: errmahgerd it worked!
[17:54:15] trosborn: has joined #RubyOnRails
[17:54:53] chouhoulis: has joined #RubyOnRails
[17:55:40] dramagods: has joined #RubyOnRails
[17:56:23] draken: has joined #RubyOnRails
[17:58:04] draken: Can someone help me out. I got a form_tag trying to direct to a custom action inside my controller. Ive placed it in application.html.erb in the nav bar(its a search bar), but no matter what i do it simply does not go to /action, and never gets routed to the controller action. All it does is refresh the current page(index) with the parameters of the search.
[17:59:42] dramagods: has joined #RubyOnRails
[18:00:24] baweaver: has joined #RubyOnRails
[18:01:17] RegulationD: has joined #RubyOnRails
[18:02:13] baweaver: has joined #RubyOnRails
[18:02:59] carlosd: has joined #RubyOnRails
[18:04:58] hardtail: has joined #RubyOnRails
[18:05:40] FernandoBasso: has joined #RubyOnRails
[18:05:42] gingray: has joined #RubyOnRails
[18:06:11] RegulationD: has joined #RubyOnRails
[18:06:28] smathy: draken, !gist your erb and the HTML that it generates
[18:06:28] helpa: draken: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[18:06:48] FernandoBasso: I have to make some changes in a rails app. My only experience with rails so far is the getting started tutorial. I cloned this app, which runs on heroku, and I see it doesn't have a database.yml configured to test the app locally. Any hints about this?
[18:06:52] smathy: draken, oh, and the controller you're expecting it to route to.
[18:07:05] smathy: draken, may as well put your `rake routes` in there too.
[18:07:24] smathy: FernandoBasso, create one.
[18:07:33] FernandoBasso: Ah, it is on gitignore. :p
[18:07:41] FernandoBasso: Fair enough! Thanks.
[18:08:00] Rubie: has joined #RubyOnRails
[18:08:55] gingray: Hi everybody can anyone tell me or maybe give a link to article (except github of course :) ) how active record track association attributes changes?
[18:08:55] srinidhi: has joined #RubyOnRails
[18:11:07] rakm: has joined #RubyOnRails
[18:11:14] gingray: for example if i use this simple code http://pastebin.com/idRzXDLb
[18:12:10] moloch: has left #RubyOnRails: ()
[18:12:11] SteenJobs: has joined #RubyOnRails
[18:12:12] draken: Can someone help me out. I got a form_tag trying to direct to a custom action inside my controller. Ive placed it in application.html.erb in the nav bar(its a search bar), but no matter what i do it simply does not go to /action, and never gets routed to the controller action. All it does is refresh the current page(index) with the parameters of the search. - http://gist.github.com/Dra
[18:12:12] draken: kenZA/283a8fda825331b926714
[18:12:14] gingray: here the same link on pastie http://pastie.org/10567993
[18:12:32] draken: arg mistyped it
[18:12:43] zly: has joined #RubyOnRails
[18:12:46] ruurd: has joined #RubyOnRails
[18:14:03] draken: Can someone help me out. I got a form_tag trying to direct to a custom action inside my controller. Ive placed it in application.html.erb in the nav bar(its a search bar), but no matter what i do it simply does not go to /action, and never gets routed to the controller action. All it does is refresh the current page(index) with the parameters of the search. - https://gist.github.com/Dr
[18:14:04] draken: akenZA/283a8fda82531b926714
[18:14:43] shibabu: has joined #RubyOnRails
[18:16:25] gingray: I'll be really appreciated with ActiveRecord associations
[18:17:36] rhizome: gingray: what about it?
[18:17:50] trosborn: has joined #RubyOnRails
[18:18:52] gingray: rhizome: how active record track association changes in what cases it would work and how it works
[18:19:11] gingray: rhizome: here simple example http://pastie.org/10567993
[18:19:52] gingray: rhizome: its simple case and i think everything should works but maybe in more complex it would not
[18:19:54] Guest50: has joined #RubyOnRails
[18:20:50] gingray: rhizome: i've google about it but haven't find an article about (maybe i should spend more time with this)
[18:21:45] gingray: rhizome: hundred message per second (sry bout this)
[18:22:09] jwaldrip: has joined #RubyOnRails
[18:24:12] rhizome: huh? what do you mean by "track association changes?"
[18:25:00] MachbooSS: has joined #RubyOnRails
[18:25:45] momomomomo: has joined #RubyOnRails
[18:26:08] matthewd: gingray: Do you have an example that's not doing what you expect?
[18:26:39] gingray: matthewd: yes here example http://pastie.org/10567993
[18:26:39] draken: anyone got an idea on my route problems ?
[18:27:01] matthewd: gingray: So, what is it doing, and what do you expect?
[18:27:38] lemur: has joined #RubyOnRails
[18:27:54] gingray: matthewd: i expect when i call save! all posts will be updated
[18:28:08] sbarg: has joined #RubyOnRails
[18:28:09] pwnd_nsfw: draken, can you relink it. The link was on two lines, and I am lazy
[18:28:13] ruurd: has joined #RubyOnRails
[18:28:26] kadoppe: has joined #RubyOnRails
[18:28:39] matthewd: gingray: Sounds like you want the `:autosave` option
[18:28:48] rhizome: or update_all method
[18:29:13] pwnd_nsfw: doesn't save! on the parent association save it's children too, though?
[18:29:25] pwnd_nsfw: or, regular ol' save for that matter.
[18:29:33] Phoop: has joined #RubyOnRails
[18:29:46] B1n4r10: has joined #RubyOnRails
[18:30:19] rhizome: or just use a helper to add the exclamation points, or add a "suffix" attribute to user, since it applies to all of their things.
[18:30:25] lacrymology: is there a way to create strong params aggregatedly somehow?
[18:30:36] jottr: has joined #RubyOnRails
[18:30:49] lacrymology: like, the user_create params are user_update params + username
[18:31:05] lacrymology: I thought I might be able to chain permits, but no
[18:31:26] rhizome: addicted to DRY, huh
[18:31:46] rafaelfranca: has joined #RubyOnRails
[18:32:08] sdwrage: has joined #RubyOnRails
[18:34:14] orolo: has joined #RubyOnRails
[18:34:51] dsimon: lacrymology, you could always create protected methods that return those arrays
[18:34:53] matthewd: lacrymology: `def user_params(*bonus); params.require(:user).permit(:foo, :bar, *bonus); end` ?
[18:34:54] dsimon: and have one call the other
[18:35:47] tildes: has joined #RubyOnRails
[18:36:17] qejk: has joined #RubyOnRails
[18:37:31] srinidhi1: has joined #RubyOnRails
[18:38:26] MachbooSS: I have recently started a learning rails..I am following a tutorial right now and got really stuck in something i believe is very simple
[18:38:45] Hates_: has joined #RubyOnRails
[18:38:54] ur5us: has joined #RubyOnRails
[18:39:10] Hates_: draken: make gist with your form tag so we can see what you've done
[18:39:22] draken: i added gist
[18:39:28] draken: at end of my question
[18:39:36] surrealanalysis: has joined #RubyOnRails
[18:39:46] Hates_: draken: ahh sorry, seems my irc client has gone screwy. I've lost loads of messages :S
[18:40:36] MachbooSS: tutorial says to run the following command rake db:schema:dump but nothing happens when i do
[18:41:59] jhass: MachbooSS: it creates/updates a file in db/, it doesn't produce any output iirc
[18:42:02] pwnd_nsfw: Are you sure nothign happens?
[18:42:11] pwnd_nsfw: what jhass said
[18:42:13] jhass: you don't really need it in daily usage, not sure why your tutorial lets you run it, seems fishy
[18:42:23] draken: Can someone help me out. I got a form_tag trying to direct to a custom action inside my controller. Ive placed it in application.html.erb in the nav bar(its a search bar), but no matter what i do it simply does not go to /action, and never gets routed to the controller action. All it does is refresh the current page(index) with the parameters of the search. - https://gist.github.com/Dr
[18:42:23] draken: akenZA/283a8fda82531b926714
[18:43:05] pwnd_nsfw: draken, specify a controller in the form myb
[18:43:28] pwnd_nsfw: draken, http://stackoverflow.com/questions/5320414/form-for-but-to-post-to-a-different-action
[18:43:34] MachbooSS: the only file i see in db directory is seeds.rb
[18:44:20] pwnd_nsfw: so what's the issue?
[18:44:24] MachbooSS: tutorual dude saying the created database will be compatible with hosts for later
[18:44:39] jhass: MachbooSS: go over that step, it's not important, rails does that all the time automagically
[18:45:05] jhass: like whenever you run db:migrate for example
[18:45:16] MachbooSS: thanks jhass i appreciate it ...
[18:45:19] pwnd_nsfw: I read that wrong. turkey got me tired, whoops
[18:45:39] matthewd: draken: Nested <form>
[18:46:55] jetpackjoe: has joined #RubyOnRails
[18:47:59] draken: matthewd ive fixed that and it didnt help
[18:48:26] draken: pwnd_nsfw ive looked at that, its generating the correct path, getting to the router and the router is just sending it to the wrong place
[18:48:51] draken: if i go change my new.html.erb to use my custom action, it works
[18:48:51] jetpackjoe: has joined #RubyOnRails
[18:49:11] jhass: draken: show the "fixed" version
[18:49:33] draken: he was refering to some extra <form>s
[18:49:40] draken: they are on the working form_for also
[18:49:44] draken: so it isnt the problem
[18:49:49] matthewd: draken: Ah, so when you said "the parameters of the search", did you actually mean "the parameters of the search and an action parameter"?
[18:49:52] jhass: so you didn't fix it
[18:49:54] tubbo: MachbooSS: if you run `rake -T db:schema:dump` you can find more info about the task.
[18:50:17] draken: jhass i did
[18:50:23] draken: ive done tons of stuff to try get this to work
[18:50:28] draken: and always revert it back
[18:50:41] draken: so it doesnt screw something up else later and i have no idea where it broke
[18:50:43] MachbooSS: will do thanks tubbo
[18:51:42] Hates_: draken: you need to surround the first two attributes in braces { }
[18:51:55] jwaldrip: has joined #RubyOnRails
[18:51:59] matthewd: draken: Request logs please
[18:51:59] Hates_: draken: oops, I mean just the first
[18:52:10] pwnd_nsfw: form_tag searchmap_woolentries_path, method: :get, remote: true
[18:52:16] draken: Hates_ ? i dont think the attributes are the problem
[18:52:20] matthewd: draken: Also, you'll have a much better time in general using path helpers instead of old-style hashes
[18:52:21] draken: pwnd_nsfw tried that :<
[18:52:23] Hates_: draken: form_tag({action: "searchmap"}, method: "get", remote: true)
[18:52:42] draken: but its a 'post' isnt it ? its sending something
[18:52:55] pwnd_nsfw: you're the one who put get lol
[18:53:35] draken: ya my code is constantly changing cause im trying to fix this for the couple of hours
[18:53:38] pwnd_nsfw: if it can fit in a url and isn't going to ruin the security of something, use get
[18:53:44] Hates_: draken: they are, form_tag expects two hashs
[18:54:00] Hates_: draken: you're passing it one, which is why they all end up mashed into your url
[18:54:00] gingray: matthewd: sry talk by phone i think active record track changes in associations by default and i just want to know how it works
[18:54:02] Axsuul: has joined #RubyOnRails
[18:54:12] pwnd_nsfw: http://api.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html#method-i-form_tag
[18:54:35] gingray: rhizome: thanks for help also
[18:54:42] safety_cut: has joined #RubyOnRails
[18:55:19] gingray: rhizome: seems need to go in source code to figure out how changes tracks if association object changes
[18:55:26] rhizome: i asked you like a half hour ago what "track changes in associations" means
[18:55:55] EminenceHC: has joined #RubyOnRails
[18:55:56] yashinbasement: has joined #RubyOnRails
[18:56:22] gingray: rhizome: do u saw my paste on pastie.org ?
[18:56:35] yoongkang: has joined #RubyOnRails
[18:56:41] rhizome: the one with like three lines and no context? yeah.
[18:56:50] lacrymology: dsimon, matthewd: yeah, that's what I ended up doing
[18:57:11] Rubie: has joined #RubyOnRails
[18:57:14] draken: matthewd - Started GET "/?utf8=%E2%9C%93&authenticity_token=QqRO7XPEzR%2BqMdXVA5IJJQqpQzzVj6fIyxx3xHzFVpTNTeD8vPhVkKKy9vcuhfkS8LrNyYEN1Xmoeo2vsLvlgg%3D%3D&searchinput=asd&commit=Send" for 127.0.0.1 at 2015-11-19 20:52:52 +0200
[18:57:15] draken: Processing by WoolentriesController#index as HTML
[18:57:24] draken: as u can see, its just wrong
[18:57:37] draken: should be woolentries/searchmap
[18:58:04] momomomomo: has joined #RubyOnRails
[18:58:04] draken: but the html says its trying for woolentries/searchmap, and if i remove the route for it, it errors out saying no route, even though it doesnt even use it or i donno
[18:58:07] matthewd: draken: That looks to be exactly what I'd expect from the surrounding bare form tag
[18:58:07] gingray: rhizome: sorry about this let me explain than when i have for example user object and i change attributes in post through user object and than call save on user object method save will be called on each post connected with this user or not
[18:58:23] jhass: draken: if you want help you need to do two things: don't be dismissive about suggestions, if you tried them, fine, say so, but don't just dismiss them with indirect "I know better"'s. Second, show your current state don't change it. Show the variations you tried too so we can spare the "try this" "already did" chatter. Show the actual code for everything so we can be assure you tried things correctly
[18:58:30] pwnd_nsfw: probably redundant, but what does the controller look like?
[18:58:40] f3ttX]: has joined #RubyOnRails
[18:59:08] jhass: draken: alternatively just take a break from it, you seem too stressed out about it
[18:59:08] draken: lol matthewd, ill remove the extra form tag then, but ive done this before
[18:59:18] rhizome: gingray: use update_all
[18:59:28] pwnd_nsfw: and if you could put .erb extension on erb files, that'd help my eyes a bit
[18:59:29] rhizome: or autosave, as suggested before
[19:00:08] gingray: rhizome: if i wouldn't set autosave or update_all no changes will be affected yes ?
[19:00:23] rhizome: i don't know
[19:00:32] gingray: rhizome: me too (((
[19:00:45] rhizome: do you want to learn that or do you want it to work?
[19:00:54] gingray: rhizome: i want to learn
[19:01:01] draken: matthewd, hmmm you might have worked it out, sorry all for the huff and puff,been confused by this for some time now
[19:01:23] rhizome: gingray: oh, well read up on autosave and update_all then, and maybe the save methods you want to use
[19:02:02] ruurd: has joined #RubyOnRails
[19:02:30] rhizome: and associations in general
[19:03:41] treehug88: has joined #RubyOnRails
[19:04:27] draken: so what would be the correct way to give form_for a class for the css
[19:04:50] ibouvousaime_: has joined #RubyOnRails
[19:06:14] livecano: has joined #RubyOnRails
[19:06:17] banister: has joined #RubyOnRails
[19:06:18] rhizome: it almost certainly already has a class
[19:07:27] akshat: has joined #RubyOnRails
[19:10:41] gingray: rhizome: seems i found answer on my question
[19:10:44] gingray: rhizome: http://api.rubyonrails.org/classes/ActiveRecord/AutosaveAssociation.html
[19:10:54] hardtail: has joined #RubyOnRails
[19:11:46] rhizome: 10:30 < matthewd> gingray: Sounds like you want the `:autosave` option
[19:12:36] apotry: has joined #RubyOnRails
[19:12:43] gingray: rhizome: yes matthewd pointed to this but full explanation how it works i got via this link
[19:12:59] gingray: rhizome: anyway thanks to you and to matthewd
[19:14:11] safety_cut: has joined #RubyOnRails
[19:15:16] smathy: has joined #RubyOnRails
[19:15:35] ellisTAA: has joined #RubyOnRails
[19:15:58] manfrin: has joined #RubyOnRails
[19:16:18] ruurd: has joined #RubyOnRails
[19:17:58] Rubie: has joined #RubyOnRails
[19:18:15] ellisTAA: i wanted to set up a test database to use in my specs ??? i ended up using factory girl with the assumption this is the way to do that ??? but now that i???m creating factories i???m a bit confused. if i create a user factory and that user has interviews ??? how do fill in the user_id field for the interview? https://gist.github.com/ellismarte/5ba945d24fc4d0cec2d9
[19:18:50] lacrymology: has joined #RubyOnRails
[19:19:08] pwnd_nsfw: FactoryGirl.create(:blah, user: user_object)
[19:19:18] tubbo: EllisTAA: if you have a factory for interviews, you can specify the user or you can just let factory_girl generate one
[19:19:42] pwnd_nsfw: user_object can be something created by factory girl
[19:20:11] ellisTAA: pwnd_nsfw: cool thanks ..
[19:20:22] doodlehaus: has joined #RubyOnRails
[19:20:45] pwnd_nsfw: I try to avoid having FactoryGirl create the associations itself because I feel it creates some mystery about what's going on
[19:22:56] moeabdol: has joined #RubyOnRails
[19:23:42] ellisTAA: pwnd_nsfw: so you wouldn???t write FactoryGirl.create(:blah, user: user_object)
[19:24:18] rgtk: has joined #RubyOnRails
[19:24:24] shinnya: has joined #RubyOnRails
[19:24:38] momomomomo: has joined #RubyOnRails
[19:25:20] pwnd_nsfw: EllisTAA, I wouldn't let the factory do it
[19:25:34] pwnd_nsfw: So, I'd do it exactly like that
[19:25:46] tubbo: agreed pwnd_nsfw, and it can be a lot harder to debug if you have heavily nested associations.
[19:25:47] zoidfarb: has joined #RubyOnRails
[19:26:27] zoidfarb: In views/layouts, can somebody explain the different between partials and yield + content_for blocks? It seems like they accomplish very similar functions?
[19:27:59] FelipeBHZ: has joined #RubyOnRails
[19:28:15] rhizome: zoidfarb: they can. content_for is going to all go in the same file as everything else, tho
[19:29:03] moeabdol: has joined #RubyOnRails
[19:29:25] FelipeBHZ: Hi guys! Could you please go to www.yeptecnologia.com.br and check if it is OK or if someone gets a 501 error? Please! This is driving me crazy!
[19:29:56] pwnd_nsfw: FelipeBHZ, seems to load, but the index page is as far as I went.
[19:30:30] zoidfarb: rhizome: I see, so the advantage of a partial is moving that stuff out to another file? That makes sense
[19:30:32] gingray: FelipeBHZ: seems fine
[19:30:50] FelipeBHZ: gingray: could you please click on "Servi??os" to see of it goes to services.html ?
[19:31:12] ellisTAA: when creating a factory for a user, how do i create the password_digest for my user since it is an ecnrypted pw?
[19:31:36] pwnd_nsfw: EllisTAA, just put password field.
[19:31:48] michaeldeol: has joined #RubyOnRails
[19:32:04] pwnd_nsfw: when you save/create, that's when password_digest is set
[19:32:09] ellisTAA: pwnd_nsfw: so its ok that my migration says password and the factory says password?
[19:32:10] gingray: FelipeBHZ: got error https://monosnap.com/file/0wKGUsBtMG1vB15s5Cz5QswfLK3aJ9
[19:32:32] pwnd_nsfw: you shouldn't have a password field in your database, if that's what you're saying.
[19:32:59] FelipeBHZ: has joined #RubyOnRails
[19:33:21] ellisTAA: pwnd_nsfw: ok .. but i do have a password digest field in my migration
[19:33:30] FelipeBHZ: gingray: Thank you! This is the exactly error I am getting here and I don't know how to fix it 'cause anyone else could reproduce it
[19:33:38] pwnd_nsfw: ye, that's fine. Just give it a try, it works.
[19:33:52] danieldocki: has joined #RubyOnRails
[19:34:15] ruurd: has joined #RubyOnRails
[19:34:18] FelipeBHZ: gingray pwnd_nsfw do u have any idea why server is showing this error? It was fine since yesterday
[19:34:30] pwnd_nsfw: Well, I don't have any code, so no, no idea
[19:34:30] colleenmcguckin: has joined #RubyOnRails
[19:34:55] gingray: FelipeBHZ: agree with pwnd_nsfw
[19:35:08] danieldock: has joined #RubyOnRails
[19:35:37] FelipeBHZ: It's only html and JS basically. Could u check the source, please? It's just a simple website
[19:36:03] pwnd_nsfw: lol... it doesn't work that way.
[19:36:55] pwnd_nsfw: FelipeBHZ, silly question probably, but this is a rails site?
[19:37:08] FelipeBHZ: pwnd_nsfw: no, its not hehe :D
[19:37:14] pwnd_nsfw: Sooooooooooooo
[19:37:21] pwnd_nsfw: You've basically given us nothing to work off of
[19:37:28] FelipeBHZ: I came here because I'm trying to find some help with advanced users...
[19:37:42] futilegames: has joined #RubyOnRails
[19:37:44] FelipeBHZ: Maybe somene has experience with this kind of error
[19:37:52] pwnd_nsfw: Yeah, well, I'm telling you
[19:37:54] pwnd_nsfw: we need more information
[19:38:06] FelipeBHZ: what else do you need? I can provide the info
[19:38:06] pwnd_nsfw: we can't just magically like "ye bruh i gotchu"
[19:38:11] B1n4r10: has joined #RubyOnRails
[19:38:24] pwnd_nsfw: Well, since this isn't a rails site, what is serving the files?
[19:38:29] pwnd_nsfw: does services.html even exist?
[19:38:35] FelipeBHZ: yes, it does
[19:38:42] FelipeBHZ: I can see it on FTP and everything
[19:39:00] FelipeBHZ: it's an html with nothing more than bootstrap and stuff like it
[19:39:13] pwnd_nsfw: is there an index.html?
[19:39:19] jwaldrip: has joined #RubyOnRails
[19:39:24] flip_dig1ts: has joined #RubyOnRails
[19:39:25] FelipeBHZ: everything was pretty nice set up
[19:39:27] pwnd_nsfw: It doesn't recognize index.html in the browser though...
[19:39:38] pwnd_nsfw: Do you use something like mod_rewrite or the like?
[19:40:12] pwnd_nsfw: https://www.yeptecnologia.com.br/index.html doesn't work, but
[19:40:16] pwnd_nsfw: https://yeptecnologia.com.br/index.html
[19:40:35] arup_r: has joined #RubyOnRails
[19:40:40] pwnd_nsfw: https://yeptecnologia.com.br/services.html returns a blank screen
[19:40:45] FelipeBHZ: I use a mod_rewrite on my htaccess to redirect everyone to https
[19:41:03] FelipeBHZ: Can i paste 3 lines here?
[19:41:10] FelipeBHZ: or should use pastebin anyway?
[19:41:18] pwnd_nsfw: Use gist.github
[19:41:29] craysiii: has joined #RubyOnRails
[19:41:38] safety_cut: has joined #RubyOnRails
[19:41:39] doodlehaus: has joined #RubyOnRails
[19:41:46] FelipeBHZ: https://gist.github.com/anonymous/445e5edcdab95c99cc07
[19:41:56] FelipeBHZ: This is my .htaccess
[19:41:57] helpa: https://gist.github.com/996779
[19:42:03] FelipeBHZ: to redir everyone to https
[19:42:24] pwnd_nsfw: If you don't force https, does it still work?
[19:42:55] FelipeBHZ: pwnd_nsfw: nope. Tried to remove .htaccess and still got same error
[19:43:15] allcentury: has joined #RubyOnRails
[19:43:47] EminenceHC: has joined #RubyOnRails
[19:44:16] sunya7a: has joined #RubyOnRails
[19:44:37] draken: Has anyone ever used Gmap4Rails ? When i remove a Marker from a handler, it vanishes from the map on screen, but it stays in the array, so like a search would pick it up till the page is refreshed and the local array pulls the refresh data from the db
[19:44:57] B1n4r10: has joined #RubyOnRails
[19:45:53] ellisTAA: i???m getting two errors for my factories. 1st is not declaring the user_id ??? but if i say all interviews belong to user 1 that isn???t very dynamic ???. what???s a good way to solve this error? https://gist.github.com/ellismarte/5ba945d24fc4d0cec2d9#file-errors-txt-L3-L4
[19:45:53] pwnd_nsfw: FelipeBHZ, can you remove the htaccess for a second
[19:46:07] FelipeBHZ: yes. 1 sec. brb
[19:46:35] FelipeBHZ: pwnd_nsfw: Done
[19:47:10] pwnd_nsfw: It's definitely something serverwise
[19:47:23] pwnd_nsfw: But it's weird
[19:48:01] pwnd_nsfw: FelipeBHZ, shared hosting?
[19:48:33] FelipeBHZ: pwnd_nsfw: Yes. Shared. Already opened a ticket there, they told me it is ok on their side, but I am pretty sure it's not.
[19:48:52] atmosx: has joined #RubyOnRails
[19:48:53] VeryBewitching: has joined #RubyOnRails
[19:49:01] pwnd_nsfw: Did you setup the SSL yourself?
[19:49:02] benhuda: has joined #RubyOnRails
[19:49:14] chipotle: has joined #RubyOnRails
[19:49:34] pwnd_nsfw: yo VeryBewitching
[19:49:55] VeryBewitching: How's the day treatin' ya pwnd_nsfw?
[19:49:59] uri: has joined #RubyOnRails
[19:50:21] pwnd_nsfw: Not bad! It's ugly and rainy out, but just more time to sit inside and study. How about yourself?
[19:50:44] FelipeBHZ: pwnd_nsfw: Yes. I did. And it was working pretty well since last week
[19:50:44] colleenmcguckin: has joined #RubyOnRails
[19:50:49] bmalum: has joined #RubyOnRails
[19:50:54] FelipeBHZ: pwnd_nsfw: I noticed this error today, 5 hours ago
[19:50:56] VeryBewitching: Just starting a 780Gb copy from drive to drive.
[19:51:11] VeryBewitching: Always a good thing :D
[19:51:11] pwnd_nsfw: Watching paint dry :P
[19:51:59] VeryBewitching: gsmartcontrol saves data, true story
[19:52:14] Or1on: has joined #RubyOnRails
[19:52:58] lacrymology: I've got a kind of weird routing requirement that I'm not sure how to declare
[19:53:52] Gustavo: has joined #RubyOnRails
[19:53:52] ruurd: has joined #RubyOnRails
[19:53:54] VeryBewitching: lacrymology: hit me
[19:54:25] lacrymology: nested under foos, GET /foos/:foo_id/history << this needs to return a list, an index view, I think. GET /foos/:foo_id/history/atype << this should be responded by atypes_controller#index. Then the same with another type
[19:54:47] maxz: has joined #RubyOnRails
[19:54:54] lacrymology: so /history will return a combined list of atypes and anothertypes, there's no actual History model
[19:55:01] jahbrewski: has joined #RubyOnRails
[19:56:02] pwnd_nsfw: WHAT THE FUCK
[19:56:05] pwnd_nsfw: Yo fuck walking dead right now
[19:56:23] VeryBewitching: So /foos/:id/history/eastern_europe or something like that?
[19:56:37] VeryBewitching: Or is it literally 'atype'
[19:56:45] xblade: has joined #RubyOnRails
[19:56:51] lacrymology: VeryBewitching: it's /history/telemetry and /history/alerts
[19:56:56] ellisTAA: why is testing so hard
[19:57:20] pwnd_nsfw: EllisTAA, it's not, you just have to get a feel for it
[19:57:25] colleenmcguckin: has joined #RubyOnRails
[19:58:21] juddey: has joined #RubyOnRails
[19:58:57] VeryBewitching: lacrymology: get '/foos/:id/history/telemetry', to: 'foos/telemetries#index'
[19:59:12] VeryBewitching: Assuming the controller is namespaced.
[20:00:34] VeryBewitching: lacrymology: Also consider constraints http://guides.rubyonrails.org/routing.html#segment-constraints
[20:00:37] bePolite: has joined #RubyOnRails
[20:01:27] baweaver: has joined #RubyOnRails
[20:01:34] VeryBewitching: EllisTAA: Once I get testing setup on a project it's pretty much cake from there. What's the obstacle?
[20:02:20] FelipeBHZ: pwnd_nsfw: Do u have any clue on what this could be?
[20:02:45] ellisTAA: VeryBewitching: trying to learn factory girl but documentation sucks for noobs. for example i thought i configured everything but when i run this spec i???m getting a ???undefined method ???Factory?????? error .. https://gist.github.com/ellismarte/5ba945d24fc4d0cec2d9#file-conversations_controller_spec-rb-L13
[20:02:59] pwnd_nsfw: Server config messed up FelipeBHZ, but if you didn't change anything, I couldn't pinpoint it
[20:03:02] baweaver: has joined #RubyOnRails
[20:03:03] lacrymology: VeryBewitching: isn't there a way to put that inside the resources :foos block?
[20:03:29] Hates_: EllisTAA: don't you mean Factory.create(:user)
[20:03:31] VeryBewitching: EllisTAA: FactoryGirl.create(:user)
[20:03:40] VeryBewitching: Or is it Factory?
[20:03:52] VeryBewitching: I include the syntax methods, I only ever use create()
[20:03:54] pwnd_nsfw: It's FactoryGirl in newer versions
[20:03:54] lacrymology: VeryBewitching: no, wait. That is possible, of course. What I was trying to do is to make a "history" block inside "foo", and then nest even further, but I guess that's unnecessary
[20:03:56] Hates_: I have the shorthand config so I just use create
[20:04:04] FelipeBHZ: pwnd_nsfw: Ok. Anyway, thank you for ur time. Now I have at least something to ask on my hostmanager. :D
[20:05:17] renews: has joined #RubyOnRails
[20:05:42] VeryBewitching: lacrymology: Dynamic routes with constraints has worked for me in the past, if you're looking at many levels of depth.
[20:06:08] Radar: GOOD MORNING
[20:06:17] dici: has joined #RubyOnRails
[20:06:51] benlieb: has joined #RubyOnRails
[20:07:11] ruurd: has joined #RubyOnRails
[20:07:45] nertzy2: has joined #RubyOnRails
[20:08:57] FelipeBHZ: pwnd_nsfw: do u think If I go to WHM and setup my account again, this can solve? Or do you think it is a problem on the server and not only in my account?
[20:09:14] pwnd_nsfw: FelipeBHZ, it's a possibility sure
[20:09:19] pwnd_nsfw: For both of those things
[20:09:22] pwnd_nsfw: Only one way to find out!
[20:09:53] manfrin_: has joined #RubyOnRails
[20:09:57] FelipeBHZ: I will try this ... grab a bucket of coffee and start it. :/
[20:09:59] yardenbar: has joined #RubyOnRails
[20:10:19] sbarg1: has joined #RubyOnRails
[20:10:24] carlosd: has joined #RubyOnRails
[20:10:35] lacrymology: VeryBewitching: I'm looking at the constraints
[20:10:41] VeryBewitching: EllisTAA: This article got me going with RSpec really quickly the first time http://www.webascender.com/Blog/ID/566/Testing-Rails-4-Apps-With-RSpec-3-Part-I#.Vk4smSCrRdI
[20:10:54] ellisTAA: VeryBewitching: woo thanks for sharing ill read it
[20:11:19] ibouvousaime_: has joined #RubyOnRails
[20:11:21] lacrymology: VeryBewitching: what would you use the constraints for?
[20:11:43] hardtail: has joined #RubyOnRails
[20:12:19] skiz: has joined #RubyOnRails
[20:12:38] VeryBewitching: lacrymology: I used it to match a URI with regex; get '/something/:id', constraints: {id: /<regex>/}
[20:13:19] VeryBewitching: But I had one controller in charge of it all.
[20:14:07] VeryBewitching: It turned params[:id] into a path, the regex allowed the string to repeat /string/string
[20:15:24] VeryBewitching: lacrymology: I could probably help you better if I understood what you're doing, though. Showing code helps.
[20:15:35] VeryBewitching: Or as helpa says
[20:15:37] simplyia_: has joined #RubyOnRails
[20:15:37] helpa: If you don't provide any code, it becomes really difficult for us to help you. Providing code to reproduce the problem increases your chances of getting great, accurate help immensely.
[20:18:30] jkamenik: has joined #RubyOnRails
[20:19:00] shibabu: has joined #RubyOnRails
[20:19:22] jamto11_: has joined #RubyOnRails
[20:21:55] rubyonrailed: has joined #RubyOnRails
[20:22:53] rubyonrailed: I'm setting up devise on a existing model. I have `devise_for :accounts` in my routes, but for some reason when I visit `/accounts/sign_in` It is processing through `accounts#show` Anyone know a way around this? https://gist.github.com/JasonMannon/bfcb467579f3205f25f1
[20:23:10] djbkd: has joined #RubyOnRails
[20:23:25] pawnbox: has joined #RubyOnRails
[20:23:30] skiz: has joined #RubyOnRails
[20:23:42] yfeldblum: has joined #RubyOnRails
[20:24:11] emilkarl: has joined #RubyOnRails
[20:24:12] Encapsulation: has joined #RubyOnRails
[20:26:37] unreal: has joined #RubyOnRails
[20:27:21] pwnd_nsfw: has joined #RubyOnRails
[20:28:37] FailBit: devise_for :users, path: 'accounts'
[20:28:43] FailBit: from the docs
[20:28:55] FailBit: devise_for :accounts, path: 'users' # presumably you want this
[20:29:14] lemur: has joined #RubyOnRails
[20:29:16] zoidfarb: has joined #RubyOnRails
[20:29:43] matthewd: rubyonrailed: You didn't show the route that's ending up at show
[20:30:09] FailBit: isn't that irrelevant?
[20:30:35] arup_r: Why the carrierwave upload class is not getting loaded inside the model ? https://gist.github.com/aruprakshit/fdd218b4e3cd8509248b
[20:30:58] r0x0rZ: has joined #RubyOnRails
[20:31:07] Puffball: has joined #RubyOnRails
[20:31:27] matthewd: I don't know whether devise can actually operate on the same URL-prefix as an ordinary RESTful controller... but it sounds like the immediately-reported problem is a priority issue between /accounts/sign_in and /accounts/:id
[20:32:16] draken: Hmm is there any reason a splice in JS would be returning the element im trying to splice out
[20:32:22] draken: rather than the array without that element ?
[20:32:45] VeryBewitching: rubyonrailed: Maybe read https://github.com/plataformatec/devise/wiki/How-To:-Change-an-already-existing-table-to-add-devise-required-columns
[20:33:08] tubbo: draken: because that's not what that function does at all. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice
[20:33:12] VeryBewitching: rubyonrailed: Also, you have to add some code to your model too.
[20:33:31] draken: tubbo how would i go about removing something at index x then ?
[20:33:32] tubbo: draken: it's kinda like Ruby's delete() method, it will return the thing it's deleting, not the new array.
[20:33:42] SteenJobs: has joined #RubyOnRails
[20:33:54] rubyonrailed: Failbit: I already have a user model that is using devise, will this allow them to share the controller?
[20:35:09] tubbo: draken: well technically it did get removed... https://gist.github.com/tubbo/c636cfe337f55f9b5ee5
[20:35:46] draken: tubbo ahh ya i see now, brain fart
[20:35:50] colleenmcguckin: has joined #RubyOnRails
[20:36:07] ruurd: has joined #RubyOnRails
[20:36:40] zoidfarb: Hi, I'm trying to follow the Nested Layouts instructions here http://guides.rubyonrails.org/layouts_and_rendering.html#using-nested-layouts and I get how you define a block at the top, and you can fill that block in sub-layouts, but is there a way to define default content for that block?
[20:38:06] theery: has joined #RubyOnRails
[20:38:07] w0rd-driven: has joined #RubyOnRails
[20:38:37] tildes: has joined #RubyOnRails
[20:39:47] matthewd: zoidfarb: I'm not sure how that would work with nested layouts, as distinct from content_for-in-general. Do you have an example?
[20:40:12] jamto11_: has joined #RubyOnRails
[20:41:05] FCser: has joined #RubyOnRails
[20:41:08] mag42c: has left #RubyOnRails: ()
[20:41:10] arup_r: nvm, fixed it
[20:41:18] surrealanalysis: has joined #RubyOnRails
[20:42:07] darrencauthon: has joined #RubyOnRails
[20:43:03] yoongkang: has joined #RubyOnRails
[20:44:08] zoidfarb: matthewd: I'm coming from the python world where I'm mostly used to Jinja2, you can define a "base" template with various "blocks" and then conditionally override those blocks in sub-templates: http://jinja.pocoo.org/docs/dev/templates/#template-inheritance
[20:44:35] zoidfarb: matthewd: I assume it's possible to get the same (or very similar) result in Rails, I'm just not exactly sure how to do it
[20:45:07] matthewd: zoidfarb: That sounds more like content_for / content_for? / yield, than nested layouts in particular
[20:45:10] zoidfarb: matthewd: Maybe I just populate the other side of the ternary operator? So instead of just ': yield'
[20:45:46] matthewd: zoidfarb: Yeah, that.
[20:46:41] VeryBewitching: zoidfarb: There's no one solution for that.
[20:46:43] ruurd: has joined #RubyOnRails
[20:47:13] nertzy2: has joined #RubyOnRails
[20:47:43] VeryBewitching: <%= content_for(:something) if content_for?(:something) %> to display it (if it exists)
[20:47:52] rakm: has joined #RubyOnRails
[20:48:51] VeryBewitching: Otherwise I would probably render a partial for the default.
[20:48:52] zoidfarb: VeryBewitching: And then if it doesn't exist (i.e. if the sub-layout hasn't defined anything to go in that block), I just do if content_for? : <DEFAULT THING>'
[20:49:02] zoidfarb: VeryBewitching: Ah, that makes sens
[20:49:14] zoidfarb: ? <render partial 'default_stuff'>
[20:49:15] EminenceHC: has joined #RubyOnRails
[20:49:27] VeryBewitching: The next line <%= render partial: 'thing' unless content_for?(:something) %>
[20:49:47] chipotle: has joined #RubyOnRails
[20:51:13] zoidfarb: Thanks, that sounds like a good approach
[20:51:17] raunicolae: has left #RubyOnRails: ("Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is")
[20:51:40] VeryBewitching: zoidfarb: To keep it more dry in the view, you could render the partial at all times and have it do an if for content_for?
[20:51:40] baweaver: has joined #RubyOnRails
[20:52:18] VeryBewitching: zoidfarb: Although, no, don't do that.
[20:52:44] VeryBewitching: The last thing I said, not the first thing :D
[20:52:49] xblade: has joined #RubyOnRails
[20:53:36] matthewd: <% if content_for?(:foo) %><%= content_for(:foo) %><% else %> whatever you like <% end %>
[20:53:54] matthewd: Dual if+unless pairs make me sad
[20:54:37] VeryBewitching: <%= content_for(:something) if content_for?(:something) %><%= render partial: 'default' unless content_for?(:something) %>
[20:54:52] VeryBewitching: Two lines, pretty succinct.
[20:55:30] quazimodo: has joined #RubyOnRails
[20:55:42] rgtk: has joined #RubyOnRails
[20:56:16] VeryBewitching: Does anyone know if the layout/view/partials are stitched together and render after every content_for block is evaluated?
[20:56:19] NBarnes: has joined #RubyOnRails
[20:56:47] rhizome: what do you mean?
[20:58:05] rhizome: if content_for?(:something)?
[20:58:19] VeryBewitching: If you declare a content_for block in your view, and the layout renders a partial that displays it, are we guaranteed that the block will have executed before the final render?
[20:58:57] dstarh: has joined #RubyOnRails
[20:59:01] rhizome: what does "final render" mean?
[20:59:32] kies: has joined #RubyOnRails
[20:59:41] Rubie: has joined #RubyOnRails
[20:59:43] VeryBewitching: I'm assuming there's an order to which it's all stitched together and used as a response body to the request.
[21:00:35] matthewd: VeryBewitching: It's code; it's evaluated in order
[21:01:23] VeryBewitching: matthewd: So if the partial is evaluated before the view is evaluated, then there would be no content for :something
[21:01:32] manfrin: has joined #RubyOnRails
[21:01:41] DoubleMalt: has joined #RubyOnRails
[21:03:14] VeryBewitching: I'm suggesting that if the partial does a content_for?(:something) and the view hasn't been evaluated, then the block in the view would never be rendered.
[21:03:31] matthewd: VeryBewitching: The partial is evaluated at the time you render it
[21:03:48] matthewd: So it depends whether the view did the content_for before or after the `render partial:`
[21:03:50] VeryBewitching: matthewd: So is the layout evaluated first?
[21:04:04] matthewd: Wait now there's a layout?
[21:04:15] VeryBewitching: Yes. Layout renders partial before yield
[21:04:29] matthewd: The layout is rendered after the view
[21:05:19] VeryBewitching: OK, that's what I was interested in knowing. :)
[21:05:31] VeryBewitching: Thanks matthewd, rhizome
[21:06:12] ruurd: has joined #RubyOnRails
[21:06:42] jsrn_: has joined #RubyOnRails
[21:07:28] bePolite: has joined #RubyOnRails
[21:11:16] mdel: has joined #RubyOnRails
[21:11:51] carlosd: has joined #RubyOnRails
[21:12:28] hardtail: has joined #RubyOnRails
[21:12:56] jamto11_: has joined #RubyOnRails
[21:13:15] FailBit: https://i.imgur.com/akaBP7O.png
[21:14:23] FailBit: why is https preferably to ssh?
[21:14:26] FailBit: *preferable
[21:14:58] VeryBewitching: https is probably faster than ssh
[21:15:09] adaedra: nothing to set up?
[21:15:41] VeryBewitching: It also doesn't require a key exchange.
[21:16:03] adaedra: but for working on your own repository, ssh > https
[21:16:04] Axsuul: has joined #RubyOnRails
[21:16:22] momomomomo: has joined #RubyOnRails
[21:16:32] owenjones: has joined #RubyOnRails
[21:16:41] FailBit: yes it does
[21:16:49] FailBit: both require key exchanges
[21:17:04] Hates_: FailBit: I believe it's so you can use your github credentials
[21:17:08] shibabu: has joined #RubyOnRails
[21:17:26] Hates_: FailBit: that's why they prefer it
[21:18:25] trosborn: has joined #RubyOnRails
[21:18:54] Pazician: has joined #RubyOnRails
[21:20:02] gambl0re: has joined #RubyOnRails
[21:20:08] VeryBewitching: FailBit: That depends on the ciphersuite.
[21:20:49] adaedra: HTTPS does not requires auth though, if you're doing only reading on public repositories.
[21:22:17] workmaster2n: has joined #RubyOnRails
[21:25:11] ruurd: has joined #RubyOnRails
[21:26:28] darrencauthon: has joined #RubyOnRails
[21:27:15] colleenmcguckin: has joined #RubyOnRails
[21:28:55] sbarg: has joined #RubyOnRails
[21:29:54] wilsonc91: has joined #RubyOnRails
[21:30:04] lemur: has joined #RubyOnRails
[21:33:06] tildes: has joined #RubyOnRails
[21:37:27] sinkensabe: has joined #RubyOnRails
[21:39:40] Frem: has joined #RubyOnRails
[21:41:05] ruurd: has joined #RubyOnRails
[21:41:39] w0bni: has joined #RubyOnRails
[21:42:00] benhuda: has joined #RubyOnRails
[21:42:54] hardtail: has joined #RubyOnRails
[21:44:04] Gustavo: has joined #RubyOnRails
[21:44:07] axl_: has joined #RubyOnRails
[21:44:09] Rubie: has joined #RubyOnRails
[21:44:17] quazimodo: has joined #RubyOnRails
[21:47:08] tvw: has joined #RubyOnRails
[21:48:18] hardtail: has joined #RubyOnRails
[21:49:57] roxtrongo: has joined #RubyOnRails
[21:51:59] ruurd: has joined #RubyOnRails
[21:54:46] smathy: It's preferable for github because less support calls.
[21:55:01] smathy: Oh wow, that was a while ago ;)
[21:55:29] adaedra: you came too late.
[21:56:45] njero: has joined #RubyOnRails
[21:57:30] trosborn: has joined #RubyOnRails
[21:57:33] akshat: has joined #RubyOnRails
[21:57:42] rhizome: i mean really
[21:59:50] Scripore: has joined #RubyOnRails
[22:01:13] smathy: ACTION wonders if that translates
[22:03:19] Pazician: has joined #RubyOnRails
[22:03:40] darrencauthon: has joined #RubyOnRails
[22:04:05] darrencauthon: has joined #RubyOnRails
[22:06:40] xcesariox: has joined #RubyOnRails
[22:07:28] rakm: has joined #RubyOnRails
[22:07:30] safety_cut: has joined #RubyOnRails
[22:08:08] blackhuey: has joined #RubyOnRails
[22:09:25] threeminutemonta: has joined #RubyOnRails
[22:10:38] ruurd: has joined #RubyOnRails
[22:11:55] theery: has joined #RubyOnRails
[22:12:15] NBarnes: has joined #RubyOnRails
[22:14:55] hahuang65: hey guys, how do I turn off activejob logging? can't find any docs for it. it's so noisy
[22:15:25] Rubie: has joined #RubyOnRails
[22:18:27] banister: has joined #RubyOnRails
[22:19:37] lxsameer: has joined #RubyOnRails
[22:20:12] Gustavo: has joined #RubyOnRails
[22:20:31] Cache_Money: has joined #RubyOnRails
[22:22:03] Radar: hahuang65: ActiveJob::Base.logger = nil
[22:22:07] arBmind: has joined #RubyOnRails
[22:25:09] djbkd: has joined #RubyOnRails
[22:25:23] thoraxe: has joined #RubyOnRails
[22:26:19] VeryBewitching: I think Sidekiq has it's own logger, in the case you're using that with ActiveJob.
[22:26:36] VeryBewitching: So turning off ActiveJob logging won't necessarily stop all logging of jobs.
[22:27:34] Gustavo: has joined #RubyOnRails
[22:28:11] Gustavo: has joined #RubyOnRails
[22:29:40] trosborn: has joined #RubyOnRails
[22:30:01] colleenmcguckin: has joined #RubyOnRails
[22:30:19] SalexW: has joined #RubyOnRails
[22:31:04] ruurd: has joined #RubyOnRails
[22:32:07] manfrin_: has joined #RubyOnRails
[22:35:07] yoongkang: has joined #RubyOnRails
[22:35:32] rakm: has joined #RubyOnRails
[22:35:38] zoidfarb: has left #RubyOnRails: ()
[22:35:47] quazimodo: has joined #RubyOnRails
[22:36:04] skiz: has joined #RubyOnRails
[22:36:51] annlewis: has joined #RubyOnRails
[22:36:51] jessemcgilallen: has joined #RubyOnRails
[22:38:36] yfeldblum: has joined #RubyOnRails
[22:40:35] wilsonc91: has joined #RubyOnRails
[22:41:29] baweaver: has joined #RubyOnRails
[22:42:11] jaequery: has joined #RubyOnRails
[22:42:35] freezevee: has joined #RubyOnRails
[22:42:52] Ropeney: has joined #RubyOnRails
[22:44:37] carlosd: has joined #RubyOnRails
[22:46:44] ewnd9: has joined #RubyOnRails
[22:47:12] hahuang65: VeryBewitching: thanks, yeah I already switched that off
[22:52:28] Axsuul: has joined #RubyOnRails
[22:53:00] mices: it says in the breadcrumb docs in my views i can just <%= render_breadcrumbs %> but how will it know which breadcrumbs to render, doesn't that depend what page the site visitor is on?
[22:55:14] bambanx: has joined #RubyOnRails
[22:55:17] fschuindt: has joined #RubyOnRails
[22:55:30] renews: has joined #RubyOnRails
[22:55:46] bambanx: anybody can give me a hand?
[22:55:50] mices: if i wanna use breadcrumbs to print category links at the top of my page i have to add_breadcrumb in my controller for every category in the categories table?
[22:56:05] ruurd: has joined #RubyOnRails
[22:56:19] fschuindt: When codeclimate reports: "Assignment Branch Condition size for filter is too high." it means that my method :filter is too long?
[22:56:26] bambanx: in this example how i can display the images? http://josephndungu.com/tutorials/ajax-file-upload-with-dropezonejs-and-paperclip-rails
[22:57:20] rhizome: bambanx: same as any other paperclip attachment
[22:57:37] matthewd: mices: Every parent category of the current page, in the action.. I would think. Considering this is some 3rd party gem, you're not giving a lot of information to go on.
[22:58:58] jahbrews1i: has joined #RubyOnRails
[22:59:11] baweaver: has joined #RubyOnRails
[22:59:16] pwnd_nsfw: has joined #RubyOnRails
[22:59:24] jessemcgilallen: has joined #RubyOnRails
[22:59:34] benlieb_: has joined #RubyOnRails
[22:59:35] mices: matthewd: well the docs here are very brief https://github.com/weppos/breadcrumbs_on_rails
[23:00:40] matthewd: If that's brief... :/
[23:00:54] VeryBewitching: mices: The docs there explain everything pretty well imo.
[23:01:16] tubbo: mices: you're brief
[23:01:55] mices: i don't see how it works, do i have to add_breadcrumb in my controller for every category in the categories table?
[23:02:23] matthewd: [09:27:37] <matthewd> mices: Every parent category of the current page, in the action.. I would think.
[23:02:38] mices: but how does it know?
[23:02:47] neanderslob: has joined #RubyOnRails
[23:02:52] VeryBewitching: This is where I get off this train.
[23:03:01] w0bni: has joined #RubyOnRails
[23:03:12] Radar: mices: you're still dealing with this category thing, yeah>
[23:03:35] Radar: mices: What is the URL of the page where these breadcrumbs appear?
[23:04:14] mices: that's a good question i haven't gone past categories#index yet
[23:04:32] SalexW: has joined #RubyOnRails
[23:04:40] dtordable: do RoR supports JRuby?
[23:04:41] lacrymology: has joined #RubyOnRails
[23:04:41] mices: i was trying to fix my phone but i broke the screen
[23:05:00] mices: so that's what i was doing for like the past 20 hours
[23:05:15] darrencauthon: has joined #RubyOnRails
[23:05:17] adaedra: dtordable: yes, but some gems don't.
[23:05:21] mices: just getting back to this now
[23:05:26] Radar: mices: ok, let's focus on this problem then
[23:05:39] Radar: mices: Find the URL where you want to display these breadcrumbs and then we'll work back from there
[23:05:53] mices: ok thanks
[23:05:58] ruby-lang373: has joined #RubyOnRails
[23:06:02] gambl0re: has joined #RubyOnRails
[23:06:12] SteenJobs: has joined #RubyOnRails
[23:06:20] dtordable: adaedra: is better tan normal Ruby? whats the difference?
[23:06:40] tuelz: has joined #RubyOnRails
[23:07:26] helpa: "Best" and "better" are subjective. Try to use a different term.
[23:08:01] LambdaSo_: has joined #RubyOnRails
[23:08:09] shamanime: has joined #RubyOnRails
[23:08:11] Radar: Startup time is a killer on JRuby
[23:08:22] dtordable: what's the difference then?
[23:08:27] Radar: It's like that old joke: "Knock knock." "Who's there?" <minutes pass> "Java"
[23:08:44] adaedra: I'm sure Google will provide way better answers than things we could throw at you here.
[23:08:51] FernandoBasso: has joined #RubyOnRails
[23:09:04] dtordable: killer means more fast?
[23:09:41] tubbo: Radar: lol nice
[23:10:09] ruurd: has joined #RubyOnRails
[23:10:22] matthewd: dtordable: IMO, JRuby is the unusual choice... if you're not sure, better to go with MRI ("normal Ruby")
[23:10:23] VeryBewitching: dtordable: http://www.restlessprogrammer.com/2013/02/multi-threading-in-jruby.html might provide enlightenment
[23:10:46] dtordable: ah, so java is slower?
[23:10:55] VeryBewitching: Only if the sky is blue.
[23:11:02] uxp: has joined #RubyOnRails
[23:11:08] Radar: dtordable: You also didn't follow Rule 1.
[23:11:10] Radar: dtordable: !rule1
[23:11:10] helpa: dtordable: Do your research before hand. Your question may be answerable with a quick Google search or by simply experimenting. If you're using a method in Rails, look it up in the API Docs or in the Official Guides.
[23:11:15] Radar: https://github.com/jruby/jruby/wiki/DifferencesBetweenMriAndJruby
[23:11:33] Radar: There's even a Wiki article that comes up in the first couple of results which has a title which is YOUR EXACT QUESTION.
[23:11:33] mentero: has joined #RubyOnRails
[23:13:03] Radar: Personally I stay with MRI Ruby because it's what I know AND it's because what everyone else who I work with knows.
[23:13:52] unreal: has joined #RubyOnRails
[23:14:11] adaedra: I worked a little why with JRuby and Rails. The JVM startup time is a pain.
[23:14:41] bambanx: rhizome, i dont how display a paper clip attachment, i make a new index action on uploads controller . @uploads = Upload.all
[23:15:06] dtordable: just made me a question
[23:15:14] rhizome: so does Upload have paperclip stuff in it?
[23:15:22] dtordable: nothing more
[23:15:29] bambanx: there is the tutorial is very short http://josephndungu.com/tutorials/ajax-file-upload-with-dropezonejs-and-paperclip-rails
[23:15:42] bambanx: but not sure how i can display all the images in a page
[23:15:44] rhizome: bambanx: have you looked at paperclip docs at all?
[23:15:53] bambanx: yes but my english is not so good
[23:16:01] bambanx: im translating :S
[23:16:11] Radar: bambanx: How have you tried to display these images?
[23:16:25] Axsuul: has joined #RubyOnRails
[23:16:40] bambanx: i created a index action on uploads controller
[23:16:53] bambanx: with this inside @uploads = Upload.all
[23:17:08] tubbo: it would be cool if i could hot-load code in jruby, like if it worked kinda like spring in the sense that it ran a daemon in the background that actually contained my app in memory, and i could just add/remove shit from it.
[23:17:19] tubbo: then jruby would be a no-brainer
[23:17:34] tubbo: i still wish rubinius was the default ruby, but MRI is waaay more reliable
[23:17:42] tubbo: s/default/"canonical"
[23:17:59] Fire-Dragon-DoL: tubbo: doesn't spring work with Jruby since the new version? I heared they added fork-exec
[23:18:02] StaticVoid: has joined #RubyOnRails
[23:18:12] bambanx: this is on docs of paper clip <%= image_tag @user.avatar.url %>
[23:18:27] bambanx: avatar comes with paperclip? or is just a example?
[23:18:57] fschuindt1: has joined #RubyOnRails
[23:18:57] rhizome: just an example. look at the code that precedes it
[23:19:04] manfrin: has joined #RubyOnRails
[23:19:17] gambl0re: has joined #RubyOnRails
[23:20:16] owenjones: has joined #RubyOnRails
[23:20:21] w0bni: has joined #RubyOnRails
[23:20:25] axl_: has left #RubyOnRails: ()
[23:20:51] Jagular: has joined #RubyOnRails
[23:21:41] tubbo: Fire-Dragon-DoL: even if it did, i feel like spring requires enough restarts that it would get annoying to work with.
[23:21:46] tubbo: though it's probably a huge help.
[23:21:57] dtordable: and another question
[23:22:39] Fire-Dragon-DoL: they did a really amazing job implementing fork under jvm, I was really thinking about using it
[23:22:40] ruurd: has joined #RubyOnRails
[23:22:44] Radar: bambanx: gist your upload model please
[23:22:55] Radar: @uploads = Upload.all this will only fetch the ActiveRecord objects
[23:23:03] dtordable: RoR and CoachDB shag toguether?
[23:23:21] bambanx: is here Radar http://josephndungu.com/tutorials/ajax-file-upload-with-dropezonejs-and-paperclip-rails
[23:23:51] bambanx: so in this case i need a property of that object and it is a url ?
[23:23:56] Radar: bambanx: Ok, so it's has_attached_file :image
[23:24:05] Radar: bambanx: Which means you can do upload.image.url to get the URL to display
[23:24:14] Radar: <%= image_tag upload.image.url %>
[23:24:20] bambanx: where come url ?
[23:24:24] bambanx: is a property?
[23:24:31] Radar: bambanx: it comes from the image accessor that paperclip adds
[23:25:13] bambanx: <% @uploads.each do |upload| %>
[23:25:13] bambanx: <%= image_tag @upload.image.url %>
[23:25:43] bambanx: undefined method `image' for nil:NilClass
[23:25:45] Radar: <%= image_tag upload.image.url %>
[23:25:59] Radar: The "upload" there is the block variable that comes from <% @uploads.each do |upload| %>
[23:26:05] Mia: has joined #RubyOnRails
[23:26:05] Mia: has joined #RubyOnRails
[23:26:13] dtordable: no answr hahaha
[23:26:21] Radar: dtordable: c'mon bro
[23:26:28] Radar: dtordable: You expect an answer that that 5 word question
[23:26:31] renews: has joined #RubyOnRails
[23:26:32] Radar: [10:23:17] <Radar> what
[23:26:38] Radar: ^ This was my answer
[23:26:40] bambanx: niceeeeeee
[23:26:49] bambanx: Thanks radar :D
[23:26:53] Radar: np bambanx :)
[23:27:22] bambanx: what book for start with ruby i can get guys? something short and fun ?
[23:27:28] bambanx: if exist lol
[23:27:37] Radar: bambanx: !twgr
[23:27:37] helpa: bambanx: Learn Ruby by reading this book - http://manning.com/black3 - The Well-Grounded Rubyist by David A. Black
[23:27:43] Radar: bambanx: !r4ia
[23:27:43] helpa: bambanx: 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
[23:27:51] Radar: Those are the two getting started books
[23:28:09] bambanx: ok i will check
[23:28:32] Radar: I wrote Rails 4 in Action
[23:28:48] bambanx: guys is there any tool for example if i need a web page for 10.000 users visit at day , for test how many resources i need?
[23:28:53] bambanx: not sure if is called stress test
[23:29:23] Fery: has joined #RubyOnRails
[23:29:31] bambanx: you are ryan Radar ?
[23:29:32] dtordable: Radar: im designing a website and i work study documents and I though coachdb does that, just thinking
[23:29:38] Radar: bambanx: yup, that's me
[23:29:56] Radar: dtordable: there is no such thing as "coachdb"
[23:30:45] Radar: dtordable: Perhaps try slowing down and explaining what you're asking in full, complete English sentences?
[23:30:52] Radar: "i work study documents" is not good english
[23:30:59] Radar: Neither is "and I though coachdb does that, just thinking"
[23:31:13] dviola: has joined #RubyOnRails
[23:31:44] SteenJobs: has joined #RubyOnRails
[23:31:46] pawnbox: has joined #RubyOnRails
[23:32:29] dtordable: i'll redesign the website in pure HTML 4 then... ;)
[23:32:50] Radar: Flippancy when someone's trying to help you? Ok, bye.
[23:32:59] lemur: has joined #RubyOnRails
[23:33:24] djbkd: has joined #RubyOnRails
[23:33:42] dtordable: full of tables and gif animations
[23:33:48] wilsonc91: has joined #RubyOnRails
[23:34:26] banister: has joined #RubyOnRails
[23:34:56] rhizome: pronounced jiff
[23:34:56] NullVoxPopuli: has joined #RubyOnRails
[23:35:28] pydave6367: has joined #RubyOnRails
[23:36:13] SalexW: has joined #RubyOnRails
[23:37:01] smathy: ...only by Wilhite
[23:37:05] hoopti: has joined #RubyOnRails
[23:37:33] yoongkang: has joined #RubyOnRails
[23:38:21] Nvp: has joined #RubyOnRails
[23:38:40] rhizome: i will say guh-if when i'm talking to someone who seems like they'd make a big deal about it
[23:39:15] smathy: Well you're both crazy.
[23:39:24] krramos__: has joined #RubyOnRails
[23:39:32] hoopti: has joined #RubyOnRails
[23:40:22] adaedra: I don't care how it's pronounced.
[23:40:31] rhizome: similar to 'libb' vs 'lybe'
[23:40:34] smathy: adaedra, you just spell it out?
[23:40:34] Radar: It's pronounced "gif", duh.
[23:40:48] adaedra: It's pronounced "apng"
[23:40:54] smathy: Anyway, a conversation for -OT perhaps.
[23:41:08] quazimodo: has joined #RubyOnRails
[23:41:15] dtordable: rhizome: are you spanish? hahaha
[23:41:51] smathy: ACTION wonders what's funny about that
[23:42:22] ruurd: has joined #RubyOnRails
[23:42:23] dtordable: rhizome: you dont loose anything here
[23:42:45] smathy: Now you're doing it!
[23:42:58] Radar: +q dtordable!*@*
[23:43:11] Radar: dtordable: You are spouting nonsense and it's annoying. Time out for 15.
[23:45:48] tubbo: good riddance
[23:47:55] atomical: has joined #RubyOnRails
[23:49:25] axl_: has joined #RubyOnRails
[23:49:31] cswelin: has joined #RubyOnRails
[23:50:21] Radar: -q dtordable!*@*
[23:50:26] Radar: apology accepted
[23:53:55] cornerma1: has joined #RubyOnRails
[23:54:56] GarethAdams: has joined #RubyOnRails
[23:55:10] GarethAdams: has joined #RubyOnRails
[23:55:21] SteenJobs: has joined #RubyOnRails
[23:56:12] allcentury: has joined #RubyOnRails
[23:58:01] rhizome: ferdie pacheco