« Back to channel list

#RubyOnRails - 05 March 2016

« Back 1 day Forward 1 day »
[00:00:11] htmldrum: has joined #RubyOnRails
[00:00:20] jstransky: fox_mulder_cp: I don’t even get your first reply
[00:01:52] ur5us: has joined #RubyOnRails
[00:02:39] FLeiXiuS: http://pastie.org/10748344#16 Why is this not generating a SQL update command? But it does when I do it from console.
[00:03:52] pwnd_nsfw: has joined #RubyOnRails
[00:04:39] jstransky: thanks tbuehlmann that looks promising
[00:04:46] chagel: has joined #RubyOnRails
[00:05:16] fox_mulder_cp: jstransky: u can write your own renerator, such as http://stackoverflow.com/questions/5267998/rails-3-field-with-errors-wrapper-changes-the-page-appearance-how-to-avoid-t
[00:05:35] fox_mulder_cp: or helper. or use js
[00:08:59] jstransky: fox_mulder_cp: hmm yah the generator sounds cool but I’m pretty damn new to rails so that’s a bit beyond me atm
[00:09:14] fox_mulder_cp: jstransky: it's easy L)
[00:09:25] fox_mulder_cp: i'm newbie too
[00:09:56] jstransky: it probably is, I’m just not familiar
[00:10:31] jstransky: I would need hand holding for that one
[00:10:34] diegoviola: has joined #RubyOnRails
[00:11:00] DragonPunch: has joined #RubyOnRails
[00:12:30] baweaver: has joined #RubyOnRails
[00:15:23] twilling: has joined #RubyOnRails
[00:16:01] sudoubuntu: has joined #RubyOnRails
[00:19:55] twilling: has joined #RubyOnRails
[00:20:28] mdw: has joined #RubyOnRails
[00:22:57] ace05: has joined #RubyOnRails
[00:23:15] blackmesa: has joined #RubyOnRails
[00:24:13] timdotrb: has joined #RubyOnRails
[00:25:10] Scripore: has joined #RubyOnRails
[00:26:57] jeanlinux: has joined #RubyOnRails
[00:28:05] mdw: has joined #RubyOnRails
[00:28:17] DenysLins: has joined #RubyOnRails
[00:29:09] DenysLins: has left #RubyOnRails: ()
[00:33:21] stannard: has joined #RubyOnRails
[00:34:17] deuxclique: has joined #RubyOnRails
[00:36:13] Rodya_: has joined #RubyOnRails
[00:38:22] htmldrum: has joined #RubyOnRails
[00:39:31] deuxcliq_: has joined #RubyOnRails
[00:39:43] rattatmatt: has joined #RubyOnRails
[00:42:40] IFrank00: has joined #RubyOnRails
[00:42:47] mdw: has joined #RubyOnRails
[00:46:45] mostlybadfly: has joined #RubyOnRails
[00:48:10] dalbuschat: has joined #RubyOnRails
[00:48:47] dirtibirdi: has joined #RubyOnRails
[00:51:12] smathy: jtdowney, look at the current_page? helper: http://devdocs.io/rails/actionview/helpers/urlhelper#method-i-current_page-3F
[00:51:24] smathy: jtdowney, sorry, wrong tab
[00:51:42] smathy: jstransky, look at the current_page? helper: http://devdocs.io/rails/actionview/helpers/urlhelper#method-i-current_page-3F
[00:53:05] smathy: jstransky, you might also like link_to_unless_current - which although not adding a class does change the element from a link to plain text, which you can obviously target with CSS.
[00:54:06] nerium: has joined #RubyOnRails
[00:54:06] smathy: jstransky, and/or you can provide it with a block for what to display when on that page.
[01:01:20] jstransky: thansk smathy I think overriding the unless_current one might be the way to go. At least then my nav menu would be a lot dry’er
[01:02:10] smathy: jstransky, yep, definitely write your own helper method, just use those built in helpers to get the job done.
[01:02:40] jstransky: how do I look at the source for link_to_unless_current?
[01:03:06] jstransky: oh nm, heh show source link on your link
[01:03:46] IrishGringo: has joined #RubyOnRails
[01:05:25] jenrzzz: has joined #RubyOnRails
[01:06:14] jstransky: I’m confused though, this link shows two different ways of overriding. One in config/application.rb and the other in config/initializers/
[01:06:14] jstransky: http://stackoverflow.com/questions/5267998/rails-3-field-with-errors-wrapper-changes-the-page-appearance-how-to-avoid-t
[01:06:26] jstransky: and yet, there’s also /helpers
[01:06:35] jstransky: which way do I go and why?
[01:08:57] neanderslob: has joined #RubyOnRails
[01:10:03] adavia: has joined #RubyOnRails
[01:11:03] neanderslob: hi all, I'm trying to pass a ruby object to javascript, as shown by this stack overflow answer: http://stackoverflow.com/a/10075186/2540204
[01:11:32] RockLee: has joined #RubyOnRails
[01:11:44] neanderslob: the problem is that I can't quite figure out where the definition of "data" should go; I don't think the <%= syntax works within javascript
[01:11:58] Scripore: has joined #RubyOnRails
[01:12:26] neanderslob: I noticed that the person asking the question ran into this issue himself but then later seemed to resolve it as though it was something obvious that he was missing
[01:12:29] jobewan: has joined #RubyOnRails
[01:12:40] neanderslob: (as shown by the comments)
[01:12:54] neanderslob: could anyone articulate the obvious for me?
[01:15:33] DoctorMonocular: has joined #RubyOnRails
[01:15:49] jeanlinux: has joined #RubyOnRails
[01:15:49] Cohedrin: has joined #RubyOnRails
[01:16:02] mdw: has joined #RubyOnRails
[01:16:03] shanemcd: has joined #RubyOnRails
[01:16:11] jeanlinux: has joined #RubyOnRails
[01:17:21] diegoviola: has joined #RubyOnRails
[01:20:06] Scriptonaut: has left #RubyOnRails: ()
[01:20:31] DoctorMonocular: has joined #RubyOnRails
[01:21:41] ivanskie_: has joined #RubyOnRails
[01:23:55] renews: has joined #RubyOnRails
[01:25:48] jenrzzz: has joined #RubyOnRails
[01:27:49] ivanskie_: has joined #RubyOnRails
[01:28:49] pawnbox: has joined #RubyOnRails
[01:31:31] uglybandersnatch: has joined #RubyOnRails
[01:31:54] smathy: jstransky, my advice is to just make a helper with a new name, like my_link_to or something.
[01:36:46] littletroubleman: has joined #RubyOnRails
[01:37:26] jstransky: yah, gonna write one called nav_link_to
[01:37:47] littletroubleman: has joined #RubyOnRails
[01:38:12] IFrank00: has joined #RubyOnRails
[01:38:40] littletrouble: has joined #RubyOnRails
[01:38:42] gabeodess: has joined #RubyOnRails
[01:41:48] smathy: jstransky, yeah, best idea. The biggest risk/hassle for helpers is that they're global across your whole app.
[01:42:24] arBmind: has joined #RubyOnRails
[01:47:13] baweaver: has joined #RubyOnRails
[01:49:25] Rodya_: has joined #RubyOnRails
[01:52:39] mib_mib: has joined #RubyOnRails
[01:53:59] mib_mib: hi all - mysql2 driver supports 'streaming' results - is this option available for use with activerecord?
[01:57:03] DoctorMonocular: has joined #RubyOnRails
[01:57:20] codepete: has joined #RubyOnRails
[01:58:31] Alejandro15: has joined #RubyOnRails
[01:58:48] shinnya: has joined #RubyOnRails
[02:01:53] ConorJC: has joined #RubyOnRails
[02:02:06] Alejandro15: has left #RubyOnRails: ()
[02:07:36] ivanskie_: has joined #RubyOnRails
[02:12:18] jenrzzz: has joined #RubyOnRails
[02:12:52] jeanlinux: has joined #RubyOnRails
[02:13:59] jeanlinux: has joined #RubyOnRails
[02:14:33] workmad3: has joined #RubyOnRails
[02:16:41] chagel: has joined #RubyOnRails
[02:17:18] rhalff: has joined #RubyOnRails
[02:18:35] pawnbox: has joined #RubyOnRails
[02:18:38] RegulationD: has joined #RubyOnRails
[02:20:00] Rafcio: has joined #RubyOnRails
[02:20:26] Rafcio: hey guys, I haven’t touched ROR in over 3 years.. What book would you recommend to get up to par on things and best practices?
[02:23:17] nogic: has joined #RubyOnRails
[02:24:10] nogic: has joined #RubyOnRails
[02:26:10] havenwood: at the intersection of rails attributes, markdown and emoji: https://gist.github.com/havenwood/dcdf9452476f53505b98
[02:27:24] htmldrum: has joined #RubyOnRails
[02:28:59] smoitra: has joined #RubyOnRails
[02:33:40] htmldrum: has joined #RubyOnRails
[02:37:26] DoctorMonocular: has joined #RubyOnRails
[02:38:08] neanderslob: has joined #RubyOnRails
[02:41:37] pwnd_nsfw: has joined #RubyOnRails
[02:47:40] Rodya_: has joined #RubyOnRails
[02:47:53] norc_: has joined #RubyOnRails
[02:53:51] neanderslob: has joined #RubyOnRails
[02:53:55] rafaelfranca: has joined #RubyOnRails
[02:54:16] krz: has joined #RubyOnRails
[02:57:33] maxdoubt: has joined #RubyOnRails
[03:02:08] ace05: has joined #RubyOnRails
[03:05:33] blackmesa: has joined #RubyOnRails
[03:06:04] Rodya_: has joined #RubyOnRails
[03:06:24] DragonPunch: has joined #RubyOnRails
[03:09:42] underplank: has joined #RubyOnRails
[03:10:47] prgmmr: has joined #RubyOnRails
[03:11:33] wethu: has joined #RubyOnRails
[03:14:48] DoctorMo_: has joined #RubyOnRails
[03:15:23] Nuck: Every time I try and do modern JS best practices (and by "modern" I mean "5 years ago") with Sprockets, I'm reminded just how outdated it is. It's sad, because the rest of Rails is still great in the modern web
[03:16:19] Nuck: But with the JS ecosystem being where it is, the inability for a library to reasonably take over asset compilation from Sprockets is really holding it back :(
[03:16:38] Radar: Just Use Webpack(tm)
[03:16:42] Radar: ACTION now wants that on a sticker
[03:16:59] Nuck: I love WebPack and Browserify, but you ever try meshing that with Sprockets?
[03:17:22] Nuck: It's not exactly pleasant, as react_on_rails makes abundantly clear
[03:18:23] Rodya_: has joined #RubyOnRails
[03:18:36] Nuck: I think it's time for Sprockets to step back and let other libraries handle the asset compilation process for it, and just become the glue that binds them into Rails
[03:20:31] kirillzh: has joined #RubyOnRails
[03:20:47] Radar: That's the thing: we don't mesh it with sprockets.
[03:20:53] DmitryBochkarev: has joined #RubyOnRails
[03:20:55] Radar: Sprockets compiles some assets, webpack compiles some others.
[03:21:23] Radar: We only do that because converting all our CSS / JS over to Webpack is... well, "hard" is an understatement.
[03:22:00] Rodya_: has joined #RubyOnRails
[03:22:36] Nuck: This project is still young, so I'm trying to find a good solution for the long term
[03:24:05] Nuck: Radar: How do you handle referencing the WebPack assets from Rails?
[03:24:21] Radar: nuck: we use https://github.com/mipearson/webpack-rails
[03:25:10] Pazician: has joined #RubyOnRails
[03:25:38] slash_nick: i'm handling scss without the asset pipeline, but still using sprockets... reading variables from the db, using tilt and sprockets to get erb+scss into css and fog to upload it all to the cdn... it'd definitely easier to just use asset pipeline, but we want to ship css changes without compiling and deploying
[03:26:07] Nuck: Radar: Ah, I didn't find this earlier (it was overshadowed by react_on_rails in Google results), but it seems solid
[03:26:23] Radar: nuck: It was created by my boss so I am biased :)
[03:26:40] Nuck: Radar: Not against it? Must be a great boss :P
[03:26:52] Radar: nuck: one of the better ones I've had but please don't let him know. It'll go to his head.
[03:27:20] Radar: In other news: We've got an issue atm where we're deploying 11 copies of the same Rails app to the same (staging) server, with just some minor environmental tweaks for those apps.
[03:27:36] Radar: What I want is something that will "precompile" both the assets + npm so that we're not doing that 11 times.
[03:27:56] Radar: something like a "packaging system" for a Rails app, I guess
[03:28:18] Nuck: Radar: Duplicate cache folders between them using something like an NFS mount?
[03:28:21] Radar: Which leads me into the dangerous territory of "maybe Docker would be a good idea for that?"
[03:28:32] Nuck: Oh, same staging server. Couldn't you use a symlink of tmp?
[03:29:00] Nuck: symlink node_modules as well
[03:29:04] Radar: nuck: yes, that's one way we could definitely do it. I'm thinking a "pre-deploy" step which clones the app and does that "precompilation"
[03:29:18] y2mq37: has joined #RubyOnRails
[03:29:45] Nuck: Also Docker would probably work fine too, due to the union fs
[03:30:59] Nuck: Radar: Out of curiosity, where do you store the WebPack asset files? ./frontend/app seems to be a popular spot
[03:31:11] Radar: nuck: webpack/app
[03:33:07] Nuck: I can't say I'm terribly keen on this idea of two intermingled but kinda-separate apps, it was a maintenance nightmare for Hummingbird. I guess it isn't really different from how we do things today in Rails, though
[03:33:37] Nuck: (we ended up separating the Ember and Rails apps completely, hopefully moving them to separate repos in the next few months)
[03:39:10] swarm_lurker: has joined #RubyOnRails
[03:41:36] nahwar: has joined #RubyOnRails
[03:44:15] quazimodo: has joined #RubyOnRails
[03:44:19] quazimod1: has joined #RubyOnRails
[03:44:59] jeanlinux: has joined #RubyOnRails
[03:47:45] baweaver: has joined #RubyOnRails
[03:49:10] Megamos: has joined #RubyOnRails
[03:50:10] dirtibirdi: has joined #RubyOnRails
[03:59:01] deuxclique: has joined #RubyOnRails
[03:59:29] P4Titan: has joined #RubyOnRails
[03:59:31] SeanLazer: has joined #RubyOnRails
[04:00:58] Rodya_: has joined #RubyOnRails
[04:01:10] jottr: has joined #RubyOnRails
[04:01:38] IFrank00: has joined #RubyOnRails
[04:01:56] Limix: has joined #RubyOnRails
[04:02:04] srruby: has joined #RubyOnRails
[04:02:14] DragonPunch: has joined #RubyOnRails
[04:02:43] srruby: What are people using for integration tests these days? I've been exploring casperjs/phantomjs
[04:03:42] Radar: poltergeist the gem with phantomjs.
[04:05:03] jscheel: has joined #RubyOnRails
[04:06:31] blackmesa: has joined #RubyOnRails
[04:08:32] statelesscode: has joined #RubyOnRails
[04:09:38] DmitryBochkarev: has joined #RubyOnRails
[04:11:11] chouhoulis: has joined #RubyOnRails
[04:12:27] SeanLazer: does anyone know why request.host would return "localhost" when i'm accessing my app via lvh.me?
[04:13:32] Radar: SeanLazer: works fine on my machine
[04:13:48] SeanLazer: i'm using webrick and rails5 beta3
[04:13:59] SeanLazer: thanks for checking though!
[04:14:09] Radar: You cool kids and your using of the Rails beta.
[04:14:41] dopie: Radar: get with the times !
[04:14:58] Radar: ACTION can taste the irony in the air
[04:15:03] braincras: has joined #RubyOnRails
[04:15:16] SeanLazer: that's a good point though, i should see if it's broken in 4.x
[04:15:44] Rodya_: has joined #RubyOnRails
[04:16:26] DoctorMonocular: has joined #RubyOnRails
[04:17:29] SeanLazer: yeah, works with 4.2.5.1, crud
[04:17:43] Radar: I will try my app on the beta too.
[04:19:13] Nuck: I need to try the beta too, but my migration path is a bit rockier
[04:19:36] Nuck: I've gotta wait for jsonapi_resources to support Rails 5 and then move from rails-api to the new Rails 5 API mode
[04:20:27] SeanLazer: Radar: ah ha, looks like it's being caused by browser-sync
[04:21:03] SeanLazer: i'm proxying my requests through browser-sync into webrick
[04:21:04] Radar: Is that a new shiny Rails 5 feature that will break things in new and interesting ways ala turbolinks?
[04:21:18] SeanLazer: haha no it's a thing from the javascript world that i've come to rely on
[04:21:34] SeanLazer: but like all things in the javascript world it will be obsolete by the time rails 5 ships
[04:21:48] Radar: I think upgrading this app today will take more energy than I have.
[04:24:27] SeanLazer: yeah i wouldn't recommend it
[04:27:41] delgiudices: has joined #RubyOnRails
[04:28:16] SeanLazer: bleh, i feel stupid that i didn't catch this browser-sync thing right away
[04:28:29] baweaver: has joined #RubyOnRails
[04:28:30] SeanLazer: it proxies all requests to localhost:3000, of course it wasn't working right
[04:32:46] chouhoul_: has joined #RubyOnRails
[04:33:31] chouhoul_: has joined #RubyOnRails
[04:39:20] jenrzzz: has joined #RubyOnRails
[04:42:58] sneakerhax: has joined #RubyOnRails
[04:43:12] treaki_: has joined #RubyOnRails
[04:44:33] slash_nick: SeanLazer: you should check against beta1
[04:45:00] SeanLazer: slash_nick: i figured it out, it was unrelated to rails and mainly related to my own incompetence
[04:45:15] slash_nick: ah... yeah, that happens
[04:48:03] jeanlinux: has joined #RubyOnRails
[04:52:38] ebbflowgo: has joined #RubyOnRails
[04:54:05] shanemcd: has joined #RubyOnRails
[04:59:24] Rodya_: has joined #RubyOnRails
[05:02:40] jenrzzz: has joined #RubyOnRails
[05:08:17] blackmesa: has joined #RubyOnRails
[05:08:54] jottr_: has joined #RubyOnRails
[05:17:46] wtfisIRClmo: has joined #RubyOnRails
[05:18:44] josephkokenge: has joined #RubyOnRails
[05:24:17] smoitra: has joined #RubyOnRails
[05:24:21] wtfisIRClmo: IS ANYBODY OUT THERE
[05:25:50] kdough: has joined #RubyOnRails
[05:33:32] uglybandersnatch: has joined #RubyOnRails
[05:39:01] pawnbox: has joined #RubyOnRails
[05:39:57] ace05: has joined #RubyOnRails
[05:43:53] emachnic: has joined #RubyOnRails
[05:54:21] arup_r: has joined #RubyOnRails
[06:03:48] trosborn: has joined #RubyOnRails
[06:04:27] _3by8: has joined #RubyOnRails
[06:04:34] Rodya_: has joined #RubyOnRails
[06:04:35] _3by8: I've got a hash whose values contain another hash. Each key/value pair has a hash in its value whose size may differ from the hashes in other values. What I'm trying to do is just add an element to one of those nested hashes so that hash[:key] = { foo: "bar" } becomes hash[:key] = { foo: "bar", foo2: "bar2" } Do I use replace or is there something I'm missing?
[06:07:16] ivanskie_: has joined #RubyOnRails
[06:09:28] youch: has joined #RubyOnRails
[06:09:45] chouhoulis: has joined #RubyOnRails
[06:09:48] trosborn: has joined #RubyOnRails
[06:10:04] blackmesa: has joined #RubyOnRails
[06:12:24] dionysus69: has joined #RubyOnRails
[06:12:31] d0nn1e: has joined #RubyOnRails
[06:20:08] RegulationD: has joined #RubyOnRails
[06:21:29] jenrzzz: has joined #RubyOnRails
[06:22:34] trosborn: has joined #RubyOnRails
[06:23:49] drupald: has joined #RubyOnRails
[06:24:06] intrigueD: has joined #RubyOnRails
[06:27:52] shanemcd: has joined #RubyOnRails
[06:44:55] djbkd: has joined #RubyOnRails
[06:46:11] awc737: has joined #RubyOnRails
[06:48:17] quazimod2: has joined #RubyOnRails
[06:48:35] quazimodo: has joined #RubyOnRails
[06:50:19] jeanlinux: has joined #RubyOnRails
[06:52:09] sohel: has joined #RubyOnRails
[06:53:13] Cache_Money: has joined #RubyOnRails
[06:54:46] DragonPunch: has joined #RubyOnRails
[06:58:21] zave: has joined #RubyOnRails
[06:58:39] emachnic: has joined #RubyOnRails
[07:00:37] shanemcd: has joined #RubyOnRails
[07:00:39] maxz: has joined #RubyOnRails
[07:01:40] sp1rs: has joined #RubyOnRails
[07:04:40] jstransky: has joined #RubyOnRails
[07:05:10] Rodya_: has joined #RubyOnRails
[07:07:26] Devalo: has joined #RubyOnRails
[07:07:57] jstransky_: has joined #RubyOnRails
[07:09:16] pawnbox: has joined #RubyOnRails
[07:11:36] sevenseacat: has joined #RubyOnRails
[07:15:03] blackmesa: has joined #RubyOnRails
[07:21:48] baweaver: has joined #RubyOnRails
[07:23:37] rubyonrailed: has joined #RubyOnRails
[07:29:07] trosborn: has joined #RubyOnRails
[07:33:29] smoitra: has joined #RubyOnRails
[07:36:52] Limix: has joined #RubyOnRails
[07:40:24] tvw: has joined #RubyOnRails
[07:45:33] sp1rs1: has joined #RubyOnRails
[07:46:21] iamaflex: has joined #RubyOnRails
[07:49:10] djbkd: has joined #RubyOnRails
[07:58:48] pawnbox: has joined #RubyOnRails
[08:01:19] polyidus: has joined #RubyOnRails
[08:03:08] trosborn: has joined #RubyOnRails
[08:04:53] pawnbox: has joined #RubyOnRails
[08:06:21] Rodya_: has joined #RubyOnRails
[08:10:02] Macaveli: has joined #RubyOnRails
[08:11:34] darutoko: has joined #RubyOnRails
[08:12:42] bachmann: has joined #RubyOnRails
[08:13:48] lxsameer: has joined #RubyOnRails
[08:14:03] krz: has joined #RubyOnRails
[08:16:28] ayoros: has joined #RubyOnRails
[08:17:07] ace05: has joined #RubyOnRails
[08:17:56] DmitryBochkarev: has joined #RubyOnRails
[08:17:57] pawnbox: has joined #RubyOnRails
[08:18:04] blackmesa: has joined #RubyOnRails
[08:18:42] benlieb: has joined #RubyOnRails
[08:18:57] moeabdol: has joined #RubyOnRails
[08:18:59] snowy: has joined #RubyOnRails
[08:20:15] czerasz: has joined #RubyOnRails
[08:20:18] siaW: has joined #RubyOnRails
[08:22:16] kitsuneyo: has joined #RubyOnRails
[08:22:49] baweaver: has joined #RubyOnRails
[08:23:14] pawnbox: has joined #RubyOnRails
[08:23:46] srinidhi: has joined #RubyOnRails
[08:24:57] neanderslob: has joined #RubyOnRails
[08:26:50] wethu: has joined #RubyOnRails
[08:28:05] hnanon: has joined #RubyOnRails
[08:31:12] neanderslob: has joined #RubyOnRails
[08:32:02] lessless: has joined #RubyOnRails
[08:32:50] armyriad: has joined #RubyOnRails
[08:34:44] neanderslob: has joined #RubyOnRails
[08:42:44] antgel: has joined #RubyOnRails
[08:49:24] sammcd: has joined #RubyOnRails
[08:49:31] sandstrom: has joined #RubyOnRails
[08:51:31] neanderslob_: has joined #RubyOnRails
[08:51:33] shanemcd: has joined #RubyOnRails
[08:52:02] jstransky: has joined #RubyOnRails
[08:54:58] neanderslob: has joined #RubyOnRails
[09:03:57] Cervajz: has joined #RubyOnRails
[09:06:07] youch: has joined #RubyOnRails
[09:06:35] Cervajz__: has joined #RubyOnRails
[09:07:08] co3: has joined #RubyOnRails
[09:07:18] Rodya_: has joined #RubyOnRails
[09:17:57] ace05: has joined #RubyOnRails
[09:18:14] arup_r: has joined #RubyOnRails
[09:19:06] yxejamir: has joined #RubyOnRails
[09:19:32] wethu: has joined #RubyOnRails
[09:21:05] blackmesa: has joined #RubyOnRails
[09:21:22] ace05: has joined #RubyOnRails
[09:21:29] sevenseacat: has joined #RubyOnRails
[09:26:50] Pazician: has joined #RubyOnRails
[09:30:09] rikkipitt: has joined #RubyOnRails
[09:32:46] wethu: has joined #RubyOnRails
[09:32:58] sameerynho: has joined #RubyOnRails
[09:36:02] chagel: has joined #RubyOnRails
[09:37:31] pawnbox: has joined #RubyOnRails
[09:38:59] jeanlinux: has joined #RubyOnRails
[09:39:59] edwinvdgraaf: has joined #RubyOnRails
[09:40:12] nerium: has joined #RubyOnRails
[09:40:18] sandstrom: has joined #RubyOnRails
[09:40:24] blackhuey: has joined #RubyOnRails
[09:41:10] leeky: has joined #RubyOnRails
[09:41:50] ace05: has joined #RubyOnRails
[09:42:12] srinidhi1: has joined #RubyOnRails
[09:45:17] emachnic: has joined #RubyOnRails
[09:50:27] trosborn: has joined #RubyOnRails
[09:54:08] FernandoBasso: has joined #RubyOnRails
[09:57:44] mdw: has joined #RubyOnRails
[09:59:47] intrigueD: has joined #RubyOnRails
[10:03:23] swarm_lurker: has joined #RubyOnRails
[10:04:25] Cervajz: has joined #RubyOnRails
[10:05:06] rubyonrailed: has joined #RubyOnRails
[10:08:15] Rodya_: has joined #RubyOnRails
[10:17:14] FooMunki: has joined #RubyOnRails
[10:17:58] arup_r: has joined #RubyOnRails
[10:18:01] marr: has joined #RubyOnRails
[10:21:36] RegulationD: has joined #RubyOnRails
[10:22:56] mdw: has joined #RubyOnRails
[10:24:31] shibly: has joined #RubyOnRails
[10:24:35] shibly: has left #RubyOnRails: ()
[10:38:09] bachmann: has joined #RubyOnRails
[10:39:06] lepetitbastard: has joined #RubyOnRails
[10:39:43] shanemcd: has joined #RubyOnRails
[10:40:46] lepetitbastard: has joined #RubyOnRails
[10:40:58] lxsameer: has joined #RubyOnRails
[10:41:35] sp1rs: has joined #RubyOnRails
[10:42:12] peterppp: has joined #RubyOnRails
[10:42:37] lepetitbastard: Morning guys. I have <%= @appointment.slots.map(&:id).sort.join(", ") %> in my view which gives me an array of ids. How would I do to get the same but within appointments controller? thanks in advance
[10:43:29] trosborn: has joined #RubyOnRails
[10:43:37] sevenseacat: thats not exactly an answerable question, but then again, it was directed at guys, maybe it makes sense to them :D
[10:45:15] lepetitbastard: @sevenseacat lol
[10:45:53] lepetitbastard: sevenseacat maybe you could give me a hand?
[10:45:54] edwinvdgraaf: has joined #RubyOnRails
[10:46:08] apeiros: lepetitbastard: that actually gives you a coma-separated string with the ids, not an array. what stops you from using the code within <%=/%> in the controller?
[10:46:36] edwinvdgraaf: has joined #RubyOnRails
[10:46:36] iuuso: has joined #RubyOnRails
[10:47:57] Devalo: has joined #RubyOnRails
[10:49:16] lepetitbastard: aspeiros I need to get the ids so I can place them in here: @slots = Slot.where.not(id: [get_the_ids_in_here])
[10:49:35] lepetitbastard: apeiros I need to get the ids so I can place them in here: @slots = Slot.where.not(id: [get_the_ids_in_here])
[10:49:46] apeiros: lepetitbastard: pro-tip: use tab completion for nicks.
[10:49:51] lxsameer: hey folks, is there any load path or something for assets ?
[10:50:33] apeiros: lepetitbastard: didn't really answer my question, though.
[10:51:30] lepetitbastard: apeiros sorry... never did that so not really sure how i would get the loop
[10:51:51] apeiros: lepetitbastard: what loop?
[10:53:18] jenrzzz: has joined #RubyOnRails
[10:55:39] lepetitbastard: apeiros like this @slots = Slot.where.not(id: <%=/ @appointment.slots.map(&:id).sort.join(", ") %>) ?
[10:56:02] apeiros: lepetitbastard: you do realize that the <%=/%> part of this is for *erb only*, yes? it's *not* ruby code.
[10:56:26] apeiros: it's part of the templating language, instructing it to embed the result of the code it contains into the template at that place.
[10:56:33] arup_r: why are using erb code like that way ?
[10:57:18] apeiros: lepetitbastard: other than that - getting closer.
[10:57:39] dionysus69: has joined #RubyOnRails
[10:58:58] lepetitbastard: lol retarded... need coffee...
[10:59:26] apeiros: I guess I'll get myself some caffein too.
[10:59:47] apeiros: tell me when you get to the point where you have no syntax error anymore for using erb syntax in ruby code
[11:00:39] rikkipitt: has joined #RubyOnRails
[11:01:54] iuuso: has joined #RubyOnRails
[11:03:14] swarm_lurker: has joined #RubyOnRails
[11:04:03] arup_r: does coffee really help? I tried, but that trick didn't help to me.. I sleep, that's why.
[11:05:47] lepetitbastard: apeiros I am here @appointments.each do |appointment|
[11:05:47] lepetitbastard: @get_slots = appointment.slots.map(&:id).sort.join(", ")
[11:05:48] lepetitbastard: @slots = Slot.where.not(id: @get_slots=[])
[11:05:54] rubyonrailed: has joined #RubyOnRails
[11:06:48] krz: has joined #RubyOnRails
[11:07:15] apeiros: lepetitbastard: tell me, what does `@get_slots=[]` do?
[11:07:17] sevenseacat: coffee is glorious.
[11:08:11] chagel: has joined #RubyOnRails
[11:08:35] Tempesta: has joined #RubyOnRails
[11:08:46] lepetitbastard: aspeiros I need to get the slot ids that belong to that appointment
[11:09:00] apeiros: I guess you still haven't found that tab key, have you?
[11:09:06] apeiros: I'm not aspeiros.
[11:09:27] lepetitbastard: sorry... this is my 2/3 on irc
[11:10:09] apeiros: I don't see what `@get_slots=[]` does in your answer.
[11:10:21] godzillaenlacasa: has joined #RubyOnRails
[11:10:22] Rodya_: has joined #RubyOnRails
[11:10:39] lepetitbastard: @appointments.each do |appointment|
[11:10:39] lepetitbastard: @get_ids = appointment.slots.map(&:id).sort.join(", ")
[11:10:53] lepetitbastard: @slots = Slot.where.not(id: @get_ids=[])
[11:11:07] lepetitbastard: apeiros: thats what I am trying to do
[11:11:24] apeiros: yeah, look, if you want me to help you, please answer the questions I ask.
[11:11:59] lepetitbastard: apeiros: I need to get the result from that loop
[11:12:05] apeiros: I do have a reason to ask them. and your understanding of ruby is obviously still lacking in some areas, so helping you before you filled those gaps is pointless.
[11:12:06] ace05: has joined #RubyOnRails
[11:12:53] Guest34101: has joined #RubyOnRails
[11:13:01] apeiros: I'll continue once you actually answered the question.
[11:13:10] lepetitbastard: apeiros: sorry... I have been up all night, haven't slept and really need help on this one. desperate
[11:13:26] apeiros: well, maybe the best course of action would be to get some sleep.
[11:13:43] sevenseacat: i definitely suggest sleep.
[11:14:32] apeiros: in case this hasn't been clear: I'm not going to *solve* it for you. all I do is *help* you so you can solve it yourself. but that requires you to understand what the heck you're doing.
[11:14:35] lepetitbastard: apeiros: you see the loop? That gives you a loop, right? so... I want all of the records @slots = Slot.where.not(id: @get_ids=[])
[11:14:53] apeiros: lepetitbastard: that's unrelated to my question.
[11:15:10] apeiros: told you I'll not continue before you told me what `@get_ids=[]` does.
[11:15:12] lepetitbastard: ohh dear... lost in translation
[11:15:47] lepetitbastard: apparently not what I want... I want all slot ids that belong to appointment in there
[11:16:31] lepetitbastard: apeiros: does that answer?
[11:16:53] apeiros: I did not ask you for what you want. I know that already.
[11:17:28] apeiros: forget about your code. forget about what you want to do. when you see `@foo=[]` in ruby code - what. does. that. do?
[11:17:37] lepetitbastard: apeiros: sorry... i do not know the answer. can you please help me?
[11:17:38] Aherin: does it in your code?
[11:18:16] lepetitbastard: it gives me an empty array full of air lol
[11:18:31] apeiros: [] alone gives you an empty array already.
[11:18:42] apeiros: so what's the `@foo =` part about?
[11:19:28] lepetitbastard: nonsense. I just tried it out... to be fair with you
[11:20:11] apeiros: *sob*, ok. seems you're beyond even being capable to be taught basics such as variable assignment.
[11:20:37] blackmesa: has joined #RubyOnRails
[11:20:52] lepetitbastard: apeiros: is it possible that you could help me out?
[11:21:15] apeiros: not with the level of knowledge you have. learn ruby first please.
[11:21:30] lepetitbastard: apeiros: not cool
[11:21:34] lepetitbastard: really not cool
[11:22:01] lepetitbastard: also try to consider the fact that I am not an english speaker
[11:22:25] lepetitbastard: and the fact that I am a bit lost in translation
[11:22:27] helpa: http://i.imgur.com/m9m3wr9.gif
[11:22:33] lepetitbastard: anyway... thanks
[11:22:51] apeiros: that's not the source of the problem. I'm not a native speaker either. your english is easily good enough.
[11:23:10] lepetitbastard: I am really tired
[11:23:18] sevenseacat: go get some sleep.
[11:23:19] apeiros: that might be part of the problem. get some sleep.
[11:23:25] lepetitbastard: sorry... but its frustrating
[11:23:30] lepetitbastard: i need this done before noon
[11:23:37] lepetitbastard: really do... deadline
[11:24:00] jhass: what happens if not?
[11:24:00] quazimodo: has joined #RubyOnRails
[11:24:03] apeiros: yeah, that may sound harsh but: not my problem. I only help, I don't solve. for solving stuff, I take money.
[11:24:15] apeiros: maybe somebody else will.
[11:24:48] lepetitbastard: great I hope u have a lot of money
[11:25:09] Devalo: has joined #RubyOnRails
[11:25:18] apeiros: IMO helping is more valuable than solving. but it costs time on your part. which you apparently lack.
[11:26:33] lepetitbastard: apeiros: true. you are right. For that I really do thank u
[11:26:50] lepetitbastard: apeiros: I actually mean it. Have a great day ;)
[11:26:59] apeiros: you too. I hope you can solve your problem in time.
[11:27:49] Pazician: has joined #RubyOnRails
[11:28:16] lepetitbastard: not gonna happen... going to sleep. zzZZZzzZZzZZZzZZZzzzzZZZZ
[11:29:25] hackeron_: has joined #RubyOnRails
[11:32:32] nerium: has joined #RubyOnRails
[11:36:14] uglybandersnatch: has joined #RubyOnRails
[11:36:20] nerium: has joined #RubyOnRails
[11:36:55] co3: has joined #RubyOnRails
[11:38:57] cajone: has left #RubyOnRails: ()
[11:40:52] jeanlinux: has joined #RubyOnRails
[11:41:01] shanemcd: has joined #RubyOnRails
[11:47:15] roshanavand: has joined #RubyOnRails
[11:49:29] arup_r: yes, that helps,,
[11:53:41] blackmesa: has joined #RubyOnRails
[11:54:48] thebastl: has joined #RubyOnRails
[12:00:32] smoitra: has joined #RubyOnRails
[12:00:33] edwinvdgraaf: has joined #RubyOnRails
[12:01:38] arup_r: has joined #RubyOnRails
[12:05:06] shanemcd: has joined #RubyOnRails
[12:05:14] dionysus69: has joined #RubyOnRails
[12:07:32] krz: has joined #RubyOnRails
[12:07:33] shanemcd: has joined #RubyOnRails
[12:07:55] rubyonrailed: has joined #RubyOnRails
[12:08:12] dirtibirdi: has joined #RubyOnRails
[12:09:24] shanemcd_: has joined #RubyOnRails
[12:09:25] smoitra_: has joined #RubyOnRails
[12:11:49] Rodya_: has joined #RubyOnRails
[12:14:42] lxsameer: has joined #RubyOnRails
[12:15:13] arup_r: has joined #RubyOnRails
[12:19:25] siaW: has joined #RubyOnRails
[12:20:09] jmignault: has joined #RubyOnRails
[12:24:02] AzaToth: has joined #RubyOnRails
[12:25:36] baweaver: has joined #RubyOnRails
[12:29:08] meoblast001: has joined #RubyOnRails
[12:34:47] trifling-jest: has joined #RubyOnRails
[12:35:33] trifling-jest: what's the diff between using rails and bin/rails? same with rake and bin/rake?
[12:35:45] Cervajz_: has joined #RubyOnRails
[12:36:37] srinidhi: has joined #RubyOnRails
[12:39:20] shanemcd: has joined #RubyOnRails
[12:41:26] shanemcd: has joined #RubyOnRails
[12:43:07] blackmesa: has joined #RubyOnRails
[12:43:08] jeanlinux: has joined #RubyOnRails
[12:43:30] shanemcd_: has joined #RubyOnRails
[12:47:24] zarubin: has joined #RubyOnRails
[12:51:03] stannard: has joined #RubyOnRails
[12:51:32] mdw: has joined #RubyOnRails
[12:54:56] ql6wlld: has joined #RubyOnRails
[12:57:10] tkiel: has joined #RubyOnRails
[12:58:43] jhass: trifling-jest: for what you care it's a bit shorter for bundle exec rails/rake
[12:58:54] jhass: basically makes sure the right rails/rake versions for your project are used
[12:59:15] jhass: in case you're using spring, the binstubs also make sure to actually make use of it
[13:01:51] shanemcd: has joined #RubyOnRails
[13:04:45] jeanlinux: has joined #RubyOnRails
[13:07:19] Macaveli: has joined #RubyOnRails
[13:08:12] agit0: has joined #RubyOnRails
[13:08:42] rubyonrailed: has joined #RubyOnRails
[13:09:45] hangelo: has joined #RubyOnRails
[13:12:27] moeabdol: has joined #RubyOnRails
[13:13:21] Rodya_: has joined #RubyOnRails
[13:14:12] DmitryBochkarev: has joined #RubyOnRails
[13:17:33] sameerynho: has joined #RubyOnRails
[13:20:10] mdw: has joined #RubyOnRails
[13:20:39] trinaldi: has joined #RubyOnRails
[13:22:28] Graphettion: has joined #RubyOnRails
[13:30:33] trifling-jest: so how do you know when using just rake or rails is not using the correct version?
[13:31:20] krz: has joined #RubyOnRails
[13:33:24] DragonPunch: has joined #RubyOnRails
[13:34:42] jhass: it'll refuse to work
[13:36:23] bl0m1: has joined #RubyOnRails
[13:37:06] mfoo: has joined #RubyOnRails
[13:40:41] Scripore: has joined #RubyOnRails
[13:43:08] akshat: has joined #RubyOnRails
[13:43:35] Hunter: has joined #RubyOnRails
[13:47:08] trifling-jest: so if using rake or rails works, then there is no need to be type bin/rails or bin/rake again anymore?
[13:48:26] Cervajz: has joined #RubyOnRails
[13:49:52] Guest2908: has joined #RubyOnRails
[13:59:59] nerium: has joined #RubyOnRails
[14:00:15] blackmesa: has joined #RubyOnRails
[14:00:22] bachmann: has joined #RubyOnRails
[14:01:56] chridal: What are you guys using for e-mail validation?
[14:02:09] chridal: I was thinking about using something like this Regex: /.+@.+\..+/
[14:02:25] sevenseacat: i dont know what guys use, but i dont validate email addresses
[14:02:42] chridal: `guys` is not gender specific :-)
[14:02:55] chridal: it means 'people'. Doesn't it?
[14:03:02] chridal: Oh. I'm not a native speaker
[14:03:15] sevenseacat: well now you know :)
[14:03:16] chridal: Thanks for pointing that out.
[14:03:44] chridal: It sort of seems a bit crazy not validating them at all though..
[14:03:53] chridal: Maybe I could go with /.+@.+/
[14:04:07] chridal: just want to make sure that there is actually an @ in it if it's a typo or something
[14:04:17] IrishGringo: has joined #RubyOnRails
[14:04:18] sevenseacat: if you want to validate them, send a confirmation email to them
[14:04:38] chridal: Yea, already doing that. But that's confirming them, not validating them
[14:04:48] chridal: The registration process is already over once that's done
[14:04:52] sevenseacat: why care about the format if you know that its theirs?
[14:04:53] antgel: has joined #RubyOnRails
[14:04:54] chridal: and they may have made a mistake without knowing it
[14:05:05] chridal: Since they might make a mistake while typing it into the form
[14:05:37] chridal: if I make sure there's an @ there they can't think it's a username or something
[14:05:55] Ropeney: chridal, "confirm your email address" reduces that
[14:06:08] chridal: yea, but they can log in right after
[14:06:12] apeiros: is there a canonical way in rails' i18n to translate ordinals? i.e. 1 -> "1st", 2 -> "2nd", 3 -> "3rd" etc.?
[14:06:17] chridal: It's a social network, so we really need people to be able to access it right away
[14:06:22] chridal: Hard making people stick around
[14:06:26] sevenseacat: i think you should give your users some credit
[14:06:36] chridal: people make mistakes
[14:06:55] chridal: Just afraid that /.+@.+/ can fail in some scenarios too
[14:07:10] chridal: that's sort of like not validating that passwords are more than one character and then saying we should trust the user
[14:07:36] sevenseacat: i didnt say trust them, thats why we confirm they own the addresses they enter
[14:07:47] chridal: yea, I meant give them credit.
[14:08:04] Ropeney: chridal, "/^(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z0-9]+\.+)|([A-Za-z0-9]+\++))*[A-Z‌​a-z0-9]+@((\w+\-+)|(\w+\.))*\w{1,63}\.[a-zA-Z]{2,6}$/i" might be worth a try
[14:08:17] sevenseacat: there are systems out there that will actually allow blank passwords.
[14:08:20] sevenseacat: ropeney: thats terrible.
[14:08:25] chridal: ropeney: Thing is that if you want a regex that works 99,999% of the time you're going to have one with about 20-30 lines
[14:08:35] apeiros: ropeney: that blocks all idn emails
[14:08:49] Ropeney: "worth a try"
[14:08:52] chridal: but I don't want to validate the format of the e-mail
[14:08:54] sevenseacat: no, not worth a try
[14:08:54] Ropeney: "might be"
[14:09:03] apeiros: IMO worse than not trying to validate
[14:09:03] sevenseacat: so why say it at all
[14:09:08] chridal: I just want to make sure there's an `@` in there since I think it might reduce some pain
[14:09:25] Ropeney: because he is not happy with /.+@.+/ so options are a person's best friend.
[14:09:26] rubyonrailed: has joined #RubyOnRails
[14:09:27] chridal: Yea, I guess I'll do it that way.
[14:09:31] apeiros: if you validate email addresses, then better err on the side of allowing invalid ones rather than disallowing valid ones.
[14:09:49] apeiros: depends on the specific case of course. but most often ^
[14:10:05] sevenseacat: its very easy to have an email address that nearly every single validator will reject - like those with ampersands, or apostrophes
[14:10:06] chridal: apeiros: Indeed. But can there be a scenario where /.+@.+/ will fail?
[14:10:33] apeiros: chridal: you mean false positive? yes, since "foo" is a valid email address. but likely one you don't want to allow anyway. so practically: no.
[14:11:00] chridal: Well I basically just want none to fail ever as long as it has a @ in it
[14:11:08] chridal: to never fail **
[14:11:10] apeiros: ACTION should have started with the practically and then moved on to the pedantry :D
[14:11:43] sevenseacat: then don't use .+
[14:12:05] sevenseacat: because that requires chars before/after the @
[14:12:27] Ropeney: http://stackoverflow.com/questions/703060/valid-email-address-regular-expression/703068#703068 I'd like to give this one a go though :P
[14:12:28] chridal: yea, maybe actually just making sure there's an `@` is enough
[14:12:28] apeiros: chridal: while I do have a full email validation at work, "simpler" validation is to split @, perform a lookup for A, AAAA, C and MX entries on the domain, and do a length validation of the address.
[14:13:18] chridal: apeiros: Tbh I don't want to actually confirm the validity of the e-mail address I just want fewer support calls because someone pressed register too early
[14:13:30] apeiros: chridal: I understand
[14:13:35] apeiros: similar in my case
[14:13:53] sevenseacat: *loooong discussion on how to do X* 'well I don't actually want to do X'
[14:13:55] apeiros: we can't send confirmation emails since it's not the owner of the email entering it
[14:14:07] sevenseacat: apeiros: they *are* sending confirmation emails
[14:14:09] Rodya_: has joined #RubyOnRails
[14:14:14] chridal: sevenseacat: if that's what you read from the sentence then you're missing the point
[14:14:27] sevenseacat: am I, really?
[14:14:31] apeiros: sevenseacat: sure. but even then, you want to reduce the number of times that fails.
[14:14:36] chridal: And also, I'm not really up for a discussion about WHY I want to do it
[14:14:41] chridal: My question is extremely simple
[14:14:46] sevenseacat: good-o, enjoy the conversation then
[14:14:50] apeiros: check the rationale of the checkmail.js people
[14:14:54] chridal: How can I make sure that there is some text `@` some text, and NEVER fail on it.
[14:15:03] chridal: That's it.
[14:15:17] apeiros: they cite a lower drop in subscription rates (relative to people who actually filled the form)
[14:15:19] sevenseacat: validate it. next!
[14:15:51] chridal: Yes, and the question is about the regex
[14:15:54] chridal: Whether it can fail
[14:15:57] sevenseacat: you dont need a regex.
[14:16:05] chridal: What do I need?
[14:16:11] sevenseacat: a simple string inclusion
[14:16:13] chridal: just split on @?
[14:16:19] sevenseacat: because thats literaly what you're doing
[14:16:24] apeiros: sorry, mailcheck, not checkmail
[14:16:29] daemonwrangler: has joined #RubyOnRails
[14:16:31] srinidhi: has joined #RubyOnRails
[14:16:34] apeiros: chridal: https://github.com/mailcheck/mailcheck might be of interest
[14:16:40] chridal: What's a string inclusion?
[14:16:52] sevenseacat: ACTION leaves before I start kicking people
[14:16:58] chridal: I'm sorry that I don't know the words you are using.
[14:17:04] chridal: Extremely polite etc.
[14:17:07] apeiros: "string".include?("@")
[14:17:39] chridal: That's basically /@+/
[14:17:42] chridal: But cheers.
[14:18:02] apeiros: validates inclusion_of:
[14:18:19] shanemcd: has joined #RubyOnRails
[14:18:31] apeiros: err, I keep getting the new form wrong. validates inclusion: {of:
[14:18:56] chridal: I'll go with /.+@.+/ I guess. Thanks!
[14:19:10] apeiros: might still be wrong. not writing validations all that often :)
[14:19:24] thecyclone: has joined #RubyOnRails
[14:19:37] djellemah: has joined #RubyOnRails
[14:21:27] djellemah_: has joined #RubyOnRails
[14:23:10] RegulationD: has joined #RubyOnRails
[14:26:19] baweaver: has joined #RubyOnRails
[14:28:22] sudoubuntu: has joined #RubyOnRails
[14:29:03] Rodya_: has joined #RubyOnRails
[14:31:25] jeanlinux: has joined #RubyOnRails
[14:31:57] blackmesa: has joined #RubyOnRails
[14:33:20] shanemcd_: has joined #RubyOnRails
[14:36:45] shanemcd: has joined #RubyOnRails
[14:38:32] roshanavand: has joined #RubyOnRails
[14:39:46] eljimmy: has joined #RubyOnRails
[14:39:55] statelesscode: has joined #RubyOnRails
[14:44:20] pawnbox: has joined #RubyOnRails
[14:46:13] Guest2908: has joined #RubyOnRails
[14:46:26] peterppp: has joined #RubyOnRails
[14:47:42] maxz: has joined #RubyOnRails
[14:52:14] Kendos-Kenlen: has joined #RubyOnRails
[14:53:17] Kendos-Kenlen: I've a little problem with my notice system. In my controler, I do a redirection and pass a notice. On the new page, the notice is well present in the URL of the page (0.0.0.0:3000/mypage?notice=toto) but I can't use it in my code.
[14:54:01] Kendos-Kenlen: Something like <% unless notice.nil? %><%= notice %><% end %> never show any notice.
[14:54:03] pawnbox: has joined #RubyOnRails
[14:54:43] The_Phoenix: has joined #RubyOnRails
[14:55:36] rubyonrailed: has joined #RubyOnRails
[14:57:29] voidDotClass: has joined #RubyOnRails
[14:58:08] voidDotClass: I have a table Foo. Problem is, records in foo can be marked as duplicates of other records. So I need a duplicate_of column in foo table, which is the id of the other foo that its a dup of
[14:58:31] voidDotClass: 1) How can I map that, i'm guessing a has_many? 2) How can I add a 'references' db migration for this column?
[14:59:55] worknick: has joined #RubyOnRails
[15:01:00] worknick: i want to do this validates_presence_of :actimg, :unless => lambda {self.wall_id.present?} but it fails because, in my controller if wall_id is empty i am setting it manually to some other param. how can now trigger this validaiton before i set wall_id manually in my controller?
[15:02:07] SeanLazer: has joined #RubyOnRails
[15:02:11] Kendos-Kenlen: voidDotClass: I guess you can create an has_many relation with the table itself. Your reference will just point on yourself I guess
[15:02:30] voidDotClass: Kendos-Kenlen, like this? has_many :duplicates, :through => :duplicate_id, class_name: 'Foo'
[15:04:39] worknick: or, can i validate one param depending upon page location?
[15:04:41] voidDotClass: ActiveRecord::HasManyThroughAssociationNotFoundError: Could not find the association :duplicate_of in model Foo
[15:04:56] voidDotClass: doing: has_many :duplicates, :through => :duplicate_of, class_name: 'Foo'
[15:05:01] Kendos-Kenlen: voidDotClass: http://stackoverflow.com/questions/18791874/rails-model-has-many-of-itself
[15:05:37] Kendos-Kenlen: you just don't put the "parent" if you don't need it
[15:07:08] stannard: has joined #RubyOnRails
[15:07:32] roshanavand: has joined #RubyOnRails
[15:07:32] delgiudices: has joined #RubyOnRails
[15:07:37] delgiudices: Is it a good practice to override initializers?
[15:08:18] tbuehlmann: delgiudices, do you have an example of what exactly you mean?
[15:08:56] delgiudices: tbuehlmann yes, i want to create an Order from a Cart and a ShippingAddress
[15:09:10] delgiudices: so i wanted to do Order.new(cart: @cart, shipping_address: @shipping_address)
[15:09:42] delgiudices: But then i got an error and read online that i should not be overriding the initializer
[15:10:02] tbuehlmann: I don't see how that overrides an initializer. that looks totally fine
[15:10:44] delgiudices: tbuehlmann because the Order doesn't have either a cart or a shipping address
[15:11:06] delgiudices: so i wanted to set the order values based on those 2 records in the initializer
[15:11:48] tbuehlmann: what about having a custom class method for this, as a first step?
[15:12:19] delgiudices: a class method that returns an initialized object with the values? tbuehlmann ?
[15:12:46] delgiudices: Well makes sense, i just thought it made sense to override the initializer
[15:12:51] tbuehlmann: it depends a bit on what the method is doing right now
[15:13:04] delgiudices: Basically create an order from the information on the cart
[15:13:07] delgiudices: and the shipping address
[15:13:07] tbuehlmann: but yea, the method returns an instance of Order
[15:13:17] delgiudices: I'll do that thanks
[15:13:24] tbuehlmann: example: Order.from(cart: cart, shipping_address: shipping_address)
[15:13:44] tbuehlmann: maybe that's even beyond the scope of Order and should be a service object that takes a cart and an address and build an Order
[15:13:52] tbuehlmann: but having a dedicated method is a good first step
[15:14:17] adavia: has joined #RubyOnRails
[15:15:29] delgiudices: Why do you think there should be a service object instead of just a class method?
[15:16:11] tbuehlmann: is it the responsibility of Order to take a cart and an address and build an instance out of that?
[15:16:39] qejk: has joined #RubyOnRails
[15:17:29] delgiudices: Well it isn't
[15:17:48] delgiudices: So should i create a class that takes care of receiving the cart and shipping addresss to build an order?
[15:18:03] tbuehlmann: it depends on the complexity of the method. if that's a 20 line initialization method, I probably wouldn't have it in Order
[15:18:13] tbuehlmann: if it's really trivial, I wouldn't care too much
[15:18:15] Or1on: has joined #RubyOnRails
[15:18:43] delgiudices: Currently has 11 lines
[15:19:08] delgiudices: So how about for placing the order ( processing the payment )
[15:19:14] delgiudices: A separate class for that aswell ?
[15:19:40] tbuehlmann: sounds good to me
[15:20:10] tbuehlmann: you could even have a shortcut method to do so, like Order#process that simply creates a service object and runs a method on it
[15:20:14] tbuehlmann: not needed, but maybe handy
[15:20:33] Kendos-Kenlen_: has joined #RubyOnRails
[15:20:48] delgiudices: And where do you declare service objects in rails structure?
[15:21:27] _bogus_: has joined #RubyOnRails
[15:23:03] tbuehlmann: I place them in app/services
[15:23:24] rubyonrailed: has joined #RubyOnRails
[15:23:37] _bogus_: hey there! can i have some advise on a good CMS engine for my app? I just need an admin system where the admin can edit some portions of existing views (which I'll define yet), a CRUD would also be handy (although not very necessary). Im using Rails 4, Bootstrap 3 and Devise (for another role).
[15:23:52] delgiudices: tbuehlmann alright, thanks for the answers they were really helpful
[15:24:28] _bogus_: I came across some options but some seems not to be updated for years, others lacks support/documentation, and others seems to be too much for what I need and has another problems...
[15:24:57] _bogus_: still didn't test any for real tho
[15:29:04] stardiviner: has joined #RubyOnRails
[15:29:21] Pazician: has joined #RubyOnRails
[15:29:46] DragonPunch: has joined #RubyOnRails
[15:33:55] Surt_Q: has joined #RubyOnRails
[15:35:39] pawnbox: has joined #RubyOnRails
[15:36:30] worknick: can i validate one param depending upon page location?
[15:37:31] blackmesa: has joined #RubyOnRails
[15:38:07] uglybandersnatch: has joined #RubyOnRails
[15:38:11] _bogus_: worknick: you can create functions in your model to validate depending on them or create custom validations contexts
[15:39:20] rhalff: has joined #RubyOnRails
[15:39:47] smathy: has joined #RubyOnRails
[15:40:30] Limix: has joined #RubyOnRails
[15:40:32] Guest2908: has joined #RubyOnRails
[15:41:15] worknick: _bogus_: ok
[15:41:34] sandstrom: has joined #RubyOnRails
[15:42:36] _bogus__: has joined #RubyOnRails
[15:44:35] DragonPunch: has joined #RubyOnRails
[15:47:01] mfoo: has joined #RubyOnRails
[15:50:18] mfoo: Hi, I've got an application.css inside an empty app/assets/stylesheets.css in a rails 5 app. It contains "/*\n *= require_tree .\n *=require_self\n */". My app has started failing with "couldn't digest ActiveSupport::StringInquirer". If I delete the require_tree it does not fail. I have no styles in the directory. What could be broken?
[15:53:57] sleungcy: has joined #RubyOnRails
[15:54:58] duderono_: has joined #RubyOnRails
[15:56:52] Graphettion: has joined #RubyOnRails
[15:57:21] DEA7TH: has joined #RubyOnRails
[15:57:55] mdw: has joined #RubyOnRails
[15:58:18] dandaman: has joined #RubyOnRails
[15:58:47] scope: has joined #RubyOnRails
[15:59:08] scope: hey is anyone online
[15:59:16] scope: im getting an error i never used to get
[15:59:47] dandaman: hi all, ive got this route get 'api/transportations/all', to: 'constant_data#get_all_transportations' which goes to controller constant_data.rb (class ConstantDataController); however, i have no constant_data model, im just using this controller to house all of my stuff that will be used to fill in form field options… do i need to set up this controller somewhere to make it work?
[15:59:48] scope: when i use rails g controller blah blah i get error /Users/home/.rvm/gems/ruby-2.2.2/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'sass-rails'. (Bundler::GemRequireError) from /Users/home/.rvm/gems/ruby-2.2.2/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require' from /Users/home/.rvm/gems/ruby-2.2.2/gems/bundle
[16:00:06] scope: anyone know how to fix this
[16:00:09] worknick: _bogus_: i got custom function, but current_page keyword gives error undefined method. how can i check if this request is coming from root page or not?
[16:00:20] scope: i tryd gem install pty but it doesnt exist
[16:00:58] scope: i just did a clean install of my osx and ruby on rails im using ruby 2.2.2
[16:01:03] scope: and rails 4.2.0
[16:01:19] nfk: has joined #RubyOnRails
[16:01:43] dandaman: nvm.. needed to name the file *_controller
[16:02:30] _bogus_: worknick: im not really sure but i think you should do this verification on controller and pass the value to the model
[16:02:50] Macaveli: has joined #RubyOnRails
[16:06:30] Kendos-Kenlen: has joined #RubyOnRails
[16:10:05] scope: i fixed it 'sass-rails', '5.0.1' failed to load so i simply removed the version number bundle install --without production followed by bundle update and then rails g controller blah blah
[16:10:13] worknick: _bogus_: ok
[16:10:22] scope: i wonder why it failed though anyone have any ideas
[16:11:47] delgiudices: has joined #RubyOnRails
[16:14:20] LeoDee: has joined #RubyOnRails
[16:16:15] Rodya_: has joined #RubyOnRails
[16:16:21] Scripore: has joined #RubyOnRails
[16:17:52] scope: argh im going to rip my hair out hahahaha
[16:18:00] scope: why now is it not creating any controllers
[16:18:15] scope: create app/controllers/static_pages_controller.rb route get 'static_pages/help' route get 'static_pages/home' invoke erb create app/views/static_pages create app/views/static_pages/home.html.erb create app/views/static_pages/help.html.erb invoke test_unit create test/controllers/static_pages_controller_test.rb invoke helper create app/helpers/stat
[16:18:39] scope: i get that no error messages but when i look in the file i have no files created
[16:18:44] scope: what on earth is going on
[16:20:06] arup_r: has joined #RubyOnRails
[16:22:03] B1n4r10: has joined #RubyOnRails
[16:27:19] baweaver: has joined #RubyOnRails
[16:33:30] peterppp: has joined #RubyOnRails
[16:33:48] jeanlinux: has joined #RubyOnRails
[16:36:36] roshanavand: has joined #RubyOnRails
[16:39:18] blackmesa: has joined #RubyOnRails
[16:43:05] y2mq37: has joined #RubyOnRails
[16:44:49] dmz: has joined #RubyOnRails
[16:45:16] sudoubuntu: has joined #RubyOnRails
[16:45:23] tonywok: has joined #RubyOnRails
[16:47:46] jensljungblad: has joined #RubyOnRails
[16:49:21] dandaman: has joined #RubyOnRails
[16:52:18] Jasaka: has joined #RubyOnRails
[16:52:21] redasus: has joined #RubyOnRails
[16:52:37] rubyonrails147: has joined #RubyOnRails
[16:53:24] sudoubuntu: has joined #RubyOnRails
[16:53:54] Guest34101: has joined #RubyOnRails
[16:55:23] tonywok: Trying out turbolinks 5. Has the server side partial page replacement functionality been removed? If so, how does turbolinks handle a page with multiple forms?
[16:57:29] Or1on: has joined #RubyOnRails
[16:57:40] zave: has joined #RubyOnRails
[17:01:09] Scripore: has joined #RubyOnRails
[17:02:14] zave: has joined #RubyOnRails
[17:02:46] Macaveli: has joined #RubyOnRails
[17:02:53] arup_r: has joined #RubyOnRails
[17:07:37] fedexo: has joined #RubyOnRails
[17:09:38] sudoubuntu: has joined #RubyOnRails
[17:09:53] thecyclone: has joined #RubyOnRails
[17:10:34] thecyclone: hi guys need help in fixing this error i get while running bundle install http://pastie.org/10748998
[17:12:47] maxz: has joined #RubyOnRails
[17:13:16] intrigueD: has joined #RubyOnRails
[17:13:35] srinidhi: has joined #RubyOnRails
[17:15:21] bachmann: has joined #RubyOnRails
[17:16:04] bachmann: has joined #RubyOnRails
[17:17:24] The_Phoenix: has joined #RubyOnRails
[17:17:36] dirtibirdi: has joined #RubyOnRails
[17:20:31] stannard: has joined #RubyOnRails
[17:22:07] FernandoBasso: has joined #RubyOnRails
[17:22:47] KensoDev: has joined #RubyOnRails
[17:23:08] Rodya_: has joined #RubyOnRails
[17:27:12] siaW: has joined #RubyOnRails
[17:30:26] adac: has joined #RubyOnRails
[17:33:20] arup_r: has joined #RubyOnRails
[17:35:24] jhass: the error seems heavily truncated
[17:36:01] thecyclone: jhass: meaning?
[17:36:02] lepetitbastard: has joined #RubyOnRails
[17:36:14] jhass: "... has failed", what has failed?
[17:38:09] FCser: has joined #RubyOnRails
[17:41:03] blackmesa: has joined #RubyOnRails
[17:42:37] smoitra: has joined #RubyOnRails
[17:42:51] diegoviola: has joined #RubyOnRails
[17:44:02] KnownSyntax: has joined #RubyOnRails
[17:44:05] KnownSyntax: has joined #RubyOnRails
[17:47:30] Hates_: tonywok: no. turbolinks is only for links really. the partial page replacement is still available
[17:47:54] Hates_: thecyclone: you need to give the full stacktrace
[17:48:34] benlieb: has joined #RubyOnRails
[17:49:23] tonywok: Hates_: speaking specifically about the server-side partial replacement as documented here: https://github.com/turbolinks/turbolinks-classic#partial-replacement-30
[17:50:01] Hates_: tonywok: ah sorry I mis-understood your original message
[17:50:07] tonywok: looking through the turbolinks-rails gem, that doesn’t appear to be supported. Curious what other folks are doing instead.
[17:50:13] tonywok: no worries :)
[17:50:52] josephkokenge: has joined #RubyOnRails
[17:51:09] brandthdl: has joined #RubyOnRails
[17:51:21] arup_r: tonywok: you are right, and yes it is removed. :/
[17:52:31] Hates_: that's a shame. I didn't even know this existed.
[17:53:02] delgiudices: has joined #RubyOnRails
[17:53:10] tonywok: yeah, it looks pretty slick. I’m actually new to turbolinks. Just figured I’d read both readmes to try and get a better idea of what it’s responsible for
[17:53:21] voidDotClass: has joined #RubyOnRails
[17:54:02] arup_r: don't use it.. use React and Rails.. hehehe
[17:54:39] tonywok: heh, yeah yeah :) fwiw I like react too. Just trying to keep things as simple as possible for as long as I can.
[17:55:20] bachmann: has joined #RubyOnRails
[17:58:31] tonywok: So given a remote true form, on error, who is responsible for making the partial update? It seems like turbolinks-classic had features to supprot that, but they’ve been removed in turbolinks 5. I’m going to re-read the README - it kinda feels like I’m missing something. Anywho, thanks :)
[17:59:04] dionysus69: has joined #RubyOnRails
[18:00:34] delgiudices: has joined #RubyOnRails
[18:02:15] KnownSyntax: has joined #RubyOnRails
[18:02:18] KnownSyntax: has joined #RubyOnRails
[18:03:18] mrgreenfur: has joined #RubyOnRails
[18:05:09] delgiudices: has joined #RubyOnRails
[18:06:20] Martoche: has joined #RubyOnRails
[18:07:23] jensljungblad: has joined #RubyOnRails
[18:07:46] sp1rs: has joined #RubyOnRails
[18:08:08] codepete: has joined #RubyOnRails
[18:08:58] iamaflex: has joined #RubyOnRails
[18:11:32] Macaveli: has joined #RubyOnRails
[18:11:32] adac: has joined #RubyOnRails
[18:13:16] marr: has joined #RubyOnRails
[18:16:20] f00dMonsta: has joined #RubyOnRails
[18:21:12] ayoros: has joined #RubyOnRails
[18:21:26] moeabdol1: has joined #RubyOnRails
[18:21:26] qejk: has joined #RubyOnRails
[18:21:32] shanemcd: has joined #RubyOnRails
[18:22:40] graft: has joined #RubyOnRails
[18:22:40] graft: has joined #RubyOnRails
[18:28:34] shanemcd_: has joined #RubyOnRails
[18:30:45] smathy: has joined #RubyOnRails
[18:33:14] Morris: has joined #RubyOnRails
[18:33:18] ziyadb: has joined #RubyOnRails
[18:36:06] bool_: has joined #RubyOnRails
[18:36:36] dgncn: has joined #RubyOnRails
[18:36:37] scope: has joined #RubyOnRails
[18:36:48] scope: hello is anyone online who uses heroku
[18:36:54] jeanlinux: has joined #RubyOnRails
[18:37:21] fryguy: scope: do you have a more specific question?
[18:37:44] scope: yer sorry wanted to see if anyone was on when using git push heroku i get failed to push any idea why
[18:37:52] Guest2908: has joined #RubyOnRails
[18:38:39] scope: from what i can see on the report it says ArgumentError: Missing :action key on routes definition, please check your routes.
[18:38:55] scope: but when i use rails s
[18:39:06] scope: and then check online everything works fine
[18:39:31] scope: bundle exec rake says everything is fine apart form a db error telling me to use migrate but im not using a db yet so i dont need it
[18:39:40] scope: so that error i can ignore or can i ???
[18:43:34] blackmesa: has joined #RubyOnRails
[18:43:36] scope: i checked the routes i have root static_pages#home -- get static_pages/help -- get static_pages/about -- get static_pages/contact
[18:44:17] scope: before i set root as root static_pages/home and running bundle exec rake gave me a root error so i changed it removing that error but now i have the heroku error which i didnt have beofre now
[18:44:20] rhalff: has joined #RubyOnRails
[18:48:32] emachnic: has joined #RubyOnRails
[18:56:45] delgiudices: has joined #RubyOnRails
[18:58:38] jensljungblad: has joined #RubyOnRails
[18:59:45] nogic: has joined #RubyOnRails
[19:00:04] scope: i tryed this also Rails.application.routes.draw do root 'static_pages#home' get 'static_pages/help' => 'static_pages#help' get 'static_pages/about' => 'static_pages#about' get 'static_pages/contact' => 'static_pages#contact'
[19:00:25] nogic: has joined #RubyOnRails
[19:00:33] scope: but that failed also says failed to compile app
[19:00:45] scope: but yet again bundle exec rake says everything ok hahaha
[19:01:39] sp1rs: has joined #RubyOnRails
[19:02:18] DoctorMonocular: has joined #RubyOnRails
[19:03:16] blackmesa: has joined #RubyOnRails
[19:07:52] fox_mulder_cp: scope: it fails? ook. see log
[19:08:07] fox_mulder_cp: rake != compile
[19:08:22] fox_mulder_cp: rake tasks not compile app
[19:08:40] fox_mulder_cp: rails server compile app to serve it
[19:09:21] sp1rs: has joined #RubyOnRails
[19:10:20] stannard: has joined #RubyOnRails
[19:10:25] DoctorMonocular: has joined #RubyOnRails
[19:13:20] smathy: scope, !gist the full error output from your heroku push
[19:13:20] helpa: scope: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[19:14:14] polyidus: has joined #RubyOnRails
[19:14:52] scope: https://gist.github.com/scope2229/7abc62c6ea779da5088e
[19:15:20] scope: theres the error log sorry im very new to this and still learning a lot
[19:15:50] scope: the amount of errors ive had today alone because of spring (i hate that gem by the way)
[19:15:58] smathy: scope, right, so the error is in precompiling your assets. Try that in your local: rake assets:precompile
[19:16:15] smathy: scope, if you hate spring then just remove it.
[19:16:19] scope: sorry could you explain a little bit more detail
[19:16:23] scope: i need it apparently
[19:16:33] smathy: scope, you don't.
[19:16:43] scope: i hate it mainly because if you delete a dir then recreate it crashes everything
[19:16:45] smathy: scope, also https://gist.github.com/scope2229/7abc62c6ea779da5088e#file-gistfile1-txt-L78 shows what was trying to be run when the error occurred.
[19:17:04] smathy: scope, yeah, you've gotta kill spring if you delete an app and create a new one with the same name.
[19:17:24] scope: what i can kill it hahahahaha
[19:17:29] smathy: scope, add your config/routes.rb to your gist.
[19:17:42] scope: yesterday i formatted and reinstalled os and rvm thinking i buggered my set up hahahah
[19:17:44] smathy: scope, easiest way is to use `pkill` - just install that and then: pkill -f spring
[19:17:57] smathy: scope, but if you don't want/need spring then just remove it from your Gemfile.
[19:18:08] mdw: has joined #RubyOnRails
[19:18:22] scope: let me add the config file
[19:18:31] scope: i prefer to try to fix things than remove them :p
[19:18:43] smathy: scope, yeah, the delete/new-app bug is just because a `spring server` process is still running and doesn't realize that it's a new directory (because the clever spring authors just use the textual directory name, instead of the inode or something unique).
[19:18:47] scope: if i cant fix and i pull out to much hair then i remove
[19:18:59] smathy: scope, fair enough.
[19:19:29] scope: i dont like being defeated or giving up sometimes its a bad quality (timeconsuming) other times its good
[19:19:51] smathy: scope, FWIW, I have this function https://github.com/smathy/.dotfiles/blob/master/.functions#L35-L42 for removing directories, it also kills any spring process for that directory.
[19:20:15] smathy: scope, needs pgrep installed.
[19:20:45] scope: https://gist.github.com/scope2229/569968854b60e9d1f63c
[19:21:07] scope: i thought i already installed pgrep i had a major headache yesterday trying to get the thing to work again
[19:21:14] scope: i installed postsql
[19:22:54] scope: if i understand that code correctly if $str comes back empty kill spring correct???
[19:23:21] scope: the last part i dont understand
[19:23:41] smathy: scope, no, if $str is != "", ie. NOT empty.
[19:24:06] scope: i should probably mention im very very very new to coding
[19:24:37] smathy: scope, all that's doing is being smart about which spring to kill, the process name spring uses in `ps` output is: "spring server | dirname | started ..." (or spring app ...)
[19:24:46] tonywok: has joined #RubyOnRails
[19:24:49] tonywok: has left #RubyOnRails: ()
[19:25:22] smathy: scope, so basename $1 is just getting the base name of the provided directory, so if you do: RM foo/bar/wee then basename "foo/bar/wee" will be "wee" - which is what spring uses in the procname.
[19:25:37] smathy: scope, so basically if pgrep finds that then it kills it.
[19:25:57] delgiudices: how can i redirect_to an object
[19:26:06] delgiudices: Right now it's saying undefined method 'model_url'
[19:26:19] arup_r: delgiudices: show the code
[19:27:54] scope: smathy, where would i input the code
[19:28:13] scope: inside routes ??
[19:28:39] delgiudices: arup_r https://gist.github.com/delgiudices/bbee2ecbc96c9d6b0173
[19:29:21] arup_r: ok, add the error also there.. and the routes.rb
[19:30:31] smathy: scope, my gist? No, that's a shell function, you'd put that into your ~/.bash_profile or similar.
[19:30:46] Pazician: has joined #RubyOnRails
[19:30:55] smathy: scope, nothing looks wrong with your routes btw, are you sure that's what's up on github?
[19:31:44] nogic: has joined #RubyOnRails
[19:32:14] scope: github is fine its heroku
[19:32:16] smathy: scope, also, just for fun, try putting the `root` statement last.
[19:32:35] Martoche: has joined #RubyOnRails
[19:32:42] scope: as in 'static_pages#home' root
[19:33:17] arup_r: delgiudices: my guess would be you have no show route defined for that... it is just a guess though
[19:33:43] delgiudices: correct guess my bad
[19:34:19] delgiudices: But how does the redirect_to knows that the show action of the model Order is in the OrdersController
[19:34:22] scope: hahah smathy i tried what you said bundle exec root failed hahaha
[19:34:23] smathy: scope, well heroku is getting the code from github, so if the push to github isn't working then heroku won't be getting the same code you have locally.
[19:34:30] arup_r: yeah, that is how my guess system works..
[19:34:36] scope: oh thats why then
[19:34:41] scope: i havent update github
[19:34:52] scope: or bitbucket which ever i pushed it too
[19:35:05] baweaver: has joined #RubyOnRails
[19:35:12] scope: 1 sec ill try now and er ill swap it back to the original code hahaha
[19:35:14] arup_r: scope: you forgot where you hosted the code..? lol
[19:35:15] smathy: Umm, how is `git push heroku` going to work if your code is on bitbucket?
[19:35:33] Martoche: hi everyone!
[19:35:48] scope: wait wait wait so if i use heroku must use github and not bitbucket
[19:35:52] arup_r: i mean you said, github or bitbucket.. that's I did the fun..
[19:36:02] arup_r: Martoche: o/
[19:36:49] scope: hahah arup_r: i couldnt even tell you what day it is
[19:36:54] mrgreenfur: has joined #RubyOnRails
[19:36:58] scope: although i think i could deffinately make you piss your self if i told you my job
[19:37:47] scope: head IT security analyst hahahahah
[19:38:01] smathy: scope, y'know what, ignore me. I didn't realize what/how `git push heroku` worked.
[19:38:03] arup_r: delgiudices: http://stackoverflow.com/a/10475733/2767755
[19:38:09] jeanlinux: has joined #RubyOnRails
[19:38:20] smathy: scope, it will be pushing your local code to the heroku git repository. Nothing to do with github or bitbucket.
[19:38:32] arup_r: yeah, git push heroku pushed code from local, not based on Github
[19:38:36] smathy: scope, it will only be pushing what you've committed though.
[19:38:47] smathy: ACTION is no heroku expert.
[19:38:53] Martoche: Guys, I've a little question : Imagine I have a User model, and the user has a birth_date (type : date). If I make User.new(birth_date: "foo") I will get no error and the new user will just have the birth_date set to nil. I was wondering if there was a way to get an error? (like for validations)
[19:38:54] arup_r: ACTION neither too
[19:39:12] smathy: scope, so, change my question to - is that routes.rb you showed me what's committed to your local repo?
[19:39:21] delgiudices: arup_r but how does it know that the show page for the @order is in the orderscontroller
[19:39:22] scope: before i pushed i used git commit -am "random message"
[19:39:26] arup_r: Martoche: your are cloe
[19:39:37] rafaelfranca: has joined #RubyOnRails
[19:39:37] smathy: scope, so `git status` doesn't show anything uncomitted?
[19:39:50] arup_r: delgiudices: did you click every link, on that answer
[19:39:54] scope: no everything is commited
[19:39:58] uglybandersnatch: has joined #RubyOnRails
[19:40:22] delgiudices: Thanks arup_r
[19:40:29] smathy: scope, ok, so you said that after you moved the `root` to the last line your `bundle exec root` failed - did you mean `bundle exec rake`? And if so, what was the failure?
[19:40:31] scope: could it be because of very slow internet right now i live in malaysia and the fibre optic cable under the ocean is fucked
[19:40:39] smathy: scope, no.
[19:40:51] smathy: scope, that would have failed at a different place.
[19:41:09] scope: it didnt even give me a test just instant failed
[19:41:13] arup_r: delgiudices: right on http://api.rubyonrails.org/classes/ActionController/Redirecting.html **Record - The URL will be generated by calling url_for with the options, which will reference a named URL for that record.**
[19:41:32] smathy: scope, what do you mean by that? Like you were in your editor, moved the line, and your computer crashed?
[19:41:34] scope: kaines-MacBook-Pro:sample_app home$ bundle exec rake rake aborted! SyntaxError: /Users/home/Desktop/Rails/sample_app/config/routes.rb:2: syntax error, unexpected tIDENTIFIER, expecting keyword_end
[19:41:47] arup_r: Martoche: http://guides.rubyonrails.org/active_record_validations.html
[19:41:51] scope: thats what happened with root at the end
[19:41:54] arup_r: that will help you
[19:41:55] smathy: scope, ok, so gist those routes.rb
[19:41:59] smathy: scope, oh wait.
[19:42:10] smathy: scope, when I said "end" I meant before the `end` line.
[19:42:32] scope: ah sorry my bad you mean have root as the very last line
[19:42:55] smathy: scope, no, sorry, last line of the do/end block :)
[19:43:14] scope: ah gotcha let me try now
[19:43:33] scope: ok test passed
[19:43:37] benlieb: has joined #RubyOnRails
[19:43:41] scope: now lets commit and push
[19:44:58] mwlang: has joined #RubyOnRails
[19:45:02] siaW: has joined #RubyOnRails
[19:45:14] scope: no still failed
[19:45:30] scope: again missing action in routes
[19:45:43] smathy: scope, ok, and what happens when you `bundle exec rake assets:precompile` locally?
[19:45:59] smathy: scope, I'm assuming that your StaticPagesController has a `home` method?
[19:46:32] blackmesa: has joined #RubyOnRails
[19:46:47] scope: yes def home
[19:46:56] scope: its the first method
[19:47:07] smathy: scope, ok, so the `bundle exec rake assets:precompile` ?
[19:48:28] scope: https://gist.github.com/scope2229/9a6dfb734f3d8e8cea05
[19:48:46] scope: locally everything is fine when i run rails s then localhost no problems on any page
[19:49:56] Martoche: arup_r: Thanks for the link! I'll look at this :)
[19:50:52] smathy: scope, and you're sure it's root 'static_pages#home' and not root 'static_pages/home' ?
[19:51:26] DoctorMonocular: has joined #RubyOnRails
[19:51:29] smathy: scope, paste the error from the latest attempt to deploy to heroku.
[19:52:27] wildlander: has joined #RubyOnRails
[19:52:47] scope: ive tryed both i changed it because of the error
[19:52:48] scope: https://gist.github.com/scope2229/3e487ae65b655a79b22d
[19:53:11] wildlander: has joined #RubyOnRails
[19:53:20] scope: before the => etc wasnt there but after googling the error i inputed that to try to help fix it
[19:53:34] smathy: scope, ok, so that error is still showing up on line 2 of config/routes.rb - so something isn't working with the git push heroku
[19:53:38] scope: also before it was set to static-pages/home
[19:53:41] smathy: scope, and/or you've not committed the changes.
[19:53:48] wildlander: has joined #RubyOnRails
[19:53:55] scope: ill run through my process just in case
[19:54:01] scope: git add -A
[19:54:11] scope: git commit -am "my message"
[19:54:16] scope: git push heroku
[19:54:19] smathy: scope, just use `git status` to confirm nothing is outstanding.
[19:54:37] scope: kaines-MacBook-Pro:sample_app home$ git status On branch static-pages-exercises nothing to commit, working directory clean
[19:54:48] smathy: ...and then use `git push -f heroku`
[19:54:59] scope: whats the -f do
[19:55:28] scope: ah ok thanks
[19:55:38] smathy: scope, I'm guessing that the push itself is not happening for some reason.
[19:55:52] scope: sorry if i ask everything beter to ask than just follow like a sheep will never understand then
[19:56:01] scope: i think it could be the net
[19:56:11] scope: ive been having a lot of problems because of latency
[19:56:39] scope: hahaha even -f failed
[19:56:48] smathy: Failed the same?
[19:57:08] scope: missing action in routes
[19:57:49] smathy: scope, what if you run, locally: RAILS_ENV=production bundle exec rake assets:precompile
[19:58:02] smathy: ...run bundle exec rake assets:clobber first
[19:59:16] scope: im gona clobber this laptop soon hahahah
[19:59:17] scope: I, [2016-03-06T03:58:50.799232 #35075] INFO -- : Removed /Users/home/Desktop/Rails/sample_app/public/assets
[19:59:51] smathy: Yep, then the RAILS_ENV.... line.
[20:00:25] scope: I, [2016-03-06T04:00:04.931582 #35077] INFO -- : Writing /Users/home/Desktop/Rails/sample_app/public/assets/application-121ff74c0346265bf966dbb430c3d43598905eead4b2da376ae4dc6d5855455b.js I, [2016-03-06T04:00:04.950475 #35077] INFO -- : Writing /Users/home/Desktop/Rails/sample_app/public/assets/application-121ff74c0346265bf966dbb430c3d43598905eead4b2da376ae4dc6d5855455b.js.gz I, [2016-03-06T04:00:04.955270 #35077] INFO -- : W
[20:01:01] nogic: has joined #RubyOnRails
[20:03:01] ace05: has joined #RubyOnRails
[20:03:38] scope: let me try pushing to github and bitbucket see if i get the same error
[20:05:12] slash_nick: scope: https://usatftw.files.wordpress.com/2014/10/negligibleexhaustedindochinahogdeer.gif?w=660&h=372
[20:05:28] scope: hahahahahahahah
[20:05:36] slash_nick: i hoped to find the snoopy version of that... but alas
[20:05:40] peterppp: has joined #RubyOnRails
[20:08:45] scope: rrrrrrraaaaaaaaawwwwwwgggggghhhhhhhhhhhhhhhh
[20:08:53] scope: github and bitbucket no problem
[20:08:59] scope: @#$%^&%%^$^&$%&*^%&^#$%^$%&^#
[20:09:16] scope: ok fine heroku you wanna play hard fine
[20:09:26] scope: im going to bed
[20:09:34] scope: #%$#%#$ thing
[20:09:52] scope: smathy thanks for the help bro
[20:10:08] scope: ill be back on tomorrow the mamak is closing well cleaning
[20:10:48] Cervajz: has joined #RubyOnRails
[20:11:00] scope: if i figure it out tomorrow smathy ill be sure to let you know what and how i did it
[20:11:18] scope: ive sent heroku an email too see if they can help
[20:11:38] scope: night guys
[20:12:43] roshanavand: has joined #RubyOnRails
[20:12:44] Cervajz_: has joined #RubyOnRails
[20:13:01] malcolmva: has joined #RubyOnRails
[20:13:29] smathy: scope, g'night, sorry man.
[20:15:46] zave: has joined #RubyOnRails
[20:16:46] Cervajz: has joined #RubyOnRails
[20:16:55] StaticVoid: has joined #RubyOnRails
[20:17:14] djbkd: has joined #RubyOnRails
[20:18:52] Cervajz__: has joined #RubyOnRails
[20:20:05] Cohedrin: has joined #RubyOnRails
[20:21:06] jscheel: has joined #RubyOnRails
[20:21:08] zave: has joined #RubyOnRails
[20:21:37] scope: has joined #RubyOnRails
[20:22:45] mdw: has joined #RubyOnRails
[20:22:49] delgiudices: So if i wanted to validate in a controller that an object belongs to the current_user ( object.user == current_user ) and if not raise a 404
[20:22:53] delgiudices: How should i do it?
[20:23:25] delgiudices: Please don't mind my question
[20:23:36] mfoo: has joined #RubyOnRails
[20:24:16] dirtibirdi: has joined #RubyOnRails
[20:25:50] RegulationD: has joined #RubyOnRails
[20:26:55] Jasaka: has joined #RubyOnRails
[20:27:41] roshanavand: has joined #RubyOnRails
[20:27:45] chipotle: has joined #RubyOnRails
[20:29:11] jensljungblad: has joined #RubyOnRails
[20:29:11] ace05_: has joined #RubyOnRails
[20:29:43] slash_nick: delgiudices: http://api.rubyonrails.org/classes/ActiveSupport/Rescuable/ClassMethods.html
[20:30:45] delgiudices: slash_nick that was useful thanks
[20:30:49] DoctorMonocular: has joined #RubyOnRails
[20:31:34] slash_nick: delgiudices: :)
[20:37:11] mdw: has joined #RubyOnRails
[20:37:54] mdw: has joined #RubyOnRails
[20:43:01] pawnbox: has joined #RubyOnRails
[20:43:53] moeabdol1: has joined #RubyOnRails
[20:45:55] ivanskie_: has joined #RubyOnRails
[20:47:57] BtcBen: has joined #RubyOnRails
[20:48:29] slash_nick: delgiudices: see also rescue_responses here http://guides.rubyonrails.org/configuring.html#configuring-action-dispatch
[20:48:30] ur5us: has joined #RubyOnRails
[20:49:24] ace05: has joined #RubyOnRails
[20:49:25] moises: has joined #RubyOnRails
[20:50:12] maxz: has joined #RubyOnRails
[20:50:29] mfoo: has joined #RubyOnRails
[20:53:01] camilasan: has joined #RubyOnRails
[20:53:34] Seich: has joined #RubyOnRails
[21:00:55] frankleef: has joined #RubyOnRails
[21:13:30] nfk: what should i keep in mind when starting a RoR project that will probably grow rather large?
[21:13:48] banister: has joined #RubyOnRails
[21:16:01] mices: has joined #RubyOnRails
[21:17:12] kdough: has joined #RubyOnRails
[21:18:28] Coldblackice: has joined #RubyOnRails
[21:18:45] mdw: has joined #RubyOnRails
[21:20:14] mices: i installed rvm on 2 different machines with the same linux version, one i have to type `source ~/.rvm/scripts/rvm` the other i have to type `source /usr/local/rvm/scripts/rvm`, on the latter i get the faraday error connection refused on port 9200, with the same app
[21:21:22] slash_nick: nfk: light thoughts
[21:22:17] LeoDee: has joined #RubyOnRails
[21:25:51] ayoros: has joined #RubyOnRails
[21:25:58] Z00t: has joined #RubyOnRails
[21:26:23] siaW: hello, i need some help understand radio buttons https://gist.github.com/siaw23/523ca039c01084f1558b i have read both the rails guide and api docs.
[21:26:32] siaW: https://gist.github.com/siaw23/523ca039c01084f1558b#file-radio-html-erb
[21:26:35] RegulationD: has joined #RubyOnRails
[21:26:51] siaW: but tha api docs is using radio_button(object_name, method, tag_value, options = {})
[21:27:00] siaW: 3 params
[21:27:08] siaW: and rails guides is using 2 params
[21:27:11] siaW: what’s going on?
[21:30:44] macscam1: has joined #RubyOnRails
[21:31:46] Scripore: has joined #RubyOnRails
[21:32:07] Pazician: has joined #RubyOnRails
[21:32:41] maxscam1: has joined #RubyOnRails
[21:33:10] maxscam1: how i find the docs for "config"? i.e. "config.generators"
[21:36:15] smathy: maxscam1, mostly here: http://guides.rubyonrails.org/configuring.html
[21:37:45] smathy: siaw, radio_button != radio_button_tag
[21:38:13] ur5us: has joined #RubyOnRails
[21:38:38] quazimodo: has joined #RubyOnRails
[21:38:43] siaW: smathy: really? :o
[21:38:53] Sigfrid: has joined #RubyOnRails
[21:39:00] siaW: so why isn’t radio_button in the rails guides?
[21:39:16] jeanlinux: has joined #RubyOnRails
[21:39:18] delgiudices: has joined #RubyOnRails
[21:39:59] slash_nick: http://apidock.com/rails/ActionView/Helpers/FormHelper/radio_button ... i don't think it's been removed
[21:40:30] slash_nick: http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-radio_button
[21:40:48] smathy: siaw, the guides aren't exhaustive.
[21:41:02] smathy: slash_nick, guides != API docs.
[21:42:42] slash_nick: you're right
[21:43:31] siaW: smathy: i’m beginning to hate rails :D :D
[21:45:06] smathy: siaw, misreading a method name as being the same as another will lead to misery no matter which framework or language you use.
[21:45:36] siaW: smathy: i realised that
[21:45:55] polyidus: has joined #RubyOnRails
[21:46:22] DoctorMonocular: has joined #RubyOnRails
[21:46:25] hahuang65: has joined #RubyOnRails
[21:46:39] jfelchner: has joined #RubyOnRails
[21:54:06] sleungcy: has joined #RubyOnRails
[21:54:26] Malgorath: has joined #RubyOnRails
[21:55:34] Malgorath: Hi. Is there a recommended way to get certified in ror?
[21:56:09] DmitryBochkarev: has joined #RubyOnRails
[22:01:54] dionysus69: has joined #RubyOnRails
[22:02:51] polyidus: Dont think there is an official way. Probably through 'nano degrees' that moocs like coursera provide
[22:02:54] nogic: has joined #RubyOnRails
[22:03:01] rubyonrailed: has joined #RubyOnRails
[22:03:20] mices: has joined #RubyOnRails
[22:04:15] polyidus: Massive Open Online Courses - Coursera, edX, Udacity, etc.
[22:04:35] mices: i'm trying to install rvm single user from the instructions here https://rvm.io/rvm/install but after installation if i run source ~/.rvm/scripts/rvm it says file not found, also it's not really clear in the docs how to install single user
[22:05:33] Malgorath: Ah thought you meant mooks
[22:05:37] smathy: malgorath, are you being asked by some client or employer for your certification?
[22:07:22] Malgorath: smathy: no I was self employed for 9 years and basically have no job references so the interviews I have been on asked about degrees or certs
[22:07:30] Radar: hnanon: I'm generally not around at 7:30pm on a Saturday night.
[22:07:55] Malgorath: Hey radar, how ya been?
[22:08:58] jeanlinux: has joined #RubyOnRails
[22:10:04] cac: has joined #RubyOnRails
[22:11:45] Radar: well thanks
[22:11:48] Radar: about to head out for the day
[22:12:18] Malgorath: Have a gooder then
[22:12:25] jensljungblad: has joined #RubyOnRails
[22:13:31] intrigueD: has joined #RubyOnRails
[22:16:09] swift_: has joined #RubyOnRails
[22:16:27] hangelo: has joined #RubyOnRails
[22:16:40] nogic: has joined #RubyOnRails
[22:20:42] jeanlinux: has joined #RubyOnRails
[22:31:18] Itz_Theshznt: has joined #RubyOnRails
[22:31:30] petsonrails: has joined #RubyOnRails
[22:33:02] mices: what's the curl command to install rvm single user
[22:33:08] mices: not as root or sudo'd
[22:34:05] mices: because the command i'm using is complaining that it can't create directory /usr/local/rvm permission denied
[22:35:26] waseem_: mices: You should probably be using chruby and ruby-install.
[22:36:47] DarkBushido: has joined #RubyOnRails
[22:39:44] epochwolf: has joined #RubyOnRails
[22:40:13] cschneid: has joined #RubyOnRails
[22:43:02] sneakerhax: has joined #RubyOnRails
[22:43:36] baweaver: has joined #RubyOnRails
[22:47:05] ivanskie_: has joined #RubyOnRails
[22:48:55] rafaelfranca: has joined #RubyOnRails
[22:49:28] hnanon: For something like this: validates_presence_of :body, on: :publish
[22:50:01] hnanon: ....is there a method that acts like the opposite of on: ?
[22:50:18] hnanon: So, not on :publish.
[22:52:27] jhass: I wonder if the context is queryable on the model somehow, then unless: ->(m) { m.context == :publish }
[22:55:57] ereslibre: has joined #RubyOnRails
[22:55:57] ereslibre: has joined #RubyOnRails
[22:56:45] jhass: it's #validation_context apparently
[22:56:49] njero: has joined #RubyOnRails
[22:59:15] DEA7TH: has joined #RubyOnRails
[23:00:27] jottr_: has joined #RubyOnRails
[23:00:58] jenrzzz: has joined #RubyOnRails
[23:01:08] dandaman: has joined #RubyOnRails
[23:03:01] chipotle: has joined #RubyOnRails
[23:05:24] superlou: has joined #RubyOnRails
[23:08:07] sandstrom: has joined #RubyOnRails
[23:10:13] diegoviola: has joined #RubyOnRails
[23:14:46] herminiotorres: has joined #RubyOnRails
[23:17:42] sypheren: has joined #RubyOnRails
[23:20:25] deuxclique: has joined #RubyOnRails
[23:20:40] Malgorath: has joined #RubyOnRails
[23:21:35] mrgreenfur: has joined #RubyOnRails
[23:22:27] youch: has joined #RubyOnRails
[23:23:56] dirtibirdi: has joined #RubyOnRails
[23:24:48] jeanlinux: has joined #RubyOnRails
[23:27:11] ereslibre: has joined #RubyOnRails
[23:30:27] JonasOSDever: has joined #RubyOnRails
[23:32:36] RegulationD: has joined #RubyOnRails
[23:34:45] deuxclique: has joined #RubyOnRails
[23:36:14] diegoviola: has joined #RubyOnRails
[23:41:45] uglybandersnatch: has joined #RubyOnRails
[23:43:02] jstransky: has joined #RubyOnRails
[23:47:39] jstransky_: has joined #RubyOnRails
[23:48:53] lubekpl: has joined #RubyOnRails
[23:50:44] timdotrb: has joined #RubyOnRails
[23:52:34] jenrzzz: has joined #RubyOnRails
[23:53:14] Sid05: has joined #RubyOnRails
[23:53:36] lepetitbastard: has joined #RubyOnRails