« Back to channel list

#RubyOnRails - 16 August 2014

« Back 1 day Forward 1 day »
[00:01:07] Joe-T: this might be relevant http://www.davidverhasselt.com/set-attributes-in-activerecord/
[00:03:06] Cache_Money: I've successfuly received an API Token from POST /api/sessions?username=x&password=x However, I'm not sure how to configure the request for /api/users https://github.com/jamesotron/Blogomat/blob/master/app/controllers/api_controller.rb
[00:03:44] Cache_Money: I thought it would pass { 'HTTP_AUTHORIZATION': <api-token> } in the header but that didn't work...
[00:04:11] Cache_Money: ^ app is based on this tutorial: http://resistor.io/blog/2013/08/07/mimimal-api-authentication-on-rails/
[00:08:42] Cache_Money: This is the error I get: "Processing by Api::UsersController#index as JSON. Filter chain halted as :api_session_token_authenticate! rendered or redirected"
[00:08:53] bricker`work: nobitanobi: sweet! Glad you're learning, that's why I open source everything
[00:09:10] nobitanobi: bricker`work: if you need any help with anything
[00:09:13] bricker`work: everything I'm legally allowed to, anyways :P
[00:09:17] nobitanobi: it would be really nice for me to try to do it
[00:09:22] nobitanobi: and do a pull request so you can check
[00:10:10] bricker`work: nobitanobi: nothing comes to mind, there aren't many people using my libraries so not many issues get opened up
[00:10:26] bricker`work: one of them will hit big some time
[00:13:21] nobitanobi: bricker`work: I have worked solo for so long. And when I try to go into an open source projects, usually the tickets opened seem too big for me.
[00:14:50] pontiki: hallo railsters
[00:17:13] hephaestus_rg: hi, if i want to remove invalid characters from a twitter hashtag, which characters should i remove
[00:17:32] hephaestus_rg: for example #F-150 isnt a valid hashtag, because it becomes #F
[00:18:31] pontiki: hash tags on twitter are only letters and digits
[00:20:41] hephaestus_rg: ok then, that makes it kind of simple
[00:23:42] Cache_Money: I added puts request.headers.inspect and found "HTTP_HTTP_AUTHORIZATION" instead of "HTTP_AUTHORIZATION". I only passed in { 'HTTP_AUTHORIZATION': <api-token> } in my headers. Can anyone explain why this would happen?
[00:26:09] rhizome: because rails automatically prepends HTTP_
[00:27:21] kaspergrubbe_: its actually done by rack :-)
[00:29:03] rhizome: if actioncontroller is included
[00:49:15] n4l: can anyone help me with a problem here?
[00:49:33] n4l: I need to reroute a bad url to a good one that is a resource.
[00:49:47] n4l: in routes I've tried:
[00:49:55] Cache_Money: It looks like Rails prepends "HTTP_" to my clients request.headers. http://stackoverflow.com/questions/2311883/authorization-header-in-ruby-on-rails-accessed-with-key-http-authorization-inste
[00:50:03] Cache_Money: Can I modify this code so that it doesn't happen? https://github.com/jamesotron/Blogomat/blob/master/app/controllers/api_controller.rb Or should I just tell my clients to use 'AUTHORIZATION' in their header requests?
[00:50:49] Cache_Money: rhizome: What would you recommend I do?
[00:50:59] n4l: get "/posts/badpostrequest" => redirect("/posts/goodpostrequest")
[00:51:26] n4l: in routes but this doesn't work.
[00:51:40] n4l: (this is a one-off situation.)
[00:59:18] helpa: n4l: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[00:59:25] Radar: n4l: "doesn't work" isn't a useful description.
[01:03:32] jtperreault: n4l: maybe check out http://guides.rubyonrails.org/routing.html#redirection
[01:04:16] jtperreault: n4l: but yeah, not enough info to really help you well
[01:10:10] n4l: Radar: the post resource looks like it gets priority over get "/posts/bad" => redirect("/posts/good")
[01:10:24] Radar: n4l: Depends on where your routes are.
[01:10:26] helpa: n4l: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[01:10:27] Radar: n4l: !gist
[01:10:40] Radar: If the redirect route is after "resources :posts", then resources :posts will take priority
[01:11:09] n4l: Radar: the ridirect route is before "resources :posts"
[01:11:17] Radar: n4l: then that should taje priority
[01:11:27] n4l: but resources still runs instead.
[01:11:36] Radar: n4l: Show us the routes please.
[01:11:43] n4l: tries to query the db
[01:14:51] n4l: https://gist.github.com/anonymous/3807ef3c80799516b21a
[01:18:58] luckyruby: ah, the day you learn about #delegate and clean up all these unnecessary methods
[01:19:26] pipework: Just wait until you learn that mixins are best when they only contain methods that set up delegation to other objects.
[01:19:57] Radar: n4l: Can you show us the log output for the request?
[01:22:51] n4l: Radar: ahhh looks like it just started working.
[01:23:06] n4l: have no idea why.
[01:23:20] Radar: n4l: because it saw me and it was SCARED
[01:23:31] Radar: I have that effect on code sometimes
[01:23:53] viiralvx: Jesus Christ
[01:24:01] pipework: Cheese & Rice
[01:24:07] viiralvx: Like a little bit of water got on my Macbook Pro's trackpad
[01:24:11] viiralvx: And now it's going bonkers.
[01:25:02] helpa: viiralvx: If you want to attract the attention of a sevenseacat, place an apple laptop and a sludgehammer in the middle of an empty room. One will appear quickly.
[01:25:02] pipework: viiralvx: !sevenseacat
[01:25:06] pipework: Best solution^
[01:25:18] viiralvx: What's a sludehammer?
[01:25:38] n4l: Radar: must be! thank :)
[01:25:54] n4l: *thanks
[01:26:35] pipework: viiralvx: no one said sludehammer.
[01:26:48] viiralvx: sludge* Sorry. Fail.
[01:27:26] pipework: viiralvx: A septic tank.
[01:27:34] viiralvx: Oh, interesting.
[01:29:16] pipework: viiralvx: !g sludgehammer
[01:33:26] viiralvx: Back to writing tests, yay~
[01:36:09] viiralvx: What are y'alls opinions on using a Rails-based API with a front-end framework? :O
[01:38:17] pipework: viiralvx: Rails is an API building framework.
[01:38:44] viiralvx: pipework: That's what I meant. I think I worded that poorly.
[01:38:45] pipework: What you send to the client to evaluate and run doesn't really matter to rails.
[01:39:26] pipework: viiralvx: Is your question closer to, "What do you think of using a frontend framework to build an application that runs on the client and talks to a rails api?"
[01:40:02] viiralvx: Yes pipework, thank you. Like Angular, Backbone, Ember, Knockout, etc. That's what I meant to say. :D
[01:40:35] pipework: viiralvx: While I hate almost everything out there in terms of framework and anything that wants to muddle my markup, I don't hate people too much for using them.
[01:41:03] yza: viiralvx thats what my first project is in rails
[01:41:11] yza: using rails as backend and angularjs as front
[01:41:30] viiralvx: pipework: Almost everything? What don't you hate? :P
[01:41:46] pipework: viiralvx: Libraries. Small, compact, wonderful libraries.
[01:42:12] viiralvx: yza: Nice, I wanted to avoid complicating the learning process, so I just stuck with using Ruby on Rails by itself.
[01:42:31] viiralvx: yza: Next project probably will use a front-end framework, I have an idea for an app that I wanna build.
[01:42:39] viiralvx: pipework: Seems valid.
[01:42:47] yza: viiralvx i been at it about one month straight
[01:43:00] viiralvx: Same here, lol.
[01:43:02] yza: viiralvx i been at it about one month straight atleast 70hrs a week
[01:43:09] viiralvx: I have a 40 hour/week job
[01:43:15] viiralvx: Haven't been putting in that much time to it.
[01:43:27] yza: viiralvx I really like angularjs for the front end
[01:43:30] viiralvx: And I've been studying for interviews, I dedicate like maybe 10 hours or so a week to this project.
[01:43:50] viiralvx: Angular seems verbose. I'm thinking Backbone or Ember for my purposes.
[01:44:14] yza: 2way binding and reusuable directives
[01:44:20] viiralvx: I'm thinking about taking a break from my current app and building a quick app for kids to easily compare book prices between our bookstore and Amazon. Netting me some money with the affiliate link. <3
[01:44:22] pipework: I personally hate the dom binding.
[01:44:38] pipework: I got over it after knockout stopped being amusing.
[01:44:39] yza: viiralvx ahh the affilaite link for amazon :P
[01:44:47] pipework: straight databindings tho, ain't so bad.
[01:44:54] pipework: well, data attributes
[01:45:08] yza: two way data binding is pretty intuitive
[01:45:09] viiralvx: I'm having a hard time deciding which front-end framework I wanna learn.
[01:45:10] yza: for me atleast
[01:45:25] viiralvx: yza: It's annoying, the 1 request per second rate limit is the most annoying crap in teh world.
[01:45:50] yza: viiralvx hahaha really didntk now that
[01:46:07] viiralvx: yza: I am writing a parser to look up books and whatnot, lol, but it'd take me forever to parse every single book and store them in a database. But I'm still gonna do it because I think it'd be a good side source of small income to invest.
[01:47:16] yza: codeschool has a video on creating a books reading list using angular/rails and looking isbn numbers/grabbing pictures from amazon
[01:47:26] yza: pretty simple.. actually they have the whole project in angular i think
[01:47:57] viiralvx: Angular is verbose. :/
[01:48:37] yza: yeah well it isnt ruby
[01:48:47] viiralvx: Ha, I still have noobish Ruby skills
[01:48:59] viiralvx: I've been doing mainly Python for 2 years, lol.
[01:49:19] yza: shouldnt be that hard to pickup im coming from C#
[01:49:34] yza: with a few python tutorials under my belt at most
[01:49:41] viiralvx: Nah, it's fine. I just don't know the tricks of Ruby like I do with Python
[01:49:42] yza: (learn python the hard way and the mega flask tutorial)
[01:50:12] viiralvx: Did both of those.
[01:51:01] yza: blah i really need to take time out and learn a testing framework
[01:51:07] viiralvx: I like Flask over Sinatra
[01:51:13] viiralvx: But Rails over Django.
[01:51:24] yza: yeah i like flask
[01:51:34] viiralvx: yza: You aren't writing tests for your code? -____-
[01:51:54] yza: I really really need to
[01:52:09] yza: its become a big pain in the ass
[01:52:19] viiralvx: Stop writing features right now
[01:52:23] viiralvx: And start writing tests
[01:52:25] viiralvx: I was in the same boat as you
[01:52:36] viiralvx: With 0 tests.
[01:52:38] yza: yeah lol roflmao
[01:52:41] viiralvx: I stopped adding features and started doing testing.
[01:52:47] yza: funny i was writing a feature right now
[01:53:24] yza: any suggestions
[01:53:31] pipework: Funny, I was making fun of 'features' in coworkers code.
[01:53:54] yza: so what do most people here use for testing
[01:54:19] pipework: Most my daytime testing is with rspec, but I moonlight with minitest.
[01:55:00] viiralvx: pipework: Werewolf testing?
[01:55:21] pipework: viiralvx: Coworker-driven development
[01:55:29] viiralvx: pipework: Oooooh.
[01:56:31] yza: im gonna go read up on rspec
[01:56:34] yza: its bdd right?
[01:56:50] pipework: yza: It's written to be BDD, but you can fuck it up any number of ways.
[01:56:59] yza: pipework lolll
[01:57:22] yza: that have specflow for C#
[01:57:35] yza: uses cucumber ... .net people are sort of ..
[01:57:53] pipework: I'm not a fan of cucumber.
[01:57:55] helpa: Regex Driven Development. See cucumber.
[02:00:34] yza: im gonna dedicate a few hours tonight to reading up on testing in rails
[02:00:37] viiralvx: That seems terrible.
[02:01:53] winux: What is a good way to access objects with specific attributes in a set of objects? such as id?
[02:02:39] winux: set as in Set
[02:04:07] zlx_star: Sorry, donot know your mean
[02:05:34] winux: zlx_star: so with an Array I could do Array.index{|x| x.id == 7}
[02:05:56] winux: zlx_star: that would get me the index of an object with id 7
[02:06:30] winux: which i could then access using the index, how could the same be done with a set? (Set.new [])
[02:07:21] zlx_star: you want to select some objects in an set?
[02:07:42] zlx_star: with index or attributes?
[02:08:07] winux: with attribute
[02:09:34] zlx_star: set is an Enumerable too, so try select
[02:10:18] zlx_star: Set.select{|s| s.attribute == 'a'}
[02:10:45] winux: zlx_star: looks like set only has the destructive select!
[02:13:39] winux: zlx_star: I lied, thank you
[02:13:45] pipework: winux: Do you want the index or do you want the actual object?
[02:14:11] winux: pipework: the object
[02:14:24] winux: pipework: looks like select does the trick
[02:14:32] pipework: winux: Just the first one that matches or each one?
[02:14:56] winux: pipework: the first, how would you go about multiple?
[02:15:11] pipework: winux: #select, of course.
[02:15:43] pipework: #detect for the first match
[02:16:11] pipework: If you only want the first match, #detect is much better than #select and then #first
[02:16:21] waseem_: #index if you just want the index.
[02:16:35] waseem_: I don't even know the question.
[02:16:41] pipework: waseem_: But you are most right!
[02:16:45] pipework: That's what I love about you.
[02:17:07] waseem_: pipework: You complete me. I sort of complete you.
[02:17:24] winux: pipework: aha, you are right,i forgot that select returned a subset
[02:17:30] winux: pipework: +1
[02:17:44] pipework: waseem_: You encase me, and I absorb you.
[02:18:40] waseem_: pipework: You're like Hydrofluoric acid put inside a non-plastic container.
[02:19:17] pipework: So caustic, you want it.
[02:19:29] winux: someSet.detect{|x| x.foo == "bar" && (x.num == 1 || x.num == 2)}
[02:19:47] winux: still looks ugly as heck, but im sure itll be more efficient than using Array
[02:21:25] pipework: winux: you must mean some_set
[02:22:23] winux: pipework: yes, sorry
[02:22:50] winux: pipework: OOjs habit :/
[02:24:00] pipework: I don't even know what OOjs is
[02:26:10] waseem_: pipework: Juice of a mutant Orange?
[02:26:23] pipework: waseem_: I could buy that.
[02:26:39] waseem_: pipework: I'd drink that and share it with you. :)
[02:27:00] pipework: waseem_: I'd sell it to you and then give you a refund, if you know what I mean.
[02:27:32] winux: pipework: actually, just js
[02:27:35] waseem_: pipework: I'll take that refund and buy some more.
[02:27:42] winux: pipework: too many interviews this week
[02:27:51] winux: cant wait to sleep
[02:27:55] waseem_: winux: Interviews suck.
[02:28:20] winux: waseem_: yea, and the 10 tests that come after the 1st round
[02:28:44] waseem_: pipework: What will your first question be if you had to interview me?
[02:28:45] pipework: waseem_: What will it take to get you to come work with me?
[02:29:04] pipework: Followed up with, "Will Chris kill me?"
[03:30:20] viiralvx: Does one ever truly fall in love with writing tests for Rails?
[03:30:49] joelteon: i sure hope not
[03:30:57] joelteon: although you could probably make a ton of money doing it...
[03:32:06] viiralvx: Lmao, probably.
[03:32:12] viiralvx: God, I should've done this earlier
[03:32:16] pipework: viiralvx: Not for rails, no.
[03:32:21] viiralvx: I have to go back to all my earlier models and add tests, lolol. This sucks.
[03:32:29] pipework: I love writing great tests in ruby for ruby.
[03:32:41] viiralvx: I don't know jack squat about testing
[03:32:44] viiralvx: My school doesn't teach it. -___-
[03:33:02] viiralvx: So I am learning as I go for Rails and probably with all other things I code up from now on.
[03:38:52] Fire-Dragon-DoL: viiralvx: I like testing, but I do it for functionalities I feel it's required
[03:39:11] viiralvx: Fire-Dragon-DoL: So more for Integration Testing?
[03:39:13] Fire-Dragon-DoL: viiralvx: one very good point coming out with tests, is that they prepare you a perfect debugging environment, to fit your needs
[03:39:19] viiralvx: Oh definitely
[03:39:27] viiralvx: This is my first Rails app, so I'm making sure I have tests to cover my ass.
[03:39:38] Fire-Dragon-DoL: viiralvx: mhhh...No, not exactly. If I write a plain model with just a few validation,; I just skip tests for it entirely
[03:39:52] viiralvx: Well, I am not that comfortable with Rails yet, lol.
[03:40:15] Fire-Dragon-DoL: viiralvx: if there is a validation that I'm not sure how it works/I feel it's complicated/etc. I write tests for it
[03:41:07] Fire-Dragon-DoL: but what I like mostly is the fact that when I write tests, I usually setup a db (with factory girl) with all the stuff I need, so I can just put somewhere binding.pry and debug from there, with a perfect environment
[03:41:11] viiralvx: Fire-Dragon-DoL, how long you been in the Rails game for?
[03:41:43] Fire-Dragon-DoL: roughly 2 years? But I started studying it earlier, but I didn't apply it to anything for quite a lot so I consider it roughly 2 years
[03:41:58] Fire-Dragon-DoL: they forced me on PHP
[03:42:01] Fire-Dragon-DoL: for quite a lot
[03:42:09] Fire-Dragon-DoL: I was dying inside, stopped working for anything in PHP
[03:42:29] viiralvx: I just used small frameworks for the last year or so.
[03:42:42] viiralvx: Dabbled with Django, disliked it, moved to Rails instead.
[03:43:21] Fire-Dragon-DoL: I fell in love with ruby syntax, so when I met rails, it became love :P
[03:43:35] kies: yaa writing ruby is so fun :D
[03:43:39] viiralvx: Ruby's syntax is clean
[03:43:47] viiralvx: I really am not a big fan of Python's whitespace-heavy focus. -___-
[03:43:59] Fire-Dragon-DoL: viiralvx: about heavy dinner, it put me sleep from 0:00 to 3:00, then I woke up because dinner was enough heavy that I didn't manage to digest it, lol
[03:44:13] viiralvx: I just skipped dinner this evening
[03:44:14] viiralvx: Not hungry.
[03:44:23] Fire-Dragon-DoL: I can't code when I don't eat <.<
[03:44:45] Fire-Dragon-DoL: you see my coding productivity fall down the more you get near meal time
[03:44:45] viiralvx: Side-effect of my meds is suppressed appetite.
[03:44:54] viiralvx: So I'm used to it.
[03:45:06] viiralvx: But yeah, definitely not. I can't code in the morning until I have some food in my stomach
[03:45:19] viiralvx: Because I haven't taken my meds yet
[03:45:27] viiralvx: And even after taken my meds, I'm already hungry, so it doesn't take away the hunger, lol.
[03:47:00] pipework: I can't eat when I don't code.
[03:47:18] viiralvx: pipework: Wait wut.
[03:48:04] Fire-Dragon-DoL: pipework: I suppose because you don't have a *fork*
[03:48:18] pipework: Fire-Dragon-DoL: I would if I cared.
[04:06:41] muhammadn: viiralvx: me as well. i cannot take my meds with an empty stomach.
[04:06:58] muhammadn: viiralvx: and when i am without my meds, i cannot focus on my work.
[04:08:09] muhammadn: Fire-Dragon-DoL: i cannot fork when i use JRuby. :)
[04:08:52] Fire-Dragon-DoL: muhammadn: that was a terrible one by the way
[04:09:01] Fire-Dragon-DoL: what is the major downside of jruby vs mri?
[04:09:22] waseem_: Java I believe.
[04:09:32] muhammadn: Fire-Dragon-DoL: actually i cannot fork when i do a background job in JRuby.
[04:09:54] muhammadn: waseem_: true.
[04:10:14] muhammadn: but it's multithreaded anyway
[04:11:28] Fire-Dragon-DoL: muhammadn: well, I needed a multithreaded environment for a very particular thing
[04:11:33] Fire-Dragon-DoL: that's why I was asking
[04:12:12] Fire-Dragon-DoL: also, does it run faster on windows than MRI? MRI is completely broken on that O.S. and before you ask, my code involves a game, so windows it's required xD
[04:13:04] pipework: muhammadn: Don't fork :D
[04:13:24] pontiki: at least use a rubber
[04:13:31] muhammadn: FIre-Dragon-Dol: yes, for example, if you write apps for big enterprises that requires it. i use JRuby to take advantage of the Java multithreading.
[04:15:48] muhammadn: Fire-Dragon-DoL: it's more of leverage when i use JRuby with Java's multithreading with Puma (puma.io). But i have problems with doing background process using sidekiq which can be solved.
[04:17:36] pipework: muhammadn: I'm surprised you get to use it in enterprise environments.
[04:17:50] pipework: muhammadn: Why the hell are you wasting your time with sidekiq when you have JRuby?
[04:18:45] muhammadn: pipework: i can develop it faster than writing my own "delayed_job" version with JRuby?
[04:19:15] muhammadn: pipework: i use it to develop apps for telco. (which is the common thing with JRuby if you searched the web)
[04:19:35] pipework: muhammadn: I worked for one, we used erlang and cruby.
[04:19:50] pipework: muhammadn: If I were you, I'd either look for a jvm library, or you could use torquebox (fucking best kitchen sink you'll ever find for any ruby)
[04:21:34] muhammadn: pipework: lol. yeah and i'm unsure about (the docs were outdated) it but i know i can use warbler to make a package out of my app and deploy it in GlassFish or JBoss.
[04:21:46] pipework: muhammadn: quite.
[04:22:13] muhammadn: pipework: then get some support out of it. lol
[04:22:20] muhammadn: pipework: though oracle is not friendly.
[04:22:33] pipework: muhammadn: Oracle doesn't have to be. Use the jdbc
[04:24:39] muhammadn: I have tried InvokedDynamic to speed up my app which is stable in Java 8 then Java 7 and my app loads freakishly fast with Puma and Nginx,
[04:25:04] muhammadn: i mean renders the page faster
[04:27:39] pipework: muhammadn: I haven't tried Java8 yet.
[04:31:02] Fire-Dragon-DoL: mhhh I must check more about jruby
[04:34:21] Fire-Dragon-DoL: "Since it is not possible to obtain??usec??precision under a JVM"?? Is this true? o.o how java can even be used for gaming?
[04:34:39] Fire-Dragon-DoL: ah no wait MICRO second
[05:35:08] rickjamesthethir: finally got my mailer working on my website
[05:39:51] Fire-Dragon-DoL: time to re-try sleep a bit
[05:52:24] bayvakoof: hey does rails set the foreign key method= in a model with a belongs_to relation private?
[05:53:08] bayvakoof: like, post belongs_to user, post.user = @user but (not allowed) post.user_id = #someid...
[05:56:57] pipework: bayvakoof: try showing us the actual code
[05:58:01] bayvakoof: i don't have a problem i was just wondering why rails exposes setting an foreign key attribute on a model that's tied with a belongs_to relation
[05:58:37] bayvakoof: i'm new to rails
[05:59:16] bayvakoof: i thought the little bit i provided was sufficient
[06:01:43] bayvakoof: like i'm writing validation tests for my model, and i have "should have a user_id attribute" and "should respond to user for belongs_to relation" tests
[06:02:01] bayvakoof: i think one of them should be redundant
[06:07:48] bayvakoof: basically i'm wondering if there's a way to protect foreign keys from being assigned
[06:08:22] pipework: bayvakoof: I'm not going to help a hypothetical problem.
[06:09:04] bayvakoof: np pipework, appreciate your attention then, it's ok
[07:15:59] coca_rails: I need help setting up a Solr index. any takers ?
[07:16:22] helpa: coca_rails: How to ask good questions and get great answers: http://www.mikeash.com/getting_answers.html
[07:16:22] pipework: coca_rails: !ask
[07:16:37] pipework: My protip: Don't fuck up
[07:42:50] coca_rails: I have it installed and running ??? I???m having some issues with initial set up though. But let me back up, actually. I want to get your ideas on a better (easier is better for me) way to index PDF files; it would be ideal if the recommended tool has a way to deal with PDF???s on the web and preferably the option to cache them locally if needed.
[07:44:17] Wolland: coca_rails: http://stackoverflow.com/questions/10854858/best-practices-for-searchable-archive-of-thousands-of-documents-pdf-and-or-xml
[07:45:53] coca_rails: Wolland: Reading it now..it looks wonderful so far. Thank you.
[08:04:45] alaing: Any ideas why I 'm getting this error message when i generate a scaffold https://gist.github.com/aliuk2012/8c1bcbaabb4e96237568
[08:05:03] alaing: i'm a bit concerned that it seems to be referencing some ruby 1.9
[08:33:31] cina: Can I bypass ActiveRecord model initialization? (instead of returning an array of models, can it return an array of arrays or hashes?) I need this for performance and ram usage reasons
[08:35:15] tbuehlmann: cina, connection.select_all(your_relation) will return a resultset (or similar) object that has the data in a hash
[08:37:21] cina: tbuehlmann: thanks! that's great! Am I right to think that it's a good idea to prepare the SQL using #to_sql instead of writing the SQL as a string?
[08:37:51] tbuehlmann: I wouldn't write it as string, I'd use a simple AR relation
[08:38:07] tbuehlmann: like `connection.select_all(Project.all)` or whatever
[08:40:18] cina: oh so cool, I didn't know that select_all takes a AR relation as well, thank you! :_
[11:01:44] sonvu_ae: hello folks
[11:02:13] sonvu_ae: i'm newbie to rails and while developing a simple application i get stuck into one problem
[11:02:44] sonvu_ae: My application is a online shopping with a sidebar
[11:03:41] sonvu_ae: In sidebar i render @cart which is define in my StoreController#index
[11:04:02] sonvu_ae: the point is i put render @cart in application.html.erb
[11:04:24] sonvu_ae: when i going to another route like localhost/products
[11:04:32] sonvu_ae: it will not render @cart
[11:04:48] sonvu_ae: unless i put @cart into ProductController#index
[11:05:08] sonvu_ae: Do i have to put @cart into all controller to get works?
[11:06:16] sonvu_ae: Hello? anybody?
[11:07:12] frank_o: sonvu_ae: Nobody's here, come back on monday
[11:07:14] tbuehlmann: if you want to use @cart everywhere, define it in the application_controller
[11:07:23] frank_o: Oops, guess I was wrong :)
[11:07:36] sonvu_ae: hi tbluehlmann, how to do it?
[11:08:46] tbuehlmann: I'd do it like this: https://gist.github.com/tbuehlmann/daacfcfbdba40d3feb34
[11:09:16] sonvu_ae: i mean https://gist.github.com/SonVu/42875d206819e1214c11
[11:09:53] tbuehlmann: ah, so you already have all you need
[11:09:58] sonvu_ae: Please look at my gist, should i remove "private"?
[11:10:42] tbuehlmann: that's okay, so each controller can use it. if you want to use it in the view, make it also a helper method
[11:11:00] sonvu_ae: Yeah i mean how to use it in the view
[11:11:20] sonvu_ae: because i want to render it from "application.html.erb"
[11:12:01] tbuehlmann: like this: https://gist.github.com/tbuehlmann/a1bfa087f3b84f15eb78
[11:12:16] tbuehlmann: then, simply use `current_card`, no need to define an instance variable
[11:13:31] sonvu_ae: thanks you very much tbuelhmann, it works :)
[11:14:07] sonvu_ae: I just begin with the book so i dont have idea which keyword to search for this problem
[11:29:59] pyemkey: Hello, Can you suggest me what is a best part to attach sorting links like: Browse by: region, location, name. I want to hold elements what I searched before and sort only this elements. When I add standard links with param, I am doing "standard" sort and previous results are cleared.
[11:32:18] pyemkey: #companies contains result of searching and inside "filter_sidebar" partial I store filters. https://gist.github.com/pyemkey/d7317f94b87a106df382
[13:19:40] amarraja: I have added an asset to precompile, but it doesn't get compiled to public/assets
[13:19:41] amarraja: config.assets.paths << Rails.root.join("app", "assets", "admin", "stylesheets")
[13:19:41] amarraja: config.assets.precompile += %w( admin.css )
[13:20:30] amarraja: Any ideas where to look? If I request a file to precompile in /app/stylesheets it works, but not app/assets/admin/stylesheets -- even though it is in the asset paths
[13:21:29] Christia1: Is there any automatic way in activerecord to prevent duplicate values by having it automatically remove the old value when the new (duplicate) value is inserted?
[13:23:59] jammanbo: find_or_update
[13:24:28] jammanbo: or is it find_or_build ...
[13:24:31] jammanbo: tsmth like that
[13:25:37] Christia1: jammanbo: what i'm saying is if user A has email address bob@gmail.com, and then user B comes along and sets their email to bob@gmail.com, I want user A's email address to be wiped out
[13:26:12] Christia1: I think i'll probably just have to write a find first and then clear the record
[13:26:28] jammanbo: well, no, obviously ??? that's such an odd desire
[13:26:50] Christia1: it is a bit odd.. it just ensures that a value is unique
[13:26:56] Christia1: but at the same time clobbers the old value
[13:27:30] jammanbo: what are you really doing? presumably not emails.
[13:27:41] Christia1: apple push notification tokens
[13:28:24] jammanbo: and only one user can have them?
[13:29:30] Christia1: well for example say you login to an app as User A, and then logout then login as User B
[13:29:35] Christia1: now both users will have the same token
[13:29:52] Christia1: although you are no longer logged in as User A, that person will still get messages
[13:30:20] Christia1: The token is unique to the device/app
[13:30:53] pyemkey: Hello, Can you suggest me what is a best part to attach sorting links like: Browse by: region, location, name. I want to hold elements what I searched before and sort only this elements. When I add standard links with param, I am doing "standard" sort and previous results are cleared.
[13:31:01] pyemkey: #companies contains result of searching and inside "filter_sidebar" partial I store filters. https://gist.github.com/pyemkey/d7317f94b87a106df382
[13:37:59] yihangho: Is api.rubyonrails.org down?
[13:39:25] pwk: it does not load for me
[13:40:30] frank_o: http://isup.me/api.rubyonrails.org
[13:40:45] frank_o: its not just you :/
[14:14:52] waseem_: Use this for now http://apidock.com/rails
[14:14:58] amarraja: Turns out sprockets has some odd handling with paths. In short, I use a subdir instead and reference admin/blah.css instead.
[14:32:34] muhammadn: There was thing guy we talked about telcos and JRuby.. and he said something about erlang and cruby.. is he here?
[14:32:58] muhammadn: oh. it's pipework
[14:33:16] walidvb: i'm exploring options to create some kind of dropbox-like referral system
[14:34:08] walidvb: was thinking of devise_invitable, but it looks like it create a User, and allows before all inviting by email
[14:34:47] walidvb: not sure this is useful for me. Any hints of gems? the implementation is quite easy anyways, but I thought i'd ask, still
[14:52:27] walidvb: well, slow day on irc ^^
[14:53:08] Jon30: i'd ask a question if i had one
[15:34:53] Fire-Dragon-DoL: 'morning, time to run tests
[16:06:04] RustyShackleford: I forget how to use rvm
[16:06:39] RustyShackleford: I got that installed, as well as ruby, but now I want to install rails and anything else thats necessary
[16:11:13] mikecmpbll: RustyShackleford: gem install rails
[16:11:41] RustyShackleford: do I have to specify a version? I tried that command but it hangs
[16:11:59] RustyShackleford: er nevermind. My VPS is slow I guess
[16:15:56] axilla: ahh, a day of binge watching game of thrones on the couch after a night of pfunk with the wife, and working on a pet project :) Great saturday
[16:16:10] axilla: george clinton & the pfunk
[16:16:21] F__i__L: hello! do you render activemodel errors using activemodel serializers ?
[16:19:02] tbuehlmann: F__i__L, I render them as a simple object like this: `render json: {errors: object.errors.full_messages}.to_json, status: :unprocessable_entity`
[16:21:55] klmlfl: Hello, is this message going through? please type 1 if it is
[16:22:04] klmlfl: I would really appreciate it.
[16:22:50] tbuehlmann: klmlfl, we can read you
[16:23:48] klmlfl: Sweet. My custom IRC client via Arduino worx
[17:01:18] F__i__L: hey guyzz when creating a new resource using activemodel serializers, how do I retrieve its unique url? Using location header ?
[17:14:45] stardiviner: How to generate views template with command "rails" ? Or is there other ways to do it?
[17:15:12] tbuehlmann: stardiviner, I personally just create the file manually
[17:34:42] pipework: stardiviner: What tbuehlmann
[18:17:54] nettoweb: guys I have a list of state in short version??? whats the best way to change it to full names?
[18:18:03] nettoweb: like CA = California
[18:20:50] serraphyn: Just had a question about development time. I have little experience with Ruby or RoR, I have to much with php and some frameworks, what would be a reasonable amount of time to dedicate to building an application that I have in php to RoR for an average developer?
[18:30:39] serraphyn: Has RoR dropped in popularity?
[18:30:53] jstrong: well it's not bleeding edge newest hot shit
[18:31:03] jstrong: it's more like any other established framework and language now
[18:31:18] jstrong: so just because there's not much hype surrounding rails doesn't mean it's not used -it's still heavily used afaik.
[18:31:29] serraphyn: Just seems like the community isn't as active as it was a year or so back
[18:35:08] oxxi: I'm having an issue with the installfest: deploy a Rails app
[18:35:25] serraphyn: I've been on a 1.5 year trek trying different programming languages for web tech and I really would like to find something that I could use as a really marketable skill. I like RoR for a lot of the community last year but I was just concerned that it seems not a lot of things going on any more here compared to other webdev places
[18:35:53] jstrong: webdev is a hyperactive adhd child
[18:36:05] jstrong: anything 6 month or older is ancient news
[18:36:44] oxxi: so what has replaced RoR>
[18:36:49] jstrong: nothing really
[18:37:04] jstrong: people are really excited today about RIA with front end javascript based interfaces
[18:37:07] jstrong: but that doesn't "replace" RoR
[18:37:39] oxxi: MEAN stack maybe?
[18:37:53] atmosx: serraphyn: 20 days
[18:37:58] pontiki: these are not replacements. they are possible alternatives
[18:38:06] atmosx: serraphyn: ~ 3.5 hours per day pure coding
[18:40:11] oxxi: damn i need some help here. trying to follow the installfest tutorial but i can't deploy to heroku.
[18:40:25] pontiki: the one from railsbridge, oxxi ?
[18:40:40] pontiki: what's happening?
[18:40:50] oxxi: an error occurred installing sqlite3
[18:41:03] pontiki: you didn't quite follow the directions, then
[18:41:11] pontiki: because you don't install sqlite3 on heroku
[18:41:18] oxxi: http://pastebin.com/EgYXNG2Y
[18:41:28] oxxi: ok sorry
[18:42:13] pontiki: please look over step 2.2 on http://docs.railsbridge.org/installfest/deploy_a_rails_app and ensure your Gemfile is correct, and that you've run the bundle install
[18:42:31] oxxi: yeah its correct
[18:42:41] serraphyn: atmosx: ah, wow thats a decent learning curve
[18:42:43] oxxi: http://pastie.org/9478773
[18:43:05] pontiki: did you rerunn bundle install?
[18:43:22] oxxi: I'm getting the weird 'pg' error
[18:44:00] pontiki: paste the heroku log
[18:44:18] pontiki: also, is that the entirety of your Gemfile now?
[18:44:33] oxxi: http://pastie.org/9478775
[18:45:13] pontiki: see line 2?
[18:45:14] oxxi: no, theres more of course but I'm just following the tutorial
[18:45:28] pontiki: you're looking on your local machine for the production gems, which would not be installed
[18:45:35] pontiki: that's also NOT a heroku log
[18:46:33] oxxi: can i put the link for the tutorial I'm doing. I'm at step 2.2
[18:46:56] oxxi: http://installfest.railsbridge.org/installfest/deploy_a_rails_app?back=create_a_rails_app
[18:47:48] pontiki: that's the same as the one i posted above
[18:47:52] oxxi: I'm doing it as it says, but when i get to step 2.5, its a no go
[18:48:22] pontiki: so, could you please paste up the heroku log, as I asked?
[18:48:38] pontiki: the output of git push heroku master
[18:50:12] oxxi: ok give me a moment :)
[18:51:53] oxxi: http://pastie.org/9478788
[18:52:02] serraphyn: Do you guys feel the RoR community is lower on stress and anxiety? I get alot of anxiety with php now days
[18:53:25] pontiki: oxxi: did you for sure complete the intervening steps? I think your Gemfile or Gemfile.lock still contains a reference to sqlite3 in production
[18:55:45] pontiki: oxxi, paste the output of `git status`, please
[18:57:16] oxxi: http://pastie.org/9478795
[18:58:20] pontiki: right, that tells me you didn't commit both of those files
[18:58:37] pontiki: so they wouldn't be usable by heroku
[18:59:25] pontiki: enter: git add Gemfile Gemfile.lock
[18:59:39] pontiki: then: git commit -m "Updated Gemfile"
[18:59:54] pontiki: *then* the git push heroku master
[19:02:28] oxxi: pontiki: how come these details were not included in the tutorial?
[19:02:53] pontiki: do you see step 2.4?
[19:03:09] pontiki: the "git add ." ?
[19:03:49] oxxi: yeah i remember doing that
[19:04:02] pontiki: did you change the Gemfile after you had done that?
[19:04:51] rhizome: this data model has a sad
[19:04:52] oxxi: well no because step 2.2 was that part where i edited the Gemfile
[19:05:35] pontiki: then i don't know why it didn't work, because that would have added the Gemfile and Gemfile.lock files and then commited them
[19:06:28] folippi: In a generated controller, most actions have a @model = Model.new variable to play with. The 'show' action doesnt. I'd like to run a method on the model before showing it to the user, how do you do that? Can you just in the body of controller#show add @post = Post.new and then go nuts on it?
[19:09:29] oxxi: pontiki: thx for the help. you get 10,000 points
[19:09:44] pontiki: folippi: before you jump on that, see if there's a before_action at the top of the controller
[19:10:22] folippi: pontiki: oh! Thanks! That makes sense.
[19:17:43] jfelchner: Hey all, I have a general programming question. I'm looking for two things: First is a solution that will let me take a bit of text and, given some keywords, weight that text and drop it into a given "bucket".
[19:18:28] jfelchner: Secondly is a tool that, given I know some text fits within a "bucket", what are the common keywords across multiple bits of text that seem common to other bits which fall into that "bucket".
[19:18:55] Fire-Dragon-DoL: is gem command dead? o.o
[19:19:11] jfelchner: Anyone have any clue or can point me in a few directions?
[19:19:55] Fire-Dragon-DoL: jfelchner: no sorry, looks like something similar to tags
[19:25:20] TeckniX: in Rails 4 how do I get all fields from a find, instead of just a select few?
[19:27:07] gizmore: TeckniX: find returns a model
[19:27:12] gizmore: with all fields
[19:28:10] yza: blah is there an example anywhere for a controller that accepts_nested attributes for a habtm
[19:28:43] yza: having an issue trying to get it to work randomly posting json
[20:01:14] codezomb: I've been trying to call a controller method that has been defined as a helper (helper_method :foo), per the documentation I should be able to call this in the mailer view, but it throws an undefined method error. Am I missing something? https://gist.github.com/codezomb/8936e7e50aceb5228b34
[20:02:08] codezomb: ActionView::Template::Error (undefined local variable or method `current_user' for #<#<Class:0x007ff184cd1248>:0x007ff184cd08e8>):
[20:05:25] codezomb: This says it should just work, right? http://guides.rubyonrails.org/v4.1.2/action_mailer_basics.html#using-action-mailer-helpers
[20:10:58] codezomb: damn, the key is here... AbstractController
[20:45:17] pyemkey: Hello, Can you suggest me what is a best part to attach sorting links like: Browse by: region, location, name. I want to hold elements what I searched before and sort only this elements. When I add standard links with param, I am doing "standard" sort and previous results are cleared.
[20:45:24] pyemkey: #companies contains result of searching and inside "filter_sidebar" partial I store filters. https://gist.github.com/pyemkey/d7317f94b87a106df382
[20:46:49] mastyd: Hey there, if I have a record with a has_many association and I want the associated column to be cleared if the parent is deleted, but I still want the child record to exist, what's the best way of doing that?
[20:47:06] mastyd: Obviously I can't do dependent: :destroy so I was thinking an after_destroy callback?
[20:55:27] diggitydane: How can I sort a hash based on key/values from a different hash? https://gist.github.com/anonymous/e8e6709d7e757b7438fe
[21:00:38] dcas: /msg NickServ help register
[21:12:17] art-solopov: Hello! Do you know any nice RoR courses? I'd like to move beyond the basic guides and research the stuff like authentication and so on and so forth.
[21:13:47] gizmore: art-solopov: authentication depends on the application
[21:14:00] gizmore: in ror you might try "devise" gem
[21:14:38] art-solopov: gizmore: Yeah, but they're basically saying "If you're a beginner, don't use it."
[21:14:54] gizmore: cold water - be like water :P
[21:25:45] goodbomb: can anyone explain to me why running a conditional for populating a boolean field would return this error?: ArgumentError: wrong number of arguments (2 for 1)
[21:26:18] goodbomb: my conditional looks like this: @status == :complete ? true : false
[21:39:08] axilla: hi all, i'm trying to create a database table that has a list of Expense_types.. i want to associate them with expenses.. an expense can have one expense_type. in my expense model I have has_one :expense_type and my expense_type model I have has_and_belongs_to_many :expenses
[21:39:52] axilla: https://gist.github.com/travisdmathis/191ef3585dfc4a9d8591
[21:40:31] rhizome: don't use "type" and use a belongs_to
[21:41:03] axilla: on the type
[21:42:11] axilla: i'm getting a expected model.rb to define MODEL
[21:42:17] axilla: error.. don't get it.
[21:43:51] lupine: does model.rb define a class called Model ?
[21:44:40] gizmore: lupine: not necissarily
[21:44:50] gizmore: lupine: but rails has a convention for autoloader
[21:45:03] lupine: that's where I was going, aye
[21:45:05] gizmore: lupine: singular model names
[21:45:13] gizmore: like models.rb would be a bad name
[21:45:35] gizmore: would make you leave the rails :)
[21:48:00] goodbomb: anyone know why my attempt to change a boolean value in my database returns ???ArgumentError: wrong number of arguments (2 for 1)????
[21:48:25] goodbomb: All I???m doing is: t.completed = true
[21:48:43] rhizome: axilla: that's because you used "type." it's a reserved word.
[21:48:59] gizmore: goodbomb: seems like completed is a function not a db value
[21:49:31] gizmore: goodbomb: do grep -R "def completed" myproject
[21:50:21] goodbomb: it???s not a function, I???m running it in my seeds
[21:50:25] goodbomb: Transaction.create do |t|
[21:50:31] goodbomb: t.completed = true
[21:51:12] goodbomb: this is in my migration file: t.boolean :completed, default: false
[21:53:17] goodbomb: any idea why I???d be getting an Argument Error for that?
[21:55:05] art-solopov: goodbomb: Hmm... Can you try and call t.completed(true)? Just in case?
[21:55:38] goodbomb: so instead of ???t.completed = true??? run ???t.completed(true)"?
[21:56:16] goodbomb: now I get ???ArgumentError: wrong number of arguments (1 for 0)???
[21:56:38] lupine: it's not a naming collision is it?
[21:56:55] lupine: once I had an AR class called Connection
[21:57:03] goodbomb: I wouldn???t think so, but I???ll change the field entirely to be sure
[21:57:06] lupine: belongs_to :connection breaks *so much*
[21:59:11] goodbomb: omg, that must have been it
[21:59:18] goodbomb: changed the db field to is_complete and it works now
[21:59:27] goodbomb: wasted so much time on this
[21:59:32] goodbomb: thanks lupine
[21:59:54] goodbomb: lupine: many thanks
[22:04:10] lupine: goodbomb, a common pattern is to use completed_at :datetime
[22:05:05] goodbomb: yeah, I???ve got that as well, but I also want a database field that I can check for whether it???s completed. Though I suppose I can simply check if completed_at isn???t empty
[22:13:51] gizmore: why doesn??t active record offer a global cache table?
[22:17:11] rickjamesthethir: whats up guys i'm back
[22:20:42] gizmore: hey rickjamesthethir
[22:23:10] gerep: Hi all. I'm using 'bootstrap-sass', '2.3.2.0' on my application but for some reason, the container CSS classes doesn't work, I can use the button styles, etc, but my <div class="container"> doesn't work, any ideas?
[22:24:05] gizmore: gerep: i would not use gems for assest
[22:24:10] gizmore: gerep: i would not use gems for assets*
[22:24:33] gerep: gizmore, good point, I'll try using it without gems...I thought it would be easier =)
[22:24:45] gerep: gizmore I'll try it and see if it works, thanks ;)
[22:25:01] gizmore: my experience so far: not really easier, and it breaks stuff maybe on gem update
[22:25:21] gizmore: happened for jquery, i never used asset gems again :)
[22:25:44] gerep: gizmore yes, good advice, thanks a lot for sharing
[22:26:01] gizmore: probably because application code is not a gem, and has no dependency on e.g. jquery
[22:26:54] gizmore: and probably because ruby gems are not as easy to break - in the end i guess it??s because it is not really easier to use
[22:27:30] yza: anyone around on saturday
[22:32:04] capin: sometimes
[22:34:19] hadifarnoud: I want to build my own vps server. it's easy enough to do for php. However, for RoR, there is always something wrong with tuts I follow.
[22:34:36] hadifarnoud: did anyone build a RoR server here?
[22:34:54] hadifarnoud: PS: I cannot use heroku instead.
[22:35:03] yza: hadifarnoud no but i have to tomorrow
[22:35:12] yza: same here cant use heroku one sec i got a bookmark
[22:35:15] yza: maybe it will help you maybe it wont
[22:35:19] capin: hadifarnoud: you talking about using RoR on a VPS?
[22:35:39] hadifarnoud: yes capin. a RoR server on a VPS
[22:35:44] capin: that's what i do
[22:36:20] yza: https://gorails.com/deploy/ubuntu/14.04
[22:36:21] capin: im using apache / mod_rails on my server, seems to work well
[22:36:33] hadifarnoud: capin: cool. any good tutorial?
[22:36:42] hadifarnoud: thanks yza. I try that as well
[22:37:02] yza: well im not sure if it applies but i gotta set something up with aws tomorrow and will be checking that out
[22:37:29] capin: hadifarnoud: what you do you need a tutorial for? just install ruby, bundler, rails, and whatever webserver you plan on using
[22:37:57] capin: hadifarnoud: what OS is your VPS running?
[22:38:08] hadifarnoud: capin: Ubuntu 14.04
[22:38:26] yza: you using aws?
[22:38:31] yza: by chacne?
[22:38:42] hadifarnoud: yza: no, Rackspace
[22:38:46] capin: wow didn't know you could get Ubuntu in a VPS, im using debian myself
[22:39:05] hadifarnoud: capin: lol, of course you could
[22:39:15] capin: hadifarnoud: what web server do you plan on using?
[22:39:30] hadifarnoud: capin: prefer nginx, but apache works just fine
[22:39:44] capin: have you installed mod_rails?
[22:39:53] capin: ie phusion passenger?
[22:40:08] capin: that's if you plan to go the apache route
[22:40:29] hadifarnoud: ok, so the server is passenger and apache is the proxy in this case
[22:40:29] capin: hadifarnoud: how much memory does your VPS have?
[22:40:32] yza: could anyone help me out with a posting issue concerning nested attributes has many through
[22:40:34] yza: https://gist.github.com/christru/57c745f9d27d71fdc356
[22:41:30] capin: hadifarnoud: so just download mod_rails and compile it, you should have enough memory to compile locally on yoru VPS
[22:41:36] yza: really struggling for a few days trying to figure this out :-/
[22:41:46] hadifarnoud: capin: if you bare with me, I'll do it right now.
[22:41:50] Wolland: yza: you need to add hiden field to handle CSRF if you are using your own forms
[22:41:57] hadifarnoud: will come back if I had any issues
[22:42:04] yza: Wolland im actually using Angularjs
[22:42:30] yza: thats whats so confusing for me learning rails. not a bunch of info out there everything is all rails or nothing
[22:43:09] yza: Wolland i do need to handle CSRF anyways though right now as this is internal i have it disabled
[22:43:28] Wolland: that's why you are getting that error anyway
[22:44:18] Wolland: yza: http://stackoverflow.com/questions/14734243/rails-csrf-protection-angular-js-protect-from-forgery-makes-me-to-log-out-on
[22:45:43] yza: wolland my post works fine besides issues with trying to post to nested attribute with has many through i have protect_from_forgery disabled
[22:45:48] yza: for the time being
[22:45:51] yza: one sec reading more on that post
[22:47:48] Wolland: looks like it's not seeing perception id
[22:48:01] yza: Wolland i think that is a issue and thats why im getting the "Can't verify CSRF token authenticity" when posting but it is disabled in rails per protect_from_forgery with: :null_session
[22:48:14] yza: Wolland yep
[22:48:31] yza: Wolland i was trying to find an example of the post or if i need to modify my create action
[22:48:56] Wolland: which url are you posting it to?
[22:49:05] yza: api/strains
[22:49:13] yza: that controller i showed you
[22:49:38] Wolland: k i see it
[22:50:18] yza: i tried changing my relationship from hmabt seeing as posting for nested attributes looks like it only works with 1-many
[22:51:06] yza: followed instructions per rail cast dropped old table created new model with perception_id:integer, taste_id:integer
[22:52:33] yza: @strain.perception.tastes << Taste.find(3) seems to work in console etc
[22:56:30] yza: ran across this article
[22:56:30] yza: http://stackoverflow.com/questions/2182428/rails-nested-form-with-has-many-through-how-to-edit-attributes-of-join-model
[23:22:19] lemonmaster: Hello, I have a query that requires querying facebook API for each record. So as you can imagine, it can be a bit slow. I am using futuroscope for concurrency, which helps, but I think it would be even better if I display the results as the futuroscope objects generates it through Ajax, any idea on how to approach this problem?
[23:27:00] mrkris: I've been experiencing some crazy page load times in development and production mode on a 4.1.4 app. Newrelic is showing me that the bottleneck is the pages controller and rendering an action. Funny thing is the action does nothing but render a static file. The application.html.haml doesn't include partials or anything. It's almost as barebones as it gets, yet page loads are often 1-3 seconds. Anyone run into this with 4.1.4?
[23:27:28] mrkris: It's making development on this app very painful.
[23:27:51] mrkris: I've run it with webrick, through pow, and nothing is helping.
[23:39:09] yza: this is driving me nuts
[23:42:23] F__i__L: has anyone deployed emberjs using ember-cli with rails ?
[23:42:28] F__i__L: I mean in heroku..