« Back to channel list

#RubyOnRails - 01 February 2016

« Back 1 day Forward 1 day »
[00:08:05] one_zero: has joined #RubyOnRails
[00:10:14] mostlybadfly: has joined #RubyOnRails
[00:10:15] joaomdmoura__: has joined #RubyOnRails
[00:10:18] barttenbrinke: has joined #RubyOnRails
[00:10:32] gousuto: has joined #RubyOnRails
[00:10:36] amitchellbullard: has joined #RubyOnRails
[00:10:48] ewilliam: has joined #RubyOnRails
[00:10:50] Guest69885: has joined #RubyOnRails
[00:11:08] Guest4184_____: has joined #RubyOnRails
[00:12:24] yirvineox: has joined #RubyOnRails
[00:12:31] spastorino: has joined #RubyOnRails
[00:12:35] shwoodard____: has joined #RubyOnRails
[00:12:40] pfg: has joined #RubyOnRails
[00:13:28] gmci: has joined #RubyOnRails
[00:13:33] tejasmanohar: has joined #RubyOnRails
[00:14:15] yirvineox-x360: has joined #RubyOnRails
[00:17:49] _Tariq: has joined #RubyOnRails
[00:17:54] gbgdev_: has joined #RubyOnRails
[00:18:14] shmilan: has joined #RubyOnRails
[00:19:50] herbst: has joined #RubyOnRails
[00:21:07] ruurd: has joined #RubyOnRails
[00:24:33] pfg: has joined #RubyOnRails
[00:24:50] SPYGAME: has joined #RubyOnRails
[00:25:27] Pulp: has joined #RubyOnRails
[00:27:56] sneep: has joined #RubyOnRails
[00:31:23] Guest69885: has left #RubyOnRails: ()
[00:32:24] magic: has joined #RubyOnRails
[00:33:03] pyemkey: has joined #RubyOnRails
[00:37:41] stannard: has joined #RubyOnRails
[00:42:00] lyoshajapan: has joined #RubyOnRails
[00:44:36] lyoshajapan: has joined #RubyOnRails
[00:44:58] ur5us: has joined #RubyOnRails
[00:45:23] gbgdev: has joined #RubyOnRails
[00:46:04] herbst: has joined #RubyOnRails
[00:46:29] chouhoulis: has joined #RubyOnRails
[00:47:23] ur5us_: has joined #RubyOnRails
[00:48:20] blackmes1: has joined #RubyOnRails
[00:49:26] HenriettaSalt: has joined #RubyOnRails
[00:58:25] sevenseacat: has joined #RubyOnRails
[00:58:40] _Tariq: has joined #RubyOnRails
[01:02:19] sleungcy: has joined #RubyOnRails
[01:03:26] ftj: has joined #RubyOnRails
[01:04:48] EMCHAMP_: has joined #RubyOnRails
[01:05:03] ftj: I've tried every static blog generator under the sun, and I don't like any of them. I'm looking for something with a nice web UI that stores blog data in markdown (either in a db or flat files ??? doesn't matter).
[01:05:40] ftj: I've given up looking, so I want to write a simple one my own using Rails. Goals: store posts in markdown in the database, save Rails-generated pages to filesystem, run rake task to publish folder to S3.
[01:05:45] barhum2013: has joined #RubyOnRails
[01:06:42] ftj: I can handle goal 1 and goal 3, but I'm completely stumped on step 2. No idea where to even start. Should I be scraping my own application with wget? Is there some way to get the output of a route programmatically without scraping?
[01:07:43] jgt: has joined #RubyOnRails
[01:09:15] soahccc: ftj: No luck with jekyll?
[01:10:03] ftj: soahcc I really want a web ui for editing
[01:12:19] djbkd: has joined #RubyOnRails
[01:14:05] barajasfab: has joined #RubyOnRails
[01:15:11] agoldboi: has joined #RubyOnRails
[01:15:37] herbst: has joined #RubyOnRails
[01:18:34] gbgdev: has joined #RubyOnRails
[01:19:15] sankaber: has joined #RubyOnRails
[01:19:29] speakingcode: has joined #RubyOnRails
[01:22:12] nettoweb: has joined #RubyOnRails
[01:26:11] baweaver: has joined #RubyOnRails
[01:27:00] soahccc: ftj: hmm then I have no idea :( I'm not into static pages since I mostly don't get the point. I don't know exactly how jekyll works but I guess it uses a site template and just renders the markdown in there?
[01:27:48] ftj: soahccc Right, but I don't even care about rendering from markdown files. I'm content to store the markdown in the db, as long as I can grab the rendered output and save it as html
[01:28:51] soahccc: ftj: well files or DB doesn't really matter at the end. You have you general site template (css, etc) and a template for you blog post in which you just inject the rendered markdown
[01:29:06] ftj: Exactly right.
[01:30:35] lyoshajapan: has joined #RubyOnRails
[01:30:52] soahccc: Not sure if that is the right way of doing it but I would create a site template and have a task which copies that template and creates pages for every DB entry. Depending on how simple it should be it would be a matter of gsub on the template :)
[01:31:22] soahccc: ftj: or you use jekyll and just create the MD files from DB before running the jekyll build task
[01:35:16] lyoshajapan: Today I solo, so I pair with you! All of you!!!
[01:43:43] herbst: has joined #RubyOnRails
[01:46:26] diegoviola: has joined #RubyOnRails
[01:47:45] chouhoulis: has joined #RubyOnRails
[01:48:56] ftj: has joined #RubyOnRails
[01:50:12] HenriettaSalt: has joined #RubyOnRails
[01:50:16] cmckee: has joined #RubyOnRails
[01:51:58] ahills: has left #RubyOnRails: ()
[01:52:04] blackmes1: has joined #RubyOnRails
[01:52:44] Rodya_: has joined #RubyOnRails
[01:54:39] Rodya_: has joined #RubyOnRails
[01:59:40] Rodya_: has joined #RubyOnRails
[02:02:19] speakingcode: has joined #RubyOnRails
[02:04:46] joshkovach: has joined #RubyOnRails
[02:05:10] pawnbox: has joined #RubyOnRails
[02:08:15] Rodya_: has joined #RubyOnRails
[02:10:17] herbst: has joined #RubyOnRails
[02:11:50] baweaver: has joined #RubyOnRails
[02:12:34] yoongkang: has joined #RubyOnRails
[02:18:35] speaking2ode: has joined #RubyOnRails
[02:21:18] diego1: has joined #RubyOnRails
[02:22:03] baweaver: has joined #RubyOnRails
[02:22:32] Rodya_: has joined #RubyOnRails
[02:23:51] speakingcode: has joined #RubyOnRails
[02:25:26] barhum2013: has joined #RubyOnRails
[02:26:51] herbst: has joined #RubyOnRails
[02:26:58] treaki_: has joined #RubyOnRails
[02:27:21] Rodya_: has joined #RubyOnRails
[02:28:03] jcp: has joined #RubyOnRails
[02:31:01] s2013: has joined #RubyOnRails
[02:31:06] _Tariq: has joined #RubyOnRails
[02:31:48] g3funk: has joined #RubyOnRails
[02:32:07] capin: hello, im working my way through "Rails 4 in Action" and am running into the following error, https://gist.github.com/ipatch/5adef6d68929ea3dbc25
[02:32:24] _Tariq: has joined #RubyOnRails
[02:32:44] sevenseacat: capin: have you included Pundit in your ApplicationController ?
[02:32:55] pawnbox: has joined #RubyOnRails
[02:33:51] capin: sevenseacat: i believe so, ...let me check
[02:34:33] Rodya_: has joined #RubyOnRails
[02:35:01] capin: sevenseacat: the admin/application_controller ? or the application_controller ?
[02:35:03] _Tariq: has joined #RubyOnRails
[02:35:08] djbkd: has joined #RubyOnRails
[02:35:09] sevenseacat: ApplicationController
[02:35:46] djbkd: has joined #RubyOnRails
[02:36:17] capin: thanks :)
[02:36:49] _Tariq: has joined #RubyOnRails
[02:37:00] jorrin: has joined #RubyOnRails
[02:38:53] barhum2013: has joined #RubyOnRails
[02:39:30] stannard: has joined #RubyOnRails
[02:42:10] jorrin: has joined #RubyOnRails
[02:45:42] Rodya_: has joined #RubyOnRails
[02:46:21] jorrin: Anyone mind helping me with this? https://stackoverflow.com/questions/35121786/empty-item-displaying-from-nested-resource
[02:47:41] bahar: has joined #RubyOnRails
[02:47:41] bahar: has joined #RubyOnRails
[02:48:33] chouhoulis: has joined #RubyOnRails
[02:49:18] Rodya_: has joined #RubyOnRails
[02:50:56] HenriettaSalt: has joined #RubyOnRails
[02:51:51] barhum2013: has joined #RubyOnRails
[02:52:20] juddey: has joined #RubyOnRails
[02:53:28] herbst: has joined #RubyOnRails
[02:55:06] blackmes1: has joined #RubyOnRails
[02:56:01] fedexo: has joined #RubyOnRails
[02:57:04] Bloomer: has joined #RubyOnRails
[03:01:04] speakingcode: has joined #RubyOnRails
[03:01:18] lyoshajapan: has joined #RubyOnRails
[03:01:58] johnflux: has joined #RubyOnRails
[03:06:31] Glenny: has joined #RubyOnRails
[03:06:32] _Tariq: has joined #RubyOnRails
[03:09:45] capin: why would i get the following errors running `rspec` https://gist.github.com/ipatch/53d2a1d98c9b819045e0
[03:09:50] cmckee: has joined #RubyOnRails
[03:10:39] sevenseacat: capin: because you have bugs in your code and/or specs
[03:10:41] shmilan: has joined #RubyOnRails
[03:11:45] capin: sevenseacat: im pretty sure i have my routes.rb file setup properly, so im not sure why i would be getting a routing error
[03:12:08] duncannz: has joined #RubyOnRails
[03:12:09] tjbiddle: has joined #RubyOnRails
[03:12:14] _Tariq: has joined #RubyOnRails
[03:12:45] sevenseacat: i could hazard a guess, but I suggest retracing your steps on the refactoring of the ProjectsController when you split it into the admin namespace
[03:13:09] _Tariq: has joined #RubyOnRails
[03:13:14] sevenseacat: for the first spec, anyway
[03:13:43] yoongkang: has joined #RubyOnRails
[03:14:09] sevenseacat: second error is a straightforward typo, and no context for the other three
[03:14:23] droptone: Question: I have been working for 2 days straight trying to get the foundation-rails "container-to-grid" functionality to work
[03:14:33] droptone: I am porting a Rails 3.2.x site to Rails 4.2.x.
[03:14:33] duncannz: has joined #RubyOnRails
[03:14:36] droptone: Here is the code: https://gist.github.com/anonymous/b59b3cdf4deb9cd201bd
[03:14:40] sevenseacat: "Question: <something that isnt a question>"
[03:14:55] joshkovach: has joined #RubyOnRails
[03:15:14] _Tariq: has joined #RubyOnRails
[03:15:22] droptone: So for whatever reason, the nav is showing up as bullets, like an ordered list.
[03:16:05] droptone: Matz Is Nice And So We Are Passive Aggressive
[03:16:15] uris: has joined #RubyOnRails
[03:16:38] droptone: But yes, my question was going to take two lines of IRC input
[03:16:40] droptone: so I had to divide it.
[03:16:50] sevenseacat: we're up to eight and still no question
[03:17:01] droptone: Um, the question is "why"
[03:17:04] droptone: Based on the provided code
[03:17:09] droptone: why on god's green earth is this not working.
[03:17:22] droptone: It was working fine on Rails 3.2.x, on Rails 4.2.x it will not work.
[03:17:27] droptone: Everything else appears functional, including other javascript.
[03:17:46] droptone: I have tried to initalize foundation JS in every way imaginable, I've read about 50 web pages on the topic.
[03:17:55] droptone: the stylesheets appear to be working fine, I believe it's the JS.
[03:18:02] matthewd: My eyes are too old to read things that don't have syntax highlighting :(
[03:18:33] lyoshajapan: has joined #RubyOnRails
[03:18:39] droptone: But my nav is appearing as a bulleted list instead of the "container-to-grid" functionality that worked fine with the same version of foundation on Rails 3.2.x.
[03:19:12] sevenseacat: I hope you find someone non-passive-aggressive to help you.
[03:19:20] droptone: hah, me too.
[03:19:22] droptone: I'll keep at it.
[03:21:29] baweaver: has joined #RubyOnRails
[03:23:49] herbst: has joined #RubyOnRails
[03:25:17] konsolebox: has joined #RubyOnRails
[03:32:33] Rodya_: has joined #RubyOnRails
[03:34:34] dopamean_: has joined #RubyOnRails
[03:35:55] cmckee: has joined #RubyOnRails
[03:38:04] Rodya_: has joined #RubyOnRails
[03:38:06] iateadonut: has joined #RubyOnRails
[03:38:16] djbkd: has joined #RubyOnRails
[03:41:56] smoitra: has joined #RubyOnRails
[03:44:19] unreal: has joined #RubyOnRails
[03:49:18] chouhoulis: has joined #RubyOnRails
[03:49:21] spags: has joined #RubyOnRails
[03:50:02] Puffball: has joined #RubyOnRails
[03:50:12] capin: one failure left
[03:51:22] northfurr: has joined #RubyOnRails
[03:51:41] HenriettaSalt: has joined #RubyOnRails
[03:53:35] herbst: has joined #RubyOnRails
[03:56:56] Rodya_: has joined #RubyOnRails
[03:57:06] capin: anyone know why this spec would be failing, https://gist.github.com/ipatch/d9ab1a28264048997279
[03:58:08] blackmes1: has joined #RubyOnRails
[04:04:06] sevenseacat: capin: because the content isnt on the page.
[04:04:27] harly: has joined #RubyOnRails
[04:04:34] sleungcy: has joined #RubyOnRails
[04:05:55] djbkd: has joined #RubyOnRails
[04:06:34] atomical: has joined #RubyOnRails
[04:07:46] capin: sevenseacat: okay, so how would i fix this spec?
[04:07:50] atomical_: has joined #RubyOnRails
[04:08:00] baweaver: probably put content on the page
[04:08:02] sevenseacat: depends on why the content isn't on the page.
[04:08:23] sevenseacat: without seeing a single line of your code, it's impossible to know.
[04:10:06] pawnbox: has joined #RubyOnRails
[04:10:19] capin: https://gist.github.com/ipatch/d9ab1a28264048997279 <= just updated with code ;)
[04:10:30] northfurr: has joined #RubyOnRails
[04:12:15] sevenseacat: capin: and can we see the show view for projects?
[04:12:35] capin: yeah one sec please
[04:14:02] capin: gist updated
[04:15:34] capin: thanks ;) it was the show.html.erb template
[04:15:35] qejk: has joined #RubyOnRails
[04:15:55] sevenseacat: baweaver: is the winner
[04:16:17] helpa: Congratulations! You have earned a delicious, fresh-made cookie. :)
[04:16:23] baweaver: ACTION dances
[04:16:26] braincrash: has joined #RubyOnRails
[04:16:57] capin: all tests are passing now \o/ time for bed :)
[04:18:33] harly: so it turns out I don't actually understand how virtualbox snapshots work when deleting a series of them. (current is now the base OS install)
[04:18:37] _Tariq: has joined #RubyOnRails
[04:19:08] lyoshajapan: has joined #RubyOnRails
[04:21:40] HenriettaSalt: has joined #RubyOnRails
[04:22:53] nbdy: has joined #RubyOnRails
[04:23:15] herbst: has joined #RubyOnRails
[04:27:15] deur-: has joined #RubyOnRails
[04:34:22] barhum2013: has joined #RubyOnRails
[04:36:08] pyemkey: has joined #RubyOnRails
[04:38:13] Limix: has joined #RubyOnRails
[04:42:14] tw1sted: has joined #RubyOnRails
[04:43:05] rogue_koder: has joined #RubyOnRails
[04:47:29] htmldrum: has joined #RubyOnRails
[04:49:29] barhum2013: has joined #RubyOnRails
[04:50:03] chouhoulis: has joined #RubyOnRails
[04:51:15] mkp: has joined #RubyOnRails
[04:51:52] barhum2013: has joined #RubyOnRails
[04:51:59] mkp: running a rails 4.2.5 app and my presenter classes are not autoloading, however my services classes. is this normal behavior?
[04:52:17] mkp: services classes are autoloading*
[04:52:37] sevenseacat: depends. where are your presenter classes located and how are they loaded?
[04:52:56] mkp: presenters are in app/presenters and services are in app/services
[04:54:21] mkp: services work perfectly without any additional work other than creating the service directory and individual service classes. i did the same for presenters but when i try to test it out by calling it in the console i keep getting 'NameError: uninitialized constant ExamplePresenter'
[04:54:39] mkp: i have reloaded my console several times and still get the same thing
[04:54:56] herbst: has joined #RubyOnRails
[04:56:04] sevenseacat: okay, so how are you loading them? are you doing anything strange like loading them in an initializer? what file is your ExamplePresenter class in?
[04:56:54] mkp: file would be app/presenters/example_presenter.rb
[04:57:18] mkp: and i haven't gotten past just trying to get the class itself to load in the rails console
[04:57:48] mkp: i haven't done anything outside of create the presenters directory and individual presenter files/classes
[04:58:10] mkp: that's the same way i approached services, and everything automatically worked and loaded
[04:58:45] sevenseacat: ok, using spring? you may need to restart spring
[04:59:17] mkp: gotcha, ill try that
[04:59:48] sevenseacat: ACTION mumbles something about fucking spring
[05:01:08] blackmes1: has joined #RubyOnRails
[05:04:00] mkp: sevenseacat, that was it. thanks for the help!
[05:10:32] lyoshajapan: has joined #RubyOnRails
[05:11:56] dionysus69: has joined #RubyOnRails
[05:18:09] Cache_Money: has joined #RubyOnRails
[05:20:45] paradisaeidae: has joined #RubyOnRails
[05:21:50] chipotle: has joined #RubyOnRails
[05:24:01] krz: has joined #RubyOnRails
[05:24:51] herbst: has joined #RubyOnRails
[05:39:30] ur5us: has joined #RubyOnRails
[05:40:11] yirvineox_: has joined #RubyOnRails
[05:40:37] emchamp12: has joined #RubyOnRails
[05:40:58] kings: has joined #RubyOnRails
[05:41:24] dopie2: has joined #RubyOnRails
[05:42:00] adre: has joined #RubyOnRails
[05:42:16] jlpeters_: has joined #RubyOnRails
[05:42:38] baweaver: has joined #RubyOnRails
[05:42:43] artmann_: has joined #RubyOnRails
[05:43:35] johnflux_: has joined #RubyOnRails
[05:43:35] johnflux_: has joined #RubyOnRails
[05:43:40] jbermudes_: has joined #RubyOnRails
[05:43:41] fedexo_: has joined #RubyOnRails
[05:43:54] HenriettaSalt: has joined #RubyOnRails
[05:44:05] zrl_: has joined #RubyOnRails
[05:44:57] mc_fail: has joined #RubyOnRails
[05:45:28] lsone_: has joined #RubyOnRails
[05:45:28] StaticVo1d: has joined #RubyOnRails
[05:45:28] _fortis_: has joined #RubyOnRails
[05:45:29] pydave6377: has joined #RubyOnRails
[05:45:35] kaspergr1bbe: has joined #RubyOnRails
[05:46:40] aaronr_: has joined #RubyOnRails
[05:47:05] Ratler_: has joined #RubyOnRails
[05:47:32] duderono_: has joined #RubyOnRails
[05:47:39] AntiSpamMeta: has joined #RubyOnRails
[05:48:10] FooBarWidget_: has joined #RubyOnRails
[05:48:17] DanKnox^: has joined #RubyOnRails
[05:48:25] thomasfedb: has joined #RubyOnRails
[05:48:25] thomasfedb: has joined #RubyOnRails
[05:48:31] MalcolmReynolds: has joined #RubyOnRails
[05:48:34] AlHafoudh_: has joined #RubyOnRails
[05:48:49] abracada-: has joined #RubyOnRails
[05:48:50] FastJack_: has joined #RubyOnRails
[05:48:59] Olipro_: has joined #RubyOnRails
[05:49:35] braincra-: has joined #RubyOnRails
[05:50:09] duderono_: has joined #RubyOnRails
[05:50:24] dmarr: has joined #RubyOnRails
[05:50:37] noah256: has joined #RubyOnRails
[05:50:45] gambl0re: has joined #RubyOnRails
[05:50:45] gambl0re: has joined #RubyOnRails
[05:50:46] chouhoulis: has joined #RubyOnRails
[05:51:34] hendricius: has joined #RubyOnRails
[05:51:52] elben: has joined #RubyOnRails
[05:52:07] herbst: has joined #RubyOnRails
[05:53:02] dionysus69: has joined #RubyOnRails
[05:53:33] duderonomy: has joined #RubyOnRails
[05:53:58] DarkBushido: has joined #RubyOnRails
[05:53:58] DarkBushido: has joined #RubyOnRails
[05:54:16] epochwolf: has joined #RubyOnRails
[05:55:35] tego101: has joined #RubyOnRails
[05:56:02] jeanre: has joined #RubyOnRails
[05:56:27] konsolebox: has joined #RubyOnRails
[05:56:51] Isthar: has joined #RubyOnRails
[05:56:54] Veejay: has joined #RubyOnRails
[05:56:58] kies: has joined #RubyOnRails
[05:57:00] tim_s007: has joined #RubyOnRails
[05:57:02] srinidhi: has joined #RubyOnRails
[05:59:30] lyoshajapan: has joined #RubyOnRails
[06:04:10] nodejunkie: has joined #RubyOnRails
[06:04:10] blackmes1: has joined #RubyOnRails
[06:06:16] sleungcy: has joined #RubyOnRails
[06:11:41] User458764: has joined #RubyOnRails
[06:15:16] krz: has joined #RubyOnRails
[06:17:03] yoongkang: has joined #RubyOnRails
[06:19:41] skarn: has joined #RubyOnRails
[06:21:38] Limix: has joined #RubyOnRails
[06:22:02] juddey: has joined #RubyOnRails
[06:23:06] tpendragon: has joined #RubyOnRails
[06:23:11] herbst: has joined #RubyOnRails
[06:23:15] k13nox: has joined #RubyOnRails
[06:29:16] codezomb: has joined #RubyOnRails
[06:29:19] agit0: has joined #RubyOnRails
[06:32:04] lyoshajapan: does anyone know how to make bootstrap checkboxes bigger reliably? transform seem to make them blurry in chrome
[06:32:24] Ratler: has joined #RubyOnRails
[06:34:01] herbst: has joined #RubyOnRails
[06:36:06] PedramT: has joined #RubyOnRails
[06:36:26] djbkd: has joined #RubyOnRails
[06:40:43] jeanre: has joined #RubyOnRails
[06:44:45] nerium: has joined #RubyOnRails
[06:45:59] HenriettaSalt: has joined #RubyOnRails
[06:51:34] chouhoulis: has joined #RubyOnRails
[06:55:44] jgt: has joined #RubyOnRails
[06:56:57] htmldrum: has joined #RubyOnRails
[06:57:19] ur5us: has joined #RubyOnRails
[06:58:58] solars: has joined #RubyOnRails
[07:01:23] sleungcy: has joined #RubyOnRails
[07:02:40] herbst: has joined #RubyOnRails
[07:07:12] blackmes1: has joined #RubyOnRails
[07:11:01] jeanre: has joined #RubyOnRails
[07:13:32] jeanre: has joined #RubyOnRails
[07:16:38] mhoungbo: has joined #RubyOnRails
[07:22:33] chipotle: has joined #RubyOnRails
[07:22:34] pyemkey: has joined #RubyOnRails
[07:23:33] Palsson: has joined #RubyOnRails
[07:25:35] Anakat: has joined #RubyOnRails
[07:26:18] blackmes1: has joined #RubyOnRails
[07:28:06] tetraktys: has joined #RubyOnRails
[07:28:26] rvanlieshout: has joined #RubyOnRails
[07:29:12] kniarzyn: has joined #RubyOnRails
[07:32:07] Palsson_: has joined #RubyOnRails
[07:32:43] moeabdol1: has joined #RubyOnRails
[07:33:38] aganov: has joined #RubyOnRails
[07:33:56] scepticulous: has joined #RubyOnRails
[07:34:01] msyvich_: has joined #RubyOnRails
[07:36:13] Palsson: has joined #RubyOnRails
[07:36:55] baweaver: sanity check, why does factory girl say a relationship can't be blank when the data is clearly present?
[07:37:16] baweaver: Put a pry in there and it's defined.
[07:37:44] moeabdol2: has joined #RubyOnRails
[07:37:59] baweaver: create(:release_deployment_buildset, environment: environment) # Where environment is definitely defined.
[07:38:17] baweaver: ActiveRecord::RecordInvalid: Validation failed: Environment can't be blank
[07:40:34] rhizome: gist yo fact'ry
[07:40:39] dextertzu: has joined #RubyOnRails
[07:40:43] rvanlieshout: baweaver: use build and gist .errors.to_a too
[07:41:30] MaDErroR123: has joined #RubyOnRails
[07:42:41] juddey: has joined #RubyOnRails
[07:42:42] baweaver: build has no errors
[07:43:28] enkristoffer: has joined #RubyOnRails
[07:43:48] htmldrum: has joined #RubyOnRails
[07:44:01] kirillzh: has joined #RubyOnRails
[07:44:03] sevenseacat: gist all of the things!
[07:44:18] baweaver: https://gist.github.com/baweaver/e0517a4f9dbe879e3e74
[07:44:20] baweaver: gist a second
[07:44:38] pawnbox: has joined #RubyOnRails
[07:44:45] AimlessRAven: has joined #RubyOnRails
[07:45:35] AimlessRAven: good morning evryone, can somebody tell me why my nested resource controller rspec test give me this error
[07:45:35] AimlessRAven: https://gist.github.com/anonymous/081e3b284c611bf43b61
[07:45:39] baweaver: noted that testing large areas that need massive amounts of data setup sucks.
[07:46:06] enkristoffer: has joined #RubyOnRails
[07:46:23] rhizome: from your keyboard to the cabal's screens
[07:46:26] baweaver: AimlessRaven: you don't have a route to it.
[07:46:43] HenriettaSalt: has joined #RubyOnRails
[07:46:58] sevenseacat: ah hah, the error is coming from the callbacks in your factory
[07:47:07] baweaver: after(:create)
[07:47:10] baweaver: yeah, sorry
[07:47:20] baweaver: slightly slow right now, been fighting this for a while.
[07:47:39] sevenseacat: does your release_deployment require an environment?
[07:48:05] AimlessRAven: baweaver: ok, where i need to define my route..
[07:48:06] baweaver: it's a stupid name, it'd be better named as release_environment and release_environment_buildset.
[07:48:54] baweaver: routes.rb, look into nested routes in the guides: http://guides.rubyonrails.org/routing.html
[07:48:56] baweaver: section 2.7
[07:49:54] Guest48944: has left #RubyOnRails: ()
[07:50:01] baweaver: but if I want to keep the data mostly intact I can't change that name (yet)
[07:50:23] ruurd: has joined #RubyOnRails
[07:50:24] Macaveli: has joined #RubyOnRails
[07:50:43] baweaver: anyways, the RD factory is creating an environment and returns one successfully. I know it's there right before it tries to create the RDBS
[07:50:48] matthewd: baweaver: Which line is your error on?
[07:50:53] ruurd: Is there a channel op here?
[07:50:56] baweaver: 23 methinks
[07:51:09] baweaver: ruurd: depends who's asking.
[07:51:14] nerium: has joined #RubyOnRails
[07:51:37] baweaver: for what reason
[07:51:47] AimlessRAven: baweaver: i have nested resource in routes.rb
[07:51:49] matthewd: baweaver: But you're not setting environment: you're setting environment_id
[07:52:04] baweaver: ah, did I gist the changed version?
[07:52:07] baweaver: it was environment
[07:52:12] baweaver: just trying things at this point.
[07:52:15] ruurd: I'm using layerbnc as a bouncer and every time there is some network trouble I seem to be banned/quieted on this channel
[07:52:17] chouhoulis: has joined #RubyOnRails
[07:52:52] baweaver: Most of the time you can go to #ruby-banned and ask for an unmute
[07:53:11] sevenseacat: baweaver: this isnt #ruby
[07:53:16] baweaver: though it's fairly rare unless it's flickering a few times a minute and filling the screen with Join/part
[07:53:20] matthewd: ruurd: Is your bouncer just not authing with nickserv when it reconnects?
[07:53:29] ruurd: baweaver that's weird - this is the only channel that does this.
[07:53:36] baweaver: most of the rails ops are on there.
[07:53:57] lyoshajapan: has joined #RubyOnRails
[07:54:15] baweaver: well, if you can't talk it's rather hard to ask who's an op
[07:54:47] sevenseacat: ask chanserv directly?
[07:55:03] baweaver: that too, but not common knowledge
[07:55:13] sevenseacat: but using a bouncer is? <_<
[07:55:15] lewis: has joined #RubyOnRails
[07:55:29] baweaver: ACTION shrugs
[07:55:34] ruurd: to date my solution is leave this channel, regain my nick in chanserv then rejoin...
[07:55:58] kerunaru: has joined #RubyOnRails
[07:57:29] baweaver: starting to get annoyed at that FK constraint I have on that model.
[07:57:29] lyoshaja_: has joined #RubyOnRails
[07:57:59] raunicolae: has joined #RubyOnRails
[07:58:14] baweaver: meta one layer up - are FK constraints in Rails even worth it? They seem to be making more headaches than anything.
[07:58:45] baweaver: ruurd: not sure what to tell you honestly, other than tune the reconnect down a few pegs.
[07:59:13] raunicolae: has left #RubyOnRails: ()
[07:59:54] htmldrum: has joined #RubyOnRails
[08:02:29] agoldboi: has joined #RubyOnRails
[08:02:44] yoongkang: has joined #RubyOnRails
[08:02:52] sandstrom: has joined #RubyOnRails
[08:04:26] lxsameer: has joined #RubyOnRails
[08:04:55] arBmind: has joined #RubyOnRails
[08:05:10] baweaver: ACTION wanders back to cursing at factorygirl
[08:05:32] matthewd: baweaver: Something in your release_deployment_buildset factory interfering? Does it work if you call it directly?
[08:05:47] baweaver: poking it with a stick
[08:06:32] baweaver: added that file to the gist
[08:06:54] baweaver: going to try that, one sec.
[08:06:59] matthewd: I believe strongly in Actual FKs.. Rails-side validations seem less important for "fundamental" relationships -- things that a user can control yes, things that should be code-enforced invariants not so much
[08:08:45] baweaver: going to cheat and override environment= to see what it's getting there.
[08:09:02] zpe: has joined #RubyOnRails
[08:10:36] Palsson: has joined #RubyOnRails
[08:11:20] baweaver: see wtf.rb on the gist, just added.
[08:11:28] baweaver: it is in fact getting a valid environment
[08:14:15] arBmind: has joined #RubyOnRails
[08:14:17] baweaver: odd, attribute is returning nil for it. The model has a belongs_to :environment.
[08:15:30] baweaver: ACTION starts fumbling around the rails source
[08:15:55] darutoko: has joined #RubyOnRails
[08:16:16] baweaver: ....so if I use build and hit it with save after, it works
[08:16:30] matthewd: Backtrace of the exception?
[08:16:39] baweaver: which part?
[08:17:09] baweaver: ....yeah, that fixed it
[08:17:21] artto: has joined #RubyOnRails
[08:17:32] baweaver: ACTION scratches head in bewilderment
[08:18:59] AimlessRAven: anyone knows why my rspec test for nested resource controller give me this https://gist.github.com/anonymous/081e3b284c611bf43b61
[08:19:02] ruurd: baweaver does not explain why this is the only channel that does exhibit this behaviour :( :(
[08:19:48] DoubleMalt: has joined #RubyOnRails
[08:19:57] spyromus: has joined #RubyOnRails
[08:20:29] dragonkh: has joined #RubyOnRails
[08:21:30] spyromus: Hi everyone!
[08:22:10] matthewd: ruurd: Per the topic, this channel only allows you to speak if you're authenticated with nickserv
[08:22:50] sandstrom: has joined #RubyOnRails
[08:22:54] sevenseacat: I think that actually got relaxed at some point
[08:23:17] spyromus: I???ve just installed the recent Rails stable (4.2.5.1 I believe) and noticed that as I run a Rake task or tests suite I get logs tailed into console. Is that a new feature? Really annoying.
[08:23:36] moeabdol2: has joined #RubyOnRails
[08:23:57] czerasz: has joined #RubyOnRails
[08:24:29] spyromus: anyone else noticing it? Is there a way to return to the old model, when logs just sit where they belong?
[08:25:06] ur5us: has joined #RubyOnRails
[08:25:06] htmldrum: has joined #RubyOnRails
[08:25:09] spyromus: (I noticed several threads on SO where they suggest disabling logging. Not an option. I really need logs sometimes, just need to remove this tailing thing)
[08:25:38] AimlessRAven: anyone knows why my rspec test for nested resource controller give me this https://gist.github.com/anonymous/081e3b284c611bf43b61
[08:26:28] blackmes1: has joined #RubyOnRails
[08:26:39] matthewd: AimlessRaven: !rule11
[08:26:39] helpa: AimlessRaven: Do not repeat your question every 5 minutes expecting somebody to answer it. If you do not get a reply after the first time perhaps posting your question on StackOverflow (http://stackoverflow.com) would help you. Linking to the question in the channel after you've posted it is OK.
[08:27:20] sevenseacat: especially when its a question thats already been answered
[08:27:50] MaDErroR123: has joined #RubyOnRails
[08:28:05] PedramT: has joined #RubyOnRails
[08:28:23] baweaver: found the little devil finally. Another model wanted an environment
[08:29:02] baweaver: double checked the stacktrace and no hint of it. Going to be looking to patch that output message with the model name or something more useful than AssocName can't be blank
[08:31:03] baweaver: ACTION bangs head on desk repeatedly
[08:33:07] pawnbox: has joined #RubyOnRails
[08:33:13] matthewd: I'm very surprised the stacktrace didn't answer that :/
[08:33:40] baweaver: ACTION shrugs
[08:33:52] sleungcy: has joined #RubyOnRails
[08:33:59] baweaver: honestly I think there needs to be a lot of work done on making stacktraces relevant
[08:34:07] Bloodberet: has joined #RubyOnRails
[08:34:23] baweaver: you get 8 to 1 lines of cruft for every actually relevant one it seems
[08:35:55] nettoweb: has joined #RubyOnRails
[08:37:03] chipotle: has joined #RubyOnRails
[08:37:50] enkristoffer: has joined #RubyOnRails
[08:39:36] baweaver: it finally passed
[08:39:41] baweaver: so beautiful
[08:40:02] Palsson: has joined #RubyOnRails
[08:40:20] ruurd: baweaver go use spring for a while.
[08:40:43] baweaver: I'll put it right next to turbolinks
[08:42:11] htmldrum: has joined #RubyOnRails
[08:45:26] krz: Anyone use koala for Facebook before? How does one get the user profile photo?
[08:45:29] krz: I looked into https://github.com/morgoth/koala/commit/cc0508d9d5d752721415eecfa7208c51430b79f1 but cannot see how to use `get_user_picture_data` exactly
[08:45:52] enkristoffer: has joined #RubyOnRails
[08:46:28] MaDErroR123: has joined #RubyOnRails
[08:46:33] srinidhi: has joined #RubyOnRails
[08:47:29] HenriettaSalt: has joined #RubyOnRails
[08:49:21] kristoffer: has joined #RubyOnRails
[08:51:09] enkristoffer_: has joined #RubyOnRails
[08:51:35] enkristoffer_: has left #RubyOnRails: ()
[08:51:44] kitsuneyo: has joined #RubyOnRails
[08:52:03] jo_mo: has joined #RubyOnRails
[08:53:05] chouhoulis: has joined #RubyOnRails
[08:53:35] Palsson: has joined #RubyOnRails
[08:55:32] quazimodo: has joined #RubyOnRails
[08:57:28] krz: Ok figured
[08:58:04] elion_: has joined #RubyOnRails
[08:58:08] quazimodo: so I'm in a situation
[08:58:42] quazimodo: app on subdomain1 is making a request to app on subdomain2 to send and email, and during that request app on subdomain2 needs make a request to app on subdomain1
[08:58:45] quazimodo: thus deadlock
[08:59:20] ddv: quazimodo: I don't see why this would deadlock
[08:59:55] ddv: unless you let them waiting on each other
[08:59:55] quazimodo: ddv: each app has 1 thread in development mode
[09:00:00] enkristoffer_: has joined #RubyOnRails
[09:00:14] ddv: quazimodo: you can't use a multithreaded app server like passenger for example?
[09:00:22] quazimodo: ddv: i'm using puma in production
[09:00:34] ddv: why not in development?
[09:00:48] quazimodo: ddv i tried with min 8 threads each, but it still deadlocked
[09:01:02] quazimodo: ctrl-c'ing made it complain about mutexes
[09:01:19] quazimodo: so i'm thinking maybe rails in development mode configuration is messing it up?
[09:02:22] spyromus: btw, to anyone interested. (referring to the earlier question re logs dumping to console during rake tasks), I found that it???s Heroku???s ???rails_12factor??? acting funny. Moving it to production group in Gemfile resolve the nonsense
[09:03:29] yoongkang: has joined #RubyOnRails
[09:03:33] htmldrum: has joined #RubyOnRails
[09:03:42] moei: has joined #RubyOnRails
[09:04:22] moei: has joined #RubyOnRails
[09:04:25] quazimodo: ddv I actually have no idea how to resolve this
[09:04:39] mdw: has joined #RubyOnRails
[09:04:48] tvw: has joined #RubyOnRails
[09:07:08] gingray: has joined #RubyOnRails
[09:10:11] htmldrum: has joined #RubyOnRails
[09:10:30] jsrn_: has joined #RubyOnRails
[09:11:14] mark2: has joined #RubyOnRails
[09:15:12] msyvich: has joined #RubyOnRails
[09:20:05] futilegames: has joined #RubyOnRails
[09:20:22] PedramT: has joined #RubyOnRails
[09:21:36] rodfersou: has joined #RubyOnRails
[09:22:23] Ratler: has joined #RubyOnRails
[09:23:18] lyoshajapan: has joined #RubyOnRails
[09:23:59] chridal: Is there any way of using blocks with Rails methods? I mean right now I'm using nil guards such as here: https://gist.github.com/8a295b01890d1ced2180
[09:24:26] AimlessRAven: has joined #RubyOnRails
[09:24:35] yirvineox-x360: has joined #RubyOnRails
[09:25:15] AimlessRAven: has joined #RubyOnRails
[09:25:40] chridal: But what if we could do this: https://gist.github.com/8a295b01890d1ced2180
[09:26:23] tbuehlmann: I'd stick to using if
[09:26:30] chridal: I mean, it doesn't really look too awesome in that case since there's still a nil check
[09:26:38] User458764: has joined #RubyOnRails
[09:26:52] chridal: But in places you just have a single nil check it would be beautiful
[09:27:04] chridal: also it'd feel a lot more functional
[09:27:25] tbuehlmann: what's wrong with if?
[09:28:00] chridal: There's nothing *wrong* with if. It's just that I think it doesn't need to be there.
[09:28:13] chridal: It could be done by the function itself invoking the code instead
[09:28:21] chridal: I have so many nilguards all over my code.
[09:28:47] chridal: Also, it's not like I've spent a lot of time thinking this through. It might be a really bad idea. Just thought of it while writing code now.
[09:29:02] Ergo: has joined #RubyOnRails
[09:29:38] chridal: s/function/method
[09:30:11] tbuehlmann: if you want, you could write a wrapper, yielding the block only if the first argument is not nil (or something)
[09:30:28] tbuehlmann: but well, I think that just adds complexity and a reader have to look your wrapper up first
[09:31:02] yogeshrt: has joined #RubyOnRails
[09:31:10] msyvich: has joined #RubyOnRails
[09:31:14] lyoshajapan: has joined #RubyOnRails
[09:31:19] gbgdev: has joined #RubyOnRails
[09:31:38] chridal: tbuehlmann: https://gist.github.com/8a295b01890d1ced2180
[09:31:59] chridal: Yea, I don't think monkeypatching or something like that would be a good idea either. I meant if it was a part of Rails.
[09:32:18] sevenseacat: whats wrong with using a single conditional? dont overcomplicate things
[09:32:40] chridal: There's an error in the code, used `token` instead of `t` inside the block.
[09:32:57] chridal: I just had an idea that it might be a cool feature in Rails.
[09:32:58] sevenseacat: if token = Token.find_by(id: params[:token_id]); do_something(token); end
[09:33:04] sevenseacat: chridal: why?
[09:33:13] scepticulous: is there any "standard" way to setup rails (structured ) logging with elk ? Some loggin library/gem or so ?
[09:33:16] chridal: It has a more functioncal syntax
[09:33:31] pydave6367: has joined #RubyOnRails
[09:33:31] sevenseacat: errrr, no it doesnt
[09:33:44] marr: has joined #RubyOnRails
[09:33:46] chridal: It has that callback feel to it.
[09:34:34] chridal: Anyway. In my it's a lot shorter, it's very clear. I'd scan that much faster, and I think its more beautiful.
[09:34:46] chridal: In my mind *.. Typing is not good in the morning
[09:35:07] sevenseacat: you are quite welcome to your opinion.
[09:35:15] ddv: opinions are like....
[09:35:21] sevenseacat: ps. token will never be nil, in that second example.
[09:35:36] chridal: You're right since it'll raise
[09:36:05] chridal: Anyhow, I was more thinking about it as trying to make a contribution to Rails. I've never done anything like that before.
[09:36:24] chridal: I thought I'd hear if other people would be interested in using it.
[09:36:40] sevenseacat: suggest it on the mailing list first, before writing anything for it. i think it would be near impossible to do.
[09:36:45] sevenseacat: and i would not use it.
[09:36:59] chridal: Why wouldn't you use it by the way?
[09:37:08] chridal: Just curious
[09:37:16] sevenseacat: because its pointless, and much harder to read
[09:37:16] matthewd: Yeah.. -1 complicates the API for no gain
[09:37:37] AimlessRAven: how to create user using factory girl.. i wanna make it in nested factory
[09:37:49] chridal: Alright. Maybe not such a good idea then. I'll think about it. Thanks!
[09:38:26] baweaver: AimlessRaven: read the guide on factorygirl
[09:38:29] baweaver: it explains it.
[09:38:41] yoongkang: has joined #RubyOnRails
[09:38:50] baweaver: https://github.com/thoughtbot/factory_girl/blob/master/GETTING_STARTED.md
[09:38:50] matthewd: chridal: I think your "shorter" comes because you're using `unless x.nil?` instead of a simple `if x`
[09:39:10] baweaver: associations is the section you want
[09:39:37] chridal: matthewd: Maybe a bit of that, but mostly because I think it's a logical grouping to put the code in a block that belongs to that execution.
[09:39:49] chridal: I might have been reading too much functional Javascript lately though
[09:39:51] chridal: So I might be tainted.
[09:41:18] jahbrewski: has joined #RubyOnRails
[09:43:25] msyvich: has joined #RubyOnRails
[09:44:45] mooru: has joined #RubyOnRails
[09:45:28] chipotle: has joined #RubyOnRails
[09:48:13] HenriettaSalt: has joined #RubyOnRails
[09:48:44] elaptics`: has left #RubyOnRails: ()
[09:48:54] elaptics: has joined #RubyOnRails
[09:49:40] kitsuneyo: has joined #RubyOnRails
[09:50:32] yoongkang: has joined #RubyOnRails
[09:53:29] dpsk: has joined #RubyOnRails
[09:53:51] chouhoulis: has joined #RubyOnRails
[09:53:52] jgt: has joined #RubyOnRails
[09:54:01] chridal: In a production environment do you hardcode all your gem versions?
[09:55:21] dpsk: has joined #RubyOnRails
[09:55:57] blackmes1: has joined #RubyOnRails
[09:56:17] msyvich: has joined #RubyOnRails
[09:57:48] matthewd: chridal: "hardcode" = "use bundler as it's designed"?
[09:58:22] chridal: matthewd: Yea, I mean do you write the gems version until minor or do you allow minor upgrades but not major etc.
[09:59:20] jxs_: has joined #RubyOnRails
[10:00:08] matthewd: chridal: That's what the lock file is for
[10:00:42] chridal: The question is; how big of a version upgrade to a gem do you allow in production?
[10:02:06] chridal: Like for instance, now I've got '~> 2.1' and the alikes for all my gems (changing the actual numbers of course)
[10:02:53] Cervajz: has joined #RubyOnRails
[10:03:06] chridal: Doing rolly deploys with continuous integration with Centurion across a cluster so I just don't want my gems to break it.
[10:03:30] matthewd: chridal: That's what the lock file is for
[10:03:54] chridal: Can you please elaborate what you are saying?
[10:04:14] ElFerna_: has joined #RubyOnRails
[10:04:36] matthewd: chridal: The bundler lock file solves that problem... it doesn't contain '~> 2.1'
[10:04:59] dionysus69: is trend going towards client side frameworks like ember? meaning client side rails stuff will be used by less and less people over time? any statistical data anyone is aware of?
[10:05:07] Cervajz_: has joined #RubyOnRails
[10:05:10] chridal: matthewd: Aha! So when deployed on a host it will always use the Gemfile.lock and never do an update?
[10:05:26] chridal: dionysus69: I think Ember and Rails go together hand in hand. You're gonna need a backend.
[10:05:45] matthewd: chridal: Correct
[10:05:46] User458764: has joined #RubyOnRails
[10:05:55] chridal: dionysus69: Also DHH talked a lot about that when he was on the Changelog podcast I believe. Also he wrote a post on it in his blog too if I recall correctly.
[10:05:59] dionysus69: chridal: oh yes, but I meant about the frontent "section" of rails like erb and asset management etc etc
[10:06:46] chridal: dionysus69: Well, I'm not an expert but seeing as Rails is seeming to take rails-api more seriously that might be an indicator or some sort of shift going on
[10:07:19] chridal: Not everyone needs a single page app though, so there will still be a lot of use for the Rails way I believe.
[10:07:26] AimlessRAven: hi all https://gist.github.com/anonymous/e66adec605c95837c9c8 this is my factory, i have 2 model User and Address, address belongs_to user, user has many addresses
[10:07:35] AimlessRAven: how to create user in my address factory
[10:09:44] dionysus69: chridal: ye I guess there always be some applications that don't mind page reload, but when i see that one of the top features of rails 5 is rails API mode, makes me think if there's a conspiracy with ember community haha
[10:09:48] sandstrom: When running OS X + Vagrant (Ubuntu) + Rails 4.2 changes often don't sync properly. Reloading the rails server seems to work (but could also be a time-delay)
[10:10:00] sandstrom: Anyone who've had a similar issue?
[10:10:37] chridal: dionysus69: Well, it could also be an indicator of the other stuff being mature?
[10:11:16] Pazician: has joined #RubyOnRails
[10:11:16] Pazician: has joined #RubyOnRails
[10:12:13] dionysus69: that also makes sense, I was reading stuff about serializer gem vs included jbuilder. what do you use for example as a json "bridge"?
[10:13:50] srinidhi: has joined #RubyOnRails
[10:14:42] chridal: dionysus69: What do you mean by bridge?
[10:15:25] dionysus69: a json generator, instead of erb
[10:15:37] chridal: Tbh though I use ActiveModel::Serializer for all my APIs
[10:15:43] gbgdev: has joined #RubyOnRails
[10:16:32] dionysus69: yep, thats what I have heard mostly, but that makes me think, why is jbuilder the stock rails option then if it's "worse"?
[10:16:49] htmldrum: has joined #RubyOnRails
[10:17:01] chridal: dionysus69: I know for instance there is some blog post where JBuilder is called out as being way slower than AMS.
[10:17:10] chridal: Personally though I haven't really used JBuilder so I wouldn't know.
[10:17:28] sonOfRa: has joined #RubyOnRails
[10:17:33] dionysus69: I even checked out benchmarks, and in real life scenraios AMS wins by allot
[10:18:09] nocontrol: has joined #RubyOnRails
[10:18:16] dionysus69: I havent used either but jbuilder is stupid easy, it comes with scaffolding and it works in one line
[10:18:23] chridal: dionysus69: http://kirillplatonov.com/2014/11/04/active_model_serializer_vs_jbuilder/
[10:18:33] chridal: There's some benchmarks there.
[10:18:39] dionysus69: so I guess AMS have to be wayyy better if people are going through manual setup trouble
[10:18:52] chridal: dionysus69: What do you mean manual setup trouble?
[10:18:55] chridal: AMS is very easy to use.
[10:19:22] dionysus69: yes but in any case whatever comes with rails should be simpler than setting up a gem
[10:19:28] __zok__: has joined #RubyOnRails
[10:19:31] workmad3: has joined #RubyOnRails
[10:20:05] dionysus69: i ll look into AMS at some point anyways, I read it's also more friendly with ember data adapter
[10:20:18] mickey_mouse: has joined #RubyOnRails
[10:20:22] Cohedrin: has joined #RubyOnRails
[10:20:45] chridal: There's a new version that's a RC now. So if you wait you can probably just learn the new stuff instead of getting into both 0.9 and 0.10 I hear there are some changes coming.
[10:24:53] dionysus69: ye I ll wait I guess, still sturggling on ember itself, binding rails with it will be a new adventure x)
[10:25:23] jxs_: has joined #RubyOnRails
[10:26:55] jxs_: has joined #RubyOnRails
[10:29:50] ldnunes: has joined #RubyOnRails
[10:29:50] nettoweb: has joined #RubyOnRails
[10:32:11] nettoweb: Guys, is there a way to get the first tuesday of last month? So far I did this. Date.today.beginning_of_month.next_week(day = :tuesday)
[10:32:25] nettoweb: but the next_week skip one week
[10:34:17] ArTiSTiX_: has joined #RubyOnRails
[10:34:53] matthewd: nettoweb: end_of_week(:wednesday) ?
[10:35:21] sleungcy: has joined #RubyOnRails
[10:35:34] nettoweb: matthewd returned 01 feb
[10:36:31] nettoweb: the correct would be 02 feb, that's the first tuesday of this month
[10:37:20] matthewd: Date.today.beginning_of_month.end_of_week(:wednesday) # => Tue, 02 Feb 2016
[10:37:40] jottr: has joined #RubyOnRails
[10:40:09] AimlessRAven: anyone knows is it the way to create user in my address factory, https://gist.github.com/anonymous/2463a0a79307163e4955
[10:40:16] AimlessRAven: address is has_many association with user
[10:41:00] worknick: has joined #RubyOnRails
[10:41:15] PedramT: has joined #RubyOnRails
[10:41:46] worknick: i am first doing @p = PetActivity.find(params[:id]) then PetActivity.increment_counter(:totalrating, params[:pet_activity_id]) will this increment be reflected in my current "@p"? or i need to take a new @pnew = Model for that??
[10:42:04] nettoweb: matthewd it will alwasy return the first tuesday of current month?
[10:44:14] matthewd: nettoweb: That seems easy to check
[10:44:27] matthewd: nettoweb: t = Date.today; 20.times { p t.beginning_of_month.end_of_week(:wednesday); t = t.next_month }
[10:45:25] nettoweb: thanks matthewd
[10:45:35] marr: has joined #RubyOnRails
[10:46:39] matthewd: You're welcome
[10:47:26] Ropeney: has joined #RubyOnRails
[10:48:10] MaDErroR123: has joined #RubyOnRails
[10:48:45] matthewd: I do agree it's surprising there doesn't seem to be a less obtuse way of getting there
[10:49:01] HenriettaSalt: has joined #RubyOnRails
[10:51:36] worknick: is using @p.reload optimal?
[10:54:31] User458764: has joined #RubyOnRails
[10:54:31] chouhoulis: has joined #RubyOnRails
[10:56:57] silverdust: After wiping a database of all records. How can I get primary keys for new entries to start from 1
[10:57:12] solars: hi, I noticed that if I change a models value, in an after_save hook this change is reflected in .changed - I thought after saving it it should be in previous_changed? what's the difference?
[10:57:20] AimlessRAven: anyone knows is it the way to create user in my address factory, https://gist.github.com/anonymous/2463a0a79307163e4955
[10:57:52] matthewd: solars: If you change it in after_save, that happens.. after it's saved
[10:58:14] solars: matthewd, no, I only check .changed and .previous_changes in after_save
[10:58:22] solars: I'm not changing anything there
[10:58:33] matthewd: AimlessRaven: Stop.
[10:59:45] matthewd: solars: Oh! That does sound more surprising.
[11:00:07] workmad3: silverdust: depends on database... also, if you're dependent on that, you're mis-using autogenerated IDs
[11:00:21] gbgdev: has joined #RubyOnRails
[11:01:28] workmad3: solars: changes only get moved to `previous_changes` once there's no chance the values can be rolled back (so only once the transaction is committed)
[11:02:04] solars: workmad3, but in this case the descriptions are quite misleading: changed Returns an array with the name of the attributes with unsaved changes.
[11:02:10] solars: workmad3, although they have been saved
[11:02:32] solars: or did I get that wrong
[11:03:08] workmad3: solars: `after_save` happens after the appropriate `INSERT` or `UPDATE` has been sent, but before the `COMMIT`, so it's dubious to claim the values are 'saved' at that point
[11:03:08] solars: workmad3, same for previous_changes Returns a hash of attributes that were changed before the model was saved.
[11:03:12] silverdust: workmad3: how so? how should they not be used
[11:03:24] solars: workmad3, ahh sorry, you're right
[11:03:39] solars: workmad3, after_commit should change the behaviour to my expectations
[11:03:45] workmad3: solars: I agree the names are somewhat misleading :)
[11:03:48] solars: workmad3, still, the wording is wrong in my opinion
[11:04:01] solars: save should actually be commit in the docs
[11:04:25] arup_r: has joined #RubyOnRails
[11:04:50] FooMunki: has joined #RubyOnRails
[11:05:56] workmad3: silverdust: databases make no guarantees on ordering or sequence when dealing with autogenerated ids, and their use-case is for arbitrary, meaningless id fields (some databases may guarantee monotonic ids, but not guarantee a contiguous sequence)... requiring your ids to start from 1 is a major fubar when dealing with autogenerated ids
[11:06:13] workmad3: (well, minor fubar... but still, not something that you should rely on ;) )
[11:07:38] matthewd: silverdust: If you just want an easy fix on an empty database: drop & recreate it
[11:07:38] tvw: has joined #RubyOnRails
[11:09:42] zacts: has joined #RubyOnRails
[11:10:36] braincrash: has joined #RubyOnRails
[11:11:43] User458764: has joined #RubyOnRails
[11:12:51] PedramT: has joined #RubyOnRails
[11:13:43] msyvich: has joined #RubyOnRails
[11:13:50] silverdust: not like I'm really relying on it. I just thought it'd make sense for me to see item listings from 1 since I'm looking through new records
[11:14:23] silverdust: It doesn't matter to the appplication front-end in any way
[11:14:41] k13nox: has joined #RubyOnRails
[11:23:38] namxam: has joined #RubyOnRails
[11:30:01] PedramT: has joined #RubyOnRails
[11:32:52] chipotle: has joined #RubyOnRails
[11:35:16] tf_: has joined #RubyOnRails
[11:36:00] PedramT: has joined #RubyOnRails
[11:36:32] Guest96203: has left #RubyOnRails: ()
[11:39:25] darkxploit: has joined #RubyOnRails
[11:39:59] Macaveli: has joined #RubyOnRails
[11:42:31] Macaveli: has joined #RubyOnRails
[11:42:58] meves: has joined #RubyOnRails
[11:46:38] shinnya: has joined #RubyOnRails
[11:48:02] msyvich: has joined #RubyOnRails
[11:49:11] jsrn_: has joined #RubyOnRails
[11:49:20] nobitanobi: has joined #RubyOnRails
[11:49:43] HenriettaSalt: has joined #RubyOnRails
[11:50:33] moeabdol3: has joined #RubyOnRails
[11:50:46] lipoqil: has joined #RubyOnRails
[11:53:32] nobitanobi: How can I submit multiple checkbox which each of them I want to submit two values. Right now I have this: https://gist.github.com/novito/bf07ab02984b33c609d9 and I basically do an eval for each form[:house][:departments]
[11:53:42] nobitanobi: What's the proper way to submit two values for one checkbox?
[11:55:20] chouhoulis: has joined #RubyOnRails
[11:55:38] tetraktys: has joined #RubyOnRails
[11:57:27] moeabdol4: has joined #RubyOnRails
[11:57:38] worknick: has joined #RubyOnRails
[11:58:07] worknick: how do i know if many rows belonging to a single pet only one has a specific column value = nonzero?
[11:58:16] worknick: out of many rows**
[12:01:47] arup_r: worknick: what is the model assoication actuallu... and ask it straight. You questions seems sooo complex .. :p
[12:02:40] arup_r: nobitanobi: read this http://apidock.com/rails/v4.0.2/ActionView/Helpers/FormOptionsHelper/collection_check_boxes
[12:03:58] robbyoconnor: has joined #RubyOnRails
[12:04:03] ElFerna_: has joined #RubyOnRails
[12:05:00] dionysus69: has joined #RubyOnRails
[12:05:15] PedramT: has joined #RubyOnRails
[12:06:13] nobitanobi: arup_r I have that, but for each checkbox I need two values
[12:07:07] arup_r: nobitanobi: you need then dropdown. not checkbox.. A checkbox can't have 2 values. it is either ON or OFF
[12:08:05] arup_r: instead of thinking a checkbox having 2 values, why not making 2 different checkbox and group them or something like that
[12:09:10] sandstrom: has joined #RubyOnRails
[12:11:57] MaDErroR123: has joined #RubyOnRails
[12:12:44] DirtyFInn: has joined #RubyOnRails
[12:13:42] c355E3B: has joined #RubyOnRails
[12:13:58] Ergo^: has joined #RubyOnRails
[12:14:50] arBmind: has joined #RubyOnRails
[12:15:29] zpe_: has joined #RubyOnRails
[12:17:13] arBmind: has joined #RubyOnRails
[12:17:48] Meow-J: has joined #RubyOnRails
[12:19:31] timmyBsd_: has joined #RubyOnRails
[12:20:11] timmyBsd_: has left #RubyOnRails: ()
[12:20:56] timmyBsd: has joined #RubyOnRails
[12:21:39] timmyBsd: has left #RubyOnRails: ("WeeChat 1.3")
[12:21:52] timmyBsd: has joined #RubyOnRails
[12:21:54] smoitra: has joined #RubyOnRails
[12:23:41] timmyBsd: Hey does anybody know how could i use actioncable with faye-websocket-ruby. I was able to connect to the server, i get the expected 101 http code, but how could i subscribe to channels.
[12:25:02] msyvich: has joined #RubyOnRails
[12:25:08] matthewd: timmyBsd: https://github.com/rails/rails/blob/master/actioncable/test/client_test.rb#L157-L162
[12:25:37] codedmart: has joined #RubyOnRails
[12:25:51] Ripins_: has joined #RubyOnRails
[12:25:53] arup_r: nobitanobi: one mistake, for each checkbox if you want to values, that means you need radio button. By mistake I said dropdown. sorry for that.
[12:26:28] Ripins: has joined #RubyOnRails
[12:26:41] msyvich: has joined #RubyOnRails
[12:28:44] blackmes1: has joined #RubyOnRails
[12:28:48] qejk: has joined #RubyOnRails
[12:30:07] kitsuneyo: has joined #RubyOnRails
[12:30:37] fsteim: has joined #RubyOnRails
[12:31:52] zpe: has joined #RubyOnRails
[12:31:54] stannard: has joined #RubyOnRails
[12:32:17] AimlessRAven: has joined #RubyOnRails
[12:32:38] AimlessRAven: someone knows why this rspec expect https://gist.github.com/anonymous/a1a8f2431bd9712c603b return me this error in gist
[12:32:51] AimlessRAven: address is a nested resourc of user
[12:33:04] Pazician: has joined #RubyOnRails
[12:33:48] msyvich: has joined #RubyOnRails
[12:33:49] workmad3: AimlessRaven: because you haven't provided a user_id to account for it being a nested resource
[12:34:16] Ripins: has joined #RubyOnRails
[12:34:39] ElFerna: has joined #RubyOnRails
[12:34:51] dexter_e: has joined #RubyOnRails
[12:35:03] arup_r: oh, I thought the action is authenticated, so before hit the action no authentication didn't happen.
[12:35:31] AimlessRAven: workmad3: where i need to declare user_id
[12:35:43] joy4u: has joined #RubyOnRails
[12:35:47] joy4u: has left #RubyOnRails: ()
[12:35:54] workmad3: AimlessRaven: the same way you're providing the id (but you'll want to pass a user instead)
[12:38:29] sevenseacat: has joined #RubyOnRails
[12:38:42] sleungcy: has joined #RubyOnRails
[12:40:47] arup_r: can't I create a constant in the application.rb and use it all over the app https://gist.github.com/aruprakshit/c98f6fa5078b434e8292
[12:40:56] FooMunki: has joined #RubyOnRails
[12:43:38] AimlessRAven: workmad3: didnt work.. the question is actuali, why cant get my routes
[12:44:09] arup_r: putting this into config/initializers/my_constants.rb also didn't make it available globally. I don't want to use EVN though
[12:44:45] pawnbox: has joined #RubyOnRails
[12:44:47] sevenseacat: arup_r: you're defining a constant in that class
[12:44:51] sevenseacat: not a global constant
[12:46:11] arup_r: hm. Then I need to use all the places like Rails.application.secrets.mfa_encryption_key .. which I was trying to avoid..
[12:46:47] arup_r: I thought I will assign it one var, and then use it globally..
[12:48:31] arup_r: only possible way is http://stackoverflow.com/a/34053451/2767755 .. but that is also too huge :p
[12:49:22] matthewd: arup_r: There are ways to do what you want... but I'd first ask why you have enough references in your application that it matters
[12:49:51] matthewd: Do you have some behaviour that should be wrapped in a class or method?
[12:50:28] HenriettaSalt: has joined #RubyOnRails
[12:50:44] arup_r: matthewd: no this is a key, which has to be passed to the User model for now. I kept the value in secrets.yml and then I need to extract and use the value.
[12:51:09] arup_r: like https://github.com/tinfoil/devise-two-factor#getting-started
[12:51:55] arup_r: for now, it has to be mentioned in the single place though.. but adding there Rails.application.secrets.mfa_encryption_key looks oddy.
[12:52:26] arup_r: there using**
[12:52:28] matthewd: I'd recommend you do that. Using a constant just means someone has to go find where its value comes from.
[12:52:44] arup_r: matthewd: hmm. agree. thanks
[12:52:53] matthewd: But you can do what you're trying to, using ::Foo = ...
[12:53:48] arup_r: hmm.. constant scope resolution.. good thing.. forgot it completely ..
[12:53:57] arup_r: Ripins_: hello
[12:54:42] mdw: has joined #RubyOnRails
[12:55:01] arup_r: matthewd: I used earlier environment vars.. but devops teams asked me not to use environment vars, rather put then in secrets file.. because they didn't use any env in the server set up.. so now changing little configuration..
[12:56:02] chouhoulis: has joined #RubyOnRails
[12:58:20] `aspiRe: has joined #RubyOnRails
[12:58:42] PedramT: has joined #RubyOnRails
[12:59:55] pawnbox: has joined #RubyOnRails
[13:00:36] k13nox: has joined #RubyOnRails
[13:01:55] darkxploit: has joined #RubyOnRails
[13:02:34] MaDErroR_: has joined #RubyOnRails
[13:02:45] nertzy: has joined #RubyOnRails
[13:02:46] Jasaka: has joined #RubyOnRails
[13:06:24] nettoweb: guys, is there any problems in saving the sessions o database? I did it 4 days ago and got 3k new lines on db. Is it ok with performance?
[13:07:02] k13nox: has joined #RubyOnRails
[13:10:18] Jasaka: has joined #RubyOnRails
[13:12:43] namxam: has joined #RubyOnRails
[13:18:15] michael_mbp: has joined #RubyOnRails
[13:22:09] MaDErroR123: has joined #RubyOnRails
[13:22:19] User458764: has joined #RubyOnRails
[13:22:51] zpe_: has joined #RubyOnRails
[13:23:29] namxam: has joined #RubyOnRails
[13:23:49] rvanlieshout: nettoweb: it's ok, but you might want to expire them at some point in time
[13:24:47] ewnd9: has joined #RubyOnRails
[13:25:44] rrawlins: has joined #RubyOnRails
[13:25:55] nettoweb: rvanlieshout is there any good number or it depends totally of the website?
[13:27:13] rvanlieshout: it depends on what your db can handle
[13:27:15] dpsk1: has joined #RubyOnRails
[13:28:40] Craigimus: has joined #RubyOnRails
[13:28:59] w0rd-driven: has joined #RubyOnRails
[13:30:23] Macaveli: has joined #RubyOnRails
[13:34:18] nickjj: nettoweb, you could always use redis instead of your db too
[13:34:42] bbrowning: has joined #RubyOnRails
[13:37:06] rvanlieshout: it also has built in support for TTL
[13:39:46] Bloomer: has joined #RubyOnRails
[13:40:02] sleungcy: has joined #RubyOnRails
[13:41:03] Sylario: has joined #RubyOnRails
[13:42:35] atmosx: has joined #RubyOnRails
[13:42:55] namxam: has joined #RubyOnRails
[13:43:09] stannard: has joined #RubyOnRails
[13:44:17] worknick: in this example, http://stackoverflow.com/questions/16171705/load-more-button-with-ajax-kaminari how does jq knows "when" to execute the append code?
[13:47:02] smoitra_: has joined #RubyOnRails
[13:47:08] Macaveli: has joined #RubyOnRails
[13:47:18] Rodya_: has joined #RubyOnRails
[13:50:45] mary5030: has joined #RubyOnRails
[13:51:07] _Tariq: has joined #RubyOnRails
[13:51:13] HenriettaSalt: has joined #RubyOnRails
[13:51:31] rrawlins: Looking to drop Doorkeeper into an application to secure the API. What's the best way to provide a general-purpose API Key to a user which they can use with Curl etc without having to register themselves as an application and go through the full token acquisition flow? Or is that just bad practice and something I should avoid?
[13:53:35] mary5030: has joined #RubyOnRails
[13:54:09] atomical: has joined #RubyOnRails
[13:54:47] AimlessRAven: how to associate user with address in this rspec describe https://gist.github.com/anonymous/52d5b184098b1e58f688
[13:56:21] oded: has joined #RubyOnRails
[13:56:31] yoongkang: has joined #RubyOnRails
[13:56:49] chouhoulis: has joined #RubyOnRails
[14:00:19] puria: has joined #RubyOnRails
[14:00:48] arup_r: worknick: when you make Ajax call, that JS is getting rendered as a response. and then once completion it is getting executed..
[14:01:16] arup_r: make an Ajax call and check in your browser network tool to inspect the response and how it is going there..
[14:01:51] arup_r: AimlessRaven: User has_many addresses ?
[14:01:54] arup_r: or has_one
[14:02:44] waka: has joined #RubyOnRails
[14:04:26] rvanlieshout: AimlessRaven: use a factory that does that
[14:04:30] rvanlieshout: create a user with an address
[14:05:54] nettoweb: guys, I have a simple website (with crud) and I'm moving from Heroku to DO, and as it receive less than 50 user per day, I think I choose the cheapest Droplet from DO, I'd like to know if you all there optionios about Webserver and App server, Im think I'll go with Nginx+Unicorn but I'd like to listen some opinios.
[14:06:24] nettoweb: it's a very lightweigth website..
[14:06:30] nettoweb: just crud things on there
[14:06:58] joshkovach: has joined #RubyOnRails
[14:07:37] Bloodberet: has joined #RubyOnRails
[14:10:33] msyvich: has joined #RubyOnRails
[14:12:02] renews: has joined #RubyOnRails
[14:14:36] dpsk: has joined #RubyOnRails
[14:18:05] workmad3: nettoweb: nginx + unicorn should be fine... you could also consider nginx + puma if you wanted
[14:18:22] workmad3: nettoweb: I'd also recommend setting up SSL certs (possibly using letsencrypt)
[14:18:31] msyvich_: has joined #RubyOnRails
[14:18:40] tetraktys: has joined #RubyOnRails
[14:19:27] s2013: has joined #RubyOnRails
[14:20:26] nickjj: nettoweb, if you're interested i have an online course out that goes over deploying a rails app to DO using docker (nginx, ssl certs, automated builds, everything you need to know, etc.)
[14:20:29] nettoweb: workmad3 so Unicorn/Puma hould be ok? And Ror suggest use passeger, right? I've read some times comparing these 3 but can't get much of the differences. So, there a big difference between these 3? As I told is a simple app, dont use much menory/disk io
[14:20:37] crystal77: has joined #RubyOnRails
[14:22:24] Cervajz: has joined #RubyOnRails
[14:24:33] MaDErroR123: has joined #RubyOnRails
[14:26:30] sankaber: has joined #RubyOnRails
[14:28:00] ziyadb: has joined #RubyOnRails
[14:28:13] namxam: has joined #RubyOnRails
[14:28:14] andrew9184: has joined #RubyOnRails
[14:28:28] mcr-credil: has joined #RubyOnRails
[14:29:24] adre: has joined #RubyOnRails
[14:29:35] mrchris: has joined #RubyOnRails
[14:29:43] Toledo|gone: has joined #RubyOnRails
[14:30:17] _Tariq: has joined #RubyOnRails
[14:32:16] ramortegui: has joined #RubyOnRails
[14:34:17] worknick: is there anything wrong with my link_to? <%= link_to image_tag("load_more.png", :width=>"50px"), link_to_next_page(@show_pet_activity) %>
[14:35:37] ryanRT: has joined #RubyOnRails
[14:40:37] sleungcy: has joined #RubyOnRails
[14:42:05] akshat: has joined #RubyOnRails
[14:42:35] matthewd: worknick: Clearly there is, or you wouldn't be asking about it. If you describe your actual problem, you have a much better chance that someone can help.
[14:43:03] neshmi: has joined #RubyOnRails
[14:43:39] msyvich_: has joined #RubyOnRails
[14:43:49] baweaver: has joined #RubyOnRails
[14:44:36] seneca: has joined #RubyOnRails
[14:44:45] worknick: wrong number of arguments 1 or 2..3
[14:45:23] worknick: i am trying to implement this http://stackoverflow.com/questions/16171705/load-more-button-with-ajax-kaminari and it fetches next page do not execute index.js.erb
[14:45:43] worknick: and hence cant append.
[14:46:23] k13nox: Hi, in rails 5 with ActionCable, the best practice is to create Channel like Controller or less Channel is better ?
[14:47:06] agit0: has joined #RubyOnRails
[14:47:12] rvanlieshout: you should create channels for channels that you need
[14:47:30] mooru: has joined #RubyOnRails
[14:47:41] treehug88: has joined #RubyOnRails
[14:47:46] Bloodberet: has joined #RubyOnRails
[14:48:12] adre: has joined #RubyOnRails
[14:48:37] w0rd-driven: has joined #RubyOnRails
[14:48:52] k13nox: rvanlieshout: create 20 channels go not slow down the application with too many subscriptions ?
[14:49:05] rvanlieshout: do you have 20 live feeds on that page?
[14:49:52] k13nox: rvanlieshout: 10 live feeds yes
[14:50:06] mordof_work: has joined #RubyOnRails
[14:50:16] rvanlieshout: is it some kind of dashboard?
[14:50:23] rvanlieshout: i would personally group that in 1 channel
[14:51:12] k13nox: User interface, Chat, Question, Notification, Polls, User status ...
[14:51:15] HenriettaSalt: has joined #RubyOnRails
[14:51:44] rvanlieshout: why would question be a live feed?
[14:51:45] rvanlieshout: or user status
[14:52:17] snowy: has joined #RubyOnRails
[14:52:42] sankaber: has joined #RubyOnRails
[14:52:54] k13nox: For user status : you see who is online For question you can up vote and answers in realtime
[14:53:29] k13nox: So is better to group in 1 or 2 channels ?
[14:53:48] k13nox: or create 10 or more channels ?
[14:54:05] rvanlieshout: any solution is fine
[14:54:14] rvanlieshout: there are pro's and con's for both
[14:54:58] k13nox: For performance is better to group ? and for clean code is better to split ?
[14:56:04] rvanlieshout: nothing sane to say about that with only that information
[14:56:32] meves: has joined #RubyOnRails
[14:57:30] MaDErroR123: has joined #RubyOnRails
[14:57:34] chouhoulis: has joined #RubyOnRails
[14:58:08] mikecmpbll: has joined #RubyOnRails
[14:58:54] IrishGringo: has joined #RubyOnRails
[15:00:30] B1n4r10: has joined #RubyOnRails
[15:03:02] dpsk: has joined #RubyOnRails
[15:03:07] polishdub: has joined #RubyOnRails
[15:03:22] User458764: has joined #RubyOnRails
[15:03:26] griffindy: has joined #RubyOnRails
[15:04:31] msyvich_: has joined #RubyOnRails
[15:05:03] Dreamer3: has joined #RubyOnRails
[15:05:24] stannard: has joined #RubyOnRails
[15:06:27] smathy: has joined #RubyOnRails
[15:06:29] _Tariq: has joined #RubyOnRails
[15:07:10] snowy: has joined #RubyOnRails
[15:09:39] s2013: has joined #RubyOnRails
[15:09:46] stannard: has joined #RubyOnRails
[15:11:44] Ripins: has joined #RubyOnRails
[15:11:55] Frem: has joined #RubyOnRails
[15:12:19] tubbo: refinements are pretty neat
[15:15:10] PedramT: has joined #RubyOnRails
[15:15:37] Fizz: has joined #RubyOnRails
[15:16:15] stannard: has joined #RubyOnRails
[15:16:20] chipotle: has joined #RubyOnRails
[15:18:55] _Tariq: has joined #RubyOnRails
[15:19:11] dopamean_: has joined #RubyOnRails
[15:21:24] namxam: has joined #RubyOnRails
[15:23:23] Tinyyy: has joined #RubyOnRails
[15:25:40] MaDErroR123: has joined #RubyOnRails
[15:26:32] enitiz: has joined #RubyOnRails
[15:26:42] aegis3121: has joined #RubyOnRails
[15:26:42] MaDErroR123: has joined #RubyOnRails
[15:30:13] diegoviola: has joined #RubyOnRails
[15:31:58] lsone_: has left #RubyOnRails: ()
[15:32:38] lacrymology: has joined #RubyOnRails
[15:34:13] adavia: has joined #RubyOnRails
[15:35:29] kies^: has joined #RubyOnRails
[15:38:14] IrishGringo: has joined #RubyOnRails
[15:38:16] lipoqil: has joined #RubyOnRails
[15:38:22] legohead: has joined #RubyOnRails
[15:39:16] nodejunkie: has joined #RubyOnRails
[15:40:20] gbgdev: has joined #RubyOnRails
[15:41:05] legohead: has left #RubyOnRails: ()
[15:41:23] sleungcy: has joined #RubyOnRails
[15:44:26] aegis3121: has joined #RubyOnRails
[15:44:48] msyvich_: has joined #RubyOnRails
[15:44:50] Fizz: Any tips for a Rails beginner? Where do I start?
[15:46:06] ddv: Fizz: Do you know Ruby?
[15:46:23] ddv: Fizz: JS, HTML, CSS etc?
[15:47:15] ddv: Fizz: I can recommend: https://www.manning.com/books/rails-4-in-action
[15:47:31] drale2k: Fizz: this is really good also https://www.railstutorial.org
[15:47:45] drale2k: has book and a screencast series
[15:48:00] drale2k: hm, kinda sad i can't think of a good free source
[15:48:09] matthewd: !gettingstarted should be a reasonable place to get started, but one of the above is likely more comprehensive
[15:48:09] helpa: http://guides.rubyonrails.org/getting_started.html - Getting started with Ruby on Rails guide written by Mike Gunderloy and Ryan Bigg
[15:48:13] ddv: Rails guides are also very vailable
[15:48:17] ddv: valuable
[15:48:22] matthewd: railstutorial.org is free
[15:48:37] mary5030: has joined #RubyOnRails
[15:48:42] mooru: has joined #RubyOnRails
[15:48:55] eyesnot: has joined #RubyOnRails
[15:49:04] drale2k: matthewd: https://www.railstutorial.org there is only "Free previews"
[15:49:22] matthewd: On the left, below the image
[15:49:27] blackmes1: has joined #RubyOnRails
[15:49:45] drale2k: Fizz: here you go https://www.railstutorial.org/book
[15:49:45] NBarnes: has joined #RubyOnRails
[15:50:14] mary5030: has joined #RubyOnRails
[15:50:44] someish: has joined #RubyOnRails
[15:54:36] legohead: has joined #RubyOnRails
[15:54:46] krz: has joined #RubyOnRails
[15:55:33] MaDErroR123: has joined #RubyOnRails
[15:56:11] pwnd_nsfw: angular is really annoying
[15:57:22] n1lo: has joined #RubyOnRails
[15:57:58] nettoweb: has joined #RubyOnRails
[15:58:10] hive-mind: has joined #RubyOnRails
[15:58:18] chouhoulis: has joined #RubyOnRails
[15:58:31] ElFerna: has joined #RubyOnRails
[15:59:26] a1fa: has joined #RubyOnRails
[15:59:49] _Tariq: has joined #RubyOnRails
[16:00:08] a1fa: i have two has_many associations to the same class, but for different attributes. at the moment thats to separate associations. is it possible to build one association instead of two separate?
[16:00:51] arashb: has joined #RubyOnRails
[16:00:52] PedramT: has joined #RubyOnRails
[16:00:56] meves: has joined #RubyOnRails
[16:02:00] apotry: has joined #RubyOnRails
[16:02:34] meves: has joined #RubyOnRails
[16:04:25] puria: has joined #RubyOnRails
[16:06:00] gbgdev: has joined #RubyOnRails
[16:06:03] AzaToth: has joined #RubyOnRails
[16:06:36] tubbo: pwnd_nsfw: agreed
[16:06:45] tubbo: i mostly wonder "why do people use this"
[16:06:50] tubbo: but a lot of devs love it so (shrug)
[16:07:03] gbgdev: has joined #RubyOnRails
[16:07:03] pwnd_nsfw: I can't get it to play nicely with rails app :(
[16:08:15] gingray: has joined #RubyOnRails
[16:12:40] nerium: has joined #RubyOnRails
[16:13:56] IrishGringo: has joined #RubyOnRails
[16:14:31] stannard: has joined #RubyOnRails
[16:14:37] darkxploit: has joined #RubyOnRails
[16:15:54] Zadrel: has joined #RubyOnRails
[16:17:36] mikecmpbll: has joined #RubyOnRails
[16:19:10] sonofdirt: has joined #RubyOnRails
[16:19:32] jahbrewski: has joined #RubyOnRails
[16:19:41] disgrntld: has joined #RubyOnRails
[16:22:44] fedexo: has joined #RubyOnRails
[16:28:58] VeryBewitching: has joined #RubyOnRails
[16:29:00] mostlybadfly: has joined #RubyOnRails
[16:29:22] cschneid_: has joined #RubyOnRails
[16:30:20] aegis3121: has joined #RubyOnRails
[16:30:36] Meow-J: has joined #RubyOnRails
[16:34:38] hobodave: has joined #RubyOnRails
[16:34:52] ElFerna: has joined #RubyOnRails
[16:41:50] chouhoulis: has joined #RubyOnRails
[16:43:49] msyvich_: has joined #RubyOnRails
[16:44:06] IrishGringo: has joined #RubyOnRails
[16:45:22] cmckee: has joined #RubyOnRails
[16:45:22] netzfisch: has joined #RubyOnRails
[16:50:45] Champion_The: has joined #RubyOnRails
[16:50:57] nodejunkie: has joined #RubyOnRails
[16:51:00] gambl0re: has joined #RubyOnRails
[16:51:00] gambl0re: has joined #RubyOnRails
[16:53:43] Champion_The: has left #RubyOnRails: ()
[16:54:00] Champion_The: has joined #RubyOnRails
[16:54:25] mag42c: has joined #RubyOnRails
[16:54:47] Champion_The: has left #RubyOnRails: ()
[16:55:59] Champion_The: has joined #RubyOnRails
[16:56:50] Rodya_: has joined #RubyOnRails
[16:56:52] Senecea: has joined #RubyOnRails
[16:57:51] yoongkang: has joined #RubyOnRails
[16:58:39] B1n4r10: has joined #RubyOnRails
[17:00:29] hobodave_: has joined #RubyOnRails
[17:00:34] dionysus69: has joined #RubyOnRails
[17:00:38] gingray: has joined #RubyOnRails
[17:01:15] Champion_The: is there a way to uninstall a gem from rails and all the files that belong to it also from DB?
[17:01:57] Champion_The: or once I install a gem to my rails app I have manually delete all files?
[17:04:07] msyvich_: has joined #RubyOnRails
[17:08:00] msyvich_: has joined #RubyOnRails
[17:10:15] davidw: has joined #RubyOnRails
[17:10:42] meves: has joined #RubyOnRails
[17:11:53] BrisketBronson: has joined #RubyOnRails
[17:13:31] IrishGringo: has joined #RubyOnRails
[17:14:38] arup_r: has joined #RubyOnRails
[17:14:53] Spami: has joined #RubyOnRails
[17:15:10] chouhoulis: has joined #RubyOnRails
[17:16:24] srinidhi: has joined #RubyOnRails
[17:18:42] PedramT: has joined #RubyOnRails
[17:19:02] crdpink: has joined #RubyOnRails
[17:20:12] crdpink: has joined #RubyOnRails
[17:23:29] FLeiXiuS: has joined #RubyOnRails
[17:23:29] FLeiXiuS: has joined #RubyOnRails
[17:23:33] gingray: has joined #RubyOnRails
[17:24:02] valetudo: has joined #RubyOnRails
[17:27:27] htmldrum: has joined #RubyOnRails
[17:27:46] jds: has joined #RubyOnRails
[17:30:06] jottr: Hello everyone.
[17:30:25] kirillzh: has joined #RubyOnRails
[17:31:02] arup_r: jottr: hi
[17:31:24] kirillzh: has joined #RubyOnRails
[17:32:39] mordof_work: has joined #RubyOnRails
[17:33:46] kirillzh: Is there a way using geocoder to do reverse geocoding and fetch only city, state and country (without building number and street).
[17:36:04] jottr: So, I've inherited a legacy rails app, which uses devise and angular to render the views. The app is currently deployed to a root server, and I'm in the process of migrating it to heroku. Although the deployment to heroku (including the db) worked fine, I am hitting 401 on https://intense-refuge-18258.herokuapp.com/users/sign_in.json Will this be due to CSRF protection in devise?
[17:37:09] rakm: has joined #RubyOnRails
[17:37:38] sleungcy: has joined #RubyOnRails
[17:40:47] drbayer: has joined #RubyOnRails
[17:40:49] djbkd: has joined #RubyOnRails
[17:42:42] Macaveli: has joined #RubyOnRails
[17:44:19] timmyBsd: hey, when i use actioncable, is it possible to push a message only to one client, eg. where name == 'foo'
[17:44:24] jottr: On the server side I am seeing a https://devcenter.heroku.com/articles/error-codes#h27-client-request-interrupted error message.
[17:44:51] momomomomo: has joined #RubyOnRails
[17:44:59] cnk: has joined #RubyOnRails
[17:45:13] benlieb: has joined #RubyOnRails
[17:47:07] User458764: has joined #RubyOnRails
[17:49:59] namxam: has joined #RubyOnRails
[17:52:42] jottr: If someone could find the time to help me debug this, that would be awesome, since this is currently blocking me to finish pressing work.
[17:53:52] cnk: jottr: please repost paste / gist link
[17:55:04] sleungcy: has joined #RubyOnRails
[17:55:39] IrishGringo: has joined #RubyOnRails
[17:56:17] jottr: cnk: I have posted a gist link yet. The apps source can be found here: https://git.io/vgfNA
[17:57:19] cnk: I just signed in so I don't know what question you asked. But I do know I am not digging through your entire app to debug it
[17:57:23] mikecmpbll: has joined #RubyOnRails
[17:58:48] agoldboi: has joined #RubyOnRails
[17:59:07] jrvlima: has joined #RubyOnRails
[18:02:39] rogue_koder: has joined #RubyOnRails
[18:03:15] ElFerna: has joined #RubyOnRails
[18:03:56] jottr: cnk: Which I did not expect you to do. :) Weird that you are able to sign in...
[18:03:56] PedramT: has joined #RubyOnRails
[18:05:07] mordof_work: has joined #RubyOnRails
[18:05:17] Craigimus: has joined #RubyOnRails
[18:05:45] jottr: I mean sign up
[18:06:33] arup_r: jottr: he meant, he just signed in to IRC ,, lol
[18:06:40] arup_r: not to your app
[18:06:52] jottr: Ah sorry. Misread that. lol
[18:07:30] jottr: cnk: Let me repost my earlier question.
[18:07:37] jottr: So, I've inherited a legacy rails app, which uses devise and angular to render the views. The app is currently deployed to a root server, and I'm in the process of migrating it to heroku. Although the deployment to heroku (including the db) worked fine, I am hitting 401 on https://intense-refuge-18258.herokuapp.com/users/sign_in.json Will this be due to CSRF protection in devise?
[18:07:42] arup_r: so your app renders JSON, not html ?
[18:07:44] jottr: On the server side I am seeing a https://devcenter.heroku.com/articles/error-codes#h27-client-request-interrupted error message.
[18:08:11] jottr: arup_r: It uses angular to render the views.
[18:08:26] timmyBsd: is there any ability to get filter by subscribers before sending the message
[18:08:44] earfin: has joined #RubyOnRails
[18:10:14] srinidhi: has joined #RubyOnRails
[18:10:25] timmyBsd: how do i get all subscribers from channel
[18:10:55] pilne: has joined #RubyOnRails
[18:11:31] IrishGringo: has joined #RubyOnRails
[18:13:18] akaiiro: has joined #RubyOnRails
[18:13:41] drbayer: has joined #RubyOnRails
[18:14:04] aegis3121: has joined #RubyOnRails
[18:19:26] tubbo: in theory, all angular 1.0 apps are "legacy" ;)
[18:20:13] smathy: has joined #RubyOnRails
[18:20:50] tubbo: jottr: there is CSRF protection in rails, inherently.
[18:20:53] nettoweb: has joined #RubyOnRails
[18:20:55] tubbo: just so you know
[18:20:56] manfrin: has joined #RubyOnRails
[18:21:16] pipework: Only if you use the right methods.
[18:21:18] tubbo: jottr: or possibly...you have `before_action :authenticate_user!` and it's being run before /users/sign_in?
[18:21:37] PedramT: has joined #RubyOnRails
[18:23:21] srinidhi: has joined #RubyOnRails
[18:26:39] safety_cut: has joined #RubyOnRails
[18:26:43] mordof_work: has joined #RubyOnRails
[18:26:59] lacrymology: has joined #RubyOnRails
[18:28:23] LambdaSource: has joined #RubyOnRails
[18:29:37] tmm88: has joined #RubyOnRails
[18:32:04] snowy: has joined #RubyOnRails
[18:32:18] cobragoat: has joined #RubyOnRails
[18:32:21] erullmann: has joined #RubyOnRails
[18:32:54] Coldblackice: has joined #RubyOnRails
[18:34:00] Andr3as: good evening everyone
[18:34:41] Andr3as: have you guys ever made an app with (financial) charts..? am doing some research right now and i wonder what js library you guys were using
[18:35:11] erullmann: has joined #RubyOnRails
[18:38:06] tubbo: Andr3as: well, not with financial charts...but i have used highcharts to make charts with JS
[18:38:09] aarkerio: has joined #RubyOnRails
[18:38:42] smathy: Andr3as, and I've used google charts for a lot of different things, also good.
[18:39:14] Andr3as: thanks to both of you
[18:39:14] erullmann: has joined #RubyOnRails
[18:39:21] Craigimus: has joined #RubyOnRails
[18:39:27] Andr3as: am just thought aybout chartkick
[18:39:43] bronson: has joined #RubyOnRails
[18:39:48] Andr3as: or zingchart
[18:40:27] Andr3as: highcharts looks really nice
[18:41:20] tubbo: yeah google charts is pretty neat too if you want something quick to develop.
[18:41:25] gekido: has joined #RubyOnRails
[18:42:32] smathy: Andr3as, yeah, Chartkick wraps google charts.
[18:42:47] Andr3as: tubbo: have u used a gem? or plain js?
[18:42:53] Andr3as: smathy, ah, good to know, thx
[18:43:07] tubbo: nah just embedded it into activeadmin
[18:43:09] tubbo: this was a while ago
[18:43:34] jottr: tubbo: No, it seems the before_filter has been commented out: https://git.io/vgJUV
[18:43:37] smathy: has joined #RubyOnRails
[18:44:06] msyvich_: has joined #RubyOnRails
[18:44:56] k13nox: has joined #RubyOnRails
[18:44:59] Andr3as: also for that active admin mentioning.. looks very interesting
[18:45:21] smathy: It's a TRAP!
[18:46:08] Andr3as: i wanted to build an own admin interface, so should i just go ahead?
[18:46:22] Andr3as: anfd skip the low hanging fruits?
[18:47:33] smathy: Andr3as, have a look at https://github.com/thoughtbot/administrate instead, it's much plainer and easier to work with.
[18:47:40] matthewd: Yeah.. use activeadmin for much, and it'll eventually hit you right in the low hanging fruits
[18:48:13] tubbo: i've been so happy with administrate
[18:48:15] tubbo: it's more "rails-y"
[18:49:08] MaDErroR123: has joined #RubyOnRails
[18:49:29] smathy: Yeah, much nicer when you do (which you almost always will) need to customize things.
[18:49:54] Andr3as: thanks guys, appreciate the heads up
[18:50:15] mdw: has joined #RubyOnRails
[18:51:10] MaDErroR123: has joined #RubyOnRails
[18:52:20] erullmann: has joined #RubyOnRails
[18:53:06] mrhooper: has joined #RubyOnRails
[18:53:25] hasitha: has joined #RubyOnRails
[18:54:41] bronson: matthewd: haha, well said.
[18:57:41] Craigimus: has joined #RubyOnRails
[18:57:45] p2p: has joined #RubyOnRails
[18:58:35] teaearlgraycold: Why am I still logged into my rails app if I delete the rails_session cookie?
[18:58:40] yoongkang: has joined #RubyOnRails
[18:58:42] Chachi: has joined #RubyOnRails
[18:58:43] sankaber: has joined #RubyOnRails
[18:58:47] teaearlgraycold: It seems like even if I delete it on the next request I get it back
[18:59:14] Psy-Q: has joined #RubyOnRails
[18:59:25] kies^: has joined #RubyOnRails
[18:59:53] flashpoint9: has joined #RubyOnRails
[18:59:59] tubbo: teaearlgraycold: is rails_session the cookie that's storing your logged-in state? or is it just storing the ID of the current browser session?
[19:00:12] baweaver: has joined #RubyOnRails
[19:00:31] teaearlgraycold: I think it's just storing my user ID
[19:00:38] djbkd: has joined #RubyOnRails
[19:00:41] teaearlgraycold: But I don't really know for sure
[19:00:57] a1fa: i think i am running into a bug with "with_options" validations
[19:01:20] a1fa: if i have with_options :if => whatever? do ||...
[19:01:32] a1fa: and something inside of it .validate if: condition
[19:01:39] a1fa: it disregards "with_options" if condition
[19:01:45] djbkd: has joined #RubyOnRails
[19:02:02] teaearlgraycold: You should post some contextual code
[19:02:07] Limix: has joined #RubyOnRails
[19:02:08] a1fa: roger that
[19:02:24] legohead: has joined #RubyOnRails
[19:02:45] hobodave: has joined #RubyOnRails
[19:03:42] a1fa: https://gist.github.com/anonymous/c6fee040911e1e77d483
[19:03:51] sbarg: has joined #RubyOnRails
[19:04:13] cmckee: has joined #RubyOnRails
[19:04:14] sbarg: has left #RubyOnRails: ()
[19:04:38] tubbo: a1fa: why not just do validate :urls, if :status_check_and_has_end_date?
[19:04:39] a1fa: two ifs, become an or instead of an and
[19:04:46] tubbo: like why have two ifs
[19:05:02] tubbo: where status_check_and_end_date? is defined as returning `status_check? && end_date?`
[19:05:15] a1fa: tubbo: i have ~20 validations that fall under has_end_date
[19:05:24] a1fa: i just thought it would be easier to group them this way
[19:06:52] a1fa: tubbo: so am i hitting a bug? or this is one of those things - you are not supposed to do it that way?
[19:07:22] Craigimus: has joined #RubyOnRails
[19:07:23] legohead: has joined #RubyOnRails
[19:07:29] krz: has joined #RubyOnRails
[19:08:22] Ergo: has joined #RubyOnRails
[19:08:57] tubbo: a1fa: ahh ok
[19:09:07] a1fa: i think if clause over-writes the with_options if clause
[19:09:39] lemur: has joined #RubyOnRails
[19:10:04] tubbo: yeah it might...i honestly don't see any example code that describes what you're doing
[19:10:48] mrhooper: Hey there. Is there any real practical reason not to build my app/api on rails? I'm hearing so much lately about how I need to use node and how rails/ruby isn't going to scale and that everything needs to be small micro-services. Is that just a bunch of hype?
[19:10:53] a1fa: should i report it or, or just re-write and move on?
[19:11:48] a1fa: ACTION is going to peak into with_options source
[19:12:04] fox_mulder_cp: mrhooper: hm, i see this question for some weeks ago
[19:12:06] gekido: has joined #RubyOnRails
[19:12:29] fox_mulder_cp: mrhooper: but while u ask it, we make our app on it
[19:12:53] tubbo: mrhooper: you should build your app/api in the way that is the most fun for you.
[19:13:08] matthewd: a1fa: Yeah.. with_options isn't magic. It doesn't know what the options are, or how to combine them. If you specify one, I'd expect it to just flat override the value from the with_
[19:13:10] tubbo: nothing needs to be anything. this is software, there are no right answers.
[19:13:15] tubbo: but there are a LOT of wrong ones.
[19:14:37] OSIRIS: has joined #RubyOnRails
[19:14:43] mrhooper: hmm, that makes me feel better
[19:15:14] Craigimus: has joined #RubyOnRails
[19:15:24] a1fa: with_options does not even work with :if => ( condition1 && condition2 )
[19:15:35] Craigimus: has joined #RubyOnRails
[19:16:02] matthewd: Not if your conditions are symbols it won't, no.
[19:16:10] matthewd: Again.. ruby, not magic.
[19:16:41] sonofdirt: has joined #RubyOnRails
[19:16:42] a1fa: what do you mean symbols?
[19:17:53] droptone: Question: I'm receiving periodic "Net::ReadTimeout" errors when using RestClient, protocol.rb:158, anyone familiar with the syntax
[19:18:02] droptone: for increasing the timeout on raw RestClient.get calls?
[19:18:22] Hans267: has joined #RubyOnRails
[19:19:33] draig: has joined #RubyOnRails
[19:26:37] sol: has joined #RubyOnRails
[19:27:06] tubbo: mrhooper: honestly though you can make rails apps into micro-services
[19:27:11] tubbo: i mean, rails can do anything you want
[19:27:54] mrhooper: tubbo: all the node guys say rails is bloated and slow but i don't know if i want to believe that
[19:28:30] mrhooper: i kind of like the idea of having everything i might need available. i don't want to think about what parts i have to piece together to get what i want
[19:28:31] tubbo: mrhooper: all the rails guys say node is filled with a bunch of bike-shedders who don't stick around at a job long enough to see the terrible implications of their brash actions.
[19:28:34] tubbo: mrhooper: i mean, so i heard.
[19:28:52] nozpheratu: has joined #RubyOnRails
[19:29:04] srinidhi: has joined #RubyOnRails
[19:29:07] tubbo: but in all seriousness...node is really great for certain things.
[19:29:14] tubbo: rails is really great for other things
[19:29:21] tubbo: and it really all depends on your problem domain
[19:30:03] mrhooper: tubbo: my app has no real-time requirements, a pretty simple data model. if i go with rails i would probably skip a SPA design all together as it's really not important
[19:31:11] tubbo: mrhooper: yeah, and unless you want to do a lot of fun things with JS and CSS animation transitions between route changes, then a SPA isn't really giving you much back
[19:31:30] tubbo: mrhooper: you can get the same power out of rails for most things, and you get to write in ruby instead of JS.
[19:31:36] mrhooper: my last question: if i go rails, is it still a good idea to mix the api and views together? i'd like to build a ui/dashboard that interfaces with the api
[19:31:57] mrhooper: tubbo: heh, i LOVE javascript, but i'm very willing to concede that ruby is a more elegant language
[19:32:15] pawnbox: has joined #RubyOnRails
[19:33:48] jcugno: has joined #RubyOnRails
[19:34:15] mrhooper: i think people got so excited by the frontend boom and let that spill over to the backend
[19:34:24] sleungcy: has joined #RubyOnRails
[19:34:25] B1n4r10: has joined #RubyOnRails
[19:34:33] User458764: has joined #RubyOnRails
[19:34:37] mdw: has joined #RubyOnRails
[19:37:50] Scriptonaut: has joined #RubyOnRails
[19:38:35] ur5us: has joined #RubyOnRails
[19:38:56] freezevee: has joined #RubyOnRails
[19:38:59] freezevee: guys I have been programming for some years, then started with Ruby/Rails and going on for the last 2-3 yrs and I've become a Rails developer for last 3 months, so I am looking for programs to get more knowledge. What could you suggest as a course, degree or anything similar? Maybe mentoring ? I am looking into Ruby/Linux/devOps
[19:39:36] djbkd: has joined #RubyOnRails
[19:40:43] Scriptonaut: Hey guys, I have an action people#create. For some reason, when an error happens, it insists on returning a 200 OK. I commented all the code in #create out, and I just render json: { content: "ERROR" }, status: :unprocessable_entity, and the content is there, but it returns as a 200 OK. Has anyone dealt with this before?
[19:41:53] djbkd: has joined #RubyOnRails
[19:42:11] tubbo: mrhooper: define "mix the api and views together"
[19:42:39] tubbo: mrhooper: i mean, my rails apps mostly include an api alongside the view. so my controllers are all responding to JSON (generated by ActiveModel::Serializers) or HTML (generated by Haml or ERb views)
[19:43:32] djbkd: has joined #RubyOnRails
[19:46:36] kpwarr_: has joined #RubyOnRails
[19:47:00] kpwarr_: Hello! I want to disable csrf token authentication for my entire application (a la skip_before_action :verify_authenticity_token) but only when I am running on local host. Should I set this up in environment.rb? how do I chech what the current address is?
[19:49:35] Scriptonaut: I cannot get my action to render an error no matter what
[19:49:59] moeabdol: has joined #RubyOnRails
[19:50:13] Scriptonaut: when I explicitly tell it to render 422 or 500, it renders a 200
[19:50:22] Scriptonaut: I disabled all before actions on it, still happens
[19:51:11] baweaver: has joined #RubyOnRails
[19:52:12] bmalum: has joined #RubyOnRails
[19:53:27] Aherin: has joined #RubyOnRails
[19:53:51] andrew9184: has joined #RubyOnRails
[19:53:54] a1fa: tubbo: i used your suggestion, and created couple of defs has_this_and_that? to be used with_options
[19:54:12] a1fa: tubbo: granted, i didnt even need with_options at that point :)
[19:54:29] nertzy: has joined #RubyOnRails
[19:54:37] smoitra: has joined #RubyOnRails
[19:55:05] a1fa: my next challenge is to do f.select with a collection from a Model + my own value thats not being pulled from the model
[19:55:35] a1fa: i have the collection working, i just cant do my own select (ie: "Other")
[19:56:05] a1fa: should i create a helper model for this, and do options_for_slect?
[19:56:12] a1fa: or is there a better/easier way
[19:56:32] mdw: has joined #RubyOnRails
[19:58:57] smoitra: alfa: You have to select from a array
[19:59:18] yoongkang: has joined #RubyOnRails
[20:00:09] smoitra: alfa: http://apidock.com/rails/ActionView/Helpers/FormOptionsHelper/select
[20:00:11] yeticry_: has joined #RubyOnRails
[20:00:24] cmckee: has joined #RubyOnRails
[20:03:08] smoitra: Hi people I created a small article on getting started with git for first time user please give me your valuable feedback http://smoitra.com/posts/just-enough-git
[20:04:34] a1fa: smoitra: oh :P this was easier than i thought
[20:04:36] a1fa: i just did this
[20:05:07] a1fa: f.select(:whatever, [ ["my option"], Model.all. ...
[20:05:53] yfeldblum: has joined #RubyOnRails
[20:05:57] Scient: or you can do collection select and use :include_blank => "my option"
[20:06:10] smoitra: alfa: have you seen this example http://apidock.com/rails/ActionView/Helpers/FormOptionsHelper/select
[20:06:16] smoitra: select("post", "person_id", Person.all.collect {|p| [ p.name, p.id ] }, { include_blank: true })
[20:06:46] Craigimus: has joined #RubyOnRails
[20:07:14] smoitra: This is same as select("post", "person_id", [[1, "name1"][2, "name2"]...[100, "name3"]], { include_blank: true })
[20:07:18] chubijs: has joined #RubyOnRails
[20:08:50] maxx88: smoitra: just-enough-git is nicely done. i found one spelling error; B,ut should be But,
[20:09:08] nerium: has joined #RubyOnRails
[20:09:41] legohead: has joined #RubyOnRails
[20:09:47] chubijs: What would you guys suggest for hosting multiple, small rails apps? I am going to be making a bunch of sites with really low trafic and I am wondering which would be the best solution. Heroku? Digitalocean?
[20:09:59] Pazician: has joined #RubyOnRails
[20:10:17] smoitra: maxx88: Thanks for the feedback
[20:10:40] Arlantir_: has joined #RubyOnRails
[20:11:57] Arlantir_: Exception encountered: #<NameError: uninitialized constant RSpec::Core::CommandLine> What could be wrong?
[20:11:59] [Butch]: has joined #RubyOnRails
[20:12:20] netzfisch: has joined #RubyOnRails
[20:12:39] matthewd: chubijs: I'd say that rather depends on how you value your time, vs your experience level running such things yourself
[20:13:15] k13nox: has joined #RubyOnRails
[20:13:54] maxx88: chubijs: I was just about to embark on getting my hostgator reseller account to start working with ruby on rails for the same reason. didn???t want to spend a lot with aws or heroku for a lot of small little accounts.
[20:14:19] chubijs: matthewd, I am just starting out. I am at a point where I am confident enough with simple apps w/o anything complicated. What im looking for is low cost, easy to manage. And for many, small and low traffic aps
[20:14:52] podman: has joined #RubyOnRails
[20:15:35] a1fa: smoitra: thats what i did
[20:16:07] a1fa: smoitra> select("post", "person_id", Person.all.collect {|p| [ p.name, p.id ] }, { include_blank: true })
[20:16:09] iliketurtles: has joined #RubyOnRails
[20:17:04] agoldboi: has joined #RubyOnRails
[20:19:30] ElFerna_: has joined #RubyOnRails
[20:19:38] gingray: has joined #RubyOnRails
[20:19:50] smoitra: Arlantir_ : Did you ran rails g rspec:install
[20:20:16] mauriciobanduk: has joined #RubyOnRails
[20:20:47] Scient: using a select instead of collection_Select when you are sort-of manually doing the latter is not a great idea
[20:20:51] Scient: i would call it bad advice
[20:22:03] Arlantir_: smoitra: established
[20:23:28] sandstrom: has joined #RubyOnRails
[20:23:42] lemur: has joined #RubyOnRails
[20:25:17] smoitra: Scient: I think when we are data from model we should use collection_select otherwise just select ?
[20:26:04] chubijs: maxx88, can u tell me the pros of using hostgator? Have any experience with it?
[20:28:13] Craigimus: has joined #RubyOnRails
[20:29:46] a1fa: lol, i fail at this
[20:30:00] maxx88: chubijs: have used hostgator probably since they started 10+ years ago, have used probably 10 or so hosting providers before, and like them the most. for $25/month its like 50GB data, 500GB bandwidth, unlimited domains, cpanel for every account so nice for a business
[20:30:08] a1fa: so i tried using options_for_select("My options", Model.all.collect {..}")
[20:30:16] a1fa: but this is not working as un-expected ;X
[20:31:13] robbyoconnor: has joined #RubyOnRails
[20:32:22] badoo: has joined #RubyOnRails
[20:32:48] Macaveli: has joined #RubyOnRails
[20:33:25] djbkd: has joined #RubyOnRails
[20:33:29] aaronmoodie: has joined #RubyOnRails
[20:33:43] maxx88: chubijs: here is how to get RoR deployed in hostgator. http://forums.hostgator.com/ruby-rails-support-t13038.html?t=13038 . little more work than heroku but, basically unlimited domains/sites and each of your customers get a cpanel login. they use whm for server/client management
[20:34:39] atmosx_laptop: has joined #RubyOnRails
[20:34:59] yoongkang: has joined #RubyOnRails
[20:35:05] drbayer: has joined #RubyOnRails
[20:35:10] a1fa: smoitra: any other thoughts?
[20:36:55] safety_cut: has joined #RubyOnRails
[20:37:32] chubijs: maxx88, thank you. I will give this a read. Have u had any experience with digitalocean? The droplet thing looks useful
[20:38:31] smoitra: alfa: What is the exact problem ?
[20:39:11] aegis3121: has joined #RubyOnRails
[20:39:14] bronson: chubijs: don't overthink it. hosting is a commodity these days.
[20:40:07] bronson: (well, cheap small less-reliable hosting anyway... which is what you're looking for)
[20:40:44] bronson: that said, digitalocean is pretty darned great.
[20:40:48] a1fa: smoitra: i am trying to combine ["Other, Other"] and Model.Collection as a single drop down
[20:41:03] a1fa: smoitra: i can only get "Other" and 1 object from collection to display properly
[20:41:12] a1fa: i've tried multiple combinations
[20:41:41] DoubleMalt: has joined #RubyOnRails
[20:41:41] a1fa: including options_for_select(["other"],Model.all.collect...) and all other variations
[20:41:50] MaDErroR123: has joined #RubyOnRails
[20:42:12] FernandoBasso: has joined #RubyOnRails
[20:42:22] smoitra: combine both arrays somewhere else and then put it there
[20:42:43] a1fa: in a helper or controller?
[20:42:46] serbalgi: has joined #RubyOnRails
[20:42:57] a1fa: where is it more appropriate?
[20:43:44] smoitra: person = Person.all.collect {}
[20:44:01] maxx88: chubijs: no experience with digitalocean although, have heard good things about them, maybe i will give them a spin. it???s a commodity business like bronson said.
[20:44:08] smoitra: persons << [id name]
[20:44:39] mauriciobanduk: has joined #RubyOnRails
[20:45:43] smoitra: alfa: Its just playing with arrays
[20:45:49] arBmind: has joined #RubyOnRails
[20:46:07] El3ktra: has joined #RubyOnRails
[20:46:07] El3ktra: has joined #RubyOnRails
[20:46:21] baweaver: has joined #RubyOnRails
[20:46:40] mrhooper: tubbo: sorry for the delayed response. yeah that's exactly what i mean. it doesn't get messy?
[20:46:46] smoitra: alfa: Helper is for methods that you need to be available accross different views
[20:46:49] mordof_work1: has joined #RubyOnRails
[20:47:31] mrhooper: tubbo: you just use responds_to?
[20:49:40] a1fa: smoitra: same probem now :X
[20:50:02] a1fa: smoitra: current = ['Other']; current << Model.all.collect { }
[20:50:35] drbayer: has joined #RubyOnRails
[20:50:50] smoitra: Model.all.collect {} return this [[], [], []]
[20:51:34] smoitra: so the resultant becomes ['Other', [[], [], []]]
[20:51:51] mdw: has joined #RubyOnRails
[20:51:57] smoitra: alfa^ can you visualise this now
[20:52:06] smoitra: Try this in console
[20:52:37] nfk|laptop: has joined #RubyOnRails
[20:52:53] a1fa: ok, so i should collect first, and then push into the collection?
[20:53:04] smoitra: that you can do
[20:53:09] dionysus69: has joined #RubyOnRails
[20:54:08] a1fa: that worked
[20:54:37] Arlantir_: Exception encountered: #<NameError: uninitialized constant RSpec::Core::CommandLine> What could be wrong?
[20:54:57] smoitra: alfa: Hurrah!
[20:55:44] a1fa: i wonder why it didnt work the other way
[20:56:42] smoitra: alfa^ Go to ruby docs on Array it will help you understand better
[20:58:52] cmckee: has joined #RubyOnRails
[20:59:53] chipotle: has joined #RubyOnRails
[21:00:09] meves: has joined #RubyOnRails
[21:02:41] nettoweb: has joined #RubyOnRails
[21:04:31] hobodave: has joined #RubyOnRails
[21:05:12] shmilan: has joined #RubyOnRails
[21:09:02] B1n4r10: has joined #RubyOnRails
[21:09:55] mdw: has joined #RubyOnRails
[21:10:25] legohead: has joined #RubyOnRails
[21:11:36] puria: has joined #RubyOnRails
[21:13:58] bungoman_: has joined #RubyOnRails
[21:15:00] bmalum: has joined #RubyOnRails
[21:15:59] mordof_work: has joined #RubyOnRails
[21:16:06] kirillzh: has joined #RubyOnRails
[21:19:34] chipotle: has joined #RubyOnRails
[21:19:34] sankaber: has joined #RubyOnRails
[21:19:46] mordof_work: has left #RubyOnRails: ()
[21:19:59] momomomomo: has joined #RubyOnRails
[21:21:30] Cohedrin: has joined #RubyOnRails
[21:22:40] meves: has joined #RubyOnRails
[21:23:48] Cohedrin: has joined #RubyOnRails
[21:25:05] safety_cut: has joined #RubyOnRails
[21:25:30] smathy: arathald, are you using spork?
[21:25:38] smathy: arathald, sorry.
[21:28:35] aegis3121: has joined #RubyOnRails
[21:31:37] Scriptonaut: has joined #RubyOnRails
[21:31:40] Chachi: has joined #RubyOnRails
[21:31:44] Craigimus: has joined #RubyOnRails
[21:32:26] Scriptonaut: Hey guys, I have a model user, that belongs to account. The account is invalid (which is fine). When I create a user, and say user.account = the_account, then save user, it is validating account, and won't save user because the account is invalid. How can I still save the user without validating the account?
[21:33:40] meves: has joined #RubyOnRails
[21:36:33] moeabdol1: has joined #RubyOnRails
[21:37:06] dekonix: has joined #RubyOnRails
[21:38:54] claytonzaugg: has joined #RubyOnRails
[21:39:17] arron_: has joined #RubyOnRails
[21:40:54] cmckee: has joined #RubyOnRails
[21:43:12] momomomomo: has joined #RubyOnRails
[21:44:26] badoo: has joined #RubyOnRails
[21:48:17] mauricio1anduk: has joined #RubyOnRails
[21:48:53] meves: has joined #RubyOnRails
[21:49:21] ogpastaling: has joined #RubyOnRails
[21:49:37] sandstrom: has joined #RubyOnRails
[21:50:42] hobodave: has joined #RubyOnRails
[21:51:55] serbalgi: has joined #RubyOnRails
[21:53:51] dopie: has joined #RubyOnRails
[21:55:24] dopie: https://gist.github.com/staycreativedesign/5bb5c6b3456a89e1897e
[21:55:28] bronson: has joined #RubyOnRails
[21:55:43] dopie: can anyone help me with this?? just having a problem visualizing the table structure
[21:57:31] jgt: has joined #RubyOnRails
[21:57:42] badoo: has joined #RubyOnRails
[21:57:48] hasitha: has joined #RubyOnRails
[21:59:26] paradisaeidae: has joined #RubyOnRails
[21:59:43] momomomomo: has joined #RubyOnRails
[22:00:00] smathy: Scriptonaut, you have a validation on the association, or a validates_associated?
[22:00:37] smathy: dopie, a bitmask maybe?
[22:01:13] cmckee: has joined #RubyOnRails
[22:01:14] solars: has joined #RubyOnRails
[22:01:59] lacrymology: has joined #RubyOnRails
[22:03:20] dopie: smathy: looking that up
[22:04:21] Pazician: has joined #RubyOnRails
[22:04:29] bmalum: has joined #RubyOnRails
[22:04:46] chipotle: has joined #RubyOnRails
[22:06:44] DylanJ: offtopic: does anyone know any email as a service providers like sendgrid or mandrill that are based in the eu?
[22:07:52] smathy: dopie, FOO = 0x1; BAR = 0x2; DUM = 0x4; ZAK = 0x8; and then basically you'd have an integer attribute to store the bitmask, and to set it for foo you'd do: self.approval_bitmask |= FOO and to check if FOO is set you'd do: FOO == FOO & approval_bitmask
[22:08:52] dopie: smathy: is that this youre talking about
[22:08:53] dopie: https://gist.github.com/staycreativedesign/5bb5c6b3456a89e1897e
[22:08:55] dopie: err ooops
[22:09:03] dopie: https://github.com/joelmoss/bitmask_attributes
[22:09:24] smathy: dopie, never heard of it, but it doesn't surprise me that there's a gem to help with this stuff.
[22:10:09] dopie: smathy: trying to look for the rails guide
[22:12:18] smathy: dopie, I doubt that bitmasks are mentioned in the rails guides.
[22:12:29] legohead: has joined #RubyOnRails
[22:13:59] momomomomo: http://railscasts.com/episodes/189-embedded-association
[22:14:19] momomomomo: knew there was a mention of it in the oooooold rails tutorial, but looks like that's been deleted
[22:14:30] momomomomo: found this on the google journey for the old book page
[22:15:44] soahccc: Does anyone know if there is a good way to prevent account brute force but the sort of attack that uses thousands of IPs and use email/password combos they found somewhere. We analyzed over 2 million malicious requests and 0.3% were accounts that are in our DB (can't tell if they all got compromised). At the end it's the users fault but we have to deal with all the pissed customers :(
[22:17:15] Craigimus: has joined #RubyOnRails
[22:20:15] mary5030: has joined #RubyOnRails
[22:20:22] superlou: has joined #RubyOnRails
[22:21:15] pawnbox: has joined #RubyOnRails
[22:21:40] jottr_: has joined #RubyOnRails
[22:24:04] smathy: soahccc, per-user rate limit.
[22:24:12] ogpastal_: has joined #RubyOnRails
[22:24:38] soahccc: smathy: but they only try one email with one password, they don't attack an account more than once. They apparently use leaked data from somewhere and test them trough
[22:25:59] NBarnes: has joined #RubyOnRails
[22:26:16] sandstrom: has joined #RubyOnRails
[22:26:49] smathy: soahccc, how do you know they were malicious attempts?
[22:26:50] kirillzh: has joined #RubyOnRails
[22:26:51] yoongkang: has joined #RubyOnRails
[22:27:59] soahccc: smathy: dozens of IPs in a C-net and dozens of C-ranges per B-range. We limit the IPs but they can test 5 times before that and with the huge amount of IPs they can just test as much as they want
[22:28:05] NBarnes: has joined #RubyOnRails
[22:28:15] badoo: has joined #RubyOnRails
[22:28:34] soahccc: smathy: one ip testing 5 different users, never (or rarely) twice. maybe because of another guy having the same leaked data
[22:28:56] smathy: soahccc, so if you were trying to detect in real time then the profile would look like: "more than x failures on any account from IPs in the same C or B net" ?
[22:30:19] soahccc: smathy: we currently only ban per IP and very rarely an entire C-range. We use rack attack for soft throttle (to let a normal user know) and after a few more you get iptabled
[22:31:05] yfeldblum: has joined #RubyOnRails
[22:31:10] soahccc: I guess at the end you can only slow them down, if they have valid credentials you lost right? Except you force your users to use 2 factor auth
[22:34:04] smathy: soahccc, right, well if someone is coming from any one of a whole class C then banning per IP ain't gonna help. So I was really trying to lead you to the solution to your initial question, but if you don't want to do that then you can't solve this.
[22:34:35] smathy: Force your customers to change their passwords.
[22:35:11] moeabdol2: has joined #RubyOnRails
[22:35:36] Chachi: has joined #RubyOnRails
[22:35:49] soahccc: smathy: we banned /24-ranges manually for a while (you can't really ban /16-ranges) but they just seem to have endless IPs. I banned /16 just for a test, silence for a minute than the next range begins
[22:37:35] smathy: soahccc, right, so I was talking about an automatic response based on automatic detection. If your detection is "multiple failed login attempts (for any account) from the same C-class" then that's relatively simple to auto-ban and you could be fairly tight with that because it'd be so rare for that to happen for real users.
[22:38:17] smathy: You could remove the ban relatively quickly, although you might want to investigate those ranges first, if they're in China or something then maybe you leave them banned for a bit longer.
[22:39:33] codezomb: has joined #RubyOnRails
[22:39:55] jgt1: has joined #RubyOnRails
[22:39:56] soahccc: Yeah currently we just drop them for a week :) we are just sick of it. The ranges come from everywhere unfortunately. Mexico, china, russia, usa, many more
[22:40:10] quazimodo: has joined #RubyOnRails
[22:40:35] cmckee: has joined #RubyOnRails
[22:46:36] stannard: has joined #RubyOnRails
[22:46:57] soahccc: smathy: thank you for your input. we will add some more security measures to protect the accounts since I can't really stop the botnet (just slow it down). So things like logins from a different country than usual.
[22:47:09] soahccc: though I still try to slow them down ;)
[22:47:09] meves: has joined #RubyOnRails
[22:47:29] badoo: has joined #RubyOnRails
[22:47:58] soahccc: Would love to send those IPs to RIPE or whatever so that they can confiscate them but ain't gonna happen :(
[22:49:41] drbayer: has joined #RubyOnRails
[22:51:54] moeabdol3: has joined #RubyOnRails
[22:54:32] benlieb: has joined #RubyOnRails
[22:56:27] claytonzaugg: has joined #RubyOnRails
[22:57:08] bronson: has joined #RubyOnRails
[22:57:24] aaronmoodie: has joined #RubyOnRails
[22:57:31] benlieb: migrating an old app from Rails 3 to Rails 4... I had been using bartt-ssl_requirement which is defunct. What is the modern way of defining what routes require ssl?
[22:57:41] benlieb: looks like only force_ssl is used ?
[23:01:02] smathy: benlieb, is there a reason you have any routes NOT SSL?
[23:01:57] benlieb: smathy: that's a good question.
[23:02:28] benlieb: smathy: would you recommend that if any routes use ssl, that ALL routes should?
[23:02:37] baweaver: has joined #RubyOnRails
[23:02:54] benlieb: would be easier that way...
[23:03:01] marr: has joined #RubyOnRails
[23:05:29] smathy: benlieb, yes. If you already have the certificate installed and working there's no compelling reason not to use SSL for the whole site. Especially since August 2014 when google started using SSL as a ranking signal.
[23:05:48] benlieb: smathy: ah, nice to know!
[23:05:54] benlieb: makes sense
[23:07:03] K_r3aPeR: has joined #RubyOnRails
[23:10:13] paradisaeidae: has left #RubyOnRails: ()
[23:10:55] pawnbox: has joined #RubyOnRails
[23:13:10] legohead: has joined #RubyOnRails
[23:13:31] selfagency: has joined #RubyOnRails
[23:14:02] benlieb: smathy: will using force_ssl get rid of the need for this: checkout_review_path(:secure => can_ssl?)
[23:14:26] benlieb: will the path helpers always make https paths?
[23:15:04] soahccc: benlieb: _path have only path and _url uses current host (usually)
[23:15:15] mauriciobanduk: has joined #RubyOnRails
[23:16:58] smathy: benlieb, what soahccc said, that option in the _path helper above won't be doing anything. Also, FWIW, I wouldn't use/bother with force_ssl at all, I'd do it all in my httpd configuration.
[23:17:38] soahccc: smathy: we do it in both because I think it should be covered by the application itself (nginx is just faster) ;)
[23:18:01] adavia: How can i report some small bugs in the R4IA book?
[23:18:17] adavia: maybe they have been reported
[23:19:03] smathy: soahccc, if your httpd is doing the redirect then doing it in your app is pointless.
[23:19:21] smathy: adavia, wait for radar to come on.
[23:19:59] adavia: is he ryan?
[23:20:05] smathy: adavia, yes.
[23:20:06] rhizome: why should ssl be covered by the application itself?
[23:20:38] lipoqil: has joined #RubyOnRails
[23:27:12] mauriciobanduk: has joined #RubyOnRails
[23:31:03] gaustin: has joined #RubyOnRails
[23:31:43] blackmes1: has joined #RubyOnRails
[23:35:48] yoongkang: has joined #RubyOnRails
[23:37:28] moeabdol4: has joined #RubyOnRails
[23:37:37] one_zero: has joined #RubyOnRails
[23:38:28] davidw: has joined #RubyOnRails
[23:40:25] Ropeney: has joined #RubyOnRails
[23:40:32] pawnbox: has joined #RubyOnRails
[23:41:16] braincra-: has joined #RubyOnRails
[23:49:12] iateadonut: has joined #RubyOnRails
[23:52:07] dopie: smathy: wouldnt STI work as well ?? I have a user_uploaded_document that < from document.rb and document model has approved: boolean ?
[23:55:37] GeorgesLeYeti: has joined #RubyOnRails
[23:56:00] GeorgesLeYeti: Someone already use htmltoword gem ?
[23:56:17] smathy: dopie, I have no idea how that would help you have four different fields each with the need for an approved flag.
[23:56:43] ogpastaling: has joined #RubyOnRails
[23:56:54] benlieb: is there any way in an rspec controller test to not have to send the locale like this: get :index, locale: 'en'? I've tried adding this to the spec/rails_helper.rb but it doesn't seem to have an effect: Rails.application.routes.default_url_options[:locale] = 'en'
[23:57:10] smathy: GeorgesLeYeti, yes, according to: https://rubygems.org/gems/htmltoword
[23:57:19] GeorgesLeYeti: I don't get how to make a template. I just want to make a template where text is in Tahoma 10
[23:58:23] GeorgesLeYeti: Every times I try it still returning me Times New Roman 12
[23:58:32] smathy: GeorgesLeYeti, !code
[23:58:32] helpa: GeorgesLeYeti: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.