« Back to channel list

#RubyOnRails - 16 November 2015

« Back 1 day Forward 1 day »
[00:00:56] smathy: private-butts, your schema.rb is generated from what's in your DB.
[00:01:11] private-butts: want me to destroy the database?
[00:01:33] private-butts: btw, I've tried db:drop:all
[00:01:34] smathy: private-butts, looks like you've created migrations, run db:migrate (thereby creating the database tables themselves) then later removed the migration but without migrating down, so the table remains in your DB.
[00:01:48] jsmith_: has joined #RubyOnRails
[00:01:54] smathy: private-butts, yeah, you can just do: db:migrate:reset
[00:02:18] smathy: It'll drop your DB, re-created it, and re-run your migrations (which will generate a new schema.rb based on those migrated tables).
[00:03:05] crankharder: has joined #RubyOnRails
[00:03:12] smathy: private-butts, you're welcome.
[00:03:24] private-butts: I'd give you a cookie, but I took out my cd drive
[00:03:38] private-butts: I don't have a slot to put it in anymore :(
[00:03:47] smathy: private-butts, so in future, before you remove a migration file you need to db:migrate:down it.
[00:03:58] private-butts: Thanks! will do
[00:04:30] private-butts: Have a good day!
[00:05:06] roxtrongo: has joined #RubyOnRails
[00:08:41] x-light: has joined #RubyOnRails
[00:14:42] rickmasta: has joined #RubyOnRails
[00:17:21] sevenseacat: has joined #RubyOnRails
[00:18:18] northfurr: has joined #RubyOnRails
[00:19:29] surrealanalysis: has joined #RubyOnRails
[00:20:41] SteveC: has joined #RubyOnRails
[00:20:55] northfurr: has joined #RubyOnRails
[00:21:17] Scripore: has joined #RubyOnRails
[00:23:36] northfurr: has joined #RubyOnRails
[00:26:08] Prkl8r: has joined #RubyOnRails
[00:27:46] rgrmatt: has joined #RubyOnRails
[00:27:49] hello9: has joined #RubyOnRails
[00:28:07] hello9: anyone have any good tutorials for making redis multi-tenant (as a cache) for a rails app?
[00:30:04] darrencauthon: has joined #RubyOnRails
[00:31:04] ewnd9: has joined #RubyOnRails
[00:31:30] twilling: has joined #RubyOnRails
[00:32:37] bruno-: has joined #RubyOnRails
[00:32:39] twilling: has joined #RubyOnRails
[00:35:43] trosborn: has joined #RubyOnRails
[00:37:14] IrishGringo: has joined #RubyOnRails
[00:40:12] vigintas: has joined #RubyOnRails
[00:45:58] atomical: has joined #RubyOnRails
[00:46:17] ur5us: has joined #RubyOnRails
[00:46:18] annlewis: has joined #RubyOnRails
[00:47:14] ur5us_: has joined #RubyOnRails
[00:47:44] TheNet: has joined #RubyOnRails
[00:48:04] Rodya_: has joined #RubyOnRails
[00:48:19] cashnguns: has joined #RubyOnRails
[00:48:42] northfurr: has joined #RubyOnRails
[00:50:37] zpe: has joined #RubyOnRails
[00:53:07] dideler: has joined #RubyOnRails
[00:54:41] owenjones: has joined #RubyOnRails
[00:55:06] northfurr: has joined #RubyOnRails
[00:56:15] wilsonc91: has joined #RubyOnRails
[00:56:51] AnoHito: has joined #RubyOnRails
[00:56:53] wilsonc91: Im new to RoR and playing around with something involving a file upload. It seems like it stores things like filename in the @headers. Is there a way to access them?
[00:57:30] wilsonc91: https://gist.github.com/WilsonChiang/a888db2683da458b0a11
[00:57:33] northfurr: has joined #RubyOnRails
[00:57:52] nya: has joined #RubyOnRails
[00:59:26] Tref: has joined #RubyOnRails
[01:00:39] moeabdol: has joined #RubyOnRails
[01:00:42] aevitas: has joined #RubyOnRails
[01:02:05] dviola: has joined #RubyOnRails
[01:05:51] roxtrongo: has joined #RubyOnRails
[01:08:05] waka: has joined #RubyOnRails
[01:08:22] IrishGringo: has joined #RubyOnRails
[01:08:37] mloy: has joined #RubyOnRails
[01:11:48] FailBit: "New Relic has shit performance" https://i.imgur.com/3HcJFZM.png
[01:14:32] njero: FailBit: what do u mean? sarcastic or :P
[01:15:16] djbkd: has joined #RubyOnRails
[01:15:16] FailBit: no, really
[01:15:25] FailBit: that's straight-up awful performance
[01:15:39] FailBit: 1020ms average?
[01:15:44] FailBit: I would have fired everyone there
[01:15:48] owenjones: has joined #RubyOnRails
[01:16:31] njero: FailBit: what's the normal average?
[01:17:02] nya: has joined #RubyOnRails
[01:17:05] FailBit: there's no "normal" but end-user satisfaction guidelines says you should shoot for <= 100ms
[01:17:17] FailBit: and I have not had trouble with that for my ap
[01:19:25] northfurr: has joined #RubyOnRails
[01:19:55] FailBit: https://i.imgur.com/2dOIDwA.png
[01:23:33] one_zero: has joined #RubyOnRails
[01:25:12] maxz: has joined #RubyOnRails
[01:26:01] Tref: has joined #RubyOnRails
[01:26:02] nertzy: has joined #RubyOnRails
[01:27:47] IrishGringo: has joined #RubyOnRails
[01:27:51] FailBit: https://i.imgur.com/q6ZdAJU.png
[01:28:20] allcentu1: has joined #RubyOnRails
[01:28:24] FailBit: that last bit at the end is where I started caching the shit out of everything
[01:30:53] darrencauthon: has joined #RubyOnRails
[01:31:32] alias-ls-to-rm: has joined #RubyOnRails
[01:31:50] hahuang65: has joined #RubyOnRails
[01:34:21] htmldrum: has joined #RubyOnRails
[01:34:27] crdpink: has joined #RubyOnRails
[01:34:37] bruno-: has joined #RubyOnRails
[01:34:44] johnzorn: has joined #RubyOnRails
[01:34:46] Ikri: has joined #RubyOnRails
[01:35:05] robotbrain: has joined #RubyOnRails
[01:36:03] many: has joined #RubyOnRails
[01:36:55] lbotos: has joined #RubyOnRails
[01:36:57] feignt: has joined #RubyOnRails
[01:37:24] CheckYourSix: has joined #RubyOnRails
[01:37:25] Ratler: has joined #RubyOnRails
[01:37:25] markelite: has joined #RubyOnRails
[01:37:26] quazimodo: has joined #RubyOnRails
[01:37:27] danlucraft: has joined #RubyOnRails
[01:37:31] dotty: has joined #RubyOnRails
[01:37:32] cashnguns: has joined #RubyOnRails
[01:37:52] tris: has joined #RubyOnRails
[01:37:54] Seich: has joined #RubyOnRails
[01:38:05] nullwarp: has joined #RubyOnRails
[01:38:07] epochwolf: has joined #RubyOnRails
[01:38:09] DanKnox[away]: has joined #RubyOnRails
[01:38:12] danneu: has joined #RubyOnRails
[01:38:13] ELCALOR: has joined #RubyOnRails
[01:38:22] melter: has joined #RubyOnRails
[01:38:22] EXCHGR: has joined #RubyOnRails
[01:38:24] constantinexvi: has joined #RubyOnRails
[01:38:26] DarkBushido: has joined #RubyOnRails
[01:38:34] alxndr: has joined #RubyOnRails
[01:38:48] hellschreiber_: has joined #RubyOnRails
[01:38:49] sparr: has joined #RubyOnRails
[01:38:49] cschneid: has joined #RubyOnRails
[01:39:03] zz_denym_: has joined #RubyOnRails
[01:39:03] dogedra: has joined #RubyOnRails
[01:39:10] jhass: has joined #RubyOnRails
[01:39:11] northfurr: has joined #RubyOnRails
[01:39:14] Diabolik: has joined #RubyOnRails
[01:39:17] prasselpikachu: has joined #RubyOnRails
[01:39:25] iooner: has joined #RubyOnRails
[01:39:27] jrhorn: has joined #RubyOnRails
[01:39:47] jlyndon: has joined #RubyOnRails
[01:40:44] sikachu: has joined #RubyOnRails
[01:40:46] chancancode_: has joined #RubyOnRails
[01:41:48] northfurr: has joined #RubyOnRails
[01:42:10] TDJACR: has joined #RubyOnRails
[01:43:07] aguynamedben: has joined #RubyOnRails
[01:43:22] joaomdmoura: has joined #RubyOnRails
[01:43:23] lacrosse: has joined #RubyOnRails
[01:43:48] shwoodard: has joined #RubyOnRails
[01:43:50] annlewis: has joined #RubyOnRails
[01:43:52] spastorino: has joined #RubyOnRails
[01:43:53] zemmihates: has joined #RubyOnRails
[01:43:53] Iacobus: has joined #RubyOnRails
[01:44:02] KnownSyntax: has joined #RubyOnRails
[01:44:19] kumavis: has joined #RubyOnRails
[01:44:42] northfurr: has joined #RubyOnRails
[01:45:16] machty: has joined #RubyOnRails
[01:45:49] tpendragon: has joined #RubyOnRails
[01:46:17] dviola: I have the following models: Merchant, Purchaser and Product, what sort of relationship would you use for that?
[01:46:30] sevenseacat: thats a vague question
[01:46:37] sevenseacat: tell us how those models relate to each other
[01:46:39] skarn: has joined #RubyOnRails
[01:48:42] Rodya_: has joined #RubyOnRails
[01:49:35] johnzorn: In form_for, when I add url: articles_path should it not change the form action to /articles/create? It changed it from /articles/new to just /articles what's the best way to debug this sort of thing?
[01:49:58] sevenseacat: /articles is correct - thats the create action
[01:50:19] Radar: It's correct because the request will be POST /articles
[01:51:44] chipotle: has joined #RubyOnRails
[01:52:14] johnzorn: oh ok, I thought I saw it should be articles/create, sorry...
[01:55:36] aevitas: has joined #RubyOnRails
[01:55:52] Radar: johnzorn: !routing
[01:55:52] helpa: johnzorn: http://guides.rubyonrails.org/routing.html - Rails Routing From the Outside In - Rails Guide - by Mike Gunderloy
[01:56:05] Radar: johnzorn: see section 2.2
[01:56:05] Cervajz: has joined #RubyOnRails
[01:56:41] dviola: sevenseacat: Purchaser model will have a name, Product will have items with their price (I guess I should call my model Item instead?), Merchant model will have address and name, I just need to keep track of who's bought what, maybe I should try polymorphic association?
[01:56:57] sevenseacat: that doesnt tell us how they relate to each other
[01:57:38] Radar: dviola == diegoviola?
[01:57:43] dviola: Radar: yes
[01:57:52] dviola: sevenseacat: I don't know how else to explain, sorry
[01:58:27] sevenseacat: dviola: well if you can't explain the relationship, how can we tell you how to model it in code
[01:58:38] sevenseacat: this is a pretty straightforward one, too
[01:59:23] sevenseacat: a polymorphic association is not appropriate here
[02:00:49] roxtrongo: has joined #RubyOnRails
[02:05:00] SteveC: Quick question: I want to manage the database tables manually without migration. Is this possible? I'm creating a new model however it will plug into postgre
[02:05:54] sevenseacat: i wouldnt do that.
[02:06:06] diegoviola: sevenseacat: basically, I have a list of products/items with their prices and those items are linked to a seller and buyer
[02:06:43] sevenseacat: diegoviola: can one product be associated with many buyers and many sellers?
[02:09:32] diegoviola: well, judging by the data I have... no, every product seems to be associated by a unique seller
[02:09:48] diegoviola: has_one :through I guess?
[02:10:04] alexclark: has joined #RubyOnRails
[02:10:06] sevenseacat: through what?
[02:10:27] alexclark: dumb question of the night (and its not that rails related)
[02:10:29] sevenseacat: what has one through what?
[02:11:00] diegoviola: I really suck at associations
[02:11:26] alexclark: the concept of having a running server that you can run commands on (i.e. the rails console)
[02:11:46] alexclark: is this something that can only happen in dynamic languages?
[02:12:47] mghaig: has joined #RubyOnRails
[02:14:16] alexclark: sevenseacat: was that answer directed at me?
[02:14:16] maxz: alexclark you don't run command on, they are two ruby process instances that load the same environment. The common point is the database, because of it what you do in rails console affects the running server
[02:14:48] sevenseacat: a rails console is not a running server
[02:16:36] alexclark: sevenseacat: Maxz: Ok that makes sense. the console has no address or anything
[02:17:13] alexclark: but as far as executing commands with the app running, would i be reasonable to expect something like that in a compiled language?
[02:17:40] maxz: yes, why not
[02:17:49] mghaig_: has joined #RubyOnRails
[02:18:45] darrencauthon: has joined #RubyOnRails
[02:19:27] sevenseacat: sure. elixir has a repl.
[02:19:50] sevenseacat: and its a compiled language.
[02:20:16] alexclark: didn't know if it made sense to run language code in a compiled environment
[02:20:19] alexclark: cool thanks!
[02:24:15] rgrmatt: has joined #RubyOnRails
[02:24:29] maxz: mmm it's a sensible topic, all lang are compiled anyway :P, the process of transforming human readable code to AST and bytecode is compiling too. I'd prefer call them interpreted langs (needs an interpreter to be executed)
[02:25:20] maxz: it was a too deep thought? xD
[02:25:41] Jasaka: has joined #RubyOnRails
[02:25:48] centrx: has joined #RubyOnRails
[02:26:11] nertzy: has joined #RubyOnRails
[02:26:24] diegoviola: sevenseacat: through orders?
[02:26:41] sevenseacat: diegoviola: what does that have to do with products and sellers?
[02:27:14] sevenseacat: if you were talking about what products a seller sold, where would orders fit in?
[02:31:09] diegoviola: Customer has_many :orders
[02:31:10] alexclark: has joined #RubyOnRails
[02:31:32] sevenseacat: that makes sense, but what does that have to do with products and sellers?
[02:31:37] diegoviola: Order belongs_to :customer
[02:32:06] diegoviola: sevenseacat: that's the part that confuses me, I don't know how to associate customers and Products/Sellers
[02:32:19] diegoviola: it's way over my head at this point
[02:32:32] sevenseacat: well you've got a customer and an order
[02:32:38] sevenseacat: what is an order for?
[02:33:02] sevenseacat: if you were making an order from amazon, how would it tie to products
[02:34:02] diegoviola: well, the order would have to be associated with the product model
[02:34:26] Prkl8r: Hello all! If anyone wouldn't minding talking a quick look and hopefully give my a few pointers on how to solve a problem I am having trying to find questions that are currently active AND that the current user hasn't yet answered. https://gist.github.com/Prkl8r/c08b6f040faa7848e673
[02:34:43] diegoviola: and product with the merchant
[02:35:34] bruno-: has joined #RubyOnRails
[02:35:34] diegoviola: I wonder if I could get away with by just using has_many/belongs_to between those models
[02:35:36] neanderslob: has joined #RubyOnRails
[02:35:39] sevenseacat: diegoviola: so if you went to amazon and said right, I want to buy 3 copies of Rails 4 in Action, 'sold by' sevensecat, how would that be modelled?
[02:35:47] sevenseacat: I can't even spell my own name. whatever.
[02:35:48] nertzy2: has joined #RubyOnRails
[02:36:51] sevenseacat: you've got that you're the purchaser, and you're making an order. i'm the seller, and R4IA is the product
[02:37:04] sevenseacat: there's a couple of key bits of info missing
[02:37:26] VeryBewitching: has joined #RubyOnRails
[02:37:49] jrhorn: has joined #RubyOnRails
[02:38:01] sevenseacat: i'm leading you as best I can without flat out showing you a database diagram
[02:39:20] zpe: has joined #RubyOnRails
[02:42:32] njero: hey... suppose :company has_many :products and :product has_many :customers. How can i select all customers of company through active record?
[02:42:46] Radar: n_e_o: use a has_many :through
[02:42:52] koprom: has joined #RubyOnRails
[02:43:47] diegoviola: looks like n_e_o is looking for the same thing as I do
[02:44:27] rickmasta: has joined #RubyOnRails
[02:44:30] diegoviola: I'm still confused about where orders fit in there
[02:44:30] njero: Radar: like this? in company, has_many :customers, through: :products
[02:44:34] annlewis: has joined #RubyOnRails
[02:44:50] Radar: n_e_o: yes
[02:45:37] Radar: diegoviola: You probably want a LineItem model which represents the join between orders and products.
[02:45:55] Radar: products themselves belong to seller
[02:46:53] Radar: And it's not just a flat association. The LineItem should contain the price of the product at the time it was added to the cart
[02:47:09] Radar: that way then if the product's price changes after an order has been placed, it won't effect past order's prices
[02:47:15] njero: Radar: yeah got it.. I missed to add has_many to products :P
[02:47:20] njero: Radar: Thanks :)
[02:47:29] sevenseacat: ACTION watches Radar spell it out
[02:48:18] dented42: has joined #RubyOnRails
[02:48:41] sevenseacat: how can I stop my app making a request directly to cloudinary in tests?
[02:48:55] moeabdol: has joined #RubyOnRails
[02:49:27] Fire-Dragon-DoL: has joined #RubyOnRails
[02:50:13] Radar: sevenseacat: can you stub the response using something like Webmock?
[02:50:30] sevenseacat: yeah looking into it now
[02:52:37] dented42: has left #RubyOnRails: ()
[02:55:37] sankaber: has joined #RubyOnRails
[02:55:47] jahbrewski: has joined #RubyOnRails
[02:55:51] x-light: has joined #RubyOnRails
[03:03:28] sevenseacat: diegoviola: still with us?
[03:04:32] OHNERO: has joined #RubyOnRails
[03:04:37] Prkl8r: Greatly appreciate it if anyone has a couple minutes and could help take a quick look. https://gist.github.com/Prkl8r/c08b6f040faa7848e673
[03:05:13] A124: has joined #RubyOnRails
[03:06:29] mghaig: has joined #RubyOnRails
[03:06:35] diegoviola: sevenseacat: yeah, I haven't tried anything yet though
[03:06:47] sevenseacat: diegoviola: do you follow what Radar was saying?
[03:08:42] Radar: Prkl8r: Hi. What's wrong with doing question.answers.where(user_id: user.id).exists?
[03:09:24] Radar: Prkl8r: I would define that as an association method... I'll gist up an example.
[03:09:30] ValicekB_: has joined #RubyOnRails
[03:10:28] wilsonc91: has joined #RubyOnRails
[03:10:30] Radar: Changed my mind about the association method. Just good as an instance method on the Question model https://gist.github.com/radar/c0e13b3e561856a24ced
[03:10:34] Prkl8r: Radar, so I'm trying to populate @questions with all of the active questions, that the current user has not yet answered. I can pull the info seperately but haven't been able to tie it all together.
[03:11:03] Radar: Sounds like possibly an outer join to me? I'm a bit rusty with those.
[03:11:32] mary5030: has joined #RubyOnRails
[03:12:15] krz: has joined #RubyOnRails
[03:12:18] Radar: Give me a moment to play.
[03:13:09] Prkl8r: I'm pretty new to some of the SQL stuff, so this has been a struggle. Thought I had it a couple days ago but it didn't completely work.
[03:14:37] DelDotB: has joined #RubyOnRails
[03:14:53] Prkl8r: I originally had @questions = Question.active_question.where.not(id: @user.answers) but it seems to sometimes show questions that have already been answered by the user for some reason.
[03:15:08] FailBit: joins are butt
[03:15:26] diegoviola: quantity should be in the Order model, right?
[03:16:06] DelDotB: Is this an appropriate place for a question about Heroku? (running an RoR app, of course)
[03:16:16] diegoviola: DelDotB: just ask
[03:17:21] VeryBewitching: has joined #RubyOnRails
[03:17:29] DelDotB: I???ve got an app crash (H10). I???ve reset the database, migrated, and checked the versions of my gems and everything seems OK. I???m generally curious is there???s a more forceful way to restart an app if I don???t care about the data.
[03:18:49] rakm: has joined #RubyOnRails
[03:19:28] sevenseacat: what is a H10?
[03:20:44] DelDotB: it???s the generic ???app crash??? error code (https://devcenter.heroku.com/articles/error-codes). I don???t know how to get any more information out of it.
[03:21:41] mghaig: has joined #RubyOnRails
[03:21:47] sevenseacat: gist the logs so we can see?
[03:22:07] Radar: Prkl8r: Sorry, i can't work it out.
[03:22:29] Radar: I'll keep trying for 5min more
[03:22:41] Prkl8r: OK. Thanks for looking!
[03:24:32] DelDotB: Here???s my logs: http://pastebin.com/UUZDSye5
[03:24:44] DelDotB: OH! Let me put in gist
[03:24:49] DelDotB: I didn???t know about that
[03:24:54] OHNERO: has left #RubyOnRails: ()
[03:25:55] DelDotB: https://gist.github.com/ianwessen/70709a5a8dbced0863d6
[03:26:46] DelDotB: there it is in gist. I???ve been wrestling with this thing, so there???s rollbacks and resets galore.
[03:26:59] Radar: 2015-11-16T03:07:02.419789+00:00 app[web.1]: /app/vendor/bundle/ruby/2.1.0/gems/puma-2.14.0/lib/puma/dsl.rb:20:in `read': No such file or directory @ rb_sysopen - config/puma.rb (Errno::ENOENT)
[03:27:07] Radar: My guess is that config/puma.rb is missing.
[03:27:08] sevenseacat: crashing because theres no puma config
[03:27:43] rhizome: there's your problem
[03:29:05] DelDotB: Can I ask how you found that so fast?
[03:29:34] Radar: Scanned through the logs until I saw something that looked bad.
[03:29:47] Radar: https://gist.github.com/ianwessen/70709a5a8dbced0863d6#file-logs-L13-L27
[03:29:58] Radar: This is one full loop of your server process trying to start up
[03:30:02] Radar: the rest is mostly repetition
[03:30:38] DelDotB: Very cool. Thanks for spotting that!
[03:33:51] sevenseacat: aaaaaargh homebrew i hate you
[03:34:12] diegoviola: sevenseacat: what's wrong with it?
[03:34:28] sevenseacat: i have no idea how to re-link an older version of phantomjs
[03:34:38] sevenseacat: just unlinked it to test something and now i dont know how to relink it
[03:36:40] bruno-: has joined #RubyOnRails
[03:37:08] EminenceHC: has joined #RubyOnRails
[03:40:21] juddey: sevenseacat: is it just brew link?
[03:40:28] sevenseacat: apparently not
[03:41:48] darrencauthon: has joined #RubyOnRails
[03:43:05] adac: has joined #RubyOnRails
[03:43:06] chipotle: has joined #RubyOnRails
[03:43:30] htmldrum: has joined #RubyOnRails
[03:45:21] annlewis: has joined #RubyOnRails
[03:47:06] juddey: another random guess: brew switch?
[03:47:19] jolts: has joined #RubyOnRails
[03:49:08] diegoviola: installing phantomjs for me is as simple as pacman -S phantomjs, if I needed an older version I would grab the tar file, uncompress it on my home directory and add it to my $PATH... but that's on Linux. I don't know why package management has always been more work on OSX
[03:49:46] sevenseacat: diegoviola: great, that has nothing to do with my question.
[03:49:58] sevenseacat: but thank you for your input.
[03:50:35] diegoviola: sevenseacat: I know, sorry. I'm just making a comparison (random comment)
[03:50:45] diegoviola: not trying to start a flamewar or anything
[03:50:54] sevenseacat: I am well aware of how much OSX sucks compared to linux, thank you.
[03:51:01] mary5030: has joined #RubyOnRails
[03:51:01] sevenseacat: not my call to use OSX.
[03:51:12] jahbrewski: has joined #RubyOnRails
[03:51:28] shinn_: has joined #RubyOnRails
[03:54:05] juddey: sevenseacat: just did a brew switch phantomjs 1.9.8 and I went from phantomjs 2.0.0 to 1.9.8... but you've probably figured that by now.
[03:54:11] nya: has joined #RubyOnRails
[03:54:30] sevenseacat: Error: phantomjs does not have a version "1.8.2" in the Cellar.
[03:54:52] skyjumper: sevenseacat: i think we've discussed linux before... what do you say to coworkers/employers who pressure you into using OSX?
[03:55:18] sevenseacat: skyjumper: my employer is the one who signs my paycheck, so when he tells me I must use OSX, i say 'okay'
[03:55:41] juddey: is that in /usr/local/Cellar though? (1.8.2 that is)
[03:55:46] juddey: clearly must be
[03:55:53] Radar: clearly!~
[03:55:54] sevenseacat: at my previous job, I was the only person using Ubuntu in an office of macs
[03:56:02] skyjumper: sevenseacat: i am that person now
[03:56:32] Radar: One of us. One of us. One of us.
[03:56:34] skyjumper: lots of "Ugh... we can't use $COMMERCIAL_APP because of course skyjumper refuses to move on from linux"
[03:56:35] sevenseacat: didnt bother me one iota, and it was fine as long as I didnt hold people up with my technical problems
[03:56:47] diegoviola: I really wish companies would not be so strict about the OS they use, I was stuck at a Windows shop once and I was the only person using Arch Linux on a VM
[03:56:47] sevenseacat: (of which there were far less than people on OSX)
[03:56:50] Prkl8r: has left #RubyOnRails: ()
[03:57:53] sevenseacat: i have /usr/local/Cellar/phantomjs182
[03:57:56] VeryBewitching: It's certainly easier than being the Linux box in a Windows office I'm sure.
[03:58:15] krainboltgreene: Radar: Hey, as per my email I'd love to read a postmortem to that blog post.
[03:58:40] krainboltgreene: I don't think I've ever seen that done, except as fallout from a death :/
[03:58:46] Radar: krainboltgreene: I don't know what a postmortem would look like.
[03:58:51] sevenseacat: 'you didnt respond to my email quick enough so i'll bug you here instead'?
[03:59:03] sevenseacat: isnt that exactly what Radar is trying to get away from?
[03:59:11] Radar: Helpful to talk about it in here as this is more realtime
[03:59:16] Radar: I can tell him to piss off myself if I want :P
[03:59:31] Radar: But thank you
[03:59:39] krainboltgreene: Radar: Things like the number of responses, who handles what, and what their plans are if you got any details.
[03:59:44] sevenseacat: ACTION goes to have lunch and continue hating on osx
[04:00:14] skyjumper: sevenseacat: if you come up with any responses to "why not just use Apple already, like everyone else?" i'd love to hera them
[04:00:37] Radar: skyjumper: Resistance is futile.
[04:00:44] krainboltgreene: I maintain dante because dante's owner just...stopped and I had a huge PR. Hamster was (I think) because I was twitter friends with the owner.
[04:00:45] skyjumper: so they say
[04:01:36] krainboltgreene: VCR was strange. Myron tweeted about it, I said hello, then he wanted to do a volunteer thing, but then no one actually did anything, so it just "defaulted" to me.
[04:01:45] nya: has joined #RubyOnRails
[04:02:08] mary5030: has joined #RubyOnRails
[04:02:40] Radar: krainboltgreene: sure. let's talk about it later.
[04:03:22] krainboltgreene: It's cool to be alive during the time of programming maturation, where maintainers change and not because of a government contract ending.
[04:04:10] shinn_: has left #RubyOnRails: ()
[04:07:26] wilsonc91: has joined #RubyOnRails
[04:07:36] jrhorn: has joined #RubyOnRails
[04:08:34] youngbaks: has joined #RubyOnRails
[04:11:01] braincrash: has joined #RubyOnRails
[04:15:04] ohmpieng: has joined #RubyOnRails
[04:17:35] kp666: has joined #RubyOnRails
[04:18:57] Radar: krainboltgreene: if you're taking over the maintenance of those projects then I suggest as your first commit as maintainer to remove the "Maintainer required" notices from the readmes.
[04:19:57] krainboltgreene: Radar: Getting into that sort of thing now. If you get anyone elses name for forem let me know. I don't use it, so I would be a poor forward thinker for it. I can do much more good communicating and cleaning up.
[04:20:05] mary5030: has joined #RubyOnRails
[04:20:33] Radar: Copy that.
[04:21:58] owenjones: has joined #RubyOnRails
[04:23:46] Aeyrix: brew tap homebrew/versions
[04:24:01] Aeyrix: brew install homebrew/versions/whatever
[04:24:06] Aeyrix: brew switch whatever version
[04:24:13] sevenseacat: already tapped
[04:26:15] nickenchuggets: has joined #RubyOnRails
[04:28:06] zpe: has joined #RubyOnRails
[04:29:47] jolts: has joined #RubyOnRails
[04:30:14] rickmasta: has joined #RubyOnRails
[04:30:21] gentlemaverick: has joined #RubyOnRails
[04:32:44] Radar: krainboltgreene: I'm setting up a filter on Fastmail to archive any notifications@github.com email that comes through
[04:33:04] krainboltgreene: I figured you might be getting swamped.
[04:33:19] fedexo: has joined #RubyOnRails
[04:34:33] Radar: anything that contains "forem", "paranoia" or "redis" in the GH subject is now being redirected to my archive
[04:35:00] shinnya: has joined #RubyOnRails
[04:35:26] krainboltgreene: Radar: Note I don't have access to redis-store yet, so...
[04:35:34] rgrmatt: has joined #RubyOnRails
[04:35:39] Radar: I'm imagining you will when jodosha wakes up.
[04:36:55] moeabdol: has joined #RubyOnRails
[04:37:10] x-light: has joined #RubyOnRails
[04:37:37] aevitas: has joined #RubyOnRails
[04:37:47] baweaver: has joined #RubyOnRails
[04:38:07] bruno-: has joined #RubyOnRails
[04:39:59] iateadonut: has joined #RubyOnRails
[04:43:32] darrencauthon: has joined #RubyOnRails
[04:46:06] annlewis: has joined #RubyOnRails
[04:47:24] wilsonc91: has joined #RubyOnRails
[04:51:29] Tref: has joined #RubyOnRails
[05:00:55] wilsonc91: has joined #RubyOnRails
[05:01:32] diegoviola: https://gist.github.com/anonymous/01b1735d9b54eb397675
[05:01:37] diegoviola: does that look fine to you?
[05:02:09] diegoviola: o = Order.find(1) and then I can grab all the other data from that
[05:02:16] diegoviola: not sure if that will work for my use case though
[05:04:34] diegoviola: yeah I think that will do
[05:05:44] sevenseacat: an order is only for a single item
[05:05:49] sevenseacat: why does a seller care about an order?
[05:09:18] Radar: diegoviola: https://gist.github.com/radar/53dbecfc58fd326af649
[05:09:35] Radar: And why are sellers and buyers exclusive models? Don't they both represent people?
[05:11:11] diegoviola: Radar: yes, they represent people, but they have a different role, right?
[05:11:26] Radar: diegoviola: In what context is their role different?
[05:11:34] Radar: Why can't the same person buy AND sell?
[05:13:02] diegoviola: well, nothing prevents that I suppose, it's just that I have specific data in a spreadsheet that groups sellers and buyers in different columns
[05:13:26] Radar: Ok. That's new information we didn't know about.
[05:14:04] diegoviola: the data looks like this: https://gist.github.com/anonymous/cab3900d53d8a0aeb143
[05:14:47] chipotle: has joined #RubyOnRails
[05:14:59] Aeyrix: My current app has a feature where the display name a user uses, in their own dashboard, is output with `raw`.
[05:15:42] Aeyrix: Because I like catching people out.
[05:17:09] tildes: has joined #RubyOnRails
[05:17:21] SteenJobs: has joined #RubyOnRails
[05:21:45] DelDotB: has joined #RubyOnRails
[05:23:25] Radar: diegoviola: Ok, then that seems fine to have a different buyer and seller model
[05:24:05] diegoviola: Radar: yep, sorry for not having mentioned that before
[05:24:15] Tref: has joined #RubyOnRails
[05:26:36] diegoviola: Radar: I'm still confused about associations at a whole, so forgive me if I say something stupid about them, in any case I'd like to know
[05:26:47] Radar: diegoviola: no judging coming from me today
[05:27:19] diegoviola: I've added has_many :orders to Buyer, Item, Seller so I can get the data from Order's directly
[05:27:55] diegoviola: if there's another way to do that I'd like to know, because I'm not trying to build an amazon clone, just adding data to those models and showing in a table
[05:28:35] freezevee: has joined #RubyOnRails
[05:29:10] asianMike: has joined #RubyOnRails
[05:29:53] Radar: I don't understand the question.
[05:31:26] diegoviola: Radar: when I have those models and I fill them with data: https://gist.github.com/anonymous/01b1735d9b54eb397675 I can do: o = Order.first; o.item; o.seller; o.buyer; o.qty and I get data back as long as their IDs match with each other, etc.
[05:32:40] shinenelson: has joined #RubyOnRails
[05:33:11] Radar: ok, so an order links to one item. That makes more sense now that I can see the data
[05:33:18] Radar: yeah, I reckon you can do what you said
[05:34:00] diegoviola: Radar: I've associated the models that way so I could do just that, and I plan to do that from my controllers, but I'm also getting the impression that I'm not doing something right
[05:34:26] diegoviola: Radar: I'm thinking I could associate things differently and query the data in a different way
[05:34:38] Radar: diegoviola: ?
[05:34:50] diegoviola: but my activerecord-fu isn't that great
[05:35:12] Radar: I don't see anything wrong with how you have it in that latest gist.
[05:38:03] diegoviola: buyer has_many orders makes more sense than seller having many orders though
[05:38:19] bruno-: has joined #RubyOnRails
[05:38:36] diegoviola: but when I think about o = Order.first; o.seller that makes more sense
[05:38:52] baweaver: has joined #RubyOnRails
[05:43:07] diegoviola: meh, I'll just go with this approach
[05:43:41] Radar: Can't both seller and buyers has_many :orders?
[05:44:19] darrencauthon: has joined #RubyOnRails
[05:44:43] diegoviola: Radar: sure, I have it that way at the moment
[05:46:52] annlewis: has joined #RubyOnRails
[05:47:26] bhaveshletter: has joined #RubyOnRails
[05:47:45] naftilos76: has joined #RubyOnRails
[05:47:55] krz: has joined #RubyOnRails
[05:48:31] pydave6367: has joined #RubyOnRails
[05:51:50] crdpink2: has joined #RubyOnRails
[05:52:21] annlewis: has joined #RubyOnRails
[05:57:16] nya: has joined #RubyOnRails
[05:58:44] youngbaks: has joined #RubyOnRails
[06:00:36] nyaa: has joined #RubyOnRails
[06:03:12] mghaig: has joined #RubyOnRails
[06:03:42] Tref: has joined #RubyOnRails
[06:03:49] applegrain: has joined #RubyOnRails
[06:06:39] mary5030: has joined #RubyOnRails
[06:11:38] chrissonar: has joined #RubyOnRails
[06:12:22] towski_: has joined #RubyOnRails
[06:12:59] applegrain: has joined #RubyOnRails
[06:13:16] bhaveshletter: has left #RubyOnRails: ("Leaving")
[06:13:22] bhaveshletter: has joined #RubyOnRails
[06:14:00] bhaveshletter: has left #RubyOnRails: ("Leaving")
[06:14:22] bhaveshletter: has joined #RubyOnRails
[06:14:37] nya: has joined #RubyOnRails
[06:14:50] nya: has joined #RubyOnRails
[06:15:44] _3by8: has joined #RubyOnRails
[06:16:10] ohmpieng: has joined #RubyOnRails
[06:16:50] bhaveshletter: has left #RubyOnRails: ("Leaving")
[06:16:52] zpe: has joined #RubyOnRails
[06:17:36] bhaveshletter: has joined #RubyOnRails
[06:19:06] User458764: has joined #RubyOnRails
[06:22:02] ohmpieng: has joined #RubyOnRails
[06:23:51] waka: has joined #RubyOnRails
[06:25:02] moeabdol: has joined #RubyOnRails
[06:26:31] helpa-bot: has joined #RubyOnRails
[06:27:01] Radar: !botsnack
[06:27:01] helpa: Nom nom. Thanks, Radar!
[06:27:52] dcope: has joined #RubyOnRails
[06:28:03] eduardodeoh: has joined #RubyOnRails
[06:28:14] redondos: has joined #RubyOnRails
[06:28:31] helpa: has joined #RubyOnRails
[06:28:36] ngr: has joined #RubyOnRails
[06:28:45] ankhers: has joined #RubyOnRails
[06:29:07] funnel: has joined #RubyOnRails
[06:31:56] riotjones: has joined #RubyOnRails
[06:32:25] djbkd: has joined #RubyOnRails
[06:33:00] martinbjeldbak: has joined #RubyOnRails
[06:33:05] JoshL: has joined #RubyOnRails
[06:33:12] loglaunch: has joined #RubyOnRails
[06:34:13] confact: has joined #RubyOnRails
[06:35:03] blackhuey: has joined #RubyOnRails
[06:36:57] rgrmatt: has joined #RubyOnRails
[06:38:41] Contigi: has joined #RubyOnRails
[06:39:40] baweaver: has joined #RubyOnRails
[06:39:42] ewnd9: has joined #RubyOnRails
[06:39:46] bruno-: has joined #RubyOnRails
[06:41:07] sinkensabe: has joined #RubyOnRails
[06:44:20] _3by8: So I'm trying to find results in the database but it's returning a model that I wasn't expecting it to: "User" instead of "Printer". My User model is using the has_many association, referencing the Printer model. Can someone explain what's happening?
[06:44:38] sevenseacat: we're not mindreaders
[06:45:02] darrencauthon: has joined #RubyOnRails
[06:46:09] _3by8: sevenseacat: http://pastebin.com/EuWe4Wi6
[06:46:45] _3by8: https://gist.github.com/threebyeight/4c2ccb13bf6bfea38fd9
[06:46:46] DoubleMalt: has joined #RubyOnRails
[06:47:02] sevenseacat: and the problem with that code is?
[06:47:36] _3by8: The else part of the index action is returning a User instead of a Printer
[06:48:01] sevenseacat: no its not. find takes an ID, though
[06:48:08] sevenseacat: not a hash of attributes
[06:50:04] lxsameer: has joined #RubyOnRails
[06:50:25] bmalum: has joined #RubyOnRails
[06:50:43] _3by8: sevenseacat: did you just fix that?
[06:50:46] _3by8: Why is it working now?
[06:50:49] _3by8: sevenseacat: are you a hacker?
[06:50:53] _3by8: Can you teach me to hack?
[06:50:58] sevenseacat: I didn't do anything.
[06:51:06] _3by8: Is it the Illuminati?
[06:51:15] _3by8: ARE THEY WATCHING ME?
[06:51:51] ChanServ: +q *!*@gateway/web/freenode/ip.
[06:52:07] yogeshrt: has joined #RubyOnRails
[06:52:46] toy: has joined #RubyOnRails
[06:52:47] raunicolae: has joined #RubyOnRails
[06:53:12] annlewis: has joined #RubyOnRails
[06:55:31] yardenbar: has joined #RubyOnRails
[06:56:05] raunicolae: has left #RubyOnRails: ()
[06:56:13] confact: has joined #RubyOnRails
[06:57:15] MartinElvar: has joined #RubyOnRails
[06:57:27] mghaig: has joined #RubyOnRails
[06:58:34] ChanServ: -q *!*@gateway/web/freenode/ip.
[06:58:40] sevenseacat: _3by8: don't be stupid.
[06:59:08] _3by8: I'm sorry if you don't like having fun but it's a part of being human.
[06:59:46] sevenseacat: _3by8: you called me a hacker in an attempt to hide your own mistake.
[07:01:02] _3by8: Excuse me, what? Slow down and explain to me exactly what you thought I was trying to say. Totally honest question: are you on the autistic spectrum or have you ever thought you were?
[07:01:28] ChanServ: +q *!*@gateway/web/freenode/ip.
[07:01:46] sevenseacat: time for you to be quiet.
[07:04:15] jrhorn: has joined #RubyOnRails
[07:07:45] youngbaks: has joined #RubyOnRails
[07:08:06] dhjondoh1: has joined #RubyOnRails
[07:08:24] ewilliam_: has joined #RubyOnRails
[07:09:59] cubicme: has joined #RubyOnRails
[07:10:32] toy: hello guys
[07:10:35] uranther_: has joined #RubyOnRails
[07:10:44] toy: here is my rails rumble link
[07:10:45] toy: http://autobot.r15.railsrumble.com/
[07:11:00] funnel_: has joined #RubyOnRails
[07:11:10] toy: it was lil late to post it here
[07:11:12] lloyd_: has joined #RubyOnRails
[07:11:15] crankhar1er: has joined #RubyOnRails
[07:11:44] xhoy__: has joined #RubyOnRails
[07:13:25] arBmind: has joined #RubyOnRails
[07:13:59] Aeyrix_: has joined #RubyOnRails
[07:14:09] urkle-: has joined #RubyOnRails
[07:14:14] Emily_: has joined #RubyOnRails
[07:14:18] Avon_: has joined #RubyOnRails
[07:14:36] Radar_: has joined #RubyOnRails
[07:14:50] barttenbrinke_: has joined #RubyOnRails
[07:15:06] Lorn_: has joined #RubyOnRails
[07:15:51] \13k_: has joined #RubyOnRails
[07:16:00] aguynamedben: has joined #RubyOnRails
[07:16:33] rickmasta: has joined #RubyOnRails
[07:16:44] Tref: has joined #RubyOnRails
[07:17:23] Coldblackice_: has joined #RubyOnRails
[07:17:31] martinbjeldbak: has joined #RubyOnRails
[07:18:27] rvanlieshout: has joined #RubyOnRails
[07:18:30] skarn: has joined #RubyOnRails
[07:19:21] alxndr: has joined #RubyOnRails
[07:19:29] sikachu: has joined #RubyOnRails
[07:19:30] chancancode_: has joined #RubyOnRails
[07:19:51] SuppliedRelic: has joined #RubyOnRails
[07:20:14] aevitas: has joined #RubyOnRails
[07:22:23] nya: has joined #RubyOnRails
[07:22:35] User458764: has joined #RubyOnRails
[07:23:38] cgfbee: has joined #RubyOnRails
[07:23:40] StevePotayTeo: has joined #RubyOnRails
[07:24:40] artto: has joined #RubyOnRails
[07:25:30] comrad: has joined #RubyOnRails
[07:28:27] benlieb: has joined #RubyOnRails
[07:28:33] aevitas: has joined #RubyOnRails
[07:30:27] Oog: has joined #RubyOnRails
[07:32:02] darutoko: has joined #RubyOnRails
[07:32:15] Oog: how do i make html helpers work using ERB class to render a template that is in a string...?
[07:33:12] Oog: or better - basically i have my email template in a string instead of in a file. how do i make it render the string/what's the best way?
[07:36:07] bambanx: has joined #RubyOnRails
[07:36:32] yogeshrt: has joined #RubyOnRails
[07:38:21] ewnd9: has joined #RubyOnRails
[07:38:55] SteenJobs: has joined #RubyOnRails
[07:39:15] Oog: got it render inline i think!
[07:39:22] freezevee: has joined #RubyOnRails
[07:39:32] aganov: has joined #RubyOnRails
[07:40:17] bruno-: has joined #RubyOnRails
[07:40:30] baweaver: has joined #RubyOnRails
[07:41:19] dionysus69: has joined #RubyOnRails
[07:41:44] manfrin: has joined #RubyOnRails
[07:42:51] youngbaks: has joined #RubyOnRails
[07:44:48] rickmasta: has joined #RubyOnRails
[07:45:47] darrencauthon: has joined #RubyOnRails
[07:47:09] sevenseacat: has joined #RubyOnRails
[07:47:31] bambanx: i am applying bootstrap and masonry, when i load the page in milisecons i noticed first load bootstrap as a column then masonry-rails , not sure how fix it, i tried using $(document).on "page:change", -> for load masonry but i dont know how to do for bootstrap
[07:50:13] artto: has joined #RubyOnRails
[07:50:17] jrhorn: has joined #RubyOnRails
[07:51:42] aevitas: has joined #RubyOnRails
[07:52:30] krz: has joined #RubyOnRails
[07:53:24] ur5us: has joined #RubyOnRails
[07:53:36] Tref: has joined #RubyOnRails
[07:53:53] annlewis: has joined #RubyOnRails
[07:54:45] adac: has joined #RubyOnRails
[07:55:26] lxsameer: has joined #RubyOnRails
[07:55:38] coderhut: has joined #RubyOnRails
[07:56:22] arBmind: has joined #RubyOnRails
[07:57:00] coderhut: has joined #RubyOnRails
[07:57:52] yoongkang: has joined #RubyOnRails
[08:04:27] mark1: has joined #RubyOnRails
[08:06:32] darutoko: has joined #RubyOnRails
[08:06:42] AzaToth: has joined #RubyOnRails
[08:09:54] zpe: has joined #RubyOnRails
[08:11:06] zpe: has joined #RubyOnRails
[08:11:22] benlieb_: has joined #RubyOnRails
[08:11:29] ashishsingh173: has joined #RubyOnRails
[08:13:05] moeabdol: has joined #RubyOnRails
[08:14:47] ohmpieng: has joined #RubyOnRails
[08:15:25] solars: has joined #RubyOnRails
[08:19:11] waldi_: has joined #RubyOnRails
[08:20:41] Palsson: has joined #RubyOnRails
[08:21:03] norc: has joined #RubyOnRails
[08:22:30] waldi_: hi, i want to render a form in my new.js.erb like this: $('#modal-container').html("<%= render('modal') %>"); problem is that my html has " and ' in it. how do i solve this?
[08:22:38] arBmind: has joined #RubyOnRails
[08:23:58] norc: render :new changes the URL in my browser bar from /call_survey/new to /call_survey/ -- why is that?
[08:24:19] norc: Waldi_: Would you like an honest answer?
[08:24:33] waldi_: norc: yeah please tell me if i do something wrong
[08:24:54] norc: Waldi_: Use unobstrusive javascript. It not only is much better design wise, you also won't have such issues.
[08:24:59] rvanlieshout: Waldi_: it's not that common to use js responses anymore
[08:25:07] rvanlieshout: like what norc just wrote in other words :)
[08:27:53] MartinElvar: has joined #RubyOnRails
[08:28:17] bhaveshletter: norc: May be it is bcoz POST request
[08:28:23] sevenseacat: rendering a view does not change your URL.
[08:28:59] norc: sevenseacat: Whenever my controller flows into that "render :new" - my URL bar changes, and I don't have any custom JS running there.
[08:29:09] helpa: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[08:29:19] norc: Oh sorry, thought I had pastied it.
[08:30:02] norc: http://pastie.org/10560048
[08:30:04] norc: Line #18
[08:30:09] srinidhi: has joined #RubyOnRails
[08:30:22] sevenseacat: ok, so thats the create action of a controller
[08:30:27] sevenseacat: what URL does that action correspond to?
[08:30:39] sevenseacat: (check your rake routes)
[08:30:55] waldi_: norc rvanlieshout ok then how would you do this? i'm totally confused right now about what would be best practive to make my modal new/edit forms..
[08:30:56] norc: /call_surveys
[08:30:58] norc: I see. Mmm
[08:31:07] nettoweb: has joined #RubyOnRails
[08:32:52] norc: sevenseacat: http://pastie.org/10560052
[08:32:57] norc: These are the corresponding routes.
[08:33:27] norc: So why does the URL change to /call_surveys in the first place? Is that because of the POST request?
[08:33:42] sevenseacat: because thats what your form submits to.
[08:34:41] norc: That makes sense I guess
[08:35:10] chipotle: has joined #RubyOnRails
[08:37:10] norc: sevenseacat: Ah somehow it actually makes sense. Just not pretty to have the URL change, when the user thinks he is still at the same page again.
[08:37:35] sevenseacat: i dont think the user cares what the URL is.
[08:37:41] sevenseacat: unless theyre typing it in
[08:38:50] norc: Fair enough. Thanks for your assistance.
[08:40:19] Ergo: has joined #RubyOnRails
[08:40:44] rgrmatt: has joined #RubyOnRails
[08:41:10] bruno-: has joined #RubyOnRails
[08:41:16] baweaver: has joined #RubyOnRails
[08:41:52] tbuehlmann: I don't care the URL too much either, but some people really do. I think mozilla wanted to hide the address bar completely after visiting a webpage, iirc
[08:42:08] tbuehlmann: norc, you could also be ajaxy about the form, that way the URL would stay the same
[08:42:19] bmalum: has joined #RubyOnRails
[08:43:07] leehambley: has joined #RubyOnRails
[08:45:39] mghaig: has joined #RubyOnRails
[08:46:32] darrencauthon: has joined #RubyOnRails
[08:49:39] jsrn_: has joined #RubyOnRails
[08:52:00] norc: tbuehlmann: Honestly I like that way of thinking, regarding hiding the address bar
[08:52:23] axsuul_: has joined #RubyOnRails
[08:53:50] tbuehlmann: I like catching a glimpse about the webpage's routing design and things
[08:53:59] beast: has joined #RubyOnRails
[08:54:43] annlewis: has joined #RubyOnRails
[08:55:47] moei: has joined #RubyOnRails
[08:58:07] marr: has joined #RubyOnRails
[08:58:18] doge__: has joined #RubyOnRails
[08:58:39] norc: tbuehlmann: Well, there is always the development tools. :)
[09:01:38] artto: has joined #RubyOnRails
[09:02:08] yoongkang: has joined #RubyOnRails
[09:06:26] pimpin: has joined #RubyOnRails
[09:10:46] dalpo: has joined #RubyOnRails
[09:11:19] Pumukel: has joined #RubyOnRails
[09:11:41] Spami: has joined #RubyOnRails
[09:12:39] stesind: has joined #RubyOnRails
[09:13:51] moeabdol: has joined #RubyOnRails
[09:16:31] pimpin: has joined #RubyOnRails
[09:17:20] yardenbar: has joined #RubyOnRails
[09:20:46] pimpin: has joined #RubyOnRails
[09:22:01] moeabdol: has joined #RubyOnRails
[09:24:46] sinkensabe: has joined #RubyOnRails
[09:31:39] htmldrum: has joined #RubyOnRails
[09:32:42] defsdoor: has joined #RubyOnRails
[09:33:58] freezevee: has joined #RubyOnRails
[09:34:08] simplyianm: has joined #RubyOnRails
[09:35:30] teclator: has joined #RubyOnRails
[09:36:16] Oog: has joined #RubyOnRails
[09:37:08] kimegede: has joined #RubyOnRails
[09:37:19] vigintas: has joined #RubyOnRails
[09:39:33] aevitas: has joined #RubyOnRails
[09:42:11] rgrmatt: has joined #RubyOnRails
[09:42:12] bruno-: has joined #RubyOnRails
[09:42:13] baweaver: has joined #RubyOnRails
[09:47:19] darrencauthon: has joined #RubyOnRails
[09:47:26] leehambley: has joined #RubyOnRails
[09:50:02] pimpin: has joined #RubyOnRails
[09:50:27] Z00t: has joined #RubyOnRails
[09:50:33] tetraktys: has joined #RubyOnRails
[09:51:23] aevitas_: has joined #RubyOnRails
[09:51:54] allcentu1: has joined #RubyOnRails
[09:52:51] nfk|laptop: has joined #RubyOnRails
[09:52:54] gin: has joined #RubyOnRails
[09:52:56] gin: has left #RubyOnRails: ()
[09:54:36] xcesariox: has joined #RubyOnRails
[09:54:37] goldbug: has joined #RubyOnRails
[09:54:57] goldbug: Morning all.
[09:55:04] goldbug: Morning rvanlieshout - hope you've had a restful weekend (;
[09:55:24] annlewis: has joined #RubyOnRails
[09:56:57] krz: has joined #RubyOnRails
[09:57:03] cheeti: has joined #RubyOnRails
[09:57:55] Peg-leg: has joined #RubyOnRails
[09:58:35] cheeti: hi, i used carrierwave to save file in application how to save this file in another application on button click?
[09:58:55] rvanlieshout: hi there, goldbug
[09:59:03] rvanlieshout: and it was. Did you get things solved?
[09:59:17] trosborn: has joined #RubyOnRails
[10:00:18] SteenJobs: has joined #RubyOnRails
[10:01:05] goldbug: Not quite. I'm stuck on an undefined method `language` error (from PeopleController).
[10:02:41] rvanlieshout: can you gist what you have again?
[10:02:57] goldbug: Yep, here it is: https://gist.github.com/classicgoldbug/dd0f0250d2900b9d84a8 - I think it has to do with the @language = params[:language] line
[10:03:10] goldbug: Probably because language isn't a model parameter?
[10:03:15] rvanlieshout: where does it fail?
[10:04:49] goldbug: Here's the full error: https://gist.github.com/classicgoldbug/da62e57df98b6635c0e3
[10:05:26] rvanlieshout: what's on line 12 of your form?
[10:05:39] goldbug: <%= content_tag :div, render(partial: 'name_fields', locals: { f: f, locale: f.object.language || :en }), id: :name_fields, data: { path: (f.object.new_record? ? name_fields_people_path : name_field_person_path(f.object)) } %>
[10:06:04] rvanlieshout: ah. the f.object.language isn't there
[10:06:07] rvanlieshout: that should be @language then
[10:07:27] goldbug: Ahh yes, that fixed it. (Now onto the next error q: )
[10:07:36] goldbug: How did you know to look at line 12 of the form??
[10:07:50] rvanlieshout: that full stack trace shows that
[10:08:11] rhizome: app/views/people/_form.html.erb:12
[10:08:29] laravel: has joined #RubyOnRails
[10:08:36] goldbug: Useful to know (:
[10:10:09] spiman: has joined #RubyOnRails
[10:10:53] Tref: has joined #RubyOnRails
[10:12:15] MartinEl_: has joined #RubyOnRails
[10:13:53] ubersapiens: has joined #RubyOnRails
[10:15:34] spiman: hello, i recently updated an app of mine from rails 3.2 to rails 4 and then rails 4.1 and I noticed that the .includes(<assoc_name_symbol>) call has changed. While this https://gist.github.com/spiman/a9b2f454c8f0703b4b79 worked in 3.2, it no longer adds the users table to the FROM clause. Anyone know what's the rails 4 best practices for such a query?
[10:16:12] suchness_: has joined #RubyOnRails
[10:16:25] rodfersou: has joined #RubyOnRails
[10:16:50] ayonkhan: has joined #RubyOnRails
[10:21:31] rarruda: has joined #RubyOnRails
[10:23:39] rhizome: spiman: gotta use the table name. plural.
[10:24:48] mices: if i have "namespace :admin do" in my routes does that mean i'm gonna have to create namespace/<controller> for each resource listed because i don't have any yet
[10:24:53] goldbug: rvanlieshout (and/or others): Any idea why this would be returning "language"=>"AZ" instead of :AZ? <%= select_tag 'Languages', options_from_collection_for_select(@languages, 'first'.to_sym, 'last'), id: 'language_select' %>
[10:25:27] universa1: goldbug: because forms don't send symbols, but strings.
[10:25:34] spiman: rhizome: as a symbol? still won't work! (if i change the includes call to joins it works but i'm just wondering how and why it changed)
[10:25:59] suchness_: mices: One namespace, many controllers
[10:26:08] elaptics: mices: no, you don't have to
[10:26:08] universa1: spiman: joins(:whatever) -- includes was never guarrenteed to do a join
[10:26:08] goldbug: universa1: That'd explain it!
[10:26:31] elaptics: mices: that's just for creating the routes - you can specify in the routes that the controllers are located elsewhere
[10:26:39] suchness_: mices: For the sake of simplicity and the fact that you are just starting out, and it's probably what you want, yes you do.
[10:26:47] mices: suchness_: so i have to create the admin directory
[10:26:51] elaptics: mices: but you'd be better to keep it simple and have them mirror each other
[10:26:57] n1ck7: has joined #RubyOnRails
[10:27:08] mices: elaptics: mirror each other?
[10:27:34] simplyianm: has joined #RubyOnRails
[10:27:37] elaptics: mices: if you have an admin namespace in your routes, then have an admin directory in your controllers directory and create the module as part of that
[10:27:39] spiman: @universa1 so includes is only used to avoid the N+1 query problem when i access association attributes?
[10:27:45] elaptics: mices: e.g. Admin::ThingsController
[10:28:14] universa1: spiman: basically yes.
[10:29:05] ldnunes: has joined #RubyOnRails
[10:29:12] universa1: spiman: !associations
[10:29:12] helpa: spiman: http://guides.rubyonrails.org/association_basics.html - Active Record Association Basics by Mike Gunderloy
[10:29:34] spiman: @universa1 ok that's great, i'll have to actually think before choosing includes or joins from now on :D
[10:30:04] orikremer: has joined #RubyOnRails
[10:32:12] vigintas: has joined #RubyOnRails
[10:32:17] norc: has joined #RubyOnRails
[10:34:31] srinidhi: has joined #RubyOnRails
[10:34:59] bruno-: has joined #RubyOnRails
[10:37:56] johnflux: has joined #RubyOnRails
[10:37:56] johnflux: has joined #RubyOnRails
[10:38:37] freezeve1: has joined #RubyOnRails
[10:39:16] vigintas: has joined #RubyOnRails
[10:42:16] annlewis: has joined #RubyOnRails
[10:42:45] rgrmatt: has joined #RubyOnRails
[10:43:56] baweaver: has joined #RubyOnRails
[10:48:04] darrencauthon: has joined #RubyOnRails
[10:49:40] emrox: has joined #RubyOnRails
[10:52:44] emrox: has joined #RubyOnRails
[10:54:00] emrox: has joined #RubyOnRails
[10:54:41] FooMunki: has joined #RubyOnRails
[10:55:29] fgo: has joined #RubyOnRails
[10:55:46] sevenseacat: has joined #RubyOnRails
[10:56:28] krz: has joined #RubyOnRails
[10:56:33] ubersapiens: has joined #RubyOnRails
[10:57:21] xardion_: has joined #RubyOnRails
[10:57:53] antgel: has joined #RubyOnRails
[10:59:55] goldbug: Okay, so how can I convert a string from a form field to a symbol on its way to a jQuery?
[11:01:10] tbuehlmann: goldbug, why does jquery need a symbol?
[11:01:49] rvanlieshout: compare it with a string
[11:01:57] goldbug: tbuehlmann: It doesn't necessarily, but it needs to pass the symbol as a parameter to some code.
[11:02:16] bruce_lee: has joined #RubyOnRails
[11:02:16] rvanlieshout: goldbug: make that method better :)
[11:03:07] goldbug: This is where it's going: <% I18n.with_locale(@language) do %>
[11:03:25] rvanlieshout: goldbug: but i doubt that's the place where it fails
[11:03:28] gregf_: has joined #RubyOnRails
[11:03:42] LudicrousMango: has joined #RubyOnRails
[11:04:27] emrox: has joined #RubyOnRails
[11:04:38] goldbug: It seems to be, at least according to my newfound 'look at the full trace' technique of bug hunting. . .
[11:04:46] rvanlieshout: what's the exact error?
[11:05:03] goldbug: I18n::InvalidLocale ("AV" is not a valid locale): app/views/people/_name_fields.html.erb:1:in `_app_views_people__name_fields_html_erb___44882680671539718_69984646980960'
[11:05:30] emrox: has joined #RubyOnRails
[11:06:06] goldbug: :AV should be a locale symbol. "AV" isn't anything as far as I18n is concerned /:
[11:07:27] nfk|laptop: has joined #RubyOnRails
[11:07:37] Sylario: has joined #RubyOnRails
[11:08:19] zoras: has joined #RubyOnRails
[11:09:13] spiman_: has joined #RubyOnRails
[11:09:50] norc: goldbug: Sounds like an XY problem you started out with.
[11:10:02] norc: goldbug: Show us the code and a full stack trace please.
[11:11:34] iateadonut: has joined #RubyOnRails
[11:13:32] rvanlieshout: goldbug: .to_sym ?
[11:15:32] mwd2000: has joined #RubyOnRails
[11:15:46] goldbug: rvanlieshout: That's what I was trying but I can't .to_sym it in the form, and then of course the jQuery picks it up straight away as a string value.
[11:16:55] rvanlieshout: jquery is not related to this
[11:17:02] rvanlieshout: it's a server only thing
[11:18:05] goldbug: Here's latest version of the code plus error message: https://gist.github.com/classicgoldbug/dd0f0250d2900b9d84a8
[11:19:07] stamina: has joined #RubyOnRails
[11:19:21] goldbug: The messy answer seems to be to append ":" to the front of the string being sent over.
[11:19:22] rvanlieshout: goldbug: you can try locale.to_sym there
[11:19:33] rvanlieshout: prepending : doesn't make it a symbol
[11:19:37] rvanlieshout: lunch. back in a while
[11:20:23] rickmasta: has joined #RubyOnRails
[11:23:01] nertzy2: has joined #RubyOnRails
[11:23:06] Tref: has joined #RubyOnRails
[11:23:18] nya: has joined #RubyOnRails
[11:26:44] sameerynho: has joined #RubyOnRails
[11:26:59] martin__1: has joined #RubyOnRails
[11:28:02] mghaig: has joined #RubyOnRails
[11:33:53] CodingWolf: has joined #RubyOnRails
[11:39:55] jrhorn: has joined #RubyOnRails
[11:40:23] norc: goldbug: I recommend you learn some of the basics, like what Symbols are. :)
[11:44:43] baweaver: has joined #RubyOnRails
[11:45:48] shashin: has joined #RubyOnRails
[11:47:06] maxz: has joined #RubyOnRails
[11:47:54] Z00t: has joined #RubyOnRails
[11:47:59] annlewis: has joined #RubyOnRails
[11:48:49] darrencauthon: has joined #RubyOnRails
[11:48:56] adre: has joined #RubyOnRails
[11:50:12] artto: has joined #RubyOnRails
[11:51:48] SteenJobs: has joined #RubyOnRails
[11:59:27] suchness_: has joined #RubyOnRails
[12:02:16] Tref: has joined #RubyOnRails
[12:02:37] suchness_: I have a model "attendance". an offer has many offer::attendances, a meeting has many organiser::attendances. I want an active record query like such: meeting.attendances, and I want this to get me all the attendances plus all the offer attendances. (organiser::attendance and offer::attendance both subclass meeting::attendance)
[12:02:45] ayonkhan_: has joined #RubyOnRails
[12:03:54] dagen: has joined #RubyOnRails
[12:05:07] leehambley: has joined #RubyOnRails
[12:07:57] alienaut: has joined #RubyOnRails
[12:10:11] qejk: has joined #RubyOnRails
[12:11:22] flip_digits: has joined #RubyOnRails
[12:11:36] renews: has joined #RubyOnRails
[12:12:48] njero: has joined #RubyOnRails
[12:12:59] chipotle: has joined #RubyOnRails
[12:13:00] moeabdol: has joined #RubyOnRails
[12:14:36] ismaelga: has joined #RubyOnRails
[12:15:09] njero: hey.. Is there a way to add unique constrain with only date part of datetime?
[12:15:55] dagen: I'm trying to do the Search for the pool of some misc numbers... to be able to choose from a pool of numbers some by the mask in several ways. For example i have three number 12300022000 13200033001 987022002233 - how can I do the mask for search to get back the search result with numbers with mask: ???xxxyyxx? ?
[12:17:08] dagen: now I have the working code of search that find only for search request trough where('numbers LIKE ?', "%#{search}%")
[12:17:53] dagen: and if i fill search request with 2233 i got the last number in db
[12:18:16] banister: has joined #RubyOnRails
[12:18:49] dagen: but I want to do the some filter wich can return numbers by mask: ???xxyyxxzzz - for example 123002200444
[12:18:58] njero: dagen: did u try regexp
[12:19:25] dagen: hm, I try to understand the model of this request and answer
[12:19:42] dagen: I understand that regexp is way for a solving
[12:19:57] dagen: but I can't understand conept of this decision
[12:20:12] dagen: please help
[12:20:40] dagen: I think there'll be a solved task like mine
[12:21:43] daivyk: has joined #RubyOnRails
[12:21:45] Scripore: has joined #RubyOnRails
[12:22:28] nya: has joined #RubyOnRails
[12:22:54] TPBallbag: has joined #RubyOnRails
[12:24:13] workmad3: has joined #RubyOnRails
[12:24:14] doodlehaus: has joined #RubyOnRails
[12:25:24] Mia: has joined #RubyOnRails
[12:25:24] Mia: has joined #RubyOnRails
[12:27:57] dagen: n_e_o where I must use regexp?
[12:29:34] njero: dagen: on the db search query. Do you have multiple masks?
[12:30:12] dagen: not yet, only in idea :)
[12:30:33] sinkensabe: has joined #RubyOnRails
[12:30:41] dagen: how can I do this multiply masks? where can I read about this with examples
[12:32:08] njero: dagen: no idea. if for regexp there will be lot of resource.. Just google and u can use regex in where.. it's simple as that
[12:33:06] dagen: Did you mean where('numbers LIKE ?', some regexp)?
[12:33:32] njero: dagen: if u have multiple masks, assign different regex for each (may in db), and find logic to choose which mask
[12:33:51] njero: dagen: nope.. lol .. there is regex func for mysql
[12:34:02] darklight: has joined #RubyOnRails
[12:34:03] dagen: my db is posgresql
[12:34:24] njero: dagen: like.. Drawing.where("drawing_number REGEXP ?", 'A\d{4}')
[12:34:34] njero: it'll also have
[12:34:44] dagen: i'll try it thanks
[12:35:08] sinkensabe: has joined #RubyOnRails
[12:35:31] jrhorn: has joined #RubyOnRails
[12:37:25] suchness: Can anyone help me with this active record relationship: http://pastie.org/private/7ln7rey7umalbkhxfx779g I am trying to define a scope or a has many relationship that combines two other has_many relationships
[12:37:37] suchness: ^ crossposted
[12:39:17] pydave6367: has joined #RubyOnRails
[12:41:12] njero: suchness: checkout http://stackoverflow.com/questions/5856838/scope-with-join-on-has-many-through-association
[12:42:35] ismaelga: has joined #RubyOnRails
[12:44:12] rgrmatt: has joined #RubyOnRails
[12:45:05] jrhorn: has joined #RubyOnRails
[12:45:32] baweaver: has joined #RubyOnRails
[12:48:45] annlewis: has joined #RubyOnRails
[12:49:34] darrencauthon: has joined #RubyOnRails
[12:50:02] Sigfrid: has joined #RubyOnRails
[12:50:48] pwnd_nsfw: has joined #RubyOnRails
[12:51:09] Pazician: has joined #RubyOnRails
[12:51:38] jrhorn: has joined #RubyOnRails
[12:52:08] centrx: has joined #RubyOnRails
[12:54:29] suchness: n_e_o: I don't think I am following how to apply that to my situation
[12:56:25] User458764: has joined #RubyOnRails
[12:58:32] krz: has joined #RubyOnRails
[12:59:04] jkamenik: has joined #RubyOnRails
[12:59:29] suchness: n_e_o: Actually, I think I figured it out and missed something entirely!
[13:00:30] artto: has joined #RubyOnRails
[13:00:58] A124: has joined #RubyOnRails
[13:03:07] ismaelga: has joined #RubyOnRails
[13:04:02] maxz: has joined #RubyOnRails
[13:05:08] dagen: n_e_o, I tried this construction of search code in my model: where('numbers LIKE ? AND numbers REGEXP ?', "%#{search}%", 'A\d{2}') ...but have an error: PG::SyntaxError: ERROR: syntax error at or near "REGEXP" LINE 1: ...* FROM "numbers" WHERE (number LIKE '%000%' AND number REGEXP '%A... ^ : SELECT "numbers".* FROM "numbers" WHERE (number LIKE '%000%' AND number REGEXP '%Ad{2}%') ORDER
[13:05:08] dagen: BY id desc
[13:05:26] orikremer: has joined #RubyOnRails
[13:06:58] allcentu1: has joined #RubyOnRails
[13:07:55] njero: dagen: postgres has different syntax.. check http://www.postgresql.org/docs/9.0/static/functions-matching.html
[13:08:24] njero: suchness: i did nt get u
[13:13:29] renews: has joined #RubyOnRails
[13:13:43] broman: has joined #RubyOnRails
[13:14:16] nzst: has joined #RubyOnRails
[13:14:25] nzst: has left #RubyOnRails: ()
[13:14:59] suchness: has left #RubyOnRails: ()
[13:15:30] tt3om: has joined #RubyOnRails
[13:16:12] mghaig: has joined #RubyOnRails
[13:17:29] qwerfff: has joined #RubyOnRails
[13:25:01] squiercaster: has joined #RubyOnRails
[13:25:36] freezevee: has joined #RubyOnRails
[13:25:41] quazimodo: has joined #RubyOnRails
[13:30:40] yardenbar: has joined #RubyOnRails
[13:30:49] yoongkang: has joined #RubyOnRails
[13:30:59] red_horned_rihno: has joined #RubyOnRails
[13:33:44] mbuf: has joined #RubyOnRails
[13:34:00] mbuf: is there a recommended way for a Rails application to log to /var/log?
[13:34:14] moeabdol: has joined #RubyOnRails
[13:35:28] zoras: has joined #RubyOnRails
[13:36:42] red_horned_rihno: has joined #RubyOnRails
[13:37:33] KorriX: has joined #RubyOnRails
[13:38:20] red_horned_rihno: has joined #RubyOnRails
[13:39:11] red_horned_rihno: has joined #RubyOnRails
[13:39:23] prasselpikachu: has joined #RubyOnRails
[13:41:29] Tref: has joined #RubyOnRails
[13:42:18] nonmadden: has joined #RubyOnRails
[13:43:00] ewnd9: has joined #RubyOnRails
[13:43:05] bueryer: has joined #RubyOnRails
[13:43:10] nonmadden: has joined #RubyOnRails
[13:43:17] bueryer: has left #RubyOnRails: ()
[13:44:26] mag42c: has joined #RubyOnRails
[13:45:34] acti0nman: has joined #RubyOnRails
[13:45:57] jsrn_: has joined #RubyOnRails
[13:46:03] Megamos: has joined #RubyOnRails
[13:46:17] workmad3: mbuf: I'd suggest using syslog or potentially have something like relp process the rails log files from where they normally live
[13:46:18] baweaver: has joined #RubyOnRails
[13:47:33] red_horned_rihno: has joined #RubyOnRails
[13:48:26] Pro|: where does rails convert json to object
[13:48:58] ddv: Pro|: step through the code with byebug or something?
[13:49:23] bruno-: has joined #RubyOnRails
[13:49:24] norc: Pro|: http://api.rubyonrails.org/classes/ActiveSupport/JSON.html
[13:49:26] Justin_: has joined #RubyOnRails
[13:49:31] annlewis: has joined #RubyOnRails
[13:49:52] Pro|: norc: thank you
[13:50:20] Justin_: has left #RubyOnRails: ()
[13:50:34] eXist: has joined #RubyOnRails
[13:50:35] hahuang65: has joined #RubyOnRails
[13:51:02] mbuf: workmad3, I currently use LogStashLogger
[13:51:38] goodcodeguy: has joined #RubyOnRails
[13:53:20] mbuf: workmad3, there is a type: :syslog option for LogStashLogger; shall try that; thanks!
[13:54:50] skmp_: has joined #RubyOnRails
[13:54:53] mjc_: has joined #RubyOnRails
[13:54:53] dotty: has joined #RubyOnRails
[13:55:02] MiracleBlue: has joined #RubyOnRails
[13:55:05] ELCALOR: has joined #RubyOnRails
[13:55:08] danlucraft: has joined #RubyOnRails
[13:55:23] Hosh: has joined #RubyOnRails
[13:55:29] neilfse: has joined #RubyOnRails
[13:55:30] tvw: has joined #RubyOnRails
[13:55:31] PlasmaStar: has joined #RubyOnRails
[13:55:36] FooMunki: has joined #RubyOnRails
[13:55:39] nyandoge: has joined #RubyOnRails
[13:56:26] sikachu: has joined #RubyOnRails
[13:56:39] machty: has joined #RubyOnRails
[13:56:44] corioliss: has joined #RubyOnRails
[13:57:32] Olipro: has joined #RubyOnRails
[14:00:25] jrhorn: has joined #RubyOnRails
[14:00:56] someish: has joined #RubyOnRails
[14:07:32] sevenseacat: has joined #RubyOnRails
[14:08:31] Tref: has joined #RubyOnRails
[14:10:15] jeremieberduck: has joined #RubyOnRails
[14:10:41] centrx: has joined #RubyOnRails
[14:10:57] mghaig: has joined #RubyOnRails
[14:14:00] orolo: has joined #RubyOnRails
[14:14:13] ramortegui: has joined #RubyOnRails
[14:14:29] roxtrongo: has joined #RubyOnRails
[14:15:00] roxtrongo: has joined #RubyOnRails
[14:16:38] annlewis: has joined #RubyOnRails
[14:16:44] roxtrongo: has joined #RubyOnRails
[14:16:50] sankaber: has joined #RubyOnRails
[14:17:14] jeremieberduck: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[14:19:12] allcentu1: has joined #RubyOnRails
[14:20:56] sankaber: has joined #RubyOnRails
[14:23:47] nertzy2: has joined #RubyOnRails
[14:23:51] uri: has joined #RubyOnRails
[14:25:07] atomical: has joined #RubyOnRails
[14:26:53] allcentu1: has joined #RubyOnRails
[14:28:21] surrealanalysis: has joined #RubyOnRails
[14:30:24] atomical: has joined #RubyOnRails
[14:30:30] youngbaks: has joined #RubyOnRails
[14:31:19] yoongkang: has joined #RubyOnRails
[14:34:29] Cervajz__: has joined #RubyOnRails
[14:34:37] atomical: has joined #RubyOnRails
[14:34:45] SylarRuby: has joined #RubyOnRails
[14:38:19] simplyianm: has joined #RubyOnRails
[14:38:36] SylarRuby: has joined #RubyOnRails
[14:39:00] qwerfff: has joined #RubyOnRails
[14:39:05] Criten_: has left #RubyOnRails: ()
[14:39:28] roxtrongo: has joined #RubyOnRails
[14:42:08] Palsson: has joined #RubyOnRails
[14:44:15] darrencauthon: has joined #RubyOnRails
[14:45:59] tetraktys: has joined #RubyOnRails
[14:46:53] kaspergrubbe: has joined #RubyOnRails
[14:47:06] baweaver: has joined #RubyOnRails
[14:47:43] rdavila: has joined #RubyOnRails
[14:48:21] umgrosscol: has joined #RubyOnRails
[14:48:44] ayonkhan: has joined #RubyOnRails
[14:49:19] drewdfw_: has joined #RubyOnRails
[14:49:36] northfurr: has joined #RubyOnRails
[14:50:50] Spami: has joined #RubyOnRails
[14:52:30] maxz: has joined #RubyOnRails
[14:52:51] a1fa: good day
[14:53:07] a1fa: can someone spot check me on strong params? i am getting ForbiddenAttributeErrror
[14:53:14] a1fa: https://gist.github.com/anonymous/ffd247456c93cdd7dfed
[14:54:16] universa1: a1fa: a little effort in formatting that in a readable way would go a long way in getting someone to help you.
[14:54:36] universa1: a1fa: !gist-usage
[14:54:36] helpa: a1fa: How to use Gist properly: https://github.com/radar/guides/blob/master/using-gist.markdown
[14:55:22] universa1: full stack trace.
[14:55:54] arthurix: has joined #RubyOnRails
[14:58:47] njero: has joined #RubyOnRails
[14:58:58] ismaelga: has joined #RubyOnRails
[14:59:27] HalcyonicStorm: has joined #RubyOnRails
[14:59:58] a1fa: universa1: https://gist.github.com/doekerqhtv/fd983bc0c63b33d006a1
[15:00:42] Z00t: has joined #RubyOnRails
[15:04:21] jkamenik1: has joined #RubyOnRails
[15:05:14] Megamos: Where is the normal place to add association_id params when creating new resource?
[15:05:59] ddv: Megamos: association_id params?
[15:06:02] lacrymology: has joined #RubyOnRails
[15:06:21] Megamos: Yeh sorry saw it wasn't so clear.
[15:07:06] Megamos: Got Local model that belongs to User model. When creating a new Local. How do I pass on that it belongs to a specific User?
[15:07:12] arup_r: has joined #RubyOnRails
[15:08:24] arup_r: Any body here want me to help Mysql .. Following http://blog.joefallon.net/2013/10/install-mysql-on-mac-osx-using-homebrew/ .. but not able to install .. lot of errors. Want to clean and fresh install. Or give me some fresh instructions..
[15:08:28] Megamos: Tried in ctrl and in view. Can't get params[:user_id] assigned and sent with SQL request
[15:09:08] arup_r: Can you see me ?
[15:09:15] centrx: arup_r, Yes, you look amazing
[15:09:26] arup_r: ok.. thanks
[15:09:37] stannard: has joined #RubyOnRails
[15:10:15] SteenJobs: has joined #RubyOnRails
[15:10:47] a1fa: https://gist.github.com/anonymous/ffd247456c93cdd7dfed | halp !? :P
[15:11:25] jkamenik: has joined #RubyOnRails
[15:11:25] jshepherd: has joined #RubyOnRails
[15:12:04] LudicrousMango: has joined #RubyOnRails
[15:12:24] someish: has joined #RubyOnRails
[15:13:47] dmz: has joined #RubyOnRails
[15:13:47] dmz: has joined #RubyOnRails
[15:15:39] ddv: Megamos: not needed if you're using form_for/fields_for
[15:16:16] smathy: has joined #RubyOnRails
[15:16:29] ddv: Megamos: but maybe I'm not understanding you question :)
[15:17:19] lacrymology: has joined #RubyOnRails
[15:17:52] User458764: has joined #RubyOnRails
[15:19:00] rickmasta: has joined #RubyOnRails
[15:19:12] Zadrel: has joined #RubyOnRails
[15:19:23] Megamos: ddv: :) maybe not. Hopfully I found the answer. Was best to do it in the ctrl in the style of: @local = current_user.locals.build(params[:locals_params])
[15:19:46] arthurix_: has joined #RubyOnRails
[15:19:52] banister: has joined #RubyOnRails
[15:20:43] alienaut: has joined #RubyOnRails
[15:22:37] a1fa: dmz: hey bud :P
[15:23:10] adavia: has joined #RubyOnRails
[15:23:44] Megamos: ddv: Yes, seems like you can do it in the form to. Ctrl should be safer though.
[15:23:57] ddv: Megamos: Ctrl?
[15:24:00] ddv: control?
[15:24:01] annlewis: has joined #RubyOnRails
[15:24:09] Megamos: controller :) yes
[15:24:37] dagen: when I try to import CSV file 400000lines into DB trought my site it's timedout... how can I split the process of importing the data to get a correct result
[15:24:46] DelDotB: has joined #RubyOnRails
[15:24:53] stannard_: has joined #RubyOnRails
[15:25:12] w0rd-driven: has joined #RubyOnRails
[15:26:08] tubbo: dagen: you using postgresql?
[15:26:54] tubbo: dagen: you can use this command to copy all the rows from your CSV file directly into a database table: http://www.postgresql.org/docs/9.4/static/sql-copy.html
[15:27:32] mghaig: has joined #RubyOnRails
[15:27:49] dagen: tubbo but I need to import trought site not trought console
[15:28:44] tubbo: dagen: maybe you need to be a little more specific about your problem in order to get the solution you require.
[15:29:06] matthewd: dagen: Upload the file via the site, then do the import in the background (via ActiveJob, for example)
[15:30:01] dagen: matthewd where can I read about this way?
[15:30:07] tubbo: dagen: !activejob
[15:30:07] helpa: dagen: http://guides.rubyonrails.org/active_job_basics.html
[15:31:25] doodlehaus: has joined #RubyOnRails
[15:33:06] SylarRuby: has joined #RubyOnRails
[15:33:41] polishdub: has joined #RubyOnRails
[15:33:58] yoongkang: has joined #RubyOnRails
[15:34:42] dopie: has joined #RubyOnRails
[15:35:34] axl_: has joined #RubyOnRails
[15:38:21] ruurd: has joined #RubyOnRails
[15:39:44] w0rd-driven: has joined #RubyOnRails
[15:39:44] a1fa: https://gist.github.com/anonymous/ffd247456c93cdd7dfed | halp !? :P I dont think it likes :login
[15:39:46] gentlemaverick: has joined #RubyOnRails
[15:39:51] a1fa: Is :login reserved?
[15:40:01] ejimz: has joined #RubyOnRails
[15:40:06] SylarRuby: has joined #RubyOnRails
[15:41:02] darkxploit: has joined #RubyOnRails
[15:41:16] guillaume-rb: has joined #RubyOnRails
[15:41:17] sevenseacat: a1fa: gist the full error with the code, we don't even know if that method is being called
[15:41:34] a1fa: i thought i did
[15:41:46] a1fa: oh wrong link
[15:41:56] a1fa: sevenseacat: https://gist.github.com/doekerqhtv/fd983bc0c63b33d006a1
[15:42:28] sevenseacat: a1fa: right, that code says :roles_mask, not :roles
[15:44:16] sevenseacat: you're using cancan - that code isnt getting called at all
[15:44:31] sevenseacat: you have a load_and_authorize_resource that is building its own account and trying to save it
[15:44:39] sevenseacat: so much for full code
[15:44:57] treehug88: has joined #RubyOnRails
[15:45:10] annlewis: has joined #RubyOnRails
[15:45:22] sevenseacat: its been so long since I've seen a project using cancan I forgot about that gotcha
[15:45:48] dragcounter: has joined #RubyOnRails
[15:45:58] kies: has joined #RubyOnRails
[15:46:21] Guest20998: has left #RubyOnRails: ()
[15:46:38] thither: has joined #RubyOnRails
[15:46:38] matthewd: You almost certainly want cancancan, I think
[15:46:40] SteveC: has joined #RubyOnRails
[15:47:25] thither: Anyone know why this will render when in html format, but when the request is for a pdf it complains that there's no template? http://pastie.org/private/kciyuzyxamw9tygbwvmjnq
[15:47:51] baweaver: has joined #RubyOnRails
[15:47:54] SteveC: has left #RubyOnRails: ()
[15:48:03] sevenseacat: thither: !debug
[15:48:03] helpa: thither: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[15:48:07] tubbo: thither: do you have the :pdf type set up in mime_types?
[15:48:08] sevenseacat: wheres the error?
[15:48:12] thither: tubbo: yes
[15:48:20] flashpoint9: has joined #RubyOnRails
[15:48:41] a1fa: sevenseacat: that sucks
[15:48:48] a1fa: sevenseacat: how do i work around that?
[15:48:49] thither: "Missing template templates/render_blank with {:locale=>[:en], :formats=>[:pdf], ... }"
[15:48:59] sevenseacat: a1fa: don't use load_and_authorize_resource for that action
[15:49:08] sevenseacat: alternatively, don't use an out of date and unmaintained gem
[15:49:13] smathy: thither, :template not :pdf
[15:49:15] thither: I have been able to render pdfs previously, but it doesn't like the inline specification for pdfs now
[15:49:19] a1fa: sevenseacat: ;(
[15:49:52] uri: has left #RubyOnRails: ()
[15:50:20] matthewd: a1fa: cancancan -- cancan, but maintained
[15:50:35] thither: Oh to make things clear the template here isn't a rails template - so maybe some namespace collision
[15:50:46] thither: It's a liquid template for printed forms
[15:51:26] kp666: has joined #RubyOnRails
[15:53:36] madmav: has joined #RubyOnRails
[15:53:42] dagen: !pastebin
[15:54:46] w0rd-driven: has joined #RubyOnRails
[15:56:47] mary5030: has joined #RubyOnRails
[15:56:53] dagen: tubbo, matthewd: I read about ActiveJob and add config. to application.rb and create /hob/import_csv_job.rb. But now I stucked... I have this code to import my csv to DB: http://pastebin.com/MnZjYEvy ... and now I tried to understand how must I use this code with ActiveJob
[15:56:56] dagen: please help
[15:56:57] MyCodeSucks: has joined #RubyOnRails
[15:57:30] mary5030: has joined #RubyOnRails
[15:57:45] dagen: http://pastie.org/10560766
[15:58:22] tom_ilsinszki: has joined #RubyOnRails
[16:00:27] zpe: has joined #RubyOnRails
[16:00:43] filipechagas: has joined #RubyOnRails
[16:01:19] naftilos76: has joined #RubyOnRails
[16:02:45] arup_r: has joined #RubyOnRails
[16:03:14] naftilos76: has joined #RubyOnRails
[16:03:14] eXist: has joined #RubyOnRails
[16:03:26] dagen: how to initiate teh ActiveJob and my code together?
[16:03:52] tubbo: dagen: you could basically replace lines 4-8 in that snippet with a call to YourActiveJob.perform_later
[16:03:53] w0rd-driven: has joined #RubyOnRails
[16:04:40] njero: guys... don't be angry.. is helpa bot or real man?
[16:04:48] naftilos76: has joined #RubyOnRails
[16:05:21] tubbo: n_e_o: lol
[16:05:32] njero: sry.. my bad.. because i saw same sentence earlier also
[16:05:33] tubbo: glad you're not the one administering the Turing Test
[16:05:50] matthewd: And just to prove it...
[16:05:52] helpa: We're not all guys here - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
[16:06:28] njero: seriously?... i saw this too
[16:06:43] njero: helpa: i really think of u a bot
[16:07:11] Z00t: has joined #RubyOnRails
[16:07:14] cschneid_: has joined #RubyOnRails
[16:07:43] naftilos76: has joined #RubyOnRails
[16:07:49] tubbo: matthewd: !bot
[16:07:52] tubbo: matthewd: !robot
[16:07:52] helpa: matthewd: http://2.bp.blogspot.com/-vjsvBsc2pPo/TdCaxuXpO3I/AAAAAAAADYI/2CNDH1oWvgw/s1600/super_8_intergalactic.png
[16:09:43] Z00t: has joined #RubyOnRails
[16:09:46] dagen: tubbo and into my job insert the import code? http://pastie.org/10560785
[16:09:49] dagen: liek this
[16:10:04] tom_ilsinszki: i'm learning about how rails serves assets and what i'm not sure about is why both of these urls work: mysite.com/assets/image.png and mysite.com/assetsimage.png? is this normal rails functionality? i know both of these urls point to the directory app/assets/images/image.png
[16:10:06] naftilos76: has joined #RubyOnRails
[16:10:14] mghaig: has joined #RubyOnRails
[16:11:07] tubbo: dagen: yes
[16:11:27] tubbo: dagen: you probably have to pass the params into there, as the job doesn't magically just know where your params came from
[16:11:31] adre: has joined #RubyOnRails
[16:11:33] dagen: hm it's not working)
[16:11:43] dagen: oh ofcourse!
[16:12:14] matthewd: dagen: You'll need to pass the filename as an argument -- not params[:file] object
[16:12:15] dagen: you telepathist
[16:12:41] dagen: i'll try it
[16:12:55] matthewd: ... and you'll actually need to do some copying, because the tempfile should disappear as soon as the request completes, likely before the job gets around to starting
[16:13:19] dmz: a1fa howdy!
[16:13:22] MyCodeSucks: Would it be incorrect to use an active job to fetch from an API every 5 mins?
[16:13:26] naftilos76: has joined #RubyOnRails
[16:13:33] matthewd: (and that obviously assumes you're running entirely on a single machine, but that's a problem for the future)
[16:13:39] IrishGringo: has joined #RubyOnRails
[16:13:41] dagen: can I do the Job immediately?
[16:13:53] sinkensabe: has joined #RubyOnRails
[16:13:59] dagen: without delay
[16:14:03] dagen: but in background
[16:14:08] a1fa: dmz: long time no see
[16:14:30] matthewd: dagen: It'll start basically immediately... you just can't guarantee it'll have read the file before it gets auto-deleted
[16:14:44] _lazarevsky: has joined #RubyOnRails
[16:15:03] naftilos76_: has joined #RubyOnRails
[16:15:04] sinkensa_: has joined #RubyOnRails
[16:15:15] johnflux: has joined #RubyOnRails
[16:15:23] dagen: hi _lazarevsky
[16:15:26] arthurix: has joined #RubyOnRails
[16:15:31] _lazarevsky: have you ever worked on a rails app which communicated with an nginx server
[16:15:39] RegulationD: has joined #RubyOnRails
[16:15:40] _lazarevsky: to be honest I hadn't heard of nginx until like.. 4 hours ago
[16:15:42] dagen: matthewd hm where can I read about this?
[16:15:55] disgrntld: has joined #RubyOnRails
[16:16:02] _lazarevsky: all along I've used ember with Rails, and I've served the ember files through the rails' pipelines
[16:16:12] _lazarevsky: however now they've changed it completely and introduced ember cli
[16:16:20] _lazarevsky: and now, practically the only way to work with ember
[16:16:26] _lazarevsky: is to have a completely separate app
[16:16:31] a1fa: any of you guys running nginx+passenger
[16:16:42] _lazarevsky: which talks async to WEBrick
[16:16:50] helpa: 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.
[16:16:56] _lazarevsky: I was literally just asking about that!
[16:17:03] _lazarevsky: I mean.. I was getting there
[16:17:32] njero: helpa: i told ya.. you are a bot
[16:17:46] njero: helpa: you failed turing test
[16:17:56] tubbo: _lazarevsky: welcome to the future
[16:18:02] centrx: n_e_o, Maybe he's just not so smart and you are being mean?
[16:18:25] a1fa: _lazarevsky: heh
[16:18:31] naftilos76: has joined #RubyOnRails
[16:18:40] adre: has joined #RubyOnRails
[16:18:47] a1fa: just want to know if there is benefit to running passenger vs nginx proxy to the rails server
[16:18:51] tubbo: _lazarevsky: since you've probably missed out on the last 11 years...rails is up to v4 now, there are these things called "smartphones" that basically bring the entire internet to your pocket, and javascript is actually a real language now!
[16:18:53] njero: centrx: :|
[16:18:54] sinkensabe: has joined #RubyOnRails
[16:18:55] a1fa: besides the obvious (startup)
[16:19:12] _lazarevsky: tubbo: you shitting me
[16:19:18] _lazarevsky: tubbo: you mean.. walkman is no more?
[16:19:33] _lazarevsky: I'm sure Vanilla Ice is still killing it
[16:20:18] applegrain: has joined #RubyOnRails
[16:20:18] a1fa: he wonthe Emmys
[16:21:49] w0rd-driven: has joined #RubyOnRails
[16:21:54] naftilos76: has joined #RubyOnRails
[16:22:40] dici: has joined #RubyOnRails
[16:23:10] adre: has joined #RubyOnRails
[16:23:20] _lazarevsky: on a more serious note
[16:23:25] _lazarevsky: anyone ever used nginx with webrick
[16:23:42] _lazarevsky: a1fa: why you pushing so hard for passnger
[16:23:46] _lazarevsky: what's wrong with webrick?
[16:24:02] fryguy: webrick is terrible for production use, don't use it
[16:24:11] fryguy: it's very slow and awful at concurrency
[16:24:22] centrx: _lazarevsky, Use thin if you want something simple
[16:24:44] _lazarevsky: fryguy: I did not know that
[16:25:01] _lazarevsky: fryguy: why do you need nginx + passenger if you dont mind me asking?
[16:25:13] fryguy: _lazarevsky: you don't need nginx + passenger
[16:25:15] a1fa: _lazarevsky: i am currently using passenger
[16:25:19] fryguy: there are lots of viable alternatives
[16:25:19] a1fa: _lazarevsky: its sucks
[16:25:31] a1fa: cant you just do nginx proxy to rails server?
[16:25:53] adaedra: I personally do nginx to puma
[16:25:54] _lazarevsky: a1fa: thats what I wanna do
[16:26:13] _lazarevsky: the default rails server is webrick, no?
[16:26:13] fryguy: a1fa: you can, you just need to pick an appropriate rails server
[16:26:26] _lazarevsky: I thought passenger was its alternative
[16:26:51] a1fa: passenger is very slow to start
[16:27:09] a1fa: it takes about ~60s to launch an app, and if your app stacks, you need to dig through nginx log
[16:27:11] Cache_Money: has joined #RubyOnRails
[16:27:26] _lazarevsky: shite.. im so screwed
[16:27:28] matthewd: The default development server is webrick, because it happens to be in the ruby stdlib, so no extra dependency (and speed/concurrency/reliability isn't so important)
[16:27:30] _lazarevsky: I took on this freelance work
[16:27:40] matthewd: ACTION recommends unicorn or puma
[16:27:42] _lazarevsky: and now i'm stuck in deep shit now
[16:27:48] a1fa: outsource
[16:27:50] _lazarevsky: with all these new concepts I have never encountered
[16:29:07] matthewd: _lazarevsky: What have you worked with before?
[16:31:16] _lazarevsky: I work with ember and rails currently
[16:31:22] _lazarevsky: where ember is part of ember's assets folder
[16:31:27] _lazarevsky: and I only use one server
[16:31:39] _lazarevsky: and we use CI so i've never actually had to do manual deployment
[16:31:45] _lazarevsky: nor have I ever had to configure servers
[16:32:10] _lazarevsky: now ember requires that it runs on an nginx server and it proxies all requests for /api to a rails backend
[16:33:18] beauby: has joined #RubyOnRails
[16:34:35] lxsameer: has joined #RubyOnRails
[16:35:03] jkamenik: has joined #RubyOnRails
[16:35:23] matthewd: In this context, I guess "CI" == "some sort of automagic-deploying hosting service, like Heroku", and not what it normally means? :/
[16:36:23] _lazarevsky: matthewd: Continuous Integration
[16:36:24] dmz: lazarevsky good chance to learn :)
[16:36:57] nickenchuggets: has joined #RubyOnRails
[16:39:58] matthewd: _lazarevsky: Yeah, that's what it normally means, and doesn't imply anything about deployment to me
[16:40:19] smathy: s/ to me//
[16:40:26] _lazarevsky: dmz: I'd love to learn of course.. but I'm on a super tight deadline for a freelance gig
[16:40:29] _lazarevsky: dmz: and I'm scared shitless
[16:40:32] _lazarevsky: dmz: but thanks!
[16:43:12] dmz: well you did accept the contract...so buckle down or outsource some of your profit to someone who can do it
[16:43:16] DukeDave: Can someone just sanity check this snippet for me? :)
[16:43:16] DukeDave: https://gist.github.com/dukedave/b8e732fa47f7e731e66d
[16:43:56] raunicolae: has joined #RubyOnRails
[16:44:04] DukeDave: ACTION presumes the 'magic methods' and read/write_attribute have the same semantics
[16:44:57] polishdub: has joined #RubyOnRails
[16:45:12] raunicolae: has left #RubyOnRails: ()
[16:47:19] matthewd: dukedave: In normal/simple usage, yes, that's true. Though personally I'd go with super and a module, to handle e.g. models that are already overriding the accessors for some reason.
[16:47:43] nettoweb: has joined #RubyOnRails
[16:47:50] ldnunes: has joined #RubyOnRails
[16:47:54] [Butch]: has joined #RubyOnRails
[16:48:13] DukeDave: matthewd: ah yes, that's exactly the edge case I didn't think of, thanks :D
[16:48:15] matthewd: Also, from memory, serialized attributes might have historically returned the serialized string form there... maybe?
[16:48:24] jwaldrip: has joined #RubyOnRails
[16:48:26] applegrain: has joined #RubyOnRails
[16:48:41] baweaver: has joined #RubyOnRails
[16:48:43] matthewd: You're also missing a value parameter on the writer
[16:48:54] DukeDave: So if I put in a module, and `include`, I can just `super` inside the module version, wirte?
[16:49:11] DukeDave: matthewd: ah, oh, yes :)
[16:50:22] applegrain: has joined #RubyOnRails
[16:51:26] njero: has joined #RubyOnRails
[16:52:01] Yomero2: has joined #RubyOnRails
[16:52:19] marr: has joined #RubyOnRails
[16:52:36] treehug88: has joined #RubyOnRails
[16:52:58] rdavila: has joined #RubyOnRails
[16:54:15] annlewis: has joined #RubyOnRails
[16:55:31] a1fa: how do you access params inside a model that does not have a matching column in the db?
[16:55:58] ruurd: has joined #RubyOnRails
[16:55:59] njero: a1fa: attr_accessible
[16:56:02] a1fa: att_acc?
[16:56:06] a1fa: oo, cool thought so
[16:56:23] matthewd: a1fa: "params" and "model" don't really go together
[16:56:53] a1fa: why not?
[16:58:29] xcesariox: has joined #RubyOnRails
[16:58:55] someish: has joined #RubyOnRails
[16:59:45] pawnbox: has joined #RubyOnRails
[16:59:58] maxz: has joined #RubyOnRails
[17:00:41] smathy: a1fa, "params" is what the hash of incoming fields from an HTTP request in a Rails controller is called.
[17:01:29] smathy: a1fa, "attributes" is the word you were looking for.
[17:01:35] matthewd: It's the controller's job to coordinate the plumbing of getting things where they need to go; the model acts on data which is intrinsic to itself (and anything else comes in via arguments)
[17:02:14] a1fa: smathy: thanks. im trying to use cancancan gem; now making a page to edit/create users
[17:02:21] a1fa: i've separated "users" and "accounts"
[17:02:30] matthewd: If you have a long-lived model, IMO, it's relatively rare for it to make sense for it to have a transient attribute
[17:02:48] a1fa: i let devise ldap take care of users, and to make things simple, i created accounts model and controller to manage user editing
[17:03:24] drewdfw: has joined #RubyOnRails
[17:03:37] tubbo: has anyone taken a "data down, actions up" approach with regards to building rails views from the ground up?
[17:03:47] jahbrewski: has joined #RubyOnRails
[17:03:49] tubbo: like making all (or at least most) of your view templates logic-less
[17:04:04] tubbo: and then using JS, server-side rendering, and other solutions to populate them with data
[17:04:48] ismaelga: has joined #RubyOnRails
[17:05:25] njero: hey.. suppose if i have a polymorphic model which belongs to user. How to query to get all model records with which it has relation through polymorphic assoc?
[17:06:29] njero: i wan't to get all as records even though they belong in different models :)
[17:06:48] matthewd: n_e_o: Short answer is: you don't.
[17:07:00] njero: matthewd: oops !!
[17:07:14] matthewd: Your best option would be to define separate has_many associations for each one, then write a method which concatenates them together.
[17:08:17] arup_r: has joined #RubyOnRails
[17:08:43] smathy: n_e_o, you have other models with `belongs_to :user` in them?
[17:09:23] arup_r: Help in Mysql ? I removed everything, and did fresh install .. and getting this error: https://gist.github.com/aruprakshit/b64841e2648a23a837db Why ?
[17:09:26] njero: smathy: nope only with that polymorphic model..
[17:09:39] arup_r: Any idea what is wrong ?
[17:09:52] arup_r: following this https://gorails.com/setup/osx/10.10-yosemite#database
[17:09:56] smathy: n_e_o, the confusing part is that models aren't polymorphic, associations are. So I really don't know what you mean by "polymorphic model" ?
[17:11:52] arup_r: Why the service is disabled ?
[17:12:39] EminenceHC: has joined #RubyOnRails
[17:12:50] CodingWolf: has joined #RubyOnRails
[17:13:00] WebDevB: has joined #RubyOnRails
[17:13:08] srinidhi: has joined #RubyOnRails
[17:13:26] tubbo: arup_r: http://stackoverflow.com/questions/26334414/cant-make-postgresql-load-at-startup-in-mac-os
[17:14:15] WebDevB: Hey guys, i've got an issue with a website that currently runs Ruby on Rails... I've never worked with it myself and was wondering if you can help me out... All of a sudden we're getting error 500, nothing has changed on the server from ourside.
[17:14:26] smathy: arup_r, use the -w option for launchctl
[17:14:52] arup_r: yes.. doing.. brand new mac, got tried to install softwares lol
[17:15:09] arup_r: I forgot what and how I did 2 years back..
[17:15:10] roxtrongo: has joined #RubyOnRails
[17:15:15] WebDevB: This is the error we're getting: /home/rails/gmcc_production started on PID 13204, listening on unix:/tmp/passenger.1.0.4028/generation-23/backends/preloader.1tl3m43
[17:15:34] tubbo: i'm a big fan of https://github.com/eddiezane/lunchy too :)
[17:15:50] tubbo: WebDevB: that's not the error
[17:16:06] smathy: arup_r, nothing to do with new mac, it's because you had disabled the old mysql service, so launchctl was getting confused with the old one.
[17:16:14] tubbo: WebDevB: that's an acknowledgment that the nginx server has successfully connected to the passenger app server
[17:16:31] WebDevB: turbo: sorry, warning: already initialized constant SMTPSession
[17:16:36] arup_r: ok.. smathy new error, https://gist.github.com/aruprakshit/b64841e2648a23a837db
[17:16:52] arup_r: not able to login to Mysql shell
[17:17:01] applegrain: has joined #RubyOnRails
[17:17:17] arup_r: I didn't set any password, why it is asking me.. and what should I give it though ?
[17:17:45] WebDevB: tubbo: sorry, warning: already initialized constant SMTPSession
[17:18:16] WebDevB: App 14009 stdout: MultiParameterHack loaded
[17:18:16] WebDevB: App 14009 stderr: [deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
[17:18:18] jhn: has joined #RubyOnRails
[17:18:29] smathy: arup_r, probably you have old DBs still on your system with either a password for root, or maybe that need to be either migrated to the new version or removed and replaced.
[17:18:44] ruurd: has joined #RubyOnRails
[17:19:04] arup_r: smathy: I tried to remove all by following https://coderwall.com/p/os6woq/uninstall-all-those-broken-versions-of-mysql-and-re-install-it-with-brew-on-mac-mavericks
[17:19:05] njero: has joined #RubyOnRails
[17:19:18] thither: Will puma by itself be able to proxy requests on a single port to multiple puma workers or do I need something like nginx for that? Currently with 2 workers I'm seeing behavior as if there's only 1 worker.
[17:19:30] mghaig: has joined #RubyOnRails
[17:19:51] yoongkang: has joined #RubyOnRails
[17:20:42] arup_r: smathy: new mac ships with Mysql db ? Just asking, because it is new.. and since 3 hours I am on this.. still Mysql not running..
[17:21:20] smathy: arup_r, ok well I wasn't there while you did that, so my guess at your MySQL problem is the same. That's kind of as much of this as I think we should discuss here in #RoR.
[17:21:23] matthewd: thither: `puma -w` should share work by itself
[17:21:55] WebDevB: Any ideas guys?
[17:22:26] thither: matthewd: I don't think I had that option in my Procfile, so I'll add that now and try it
[17:23:15] nettoweb: has joined #RubyOnRails
[17:23:19] sinkensabe: has joined #RubyOnRails
[17:23:34] arup_r: smathy: since begining I am not able to login to mysql shell.. so I removed everything and did fresh install still the same error
[17:24:35] matthewd: thither: Then how are you running multiple workers?
[17:25:06] matthewd: If you're running them independently on separate ports, then yes, you'll need something that knows about all of them to balance between them
[17:25:28] towski_: has joined #RubyOnRails
[17:25:43] thither: matthewd: actually I was mistaken. I was already running with that option effectively. I'm using a config file to set up puma on start
[17:25:47] nettoweb: guys Im creating a form that has field_for (one event has many tickets for instance), an it works. But now I tried to create a link_to_add_association from simple_form to create a dynamic fields for tickets and Im getting this error: expected Hash (got Array) for param `tickets_attributes'.
[17:26:03] thither: They're all on the same port (at least I'm pretty sure)
[17:26:15] nettoweb: This dynamic created fields is like this event[tickets_attributes][1447694765307][name]
[17:26:37] applegrain: has joined #RubyOnRails
[17:26:51] nettoweb: I think that's the problem, this random number... And the field that are loaded by default in form coming with event[tickets_attributes][][name] and works
[17:26:58] matthewd: thither: That sounds right, then
[17:27:00] matthewd: thither: How are you measuring/determining "behavior as if there's only 1 worker"?
[17:27:32] Pazician: has joined #RubyOnRails
[17:27:43] tom_lowndes: has joined #RubyOnRails
[17:28:18] thither: I'm having one request hang, and then the entire application becomes unresponsive. As for the request, I'm rendering a PDF of a view, but the view itself makes calls to the application's assets. With WEBrick it would freeze because the single worker was waiting on the PDF, and the PDF was hanging on a request to the busy application.
[17:29:08] thither: I'm using Wicked PDF
[17:29:38] lacrymology: has joined #RubyOnRails
[17:32:21] yardenbar: has joined #RubyOnRails
[17:33:48] chadhs: has joined #RubyOnRails
[17:35:19] atomical_: has joined #RubyOnRails
[17:36:29] atomical_: has joined #RubyOnRails
[17:36:34] thither: matthewd: so am I right about the bahavior or am I just fucking up my application?
[17:37:36] jwaldrip_: has joined #RubyOnRails
[17:38:30] GragHarker: has joined #RubyOnRails
[17:39:25] SteenJobs: has joined #RubyOnRails
[17:40:29] voker57: has joined #RubyOnRails
[17:42:00] Megamos: has joined #RubyOnRails
[17:42:28] suchness: has joined #RubyOnRails
[17:42:32] chadhs: has joined #RubyOnRails
[17:43:59] matthewd: thither: Sounds reasonable, I think
[17:44:40] vigintas1: has joined #RubyOnRails
[17:45:12] youngbaks: has joined #RubyOnRails
[17:46:40] speakingcode: has joined #RubyOnRails
[17:49:21] baweaver: has joined #RubyOnRails
[17:49:41] zpe: has joined #RubyOnRails
[17:49:48] FooMunki: has joined #RubyOnRails
[17:50:39] thither: It works fine when making the pdf from the console, so it's definitely a matter of concurrency
[17:51:13] ruurd: has joined #RubyOnRails
[17:51:21] kitsuneyo: has joined #RubyOnRails
[17:51:38] K3VA: has joined #RubyOnRails
[17:52:47] annlewis: has joined #RubyOnRails
[17:52:47] mrtomme: has joined #RubyOnRails
[17:54:10] djbkd: has joined #RubyOnRails
[17:54:20] ruurd: has joined #RubyOnRails
[17:54:55] Encapsulation: has joined #RubyOnRails
[17:55:40] squiercaster: has joined #RubyOnRails
[17:58:30] a1fa: hm, i am so confused, attr_accessible is not working for me
[18:00:11] a1fa: hm - its depricated
[18:00:39] smathy: a1fa, attr_accessor
[18:01:16] Z00t: has joined #RubyOnRails
[18:01:53] a1fa: smathy: thanks - i think i also found a problem with my controller
[18:02:10] a1fa: smathy: i had :roles instead of roles: []
[18:02:14] a1fa: in strong_params
[18:04:16] htmldrum: has joined #RubyOnRails
[18:04:30] atomical: has joined #RubyOnRails
[18:04:35] aarkerio: has joined #RubyOnRails
[18:05:19] mghaig: has joined #RubyOnRails
[18:05:22] artto: has joined #RubyOnRails
[18:06:19] DelDotB: has joined #RubyOnRails
[18:06:23] artto_: has joined #RubyOnRails
[18:06:50] a1fa: smathy: cool, that was it, ^ roles: [] and there was no need for att_accessor, since i had to write my own
[18:06:55] mary5030: has joined #RubyOnRails
[18:07:00] DelDotB: has left #RubyOnRails: ()
[18:07:12] ruurd: has joined #RubyOnRails
[18:07:15] kitsuneyo: i'm trying to find a guide to setting up nested routes, like foo/2015/07/30 or bar/usa/florida/orlando... but where foo/2015 and bar/usa are also working URLs
[18:08:01] kitsuneyo: i thought i had it figured out, but i guess not
[18:08:42] EminenceHC: has joined #RubyOnRails
[18:10:26] smathy: kitallisii, get ":year(/:month(/:day))", controller: :foos, action: :bar
[18:10:46] rakm: has joined #RubyOnRails
[18:10:56] smathy: kitallisii, sorry.
[18:11:21] manfrin: has joined #RubyOnRails
[18:13:56] bmalum: has joined #RubyOnRails
[18:14:52] Palsson: has joined #RubyOnRails
[18:15:13] umgrosscol: has joined #RubyOnRails
[18:15:24] K3VA: Eek! Created a Seeds.rb file to populate my DB. It was fully working. I used Foo.create [So I can obtain a Foo ID]. I added Validations to models/foo.rb [validates :description, presence: true] and now my Seeds file won't create an ID under the Create method. WELP!
[18:15:41] srinidhi1: has joined #RubyOnRails
[18:15:55] roxtrongo: has joined #RubyOnRails
[18:15:57] matthewd: K3VA: If you're not checking that the result was persisted, you should be using create!
[18:16:52] arup_r1: has joined #RubyOnRails
[18:17:06] njero: is there any way to create ar object from rails connection.execute results?
[18:17:31] baweaver: has joined #RubyOnRails
[18:18:41] aniM: has joined #RubyOnRails
[18:19:22] jhass: n_e_o: maybe you want find_by_sql ?
[18:19:24] baweaver: has joined #RubyOnRails
[18:19:50] rgtk: has joined #RubyOnRails
[18:19:56] Axsuul: has joined #RubyOnRails
[18:21:22] Pazician: has joined #RubyOnRails
[18:22:07] a1fa: is there a better way to write this: https://gist.github.com/anonymous/2f1851a9bdac58875ef6 so i dont have to check length of arrway to insert "," is there are additional elements in the array?
[18:22:28] a1fa: s/arrway/array/ and "if there"*
[18:22:45] njero: jhass: nope i need to get different active model object from same query :)
[18:23:25] nettoweb: has joined #RubyOnRails
[18:23:31] matthewd: n_e_o: What does your query look like? :/
[18:23:54] a1fa: matthewd: roles.join(',')
[18:24:46] matthewd: a1fa: account.roles.map(&:capitalize).join(', '), yeah
[18:25:09] matthewd: a1fa: There's also to_sentence, if you like "and"
[18:26:17] a1fa: charming. ;) Thanks
[18:26:41] njero: matthewd: nothing in mind ..just trying if possible to get all entries from polymorphic assoc table and get corresponding ar object for each :P
[18:26:46] Pazician: has joined #RubyOnRails
[18:27:35] jhass: Foo.includes(:a, :b) ?
[18:28:02] gregf_: has joined #RubyOnRails
[18:28:13] strgbrew: has joined #RubyOnRails
[18:29:01] rakm: has joined #RubyOnRails
[18:29:17] matthewd: n_e_o: I don't see what's so terrible about querying them separately. Any alternative is going to lead to a huge explosion of blank columns, or a lot of missing data.
[18:29:30] matthewd: (assuming the tables have differing columns, of course... but otherwise, why would they be separate tables?)
[18:29:55] gavit: I added rgeo and now want to have a form where I can enter a polygon, do I create multiple text_inputs for x and y (with a dynamic add more points)
[18:30:26] matthewd: n_e_o: But I'm still assuming your model structure looks the way smathy described, to which you said no.
[18:31:28] aniM: Hey folks, I have a model called Campaign, and I have multiple forms to input fields for this model from users. Users can navigate from one form to another and it saved fields whenever user switches from one form to another. Is there anyway to split form1 validations from form2 validation. Currently it runs all validations for both forms? Also in future there is possibility of breaking down these 2 forms into more (like 3-4 forms)
[18:31:31] aniM: while designing it
[18:31:34] DelDotB: has joined #RubyOnRails
[18:32:11] aniM: I want to have no coupling between ui (number of forms I have) with the model
[18:32:17] njero: matthewd: yeah..But No data is almost the same.. The difference is one table contains entries put up by clients with high querying. Others are private data by users which is queried less comparatively. So i though of separating it and may improve performance.. ? will it?
[18:32:26] strgbrew: has joined #RubyOnRails
[18:32:43] Tref: has joined #RubyOnRails
[18:32:56] smathy: aniM, add some sort of stage/state/indicator for which step of the process you're in, and use conditional validators that read that state and either apply or don't.
[18:33:28] smathy: aniM, or use something like Reform to encapsulate the different forms in different objects with validators in each of those, rather than in your model.
[18:34:01] smathy: n_e_o, !gist your code would inform our advice
[18:34:01] helpa: n_e_o: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[18:34:50] thither: matthewd: so you're sure that puma doesn't need apache or nginx for me to be able to test concurrency on a single port in development?
[18:35:10] thither: I can't think of anything else that could be wrong other than I'm actually only able to access one worker
[18:36:13] matthewd: n_e_o: So you're asking questions about a theoretical solution, to a problem you've created by implementing a theoretical performance optimisation?
[18:36:51] matthewd: n_e_o: It sounds like you may have optimised something prematurely. I wonder if the Internet has any opinions on whether that's a good idea. ;)
[18:37:08] a1fa: matthewd: https://gist.github.com/anonymous/27b5b4a40be4514e05ae like this?
[18:37:59] smathy: thither, puma will only start additional threads if it has to, unless you tell it to with the -t option: https://github.com/puma/puma#thread-pool
[18:38:06] notnoyyyyy: has joined #RubyOnRails
[18:38:44] njero: matthewd: what u mean? is it bad?
[18:39:46] matthewd: smathy: thither is apparently running -w2, so should have multiple *processes* handling requests :/
[18:40:01] matthewd: (also, a blocked thread should qualify as "has to", right?)
[18:40:25] safety_cut: has joined #RubyOnRails
[18:40:40] matthewd: a1fa: No block needed; just make the original '<%' into '<%='... join returns a string
[18:40:41] a1fa: matthewd: nvm, im an iddit
[18:40:43] smathy: thither, yes.
[18:40:56] asianMike: has joined #RubyOnRails
[18:40:59] smathy: ...sorry, matthewd ^
[18:41:08] strgbrew: has joined #RubyOnRails
[18:41:16] smathy: ...oh, sorry, misread "is running"
[18:41:28] njero: matthewd:.. What will you suggest?
[18:41:56] smathy: n_e_o, !code
[18:41:56] helpa: n_e_o: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[18:42:01] aniM: smathy: I currently use a form number indicator, but that will require some refactoring if I split my existing forms into new forms. Didn't know about Reform, that looks like an interesting option. Thanks
[18:42:17] njero: smathy: one sec
[18:42:44] smathy: aniM, you're welcome.
[18:42:52] matthewd: n_e_o: It sounds like this all comes back to your original "this might be slow" problem... I think we could give you the best help by addressing that one, instead of the fallout of your attempt to "fix" that
[18:43:33] ewnd9: has joined #RubyOnRails
[18:44:39] thither: Okay it seems I has misunderstood how the whole "Procile" thing works.
[18:44:41] darkxploit: has joined #RubyOnRails
[18:44:44] Coldblackice_: has joined #RubyOnRails
[18:44:48] kinduff: has joined #RubyOnRails
[18:44:49] thither: It wasn't actually using my config file -.-
[18:46:17] chipotle: has joined #RubyOnRails
[18:47:15] njero: matthewd: smathy https://gist.github.com/NeoElit/1fb5951a900d2a40128a
[18:47:31] njero: sry some more change
[18:48:03] s2013: has joined #RubyOnRails
[18:50:12] lemur: has joined #RubyOnRails
[18:50:28] jwaldrip__: has joined #RubyOnRails
[18:51:21] chipotle: has joined #RubyOnRails
[18:53:37] smathy: n_e_o, I have no idea what those first two files are, and you're not showing User - which is where you're interesting in actually doing this query no?
[18:54:32] rgtk_: has joined #RubyOnRails
[18:55:53] momomomomo: has joined #RubyOnRails
[18:55:53] njero: smathy: what happened is? like matthewd said based on theoretical assumption i separated private and public meetup models. Now i'm thinking how to get all meetups of a user in which her registered . :(
[18:56:14] njero: smathy: what happened is? like matthewd said, based on a theoretical assumption i separated private and public meetup models. Now i'm thinking how to get all meetups of a user in which her registered . :(
[18:57:14] waldi_: hi i have a simple scaffold "bar" with a remote destory button: <%= link_to 'Destroy', tobacco, method: :delete, data: { confirm: 'Are you sure?' } %> when i click on it the elements gets delete but i also get this in console: "DELETE http://localhost:3000/bars 404 (Not Found)"
[18:57:28] waldi_: why does send delete to this url?
[18:57:35] njero: smathy: will that actually help? or maintaining same kind of data in same table is good?
[18:57:52] aarkerio: has joined #RubyOnRails
[19:00:13] peppers: has joined #RubyOnRails
[19:01:00] Pazician: has joined #RubyOnRails
[19:01:49] annlewis: has joined #RubyOnRails
[19:02:56] rafaelfranca: has joined #RubyOnRails
[19:03:10] tvw: has joined #RubyOnRails
[19:04:10] smathy: n_e_o, if private and public meetups differ only by whether they're private or public, then it sounds more like an attribute to me. `public:boolean`
[19:04:45] rhizome: Waldi_: no idea what that's about, but use button_to
[19:04:54] wilsonc91: has joined #RubyOnRails
[19:04:55] tubbo: n_e_o: not sure if YOU are the person in this conversation that should be deciding what is relevant to show and what isn't...err on the side of showing too much, not too little.
[19:05:00] _djbkd: has joined #RubyOnRails
[19:05:19] tubbo: just for future question-asking skills :)
[19:05:52] njero: smathy: i'm sorry i missed.. something. There are some more tags and validations only for public meetups
[19:06:02] Pazician: has joined #RubyOnRails
[19:06:18] njero: tubbo: :) will do
[19:06:30] smathy: n_e_o, making validations conditional is trivial, not sure what "more tags" means.
[19:07:47] njero: smathy: some tags from act as taggable on to classify meetups
[19:08:26] mary5030: has joined #RubyOnRails
[19:09:14] njero: smathy: all this kind of makes sense.. Thanks for the eye opener discussion.. I'll gonna go with same table and condition validations :)
[19:09:56] MartinElvar: has joined #RubyOnRails
[19:10:43] fryguy: is there any reasonable way to specify a default for a dynamic segment in a route based on another segment provided? aka nested resources with the parent resource being defined by the child, and shallow routing
[19:10:52] kinduff: has joined #RubyOnRails
[19:12:12] tubbo: hey guys i'm having a strange problem with mongoid...long story short, it doesn't save my accepts_nested_attributes_for params into the object, given that my expectation in this test case fails and i see 'Error Address can't be blank' in the returned content. https://gist.github.com/tubbo/e14b5dec29b9543b840e
[19:13:32] bruno-: has joined #RubyOnRails
[19:14:09] podman: has joined #RubyOnRails
[19:14:10] crystal77: has joined #RubyOnRails
[19:14:48] rhizome: how come mongo doesn't have a "this is bad and you should feel bad" infokey like activeadmin does
[19:14:56] baweaver: has joined #RubyOnRails
[19:15:01] Pazician: has joined #RubyOnRails
[19:15:42] Pazician: has joined #RubyOnRails
[19:15:54] FailBit: http://gaspull.geeksaresexytech.netdna-cdn.com/wp-content/uploads/2015/11/lineofcode.jpg
[19:16:29] FailBit: rhizome: mongoid is far more cohesive as an ORM
[19:16:48] FailBit: mongo is designed to be used with an ORM
[19:16:58] FailBit: if you aren't you are doing it wrong
[19:17:14] FailBit: and you pay a high price for it being so well married to the idea of an ORM
[19:18:19] djbkd: has joined #RubyOnRails
[19:18:53] djbkd: has joined #RubyOnRails
[19:20:29] yoongkang: has joined #RubyOnRails
[19:21:07] mary5030: has joined #RubyOnRails
[19:29:48] tvw: has joined #RubyOnRails
[19:30:37] rdavila: has joined #RubyOnRails
[19:31:27] mghaig: has joined #RubyOnRails
[19:32:46] shinnya: has joined #RubyOnRails
[19:34:52] apotry: has joined #RubyOnRails
[19:38:46] Tref: has joined #RubyOnRails
[19:38:50] pjbugz: has joined #RubyOnRails
[19:39:30] pjbugz: anyone know why spring fails in rails 2.4.5?
[19:39:40] cesario: has joined #RubyOnRails
[19:39:47] pjbugz: rails generate or rails console both fail to start
[19:39:56] pjbugz: if i disable spring, they work.
[19:40:36] jsrn_: has joined #RubyOnRails
[19:40:39] pjbugz: oops. i meant rails 4.2.5
[19:41:14] flashpoint9: has joined #RubyOnRails
[19:42:09] cesario: has joined #RubyOnRails
[19:42:40] momomomomo: has joined #RubyOnRails
[19:43:26] tubbo: pjbugz: did you try doing bin/spring stop before trying to run those rails commands?
[19:43:49] kitsuneyo: has joined #RubyOnRails
[19:43:52] chadhs: has joined #RubyOnRails
[19:43:57] pjbugz: no, i did not.
[19:44:04] pjbugz: i'll re-enable it and try that...
[19:44:14] raunicolae: has joined #RubyOnRails
[19:45:25] pjbugz: tubbo: ah ha! that worked. thanks for that. wasn't aware that I'd have to do that.
[19:46:01] tubbo: pjbugz: any time you'd normally have to restart the server, you probably have to do bin/spring stop. betcha your spring was attached to the old codebase that no longer existed.
[19:46:25] pjbugz: tubbo: am i to assume that spring is now stopped for this app, or that it's restarted itself when i ran a rails command?
[19:46:40] pjbugz: tubbo: ah, i see. makes sense.
[19:48:06] RegulationD: has joined #RubyOnRails
[19:48:18] FCser: has joined #RubyOnRails
[19:48:40] goldbug: Should I not be able to change a variable's class to a symbol using .to_sym! ?
[19:50:25] waseem__: has left #RubyOnRails: ()
[19:50:53] baweaver: has joined #RubyOnRails
[19:50:59] waseem_: has joined #RubyOnRails
[19:51:11] pjbugz: has left #RubyOnRails: ()
[19:51:14] waseem_: goldbug: You could change the name of the class, a string, to symbol and not the class object itself.
[19:51:23] kitsuneyo: has joined #RubyOnRails
[19:52:19] tubbo: goldbug: not sure what you're asking
[19:54:47] goldbug: Okay, so check this out: https://gist.github.com/classicgoldbug/e83350e681cfa74ad78a
[19:55:18] goldbug: @language is coming through to my partial as a string. But I18n.with_locale expects a symbol.
[19:55:42] asianMike: has joined #RubyOnRails
[19:55:49] goldbug: However, if I try I18n.with_locale(@language.to_sym) I get a no to_sym method on NilClass error.
[19:56:15] Den: has joined #RubyOnRails
[19:56:22] vigintas: has joined #RubyOnRails
[19:56:26] TDJACR: has joined #RubyOnRails
[19:56:39] Den: has left #RubyOnRails: ()
[19:57:07] zmyrgel1: has joined #RubyOnRails
[19:57:10] Denarii: has joined #RubyOnRails
[19:57:18] djellemah_: has joined #RubyOnRails
[19:57:19] adavia_: has joined #RubyOnRails
[19:57:25] djbkd: has joined #RubyOnRails
[19:57:52] goldbug: I tried passing it through to the partial as a symbol by using @language.to_sym! but that doesn't seem to be a thing.
[19:57:56] PaulePan1er: has joined #RubyOnRails
[19:58:42] davidcelis: has joined #RubyOnRails
[19:58:42] davidcelis: has joined #RubyOnRails
[19:58:52] FailBit: you could go a roundabout way
[19:58:57] FailBit: @language.to_s.to_sym
[19:59:04] FailBit: or you could do The Right Thing and check for nil
[19:59:26] goldbug: It's not Nil though, surely?
[19:59:40] FailBit: NilClass isn't nil?
[19:59:51] FailBit: NilClass is the singleton class of the nil object
[19:59:52] goldbug: @language isn't Nil.
[20:00:03] Coldblackice: has joined #RubyOnRails
[20:00:08] melonstorm: has joined #RubyOnRails
[20:00:11] FailBit: but your line indicates that it is, because you can't call to_sym on nil
[20:00:17] FailBit: 14:55:49 goldbug | However, if I try I18n.with_locale(@language.to_sym) I get a no to_sym method on NilClass error.
[20:00:34] FailBit: NoMethodError: undefined method `to_sym' for nil:NilClass
[20:00:46] FailBit: don't paraphrase short error messages
[20:00:59] goldbug: Yes, but check the error. puts @language.class - the line before - comes up as String.
[20:01:30] FailBit: ACTION rolls eyes
[20:01:33] FailBit: that's a different error
[20:01:39] FailBit: I18n::InvalidLocale ("HY" is not a valid locale
[20:02:38] annlewis: has joined #RubyOnRails
[20:02:44] goldbug: Right. Because a valid locale is a symbol.
[20:03:21] goldbug: But apparently I cannot I18n.with_locale(@language.to_sym)
[20:03:38] tubbo: goldbug: @language.to_sym works if @language is not nil. why not just set @language ||= 'en'?
[20:03:50] goldbug: Even though @language is clearly a String with a value when it comes through.
[20:03:53] FailBit: (or @language ||= :en)
[20:03:54] tubbo: goldbug: prove it
[20:04:08] tubbo: goldbug: every time? really?
[20:04:13] goldbug: Language: HY Class: String
[20:04:24] goldbug: ^ the result of <% puts "Language: #{@language} Class: #{@language.class}" %> the line before
[20:04:27] tubbo: goldbug: so if i requested /people/3/name_fields, what is @language?
[20:04:57] tubbo: goldbug: nil, right? :)
[20:05:15] tuelz: has joined #RubyOnRails
[20:05:26] goldbug: Should be :en, as per the _form.html.erb: <%= content_tag :div, render(partial: 'name_fields', locals: { f: f, locale: @language || :en }), id: :name_fields, data: { path: (f.object.new_record? ? name_fields_people_path : name_fields_person_path(f.object)) } %>
[20:05:50] tubbo: goldbug: nope.
[20:05:57] FailBit: that doesn't assign it
[20:06:11] FailBit: (@language || :en) is an or-exp
[20:06:22] FailBit: (@language ||= :en) assigns it too
[20:06:49] FailBit: but really you should be doing that in the controller and not the view
[20:06:58] tubbo: the way most people do this is by having a before_action that sets the I18n.locale = params[:locale] on each request, so that you can pass ?locale=en or ?locale=hy and it "just works"
[20:07:15] tubbo: you shouldn't need to do I18n.with_locale like ever in your code
[20:07:19] tubbo: err, application code*
[20:08:04] goldbug: It's to allow me to dynamically update the same fields in different languages, per Globalization.
[20:08:50] momomomomo_: has joined #RubyOnRails
[20:09:04] tuelz: you _could_ still do that in your controllers, though and it seems a lot more maintainable if you were doing it that way
[20:09:08] a1fa: https://gist.github.com/anonymous/a5979f1e2ca550834ba5 this creates a lot of blank entries. anyway to avoid many blank entries? one blank is ok?
[20:09:23] tubbo: not if he's passing data to a partial
[20:09:42] tuelz: he could just make the dynamic thing its own partial, no?
[20:10:50] baweaver: has joined #RubyOnRails
[20:11:04] goldbug: tuelz: That's basically what I'm doing.
[20:11:18] goldbug: Here's the rest of the relevant code: https://gist.github.com/classicgoldbug/dd0f0250d2900b9d84a8
[20:11:40] tuelz: okay, so when you want to change languages, have some UJS render the partial on the backend and push it up to your view
[20:12:40] tuelz: s/view/client/
[20:13:06] tuelz: cool, so you're hitting a controller action then, which means you can set the variable in the controller
[20:14:39] a1fa: https://gist.github.com/anonymous/a5979f1e2ca550834ba5 how can i remove blanks that get created by this? maybe there is a better wy?
[20:15:02] goldbug: tuelz: I think I am already, no?
[20:15:18] yoongkang: has joined #RubyOnRails
[20:15:19] DoubleMalt: has joined #RubyOnRails
[20:15:31] tuelz: goldbug: you're setting the variable in the view if you `@lang ||= :eng`
[20:15:39] tuelz: well, potentially.
[20:15:56] goldbug: Under def name_fields ---> @language = params[:language]
[20:16:32] tuelz: goldbug: great, so if you're setting @lang, why does your view have ||= :eng?
[20:16:40] roxtrongo: has joined #RubyOnRails
[20:17:16] tuelz: the answer is because it's not ALWAYS setting the variable in the controller, right?
[20:17:41] tuelz: so to solve that, move the ||= :en to the controller to give you `@pang = params[:lang] ||= :end`
[20:17:45] tubbo: goldbug: that doesn't do what you think it does :)
[20:17:51] tuelz: s/:end/:en/
[20:17:53] goldbug: tuelz: I *think* (and bear in mind, rvanlieshout is mostly responsible for this setup!) it's because the page renders one thing when it loads (_form.html.erb, with _name_fields.html.erb as a partial) and then something else (name_fields.html.erb with _name_fields.html.erb as a partial) when the language changes.
[20:18:02] tubbo: tuelz: @language = params[:language] || :en
[20:18:12] tuelz: tubbo: thanks :)
[20:18:24] tubbo: goldbug: no one is responsible for this setup except you.
[20:18:26] nettoweb: has joined #RubyOnRails
[20:18:34] goldbug: tubbo: Yep, which is why I'm here (:
[20:18:55] tuelz: goldbug: you said that every time you change the language, you're hitting an action in a controller, right?
[20:18:58] ur5us: has joined #RubyOnRails
[20:19:11] goldbug: Yes, the name_fields action.
[20:19:27] mwlang: has joined #RubyOnRails
[20:19:33] tuelz: okay, so in that action set the variable, rerender the partial and push it to the client
[20:19:59] rdavila: has joined #RubyOnRails
[20:20:48] drewdfw: has joined #RubyOnRails
[20:21:10] kies: has joined #RubyOnRails
[20:21:45] goldbug: Balls, I have to go. Sorry. Thanks for the suggestions. Back tomorrow, no doubt.
[20:23:31] sinkensabe: has joined #RubyOnRails
[20:23:41] DelDotB: has joined #RubyOnRails
[20:24:15] Tref: has joined #RubyOnRails
[20:25:05] jessemcgilallen: has joined #RubyOnRails
[20:25:22] a1fa: https://gist.github.com/anonymous/a5979f1e2ca550834ba5 is there a better way of doing this vs having to create another array in order to strip out unwanted fields?
[20:25:51] tildes: has joined #RubyOnRails
[20:28:30] orikremer: has joined #RubyOnRails
[20:28:31] ruurd: has joined #RubyOnRails
[20:28:35] Tref: has joined #RubyOnRails
[20:30:58] Tref: has joined #RubyOnRails
[20:32:25] rhizome: a1fa: why put all of that in the view? create @users in your controller
[20:32:55] ayonkhan: has joined #RubyOnRails
[20:32:56] rhizome: and create some scopes
[20:33:04] a1fa: rhizome: how would do User.is? ?
[20:33:17] tuelz: a1fa: also formatting your gist so it's easy for me to read would help
[20:33:34] Megamos: has joined #RubyOnRails
[20:34:07] northfurr: has joined #RubyOnRails
[20:34:12] tuelz: a1fa: you are mapping over every user in the view, you can do the exact same thing in the controller
[20:34:17] rhizome: rule 1 of the internet is to hit "send" before looking at the screen
[20:34:58] rhizome: a1fa: what does "how would do User.is?" mean
[20:35:47] tuelz: preferably, though I would make a class method in User that returns all testers then you can wrap that up in an array in your controller
[20:36:07] Lavan0074: has joined #RubyOnRails
[20:36:35] a1fa: rhizome: i'm using cancancan, and roles_mask
[20:36:46] rhizome: a1fa: pretend like you want us to know what you're talking about
[20:36:48] djbkd: has joined #RubyOnRails
[20:37:20] rhizome: help the helpers
[20:37:21] djbkd: has joined #RubyOnRails
[20:37:42] a1fa: rhizome: is? is a def under User that does bit mask to figure out if "user" "attribute" matches the roles_mask
[20:37:45] tuelz: @testers_for_options = User.active_testers.each { |t| [t.name, t.id] }
[20:38:04] rhizome: User.active_testers.select(:name,:id)
[20:38:07] annlewis: has joined #RubyOnRails
[20:38:11] a1fa: https://github.com/ryanb/cancan/wiki/Role-Based-Authorization
[20:38:25] tuelz: put that in a controller, then define a class method in User that returns and array of active testers
[20:38:42] baweaver: tuelz: each vs map
[20:38:43] thither: Is there a way to only get the uniq values from a hash? I know I can do hash.value.uniq, but I still want to keep the keys for those values.
[20:38:45] a1fa: https://github.com/CanCanCommunity/cancancan/wiki/Role-Based-Authorization ***
[20:38:57] baweaver: also, don't use either on an AR collection
[20:39:00] thither: hash.values.uniq*
[20:39:03] baweaver: pluck / select are way faster
[20:39:25] bruno-: has joined #RubyOnRails
[20:39:42] a1fa: yes, but roles_mask is a mask, not sure how that would play into select/pluck
[20:39:43] tuelz: baweaver: does it matter? each/map does the same thing here, right?
[20:40:00] SteenJobs: has joined #RubyOnRails
[20:40:01] thither: each isn't the same
[20:40:10] baweaver: each returns the entire colleciton
[20:40:17] baweaver: it's used for doing something with each item
[20:40:25] tuelz: oh duhh, thanks
[20:40:27] baweaver: map returns each value passed through a function
[20:40:28] rhizome: thither: which key would you want to keep if two have the same value?
[20:40:35] baweaver: neither of which should be used here
[20:40:41] thither: rhizome: doesn't matter
[20:40:43] baweaver: select and pluck, learn them both
[20:41:26] tuelz: learning an remembering are two different things.
[20:41:47] tuelz: I haven't written ruby in a bit, was just in here seeing if people were talking about radar's open source projects :p
[20:42:19] Papierkorb: satisfied now?
[20:42:42] tuelz: Papierkorb: not sure if you're trying to be funny or rude...
[20:43:13] tuelz: but he appears to have a good number of popular gems.
[20:43:23] Papierkorb: tuelz: easily offended?
[20:43:35] thither: rhizome: nvm - hash.invert.invert works perfectly
[20:43:38] tuelz: Papierkorb: nope, thanks for asking.
[20:45:39] a1fa: i am still not sure how to do this, i guess i'll just create another array and populate it
[20:46:06] a1fa: sounts like most reasonable thing to do
[20:46:21] loincloth: has joined #RubyOnRails
[20:47:05] loincloth: hey all... i've got a strange sprockets non-fatal error during my cap deploys of a 3.x app: https://gist.githubusercontent.com/greatseth/13a3dc2a5bcdcc874a7a/raw/9da2d7ffd158facbf52a87de4e2982e4539bde75/gistfile1.txt
[20:47:16] Lavan0074: can anyone tell me what is the best way to create a online directory from the scratch in rails?
[20:47:21] loincloth: has anyone seen that? the deploy does not fail at that point, and doing what the error says doesn't help
[20:47:29] loincloth: so, i'm mostly curious
[20:47:51] FailBit: 2.2.2 but a 3.x app?
[20:47:55] momomomomo: has joined #RubyOnRails
[20:48:41] loincloth: 2.2.2 is the version running the cap code, tho, buddy
[20:48:41] rhizome: Lavan0074: any tutorial
[20:49:03] Lavan0074: rhizome I've been searching for days
[20:49:04] WebDevB: has joined #RubyOnRails
[20:49:17] rhizome: no you haven't
[20:49:34] rhizome: i mean, maybe you did a search each day, but come on.
[20:49:39] baweaver: Lavan0074: Then what have you found
[20:49:47] Lavan0074: all tutorials seems to point out to twitter clone, airbnb stuff
[20:49:57] WebDevB: Can anyone take a look at this? http://stackoverflow.com/questions/33744232/ruby-on-rails-error-500
[20:50:02] rhizome: airbnb? isn't that a directory of vacation houses?
[20:50:03] baweaver: then you miss the point of a tutorial
[20:50:19] baweaver: it's to familiarize yourself with how the framework works
[20:50:24] Lavan0074: there is a tutorial to clone airbnb
[20:50:26] rhizome: Lavan0074: google "rails blog 15 minutes"
[20:50:29] baweaver: not give you a step by step preassembled application
[20:50:40] loincloth: so, just to recap: two responses... 1) some kid adding no value by giving his unsolicited, irrelevant opinion about the versions of things... and 2) somebody making sure that person's feelings aren't hurt by me calling them "kid" because they are behaving like one
[20:50:47] loincloth: good times :D
[20:50:50] ChanServ: +o baweaver
[20:50:59] baweaver: good times...
[20:51:05] rhizome: so you want a directory that's exactly like the one you imagine that is totally different than airbnb
[20:51:24] FailBit: as for the error itself, nfi
[20:51:26] tuelz: loincloth: you're well on your way to getting meaningful feedback, you just need to be more confrontational.
[20:51:43] lemur: has joined #RubyOnRails
[20:51:44] Lavan0074: I'm just not sure on where to start with the app
[20:52:03] Lavan0074: i use the devise
[20:52:06] rhizome: start at the beginning
[20:52:07] Lavan0074: for user managment
[20:52:12] Lavan0074: then i'm stuck
[20:52:19] loincloth: tuelz: if the people who feigned helpfulness but didn't actually offer any or those who are more concerned with that are offended, that's ok... there are more reasonable people about
[20:52:19] rhizome: you may be hitting enter too often
[20:52:27] baweaver: +q *!loincloth@*.*
[20:52:30] loincloth: i see no big problem taking a moment to comment on the likes of FailBit
[20:52:44] njero: has joined #RubyOnRails
[20:52:52] a1fa: i solved my problem with just adding things to a new array
[20:52:54] loincloth: but anyway, the error seems obscure, so i'm scraping the bottom of the barrel... but mostly curious, as i say
[20:53:05] tuelz: Lavan0074: irc isn't a great platform for hand holding. Do you know of any local ruby user groups near you? I'd bet you'll find plenty of people willing to help you. In IRC it's usually best to have specific questions in a fairly narrow scope.
[20:53:35] chipotle: has joined #RubyOnRails
[20:53:36] Lavan0074: guess i'll comeback later
[20:53:41] tuelz: Lavan0074: best of luck
[20:53:46] Lavan0074: thanks rhizome!
[20:53:59] rhizome: sure thing
[20:54:15] FailBit: loincloth: sure, I'm not the most helpful, but I do prefer helping people to making ad-hom attacks.
[20:54:19] baweaver: +q loincloth!*@*
[20:54:43] FailBit: and a lot of what I say, to my detriment, is really sarcastic
[20:54:55] baweaver: that's enough of that
[20:55:10] tuelz: FailBit: the fire doesn't need any fuel and I've got sensative emotions. Can't we all be friends?
[20:55:12] greengriminal: has joined #RubyOnRails
[20:55:20] FailBit: I need to go feed my fireplace, actually
[20:55:22] FailBit: needs another few logs
[20:55:31] tuelz: lol. Ironic.
[20:55:37] safety_cut: has joined #RubyOnRails
[20:55:41] baweaver: Well it's fixed
[20:55:43] FailBit: just a few embers left, crap
[20:55:51] Megamos: has joined #RubyOnRails
[20:55:51] baweaver: so we'll drop it.
[20:56:04] FailBit: that soudns like a good idea
[20:56:25] rattatmatt: has joined #RubyOnRails
[20:56:31] _lazarevsky: ive just cloned this git repo and attempted to run bundle install
[20:56:43] _lazarevsky: im getting -> Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
[20:56:51] FailBit: gist of the error?
[20:56:54] FailBit: ruby version?
[20:56:56] FailBit: gem version?
[20:57:00] tuelz: _lazarevsky: your best bet is to stop working on other peoples code, but if that's not an option hopefully we can help
[20:57:03] adaedra: Well, you should have logs somewhere telling you more.
[20:57:23] _lazarevsky: ya I will post the gist now
[20:57:27] _lazarevsky: this is how I installed the bundler though
[20:57:30] _lazarevsky: sudo gem install bundler --no-user-install
[20:57:48] rhizome: why are you installing stuff as root
[20:58:08] _lazarevsky: becuz people were reporting some errors when installed without the --no-user-install (not bound to any user)
[20:58:08] FailBit: root is bad, mkay
[20:58:16] _lazarevsky: gem install bundler failed
[20:58:21] _lazarevsky: how do I remove the bundler and try again?
[20:58:33] FailBit: gist your error first
[20:58:37] adaedra: don't run commands as root just to "fix" things.
[20:58:38] FailBit: it might be unrelated
[20:58:50] annlewis: has joined #RubyOnRails
[20:59:45] _lazarevsky: https://gist.github.com/Lazarevsky/522b429706cd7a27957d
[20:59:46] tuelz: _lazarevsky: alternatively, attempt to install it the 'normal' way by `gem uninstall bundler` and then letting us help you figure out why `gem install bundler` isn't working
[21:00:02] FailBit: yeah your bundler is screwed
[21:00:03] _lazarevsky: tuelz: ya sounds like a good approach
[21:00:14] FailBit: I thought it might be an error in C-land
[21:00:14] cleopatra: has joined #RubyOnRails
[21:00:26] arBmind: has joined #RubyOnRails
[21:00:32] Radar_: has left #RubyOnRails: ()
[21:00:40] _lazarevsky: tuelz: installed it but had to sudo obv
[21:00:48] _lazarevsky: ??? EnzymeQMS-rails git:(master) ??? gem install bundler ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions into the /var/lib/gems/1.9.1 directory.
[21:00:48] FailBit: those interest me because I once did some kernel programming, then later some GUI programming, and got pretty good at C
[21:00:50] Radar: has joined #RubyOnRails
[21:01:03] Radar: _lazarevsky: Why are you using a Ruby 1.9.x version from what appears to be apt-get or something like that?
[21:01:12] Radar: _lazarevsky: Why didn't you install this using something like ruby-install or chruby?
[21:01:16] ruurd: has joined #RubyOnRails
[21:01:26] loincloth: has left #RubyOnRails: ()
[21:01:27] _lazarevsky: Radar: cuz I didn't know any better..
[21:01:48] Radar: _lazarevsky: what OS?
[21:02:09] Radar: _lazarevsky: Ok, uninstall that Ruby and then re-install it with
[21:02:14] helpa: Ubuntu, Ruby, ruby-install, chruby, Rails setup guide: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you/ - Gauranteed to work 100% of the time or your money back!
[21:02:24] tuelz: _lazarevsky: what you're having is a lot of permissions/environment problems. Those can be solved with tools such as radar is suggesting
[21:02:26] ChanServ: -o baweaver
[21:02:28] _lazarevsky: i've got a ruby version manager
[21:02:44] Radar: _lazarevsky: RVM or what?
[21:02:46] Radar: _lazarevsky: Because it doesn't appear you're using anything.
[21:02:54] _lazarevsky: Radar: yes I do have rvm
[21:03:08] cleopatra: hello people xD
[21:03:14] Radar: _lazarevsky: rvm implode --force + uninstall the apt-get'd ruby, then follow the guide I liniked
[21:03:15] tuelz: it can be solved 1000 different ways, actually, but the most conventional way is using a ruby versioning manager
[21:03:20] cleopatra: I am ready :P
[21:03:23] Radar: As helpa said, guaranteed to work or your money back!
[21:03:46] youngbaks: has joined #RubyOnRails
[21:03:54] _lazarevsky: Radar: awesome! Thanks
[21:04:10] tuelz: cleopatra: for the thunderdome?
[21:04:21] tuelz: impressive
[21:05:47] epochwolf: Radar: I'd like my money ba.... oh.
[21:05:56] cleopatra: what new people
[21:06:09] _lazarevsky: Radar: rvm 1.9.3p484
[21:06:16] _lazarevsky: Radar: rvm implode --force
[21:06:35] _lazarevsky: rvm uninstall rvm 1.9.3p484
[21:07:22] djellemah__: has joined #RubyOnRails
[21:07:33] baweaver: Radar: had much experience with API model versioning? Have to restructure some things which are only consumed by a SPA.
[21:07:44] sniperhaxor: has joined #RubyOnRails
[21:08:02] baweaver: had mentioned it on ruby-pro, getting some more ideas before I start pulling wires on a mass refactor
[21:08:13] sniperhaxor: hey guys, sorry for the insecure link but i have this errror with loging out in my app.
[21:08:23] sniperhaxor: I get the error: The action 'logout' could not be found for SessionsController
[21:08:36] sniperhaxor: I don't know what to type in my session controller to create the logout function
[21:08:39] jhass: sniperhaxor: it's probably a POST, check rake routes
[21:08:53] rhizome: you have the nick "sniperhaxor" and you want us to visit some dodgy url. try gist instead.
[21:08:58] sniperhaxor: Are you saying I should do a rake db:migrate?
[21:09:04] sniperhaxor: I don't know how to check the rake routs
[21:09:12] jhass: sniperhaxor: no, I never said that and I have no idea how you inferred that
[21:09:25] baweaver: rake routes
[21:09:28] sniperhaxor: it's the only real thing I know how to do
[21:09:42] baweaver: well, `less rake routes`
[21:09:43] jhass: rake routes, it's a command, run it
[21:09:43] sniperhaxor: rhizome: you can check it out on a virtual machine if you're afraid
[21:09:48] nettoweb: has joined #RubyOnRails
[21:09:53] sniperhaxor: it's just that error though anyway
[21:10:04] baweaver: press 'q' to exit the less pager if you get stuck
[21:10:05] halcyonicstorm1: has joined #RubyOnRails
[21:10:15] tuelz: why do you have a public IP exposing a website on port 3000?
[21:10:23] rhizome: why would i fire up a VM to help some stranger who can't use gist?
[21:10:41] rhizome: expected value low
[21:10:41] sniperhaxor: https://gist.github.com/anonymous/c4ef71b4b49a83a96fe2
[21:11:05] jhass: why the hell do you work as root :(
[21:11:09] tuelz: you don't know us and you're giving us access to a development version of an app....I hope this is your data and no one else's or you would be potentially hurting people other than yourself :(
[21:11:14] djellemah: has joined #RubyOnRails
[21:11:28] jhass: it's probably running as root
[21:11:39] jhass: let's find a shell exploit
[21:11:52] tuelz: next time just give us error messages, please. Knowing your public facing IP does nothing for us to help you
[21:12:04] jhass: sniperhaxor: please use devise, don't roll your own authentication
[21:12:14] baweaver: Tone it back a bit
[21:12:18] baweaver: and it could be a tutorial
[21:12:18] sniperhaxor: you guys need to chill
[21:12:27] sniperhaxor: this is just some temporariy vps i'm using
[21:12:39] rhizome: haxors know how to roll their own auth
[21:12:55] tuelz: I'm not trying to be mean, man. Just trying to give you some friendly advice. For all I know you're exposing data that belongs to people other than yourself
[21:13:04] _lazarevsky: Radar: it did NOT work, I want my money back
[21:13:11] tuelz: but now that I know it's temporary and your own data, I'll relax
[21:13:48] sniperhaxor: anyway, my logout route is going nowhere it seems
[21:14:17] sniperhaxor: not sure how i should solve this issue
[21:14:29] tuelz: sniperhaxor: okay, so you have a /logout route defined and it's GET, so visiting it SHOULD work, my guess is you don't actually have a logout action defined in your sessions_controller
[21:15:36] jhass: sniperhaxor: sorry but I have stress this, working as root is bad, you shouldn't get used to it, not even for "temporary" stuff
[21:16:35] smathy: sniperhaxor, usually the logout route is mapped to sessions#destroy
[21:16:35] sniperhaxor: Yeah, i got it working
[21:16:43] beauby: has joined #RubyOnRails
[21:17:59] jhass: sniperhaxor: just make sure to use devise in a real application ;)
[21:18:31] tuelz: now for free information time! logout SHOULD be a post, because it can mess with browser prefetching
[21:18:49] jhass: and that's just one thing devise gets right for you!
[21:19:04] adaedra: GET should only be used with non-transformative actions. Otherwise, it's POST and friends.
[21:19:32] tuelz: yeah, for real-life non-learning stuff rolling your own auth is always wrong.
[21:19:56] adaedra: you can do it if you know what you're doing, I'd say.
[21:20:03] baweaver: tuelz: most all of the time it is
[21:20:07] baweaver: but there are exceptions
[21:20:19] tuelz: adaedra: even then, are you going to keep up with vulns as much as a popular auth gem?
[21:20:21] baweaver: just assume there aren't
[21:20:36] sniperhaxor: yeah, i don't get why people suggest devise yet, although I'm a new rails developer
[21:20:47] baweaver: leave it to seniors to make decisions on auth frameworks
[21:20:51] sniperhaxor: is there some reasoning behind it other than not having to write your own code?
[21:20:58] alienaut: has joined #RubyOnRails
[21:20:58] trosborn: has joined #RubyOnRails
[21:21:04] tuelz: sniperhaxor: devise is nice, there are others, but basically it's a security thing...trust a community rather than yourself with auth stuff
[21:21:04] baweaver: mainly major vulnerabilites
[21:21:13] adaedra: devise is drop-in, well known, customizable, and should cover all your use cases
[21:21:58] adaedra: it's the "don't reinvent the wheel, we give it to you with 10-year warranty and gold tires."
[21:22:32] sniperhaxor: Then it's more secure but more overwhelming in terms of cluttering your project and having to find many issues/workarounds with the implementation?
[21:22:41] sniperhaxor: Sorry I've never even tried devise yet
[21:22:51] sniperhaxor: but I'm sure I will see what the craze is about at some point.
[21:22:53] tuelz: yeah, but not inventing the wheel isn't the main reason I would argue....it's the fact that you're obviously going to be handling other peoples data and as such you are responsible for doing things the most secure way...if you trust a community like devise then you'll be doing the best you possibly can
[21:22:54] jhass: sniperhaxor: devise went through many gotchas and lessions learned for you, you shouldn't repeat that journey but benefit from it
[21:23:07] HalcyonicStorm: has joined #RubyOnRails
[21:23:32] jhass: auth seems simple on the surface, but as so often in security related things, there are quite a few details to get right
[21:23:48] sniperhaxor: Yeah, I'm pretty sure if I was to work on an important website that many real sniper haxors would wreck my face in
[21:24:01] tuelz: I'm quite capable of writing my own auth and I know a lot about it, but if I'm being a responsible webdev then I use a popular lib/gem for auth because I know if something goes wrong in the security world I can just update my gem
[21:24:04] sniperhaxor: I'll keep devise in mind
[21:24:18] cornerma1: has joined #RubyOnRails
[21:24:34] allcentu1: has joined #RubyOnRails
[21:25:10] Scripore: has joined #RubyOnRails
[21:25:11] sniperhaxor: Honestly though, I feel if you want to be truly secure you would not rely on something made by a lot of people and popularized
[21:25:20] sniperhaxor: that would likely mean it is more of a potential target for hackers
[21:25:22] tuelz: sniperhaxor: then you'd be wrong :)
[21:25:40] tuelz: open source is proven over and over that being open is more secure than obsfucation
[21:25:51] tuelz: s/is/has/
[21:26:15] sniperhaxor: I don't really know
[21:26:20] kadoppe: has joined #RubyOnRails
[21:26:29] sniperhaxor: I shouldnt even be bothered about these things yet anyway
[21:26:35] tuelz: correct, you shouldn't
[21:26:37] jhass: if you're a valuable target they will find your mistakes
[21:26:49] sniperhaxor: I have to find a way to create something that can be getting hacked first then I can worry about all the security stuff
[21:26:50] tuelz: it's super advanced and thus you should trust someone who knows what they are doing, like devise, for instance
[21:26:54] rgrmatt: has joined #RubyOnRails
[21:28:03] arBmind: has joined #RubyOnRails
[21:28:22] Radar: _lazarevsky: How did it go?
[21:28:46] Radar: baweaver: What kind of API versioning?
[21:29:33] _lazarevsky: Radar: bundler is running now
[21:29:37] _lazarevsky: Radar: all good, thanks you're a legend
[21:29:40] Radar: _lazarevsky: :)
[21:29:46] _lazarevsky: Radar: for some odd reason gvim no llonger exists
[21:29:49] smathy: devise is neither necessary nor sufficient to ensure security.
[21:29:55] _lazarevsky: cuz when I nuked ruby it removed some vim files
[21:29:55] smathy: sniperhaxor, tuelz ^
[21:30:00] _lazarevsky: I spent like.. 4 hours setting up my vim
[21:30:01] Radar: _lazarevsky: It shouldn't have done that.
[21:30:04] _lazarevsky: I hope it's not all gone to shits
[21:30:15] adaedra: mh, does not seems to weird, actually
[21:30:30] baweaver: someone thought it'd be a good idea to define relationships virtually on the frontend in a SPA. I'm pushing it back to the database.
[21:30:42] adaedra: you should be able to install gvim back and have it work correctly (would bring ruby back, but that should be overriden by chruby's one)
[21:30:59] Radar: _lazarevsky: Alternatively you could use a Real Editor(tm) like Sublime Text 3
[21:31:06] Radar: ACTION ducks the bottles and other items
[21:31:08] _lazarevsky: Radar: lol sublime.. what a weaksauce
[21:31:15] _lazarevsky: Radar: when sublime grows up it wants to be vim
[21:31:32] baweaver: https://xkcd.com/378/
[21:31:36] Palsson: has joined #RubyOnRails
[21:31:37] baweaver: ACTION whistles
[21:31:40] Radar: I like that Sublime doesn't hang when I open random files.
[21:31:43] MartinElvar: has joined #RubyOnRails
[21:31:45] weaksauce: _lazarevsky I take that as an affront
[21:31:52] Radar: I also like that it looks like its from this century.
[21:32:05] _lazarevsky: weaksauce: haaahahaha
[21:32:07] baweaver: but seriously, let's not get into an editor war
[21:32:07] _lazarevsky: weaksauce: LOL!
[21:32:16] _lazarevsky: haaaaaaaaaaaaaahahaha
[21:32:32] _lazarevsky: weaksauce: this was a bashorg material :D
[21:33:09] chadhs: has joined #RubyOnRails
[21:33:17] _lazarevsky: Radar and adaedra: yupp.. gvim has gone
[21:33:44] adaedra: Surely has dependency on ruby.
[21:33:46] Radar: I don't know why it was tied into any of the Ruby stuff.
[21:33:52] Radar: "Surely"?
[21:34:07] adaedra: It's not a word?
[21:34:11] adaedra: Sometimes I can't tell.
[21:34:22] tuelz: smathy: nope, but a popular auth gem is necessary - although not sufficient
[21:34:25] smathy: You can definitely build (g)vim with a dependency on ruby, perl and others.
[21:34:31] uri: has joined #RubyOnRails
[21:34:58] adaedra: But again, you should be able to reinstall gvim (even if it brings back a system ruby, you'll override it anyway) and have your configuration back.
[21:34:58] Radar: adaedra: It's a word, but I don't know anything about gvim so I'm interested to know how Ruby, a programming language, ties in with a gvim, a text editor.
[21:34:59] tuelz: unless you're a leading security researcher, rolling your own auth will likely be less updated and less secure.
[21:35:08] _lazarevsky: Radar: I hope you're happy about all the pain and inconvenience you've caused
[21:35:13] Radar: _lazarevsky: Tremendously.
[21:35:25] adaedra: Radar: vim has ruby bindings, so you can script it in Ruby. Didn't search too much in this domain, though.
[21:35:51] adaedra: Since it's debian based, there also may be a lighter vim without language bindings, but I'm not sure.
[21:35:55] Radar: Great, just what I want: to have to load a Ruby interpreter session whenever I do stuff in my editor. Because Ruby is known for its lightning quickness.
[21:36:31] adaedra: I'm not even sure it loads by default.
[21:36:31] smathy: tuelz, I'd say a good hashing gem is a necessity, eg. using bcrypt or scrypt. But devise is about convenience, not security.
[21:36:31] Radar: I am mostly baiting at this stage.
[21:37:19] Radar: lol @ sniperhaxor. I won't get involved more than just saying "lol"
[21:37:25] adaedra: Radar: there's also, when compiled, python2/3 bindings, if you want to go further.
[21:37:27] tuelz: smathy: I disagree. It's convenient, yes, but just because you hash something correctly doesn't mean you're secure. The more conventions you use the more sure you can be.
[21:37:34] Radar: adaedra: Got those in my editor already, kthx.
[21:37:47] smathy: tuelz, just because you're using devise doesn't mean you're secure either.
[21:37:52] tuelz: smathy: agreed
[21:38:02] smathy: That was my point.
[21:38:08] Radar: smathy: You're still using something that's tried + tested versus something that... well, isn't.
[21:38:14] tuelz: right, and I already agreed with it when you made it :p
[21:38:18] smathy: Recommending devise (without further qualification) from a security perspective isn't enough.
[21:38:35] tuelz: of course not, but it's better than recommending nothing
[21:39:48] tuelz: I hope noone thinks I'm implying running bundle install after typing `gem 'devise'` means you're secure :p
[21:39:59] tuelz: obviously implementation details matter a lot.
[21:40:03] smathy: tuelz, actually I think better is to recommend specific things like retry lockouts and complexity rules.
[21:40:16] HalcyonicStorm: has joined #RubyOnRails
[21:40:36] tuelz: smathy: more implementation done by a small number of people is more room for error without a community looking at it.
[21:41:50] tuelz: I trust huge OSS libraries will find implementation mistakes VERY quickly - while my 3 man team working on some project might never notice it.
[21:42:22] tuelz: of course, this isn't always true, but it's true more often than not
[21:42:39] Coldblackice: has joined #RubyOnRails
[21:43:09] smathy: tuelz, not arguing, but I trust devise to do what it was designed to do - which was NOT to be a drop in solution to all auth security.
[21:43:40] tuelz: I can agree with that.
[21:43:59] tuelz: I don't think we disagree on much, just some of the finer less important details.
[21:45:44] smathy: ...I think maybe we disagree on the importance of those finer points too. I've seen plenty of n00bs add devise and not realize that they really still needed to understand how to secure their app, potential attack vectors, etc..
[21:46:22] momomomomo: has joined #RubyOnRails
[21:47:55] smathy: ...I think the advice should be: "It's super advanced so you should know what you're doing, or hire/partner-with someone who does, otherwise you're fucked."
[21:49:25] baweaver: has joined #RubyOnRails
[21:52:50] Pumukel: has joined #RubyOnRails
[21:54:09] adac: has joined #RubyOnRails
[21:54:28] sinkensabe: has joined #RubyOnRails
[21:57:44] chipotle: has joined #RubyOnRails
[21:58:13] Diabolik: what are the best open source rails projects
[21:58:15] Diabolik: as in to learn from
[21:58:19] FooMunki: has joined #RubyOnRails
[21:58:24] Diabolik: I was looking over the Gitlab repo yesterday for a few hours
[21:58:41] yoongkang: has joined #RubyOnRails
[21:58:41] Radar: Diabolik: https://github.com/solidusio/solidus
[21:58:57] stannard: has joined #RubyOnRails
[22:00:26] Diabolik: interesting Radar
[22:00:28] Diabolik: thanks dude
[22:01:25] Pazician: has joined #RubyOnRails
[22:02:26] workmad3: has joined #RubyOnRails
[22:05:39] VeryBewitching: has joined #RubyOnRails
[22:07:46] htmldrum: has joined #RubyOnRails
[22:08:25] rgrmatt: has joined #RubyOnRails
[22:09:10] WebDevB: has joined #RubyOnRails
[22:09:26] WebDevB: Sorry guys, really struggiling with this.
[22:09:40] WebDevB: Can anyone take a look at this: http://stackoverflow.com/questions/33744232/ruby-on-rails-error-500/
[22:11:05] ruurd: has joined #RubyOnRails
[22:11:21] smathy: webdevb, the first chunk of logs are just warnings, they won't cause 500s, the second though is telling you that `event.has_image?` is trying to call `has_image?` on `nil`, ie. it's telling you that `event` is `nil`.
[22:11:42] Radar: Event.featured.newest is returning no record
[22:11:47] smathy: webdevb, `event` comes from `Event.featured.newest.first` which suggests that `Event.featured.newest` is returning no results.
[22:11:58] yfeldblum: has joined #RubyOnRails
[22:12:20] WebDevB: smathy, thanks for the reply... Is there anything I can do to get round this error?
[22:12:55] VeryBewitching: webdevb: If there's no check being made for the validity of the object, you should put that in place.
[22:13:10] VeryBewitching: Looks like it's coming from the template.
[22:13:34] diegoviola: has joined #RubyOnRails
[22:13:43] smathy: webdevb, I just added my suggestion as an answer: http://stackoverflow.com/a/33745597/152786
[22:13:52] renews: has joined #RubyOnRails
[22:14:23] WebDevB: smathy, thanks is this on home.html.erb?
[22:14:41] smathy: webdevb, might not be what you actually want business-logic-wise, ie. the fact that `Event.featured.newest.first` is `nil` might indicate a deeper problem, but regardless, checking `event` isn't a bad idea.
[22:14:55] kies: has joined #RubyOnRails
[22:15:01] johnflux: has joined #RubyOnRails
[22:15:01] johnflux: has joined #RubyOnRails
[22:15:07] platzhirsch: has joined #RubyOnRails
[22:15:08] smathy: webdevb, I answered it in the form of "change x to y" - so that should be done wherever x is.
[22:15:18] WebDevB: ok thanks.
[22:15:25] VeryBewitching: webdevb: From your error, home.html.erb seems likely
[22:15:29] smathy: webdevb, you will also need to trigger a reload of your app, usually done by: `touch tmp/restart.txt`
[22:15:39] VeryBewitching: webdevb: But there's a partial rendered too, it could be in there.
[22:16:08] WebDevB: ok uploaded the file but still getting the error
[22:16:19] WebDevB: I need to run that touch tmp/restart.txt
[22:16:25] smathy: webdevb, you read my com....yes.
[22:16:57] platzhirsch: I have an AR class called AggregatedListenerData which is based on AR ListenerData, I've written a little method which computes based on a query the AggregatedListenerData, any good class method names for this? Harvest, compute, retrieve,..?
[22:17:13] WebDevB: smathy do i do this with the root app?
[22:17:34] smathy: platzhirsch, "computes" doesn't really explain what it's doing.
[22:17:40] smathy: webdevb, yes.
[22:17:40] platzhirsch: accumulate maybe? smathy
[22:17:56] platzhirsch: AggregatedListenerData.accumulate(parameteres to define scope)
[22:17:58] stannard_: has joined #RubyOnRails
[22:18:04] ruurd: aggregate?
[22:18:31] platzhirsch: ruurd: yeah maybe just aggregate again, I guess I frowned a bit of it because it's part of the class name, but in essence...
[22:19:04] ruurd: It /is/ aggregating something is it?
[22:19:48] ruurd: accumulate has a connotation of addition for me...
[22:20:16] smathy: The class name `AggregatedListenerData` suggests the data is already aggregated btw.
[22:20:30] trosborn: has joined #RubyOnRails
[22:20:50] ruurd: aggregating is more like raking a bunch of stuff together and letting a bunch of operations loose on it to calculate counters and medians and whatnot
[22:20:55] smathy: platzhirsch, seeing as this seems to be an operation class, maybe you want the class name to be AggregateListenerData, and then just call your method `call` or `run` or something.
[22:21:10] rdavila: has joined #RubyOnRails
[22:21:26] ruurd: ListenerDataAggregator#aggregate then
[22:21:27] platzhirsch: smathy: yeah, I agree
[22:22:04] smathy: Make it `call` and then you can use the call style syntax.
[22:22:29] ruurd: Still the class name is not good...
[22:22:33] platzhirsch: call style syntax?
[22:22:43] ruurd: AggregateListenerData
[22:23:03] ruurd: ListenerDataAggregate
[22:23:11] broman: has joined #RubyOnRails
[22:23:12] ruurd: ListenerAggregateData
[22:23:30] broman: how can i configure a route to the public/uploads folder?? i need the files to be accessible
[22:23:39] platzhirsch: ruurd: probably the last :)
[22:23:40] exadeci: has joined #RubyOnRails
[22:24:03] platzhirsch: smathy: you mean Proc.call
[22:24:09] ruurd: platzhirsch naming classes is the hardest thing of all
[22:24:14] ruurd: he does yes
[22:24:24] WebDevB: dammm smathy, still getting error 500.
[22:24:25] platzhirsch: yeah :) cool, well in anyway thanks for the input
[22:24:42] Doddlin: has joined #RubyOnRails
[22:25:09] Rafaka: has joined #RubyOnRails
[22:25:21] ruurd: broman how does rails do that with styles and scripts and stuff?
[22:25:33] broman: ruurd, excelent question!
[22:25:35] Doddlin: does anyone have either a recommendation on what JS-framework to use or an article comparing some of the majors?
[22:25:38] pydave6367: has joined #RubyOnRails
[22:25:47] smathy: platzhirsch, no, call style syntax is: AggregateListenerData.()
[22:25:56] smathy: platzhirsch, that calls the `call` class method.
[22:26:25] dede__: has joined #RubyOnRails
[22:26:36] broman: this is what I'm getting No route matches [GET] "/home/breno/enfaseweb/uploads/cef6278e3a352f8658518f3ccd5e5d5466b081ed.png"
[22:27:51] Rafaka: hey guys.. I haven???t done any Rails stuff since version 3.2. What is the best path to take to ???upgrade??? myself?
[22:28:05] smathy: broman, in dev or prod?
[22:28:37] smathy: Rafaka, get Radar's excellent book Rails 4 in Action.
[22:29:31] Rafaka: smathy: thanks i???ll look into it
[22:29:52] helpa: Rails 4 in Action - http://manning.com/bigg2 - An excellent book combining Rails and TDD/BDD development. Written by Rebecca Skinner, Steve Klabnik, Ryan Bigg, Yehuda Katz
[22:30:01] djbkd: has joined #RubyOnRails
[22:30:13] doodlehaus: has joined #RubyOnRails
[22:30:52] Megamos: has joined #RubyOnRails
[22:31:17] stannard: has joined #RubyOnRails
[22:31:47] WebDevB: sorry smathy: you there?
[22:32:02] smathy: webdevb, I am.
[22:32:38] smathy: webdevb, "still getting" means to me that the error log is precisely the same, which means that your app hasn't restarted, work out how to make that happen.
[22:34:09] x-light: has joined #RubyOnRails
[22:35:50] stannard_: has joined #RubyOnRails
[22:36:24] Radar: Thanks smathy :)
[22:36:41] sniperhaxor: I have a rather unorthodox question: Do you guys think it is a good idea to look for a place to work externally if you have this thought of you traveling while working on client projects? I somehow think this is a rather unrealistic dream after looking into sites like elance, etc.
[22:36:43] WebDevB: smathy, here is the latest
[22:36:45] WebDevB: http://codeshare.io/CNUvc
[22:36:51] Aeyrix: http://www.mikeperham.com/2015/11/16/sidekiq-4.0/
[22:37:04] smathy: webdevb, holy shit that's hard to read, gist instead please.
[22:37:35] Aeyrix: sniperhaxor: Remote work as an engineer is somewhat common in an established company.
[22:37:40] smathy: sniperhaxor, huh?
[22:38:00] WebDevB: haha sorry
[22:38:00] WebDevB: https://gist.github.com/ScottBaxter1/19977c60efd7094c6e7e
[22:38:07] stannard_: has joined #RubyOnRails
[22:38:16] Doddlin: If I will have 5 different usertypes, what is preferrable, adding ???usertype???-column on ???User??? or creating all 5 different types using Devise generator?
[22:38:24] smathy: webdevb, right so line 272 hasn't changed: https://gist.github.com/ScottBaxter1/19977c60efd7094c6e7e#file-gistfile1-txt-L14
[22:38:36] broman: send_file sends the file... i want to display on the browser
[22:38:42] smathy: webdevb, so your new code isn't being seen by the server, which means that it hasn't restarted.
[22:38:45] broman: what's the alternative method?
[22:38:58] smathy: webdevb, you need to make that happen.
[22:39:03] WebDevB: ok 1 second.
[22:39:05] sniperhaxor: Aeyrix: Yeah, I'm looking more into finding jobs specifically catered to working remotely enough so to even be able to travel to other countries. Although, I feel like any company that is offering that may not be so excited about the work unless they are trying to hit on remote work as one of the good aspects of working for them.
[22:39:32] smathy: broman, !xy
[22:39:32] helpa: broman: 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
[22:39:52] Aeyrix: sniperhaxor: What you're looking for is "paid leave".
[22:40:04] Aeyrix: You can't just go and travel the world while you have responsibilities that you're being paid for.
[22:40:11] smathy: broman, I asked you earlier if your 404 was in dev or prod?
[22:40:18] quazimodo: has joined #RubyOnRails
[22:40:19] aep: has joined #RubyOnRails
[22:40:29] aep: why does config.assets.digest not apply to image_tag?
[22:40:30] rgtk: has joined #RubyOnRails
[22:40:40] aep: is there another way to prevent image caching for those?
[22:40:53] Radar: [09:40:04] <Aeyrix> You can't just go and travel the world while you have responsibilities that you're being paid for.
[22:40:58] Aeyrix: Radar: s t o p
[22:41:00] Radar: ^ This is what I did while I was working at Spree Commerce :)
[22:41:02] smathy: sniperhaxor, biggest issue will be timezones, "remote" doesn't usually mean "completely async"
[22:41:03] Aeyrix: There are exceptions.
[22:41:10] Aeyrix: Radar: Yes, and how did you enjoy Spree in the end? :^)
[22:41:18] broman: smathy, that part i solved already! now i want it to display instead of sending to download
[22:41:20] messine: has joined #RubyOnRails
[22:41:24] Radar: Aeyrix: We all know the end to that story.
[22:41:31] trosborn: has joined #RubyOnRails
[22:41:31] Aeyrix: or, well D:
[22:41:31] broman: smathy, actually, i want the browser to decide
[22:41:40] smathy: broman, you "solved it" by using send_file?
[22:41:43] Aeyrix: broman: Oh
[22:41:46] Aeyrix: disposition: inline
[22:41:51] Aeyrix: ish, look up "disposition"
[22:41:59] sniperhaxor: I'll chat about this some other time
[22:42:09] Radar: Got to go catch a flight probably.
[22:42:11] Radar: #firstworldproblems
[22:42:22] Aeyrix: I used to travel so much as part of my job,
[22:42:24] broman: smathy, that and other thins.. created the route and the controller method
[22:42:27] Aeyrix: it's kind of a love hate thing.
[22:42:34] Aeyrix: I love airports and new places. I hate being away from my home.
[22:42:41] smathy: broman, right, and this is for a static file in your public/uploads folder?
[22:42:47] Radar: I love SOME airports and absolutely loathe planes.
[22:42:54] Radar: Mainly for their crowded-ness
[22:43:04] smathy: broman, your system is horribly broken if you're using send_file to "solve" that problem.
[22:43:10] broman: smathy, uploaded file
[22:43:18] smathy: broman, so?
[22:43:19] pydave6367: has joined #RubyOnRails
[22:43:19] matthewd: aep: Do you mean "images in public/"? Because asset references in image_tag should get digests.
[22:43:20] broman: why is that broken?
[22:43:28] orikremer: has joined #RubyOnRails
[22:43:30] broman: this is exactly what i need
[22:43:46] Aeyrix: broman: What was your problem, exactly? Apologies, I can't scroll up that far.
[22:43:47] broman: but instead of the browser downloading it, i need it to display in the case of a img, or a pdf
[22:43:55] smathy: broman, you need your Rails app to stream the data to the browser instead of your httpd doing what it does best?
[22:44:07] broman: Aeyrix, im creating an upload application
[22:44:11] broman: httpd does it better
[22:44:24] smathy: broman, is that a question?
[22:44:42] smathy: broman, so, anyway, your 404 issue isn't solved if you're now using some hacked in routes and send_file in your Rails app.
[22:44:52] WebDevB: smathy, ok ran touch and I can see ruby running when using top and the site isn't accessible... here is the log though now
[22:44:54] WebDevB: https://gist.github.com/ScottBaxter1/d42efd0f2f4533dc9034
[22:44:56] smathy: broman, the file is sitting in your public/uploads folder right?
[22:44:59] broman: smathy, what's the best way then?
[22:45:00] WebDevB: 272 still hasn't changed
[22:45:05] broman: it's there
[22:45:06] aep: matthewd: no in assets/
[22:45:06] Aeyrix: in that case
[22:45:10] momomomomo_: has joined #RubyOnRails
[22:45:10] smathy: broman, right, so serving it has nothing to do with Rails.
[22:45:13] Aeyrix: What httpd are you using?
[22:45:27] broman: i don't know what httpd i will be using
[22:45:34] Aeyrix: ACTION recommends nginx.
[22:45:36] smathy: broman, are you getting the 404 in dev or prod?
[22:45:36] Aeyrix: You should pick one now.
[22:45:37] Radar: broman: Which part of "Event.featured.newest.first is returning nil" is hard to understand?
[22:45:52] broman: Radar, ???????
[22:45:53] Aeyrix: Radar: That was webdevb not broman
[22:45:58] smathy: broman, ok, and how are you running your server?
[22:45:59] Radar: Whoops, wrong perosn.
[22:46:00] Radar: webdevb: ^
[22:46:05] broman: smathy, rails s
[22:46:08] Aeyrix: ACTION is the mediation master.
[22:46:15] Aeyrix: So, dev right now.
[22:46:39] smathy: webdevb, right, as I said, the touch works for most app servers, obviously not yours - you need to find out how to restart your app server, and then do that.
[22:46:59] broman: webdevb, what's the server?
[22:47:21] momomomomo: has joined #RubyOnRails
[22:47:25] messine: Q, in my project when a topic is created an op is as well. I'm doing this through nested attributes in the topic form. The op, or post, has a topic_id foreign key which is validated. How am I to assign a topic_id to a post when the topic hasn't been created yet? Because of the post validation the topic cannot be saved
[22:47:32] WebDevB: broman it's a Ubuntu
[22:47:34] smathy: broman, so you're running `rails s` and that file exists at the path public/uploads/cef6278e3a352f8658518f3ccd5e5d5466b081ed.png and yet your `rails s` won't serve it at: http://localhost:3000/uploads/cef6278e3a352f8658518f3ccd5e5d5466b081ed.png ??
[22:48:07] broman: exactly this, smathy
[22:48:08] smathy: broman, see your error mentioned the absolute filename: "/home/breno/enfaseweb/uploads/cef6278e3a352f8658518f3ccd5e5d5466b081ed.png" - which it shouldn't.
[22:48:08] roxtrongo: has joined #RubyOnRails
[22:48:15] broman: webdevb, ubuntu is your OS...
[22:48:20] fryguy: whether you allow the rails application server to serve static assets or not is a configuration setting that is turned off by default in production
[22:48:21] smathy: broman, !gist the code showing how you made that path.
[22:48:21] helpa: broman: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[22:49:02] WebDevB: sorry broman what is it you want to know.
[22:49:05] broman: smathy, actually... No route matches [GET] "/public/uploads/cef6278e3a352f8658518f3ccd5e5d5466b081ed.png"
[22:49:18] smathy: broman, ok, that's still wrong.
[22:49:25] broman: webdevb, i want to know what rails server you are using
[22:49:27] Aeyrix: smathy: Wasn't this an issue with older versions of Rails?
[22:49:36] Aeyrix: smathy: I recall having this conversation a few months ago.
[22:49:37] dopie: Hello if I'm using a method in various places in the application in different controllers I would put it in application helper correct?
[22:49:38] broman: smathy, what do you want me to gist??
[22:49:45] smathy: broman, the URL for the oublic/uploads folder is just /uploads/etc...
[22:49:49] Radar: dopie: "various places" be more specific, please.
[22:50:08] Aeyrix: dopie: Application helper is for application-wide view helping stuff.
[22:50:08] dopie: Different Controllers
[22:50:14] fryguy: dopie: no
[22:50:25] smathy: Aeyrix, I don't know what you remember, your initial advice this time around was to add disposition: inline
[22:50:27] matthewd: aep: Then you need to describe your observed problem... for your current question, I'm not sure what the answer is, but I think it's the same as "why is rails written in python?"
[22:50:32] Radar: dopie: If it's for controllers, then it goes in ApplicationController
[22:50:49] dopie: If its for views it goes into app helper
[22:50:50] Aeyrix: smathy: Well that combined with a config change would "solve" this issue but not in the way you and I would consider it solved.
[22:50:55] smathy: broman, I want you to gist the code that's generating the path you show above.
[22:50:58] nertzy2: has joined #RubyOnRails
[22:51:01] AnoHito_: has joined #RubyOnRails
[22:51:14] WillAmes: has joined #RubyOnRails
[22:51:17] axl__: has joined #RubyOnRails
[22:51:17] smathy: broman, either the "/home/breno/enfaseweb/uploads/cef6278e3a352f8658518f3ccd5e5d5466b081ed.png" path you mentioned earlier, or the "/public/uploads/cef6278e3a352f8658518f3ccd5e5d5466b081ed.png" path you just mentioned.
[22:51:27] Aeyrix: Issues like this are why I develop using a httpd nowadays.
[22:51:30] workmad3_: has joined #RubyOnRails
[22:51:51] _djbkd: has joined #RubyOnRails
[22:51:51] aep: matthewd: nah, its some handling with asset location i think. since i use image_tag '/assets/images/bla'
[22:52:06] aep: probably not the right way. was too lazy to figure out the correct path back then
[22:52:26] matthewd: aep: Oh.. yeah, don't do that. Newer versions actively complain about it.
[22:52:36] aep: the lazyness..
[22:52:55] smathy: webdevb, if your client/customers aren't going to be too miffed, just restart the whole host.
[22:53:36] WebDevB: ok thanks smathy
[22:53:40] tetraktys: has joined #RubyOnRails
[22:54:41] Killerkeksdose_: has joined #RubyOnRails
[22:55:20] SanguineAnomaly: has joined #RubyOnRails
[22:55:23] StaticVoid: has joined #RubyOnRails
[22:55:27] Rennex: has joined #RubyOnRails
[22:55:31] six: has joined #RubyOnRails
[22:55:57] queequeg1: has joined #RubyOnRails
[22:56:23] baweaver: has joined #RubyOnRails
[22:56:59] maxx88_: has joined #RubyOnRails
[22:57:31] simplyia_: has joined #RubyOnRails
[22:57:47] robbyoconnor: has joined #RubyOnRails
[22:57:55] yaewa: has joined #RubyOnRails
[22:58:16] sloggerkhan: has joined #RubyOnRails
[22:58:33] axl__: has joined #RubyOnRails
[22:58:34] VeryBewitching: has joined #RubyOnRails
[22:58:48] gbailey-: has joined #RubyOnRails
[22:58:58] Cache_Money1: has joined #RubyOnRails
[22:59:35] loglaunch: has joined #RubyOnRails
[22:59:54] Scient: has joined #RubyOnRails
[23:00:03] jwaldrip___: has joined #RubyOnRails
[23:00:06] ekem: has joined #RubyOnRails
[23:00:26] Paradox: has joined #RubyOnRails
[23:00:31] _joelsmith: has joined #RubyOnRails
[23:00:36] thejoecarroll: has joined #RubyOnRails
[23:00:39] stannard: has joined #RubyOnRails
[23:01:17] purplexed-: has joined #RubyOnRails
[23:01:18] purplexed-: has joined #RubyOnRails
[23:01:24] ianfleeton: has joined #RubyOnRails
[23:02:01] Darmani: has joined #RubyOnRails
[23:02:01] Shapeshi1ter: has joined #RubyOnRails
[23:02:03] svkurowski_: has joined #RubyOnRails
[23:02:03] Pro|_: has joined #RubyOnRails
[23:02:12] Depili_: has joined #RubyOnRails
[23:02:14] htmldrum: has joined #RubyOnRails
[23:02:17] skyjumpe1: has joined #RubyOnRails
[23:02:25] robbyoconnor: has joined #RubyOnRails
[23:02:28] jcm__: has joined #RubyOnRails
[23:03:09] diego2: has joined #RubyOnRails
[23:03:11] diego2: has joined #RubyOnRails
[23:03:22] Darmani: has left #RubyOnRails: ()
[23:03:45] skyjumpe1: has joined #RubyOnRails
[23:05:01] darrencauthon: has joined #RubyOnRails
[23:05:27] WebDevB: smathy well thankyou so so much matey
[23:05:30] WebDevB: all sorted now.
[23:05:39] smathy: webdevb, you're welcome.
[23:05:50] zmyrgel2: has joined #RubyOnRails
[23:06:10] djinni`_: has joined #RubyOnRails
[23:06:20] lubekpl: has joined #RubyOnRails
[23:06:28] jpterry_: has joined #RubyOnRails
[23:06:57] robbyoconnor: has joined #RubyOnRails
[23:07:09] csmb_: has joined #RubyOnRails
[23:07:29] njero: has joined #RubyOnRails
[23:07:32] stevenleeg: has joined #RubyOnRails
[23:07:34] zz_timnovinger: has joined #RubyOnRails
[23:07:36] CodingWolf: has joined #RubyOnRails
[23:07:46] waka: has joined #RubyOnRails
[23:07:51] swhitt: has joined #RubyOnRails
[23:07:53] lorn: has joined #RubyOnRails
[23:07:58] voker57: has joined #RubyOnRails
[23:08:38] Megamos: has joined #RubyOnRails
[23:08:52] bodie_: has joined #RubyOnRails
[23:09:26] ankhers: has joined #RubyOnRails
[23:10:41] shathoma: has joined #RubyOnRails
[23:10:54] shathoma: Quick question here is the gist:
[23:11:00] shathoma: https://gist.github.com/codejoy/19be7b182e372dd98e76
[23:11:24] shathoma: Got an error, I think its my mapping in my select_tag helper. Not sure though as I feel my relations on some of the models are sort of complex.
[23:11:38] jessemcgilallen: has joined #RubyOnRails
[23:12:15] broman: has joined #RubyOnRails
[23:12:20] diego1: has joined #RubyOnRails
[23:12:22] diego1: has joined #RubyOnRails
[23:12:32] duncannz: has joined #RubyOnRails
[23:13:30] duncannz: has joined #RubyOnRails
[23:13:38] jmaradin: has joined #RubyOnRails
[23:13:54] epitron: has joined #RubyOnRails
[23:13:56] richipargo: has joined #RubyOnRails
[23:14:29] gremly: has joined #RubyOnRails
[23:14:30] duncannz: has joined #RubyOnRails
[23:15:06] avelldiroll: has joined #RubyOnRails
[23:15:12] messine: has joined #RubyOnRails
[23:15:13] test_user384: has joined #RubyOnRails
[23:16:41] threeminutemonta: has joined #RubyOnRails
[23:16:50] riotjones: has joined #RubyOnRails
[23:17:38] rhizome: shathoma: you probably want to use plain collection_select
[23:18:45] Axsuul: has joined #RubyOnRails
[23:19:07] rhizome: hah, your associations are like something i would come up with. hard to say what you should do about all that because it's business-rule'y
[23:20:40] northfurr: has joined #RubyOnRails
[23:21:26] stannard_: has joined #RubyOnRails
[23:23:26] messine: to answer my earlier question, I was trying to bypass the validations of a resource when using that resource in a parent models nested attributes. In the parent model you can simply disable validation on the associations with 'validate: false'. easy peasy
[23:24:59] StickyBuns: has joined #RubyOnRails
[23:25:38] StickyBuns: has left #RubyOnRails: ()
[23:27:08] Cache_Money1: has joined #RubyOnRails
[23:28:03] shathoma: @rhizome okay I will check into just the collection_select
[23:28:32] axsuul_: has joined #RubyOnRails
[23:28:49] shathoma: I think its getting me cause I want to map the group_location_ids I have for a provider in their provider_location table to a group_location name that comes from the GroupLocations table
[23:29:18] annlewis: has joined #RubyOnRails
[23:29:38] northfurr: has joined #RubyOnRails
[23:31:46] mary5030: has joined #RubyOnRails
[23:32:09] nya: has joined #RubyOnRails
[23:33:12] Ropeney: has joined #RubyOnRails
[23:34:54] Spami: has joined #RubyOnRails
[23:36:01] DrShoggoth: has joined #RubyOnRails
[23:36:48] diegoviola: I'm not sure what I'm doing wrong here, but I have these models: https://gist.github.com/diegoviola/6190cb9d38e038f37aa6 -- I want to be able to add data to the models (associated data) by doing o = Order.new o.buyer.new; o.seller.new and pass in the data
[23:37:04] diegoviola: but I can't currently with that set up, is there a better way?
[23:37:33] diegoviola: I'm doing this from the rails console, not a form
[23:37:46] someish: has joined #RubyOnRails
[23:39:20] pkrnj: has joined #RubyOnRails
[23:39:36] safety_cut: has joined #RubyOnRails
[23:42:40] Scriptonaut: has joined #RubyOnRails
[23:43:16] juddey: has joined #RubyOnRails
[23:43:28] IrishGringo: has joined #RubyOnRails
[23:44:20] doodlehaus: has joined #RubyOnRails
[23:45:03] workmad3: diegoviola: you probably want o.build_buyer and o.build_seller
[23:47:00] gambl0re: has joined #RubyOnRails
[23:47:07] diegoviola: but is that really the best way to build the data on the associated mdoels? how do I handle the id's, etc?
[23:47:18] diegoviola: I'm parsing data from a CSV and inserting it
[23:48:17] workmad3: diegoviola: when you save the order, it'll handle grabbing the ids and saving them
[23:48:57] roxtrongo: has joined #RubyOnRails
[23:49:15] diegoviola: workmad3: cool, I'll try that, thanks
[23:54:40] mikajo: has joined #RubyOnRails
[23:55:15] banister: has joined #RubyOnRails
[23:55:47] vigintas: has joined #RubyOnRails
[23:59:25] trosborn: has joined #RubyOnRails