« Back to channel list

#RubyOnRails - 07 February 2016

« Back 1 day Forward 1 day »
[00:00:55] sandstrom: has joined #RubyOnRails
[00:02:23] benlieb: has joined #RubyOnRails
[00:06:00] HenriettaSalt: has joined #RubyOnRails
[00:07:17] rickmasta: has joined #RubyOnRails
[00:07:41] one_zero: has joined #RubyOnRails
[00:08:52] jxpx777: has joined #RubyOnRails
[00:14:48] tego101: has joined #RubyOnRails
[00:17:18] kies^: has joined #RubyOnRails
[00:17:30] droptone: Question: We're currently in the process of converting a Rails 4.2 app to an SPA using AngularJS so we can embed a persistent music player in the footer
[00:19:04] droptone: but we came across volt....
[00:19:20] smathy: n00bdev, !use
[00:19:21] helpa: n00bdev: 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.
[00:19:23] droptone: Would volt at its current stage of development be a viable option for converting what is essentially a stock site...
[00:19:41] Tempesta_: has joined #RubyOnRails
[00:19:55] droptone: With basic user forms, such as "name", "city", etc, paperclip for user avatars, really nothing too fancy.
[00:20:03] rickmasta: has joined #RubyOnRails
[00:20:20] droptone: Although the current DB is MySQL, and I'm trying to determine if Volt supports other SQL DB types, as of a few months ago it only supported MongoDB
[00:20:46] droptone: Regardless, if anyone here has worked with Volt, would it be a viable option for creating an entirely SPA site that featured a persistent music player in the footer?
[00:21:00] droptone: For the sake of example, say the rest of the site only contained a few forms.
[00:21:03] Wobni: has joined #RubyOnRails
[00:21:04] jtdowney_: has joined #RubyOnRails
[00:21:43] Cervajz_: has joined #RubyOnRails
[00:21:59] arashb: has joined #RubyOnRails
[00:22:11] starfox_sf: has joined #RubyOnRails
[00:22:22] Papierkorb: droptone: Try asking the Volt guys directly, as it basically has nothing to do with rails. It still only supports Mongo afaik though. Also, it's pre 1.0
[00:22:51] droptone: Papierkorb: will do, thank you.
[00:23:05] Papierkorb: droptone: Some people in here prefer Ember.js (and some react.js) over AngularJS. Can't comment on that myself, I used neither, I only don't like Angular :)
[00:23:32] braian: Papierkorb: Hi, can I ask you about my problem with rails? :D
[00:23:43] droptone: Yes, a good friend of mine who is more familiar with this doens't like Angular either, but since it's my first SPA I'm working off guides, and literally every "Built an...
[00:23:44] Papierkorb: braian: You can ask everyone in the channel
[00:23:47] kies^: has joined #RubyOnRails
[00:23:57] droptone: ...SPA site in Rails 4.2" guide or walkthrough leverages Angular so far.
[00:24:03] droptone: That's the only reason I'm using it.
[00:24:12] droptone: Built == Build
[00:24:15] matthewd: has joined #RubyOnRails
[00:24:29] quazimodo: has joined #RubyOnRails
[00:24:36] shaman42: has joined #RubyOnRails
[00:24:40] mhoungbo_: has joined #RubyOnRails
[00:25:25] dexter-tzu: has joined #RubyOnRails
[00:25:34] wethu: has joined #RubyOnRails
[00:27:51] AzaToth_: has joined #RubyOnRails
[00:28:00] _Tariq_: has joined #RubyOnRails
[00:28:25] Papierkorb: droptone: Just remembered, with Rails5 comes Turbolinks3, which you could use to build what you want using a standard rails app
[00:28:50] timanema: has joined #RubyOnRails
[00:28:59] Papierkorb: droptone: No need to implode your software stack for a single music player
[00:29:31] roshanavand: has joined #RubyOnRails
[00:30:16] droptone: Papierkorb: Well the problem is, this is a user project that was originally on Rails 3.2, we ported it to Rails 4.2.5, it's got live user data, etc.
[00:30:23] moeabdol: has joined #RubyOnRails
[00:30:38] pwnd_nsfw: has joined #RubyOnRails
[00:30:47] droptone: I have about 3 weeks to complete the project; are Devise and the standard major gems supported on Rails 5.x yet?
[00:31:04] rickmasta: has joined #RubyOnRails
[00:31:33] Papierkorb: droptone: Ah. Rails5 is in beta right now, and won't be out in 3 weeks time anyway. Maybe next project then :)
[00:31:55] braian: Hi, I'm havving a problem with my app. I have a create form in a modal window with ajax. I can create a product with the form, no errors in the process, no errors in chrome console, no errors in the server console. The only problem is with the render of products on the table inside the view. My codes: https://gist.github.com/braiandickson/4a3df8b1a142a9e129ed . Thanks!
[00:31:57] nodejunkie: has joined #RubyOnRails
[00:32:06] brendan-: has joined #RubyOnRails
[00:32:32] baweaver: has joined #RubyOnRails
[00:33:12] droptone: Papierkorb: Absolutely, but thank you much for the quality advice.
[00:33:36] braian: I can create a product but the view doesn't refresh automaticly. :/
[00:35:17] bauruine: has joined #RubyOnRails
[00:36:00] ElFerna: has joined #RubyOnRails
[00:36:42] felltir: has joined #RubyOnRails
[00:39:32] _Tariq: has joined #RubyOnRails
[00:40:47] rickmasta: has joined #RubyOnRails
[00:42:48] _Tariq: has joined #RubyOnRails
[00:43:36] droptone: Having trouble determining what the volt channel is on freenode, any idea?
[00:44:48] Olipro_: has joined #RubyOnRails
[00:45:25] _Tariq: has joined #RubyOnRails
[00:46:07] droptone: Papierkorb: So assuming I'm having to use the standard Rails 4.2 SPA dev technique, I'm currently following walkthroughs to build out the controllers and views under /app/assets/javascripts
[00:46:16] droptone: Creating subdirs like javascripts/componenents/whatever
[00:46:33] droptone: and including them in application.js using require_tree ./componenets and what not
[00:46:51] droptone: So is it safe to assume I'm going to have to rewrite all existing erb views in straight HTML and review all ruby-based controllers in JS?
[00:47:09] smathy: has joined #RubyOnRails
[00:47:12] sandstrom: has joined #RubyOnRails
[00:48:50] rickmasta: has joined #RubyOnRails
[00:48:57] rogue_koder: has joined #RubyOnRails
[00:50:15] Devalo: has joined #RubyOnRails
[00:51:35] intrigueD: has joined #RubyOnRails
[00:52:01] droptone: Well no, looks like I may be able to leverage erb for the views
[00:53:59] Deck`: has joined #RubyOnRails
[00:55:07] braian: Any1 can help me with my problem?
[00:56:16] rogue_koder: has joined #RubyOnRails
[00:57:07] Scripore: has joined #RubyOnRails
[00:57:39] sleungcy: has joined #RubyOnRails
[00:58:26] rickmasta: has joined #RubyOnRails
[01:04:27] sandstrom: has joined #RubyOnRails
[01:04:28] DEA7TH: has joined #RubyOnRails
[01:07:18] droptone: DEATH HIMSELF HAS ARRIVED
[01:07:31] _Tariq: I need help
[01:07:36] _Tariq: with RSpec and StringIO
[01:08:28] _Tariq: Specifically I need stringIO to return headers
[01:08:33] _Tariq: which is an array of strings
[01:08:33] rickmasta: has joined #RubyOnRails
[01:08:41] _Tariq: but I don't know how to get it to work
[01:10:31] braian: Hi, I'm havving a problem with my app. I have a create form in a modal window with ajax. I can create a product with the form, no errors in the process, no errors in chrome console, no errors in the server console. The only problem is with the render of products on the table inside the view. My codes: https://gist.github.com/braiandickson/4a3df8b1a142a9e129ed . Thanks!
[01:11:30] IrishGringo: has joined #RubyOnRails
[01:15:47] braian: I can create a product but the view doesn't refresh automaticly. :/
[01:17:31] DmitryBochkarev: has joined #RubyOnRails
[01:20:07] rhizome: braian: it doesn't look like your create redirects to anything with a list of products
[01:20:18] rhizome: redirects or renders
[01:21:46] sandstrom: has joined #RubyOnRails
[01:22:11] HenriettaSalt: has joined #RubyOnRails
[01:24:23] braian: mmm I think the problem is here: $('#products').html("<%= j render(:partial => 'product', locals: { product: @product} ) %>");
[01:26:39] rhizome: check it out and report back
[01:26:43] corioliss: has joined #RubyOnRails
[01:28:12] braian: no errors in consoles, just nothing happens
[01:29:10] quazimodo: has joined #RubyOnRails
[01:29:13] quazimod1: has joined #RubyOnRails
[01:29:39] rickmasta: has joined #RubyOnRails
[01:30:09] tego101: has joined #RubyOnRails
[01:30:14] benlieb: can someone help me understand why relation.count is returning a hash sometimes in rails 4?
[01:30:42] benlieb: for the life of me I can't see how this is a good idea. Apparently it happens when there is a group by and aggregate calcualtion
[01:30:54] benlieb: it's breaking all kinds of things in my port to 4
[01:31:18] benlieb: my pagination is hosed, etc
[01:32:53] rogue_koder: has joined #RubyOnRails
[01:36:02] fryguy: benlieb: well, if you are grouping things, then you need to return multiple results. If it weren't a hash, how else could you represent that data?
[01:36:46] droptone: Question: I'm coding an SPA in Rails 4.2 and I have an erb file in a javascripts subdirectory, and an exception "undefined method `output_buffer=`" on the content_for tag in the erb file.
[01:37:01] droptone: Currently I"m using the require_tree directive to load all these javascript assets.
[01:37:19] droptone: Which is based on this walkthrough: http://blog.magmalabs.io/2015/12/02/how-to-create-your-own-single-page-application-autoresponder-with-rails-4-and-angular-js-part-2.html
[01:37:58] droptone: In that example, he does the exact same thing, loads all javascript assets under app/assets/javascripts/name_of_project/components via a require_tree directive, and he has
[01:38:03] benlieb: In some situations that may be true. I'm am table1.*, count(table2 stuff) as some_table2_calcs. Only one column represents grouped data.
[01:38:06] fryguy: droptone: there's no page rendering context when you compile javascript assets because it happens as part of asset precompilation, it compiles befor eyour app ever runs
[01:38:07] droptone: haml files in there he uses as the "views"
[01:38:23] benlieb: In mind it should just be treated as another column no the relation.
[01:38:39] sandstrom: has joined #RubyOnRails
[01:38:44] benlieb: but I can see how this could go many different ways
[01:38:45] droptone: fryguy: Thank you. So how is it that this guy in this walkthrough is using a similiar require_tree directive to load all these assets and he keeps .haml files in these javascript subdirectories?
[01:38:48] fryguy: benlieb: and if multiple groupings need to be returned?
[01:39:07] droptone: I'm doing the same as him but leveraging .erb instead of haml.
[01:39:23] droptone: I suppose I could explicitly require the individual JS files so it doesn't attempt to compile the erb itself.
[01:39:36] fryguy: droptone: there isn't a reference to content_tag at all in that page you linked, so i don't know what it is you are copying
[01:40:02] droptone: fryguy: Right, that's true, I'm in the process of attempting to convert a Rails 4.2 site to an SPA, so the view code he and I are using doesn't exactly match.
[01:40:32] droptone: Would a solution be to explicitly require just the individual JS files instead of require_tree so Rails doesn't attempt to precompile the .erb files stored in those dirs?
[01:41:39] droptone: One thought that comes to mind is converting the erb to straight HTML but since this guy is using haml I figured erb might work as well, but perhaps it doesn't work for specific methods such as content_for
[01:41:40] benlieb: fryguy: I think it's not unreasonable to want access to this info as a hash, but I don't think it should be through the count method, because the only way to know how many results were returned, is to count the hash. And thats silly. This is from a complex search method, that I decided to sort by an aggregate result.
[01:41:41] fryguy: droptone: i guess
[01:41:44] fryguy: what you are doing is pretty weird
[01:42:05] droptone: fryguy: Converting a Rails 4.2 site to an SPA? What's weird, the method I"m using or doing it at all?
[01:42:11] fryguy: benlieb: maybe your query is wrong then, because the count should only return 1 record for each groupipng
[01:42:18] fryguy: droptone: the method you are doing
[01:42:24] droptone: If the former, is there a superior way for converting a site you recommend?
[01:42:26] fryguy: putting rails views in app/assets is weird
[01:42:42] droptone: Right, I did it based on this specific tutorial where he does the same, but with haml.
[01:42:50] benlieb: fryguy: it does when you call each, but not when you call count
[01:42:55] droptone: Hmm, perhaps I could reference them in the JS but leave them in their standard views dirs?
[01:43:02] fryguy: benlieb: maybe show the query
[01:43:51] benlieb: fryguy: I could, but it's really hairy.
[01:44:05] benlieb: it uses pg_search, ransack, scopes, etc.
[01:44:06] droptone: I was under the impression based on this tutorial that they needed to be in the assets/javascripts/name_of_app/componenents directory because that's what this guy was doing here.
[01:44:18] droptone: But if that's not necessary, by all means.
[01:44:45] benlieb: Here's the relation: Genre.all.by_fuzzy_keyword(pg_ft_search_string(:keyword)).by_instructor_fullname(pg_ft_search_string(:instructor)).ransack(ransack_search_options).result. active.unscope(:order).by_num_lessons.page(page)
[01:45:06] benlieb: it's the by_num_lessons that makes count go to hash
[01:45:12] SteenJobs: has joined #RubyOnRails
[01:45:14] benlieb: the query would actually flood the list...
[01:45:21] fryguy: benlieb: use a pastebin then
[01:47:47] rubyonrails180: has joined #RubyOnRails
[01:48:08] rubyonrails180: has joined #RubyOnRails
[01:49:30] droptone: fryguy: I changed the templateUrl: statement in the pagesDirective.js to point to ../../views/pages/faq.html.erb for testing, and it did load, but it appears to be reloading the entire page
[01:49:35] droptone: instead of staying static as is intended with an SPA
[01:49:45] droptone: is that expected in a development state?
[01:50:00] stardiviner: has joined #RubyOnRails
[01:50:32] fryguy: no idea, i don't know how you have things set up, and I'm not about to read that entire page you linked to make a guess
[01:50:41] droptone: fryguy: Here's my miscpagesDirective.js: https://gist.github.com/anonymous/450c936a6077eade5e51
[01:51:42] johnflux: has joined #RubyOnRails
[01:51:45] rickmasta: has joined #RubyOnRails
[01:51:50] fryguy: droptone: views won't be accessible, and erb or not-precompiled assets certainly won't be. like i said, what you are doing is very weird.
[01:52:15] Pazician: has joined #RubyOnRails
[01:52:21] fryguy: javascript is running on a different machine from your rails, and rails doesn't by defalut expose endpoints to ship uncompiled code
[01:52:27] droptone: Right, but what I'm doing is based on that tutorial, so that tutorial is very weird?
[01:52:34] fryguy: droptone: seems like it
[01:52:50] droptone: Ok, is there a superior guide or tutorial for building an SPA in Rails 4.2 that isn't weird?
[01:52:59] droptone: That you're aware of I can follow?
[01:53:11] droptone: Volt won't work and Rails 5 / Turbolinks 3 is too early in beta.
[01:54:24] fryguy: droptone: you'll notice that templateUrl in the document doesn't contain haml
[01:54:43] Deck`: has joined #RubyOnRails
[01:55:32] droptone: So basically, all views would need to be straight HTML if they're to be part of the SPA and exist in the client-side DOM?
[01:55:53] sandstrom: has joined #RubyOnRails
[01:56:09] fryguy: so I guess you can put haml or erb in the asset pipeline, but you won't be able to put a lot of differnet types of context rendering there because it compiles as part of asset precompilation, where there is no view context
[01:56:21] droptone: Perhaps opal would be a superior solution
[01:56:39] droptone: If I'm trying to leverage prebuilt erb
[01:56:53] fryguy: droptone: what do you need erb for?
[01:56:56] fryguy: that html can't do
[01:57:00] djbkd: has joined #RubyOnRails
[01:57:30] droptone: Well, I don't have to have erb, it's just this is a decently large production site with live user data that was Rails 3.2, we've successfully ported it to Rails 4.2, now we're attempting to convert it to an SPA...
[01:57:37] droptone: so we can insert this persistent music player in the footer the client wants.
[01:57:51] droptone: I was just trying to leverage the existing erb so we didn't have to rewrite every view
[01:57:55] droptone: or convert every view to straight HTML
[01:59:26] droptone: I mean, save just rendering a view and getting source, is there a preferred method or online converter for converting erb to html?
[01:59:48] droptone: Or is simply rendering the existing view and copying / pasting the source from the browser acceptable? I would presume not
[01:59:51] fryguy: looks like the asset pipeline will do it for you
[01:59:56] fryguy: as long as you aren't using view context stuff
[02:00:49] droptone: I really appreciate the advice fryguy, thank you for your time.
[02:00:55] _Tariq: has joined #RubyOnRails
[02:01:47] droptone: fryguy: But, for example, the legacy code included form_for and simple_form_for helpers in the erb, would we need to rewrite these in straight HTML?
[02:02:05] rickmasta: has joined #RubyOnRails
[02:02:10] droptone: I'm not sure I know which all Rails methods would fall under the category of "view context"
[02:02:30] fryguy: droptone: form_for what?
[02:03:17] fryguy: droptone: asset precompilation happens before you even start your webserver. so you can't assume a controller has been run, you can't assume a user exists, you can't assume a session exists, or anything
[02:03:21] droptone: well, form_for a given object, such as, a user updating aspects of their profile.
[02:03:47] fryguy: you are probaby going to have to rewrite your whole app to go SPA
[02:03:51] fryguy: for dubious benefits at best
[02:03:55] droptone: But as I understand it there is a way to allow for SPA client-side interaction with server-side DB records and what not.
[02:04:10] fryguy: droptone: you create an API
[02:04:35] droptone: fryguy: Well is there another method you're aware of for maintaining persistence so a music player can remain persistent in the footer while the user navigates around the site?
[02:04:48] droptone: We're only doing this because it appears that's the only logical option
[02:05:29] fryguy: pjax and/or turbolinks are maybe worth consideration, or lol frames
[02:05:49] droptone: If there was a way to break out that specific aspect of the site, say the footer
[02:07:45] rogue_koder: has joined #RubyOnRails
[02:08:19] urbanmonk: has joined #RubyOnRails
[02:12:04] rickmasta: has joined #RubyOnRails
[02:13:08] sandstrom: has joined #RubyOnRails
[02:15:07] FooMunki: has joined #RubyOnRails
[02:15:42] Deck`: has joined #RubyOnRails
[02:15:55] macsteps: has joined #RubyOnRails
[02:16:06] droptone: Hmm, looks like this exists: https://github.com/coreysyms/foundationStickyFooter
[02:16:29] droptone: We use foundation, would it be possible to leverage this to create a persistent footer that contains a music player that doesn't reload as the user navigates around the site?
[02:17:33] rhizome: nothing to do with foundation tmk
[02:17:36] fryguy: droptone: that's for styling as your scroll, not page transitions
[02:18:32] djbkd: has joined #RubyOnRails
[02:19:33] droptone: Ok, thank you.
[02:19:35] droptone: And then we have this: http://www.audioplayerhtml5.com/sticky/index.html
[02:19:42] rhizome: droptone: there's info out there on persistent music players. essentially the player is the container page for other content that is changed without page reload
[02:20:05] rickmasta: has joined #RubyOnRails
[02:21:06] fryguy: here's a wordpress solution that might be reasonable to port https://wordpress.org/plugins/audiobar/
[02:21:17] aloneintheworld: has joined #RubyOnRails
[02:21:49] droptone: fryguy: Interesting
[02:22:41] rhizome: thikn of it like iframes or the old sites that would frame other sites for ad traffic
[02:22:54] arashb: has joined #RubyOnRails
[02:24:40] Oliphaunte: has joined #RubyOnRails
[02:25:30] urbanmonk: has joined #RubyOnRails
[02:25:34] baweaver: has joined #RubyOnRails
[02:27:01] s2013: anyone here ever use the koala gem to get facebookinfo? any reason why my graph.get_object('me') isn't returning email address?
[02:27:09] s2013: does fb require something special for it?
[02:28:44] rickmasta: has joined #RubyOnRails
[02:30:22] sandstrom: has joined #RubyOnRails
[02:30:47] droptone: fryguy: One thing I don't understand about this SPA layout is the routing. With or without this particular walkthrough, when performing this SPA functioniality
[02:31:14] droptone: where does the routing take place? I've got the erb pages converted to straight HTML and placed where they were in the JS assets, but I keep getting routing error.s
[02:31:25] droptone: I"m curious as to what a default JS SPA-based routing config would look like, in any format.
[02:31:25] rickmasta: has joined #RubyOnRails
[02:31:34] droptone: If I could see it in any given format I could determine how it works.
[02:31:38] fryguy: the routing takes place in javascript, using pushState, unless you need to support older browsers, then you do hash-style urls
[02:32:14] fryguy: or, if you don't care about the back button (you should), just not even using pushState
[02:32:34] harly__: has joined #RubyOnRails
[02:33:07] droptone: fryguy: Got it. And on this walkthrough, it appears as if he's using assets/javascripts/name_of_app/states.js to declare the routes:
[02:33:10] droptone: https://gist.github.com/anonymous/630409dd70508d9deae2
[02:33:23] droptone: That's the choice part of page 1 of that walkthrough, is that where one would normally decare the routes?
[02:33:45] rickmasta: has joined #RubyOnRails
[02:34:13] droptone: And so if I wanted to add say, oursite.com/about, you would mimick that "State Configurations" section at the bottom of that gist?
[02:34:29] fryguy: i guess so
[02:34:36] fryguy: this is #rubyonrails, not #javascript
[02:34:46] droptone: hah, ok, I'll ask there, thank you.
[02:34:49] fryguy: i do nothing with angular, so I don't know the specifics
[02:34:51] Radar: ##javascript*
[02:36:46] Oliphaunte: has joined #RubyOnRails
[02:37:03] Cervajz: has joined #RubyOnRails
[02:38:50] pawnbox: has joined #RubyOnRails
[02:39:11] Oliphaunte: has joined #RubyOnRails
[02:39:23] _Tariq: has joined #RubyOnRails
[02:47:08] duderon__: has joined #RubyOnRails
[02:47:17] Oliphaunte: has joined #RubyOnRails
[02:47:38] sandstrom: has joined #RubyOnRails
[02:49:43] _Tariq: has joined #RubyOnRails
[02:49:57] RegulationD: has joined #RubyOnRails
[02:50:04] timanema: has joined #RubyOnRails
[02:51:55] braian: Hi guys, I have a problem with a view. My form creates a product with ajax but never updates the product's table. No errors on consoles.
[02:52:00] braian: Here is my code: https://gist.github.com/braiandickson/4a3df8b1a142a9e129ed
[02:52:14] braian: the controller, js.erb and index
[02:54:02] braian: I don't know what or where else to do now
[02:55:00] fryguy: braian: you are processing as JSON, not JS
[02:55:14] fryguy: braian: show the form
[02:55:33] braian: ok! Ill upload the form!
[02:55:49] Oliphaunte: has joined #RubyOnRails
[02:56:24] SteenJobs: has joined #RubyOnRails
[02:56:41] braian: fryguy: https://gist.github.com/braiandickson/4a3df8b1a142a9e129ed
[02:56:45] braian: there is the form
[02:56:45] fryguy: braian: also i'm not sure what you are trying to do in line 23 but i think you just need format.js
[02:56:55] jgt4: has joined #RubyOnRails
[02:57:07] fryguy: i think you don't want data-type: json on the form
[02:57:17] fryguy: you aren't working with json, you are working with javascript
[02:58:58] braian: the line must say just "format.js" then?
[02:59:07] Oliphaunte: has joined #RubyOnRails
[02:59:12] sleungcy: has joined #RubyOnRails
[02:59:17] braian: or need a hash with params?
[02:59:48] fryguy: i think just format.js is fine
[03:00:02] braian: ok, Ill try that
[03:01:33] braian: the same, the view doen't update but the product was created
[03:02:04] konsolebox: has joined #RubyOnRails
[03:02:32] fryguy: what does the http response look like
[03:03:21] braian: the chrome's console say: XHR finished loading: POST "http://localhost:3000/products".
[03:04:20] braian: and the server console all is ok
[03:04:40] fryguy: what's the actuall http response
[03:04:53] sandstrom: has joined #RubyOnRails
[03:05:16] braian: status 200. that code?
[03:07:19] seaworthy: has joined #RubyOnRails
[03:07:42] braian: fryguy: sorry, where can I see the body?
[03:08:29] fryguy: in firefox I find it in the network tab and click on it and it's in one of the tabs
[03:09:47] braian: ill upload it
[03:10:39] roshanavand: has joined #RubyOnRails
[03:12:00] braian: fryguy: Here: https://gist.github.com/braiandickson/4a3df8b1a142a9e129ed/edit
[03:12:07] braian: the headers and the preview
[03:12:47] Oliphaunte: has joined #RubyOnRails
[03:13:53] fryguy: braian: you have some mismatch going on, because in the response, it's calling .html, and in your create.js.erb it's calling .append
[03:14:00] fryguy: so maybe it's calling a different create.js.erb
[03:14:15] braian: I just have one :/
[03:14:23] fryguy: is it maybe unsaved?
[03:14:47] braian: it is saved
[03:15:11] braian: I have this problem since 3 days ago
[03:15:12] fryguy: well i don't know what to tell you then, because the output doesn't match what's in create.js.erb
[03:15:23] fryguy: so, find out what's up with that
[03:15:55] rickmasta: has joined #RubyOnRails
[03:16:00] macsteps: has joined #RubyOnRails
[03:18:15] Deck`: has joined #RubyOnRails
[03:22:10] sandstrom: has joined #RubyOnRails
[03:26:46] strass: has joined #RubyOnRails
[03:28:15] Oliphaunte: has joined #RubyOnRails
[03:32:23] sevenseacat: has joined #RubyOnRails
[03:32:36] xardion: has joined #RubyOnRails
[03:36:59] rickmasta: has joined #RubyOnRails
[03:38:09] pawnbox: has joined #RubyOnRails
[03:39:36] truenito: has joined #RubyOnRails
[03:39:39] sandstrom: has joined #RubyOnRails
[03:41:21] Thouren: has joined #RubyOnRails
[03:45:52] bob14: has joined #RubyOnRails
[03:46:09] Oliphaunte: has joined #RubyOnRails
[03:49:35] nodejunkie: has joined #RubyOnRails
[03:50:42] Devalo: has joined #RubyOnRails
[03:51:43] yfeldblum: has joined #RubyOnRails
[03:53:20] Pazician: has joined #RubyOnRails
[03:56:37] rickmasta: has joined #RubyOnRails
[03:56:59] sandstrom: has joined #RubyOnRails
[03:57:06] n00bDev: has joined #RubyOnRails
[03:57:13] Conflict: has joined #RubyOnRails
[03:59:46] Tempesta_: has left #RubyOnRails: ()
[03:59:52] Tempesta: has joined #RubyOnRails
[03:59:54] sleungcy: has joined #RubyOnRails
[04:00:32] jorrin: has joined #RubyOnRails
[04:01:16] alphaatom: has joined #RubyOnRails
[04:04:33] n1lo: has joined #RubyOnRails
[04:05:30] roshanavand: has joined #RubyOnRails
[04:08:24] DonOtreply: has joined #RubyOnRails
[04:08:31] pawnbox: has joined #RubyOnRails
[04:09:09] yoongkang: has joined #RubyOnRails
[04:10:17] hahuang61: has joined #RubyOnRails
[04:10:25] yoongkang: has left #RubyOnRails: ()
[04:11:44] rickmasta: has joined #RubyOnRails
[04:12:15] kirillzh: has joined #RubyOnRails
[04:12:33] braincrash: has joined #RubyOnRails
[04:12:55] treaki_: has joined #RubyOnRails
[04:15:33] celly: has joined #RubyOnRails
[04:15:55] Conflict: has joined #RubyOnRails
[04:19:16] Deck`: has joined #RubyOnRails
[04:20:43] sandstrom: has joined #RubyOnRails
[04:21:55] arashb: has joined #RubyOnRails
[04:25:29] Cervajz: has joined #RubyOnRails
[04:26:51] rogue_koder: has joined #RubyOnRails
[04:27:59] lessless: has joined #RubyOnRails
[04:30:17] rickmasta: has joined #RubyOnRails
[04:32:19] rickmasta: has joined #RubyOnRails
[04:32:31] Oliphaunte: has joined #RubyOnRails
[04:37:52] sandstrom: has joined #RubyOnRails
[04:39:27] yashinbasement: has joined #RubyOnRails
[04:39:55] nerium: has joined #RubyOnRails
[04:41:18] rickmasta: has joined #RubyOnRails
[04:46:32] yaewa: has joined #RubyOnRails
[04:46:36] krzkrz: has joined #RubyOnRails
[04:53:37] rogue_koder: has joined #RubyOnRails
[04:55:01] truenito: has joined #RubyOnRails
[04:55:06] sandstrom: has joined #RubyOnRails
[04:59:22] pawnbox: has joined #RubyOnRails
[05:00:17] Oliphaunte: has joined #RubyOnRails
[05:00:45] sleungcy: has joined #RubyOnRails
[05:02:10] joshkovach: has joined #RubyOnRails
[05:06:23] _Tariq: has joined #RubyOnRails
[05:06:59] tyl: has joined #RubyOnRails
[05:07:02] truenito: has joined #RubyOnRails
[05:08:27] ensyde: has joined #RubyOnRails
[05:09:36] Oliphaunte: has joined #RubyOnRails
[05:09:58] SteenJobs: has joined #RubyOnRails
[05:12:21] sandstrom: has joined #RubyOnRails
[05:18:42] SteenJobs: has joined #RubyOnRails
[05:20:07] Deck`: has joined #RubyOnRails
[05:25:51] stardiviner: has joined #RubyOnRails
[05:26:10] _3by8: has joined #RubyOnRails
[05:27:04] _3by8: So I'm looking through my production log and I have hundreds if not thousands of requests for stuff that doesn't exist on my site and they all seem to be coming from Cloudflare IPs... here's what the requests look like as an example: /wp-content/uploads/2015/04/Safest-Call-Blocker-150x150.png
[05:27:07] _3by8: What the hell is going on?
[05:29:41] sandstrom: has joined #RubyOnRails
[05:29:51] roshanavand: has joined #RubyOnRails
[05:30:09] _3by8: What the hell, look what I pulled up from Googling: http://www.apkdetective.com/ redirects to my DigitalOcean droplet...
[05:31:41] askhat: has joined #RubyOnRails
[05:31:47] _3by8: What the hell, look what I pulled up from Googling the thousands of requests hitting my droplet: http://www.apkdetective.com/ redirects to my DigitalOcean droplet...
[05:31:58] askhat: has left #RubyOnRails: ()
[05:31:58] _3by8: Sorry, that was meant for #digitalocean
[05:32:47] rogue_koder: has joined #RubyOnRails
[05:35:53] baweaver: has joined #RubyOnRails
[05:36:50] Thouren: has joined #RubyOnRails
[05:38:34] Radar: _3by8: Can anybody know for certain?
[05:38:35] draig: has joined #RubyOnRails
[05:39:17] _3by8: Radar: I'm baffled. I just assume it was some guy who had a site with DigitalOcean like me and his account lapsed or something.
[05:39:37] Oliphaunte: has joined #RubyOnRails
[05:40:43] Radar: _3by8: Yeah that may be it. I don't think you can know with any certainty.
[05:44:34] Oliphaunte: has joined #RubyOnRails
[05:45:03] jahbrewski: has joined #RubyOnRails
[05:45:45] celly: has joined #RubyOnRails
[05:46:32] Oliphaunte: has joined #RubyOnRails
[05:46:38] sandstrom: has joined #RubyOnRails
[05:46:59] _3by8: look at all of his domains: http://pastebin.com/7Sh5ZrV0
[05:47:06] _3by8: SORRY HELPA
[05:47:56] Radar: admin plz ban
[05:49:56] Oliphaun_: has joined #RubyOnRails
[05:50:22] rafaelfranca: has joined #RubyOnRails
[05:52:01] Devalo: has joined #RubyOnRails
[05:53:49] yfeldblum: has joined #RubyOnRails
[05:53:54] xardion_: has joined #RubyOnRails
[05:54:51] Pazician: has joined #RubyOnRails
[05:55:23] _3by8: No, wait!
[05:55:26] _3by8: I'm sorry!
[05:55:34] Radar: admin plz come at once
[05:55:42] Oliphaunte: has joined #RubyOnRails
[05:55:49] Radar: (You'll have to do a lot more than that to get a ban)
[05:56:53] _3by8: So do I create an AdSense account and serve ads while this lasts Radar? What do you think?
[05:57:33] sevenseacat: ads on your 404 page? lol
[05:57:47] _3by8: sevenseacat: I'll just change the way the 404 page looks.
[05:57:50] _3by8: sevenseacat: exactly
[05:57:59] sevenseacat: i like it. i wouldnt have thought of it, but i like it.
[05:58:20] Radar: That's gotta be against Google's ToS :P
[05:58:23] Radar: I'd say do it and see what happens!
[05:58:31] _3by8: Yeah, this'll be an interesting experiment...
[05:59:29] Radar: Only 14ish more hours until we're back in Australia
[05:59:52] sevenseacat: we're prepping the hot weather for you
[06:00:05] sevenseacat: ACTION is in the middle of a 40C+ heatwave
[06:00:24] Radar: I'm all chirpy because I slept for a few hours and Shaz is... not. She has hardly slept at all.
[06:00:32] joshuaturner: has joined #RubyOnRails
[06:00:41] lexileo: has joined #RubyOnRails
[06:00:41] sevenseacat: give her a hug. buy her some chocolate.
[06:00:59] Radar: Just hugged her then. Already bought her Toblerone but our supplies have run out
[06:01:23] Radar: There will be more chocolate on the flight (they have a little square with the meals)
[06:01:38] Radar: "That chocolate isn't going to cut it. Only sleep will cut it." - The Shaz
[06:03:52] sandstrom: has joined #RubyOnRails
[06:04:31] DmitryBochkarev: has joined #RubyOnRails
[06:05:39] PedramT: has joined #RubyOnRails
[06:08:41] fedexo: has joined #RubyOnRails
[06:13:57] Limix: has joined #RubyOnRails
[06:16:28] stardiviner: has joined #RubyOnRails
[06:19:57] lexiMon: has joined #RubyOnRails
[06:21:05] Deck`: has joined #RubyOnRails
[06:21:11] sandstrom: has joined #RubyOnRails
[06:22:48] n00bDev: has joined #RubyOnRails
[06:26:16] askhat: has joined #RubyOnRails
[06:27:30] pawnbox: has joined #RubyOnRails
[06:27:40] n00bdev_: has joined #RubyOnRails
[06:29:24] _3by8: So this DigitalOcean setup defaults to the production environment. It uses Unicorn and NGINX, which one of those am I going to be looking at to change the environment back to development while I work out some kinks?
[06:32:46] Oliphaunte: has joined #RubyOnRails
[06:34:19] ziyadb: has joined #RubyOnRails
[06:34:59] _3by8: running webrick probably easier huh
[06:38:39] sandstrom: has joined #RubyOnRails
[06:40:39] Cohedrin: has joined #RubyOnRails
[06:40:50] dcunit3d: has joined #RubyOnRails
[06:41:28] askhat: has joined #RubyOnRails
[06:47:13] Oliphaunte: has joined #RubyOnRails
[06:49:15] askhat: has joined #RubyOnRails
[06:51:27] RegulationD: has joined #RubyOnRails
[06:52:55] Limix: has joined #RubyOnRails
[06:53:13] roshanavand: has joined #RubyOnRails
[06:54:32] askhat: has joined #RubyOnRails
[06:55:57] sandstrom: has joined #RubyOnRails
[06:57:22] baweaver: has joined #RubyOnRails
[06:58:53] dexter-tzu: has joined #RubyOnRails
[07:02:13] sleungcy: has joined #RubyOnRails
[07:05:19] yoongkang: has joined #RubyOnRails
[07:09:04] et09: has joined #RubyOnRails
[07:09:09] et09: here's my problem - a user has many messages, with from_id and to_id. i want to select the most recent message from each set of (from_id = x, to_id = y) via 'created_at', where the user's ID is one or the other
[07:09:20] et09: kind of stumped
[07:09:44] tvw: has joined #RubyOnRails
[07:10:29] KazW: has joined #RubyOnRails
[07:10:37] et09: in other word, for each user the user is conversing with, i want the last message only
[07:11:37] _3by8: et09: there's a .last method
[07:11:56] et09: well ideally i want to do it in one query, since this is a list of users
[07:12:43] _3by8: I can already tell you if I don't answer it someone else is going to ask you to post a Gist
[07:12:56] _3by8: So let's start there.
[07:13:08] sandstrom: has joined #RubyOnRails
[07:13:10] et09: a gist of what, the models?
[07:13:51] et09: -_- the last coder didn't even write the associations
[07:14:37] moeabdol1: has joined #RubyOnRails
[07:16:36] et09: https://gist.github.com/djvs/75e1b3ec23b57331c745
[07:16:50] et09: ack 1 sec
[07:17:19] et09: ok fixed
[07:21:36] joshkovach: has joined #RubyOnRails
[07:21:53] Deck`: has joined #RubyOnRails
[07:24:16] lexileo: has joined #RubyOnRails
[07:24:51] arashb: has joined #RubyOnRails
[07:25:38] _3by8: Sorry, I was reading up on what inverse_of does.
[07:25:43] _3by8: I'm not sure I can solve this for you.
[07:25:47] yardenbar: has joined #RubyOnRails
[07:28:10] et09: OK, thanks
[07:29:15] grahamsavage_: has joined #RubyOnRails
[07:29:54] _3by8: What have you tried so far though, just out of curiousity?
[07:30:23] sandstrom: has joined #RubyOnRails
[07:37:24] et09: using google and opening this irc chat
[07:38:00] dionysus69: has joined #RubyOnRails
[07:38:58] hahuang61: has joined #RubyOnRails
[07:47:39] sandstrom: has joined #RubyOnRails
[07:50:02] Tinyyy: has joined #RubyOnRails
[07:50:29] _3by8: Oh, okay, I meant as far as actual code goes... so if you're going to be retrieving the records based on when they were created...
[07:50:50] et09: https://gist.github.com/djvs/fe3b8d531fbd45ad5b6c this seems to be the solution
[07:51:08] et09: have to go straight to sql
[07:52:53] et09: substituting the user id that is
[07:53:48] _3by8: Looks fairly complex to me.
[07:54:26] _3by8: Anyways, anyone seen an error like this before: Completed 500 Internal Server Error in 225ms (ActiveRecord: 9.0ms)?
[07:54:45] _3by8: It's followed up by: Errno::ECONNREFUSED (Connection refused - {:data=>"<?xml version=\"1.0\" encoding=\"UTF-8\"?><add><doc><field name=\"id\">User 22</field><field name=\"type\">User</field><field name=\"type\">ActiveRecord$ app/controllers/users_controller.rb:29:in `create'
[07:55:05] _3by8: I'm taking that straight from my production.log
[07:55:32] Pazician: has joined #RubyOnRails
[07:56:00] _3by8: I've looked at line 29 and it's just the part that saves the object. Nothing fancy and it works fine on my development box.
[07:56:03] sevenseacat: that sql is way over the top
[07:56:09] sevenseacat: and that error seems straightforward
[07:56:23] _3by8: sevenseacat: I thought so too but I can't figure it out.
[07:56:37] sevenseacat: well what else is your record doing on save? i bet it's indexing in solr
[07:56:59] darkxploit: has joined #RubyOnRails
[07:57:00] et09: over the top? what's the simpler solution
[07:57:15] sevenseacat: et09: i didnt see what the problem was
[07:57:23] Devalo: has joined #RubyOnRails
[07:57:31] _3by8: It is :) I thought it might be solr also but I "fixed" solr earlier so I thought it'd be fine... what's your recommendation sevenseacat?
[07:57:42] Devalo: has joined #RubyOnRails
[07:57:46] sevenseacat: _3by8: i dont think you fixed this
[07:57:59] sevenseacat: a connection refused when trying to talk to solr seems straightfoward
[07:58:15] _3by8: sevenseacat: you're probably right, I only fixed it enough to allow me to load my db schema
[07:58:45] _3by8: I was trying to load the schema earlier and it wasn't letting me.
[07:58:53] sevenseacat: solr has nothing to do with your db schema
[07:59:14] _3by8: Well believe it or not it was throwing solr errors when I was trying to load my db schema earlier.
[07:59:34] _3by8: So I changed a line in sunspot.yaml in my config folder and that worked.
[08:01:09] darutoko: has joined #RubyOnRails
[08:02:05] Cervajz: has joined #RubyOnRails
[08:02:58] sleungcy: has joined #RubyOnRails
[08:04:36] yardenbar: has joined #RubyOnRails
[08:04:50] sandstrom: has joined #RubyOnRails
[08:05:12] _3by8: sevenseacat: did you know that you have to start solr?
[08:05:29] _3by8: You have to tell it when you want it to start.
[08:05:34] rails690: has joined #RubyOnRails
[08:05:46] sevenseacat: is this a trick question?
[08:05:54] sevenseacat: how can you use it if its not running?
[08:06:07] _3by8: I assumed it ran automagically, like everything else Rails does.
[08:06:15] sevenseacat: solr has nothing to do with rails
[08:06:23] rails690: anyone here know how to use thinkingsphinx?
[08:06:38] rails690: (sphinx search)
[08:06:47] _3by8: No but I know how to use Solr.
[08:08:38] rails690: i dont understand the mapping between thinkingsphinx search syntax ( http://freelancing-gods.com/thinking-sphinx/searching.html ) and sphinx's actual syntax here: http://sphinxsearch.com/docs/latest/extended-syntax.html
[08:09:07] rails690: in sphinxsearch's docs, to search multiple fields it says do the following: @(title,body) hello world
[08:09:13] rails690: or @title hello @body world
[08:09:20] rails690: how do I use that in the thinkingsphinx gem???
[08:11:10] SteenJobs: has joined #RubyOnRails
[08:12:52] dextertzu: has joined #RubyOnRails
[08:15:49] shahidbscs: has joined #RubyOnRails
[08:17:45] shahidbscs: I'm using AngularJs in rails project
[08:17:59] roshanavand: has joined #RubyOnRails
[08:17:59] keekri: has joined #RubyOnRails
[08:18:00] shahidbscs: when I tried to remove hash tag from url using $locationProvider.html5Mode(true)
[08:18:17] shahidbscs: it stop working for device url link eg (Login, logout)
[08:19:18] shahidbscs: any suggestion please?
[08:19:25] Andr3as: morning.. when rails doesnt "recognize" the methods in a helper like i get a undefined method "sign_in" when the sign_in method is just within the helper file but when i copy it over into the controler, it runs through.. any hints?
[08:21:28] kvsari: has joined #RubyOnRails
[08:22:05] sandstrom: has joined #RubyOnRails
[08:22:55] Deck`: has joined #RubyOnRails
[08:25:54] barhum2013: has joined #RubyOnRails
[08:29:42] felltir: has joined #RubyOnRails
[08:30:34] sevenseacat: Andr3as: helpers are for views, not for controllers
[08:32:55] Andr3as: sevenseacat: hmm, was just reading that on another page too.. that is *very* strange as in another app this exact same thing was working like a acharme and its what is done in railstutorial.org
[08:33:09] Andr3as: but - i guess i've found the issue as we speak
[08:33:18] sevenseacat: yes, because they included the helper module into the controller, which is bad practice.
[08:33:49] Andr3as: he includes the sessionshelper into the application controller - thats what i've probasbly done in my other app nbut not in this one
[08:34:11] Andr3as: ah, thats bad?
[08:34:11] Andr3as: hmm.. i thought he teaches good coding style
[08:34:32] Andr3as: so how is it supposed to be done then? all inside the controller? as a (private) method?
[08:35:03] sevenseacat: inside the controller is fine, given its not code to be shared around.
[08:35:36] Andr3as: i guess stuff like sign_in / out 'n'such is ok inside the sessions controlelr then
[08:36:09] triangles: has joined #RubyOnRails
[08:36:30] Andr3as: thanks sevenseacat
[08:39:26] jgt4: has joined #RubyOnRails
[08:39:39] sandstrom: has joined #RubyOnRails
[08:40:42] ur5us: has joined #RubyOnRails
[08:41:39] shahidbscs: Any hint to remove hash tag from url using $locationProvider.html5Mode(true) in ROR + angularjs project?
[08:42:37] PedramT: has joined #RubyOnRails
[08:44:09] pawnbox: has joined #RubyOnRails
[08:44:20] PedramT: has joined #RubyOnRails
[08:44:29] DonOtreply: has joined #RubyOnRails
[08:47:48] DoubleMalt: has joined #RubyOnRails
[08:48:33] afroboy: has joined #RubyOnRails
[08:48:48] sevenseacat: shahidbscs: this isn't an angular support channel
[08:50:09] shahidbscs: Thanks Sevenseacat and Yes, actually my project based on ROR. So I supposed if some one have similar issue before
[08:50:25] sevenseacat: shahidbscs: you're asking a question about your angular code
[08:50:35] sevenseacat: this is not an angular channel
[08:50:46] shahidbscs: and angular url working fine but issue with device url like (Login, logout)
[08:50:57] sevenseacat: ok, thats not what you asked before
[08:51:06] sevenseacat: so what specific problem are you having *with your rails code*?
[08:52:50] shahidbscs: I have two type views page (1) using anglar (2) rails root. when I'm using this service $locationProvider.html5Mode(true) to remove /#/ from url, it stop to working all links like ( new_user_registration_path)
[08:52:58] Megamos: has joined #RubyOnRails
[08:53:01] sevenseacat: define "stops working"
[08:53:12] sevenseacat: are you getting a Rails error?
[08:53:58] sevenseacat: so... whats the problem then
[08:54:09] sevenseacat: "its not working" is not something we can fix
[08:54:11] shahidbscs: it expect these registration_path like other angular views
[08:54:45] sevenseacat: if its a problem with your angular code, again, you're in the wrong place.
[08:55:08] shahidbscs: ok my apology, I thing unable to explain
[08:55:16] askhat: has joined #RubyOnRails
[08:56:26] askhat: has joined #RubyOnRails
[08:56:53] sandstrom: has joined #RubyOnRails
[08:57:11] intrigueD: has joined #RubyOnRails
[08:59:21] agoldboi: has joined #RubyOnRails
[09:03:42] sleungcy: has joined #RubyOnRails
[09:07:37] Deck`: has joined #RubyOnRails
[09:10:55] PedramT: has joined #RubyOnRails
[09:11:45] mhoungbo_: has joined #RubyOnRails
[09:12:20] chouhoulis: has joined #RubyOnRails
[09:14:13] sandstrom: has joined #RubyOnRails
[09:14:59] techsethi: has joined #RubyOnRails
[09:15:56] Deck-: has joined #RubyOnRails
[09:20:33] Andr3as: shahidbscs: even though i am not able to help you, but a gist wouldnt be a bad idea
[09:20:40] Andr3as: better than talking theoretically
[09:22:07] PedramT: has joined #RubyOnRails
[09:22:22] shahidbscs: thanks Andr3as. if you don't mind should I try to explain one more time?
[09:22:47] Andr3as: if its rails / ruby related, why not? if it isnt, better not
[09:23:51] Andr3as: even if its for the sake of creating that gist.. i often find the issue right infront of me when a had created the gist
[09:24:01] Andr3as: it moves perspective, a little bit
[09:26:30] Radar: Hello from somewhere west of India.
[09:26:36] jmfurlott: has joined #RubyOnRails
[09:27:00] arashb: has joined #RubyOnRails
[09:27:01] radar[air]_: has joined #RubyOnRails
[09:27:28] srinidhi: has joined #RubyOnRails
[09:28:41] Zggb: has joined #RubyOnRails
[09:29:59] shahidbscs: here is gist https://gist.github.com/shahidbscs/c14c1ae9020a372c6d6c
[09:31:15] Pazician: has joined #RubyOnRails
[09:31:22] sandstrom: has joined #RubyOnRails
[09:33:23] shahidbscs: Andr3as on this state every thing working fine. When I'm trying to remove /#/ form URL using $locationProvider.html5Mode(true) this stop working Device root, as you can see in _header file Sim::Routes.new_user_registration_path
[09:35:08] shahidbscs: only stop device url other URL working fine. So Its may not specific to rails but as I mentioned I used RoR + AngularJs. So may some one face similar issue before?
[09:35:25] Andr3as: well, i cant help you - as i said - this is way above my (very limited) rails (coding) knowlege - but maybe someone else in here
[09:35:38] Andr3as: the question is, what is "stop working" this isnt clear yet
[09:35:52] Andr3as: there gotta be an error message soemwhere, no?
[09:35:59] Andr3as: any log entries
[09:36:15] radar[air]: Angular. Never again.
[09:36:21] tetraktys: has joined #RubyOnRails
[09:36:24] baweaver: it's an angular issue, and you're going to want to ask in that channel. Problem is you're mixing the two on your frontend
[09:36:27] radar[air]: Small reproducible example please.
[09:36:34] baweaver: meaning neither side is likely to help very much.
[09:37:11] mcr-credil: has joined #RubyOnRails
[09:38:21] radar[air]: You: "Please help me with my problem <shows a bazillionty lines of code>" Me: "*takes Express Train to Nopeville*"
[09:38:55] radar[air]: And it's Angular, to top it off.
[09:39:05] FernandoBasso: has joined #RubyOnRails
[09:40:37] Deck-: has joined #RubyOnRails
[09:42:47] yereby: has joined #RubyOnRails
[09:44:47] harly: has joined #RubyOnRails
[09:48:39] sandstrom: has joined #RubyOnRails
[09:49:40] ziyadb: has joined #RubyOnRails
[09:52:20] nerium: has joined #RubyOnRails
[09:52:34] agoldboi: has joined #RubyOnRails
[09:54:51] askhat: has joined #RubyOnRails
[09:55:52] dextertzu: has joined #RubyOnRails
[09:56:16] harly_: has joined #RubyOnRails
[09:56:23] Deck-: has joined #RubyOnRails
[09:58:36] moeabdol2: has joined #RubyOnRails
[09:59:34] jtong: has joined #RubyOnRails
[10:04:30] sleungcy: has joined #RubyOnRails
[10:05:57] sandstrom: has joined #RubyOnRails
[10:09:40] techsethi: has joined #RubyOnRails
[10:10:31] DoubleMalt: has joined #RubyOnRails
[10:12:19] blackchalk: has joined #RubyOnRails
[10:13:00] n00bDev: has joined #RubyOnRails
[10:13:57] Deck-: has joined #RubyOnRails
[10:15:11] dionysus69: has joined #RubyOnRails
[10:21:52] Timberwo|f: has joined #RubyOnRails
[10:22:03] chouhoulis: has joined #RubyOnRails
[10:23:07] sandstrom: has joined #RubyOnRails
[10:24:51] neanderslob: has joined #RubyOnRails
[10:27:11] Deck-: has joined #RubyOnRails
[10:28:35] jmfurlott: has joined #RubyOnRails
[10:31:41] yoongkang: has joined #RubyOnRails
[10:33:26] nodejunkie: has joined #RubyOnRails
[10:39:24] nerium: has joined #RubyOnRails
[10:40:40] sandstrom: has joined #RubyOnRails
[10:40:43] yoongkang: has joined #RubyOnRails
[10:46:04] SarolfThorleif: has joined #RubyOnRails
[10:46:52] arBmind: has joined #RubyOnRails
[10:48:52] fox_mulder_cp: Radar[air]: ^)
[10:49:45] jgt4: has joined #RubyOnRails
[10:50:21] fox_mulder_cp: Radar[air]: i have a some features in roadmap to releasing my blogapp engine ^)
[10:52:54] RegulationD: has joined #RubyOnRails
[10:53:19] dextertzu: has joined #RubyOnRails
[10:53:34] quazimodo: has joined #RubyOnRails
[10:53:37] fox_mulder_cp: i have a problem - i want select a top5 writers in my blog, but i can't know how to add where condition to "User.includes(:Article)..."
[10:53:37] quazimod1: has joined #RubyOnRails
[10:54:01] SarolfThorleif: has left #RubyOnRails: ()
[10:54:19] askhat: has joined #RubyOnRails
[10:54:43] fox_mulder_cp: User.includes(:Article).where("Article.count > 1") - fails - count not a column...
[10:55:20] Kvargla: has joined #RubyOnRails
[10:56:21] tbuehlmann: fox_mulder_cp, you could join articles and group by article count
[10:57:54] sandstrom: has joined #RubyOnRails
[11:02:05] baweaver: has joined #RubyOnRails
[11:03:29] gavinhughes: has joined #RubyOnRails
[11:04:13] coderMe: has joined #RubyOnRails
[11:05:23] radar[air]: You could also have a counter cache for articles on the user and then order by that
[11:06:14] phon: has joined #RubyOnRails
[11:12:05] fox_mulder_cp: Radar[air]: i add article_count to user model, but ordering failed 'sqlexeption no column article_count'
[11:12:32] defsdoor: has joined #RubyOnRails
[11:12:46] radar[air]: fox_mulder_cp: huh How is that possible if you really did add the column?
[11:12:53] radar[air]: what is the query you're doing?
[11:13:15] yoongkang: has joined #RubyOnRails
[11:13:32] fox_mulder_cp: Radar[air]: model - def article_count return self.Article.count,
[11:13:42] n00bDev: has joined #RubyOnRails
[11:13:54] fox_mulder_cp: and User.order("article_count")
[11:14:24] dextertzu: has joined #RubyOnRails
[11:14:28] radar[air]: you're really funny. I like you.
[11:14:28] nerium: has joined #RubyOnRails
[11:14:36] radar[air]: That's not adding a column. That's just defining a method in the model.
[11:14:44] fox_mulder_cp: Radar[air]: i know :)
[11:14:54] radar[air]: If you want to do ordering in SQL-land, you'll need to add a column in SQL-land.
[11:15:06] fox_mulder_cp: i don't want add a column
[11:15:11] sandstrom: has joined #RubyOnRails
[11:15:13] radar[air]: fox_mulder_cp: I would link you to counter cache docs but my internet is quite shithouse
[11:15:26] radar[air]: fox_mulder_cp: And I'm telling you it would make the most sense to add a column!
[11:15:45] Deck-: has joined #RubyOnRails
[11:16:31] fox_mulder_cp: Radar[air]: hm, u say that i want add a column "article_count" and update it when user create new article?
[11:16:50] tbuehlmann: check this: http://guides.rubyonrails.org/association_basics.html#options-for-belongs-to
[11:16:55] radar[air]: fox_mulder_cp: Read about counter caches for god's sake.
[11:16:59] radar[air]: Thank you tbuehlmann.
[11:17:13] radar[air]: I can't load anything that's not Google.
[11:17:38] FooMunki: has joined #RubyOnRails
[11:18:01] tildes: has joined #RubyOnRails
[11:18:07] tbuehlmann: you want an integer column "articles_count", then simply add that counter_cache: true to your belonging model (Article)
[11:18:44] tbuehlmann: you could do this directly in the database, but let's keep going with rails' solution for now
[11:21:05] fox_mulder_cp: Radar[air]: hm. may be u recommend me manual|extended doc? in active record basics i can't find them (
[11:21:49] radar[air]: fox_mulder_cp: tbuehlmann linked you to them already. Look up a few lines.
[11:22:48] chouhoulis: has joined #RubyOnRails
[11:25:44] fox_mulder_cp: i think, that my idea write blog engine before writing very hard app for my curren level
[11:28:57] askhat: has joined #RubyOnRails
[11:29:06] arashb: has joined #RubyOnRails
[11:29:24] roshanavand: has joined #RubyOnRails
[11:29:44] jmfurlott: has joined #RubyOnRails
[11:30:27] stardiviner: has joined #RubyOnRails
[11:31:30] fox_mulder_cp: how to add Rails.application.eager_load!
[11:31:31] Deck-: has joined #RubyOnRails
[11:31:34] fox_mulder_cp: and ActiveRecord::Base.descendants
[11:31:45] fox_mulder_cp: in autorun when i start rails console?
[11:37:13] roshanavand: has joined #RubyOnRails
[11:38:19] Cervajz: has joined #RubyOnRails
[11:39:28] matthewd: fox_mulder_cp: !xy
[11:39:28] helpa: fox_mulder_cp: 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
[11:41:12] fox_mulder_cp: ook. how to add something to autorun when i start rails condole?^)
[11:45:20] |RicharD|: has joined #RubyOnRails
[11:46:44] Aherin: has joined #RubyOnRails
[11:47:14] Deck-: has joined #RubyOnRails
[11:49:22] askhat: has joined #RubyOnRails
[11:53:29] fox_mulder_cp: hm. size, size... User.Article.size....
[11:54:44] askhat: has joined #RubyOnRails
[11:54:45] dextertzu: has joined #RubyOnRails
[11:56:14] tubbo: has joined #RubyOnRails
[11:58:10] AzaToth: has joined #RubyOnRails
[12:02:11] DEA7TH: has joined #RubyOnRails
[12:02:58] Deck-: has joined #RubyOnRails
[12:06:04] sleungcy: has joined #RubyOnRails
[12:07:26] radar[air]: I don't know where you're getting this Java code from, but it is disturbing.
[12:07:35] radar[air]: Perhaps you meant user.articles.count?
[12:08:30] fox_mulder_cp: Radar[air]: i read guide, it says about field 'size'
[12:08:46] fox_mulder_cp: Radar[air]: i don't know java
[12:09:22] fox_mulder_cp: With these declarations, asking for the value of @customer.orders.size requires making a call to the database to perform a COUNT(*) query. To avoid this call, you can add a counter cache to the belonging model:
[12:12:16] askhat: has joined #RubyOnRails
[12:13:27] mostlybadfly: has joined #RubyOnRails
[12:14:30] n00bDev: has joined #RubyOnRails
[12:14:56] tknz: has joined #RubyOnRails
[12:18:47] Deck-: has joined #RubyOnRails
[12:19:39] OSIRIS_: has joined #RubyOnRails
[12:21:08] gavinhughes: has joined #RubyOnRails
[12:23:02] rickmasta: has joined #RubyOnRails
[12:23:31] chouhoulis: has joined #RubyOnRails
[12:30:42] jmfurlott: has joined #RubyOnRails
[12:31:52] Nucky: has joined #RubyOnRails
[12:34:28] Deck-: has joined #RubyOnRails
[12:36:50] ql6wlld: has joined #RubyOnRails
[12:39:49] quazimodo: has joined #RubyOnRails
[12:39:53] quazimod1: has joined #RubyOnRails
[12:40:34] gavit: I am trying to write a gem (http://guides.rubygems.org/make-your-own-gem/) How do I connect it to a migration. so when one requires my gem it adds a migration to the ror project?
[12:41:52] yoongkang: has joined #RubyOnRails
[12:42:14] sergey_makagon: has joined #RubyOnRails
[12:44:39] mdw: has joined #RubyOnRails
[12:48:04] tbuehlmann: sounds like a generator to me, right?
[12:49:30] gavit: tbuehlmann: nah
[12:49:40] gavit: tbuehlmann: I want something that works like devise
[12:49:54] sevenseacat: ...so, a generator
[12:50:03] gavit: I am tired of making 'Person', 'Address', 'Phonenumber' etc
[12:50:22] gavit: would a generator add functions too?
[12:50:47] tbuehlmann: a generator could add a migration to your application
[12:52:45] gavit: guess I should search for tutorials on how to make a ror generator.
[12:52:50] gavit: I'll see if it applies
[12:52:53] gavit: thanks for teh suggestion
[12:53:24] sevenseacat: see: `rails g devise User`
[12:58:33] fox_mulder_cp: i add attr_read article_count to User model, add def article_count for return self.Article.size
[12:58:47] gheegh: has joined #RubyOnRails
[12:59:00] fox_mulder_cp: but in User.order(:article_count) see error 'no sql column' again (
[12:59:08] Cervajz: has joined #RubyOnRails
[13:02:18] tbuehlmann: fox_mulder_cp, adding methods to a model doesn't add columns to your database table
[13:03:26] tbuehlmann: User.order will use database columns to order records, so that's the wrong way you're going
[13:03:59] fox_mulder_cp: hmhm... i see a this post http://yerb.net/blog/2014/03/13/three-easy-steps-to-using-counter-caches-in-rails/
[13:04:00] baweaver: has joined #RubyOnRails
[13:04:07] fox_mulder_cp: with reset_counters
[13:04:21] sevenseacat: fox_mulder_cp: and you skipped all three of the steps
[13:04:35] tbuehlmann: I'll rephrase my advice from hours ago: first, add an articles_count integer column to your users database table via a migration
[13:04:56] DonOtreply: has joined #RubyOnRails
[13:05:26] tbuehlmann: second, add a `belongs_to :user, counter_cache: true` to your Article model
[13:05:43] sevenseacat: yep, thats steps 1 and 2
[13:06:49] sleungcy: has joined #RubyOnRails
[13:07:08] Aherin: has joined #RubyOnRails
[13:11:27] askhat: has joined #RubyOnRails
[13:12:51] ElFerna: has joined #RubyOnRails
[13:14:19] fahrradflucht: has joined #RubyOnRails
[13:14:33] Cervajz_: has joined #RubyOnRails
[13:15:13] n00bDev: has joined #RubyOnRails
[13:18:03] dragonkh: has joined #RubyOnRails
[13:18:55] Cervajz__: has joined #RubyOnRails
[13:21:09] Cervajz__: has joined #RubyOnRails
[13:22:12] Jasaka: has joined #RubyOnRails
[13:22:54] gianluca_: has joined #RubyOnRails
[13:23:16] ferr: has joined #RubyOnRails
[13:24:55] msyvich: has joined #RubyOnRails
[13:25:01] techsethi: has joined #RubyOnRails
[13:25:06] rodfersou: has joined #RubyOnRails
[13:25:35] chouhoulis: has joined #RubyOnRails
[13:25:41] Amilcare: has joined #RubyOnRails
[13:29:18] coderMe_: has joined #RubyOnRails
[13:30:10] Devalo: has joined #RubyOnRails
[13:31:15] arashb: has joined #RubyOnRails
[13:31:31] jmfurlott: has joined #RubyOnRails
[13:31:44] futilegames: has joined #RubyOnRails
[13:33:50] FernandoBasso: has joined #RubyOnRails
[13:37:30] sandstrom: has joined #RubyOnRails
[13:37:45] Scripore: has joined #RubyOnRails
[13:38:08] StaticVoid: Hi all, I create a local variable in a method in my class: sh = SpinHeader.new(file_store_id: file.id, notes: file.description, stage: row[0])
[13:38:22] StaticVoid: this is inside an .each loop parsing a csv file
[13:38:37] StaticVoid: full code here: https://gist.github.com/RobvanB/20b7a165a521e03cad39#file-process_files_controller-rb
[13:38:47] StaticVoid: when it goes to the loop again, the variable is nil.
[13:38:57] StaticVoid: Is this because the scope is limited to the current 'each' block? (Not sure how to explain)
[13:39:04] StaticVoid: Should I just make it a class variable ?
[13:41:01] tbuehlmann: you are right, it's local the each block
[13:41:37] tbuehlmann: if you want to work with it outside of the block, define it before calling #each
[13:42:19] StaticVoid: tbuehlmann: thanks!. I sorta thought it was something like that, but wanted confirmation. I'll do that.
[13:47:57] Deck-: has joined #RubyOnRails
[13:48:23] tildes: has joined #RubyOnRails
[13:53:18] s2013: has joined #RubyOnRails
[13:56:29] sergey_makagon: has joined #RubyOnRails
[14:03:42] Deck-: has joined #RubyOnRails
[14:06:53] PedramT: has joined #RubyOnRails
[14:07:26] tvw: has joined #RubyOnRails
[14:07:37] sleungcy: has joined #RubyOnRails
[14:09:16] sandstrom: has joined #RubyOnRails
[14:09:47] stardiviner: has joined #RubyOnRails
[14:11:12] askhat_: has joined #RubyOnRails
[14:11:44] moeabdol3: has joined #RubyOnRails
[14:12:03] mhoungbo_: has joined #RubyOnRails
[14:15:46] peeja: has joined #RubyOnRails
[14:16:02] n00bDev: has joined #RubyOnRails
[14:18:16] jgt4: has joined #RubyOnRails
[14:19:23] mdw: has joined #RubyOnRails
[14:19:25] Deck-: has joined #RubyOnRails
[14:23:04] qejk: has joined #RubyOnRails
[14:24:37] mdw7: has joined #RubyOnRails
[14:24:44] superlou: has joined #RubyOnRails
[14:26:19] chouhoulis: has joined #RubyOnRails
[14:26:28] sandstrom: has joined #RubyOnRails
[14:27:06] PedramT: has joined #RubyOnRails
[14:28:06] _Tariq: has joined #RubyOnRails
[14:31:38] coderMe: has joined #RubyOnRails
[14:32:28] jmfurlott: has joined #RubyOnRails
[14:34:39] dredozub-: has left #RubyOnRails: ()
[14:35:10] Deck-: has joined #RubyOnRails
[14:37:18] krzkrz: has joined #RubyOnRails
[14:39:23] RegulationD: has joined #RubyOnRails
[14:40:01] sergey_makagon: has joined #RubyOnRails
[14:43:43] coderMe: has joined #RubyOnRails
[14:43:43] sandstrom: has joined #RubyOnRails
[14:44:36] srinidhi: has joined #RubyOnRails
[14:50:59] Deck-: has joined #RubyOnRails
[15:00:07] yoongkang: has joined #RubyOnRails
[15:04:59] baweaver: has joined #RubyOnRails
[15:06:38] Deck-: has joined #RubyOnRails
[15:07:42] EXCHGR: has joined #RubyOnRails
[15:10:08] arthropododo: has joined #RubyOnRails
[15:10:33] askhat: has joined #RubyOnRails
[15:11:25] macsteps: has joined #RubyOnRails
[15:13:45] arthropododo: What is a good book for followup after finishing The Rails Tutorial?
[15:14:39] fox_mulder_cp: arthropododo: rails in action, agile web deveplmnent with rails 4
[15:15:10] sevenseacat: i second R4IA. not so much AWDWR. *runs*
[15:15:49] fox_mulder_cp: now we can call to Radar[air] :)
[15:16:06] sevenseacat: I dare say he would also recommend R4IA
[15:16:39] arthropododo: thank you all!
[15:16:46] fox_mulder_cp: sevenseacat: ticket system, blog app, online stoe
[15:17:17] fox_mulder_cp: arthropododo: i recommend agile web.. for build your own easy skeletone for online store )
[15:17:48] fox_mulder_cp: i think about no good way without many manuals expirience
[15:18:01] n00bDev: has joined #RubyOnRails
[15:20:59] sevenseacat: if you're building a store for actual production use, don't build it from scratch.
[15:21:06] sevenseacat: especially not from that book.
[15:22:22] moeabdol4: has joined #RubyOnRails
[15:22:23] Deck-: has joined #RubyOnRails
[15:22:24] msyvich: has joined #RubyOnRails
[15:22:56] fox_mulder_cp: sevenseacat: agree with you. books/manuals take u expirience, but if you want wtire your own production app u must recompile and redesing app from scratch
[15:24:22] fox_mulder_cp: i take blogapp from manual and make in as a test lab for ideas, which i can use and production app
[15:26:43] dexter-tzu: has joined #RubyOnRails
[15:26:58] n1lo: has joined #RubyOnRails
[15:27:04] chouhoulis: has joined #RubyOnRails
[15:27:06] FernandoBasso: has joined #RubyOnRails
[15:27:08] macsteps: has joined #RubyOnRails
[15:32:29] JohnBat26: has joined #RubyOnRails
[15:33:21] arashb: has joined #RubyOnRails
[15:33:29] fox_mulder_cp: so. if interest - can see my blogapp http://dev.blog.mulder.kiev.ua/
[15:33:33] jmfurlott: has joined #RubyOnRails
[15:37:52] msyvich: has joined #RubyOnRails
[15:38:12] Deck-: has joined #RubyOnRails
[15:38:52] Scripore: has joined #RubyOnRails
[15:42:47] tbuehlmann: fox_mulder_cp: http://dev.blog.mulder.kiev.ua/users/3
[15:43:55] fox_mulder_cp: tbuehlmann: fixed, thanks
[15:44:11] moeabdol: has joined #RubyOnRails
[15:45:39] Nucky: Hey guys, how would you build a blog where in a single post you can write text, add image, text, add image, text, etc...? Must CMS type gems be required?
[15:46:30] fox_mulder_cp: Nucky: u want tumblr?
[15:46:50] fox_mulder_cp: can can add post_type property.
[15:47:42] fox_mulder_cp: Nucky: or u can use js editor and use raw to showint post_content
[15:48:31] fox_mulder_cp: Nucky: see my blogapp link some lines upper, login and try to edit post
[15:48:34] Nucky: fox_mulder_cp so I would need a js editor so the user can do this in a WYSIWG fashion?
[15:49:02] Nucky: fox_mulder_cp ok thanks, testing it out
[15:49:18] fox_mulder_cp: Nucky: as wordpress, livejournal, yep - js editor.
[15:49:19] jsrn_: has joined #RubyOnRails
[15:49:37] fox_mulder_cp: as tumblr - post type - citate, link, pic, media, etc
[15:50:55] Nucky: fox_mulder_cp where is the link to create a post? :D
[15:51:06] IrishGringo: has joined #RubyOnRails
[15:51:26] fox_mulder_cp: Nucky: http://dev.blog.mulder.kiev.ua/articles/new
[15:52:22] fox_mulder_cp: now i migrate from bootstrap and old foundation styling to foundation 6 desing, so some bad styles in edit page
[15:52:39] Devalo: has joined #RubyOnRails
[15:52:53] Deck-: has joined #RubyOnRails
[15:52:55] fox_mulder_cp: Nucky: u can clone repo and game with it.
[15:55:42] Nucky: fox_mulder_cp this looks great. does it support uploading assets as well?
[15:57:12] fox_mulder_cp: Nucky: i want add it later
[15:58:08] fox_mulder_cp: now want restyle editor, add user to comment. in plans add a like/dislike to users, posts and comments
[15:59:10] fox_mulder_cp: Nucky: when i start re-learn rails this autumn, i think about 'oh, kame a easy news blog' :)
[16:00:36] fox_mulder_cp: but it's a good test lab before writing my own shared hosting control panel with email, domains, epp, dns, sql and dockerized applications
[16:01:50] Nucky: fox_mulder_cp nice work. which JS editor are you using?
[16:02:49] mdw: has joined #RubyOnRails
[16:03:24] macsteps: has joined #RubyOnRails
[16:03:40] fox_mulder_cp: Nucky: tinymce-rails
[16:03:41] arooni-mobile: has joined #RubyOnRails
[16:04:28] fox_mulder_cp: Nucky: design based on default Foundation 6 blog template.
[16:07:38] futilegames: has joined #RubyOnRails
[16:08:58] askhat: has joined #RubyOnRails
[16:09:08] sleungcy: has joined #RubyOnRails
[16:10:26] quacker: has joined #RubyOnRails
[16:10:36] quacker: has left #RubyOnRails: ()
[16:11:05] IrishGringo_: has joined #RubyOnRails
[16:12:55] futilegames: has joined #RubyOnRails
[16:15:29] barhum2013: has joined #RubyOnRails
[16:15:46] futilegames: has joined #RubyOnRails
[16:18:36] rrawlins: has joined #RubyOnRails
[16:18:47] n00bDev: has joined #RubyOnRails
[16:19:58] mhoungbo_: has joined #RubyOnRails
[16:24:38] solars: has joined #RubyOnRails
[16:26:02] mdw: has joined #RubyOnRails
[16:27:48] chouhoulis: has joined #RubyOnRails
[16:33:11] mhoungbo_: has joined #RubyOnRails
[16:34:25] jmfurlott: has joined #RubyOnRails
[16:35:17] PedramT: has joined #RubyOnRails
[16:37:21] Netun0: has joined #RubyOnRails
[16:40:22] barhum2013: has joined #RubyOnRails
[16:42:37] Andr3as: can you reference a paramter inside a yml file like with sass?
[16:43:15] tbuehlmann: you can inject erb code and evaluate the file as erb before evaluating as yaml
[16:43:17] Andr3as: i am right now doing an i18n translation session and have (right now) some duplicates in the translation but dont want to give up on my schema
[16:43:38] tbuehlmann: ah, that's different
[16:44:38] Andr3as: i'll stick with the dupes for now..
[16:44:50] Andr3as: maybe there's some changes needed, later, anymway
[16:46:17] mdw: has joined #RubyOnRails
[16:46:36] DmitryBochkarev: has joined #RubyOnRails
[16:46:40] tbuehlmann: have a look at http://stackoverflow.com/a/14306610/384293 and the comments to that answer
[16:50:03] Andr3as: nice, thanks tbuehlmann - the reference to http://stackoverflow.com/questions/13055753/passing-variables-inside-rails-internationalization-yml-file will probably do the trick
[16:50:26] PedramT: has joined #RubyOnRails
[16:51:24] Macaveli: has joined #RubyOnRails
[16:52:11] superlou: has joined #RubyOnRails
[16:53:59] dcunit3d: has joined #RubyOnRails
[16:56:02] mhoungbo_: has joined #RubyOnRails
[16:57:13] IrishGringo: has joined #RubyOnRails
[16:58:02] drale2k: why does Rails5 use background jobs for action cable? F.e. when creating a chat, the tutorials all use bg jobs to deliver the message
[16:58:10] drale2k: why not do it directly, without a job?
[16:58:23] mhoungbo_: has joined #RubyOnRails
[16:58:49] matthewd: It's good practice to use a job if you're doing work that the current response doesn't need to wait for
[16:59:00] matthewd: (in this case, rendering the message template)
[16:59:02] fedexo: has joined #RubyOnRails
[17:00:04] Limix: has joined #RubyOnRails
[17:00:20] PlasmaStar: has joined #RubyOnRails
[17:00:25] fox_mulder_cp: action cable - not only chats
[17:01:49] meoblast001: has joined #RubyOnRails
[17:02:37] IrishGringo_: has joined #RubyOnRails
[17:07:15] intrigueD: has joined #RubyOnRails
[17:09:49] sleungcy: has joined #RubyOnRails
[17:10:04] DubiousCarrot: has joined #RubyOnRails
[17:11:12] drale2k: fox_mulder_cp: that's what i said
[17:11:16] drale2k: matthewd: ok i understnad
[17:12:39] drale2k: isn't this a lot of read/writes to Redis?
[17:12:45] drale2k: in case of lots of traffic
[17:13:00] jmfurlott: has joined #RubyOnRails
[17:15:04] sankaber: has joined #RubyOnRails
[17:15:09] macsteps: has joined #RubyOnRails
[17:18:51] Limix: Hi all, it there a way to say before_filter, except for a specific route+action?
[17:19:32] n00bDev: has joined #RubyOnRails
[17:19:36] Limix: example: before_filter: auth_from_token, :except => [session/create]
[17:20:21] intrigueD: skip_filter on the specific controller?
[17:20:58] Limix: thank you
[17:21:16] Andr3as: i have this in my users_controlelr before_action :set_user, except: [:index, :new, :create]
[17:21:22] Devalo: has joined #RubyOnRails
[17:21:33] Andr3as: ah, filter.. sry,
[17:22:17] gingray: has joined #RubyOnRails
[17:22:17] intrigueD: Limix: I presume auth_from_token is defined in application_controller and for want to skip that action for SessionsController#create?
[17:23:03] diegoviola: has joined #RubyOnRails
[17:24:33] seaworthy: has joined #RubyOnRails
[17:27:17] mices: has joined #RubyOnRails
[17:28:35] chouhoulis: has joined #RubyOnRails
[17:28:52] rafaelfranca: has joined #RubyOnRails
[17:31:10] fox_mulder_cp: where i can find examples of rails g migration via rails generate migration commands? need to rename column in table
[17:31:46] tbuehlmann: start here: http://guides.rubyonrails.org/active_record_migrations.html
[17:32:47] fox_mulder_cp: tbuehlmann: i read it, but intrested in concerts for cli calling, which generate not skeletone with default empty change, but take column names
[17:32:51] pwnd_nsfw: has joined #RubyOnRails
[17:35:28] arashb: has joined #RubyOnRails
[17:35:51] intrigueD: you want the command to do everything for you?
[17:36:37] mhoungbo_: has joined #RubyOnRails
[17:37:08] fox_mulder_cp: intrigueD: coffee and striptease too, please(c)
[17:37:28] fox_mulder_cp: intrigueD: i want learn magic :)
[17:38:14] intrigueD: fox_mulder_cp: I want a house in Tobago, but we can't have everything
[17:39:15] fox_mulder_cp: intrigueD: keep calm and code on!
[17:40:12] intrigueD: has joined #RubyOnRails
[17:40:20] intrigueD: I'm reading the JSON API spec and don't understand how someone has the patience to write such a thing. Currently, I'm trying to procrastinate
[17:42:37] fox_mulder_cp: intrigueD: i'm trying to procrastinate
[17:42:54] fox_mulder_cp: in my hosting panel. but try to improve my blogapp
[17:44:01] intrigueD: fox_mulder_cp: I thought you'd be busy crafting a PR for the rails migration generator
[17:45:41] peeja: has joined #RubyOnRails
[17:50:45] fox_mulder_cp: http://edgeguides.rubyonrails.org/active_record_migrations.html#changing-columns fails
[17:50:54] fox_mulder_cp: as 3.3, as 3.4
[17:52:45] darkxploit: has joined #RubyOnRails
[17:53:06] ElFerna: has joined #RubyOnRails
[17:55:19] Devalo: has joined #RubyOnRails
[17:55:19] fox_mulder_cp: why this don't work? https://gist.github.com/foxmuldercp/0396777aa48d6bb17245
[17:55:27] fox_mulder_cp: how to fix them
[17:55:34] fox_mulder_cp: /home/mulder/site/blogapp/db/migrate/20160207172937_rename_commenter_to_topic_in_comments.rb:3: syntax error, unexpected ':', expecting keyword_end
[17:55:37] fox_mulder_cp: t.rename: commenter, topic
[17:56:20] fox_mulder_cp: i try for two variants from manual, but it fails for a syncax
[17:57:28] intrigueD: Symbols missing for table name
[17:57:37] intrigueD: Use symbols for the column names
[17:57:58] intrigueD: and the method is rename_column
[17:58:48] fox_mulder_cp: not change_column ?
[17:59:37] intrigueD: you want to rename commenter to topic? That doesn't seem right
[18:00:34] fox_mulder_cp: intrigueD: yes. commenter is outdated by comment.User
[18:01:06] intrigueD: rename_column :comments, :commenter, :topic
[18:01:24] n00bDev: has joined #RubyOnRails
[18:01:38] intrigueD: in your Migration#up method
[18:02:05] techsethi: has joined #RubyOnRails
[18:03:07] fox_mulder_cp: .. def up ... and def down...?
[18:03:29] EMCHAMP_: has joined #RubyOnRails
[18:04:30] corioliss: has joined #RubyOnRails
[18:05:40] samgranieri: has joined #RubyOnRails
[18:06:23] baweaver: has joined #RubyOnRails
[18:06:59] srinidhi: has joined #RubyOnRails
[18:09:38] MaDErroR123: has joined #RubyOnRails
[18:09:49] fox_mulder_cp: intrigueD: yep. thanks
[18:10:04] StaticVoid: has joined #RubyOnRails
[18:10:28] fox_mulder_cp: but i want generate it by cli command recognition
[18:10:33] sleungcy: has joined #RubyOnRails
[18:11:03] tbuehlmann: not all migration methods are available via the CLI
[18:11:20] meoblast001: has joined #RubyOnRails
[18:12:25] dima_: has joined #RubyOnRails
[18:13:04] fox_mulder_cp: tbuehlmann: and i want learn this magic :_
[18:13:38] fox_mulder_cp: i have a self-motivate for learn ror magic
[18:15:22] intrigueD: I think it's better to not learn the magic commands and learn how to construct this stuff yourself
[18:16:11] intrigueD: I've never seen any of the pro RoR developers that I know use the generators
[18:16:21] intrigueD: maybe that's just me though
[18:18:32] tetraktys: has joined #RubyOnRails
[18:19:00] smathy: has joined #RubyOnRails
[18:20:09] _Tariq: has joined #RubyOnRails
[18:21:31] mhoungbo_: has joined #RubyOnRails
[18:21:36] kitsuneyo: has joined #RubyOnRails
[18:22:04] barhum2013: has joined #RubyOnRails
[18:22:06] fox_mulder_cp: intrigueD: ^) i know. but i think, that if magic present - it was created for somebody
[18:22:19] smoitra: has joined #RubyOnRails
[18:22:23] kitsuneyo: i have some standard test fixtures for a Person model, which were previously working fine, but now i'm getting: ERROR: null value in column "created_at" violates not-null constraint
[18:22:54] kitsuneyo: i don't understand what the problem is
[18:23:39] kitsuneyo: it seems to have happened since i created a new model that belongs_to Person
[18:26:01] RegulationD: has joined #RubyOnRails
[18:26:21] dcunit3d: has joined #RubyOnRails
[18:29:17] chouhoulis: has joined #RubyOnRails
[18:30:44] radar[air]: arthropododo: Rails 4 in Action is a fantastic book and it is way better than the Rails Tutorial.
[18:31:25] intrigueD: Radar[air]: is that book from Manning?
[18:31:35] radar[air]: intrigueD: that's right.
[18:32:10] fox_mulder_cp: i open the secret - Radar[air] is a one of authors :)
[18:32:36] radar[air]: intrigueD: Rails 4 in Action covers in 6 chapters what Rails Tutorial covers in the whole book. and then there's another 9 chapters.
[18:33:09] intrigueD: All of the Manning books I've read have been top quality
[18:33:24] fox_mulder_cp: but agile web very good book too, i take from it very good hints
[18:37:17] fox_mulder_cp: Nucky: i make some updates, u can test it for comments
[18:37:32] fox_mulder_cp: Radar[air]: do u see my blogapp? )
[18:37:38] PedramT: has joined #RubyOnRails
[18:37:38] radar[air]: fox_mulder_cp: Nope.
[18:37:55] radar[air]: fox_mulder_cp: I can't open anything right now that's not Twitter or IRC. The internet is too slow on the plane.
[18:38:37] fox_mulder_cp: Radar[air]: wow. what your plane flyes?
[18:38:51] radar[air]: fox_mulder_cp: huh?
[18:39:13] radar[air]: fox_mulder_cp: I'm flying an Emirates plane from Dubai to Brisbane.
[18:39:38] fox_mulder_cp: Radar[air]: conference, work, or trip?
[18:39:44] samgranieri: has joined #RubyOnRails
[18:39:58] radar[air]: fox_mulder_cp: I was on vacation for a week over in Rome, Florence and Venice.
[18:40:18] radar[air]: About to get some breakfast.
[18:40:58] radar[air]: Fun fact: the logs.ryanbigg.com activity graphs no longer fit on one MBP screen
[18:41:33] fox_mulder_cp: Radar[air]: win + edge - only left block (
[18:42:12] fox_mulder_cp: oh. i's a only menu %)
[18:42:30] intrigueD: Radar[air]: I went to Rome last winter, was windy and a little cold but I still had the gelati :)
[18:43:32] intrigueD: Should be far warmer in Brisbane!
[18:43:55] fox_mulder_cp: i want to trip in GB, Rome...
[18:43:58] intrigueD: I just returned from Brisbane and Cairns. I really liked Brisbane
[18:44:48] msyvich: has joined #RubyOnRails
[18:46:00] ferr: has joined #RubyOnRails
[18:46:28] futilegames: has joined #RubyOnRails
[18:46:33] roshanavand: has joined #RubyOnRails
[18:48:34] mdw: has joined #RubyOnRails
[18:50:10] tetraktys: has joined #RubyOnRails
[18:50:59] arBmind1: has joined #RubyOnRails
[18:51:17] dramagods: has joined #RubyOnRails
[18:51:18] roshanav_: has joined #RubyOnRails
[18:52:51] arup_r: has joined #RubyOnRails
[18:53:21] tetraktys: has joined #RubyOnRails
[18:55:44] nfk: has joined #RubyOnRails
[18:57:43] macsteps: has joined #RubyOnRails
[18:58:08] morfin: Agile book?
[18:58:26] ql6wlld: has joined #RubyOnRails
[18:58:38] morfin: it's very good - allows learn you RoR from basics
[18:59:45] fox_mulder_cp: morfin: yep. about online store
[19:00:19] fox_mulder_cp: i find in it very good collection of hints, such as cart
[19:00:37] morfin: btw i am really thinking about reimplementing one crappy PHP store
[19:01:06] DoubleMalt: has joined #RubyOnRails
[19:01:18] p1k: has joined #RubyOnRails
[19:02:27] MaDErroR123: has joined #RubyOnRails
[19:02:30] fox_mulder_cp: morfin: some weeks ago i say here - why learn rails. i'm a hostmaster in two shared hosting providers at last 2 years. one of it has a site based on freebsd 6(2005), php5.1 and bitrix (~2005 too)
[19:02:36] yoongkang: has joined #RubyOnRails
[19:02:41] fox_mulder_cp: and design from 1990th
[19:03:08] morfin: this is crap
[19:03:24] IrishGringo: has joined #RubyOnRails
[19:03:34] fox_mulder_cp: my heart cry, when i see, how to support girl change a price for domain registration in 4(!) places
[19:03:44] morfin: btw where you are from? I thought it's not used except in CIS countries
[19:03:58] fox_mulder_cp: morfin: Kiev. Ukraine.
[19:04:17] fox_mulder_cp: no politics, please :)
[19:04:20] morfin: i suspected something like that, i am from Russia
[19:04:49] morfin: i started learning Bitrix with their video guides
[19:04:50] arup_r: has left #RubyOnRails: ()
[19:04:51] fox_mulder_cp: morfin: we can speak russian at rusnet, mwahaha
[19:05:06] morfin: but after first level i gave up )
[19:05:12] kies^: has joined #RubyOnRails
[19:05:35] fox_mulder_cp: morfin: bitrix from 2005 and bitrix from now ... how rails 1 and rails 5 :)_
[19:05:36] morfin: at least because found job after 6 month
[19:06:02] morfin: rails 5 is just beta as i know
[19:06:34] morfin: i hope they're not going to change a lot because i am learning rails 4 now
[19:06:40] fox_mulder_cp: i relearn rails this autumn, i want write my own shared hosting control panel. with docker, epp, dns, domains,sql etc. but as i see this is a offtop
[19:07:09] fox_mulder_cp: morfin: i start my panel in r5beta, beta2 some days ago published
[19:07:33] morfin: and? what can you say?
[19:07:48] morfin: did they change very much in it?
[19:08:00] fox_mulder_cp: morfin: websockets :)
[19:08:17] fox_mulder_cp: and my last chrome fails for a security token
[19:08:48] fox_mulder_cp: default manual for it about online chat make me cry
[19:09:29] morfin: well, i just started learning all that
[19:10:04] morfin: and Ruby is strange after C++/JavaScript/Java/Lua/PHP :D
[19:10:11] fox_mulder_cp: morfin: i start re-learn rails this autumn from scratch blogapp, make my own blog engine.
[19:10:17] fox_mulder_cp: http://dev.blog.mulder.kiev.ua
[19:10:38] fox_mulder_cp: and this blog my test lab for hosting panel features
[19:11:14] morfin: how you generate PDF?
[19:11:20] tildes: has joined #RubyOnRails
[19:11:38] fox_mulder_cp: morfin: rails - very easy. but i ~1year use asp.net mvc4 for writing my own home finance (https://mycheque.info)
[19:11:51] fox_mulder_cp: morfin: see gemfile )
[19:12:54] fox_mulder_cp: morfin: i have a some pub's in habr. by powershell and bash
[19:13:18] fox_mulder_cp: after it some small projects on perl. i try to use django, but it is idiotic manual
[19:13:24] morfin: i guess you build app with some gems
[19:13:48] morfin: aaah wicked PDF uses wkhtmltopdf
[19:13:49] fox_mulder_cp: morfin: no, no gems, only years of hard code, burn and coffee ))
[19:13:53] morfin: i remember now )
[19:14:03] intrigueD: What are the options for storing a duration in the database? I can't think of many :(
[19:14:16] fox_mulder_cp: morfin: my perl + mojo app - easy, but requires meny code
[19:14:24] morfin: fox_mulder_cp i mean rails app
[19:14:37] fox_mulder_cp: intrigueD: what duration u mean?
[19:14:42] morfin: writing all stuff yourself seems to be silly idea
[19:14:49] morfin: like pagination
[19:14:57] fox_mulder_cp: morfin: ^) see gemfile
[19:15:14] morfin: you use will_paginate
[19:15:14] intrigueD: http://api.rubyonrails.org/classes/ActiveSupport/Duration.html
[19:15:15] fox_mulder_cp: morfin: silly, but very experience
[19:15:27] morfin: devise is monster
[19:15:33] morfin: i was looking at it's code
[19:15:46] morfin: it's very hard to understand(at least for me)
[19:15:55] fox_mulder_cp: morfin: i think -- all very seriously gems - are monster's
[19:16:09] intrigueD: say I have a model called Project and I want to store the estimated duration of it
[19:16:11] fox_mulder_cp: morfin: and what your way to rails dev?
[19:16:26] fox_mulder_cp: intrigueD: datetime?
[19:16:39] morfin: well, maybe later i will understand how write such complicated things)
[19:17:08] intrigueD: say each project has a duration of 3 months, but each project starts at a different time
[19:17:23] intrigueD: I want to store the fact that the project will take 3 months
[19:17:43] morfin: what do you mean what my way?
[19:17:50] fox_mulder_cp: intrigueD: date.now + 3.months?
[19:17:54] arup_r: has joined #RubyOnRails
[19:17:56] code2Learn: has joined #RubyOnRails
[19:18:09] fox_mulder_cp: morfin: how u start rails learn and use
[19:18:29] intrigueD: That results in another date time. I want to store the fact that the project takes 3 months, not the date 3 months from now
[19:18:37] morfin: well, i came to new work and some of apps they develop are RoR
[19:18:43] fox_mulder_cp: intrigueD: int default (3)?
[19:19:08] Pazician: has joined #RubyOnRails
[19:20:18] intrigueD: OK another example, say I have a web development boot camp course that takes 2 months and another that takes 1 month. Each instance of the boot camp course will start and finish on a different date
[19:20:47] intrigueD: But when I create a new instance of the boot camp course, I want to calculate the end date based on the start date from the stored duration
[19:21:09] fox_mulder_cp: intrigueD: start_date(date) + 1.months
[19:21:11] intrigueD: Boot camp courses could be 5 days, 3 weeks, 2 months or even 2 years!
[19:21:21] intrigueD: It's variable
[19:21:29] fox_mulder_cp: intrigueD: ooh
[19:22:18] fox_mulder_cp: https://www.google.com.ua/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwjhm-T_r-bKAhXD_HIKHfwQCcgQFggbMAA&url=http%3A%2F%2Fapi.rubyonrails.org%2Fclasses%2FActiveSupport%2FDuration.html&usg=AFQjCNFvQiM8c6II5Cs5m4q7X8D6bVs7Cw
[19:22:27] intrigueD: The only way I have thought of is to stored the created_date of the boot camp and store the created_date + duration
[19:22:28] fox_mulder_cp: http://api.rubyonrails.org/classes/ActiveSupport/Duration.html
[19:22:42] fox_mulder_cp: intrigueD: see link ^
[19:22:52] intrigueD: Then I can determine the duration from the time between those two dates
[19:23:08] mdw: has joined #RubyOnRails
[19:23:11] intrigueD: But surely there is a better way!
[19:23:25] tubbo: the question is do you want the user to input duration? or do you want them to input the end date?
[19:23:46] arBmind: has joined #RubyOnRails
[19:23:50] intrigueD: The user selects the duration
[19:24:25] intrigueD: from days, weeks, months, years
[19:24:32] fox_mulder_cp: so, about duration. i can't see a way to use enum (
[19:24:34] morfin: fox_mulder_cp, btw gems do not have to be badass unless they provide some complicated functionality like devise
[19:24:36] intrigueD: and a number
[19:24:42] ur5us: has joined #RubyOnRails
[19:24:50] tubbo: intrigueD: you could use chronic https://github.com/mojombo/chronic
[19:24:55] morfin: which as i know uses other gem also
[19:24:56] fox_mulder_cp: morfin: badass?
[19:25:13] morfin: very complicated
[19:26:07] fox_mulder_cp: now i have a beer and SOULFLY - Sodomites as soundtrack, so .. )
[19:26:17] intrigueD: tubbo: Store a 'duration string' that chronic recognises?
[19:26:37] tubbo: intrigueD: no, i would say take user input and parse it into a duration
[19:27:12] tubbo: intrigueD: the way you'd do that is self.duration = starts_at - Chronic.parse(ends_at_text)
[19:27:59] webdestroya: has joined #RubyOnRails
[19:28:11] Deck-: has joined #RubyOnRails
[19:29:12] intrigueD: (??????????????????? ?????????
[19:30:04] chouhoulis: has joined #RubyOnRails
[19:31:22] arup_r: what ^^ pic is saying ? :)
[19:33:59] HalcyonicStorm: has joined #RubyOnRails
[19:36:55] _Tariq: has joined #RubyOnRails
[19:37:40] arashb: has joined #RubyOnRails
[19:37:49] marr: has joined #RubyOnRails
[19:38:46] kirillzh: has joined #RubyOnRails
[19:39:35] mercwithamouth: has joined #RubyOnRails
[19:43:34] arBmind: has joined #RubyOnRails
[19:44:58] Pazician: has joined #RubyOnRails
[19:46:12] symbol: has joined #RubyOnRails
[19:46:30] mdw: has joined #RubyOnRails
[19:48:08] mhoungbo_: has joined #RubyOnRails
[19:48:49] zeros0623: has joined #RubyOnRails
[19:49:13] prgmmr: has joined #RubyOnRails
[19:51:16] joshuaturner: has joined #RubyOnRails
[19:51:23] arthropododo: Radar[air]: thanks!
[19:52:28] joshuaturner: has joined #RubyOnRails
[19:53:04] radar[air]: Landing shortly, so I'll be offline soonish.
[19:53:52] code2Learn: has joined #RubyOnRails
[19:54:33] fox_mulder_cp: Radar[air]: good trip
[19:55:12] intrigueD: has joined #RubyOnRails
[19:55:12] intrigueD: has joined #RubyOnRails
[19:55:42] prgmmr: Hello, I'm starting to create a backend for IOS to communicate with, where should I start with creating APIs so I could for ex. Create users, insert data, delete data, retrieve data from my postgresql database.
[19:57:06] intrigueD: prgmmr: https://github.com/rails-api/rails-api
[19:57:15] intrigueD: I think it's now part of Rails 5?
[19:58:22] fox_mulder_cp: intrigueD: in r4, as i see u can usr api
[19:59:02] intrigueD: fox_mulder_cp: I don't understand what you just said, sorry
[20:00:07] prgmmr: intrigueD: so if I'm using rails 5, won't need to add the gem?
[20:01:37] PedramT: has joined #RubyOnRails
[20:02:22] arBmind: has joined #RubyOnRails
[20:03:41] intrigueD: prgmmr: Yep
[20:04:59] prgmmr: What do you think of fastAPI?
[20:04:59] intrigueD: You won't need the gem if you're using Rails 5
[20:06:00] intrigueD: never used it
[20:07:23] Devalo: has joined #RubyOnRails
[20:10:34] freezevee: has joined #RubyOnRails
[20:10:38] freezevee: can anyone help please http://stackoverflow.com/questions/35221886/export-foreman-workers-from-rails-app-to-upstart ?
[20:10:53] doublemalt_: has joined #RubyOnRails
[20:12:52] smathy: has joined #RubyOnRails
[20:15:00] PedramT: has joined #RubyOnRails
[20:15:03] mhoungbo_: has joined #RubyOnRails
[20:15:06] FooMunki: has joined #RubyOnRails
[20:15:42] Cervajz: has joined #RubyOnRails
[20:17:22] rubyonrailed: has joined #RubyOnRails
[20:17:55] Cohedrin: has joined #RubyOnRails
[20:18:09] yoongkang: has joined #RubyOnRails
[20:18:30] nodejunkie: has joined #RubyOnRails
[20:24:48] yoongkang: has joined #RubyOnRails
[20:24:52] volongato: has joined #RubyOnRails
[20:28:35] arBmind: has joined #RubyOnRails
[20:29:19] Pathfinder: has joined #RubyOnRails
[20:30:41] sankaber: has joined #RubyOnRails
[20:30:50] chouhoulis: has joined #RubyOnRails
[20:32:22] PedramT: has joined #RubyOnRails
[20:33:30] ElFerna: has joined #RubyOnRails
[20:33:40] baweaver: has joined #RubyOnRails
[20:35:47] dramagods: has joined #RubyOnRails
[20:35:55] smathy: has joined #RubyOnRails
[20:36:01] Surt_Q: has joined #RubyOnRails
[20:40:49] unreal_: has joined #RubyOnRails
[20:40:59] Ergo: has joined #RubyOnRails
[20:43:07] rhizome: freezevee: it seems like an environment problem
[20:44:14] bronson: has joined #RubyOnRails
[20:45:58] rhizome: and delete those questions at the end.
[20:48:20] arBmind: has joined #RubyOnRails
[20:49:38] _Tariq: has joined #RubyOnRails
[20:50:22] Blaze_Boy: has joined #RubyOnRails
[20:52:39] DubiousCarrot: has joined #RubyOnRails
[20:55:11] _Tariq: has joined #RubyOnRails
[20:57:28] drale2k: is everyone using a gem (devise, anything else?) for authentication with rails?
[20:57:55] Papierkorb: drale2k: Everyone? No. Many are though I'd say.
[20:58:01] drale2k: or are there people doing it just manually
[20:58:10] zarubin: has joined #RubyOnRails
[20:58:41] drale2k: Papierkorb: devise is such an overkill for me. I keep changing / bending it more and more and now i am looking for something new
[20:59:24] nerium: has joined #RubyOnRails
[21:00:11] Papierkorb: drale2k: I heard of 'Scocery' I think it was called to authentication, but never tried it
[21:01:52] darkxploit: has joined #RubyOnRails
[21:02:25] smathy: drale2k, I'm not using a gem.
[21:02:55] triangles2: has joined #RubyOnRails
[21:02:59] drale2k: reading about the sorcery gem
[21:03:08] drale2k: smathy: you rolled your own stuff?
[21:03:22] smathy: Yeah, it's not hard.
[21:04:30] havenwood: has joined #RubyOnRails
[21:06:09] DoubleMalt: has joined #RubyOnRails
[21:06:13] benlieb: has joined #RubyOnRails
[21:06:29] IanMalcolm: has joined #RubyOnRails
[21:06:54] Papierkorb: drale2k: Also did it on my own, the gems I knew of were too restricting. Benefit is the flexibility, big disadvantage is having to implement stuff like password recovery yourself
[21:07:44] Papierkorb: drale2k: it does not end at "comparing passwords" (Sure hashed, still). And doing that alone is really a hard problem in itself.
[21:08:08] gregf___: has joined #RubyOnRails
[21:08:14] a1fa: hello. i am trying to populate a drop down using render partial triggered by a js change. it works fine if it comes directly from active record, but it does not work fine if it is an array
[21:08:22] a1fa: gisting the code at them
[21:08:40] Papierkorb: drale2k: What I'm trying to get at, if you're somewhat new, please read some articles on it, and also CVEs, as those often contain and explain in detail what went wrong in doing the authentication, so you don't fall into the same trap
[21:08:47] drale2k: I also found this gem, Clearance https://github.com/thoughtbot/clearance
[21:08:52] drale2k: looks pretty light weight
[21:09:41] rhizome: all of the major ones are equally fine
[21:10:35] _Tariq: has joined #RubyOnRails
[21:10:36] a1fa: https://gist.github.com/anonymous/d94ccd62d869e8a530e9
[21:11:27] ebryn: has joined #RubyOnRails
[21:12:26] tetraktys: has joined #RubyOnRails
[21:12:33] sleungcy: has joined #RubyOnRails
[21:13:48] a1fa: i think i just need to fix the available.js.coffee in order to be able to render array instead of active record
[21:15:25] laith: has joined #RubyOnRails
[21:15:49] laith: has joined #RubyOnRails
[21:15:58] laith_: has joined #RubyOnRails
[21:16:04] laith_: has joined #RubyOnRails
[21:17:49] a1fa: ooo i think i have it figured out
[21:18:47] robbyoconnor: has joined #RubyOnRails
[21:19:05] freezevee: rhizome: how could you troubleshoot it ?
[21:21:30] Spami: has joined #RubyOnRails
[21:21:53] _Tariq: has joined #RubyOnRails
[21:24:59] w0bni: has joined #RubyOnRails
[21:25:55] rhizome: freezevee: run through all the parts individually, in the environment they need to eventually run in
[21:27:02] rhizome: which one returns that error? what's missing from the env that will let it work?
[21:27:24] RegulationD: has joined #RubyOnRails
[21:27:24] rhizome: foreman and upstart aren't magic
[21:27:46] ql6wlld: has joined #RubyOnRails
[21:30:02] freezevee: rhizome: is upstart being replaced by systemd ?
[21:30:07] freezevee: am I losing my time ?
[21:30:19] freezevee: I mean I should try only systemctl
[21:30:34] rhizome: i have no idea. if you just want service management, i prefer OS tools, but whatever.
[21:31:13] a1fa: jaay, i got it working
[21:31:31] chouhoulis: has joined #RubyOnRails
[21:33:00] SteenJobs: has joined #RubyOnRails
[21:33:29] dtordable: has joined #RubyOnRails
[21:34:01] a1fa: soo happy... crappy code :X but it worksZ
[21:34:09] a1fa: thanks. overlaps?
[21:37:26] tetraktys: has joined #RubyOnRails
[21:37:31] a1fa: is it possible to associate has_many with nil? ie User has_many: things , but it could also belong to user if it is nil?
[21:39:32] a1fa: fryguy: i want to associate things based on the "user_id" and user_id being nil
[21:39:36] pawnbox: has joined #RubyOnRails
[21:39:47] arashb: has joined #RubyOnRails
[21:39:48] a1fa: so if things has user_id = nil? it belongs to all users
[21:40:27] a1fa: if it has an id, it belongs to that specific user
[21:41:26] fryguy: in users, i'd add a scope for things that calls the original things and unions with the new results. You'll run into various problems (nested attributes etc), but I don't know of a better way to do it off the top of my head
[21:42:33] a1fa: ACTION looks up scopes
[21:43:09] yoongkang: has joined #RubyOnRails
[21:43:34] gavinhughes: has joined #RubyOnRails
[21:43:54] a1fa: so i just need to add an or scope to my Things model.. in this case, its just a shared calendar
[21:44:24] a1fa: thanks fryguy
[21:49:10] moei: has joined #RubyOnRails
[21:51:38] a1fa: scoe :global, -> { where(user_id: nil)}
[21:51:43] a1fa: scope* even
[21:52:09] yfeldblum: has joined #RubyOnRails
[21:52:43] sandstrom: has joined #RubyOnRails
[21:54:10] robbyoconnor: has joined #RubyOnRails
[21:55:20] a1fa: or do you use .and
[21:55:56] yfeldblum: has joined #RubyOnRails
[21:57:34] a1fa: how would you add or to your scope?
[21:58:03] astrofog: has joined #RubyOnRails
[21:58:32] a1fa: scope :global, -> { where(user_id: nil)}
[21:58:48] a1fa: i need this to be an "OR"
[21:59:49] yfeldblum: has joined #RubyOnRails
[22:00:07] Blaze_Boy: has joined #RubyOnRails
[22:00:32] ur5us: has joined #RubyOnRails
[22:05:37] ur5us: has joined #RubyOnRails
[22:06:37] ur5us_: has joined #RubyOnRails
[22:07:02] diegoviola: has joined #RubyOnRails
[22:09:29] a1fa: this is not working for me
[22:09:38] pawnbox: has joined #RubyOnRails
[22:10:34] matthias_: has joined #RubyOnRails
[22:11:37] Pathfinder_: has joined #RubyOnRails
[22:12:42] rhizome: just make a method
[22:13:44] sleungcy: has joined #RubyOnRails
[22:14:34] a1fa: rhizome: i ended up running two separate queries and combining them
[22:16:23] futilegames: has joined #RubyOnRails
[22:16:51] wethu: has joined #RubyOnRails
[22:16:58] wethu: has joined #RubyOnRails
[22:20:19] kirillzh: has joined #RubyOnRails
[22:23:52] volongato: has joined #RubyOnRails
[22:24:21] ElFerna: has joined #RubyOnRails
[22:30:50] futilegames_: has joined #RubyOnRails
[22:32:08] zoidfarb: has joined #RubyOnRails
[22:32:18] chouhoulis: has joined #RubyOnRails
[22:33:00] zoidfarb: Hello, I want to have the same Rails application serve two different domains, with different logos and a different selection of products highlighted. Should I be looking at having two separate "layouts" or is that overkill for my use-case?
[22:33:15] zoidfarb: Should I just be putting some conditional logic in my controllers instead?
[22:34:29] smathy: zoidfarb, different layouts might be the simplest, or using content_for for the logos, or a helper method, many different options.
[22:36:26] gavinhughes: has joined #RubyOnRails
[22:39:25] zoidfarb: smathy: Yeah, I'm kind of overwhelmed by the different options, and trying to decide what's the "right" option
[22:40:08] zoidfarb: smathy: Maybe I should just pick one option and do it until it becomes a problem
[22:40:08] gavinhug_: has joined #RubyOnRails
[22:40:37] smathy: zoidfarb, good plan.
[22:42:45] Mia: has joined #RubyOnRails
[22:44:48] zoidfarb: I'm kind of a rails novice, so I'm worried about doing something dumb that will hamstring me later on
[22:44:59] zoidfarb: but whatever, it's all in version control...
[22:45:42] NBarnes: has joined #RubyOnRails
[22:47:22] Ropeney: has joined #RubyOnRails
[22:47:39] smathy: Good, very little downside then, they call it SOFT ware for a reason.
[22:47:44] kies^: has joined #RubyOnRails
[22:50:18] Anakat: has joined #RubyOnRails
[22:55:16] Devalo: has joined #RubyOnRails
[22:59:10] Limix: has joined #RubyOnRails
[23:00:55] Anakat: has joined #RubyOnRails
[23:01:57] code2Learn: has joined #RubyOnRails
[23:02:16] intrigueD: has joined #RubyOnRails
[23:04:20] harly: has joined #RubyOnRails
[23:04:58] _Tariq: has joined #RubyOnRails
[23:08:58] pawnbox: has joined #RubyOnRails
[23:11:44] ElFerna: has joined #RubyOnRails
[23:18:24] johnflux: has joined #RubyOnRails
[23:18:24] johnflux: has joined #RubyOnRails
[23:24:11] gavinhughes: has joined #RubyOnRails
[23:27:41] devFrederick: has joined #RubyOnRails
[23:30:32] fedexo: has joined #RubyOnRails
[23:33:02] chouhoulis: has joined #RubyOnRails
[23:39:14] pawnbox: has joined #RubyOnRails
[23:40:13] mhoungbo_: has joined #RubyOnRails
[23:41:32] ur5us: has joined #RubyOnRails
[23:41:46] roshanavand: has joined #RubyOnRails
[23:51:25] stannard: has joined #RubyOnRails
[23:53:57] bronson: has joined #RubyOnRails
[23:55:37] coderMe: has joined #RubyOnRails
[23:56:39] _Tariq: has joined #RubyOnRails
[23:56:53] Devalo: has joined #RubyOnRails