« Back to channel list

#RubyOnRails - 25 October 2015

« Back 1 day Forward 1 day »
[00:01:52] shibabu: has joined #RubyOnRails
[00:04:33] workmad3: has joined #RubyOnRails
[00:09:59] alphaatom: has joined #RubyOnRails
[00:11:54] matcouto: has joined #RubyOnRails
[00:15:14] matcouto: Is it possible to have something like that? "2".to_i.call(:years) ?? Basically, what I want to do is to build this 2.years. I've got two string fields, one with the number and other with the time(days/weeks/years).
[00:15:51] bonhoeffer: has joined #RubyOnRails
[00:16:29] wildlander: has joined #RubyOnRails
[00:16:34] rakm: has joined #RubyOnRails
[00:18:31] kitsuneyo: where to define a string method in rails that can be used anywhere?
[00:18:54] VeryBewitching: matcouto: "2".to_i.send(:years)
[00:19:10] matcouto: VeryBewitching thanks mate
[00:19:42] mary5030: has joined #RubyOnRails
[00:21:05] smathy: kitsuneyo, it's unlikely that you actually want to do that.
[00:21:07] chills42: has joined #RubyOnRails
[00:21:46] rickmasta: has joined #RubyOnRails
[00:21:49] mary5030: has joined #RubyOnRails
[00:21:49] kitsuneyo: i wanna be able to do this in a few diff places though smathy: string.slice(0,1).capitalize + string.slice(1..-1)
[00:22:06] kitsuneyo: i guess i can just do it in application_helper
[00:22:35] smathy: kitsuneyo, string.titelize
[00:27:09] Guest41758: has joined #RubyOnRails
[00:27:31] mary5030: has joined #RubyOnRails
[00:27:57] Cervajz_: has joined #RubyOnRails
[00:33:59] alphaatom: has joined #RubyOnRails
[00:34:46] hephaestus_rg: has joined #RubyOnRails
[00:39:08] htmldrum: has joined #RubyOnRails
[00:42:29] jenrzzz: has joined #RubyOnRails
[00:45:43] bruno-: has joined #RubyOnRails
[00:47:34] darrencauthon: has joined #RubyOnRails
[00:48:38] mloy: has joined #RubyOnRails
[00:49:47] RegulationD: has joined #RubyOnRails
[00:51:55] Palsson: has joined #RubyOnRails
[00:57:30] Klumben: has joined #RubyOnRails
[01:00:26] yfeldblum: has joined #RubyOnRails
[01:02:37] siddart: has joined #RubyOnRails
[01:02:59] applegrain: has joined #RubyOnRails
[01:04:22] dopamean_: has joined #RubyOnRails
[01:09:07] jamto11: has joined #RubyOnRails
[01:10:17] SteenJobs: has joined #RubyOnRails
[01:15:40] Thomas-0725: has joined #RubyOnRails
[01:16:46] assassin: has joined #RubyOnRails
[01:19:30] Maletor: has joined #RubyOnRails
[01:20:30] Thomas-0725: has joined #RubyOnRails
[01:22:16] vigintas: has joined #RubyOnRails
[01:22:38] Tref: has joined #RubyOnRails
[01:22:54] stardiviner: has joined #RubyOnRails
[01:22:59] bonhoeffer_: has joined #RubyOnRails
[01:24:19] rodfersou: has joined #RubyOnRails
[01:24:37] matcouto: has joined #RubyOnRails
[01:24:40] rickmasta: has joined #RubyOnRails
[01:25:11] baweaver: has joined #RubyOnRails
[01:28:31] Uranio: has joined #RubyOnRails
[01:29:07] Uranio: hi, where can I see something about ActionCable
[01:31:14] sankaber: has joined #RubyOnRails
[01:31:37] iamse7en: has joined #RubyOnRails
[01:33:42] kitsuneyo: has joined #RubyOnRails
[01:35:40] smathy: Uranio, https://github.com/rails/actioncable
[01:36:17] Uranio: smathy: there is not any railscast or blog post?
[01:36:39] SuMo_D: has joined #RubyOnRails
[01:37:39] qejk: has joined #RubyOnRails
[01:38:01] smathy: Well, there's definitely no railscast, hasn't been any new railscasts in a couple of years.
[01:38:14] smathy: ...someone might have blogged about it, google it.
[01:38:22] mary5030: has joined #RubyOnRails
[01:38:29] Uranio: smathy: :-( what happend to the railcasts?
[01:38:52] IFrank00: has joined #RubyOnRails
[01:38:53] Uranio: ACTION was away form internet for a very long time
[01:39:08] smathy: Uranio, the author stopped doing them.
[01:39:55] Uranio: smathy: is rails in its last life-cicle?
[01:40:13] smathy: Uranio, no.
[01:40:14] gambl0re: use gorails.com
[01:40:30] gambl0re: i guess it's almost the same.
[01:40:40] towski_: has joined #RubyOnRails
[01:41:44] Uranio: gambl0re: :D thanks
[01:42:03] Uranio: I'm a bit disconnected from the rubyonrails world
[01:42:12] gambl0re: you gotta pay though
[01:42:18] gambl0re: there are some free videos
[01:42:46] ruby-lang755: has joined #RubyOnRails
[01:42:47] gambl0re: railscasts is pretty much dead...no new videos for 2 years.
[01:43:31] bonhoeffer_: has joined #RubyOnRails
[01:48:19] ruby-lang755: has left #RubyOnRails: ()
[01:48:39] darrencauthon: has joined #RubyOnRails
[01:48:49] alphaatom: has joined #RubyOnRails
[01:50:22] edsonRor: has joined #RubyOnRails
[01:52:40] workmad3: has joined #RubyOnRails
[01:52:42] dikaio: has joined #RubyOnRails
[01:56:25] sevenseacat: has joined #RubyOnRails
[01:59:16] edsonRor: Any one could help me? I whant to list only posts from my following users, how i could do this
[01:59:26] acti0nman: has joined #RubyOnRails
[01:59:35] matcouto: has joined #RubyOnRails
[02:01:36] sarink: has joined #RubyOnRails
[02:02:18] shibabu: has joined #RubyOnRails
[02:03:42] edsonRor: I tried this way but i can't access the post direct only the colection
[02:04:14] edsonRor: @followers = current_user.following.map { |user| user.id}
[02:04:34] edsonRor: or @followers = current_user.following.map { |user| user.posts}
[02:05:14] mary5030: has joined #RubyOnRails
[02:05:48] annlewis: has joined #RubyOnRails
[02:05:50] rickmasta: has joined #RubyOnRails
[02:07:28] mary5030: has joined #RubyOnRails
[02:08:36] pontiki: has joined #RubyOnRails
[02:08:54] edsonRor: any one online?
[02:09:43] edsonRor: hi pontiki, do you could help me?
[02:11:03] bonhoeffer: has joined #RubyOnRails
[02:11:48] blackhuey: has joined #RubyOnRails
[02:12:38] blackmesa: has joined #RubyOnRails
[02:13:11] FailBit: don't ask random people for help
[02:13:20] FailBit: it's like hitchhiking
[02:13:48] jimbow: has joined #RubyOnRails
[02:13:58] jimbow: who taught blacks programming?
[02:14:15] FailBit: that's racist
[02:14:15] jimbow: do you find it fascinating that subhumans can mimic human behavior so well?
[02:14:33] FailBit: that's _actually_ racist
[02:14:38] FailBit: I was about to meme but ok
[02:14:39] jimbow: no it's not
[02:15:00] jimbow: they're biologically inferior]
[02:15:19] helpa: +q jimbow!*@*
[02:15:24] pontiki: thank you, sevenseacat
[02:15:40] FailBit: sevenseacat: who writes helpa's code?
[02:15:53] FailBit: there is a chanserv one-liner for muting someone without current op
[02:15:59] sevenseacat: FailBit: Radar maintains it but pull requests are always welcome.
[02:16:08] sevenseacat: https://github.com/radar/railsbot
[02:16:20] FailBit: in fact there is a chanserv for everything because 42
[02:19:29] alphaatom: has joined #RubyOnRails
[02:23:19] fedexo: has joined #RubyOnRails
[02:27:24] htmldrum: has joined #RubyOnRails
[02:30:59] arup_r: has joined #RubyOnRails
[02:32:13] gambl0re: is there a way to start every new rails app to use a gem by default like haml.?
[02:34:03] jamto11: has joined #RubyOnRails
[02:37:37] SteenJobs_: has joined #RubyOnRails
[02:38:19] unreal: has joined #RubyOnRails
[02:46:15] arup_r: gambl0re: you need to configure it
[02:46:19] arup_r: config.generators do |g|
[02:46:25] FailBit: no, but you can make generators emit haml
[02:46:37] arup_r: g.template_engine :haml
[02:47:24] arup_r: once you will configure it, next time Rails will produce always haml template
[02:48:13] FailBit: *sometimes
[02:48:24] bruno-: has joined #RubyOnRails
[02:48:55] FailBit: I've stumbled across some generators that seem to just cp and don't output haml
[02:49:00] gambl0re: thanks arup
[02:49:32] chopin: has joined #RubyOnRails
[02:49:43] darrencauthon: has joined #RubyOnRails
[02:50:39] RegulationD: has joined #RubyOnRails
[02:52:12] SteenJobs: has joined #RubyOnRails
[02:53:12] pen_island: has joined #RubyOnRails
[02:53:29] workmad3: has joined #RubyOnRails
[02:54:25] moeabdol: has joined #RubyOnRails
[02:55:38] rickmasta: has joined #RubyOnRails
[03:02:14] jenrzzz: has joined #RubyOnRails
[03:04:24] shibabu: has joined #RubyOnRails
[03:08:41] rshetty: has joined #RubyOnRails
[03:10:15] vigintas: has joined #RubyOnRails
[03:11:05] Tref: has joined #RubyOnRails
[03:12:20] maxx88: has joined #RubyOnRails
[03:15:51] surrealanalysis: has joined #RubyOnRails
[03:18:08] mary5030: has joined #RubyOnRails
[03:25:15] roxtrongo: has joined #RubyOnRails
[03:36:10] Meow-J: has joined #RubyOnRails
[03:39:02] dikaio: has joined #RubyOnRails
[03:43:41] yogeshrt: has joined #RubyOnRails
[03:48:40] andhof-mt: has joined #RubyOnRails
[03:49:10] bruno-: has joined #RubyOnRails
[03:49:17] andhof-mt: If I already have defined @tutorial = Tutorial.all in my controller, is there anyway to get the second tutorial? I tried @tutorial[2] but didn't work
[03:50:30] darrencauthon: has joined #RubyOnRails
[03:50:48] sarink: has joined #RubyOnRails
[03:51:48] arup_r: andhof-mt: In Ruby Array is `0` index based, so use [1] instead of [2] to get the second element
[03:53:00] andhof-mt: yeah I tried that too, found the issue tho
[03:53:11] andhof-mt: Tutorial.all returns some type of object, so I had to @tutorial.find(2)
[03:53:53] arup_r: try in your console and show us the whole story using a Gist
[03:54:57] andhof-mt: arup_r, I fixed it. Tutorial.all returns an object not a array so it wasn't working using variable_name[position] notation.
[03:55:21] arup_r: it works for me
[03:56:06] arup_r: andhof-mt: https://gist.github.com/aruprakshit/65b9e7e1b67d406c78f5
[03:56:16] s2013: has joined #RubyOnRails
[03:57:15] andhof-mt: hmm that's weird. I'll give it another shot.
[03:57:28] chipotle: has joined #RubyOnRails
[03:59:53] jenrzzz: has joined #RubyOnRails
[04:01:53] xtagon: has joined #RubyOnRails
[04:05:18] jamto11: has joined #RubyOnRails
[04:06:02] blackmesa: has joined #RubyOnRails
[04:06:38] shibabu: has joined #RubyOnRails
[04:08:15] sunya7a: has joined #RubyOnRails
[04:11:52] braincras: has joined #RubyOnRails
[04:12:22] roxtrongo: has joined #RubyOnRails
[04:12:25] BlackCoyote: has joined #RubyOnRails
[04:12:55] willardg: has joined #RubyOnRails
[04:17:23] moeabdol: has joined #RubyOnRails
[04:23:05] rickmasta: has joined #RubyOnRails
[04:25:42] pontiki: gambl0re: you can write your own application template that you use with rails new. you can completely specify which gems get installed, and a whole lot of other things. If you go the further route of craeting $HOME/.railsrc you can tell what options to always use with rails new.
[04:27:58] fedexo: has joined #RubyOnRails
[04:29:13] rhizome: has joined #RubyOnRails
[04:29:56] njero: has joined #RubyOnRails
[04:31:06] siddart: has joined #RubyOnRails
[04:38:31] jenrzzz: has joined #RubyOnRails
[04:41:29] The_Ball: has joined #RubyOnRails
[04:41:42] workmad3: has joined #RubyOnRails
[04:43:14] `based_pdev`: has joined #RubyOnRails
[04:43:35] arBmind: has joined #RubyOnRails
[04:49:24] annlewis: has joined #RubyOnRails
[04:50:19] bruno-: has joined #RubyOnRails
[04:51:18] darrencauthon: has joined #RubyOnRails
[04:51:35] RegulationD: has joined #RubyOnRails
[04:53:00] hephaestus_rg: has joined #RubyOnRails
[04:54:10] quazimodo: has joined #RubyOnRails
[04:58:33] vigintas: has joined #RubyOnRails
[04:59:05] dopie: has joined #RubyOnRails
[04:59:57] arup_r: can't I use `request` method inside view and helper? It seems no. What is the alternative which can give me access to the request method inside a helpers and views ?
[05:00:34] arup_r: I can access it inside the controller
[05:02:17] arup_r: If you call `request.path_parameters` inside the view, you wouldn't see anything. But it shows the output if you call inside the controller
[05:02:26] arup_r: I want to use it inside the view
[05:03:36] daffy_duck: has joined #RubyOnRails
[05:05:56] jamto11: has joined #RubyOnRails
[05:12:41] edsonRor: Any one could help me? I whant to list only posts from my following users, how i could do this?
[05:15:04] yogeshrt: has joined #RubyOnRails
[05:15:15] SteenJobs: has joined #RubyOnRails
[05:17:03] arup_r: nvm, I resolved it
[05:18:14] jessemcgilallen: has joined #RubyOnRails
[05:18:40] moeabdol: has joined #RubyOnRails
[05:23:02] Shidash: I need to set the id to the name of an item. I put self.primary_key = "name" in the model and this seems to work when I check from rails. But when I check postgresql directly, the id is just an integer
[05:23:19] Shidash: is there a way to set the id in postgresql to a string from rails?
[05:26:56] trosborn: has joined #RubyOnRails
[05:27:14] Coldblackice: has joined #RubyOnRails
[05:30:03] SteenJobs: has joined #RubyOnRails
[05:34:26] arup_r: Shidash: yes, from migration you need to do the change first in schema level
[05:35:49] SteenJobs: has joined #RubyOnRails
[05:36:22] Shidash: arup_r: so just set t.string :id explicitly? or something more?
[05:36:25] jamto11: has joined #RubyOnRails
[05:36:35] nya: has joined #RubyOnRails
[05:36:57] demonlove: has joined #RubyOnRails
[05:37:40] based_pdev_: has joined #RubyOnRails
[05:38:49] arBmind1: has joined #RubyOnRails
[05:39:10] sarink: has joined #RubyOnRails
[05:39:21] rhizome: if this is just for URLs, use slugs
[05:40:15] Shidash: rhizome: it's for a unique identifier that works across apps
[05:41:04] CheckYourSix: has joined #RubyOnRails
[05:41:12] rshetty: has joined #RubyOnRails
[05:43:18] arup_r: Shidash: I know how to do it while creating table using primary_key: option ( primary_key)
[05:44:00] arup_r: later to do the change using a migration, I never tried. But You can try n figure out. But my heart is saying it is possible
[05:44:21] Shidash: arup_r: doing it at creation is fine- there's no data to be preserved yet
[05:44:50] arup_r: ok, then look at the examples given in the link I mentioned
[05:45:09] arup_r: You will figure it out by yourself. If not ask again
[05:45:42] chipotle: has joined #RubyOnRails
[05:45:52] arup_r: Shidash: You need to use `id: false`
[05:46:03] Shidash: arup_r: already using id: false. Don't see a link though?
[05:46:04] arup_r: and inside the model you have to set the primary_key like
[05:46:35] arup_r: self.primary_key= you_string_column_name
[05:46:42] Shidash: arup_r: already doing that
[05:46:51] arup_r: then where you got stuck ?
[05:47:16] Shidash: arup_r: the problem is that while it looks like the ID is changed from rails, when I look at the postgres database directly, the ID is just an integer
[05:47:29] Shidash: arup_r: which means that associations don't work
[05:47:54] arup_r: Oh, you meant in assocation table ? or the parent table
[05:48:29] Shidash: arup_r: in the parent table. the associations are never created because trying to create them with the name-IDs results in errors since it can't find a matching ID in the parent table
[05:49:28] arup_r: Shidash: well, when you are out of the Rails convention, then you need to mention explicitly. I think so, but I need to try and see
[05:49:33] Shidash: arup_r: even though the rails object seems to have the ID in the correct format, for some reason postgres is still saving an integer
[05:50:04] arup_r: show in Gist, /dt table_name
[05:50:26] arup_r: and also your migration
[05:50:35] dopie: whats the name of the program that makes a local server?
[05:50:40] moeabdol: has joined #RubyOnRails
[05:50:56] annlewis: has joined #RubyOnRails
[05:51:51] Shidash: arup_r: migrations are https://github.com/TransparencyToolkit/DataLoader/blob/master/db/migrate/20151023215958_create_data_files.rb and https://github.com/TransparencyToolkit/DataLoader/blob/master/db/migrate/20151023220132_create_documents.rb
[05:52:03] darrencauthon: has joined #RubyOnRails
[05:52:49] demonlove: name of program?
[05:54:04] gambl0re: how can i get line 16 to work? i want to embed ruby inside by javascript script tags
[05:54:05] gambl0re: https://gist.github.com/rickywid/dc16add8a0ab2795de9d
[05:55:01] relix: has joined #RubyOnRails
[05:55:08] arup_r: Shidash: ok. :( show /dt documents and (datafiles)
[05:55:11] raunicolae: has joined #RubyOnRails
[05:55:28] raunicolae: has left #RubyOnRails: ()
[05:55:29] arup_r: why the hail schema.rb not showing the table Pkey ( https://github.com/TransparencyToolkit/DataLoader/blob/master/db/schema.rb)
[05:55:33] arup_r: it should show
[05:55:43] moeabdol: has joined #RubyOnRails
[05:55:48] arup_r: gambl0re: deleting the line# 16 ? :p
[05:57:12] jamto11: has joined #RubyOnRails
[05:57:17] gambl0re: i have lat/long cooordinates in my table and i need to insert them inside the javascript script tags
[05:57:21] gambl0re: how can i do it?
[05:57:25] Shidash: arup_r: hm... and document_id is an integer there, which is wrong
[05:57:50] gambl0re: center: {lat: "#{@user.latitude}", lng: "#{@user.latitude}"}, is not working
[05:58:04] arup_r: so your migration ran successfully ?
[05:58:11] Shidash: arup_r: yes
[05:58:50] arup_r: so you id: false things Rails didn't understand
[05:59:01] dopie: demonlove, ngrok :)
[05:59:05] Shidash: arup_r: yeah, apparently not
[05:59:34] arup_r: Shidash: your rails version ?
[05:59:51] Shidash: arup_r: 4.2.1
[06:03:02] baweaver: has joined #RubyOnRails
[06:03:08] dideler: has joined #RubyOnRails
[06:03:39] shibabu: has joined #RubyOnRails
[06:05:43] willardg: has joined #RubyOnRails
[06:06:32] shibabu: has joined #RubyOnRails
[06:08:07] blackmesa: has joined #RubyOnRails
[06:08:40] arup_r: Shidash: that should work, because I used that in my one old project. No idea why it didn't work for you. Here is some reasoning I see
[06:08:41] arup_r: http://stackoverflow.com/questions/1200568/using-rails-how-can-i-set-my-primary-key-to-not-be-an-integer-typed-column
[06:09:26] Shidash: arup_r: just got schema to update- think it wasn't updating on migrate for a while. still not working, but now I'm getting a new error- 'unknown attribute document_id'
[06:09:50] arup_r: yes, that means now you have what you were looking for
[06:10:16] arup_r: the error is perfect as per the migration
[06:10:18] rshetty_: has joined #RubyOnRails
[06:10:38] lxsameer: has joined #RubyOnRails
[06:10:46] arup_r: Do you have a column document_id ?
[06:11:28] Shidash: arup_r: yeah, but in the wrong table heh
[06:15:48] Shidash: arup_r: yup, this seems to work after fixing that
[06:22:30] wcalderipe: has joined #RubyOnRails
[06:24:20] wcalderipe: hi, i'm new on ror and this is the first time i need to develop something using an role based acl.. someone know good gems for that?
[06:26:32] sarink: has joined #RubyOnRails
[06:29:50] workmad3: has joined #RubyOnRails
[06:33:17] pawnbox: has joined #RubyOnRails
[06:33:59] pawnbox_: has joined #RubyOnRails
[06:34:19] wharr: has joined #RubyOnRails
[06:34:29] trosborn: has joined #RubyOnRails
[06:34:55] grambo: has joined #RubyOnRails
[06:39:36] alphaatom: has joined #RubyOnRails
[06:40:48] yogeshrt: has joined #RubyOnRails
[06:43:06] alphaatom: has joined #RubyOnRails
[06:44:44] rhizome: wcalderipe: pundit or cancancan
[06:45:44] wcalderipe: even for rest apis?
[06:45:44] boombadaroomba: has joined #RubyOnRails
[06:46:16] rhizome: i'm not sure i understand the question
[06:46:43] vigintas: has joined #RubyOnRails
[06:47:40] alphaatom: has joined #RubyOnRails
[06:51:42] annlewis: has joined #RubyOnRails
[06:51:47] bruno-: has joined #RubyOnRails
[06:52:28] RegulationD: has joined #RubyOnRails
[06:52:43] darrencauthon: has joined #RubyOnRails
[06:59:17] mmb: has joined #RubyOnRails
[06:59:41] yardenbar: has joined #RubyOnRails
[07:05:46] grambo: has joined #RubyOnRails
[07:05:56] pontiki: has joined #RubyOnRails
[07:07:45] grambo: has joined #RubyOnRails
[07:07:46] siddart: has joined #RubyOnRails
[07:09:26] grambo: has joined #RubyOnRails
[07:10:13] ajb-: has joined #RubyOnRails
[07:10:58] mmb: has joined #RubyOnRails
[07:11:01] ajb-: has joined #RubyOnRails
[07:14:33] jenrzzz: has joined #RubyOnRails
[07:17:12] fangs124: has joined #RubyOnRails
[07:17:16] fangs124: has left #RubyOnRails: ("Leaving")
[07:24:52] jamto11: has joined #RubyOnRails
[07:25:10] yardenbar: has joined #RubyOnRails
[07:28:57] imp4t: has joined #RubyOnRails
[07:31:23] cac: has joined #RubyOnRails
[07:49:30] based_pdev_: has joined #RubyOnRails
[07:52:18] chipotle: has joined #RubyOnRails
[07:52:28] annlewis: has joined #RubyOnRails
[07:53:14] bruno-: has joined #RubyOnRails
[07:53:29] darrencauthon: has joined #RubyOnRails
[07:56:18] ahegyi: has joined #RubyOnRails
[07:59:55] gingray: has joined #RubyOnRails
[08:01:24] raunicolae: has joined #RubyOnRails
[08:07:10] pontiki: has joined #RubyOnRails
[08:08:47] blackmesa: has joined #RubyOnRails
[08:10:16] reber: has joined #RubyOnRails
[08:15:15] youngbaks: has joined #RubyOnRails
[08:17:52] workmad3: has joined #RubyOnRails
[08:25:58] jamto11: has joined #RubyOnRails
[08:32:32] Palsson: has joined #RubyOnRails
[08:34:48] vigintas: has joined #RubyOnRails
[08:35:17] matcouto: has joined #RubyOnRails
[08:36:10] Radar: FailBit: Muting someone is only reserved for the ops.
[08:36:16] Radar: FailBit: We don't want anyone able to mute just anyone.
[08:37:29] armyriad: has joined #RubyOnRails
[08:37:40] Palsson: has joined #RubyOnRails
[08:41:01] wharr_: has joined #RubyOnRails
[08:42:44] bbrowning_away: has joined #RubyOnRails
[08:42:49] darutoko: has joined #RubyOnRails
[08:43:42] matthewd: Radar: I think FailBit just meant helpa doesn't need to do the self-op + mode-change + deop dance
[08:43:51] Radar: matthewd: oh
[08:44:03] Radar: I'll take a look.
[08:47:05] yfeldblum: has joined #RubyOnRails
[08:47:46] helpa: has joined #RubyOnRails
[08:47:52] ChanServ: +q *!*@redhat/matthewd
[08:47:57] ChanServ: -q *!*@redhat/matthewd
[08:47:58] hfp_work: has joined #RubyOnRails
[08:48:00] Radar: matthewd: It works :)
[08:48:19] Radar: Thanks for that :) I also like that it uses *!*@<hostname> too
[08:49:06] matthewd: Radar: On an unrelated note, might I trouble you for an !authorize, so I can dispense tips?
[08:49:29] armyriad: has joined #RubyOnRails
[08:49:31] Radar: matthewd: You just need to look deeper into your heart to realise you've had permission all along.
[08:50:20] armyriad: has joined #RubyOnRails
[08:51:43] armyriad: has joined #RubyOnRails
[08:53:11] annlewis: has joined #RubyOnRails
[08:53:20] RegulationD: has joined #RubyOnRails
[08:53:31] bruno-: has joined #RubyOnRails
[08:53:37] sadaf2606: has joined #RubyOnRails
[08:54:12] darrencauthon: has joined #RubyOnRails
[08:54:21] blackmesa: has joined #RubyOnRails
[08:58:08] relix: has joined #RubyOnRails
[08:59:42] yogeshrt: has joined #RubyOnRails
[09:02:31] jenrzzz: has joined #RubyOnRails
[09:04:53] Tinyyy: has joined #RubyOnRails
[09:06:56] lalalaaa: has joined #RubyOnRails
[09:08:06] sl33k: has joined #RubyOnRails
[09:08:16] pontiki: has joined #RubyOnRails
[09:11:46] trosborn: has joined #RubyOnRails
[09:14:08] Tinyyy: has joined #RubyOnRails
[09:15:53] zpe: has joined #RubyOnRails
[09:18:42] Tinyyy: has joined #RubyOnRails
[09:18:43] jonee: has joined #RubyOnRails
[09:23:44] dici: has joined #RubyOnRails
[09:23:53] trosborn: has joined #RubyOnRails
[09:24:25] SteenJobs: has joined #RubyOnRails
[09:24:44] siddart: has joined #RubyOnRails
[09:24:44] voker57: has joined #RubyOnRails
[09:27:06] jamto11: has joined #RubyOnRails
[09:29:19] User458764: has joined #RubyOnRails
[09:32:48] kitsuneyo: has joined #RubyOnRails
[09:36:52] dawkirst: has joined #RubyOnRails
[09:37:22] dawkirst: Hi -- I'm guessing SomeModule.constants in Rails isn't supposed to return an empty array. Any ideas why it does?
[09:39:09] matthewd: dawkirst: It rather depends whether you have any constants defined therein
[09:39:25] matthewd: .. and whether they've been loaded yet
[09:39:42] dawkirst: matthewd, yeah I definitely have them defined; I think it has to do with the loading yes :)
[09:40:57] roxtrongo: has joined #RubyOnRails
[09:41:35] htmldrum: has joined #RubyOnRails
[09:47:00] DoubleMalt: has joined #RubyOnRails
[09:50:01] KnownSyntax: has joined #RubyOnRails
[09:53:15] atomical: has joined #RubyOnRails
[09:54:09] annlewis: has joined #RubyOnRails
[09:55:01] darrencauthon: has joined #RubyOnRails
[09:55:16] bruno-: has joined #RubyOnRails
[09:55:59] m712: has joined #RubyOnRails
[09:59:11] mytrile: has joined #RubyOnRails
[10:01:51] rakm: has joined #RubyOnRails
[10:03:25] blackmesa: has joined #RubyOnRails
[10:05:57] workmad3: has joined #RubyOnRails
[10:06:10] bonhoeffer: has joined #RubyOnRails
[10:06:55] sadaf2605: has joined #RubyOnRails
[10:08:37] pontiki: has joined #RubyOnRails
[10:11:01] kgeo: has joined #RubyOnRails
[10:12:00] nightsh: has joined #RubyOnRails
[10:13:15] johnflux: has joined #RubyOnRails
[10:17:31] shinenelson: has joined #RubyOnRails
[10:21:01] User458764: has joined #RubyOnRails
[10:22:59] vigintas: has joined #RubyOnRails
[10:24:13] stamina: has joined #RubyOnRails
[10:25:16] bruno-_: has joined #RubyOnRails
[10:26:49] ahegyi: has joined #RubyOnRails
[10:26:56] nettoweb: has joined #RubyOnRails
[10:28:15] chrislotix: has joined #RubyOnRails
[10:28:29] chrislotix: has joined #RubyOnRails
[10:31:32] Tempesta: has joined #RubyOnRails
[10:33:57] Tempesta: has joined #RubyOnRails
[10:36:59] allcentury: has joined #RubyOnRails
[10:38:21] mytrile_: has joined #RubyOnRails
[10:39:44] chipotle: has joined #RubyOnRails
[10:40:29] dionysus69: has joined #RubyOnRails
[10:41:14] yaw: has joined #RubyOnRails
[10:42:49] vigintas: has joined #RubyOnRails
[10:44:20] Pandorian: has joined #RubyOnRails
[10:47:10] hfp_work: has joined #RubyOnRails
[10:47:39] beast: has joined #RubyOnRails
[10:54:13] RegulationD: has joined #RubyOnRails
[10:54:55] annlewis: has joined #RubyOnRails
[10:55:17] workmad3: has joined #RubyOnRails
[10:55:49] darrencauthon: has joined #RubyOnRails
[10:58:28] Depili: cat says to write better tests
[10:59:18] User458764: has joined #RubyOnRails
[10:59:46] roxtrongo: has joined #RubyOnRails
[11:03:42] zorbash: has joined #RubyOnRails
[11:05:23] Palsson: has joined #RubyOnRails
[11:08:12] hephaestus_rg: has joined #RubyOnRails
[11:09:22] pontiki: has joined #RubyOnRails
[11:13:34] pickle_: has joined #RubyOnRails
[11:14:01] sl33k: has joined #RubyOnRails
[11:14:15] pickle_: has joined #RubyOnRails
[11:19:09] mynamepickle: has joined #RubyOnRails
[11:21:23] zenfox_: has joined #RubyOnRails
[11:28:20] yfeldblum: has joined #RubyOnRails
[11:32:25] kitsuneyo: has joined #RubyOnRails
[11:38:03] czerasz: has joined #RubyOnRails
[11:38:31] arBmind: has joined #RubyOnRails
[11:38:59] shilon: has joined #RubyOnRails
[11:39:38] qejk: has joined #RubyOnRails
[11:41:02] User458764: has joined #RubyOnRails
[11:41:40] kitsuneyo: has joined #RubyOnRails
[11:44:32] sameerynho: has joined #RubyOnRails
[11:50:22] workmad3: has joined #RubyOnRails
[11:54:00] cornerma1: has joined #RubyOnRails
[11:54:34] jenrzzz: has joined #RubyOnRails
[11:55:33] annlewis: has joined #RubyOnRails
[11:56:30] darrencauthon: has joined #RubyOnRails
[11:57:00] rshetty: has joined #RubyOnRails
[11:57:45] moeabdol: has joined #RubyOnRails
[11:59:08] vigintas: has joined #RubyOnRails
[11:59:59] quazimodo: has joined #RubyOnRails
[12:06:28] workmad3: has joined #RubyOnRails
[12:10:59] bbrowning: has joined #RubyOnRails
[12:12:34] rshetty: has joined #RubyOnRails
[12:17:49] gingray: has joined #RubyOnRails
[12:17:54] lxsameer_: has joined #RubyOnRails
[12:18:17] siddart: has joined #RubyOnRails
[12:24:56] kitsuneyo: has joined #RubyOnRails
[12:27:41] ruurd: has joined #RubyOnRails
[12:30:53] jamto11: has joined #RubyOnRails
[12:33:50] surrealanalysis: has joined #RubyOnRails
[12:35:17] sameerynho: has joined #RubyOnRails
[12:35:20] workmad3: has joined #RubyOnRails
[12:39:36] pontiki: has joined #RubyOnRails
[12:40:01] The_Phoenix: has joined #RubyOnRails
[12:40:48] tknz: has joined #RubyOnRails
[12:43:54] lxsameer_: has joined #RubyOnRails
[12:44:33] dionysus69: has joined #RubyOnRails
[12:45:33] Diabolik: does anyone have any ideas on how best to refactor massive controller methods?
[12:45:36] Diabolik: https://gist.github.com/askl56/992ec041a7df3844d01f
[12:46:50] pontiki: has joined #RubyOnRails
[12:52:22] ahegyi: move the code into a service class and reuse it in each controller action.
[12:52:27] ahegyi: for the week action: @service = SearchService.new(7, account.id)
[12:52:59] FailBit: Diabolik: I have a private get_time_period method in my controller
[12:53:00] workmad3: has joined #RubyOnRails
[12:53:08] FailBit: that does all that, but assigns the variables for the time period
[12:55:03] RegulationD: has joined #RubyOnRails
[12:56:20] annlewis: has joined #RubyOnRails
[12:56:46] matthewd: Yeah, a lot of that looks like it just needs an Extract Method, producing a private search_results(number_of_days)
[12:57:19] darrencauthon: has joined #RubyOnRails
[12:58:48] moeabdol: has joined #RubyOnRails
[12:59:24] arup_r: has joined #RubyOnRails
[12:59:30] bratsche: has joined #RubyOnRails
[12:59:36] matthewd: .. though the .collect { .last[n] }.reverse stuff suggests there's [at least one] real object/class hiding behind some array-flavoured Primitive Obsession
[13:00:35] demonlove: has joined #RubyOnRails
[13:00:42] Diabolik: FailBit can you share a sample?
[13:02:23] FailBit: technically my get_time_period method is for collecting url params into an elasped time period
[13:02:42] FailBit: https://gist.github.com/liamwhite/9c80a9f5aba943d3fd72
[13:03:09] FailBit: I do see these: https://gist.github.com/liamwhite/e54a99475091296f3e15
[13:04:19] FailBit: I can already see so many ways _those methods_ can be simplified.
[13:04:41] FailBit: one of the programmers on the team is obsessed with adding as many linebreaks as possible.
[13:06:20] Kerber0s_: has joined #RubyOnRails
[13:07:14] Diabolik: FailBit pm?
[13:10:00] Thomas-0725: has joined #RubyOnRails
[13:10:36] hephaestus_rg: has joined #RubyOnRails
[13:11:20] jgt: has joined #RubyOnRails
[13:13:55] zeddybear: has joined #RubyOnRails
[13:14:03] sameerynho: has joined #RubyOnRails
[13:14:46] Thomas-0725: has joined #RubyOnRails
[13:15:28] zeddybear: has left #RubyOnRails: ()
[13:15:44] Zeddy: has joined #RubyOnRails
[13:16:05] Zeddy: Seems like daylight savings are making logger crash
[13:16:26] Zeddy: I'm trying to access production to fix something that went wrong last night so this is inconvenient for me
[13:16:39] Zeddy: Would anyone else have stumbled into this and know of a workaround?
[13:16:57] Zeddy: $ bundle exec rails c
[13:16:57] Zeddy: from /usr/lib/ruby/2.2.0/logger.rb:547:in `next_rotate_time'
[13:17:27] Zeddy: Didn't seem to get pasted but it was an argument out of range error
[13:18:48] nettoweb: has joined #RubyOnRails
[13:21:35] zenfox__: has joined #RubyOnRails
[13:23:03] cac: has joined #RubyOnRails
[13:23:56] FailBit: where are your logfiles?
[13:26:11] Zeddy: they're in ./log
[13:26:25] Zeddy: You got a plan?
[13:26:47] lxsameer_: has joined #RubyOnRails
[13:27:01] FailBit: not really, but it seems like it's failing to pick up the time on them
[13:27:22] otherj: has joined #RubyOnRails
[13:29:23] Zeddy: they're still there
[13:29:35] Zeddy: I'm sure this must be DST related
[13:29:46] Zeddy: just because isn't it always
[13:30:17] FailBit: our server didn't have any hiccups
[13:30:34] FailBit: Sun Oct 25 14:30:29 CET 2015
[13:31:05] Zeddy: Hm, that's my timezone too
[13:31:08] Zeddy: as well the server's
[13:31:18] Zeddy: when's the last write time for yesterday's log for you?
[13:31:33] Zeddy: and just to be clear you can access the rails console on it?
[13:32:18] FailBit: -rw-r--r-- 1 derpibooru derpibooru 1448845 Oct 25 06:25 error.log.1
[13:32:30] rshetty: has joined #RubyOnRails
[13:33:03] FailBit: note that we use yell for logger
[13:33:19] FailBit: https://github.com/rudionrails/yell-rails
[13:33:35] Zeddy: I think we use the stock logger
[13:33:51] User458764: has joined #RubyOnRails
[13:34:56] Zeddy: Terminal was working fine friday
[13:35:10] Zeddy: I tried moving yesterday's log but it didn't have any effect
[13:37:27] darrencauthon: has joined #RubyOnRails
[13:39:32] djellemah: has joined #RubyOnRails
[13:40:21] sameerynho: has joined #RubyOnRails
[13:42:01] demonlove: has joined #RubyOnRails
[13:43:35] s2013: has joined #RubyOnRails
[13:46:27] Or1on: has joined #RubyOnRails
[13:46:53] AzaToth: has joined #RubyOnRails
[13:52:48] czerasz: has joined #RubyOnRails
[13:55:26] workmad3: has joined #RubyOnRails
[13:56:00] RegulationD: has joined #RubyOnRails
[13:56:09] willardg: has joined #RubyOnRails
[13:56:58] ibouvousaime: has joined #RubyOnRails
[13:57:08] annlewis: has joined #RubyOnRails
[13:59:38] moeabdol: has joined #RubyOnRails
[14:03:16] vasilakisFiL: has joined #RubyOnRails
[14:04:26] ankhers: has joined #RubyOnRails
[14:04:59] darrencauthon: has joined #RubyOnRails
[14:09:42] vasilakisFiL: has joined #RubyOnRails
[14:11:15] chrislotix: has joined #RubyOnRails
[14:14:26] kanzure: has joined #RubyOnRails
[14:14:50] adaedra: There's one bit difference between h and i, checks out.
[14:15:14] adaedra: ah no, two, took the wrong number.
[14:16:15] atomical: has joined #RubyOnRails
[14:16:41] Palsson: has joined #RubyOnRails
[14:16:45] demonlove: has joined #RubyOnRails
[14:16:58] arup_r: has joined #RubyOnRails
[14:30:14] annlewis: has joined #RubyOnRails
[14:30:34] rshetty: has joined #RubyOnRails
[14:30:46] FailBit: what is Time#to_key ?
[14:31:25] FailBit: that's part of a gem
[14:32:53] blackhuey: has left #RubyOnRails: ()
[14:34:26] simi: has joined #RubyOnRails
[14:38:50] vasilakisFiL: hey! any idea why I get Ruby as HTTP_USER_AGENT when deployed in Heroku ?
[14:40:05] beast_: has joined #RubyOnRails
[14:40:14] lacrymology: has joined #RubyOnRails
[14:41:02] roxtrongo: has joined #RubyOnRails
[14:41:31] s2013: has joined #RubyOnRails
[14:44:19] Ergo: has joined #RubyOnRails
[14:44:50] darrencauthon: has joined #RubyOnRails
[14:45:17] alphaatom: has joined #RubyOnRails
[14:48:28] wcalderipe: has joined #RubyOnRails
[14:52:55] gingray: has joined #RubyOnRails
[14:53:37] siddart: has joined #RubyOnRails
[14:54:40] kitsuneyo: has joined #RubyOnRails
[14:56:12] workmad3: has joined #RubyOnRails
[15:00:25] moeabdol: has joined #RubyOnRails
[15:04:09] zorbash: has joined #RubyOnRails
[15:04:30] ppnlo: has joined #RubyOnRails
[15:05:10] ppnlo: has left #RubyOnRails: ()
[15:05:13] ppnlo: has joined #RubyOnRails
[15:10:23] jamto11: has joined #RubyOnRails
[15:11:07] joeytwiddle: has joined #RubyOnRails
[15:11:26] djellemah_: has joined #RubyOnRails
[15:12:07] kitsuneyo: has joined #RubyOnRails
[15:15:00] ruurd: has joined #RubyOnRails
[15:18:23] weihan: has joined #RubyOnRails
[15:21:04] imp4t: has joined #RubyOnRails
[15:21:08] maxx88: has joined #RubyOnRails
[15:21:56] sankaber: has joined #RubyOnRails
[15:22:01] ibouvousaime: has joined #RubyOnRails
[15:22:55] alphaatom: has joined #RubyOnRails
[15:27:27] lukas: has joined #RubyOnRails
[15:28:13] pawnbox: has joined #RubyOnRails
[15:28:50] ruurd_: has joined #RubyOnRails
[15:29:39] s2013: morning yall
[15:29:49] s2013: anything yall prefer for api documentations?
[15:31:14] lukas: s2013: for a self hosted solution i like gollum
[15:31:28] lukas: https://github.com/gollum/gollum
[15:31:31] s2013: i was thinking of swagger as well
[15:31:33] s2013: k let me check it
[15:31:53] s2013: the api is internal basically. building the api for a mobile app
[15:32:00] s2013: so it would be for our mobile developer
[15:32:19] kitsuneyo: has joined #RubyOnRails
[15:32:28] lukas: ah, well, gollum lets you work with rdocs really well
[15:32:40] lukas: and it's really simple to set up and maintain
[15:32:47] lukas: i like it because of that simplicity
[15:33:09] EminenceHC: has joined #RubyOnRails
[15:33:10] lukas: it's basically a wiki with a lot of flexibility and different markdown flavor support
[15:34:38] User458764: has joined #RubyOnRails
[15:37:11] lindii_: has joined #RubyOnRails
[15:37:33] GnuYawk: has joined #RubyOnRails
[15:38:46] bobbobbins: has joined #RubyOnRails
[15:39:55] shilon: has joined #RubyOnRails
[15:41:51] rshetty: has joined #RubyOnRails
[15:42:51] roxtrongo: has joined #RubyOnRails
[15:43:00] moeabdol: has joined #RubyOnRails
[15:43:46] bobbobbins: hey, I'm trying to override some functions in the CaseinHelper module I'm using(from the casein gem)...is there a right way to do that? I'm sure its pretty easy but I haven't really done anything like that before
[15:46:41] dici: has joined #RubyOnRails
[15:46:45] darrencauthon: has joined #RubyOnRails
[15:47:16] User458764: has joined #RubyOnRails
[15:47:55] lxsameer: has joined #RubyOnRails
[15:47:56] lxsameer: has joined #RubyOnRails
[15:48:16] EminenceHC: has joined #RubyOnRails
[15:50:45] lukas: bobbobbins: hey, ruby has a really loose object model
[15:51:12] lukas: so to override some things from a module you include the module, and then redefine the function
[15:51:55] lukas: it would be something like include CaseinHelper; def function_name puts "overriden" end
[15:53:08] bobbobbins: lukas: here is what I did...is it just not working because I didn't use include CaseinHelper? https://gist.github.com/anonymous/7031f3e675abadaee50d
[15:53:40] bobbobbins: I'm just adding an extra level of access(HR) to what they already have
[15:54:14] Cervajz__: has joined #RubyOnRails
[15:54:56] andatche: has joined #RubyOnRails
[15:55:04] lukas: oh, that should work i think
[15:55:29] lukas: where are you putting that code?
[15:55:56] bobbobbins: lukas: its completely overwriting the module instead of extending it...i put it in app/helpers/casein
[15:56:42] hephaestus_rg: has joined #RubyOnRails
[15:56:53] RegulationD: has joined #RubyOnRails
[15:56:59] renegadeandy: has joined #RubyOnRails
[15:57:00] lukas: it is weird that that is not working then
[15:57:11] lukas: hmm, i'm sure it's something simple that we're missing
[15:58:24] renegadeandy: Hi guys, I want to add errors on the object venue, to my errors object can somebody help me understand waht i am doing wrong here : https://gist.github.com/renegadeandy/e5f7abc97e3c7bfffb76
[15:59:51] lukas: bobbobbins: have you seen this SO answer? https://github.com/gollum/gollum
[15:59:55] lukas: wrong link
[16:00:03] lukas: bobbobbins: http://stackoverflow.com/questions/580314/overriding-a-module-method-from-a-gem-in-rails
[16:00:21] FailBit: https://github.com/infoforcefeed/OlegDB/pull/169#issuecomment-90931672
[16:00:46] bobbobbins: lukas: ah, maybe i need to put it in initializers
[16:01:53] lukas: bobbobbins: yeah, could be it. also make sure that the file is known to rails by including it in the configuration settings as per the post above
[16:02:37] lukas: FailBit: that is pretty funny
[16:04:04] roxtrongo: has joined #RubyOnRails
[16:06:07] nertzy: has joined #RubyOnRails
[16:06:10] rshetty: has joined #RubyOnRails
[16:06:55] mrtomme: has joined #RubyOnRails
[16:07:25] fedexo: has joined #RubyOnRails
[16:08:43] arup_r: renegadeandy: First of all .add needs a key as a first argument where you should add your message ( https://gist.github.com/renegadeandy/e5f7abc97e3c7bfffb76#file-events_controller-rb-L4) But you don't have
[16:08:52] arup_r: http://api.rubyonrails.org/classes/ActiveModel/Errors.html#method-i-add
[16:13:25] renegadeandy: arup_r: yeah i fixed it now :) thanks
[16:15:32] kitsuneyo: has joined #RubyOnRails
[16:16:20] ruurd: has joined #RubyOnRails
[16:17:20] pwnd_nfsw: has joined #RubyOnRails
[16:18:15] rshetty: has joined #RubyOnRails
[16:18:48] Jasaka: has joined #RubyOnRails
[16:25:18] alphaatom: has joined #RubyOnRails
[16:29:53] bruno-: has joined #RubyOnRails
[16:31:06] pawnbox: has joined #RubyOnRails
[16:39:55] bobbobbins: ok, so adding the override to initialize doesn't return any errors but when I go check it on the webpage, the change isn't there....however, if I use the console, it is...why would it do that?
[16:42:28] arup_r: bobbobbins: Gist please
[16:43:46] bobbobbins: https://gist.github.com/anonymous/28745432474c28b5c895
[16:44:25] workmad3: has joined #RubyOnRails
[16:44:27] willardg: has joined #RubyOnRails
[16:46:35] sarink: has joined #RubyOnRails
[16:46:53] Motoservo: has joined #RubyOnRails
[16:48:12] darrencauthon: has joined #RubyOnRails
[16:52:04] lukas: bobbobbins: did you restart the web server/webpage?
[16:52:16] lukas: initializers are something that is read once upon startup, i think
[16:52:23] bobbobbins: lukas: yeah, several times
[16:52:29] lukas: ah, weird
[16:52:36] MartinEl_: has joined #RubyOnRails
[16:52:56] moss: has left #RubyOnRails: ("Laters")
[16:53:52] VeryBewitching: has joined #RubyOnRails
[16:54:17] siddart: has joined #RubyOnRails
[16:54:19] arup_r: VeryBewitching: good day
[16:54:29] VeryBewitching: Hey arup_r, how's it goin'?
[16:54:46] arup_r: easy n simple.
[16:54:58] arup_r: and yours ?
[16:55:05] Contigi777: has joined #RubyOnRails
[16:55:41] Motoservo: has joined #RubyOnRails
[16:55:46] VeryBewitching: Not too bad, I have a baptism to attend today.
[16:55:54] pawnbox_: has joined #RubyOnRails
[17:01:09] i: has joined #RubyOnRails
[17:06:27] chrislotix: has joined #RubyOnRails
[17:06:43] annlewis: has joined #RubyOnRails
[17:06:54] svkurowski: has joined #RubyOnRails
[17:08:20] raunicolae: has joined #RubyOnRails
[17:08:33] chipotle: has joined #RubyOnRails
[17:09:16] jahbrewski: has joined #RubyOnRails
[17:11:28] kimegede: has joined #RubyOnRails
[17:12:03] n008f4g_: has joined #RubyOnRails
[17:12:14] kimegede: Hey, how do I create a model with "year" db type? Or should I use something else?
[17:12:21] kimegede: Timestamp or just :date
[17:12:27] FailBit: t.datetime
[17:12:36] FailBit: what's a year
[17:12:43] LJT: has joined #RubyOnRails
[17:12:46] VeryBewitching: kimegede: You're generating the model?
[17:12:53] kimegede: VeryBewitching: Yeah
[17:13:14] kimegede: It's like a "release year"
[17:13:14] VeryBewitching: http://stackoverflow.com/questions/4384284/rails-generate-model-fieldtype-what-are-the-options-for-fieldtype
[17:13:32] VeryBewitching: :date is most likely what you want
[17:13:48] VeryBewitching: So release_year:date
[17:14:29] VeryBewitching: OK, church time, bbl.
[17:14:30] kimegede: VeryBewitching: Cool, thank you - so you just want the interface, to have a input for year and kind of ignore the day & month?
[17:14:41] surrealanalysis: has joined #RubyOnRails
[17:14:54] VeryBewitching: kimegede: All you have to do is store the year.
[17:15:03] kimegede: Cool thanks :)
[17:15:03] VeryBewitching: I think it'll default to 01 for month
[17:15:11] VeryBewitching: But try it, don't take my word on it
[17:16:47] relix: has joined #RubyOnRails
[17:16:55] matthewd: ACTION would just use an integer
[17:17:22] LJT: has joined #RubyOnRails
[17:20:26] baweaver: has joined #RubyOnRails
[17:22:40] lacuna: has joined #RubyOnRails
[17:22:50] kimegede: matthewd: That would actually make sense, forgot all about that, when I usually using year in other systems :)
[17:22:56] lacuna: has joined #RubyOnRails
[17:24:32] avemestr: has joined #RubyOnRails
[17:25:09] avemestr: Quick question...
[17:25:11] matthewd: I imagine you could use the year type if you wanted to, btw... but the default schema dumper may not recognize it, and at a glance, it only seems to give you special casting (e.g. guessing meaning from 2 digit spellings)
[17:25:37] avemestr: This: if observation.nil? - means that if observation is nil, then the following block is executed, right?
[17:25:37] kimegede: matthewd: You are right
[17:26:16] avemestr: But what if I want to execute a block, if observation is not nill? Is it: unless observation.nil? - or something else?
[17:26:31] jenrzzz: has joined #RubyOnRails
[17:26:39] matthewd: avemestr: Technically, it means the block will be executed if #nil? returns true... but under sane circumstances, only nil.nil? will do so
[17:27:30] matthewd: avemestr: Yes, that'll work. The more idiomatic spelling would be just `if observation`, though that behaves differently if observation could be false
[17:27:48] avemestr: matthewd: Thanks!
[17:28:11] avemestr: observation is: observation = Observation.where(unixtime: unixtimeseven).first
[17:28:38] wcalderipe: has joined #RubyOnRails
[17:28:47] matthewd: Yeah, so that'll only ever be an AR instance or nil, so the shorthand is fine
[17:29:05] arooni: has joined #RubyOnRails
[17:29:43] avemestr: matthewd: So shorthand would be: "if observation" and "unless observation"?
[17:29:43] zpe: has joined #RubyOnRails
[17:30:54] matthewd: No worries :)
[17:31:27] SteenJobs: has joined #RubyOnRails
[17:34:06] nemo_: has joined #RubyOnRails
[17:36:06] Lytol: has joined #RubyOnRails
[17:37:20] ppnlo`: has joined #RubyOnRails
[17:41:56] nickenchuggets: has joined #RubyOnRails
[17:42:34] wcalderipe: has joined #RubyOnRails
[17:44:22] UnMorenoBlanco1: has joined #RubyOnRails
[17:49:17] darrencauthon: has joined #RubyOnRails
[17:49:36] dps: Does anybody here know a lot about HTML audio controls? I am trying to utilize data-turbolinks-permanent in Turbolinks 3.0 to allow continous play of audio across page loads, but whenever I change pages the audio stops. The position of the track is retained. I'm trying to figure out why play is interrupted.
[17:50:37] linocisco: has joined #RubyOnRails
[17:53:06] linocisco: http://pastie.org/private/eodinfnomiodplgugspj5w
[17:56:07] zpe: has joined #RubyOnRails
[17:56:54] User458764: has joined #RubyOnRails
[17:57:42] The_Ball: has joined #RubyOnRails
[17:57:45] RegulationD: has joined #RubyOnRails
[18:03:37] linocisco: Radar, t.timestamps null: false vs t.timestamps ?
[18:05:16] grambo: has joined #RubyOnRails
[18:05:42] zorbash: has joined #RubyOnRails
[18:06:21] pawnbox: has joined #RubyOnRails
[18:07:33] annlewis: has joined #RubyOnRails
[18:08:10] cac: has joined #RubyOnRails
[18:09:55] arup_r: linocisco: Your issue is ?? :)
[18:10:20] linocisco: arup_r, regarding http://pastie.org/private/eodinfnomiodplgugspj5w ?
[18:11:19] arup_r: That warning ?
[18:11:19] linocisco: arup_r, it is the folder my class instructor gave me as his sample app. but I can't run on my machine and setup
[18:12:07] linocisco: arup_r, pasted all result
[18:12:13] linocisco: arup_r, pasted all results
[18:12:52] linocisco: arup_r, but all my newly created apps using "rails new" are ok
[18:13:07] arup_r: try http://stackoverflow.com/questions/23402820/rails-server-bin-rails6-warning-already-initialized-constant-app-path-error
[18:13:26] sl33k: has joined #RubyOnRails
[18:14:05] linocisco: arup_r, ok.let me see
[18:14:07] beauby: has joined #RubyOnRails
[18:15:30] Aherin: has joined #RubyOnRails
[18:17:01] linocisco: can we open two terminal and run two rail servers at the same time?
[18:17:23] linocisco: meaning configuring and two apps at the same time in different paths?
[18:17:34] tbuehlmann: linocisco, sure, just run them on different ports
[18:17:46] kitsuneyo: has joined #RubyOnRails
[18:18:03] linocisco: tbuehlmann, thanks.
[18:18:45] rickmasta: has joined #RubyOnRails
[18:19:48] gambl0re: has joined #RubyOnRails
[18:20:00] rory096: has joined #RubyOnRails
[18:23:47] linocisco: arup_r, http://pastie.org/private/bekyupqzheoqzinz271ubw
[18:24:23] arup_r: well did you do bundle install after cloning it ?
[18:24:28] m3_del: has joined #RubyOnRails
[18:24:47] arup_r: and that command ran successfully ?
[18:25:27] maxx88: has joined #RubyOnRails
[18:26:10] cac: has joined #RubyOnRails
[18:26:26] linocisco: arup_r, I just copied that folder and tried to start with a command "rails s"
[18:27:14] arup_r: ok do bundle install from the current directory were you are now.. I mean to the rails app directory
[18:27:16] linocisco: arup_r, may be that app is created on different version of ruby , rails, gems under Mac OSX. now I am with ubuntu
[18:28:02] linocisco: arup_r, Bundle complete! 28 Gemfile dependencies, 99 gems now installed.
[18:28:14] linocisco: arup_r, so what is next to run?
[18:28:23] arup_r: rails server
[18:28:29] Tokenizer: has joined #RubyOnRails
[18:29:22] rory096: alright, i've got a question about REST structure. I've got models for channels and users. A channel can belong to a user, or user_id can be null so it's global (can be shown to, but not edited by, all users). Now I want to display editable channels on the front-end. Should I use the same /channels endpoint and filter out the ones without a user_id on the front end? Would it be better to
[18:29:22] rory096: make editable channels a separate/nested resource, like /user/{id}/channels?
[18:29:43] rory096: hmm... or maybe shallow nesting?
[18:29:56] nogic: has joined #RubyOnRails
[18:31:35] linocisco: arup_r, same problem. http://pastie.org/private/a459ryhtdzkwiisqkxwxsq
[18:32:32] kitsuneyo: what's the opposite of assert_template? assert_not_template?
[18:32:33] workmad3: has joined #RubyOnRails
[18:33:02] linocisco: arup_r, rake rails:update:bin also resulted errrors like http://pastie.org/private/k04eftlmkpkuqylqnx5lg
[18:33:39] arup_r: do gem install nokogiri
[18:33:51] arup_r: then run it again
[18:34:30] kitsuneyo: i guess i use count: 0
[18:35:52] cac: has joined #RubyOnRails
[18:37:55] arup_r: kitsuneyo: assert_template file: nil
[18:38:52] kitsuneyo: arup_r, may not have asked well, i want to assert a specific template is not rendered, so i'm using assert_template partial: "_name", count: 0
[18:39:12] rickmasta: has joined #RubyOnRails
[18:39:29] arup_r: Yes, your approach is correct
[18:40:45] sarink: has joined #RubyOnRails
[18:40:51] linocisco: arup_r, http://pastie.org/private/mkjrpid78ummuhl99ckr5a . still with errors
[18:42:23] jamto11: has joined #RubyOnRails
[18:42:42] matthewd: linocisco: Does 'bundle exec' help?
[18:43:26] linocisco: matthewd, bundler: exec needs a command to run
[18:43:59] stamina: has joined #RubyOnRails
[18:44:37] avemestr: I have two tables: locations and observations. Locations has_many observations. Observations belongs_to location.
[18:45:02] avemestr: I render json with: @locations = Location.all [newline] render :json => @locations, :include => :observations
[18:45:07] avemestr: Works fine!
[18:45:14] MartinElvar: has joined #RubyOnRails
[18:45:28] avemestr: But what if I only want to include the latest 10 observations under each location?
[18:46:00] nettoweb: has joined #RubyOnRails
[18:46:13] pawnbox: has joined #RubyOnRails
[18:47:33] cac: has joined #RubyOnRails
[18:48:30] pawnbox_: has joined #RubyOnRails
[18:50:05] darrencauthon: has joined #RubyOnRails
[18:50:40] linocisco: arup_r, matthewd thanks for your help. I dont want to waste my time on working unknown apps by class instructor. I am reading Radar's book and setup is fine for localhost:3000 anyway and I will follow his sample tutorials on book only
[18:52:17] kimegede: has joined #RubyOnRails
[18:52:18] surrealanalysis: has joined #RubyOnRails
[18:52:42] kimegede: Would I be able to use the "factory_girl_rails" gem to generate some data for my development while clicking around? (Or is't only for test fixtures?)
[18:55:37] Coldblackice: has joined #RubyOnRails
[18:57:07] shibabu: has joined #RubyOnRails
[18:57:09] arup_r: avemestr: Seems not that easy, but you can take a help of Jbuilder template on this purpose
[18:57:12] rhizome: You can use FG for seeding, but might as well just use Faker
[18:57:24] ruurd: has joined #RubyOnRails
[18:57:47] centrx: has joined #RubyOnRails
[18:57:55] avemestr: arup_r: I'll have a look at Jbuilder, thanks!
[18:57:59] jenrzzz: has joined #RubyOnRails
[18:58:12] Palsson: has joined #RubyOnRails
[18:58:12] hephaestus_rg: has joined #RubyOnRails
[18:59:23] arup_r: avemestr: or, inside the model create a scope which will give you the data from your scope query, and then just render that using render json: @objects
[19:00:15] kimegede: rhizome: Do you know where I can read more about that? :)
[19:01:19] arup_r: matthewd: Is limit, offset are hard to implement with json rendering? :) Just asking.. Currently we support only, except, include, method while rendering JSON
[19:01:56] arup_r: But other things I mentioned can also be passed logically if interface supports? Not that hard..
[19:03:43] cac: has joined #RubyOnRails
[19:03:46] arup_r: Just taking the opinion, why those options are not added ?
[19:08:12] cac: has joined #RubyOnRails
[19:08:18] annlewis: has joined #RubyOnRails
[19:09:17] lalalaaa: has joined #RubyOnRails
[19:09:18] relix: has joined #RubyOnRails
[19:09:46] icedp: has joined #RubyOnRails
[19:10:48] cac: has joined #RubyOnRails
[19:10:59] pawnbox: has joined #RubyOnRails
[19:11:13] kitsuneyo: has joined #RubyOnRails
[19:12:16] matthewd: arup_r: Wouldn't you just call them on the relation, before you do the JSON conversion?
[19:12:19] n00bDev: has joined #RubyOnRails
[19:13:00] arup_r: yes, That is what I do as I already said to avemestr . But I was curious to know if or not.
[19:13:02] matthewd: Those other options are about *how* the records get converted to JSON; any filtering/selection you want to perform seems unrelated, and something to be done first
[19:13:27] matthewd: No different to, e.g., where
[19:14:13] MartinElvar: has joined #RubyOnRails
[19:16:18] upgrayeddd: has joined #RubyOnRails
[19:22:00] hnanon: has joined #RubyOnRails
[19:23:18] hnanon: has joined #RubyOnRails
[19:23:42] hnanon: Can someone please point to some resources on learning to test?
[19:26:02] rhizome: http://guides.rubyonrails.org/testing.html
[19:27:26] arup_r: rhinon: Not much like what you meant
[19:27:52] hnanon: Not exactly.
[19:28:00] arup_r: hnanon: A book Everyday Rails with Rspec and another book from Pragprog, I forgot the name
[19:28:00] hnanon: I'm never sure what I should be testing.
[19:28:15] rhizome: you test your code
[19:28:35] hnanon: rhizome: Too vague.
[19:28:54] arup_r: yes, rhizome , but there are many times, when I feel like what should I test
[19:28:54] hnanon: https://www.google.com/trends/explore#q=rspec%2C%20minitest&cmpt=q&tz=Etc%2FGMT%2B4
[19:29:07] hardtail: has joined #RubyOnRails
[19:29:10] arup_r: yes there are.
[19:29:16] shilon: has joined #RubyOnRails
[19:29:27] hnanon: I wanted to go down the minitest path...but after seeing that, I think rspec is a no-brainer.
[19:30:02] xtagon: has joined #RubyOnRails
[19:30:13] rhizome: https://www.youtube.com/watch?v=URSWYvyc42M
[19:32:26] hnanon: Thanks, rhizome. I'll check it out.
[19:33:11] MartinElvar: has joined #RubyOnRails
[19:35:35] dikaio: has joined #RubyOnRails
[19:35:45] shilon: has left #RubyOnRails: ()
[19:36:51] fschuindt: has joined #RubyOnRails
[19:40:29] ktchup: has joined #RubyOnRails
[19:44:37] jgt: has joined #RubyOnRails
[19:47:34] hephaestus_rg: has joined #RubyOnRails
[19:49:29] fschuindt1: has joined #RubyOnRails
[19:50:52] darrencauthon: has joined #RubyOnRails
[19:51:22] LJT: has joined #RubyOnRails
[19:51:52] bonhoeffer: has joined #RubyOnRails
[19:51:56] lacuna: has joined #RubyOnRails
[19:51:56] lacuna: has joined #RubyOnRails
[19:52:25] EminenceHC: has joined #RubyOnRails
[19:52:46] czerasz: has joined #RubyOnRails
[19:54:46] cac: has joined #RubyOnRails
[19:55:09] jgt: has joined #RubyOnRails
[19:56:30] rickmasta: has joined #RubyOnRails
[19:58:39] RegulationD: has joined #RubyOnRails
[20:02:56] Jasaka|NA: has joined #RubyOnRails
[20:04:15] jenrzzz: has joined #RubyOnRails
[20:04:27] centrx: has joined #RubyOnRails
[20:10:20] FailBit: ArgumentError: Can't create Binding from C level Proc
[20:11:32] arooni: has joined #RubyOnRails
[20:12:46] emptyflask: has joined #RubyOnRails
[20:13:22] nettoweb: has joined #RubyOnRails
[20:13:26] Cervajz_: has joined #RubyOnRails
[20:15:18] chipotle: has joined #RubyOnRails
[20:15:55] hardtail: has joined #RubyOnRails
[20:16:51] JohnnyMoon: has joined #RubyOnRails
[20:17:09] youngbaks: has joined #RubyOnRails
[20:18:13] bonhoeffer: has joined #RubyOnRails
[20:19:01] h7br1x: has joined #RubyOnRails
[20:19:34] qejk: has joined #RubyOnRails
[20:19:42] arthurnn: has joined #RubyOnRails
[20:20:30] Motoservo: has joined #RubyOnRails
[20:20:37] workmad3: has joined #RubyOnRails
[20:24:57] hephaestus_rg: has joined #RubyOnRails
[20:25:42] ibouvousaime: has joined #RubyOnRails
[20:29:57] ibouvousaime: has joined #RubyOnRails
[20:30:04] sarink: has joined #RubyOnRails
[20:30:06] mrbubbles: has joined #RubyOnRails
[20:30:49] workmad3: has joined #RubyOnRails
[20:30:57] annlewis: has joined #RubyOnRails
[20:33:32] rshetty: has joined #RubyOnRails
[20:35:14] Radar: GOOD MORNING
[20:35:36] willardg: has joined #RubyOnRails
[20:35:59] youngbaks: has joined #RubyOnRails
[20:36:47] gambl0re: has joined #RubyOnRails
[20:37:19] craysiii: has joined #RubyOnRails
[20:38:18] shilon: has joined #RubyOnRails
[20:38:45] jgt: has joined #RubyOnRails
[20:40:38] meoblast001: has joined #RubyOnRails
[20:44:03] h7br1x: has joined #RubyOnRails
[20:44:24] superlou: has joined #RubyOnRails
[20:46:00] shine_irssi: has joined #RubyOnRails
[20:46:07] WillAmes: has joined #RubyOnRails
[20:46:41] chopin: has joined #RubyOnRails
[20:47:06] goddamnwrongside: has joined #RubyOnRails
[20:48:14] sarink: has joined #RubyOnRails
[20:48:50] FailBit: https://41.media.tumblr.com/0e8bd51ce688f2429fb0116967a8e70c/tumblr_naogmnfM0u1tjflgfo2_r1_1280.png
[20:49:53] capin: afternoon
[20:51:22] goddamnwrongside: has joined #RubyOnRails
[20:51:38] darrencauthon: has joined #RubyOnRails
[20:55:30] nfk: has joined #RubyOnRails
[20:55:34] chipotle: has joined #RubyOnRails
[20:57:42] shibabu: has joined #RubyOnRails
[21:03:48] darrencauthon: has joined #RubyOnRails
[21:05:11] n1ck7: has joined #RubyOnRails
[21:10:18] bonhoeffer: has joined #RubyOnRails
[21:11:25] nickshears: has joined #RubyOnRails
[21:11:49] mloy: has joined #RubyOnRails
[21:12:27] n1ck7: has joined #RubyOnRails
[21:12:31] LJT: has joined #RubyOnRails
[21:12:39] cornerma1: has joined #RubyOnRails
[21:13:00] lacuna: has joined #RubyOnRails
[21:15:38] RegulationD: has joined #RubyOnRails
[21:16:09] RockLee: has joined #RubyOnRails
[21:16:25] bonhoeffer: has joined #RubyOnRails
[21:17:39] cornerman: has joined #RubyOnRails
[21:18:12] bonhoeffer: has joined #RubyOnRails
[21:21:36] h7br1x: has joined #RubyOnRails
[21:22:01] mrbubbles: can i have methods in a rails initializer? (class Application < Rails::Application)
[21:24:37] duncannz: has joined #RubyOnRails
[21:26:13] yfeldblum: has joined #RubyOnRails
[21:26:25] rakm: has joined #RubyOnRails
[21:27:10] baweaver: has joined #RubyOnRails
[21:27:28] Radar: mrbubbles: what do you need the methods for?
[21:27:54] ruurd: has joined #RubyOnRails
[21:28:16] cornerma1: has joined #RubyOnRails
[21:28:28] mrbubbles: Radar: it???s an initializer. I???m settign up a listener to watch for files??? just wanted to split it up a bit
[21:28:29] Diabolik: can anyone recommend some good refactoring books?
[21:28:40] Radar: mrbubbles: !example
[21:28:40] helpa: mrbubbles: Please show us an example of what you want.
[21:28:49] Radar: Diabolik: POODR
[21:28:59] Radar: Diabolik: Did you get my PMs from yesterday too?
[21:29:09] Diabolik: i got the 3 line one
[21:29:15] mrbubbles: https://gist.github.com/joeczucha/d311ff14caf0b877d9a8
[21:29:15] Denarii: has joined #RubyOnRails
[21:29:19] avemestr_: has joined #RubyOnRails
[21:29:19] Diabolik: what's poodr?
[21:29:22] mrbubbles: I think that???s working, actualy
[21:29:24] Radar: Diabolik: !g poodr
[21:29:45] Radar: Diabolik: If you want what I said in the PM to change, then I'd love it if you could work out how to get the rights to that book off Manning :)
[21:29:59] Radar: Happy to maintain that book without Manning's involvement. Very UNhappy to maintain it with their involvement.
[21:30:06] Diabolik: my dad's a corporate lawyer if that helps :P
[21:30:35] Diabolik: Radar have you read http://rails-refactoring.com/
[21:30:40] Radar: I'd rather they just found it in their hearts to give it up
[21:31:47] Diabolik: are they being difficult?
[21:31:55] ruurd: has joined #RubyOnRails
[21:32:04] Diabolik: i recall reading one of your blog posts about i
[21:32:11] Diabolik: them vs leanpub
[21:33:09] Radar: They won't give it up, so I don't bother thinking much about it these days.
[21:33:17] Radar: I'd rather work on MTWR :)
[21:33:24] Radar: I haven't read Rails Refactoring
[21:35:58] rshetty: has joined #RubyOnRails
[21:36:00] FailBit: mfw my last console command took 5665567.1ms to run
[21:36:38] Radar: FailBit: Should've written the script in Elixir
[21:37:07] FailBit: that largely executed in C, as far as I know
[21:37:12] FailBit: because it was the database
[21:39:02] FailBit: >tfw we have a guardfile
[21:39:05] FailBit: "we have a guardfile?"
[21:39:09] VeryBewitching: I think we should build a Ruby to ASM evaluator.
[21:39:30] VeryBewitching: Nothing like machine-level.
[21:39:35] workmad3: has joined #RubyOnRails
[21:39:48] FailBit: VeryBewitching: actually
[21:39:51] FailBit: you can compile ruby to JS
[21:39:57] FailBit: and you can compile JS to ASM, no?
[21:40:02] VeryBewitching: JS is still interpreted.
[21:40:18] FailBit: but you can compile a specific subset to ASM
[21:40:31] VeryBewitching: Converting Ruby to Assembly code that runs properly would not be an easy task. :D
[21:40:46] VeryBewitching: Radar: What's that?
[21:40:51] FailBit: hacker news
[21:40:52] Radar: #hackernewslive
[21:41:18] kitsuneyo: has joined #RubyOnRails
[21:41:19] Radar: (aka I think this is a bad idea OR "computer guys trying to prove how smart they are by doing things no sane computer guy would ever do")
[21:41:32] Radar: "Panama Canal is backed up!" "
[21:41:37] Radar: "Just sail around South America"
[21:41:41] Radar: ^ literal HN advice
[21:41:43] FailBit: there is a difference between science and engineering
[21:42:34] thelastinuit: has joined #RubyOnRails
[21:42:59] FailBit: I seem to be missing a piece of my thumbnail
[21:43:08] VeryBewitching: Radar: I was *actually* suggesting that this be done. I think I would get lost trying to convert metaprogramming into instruction sets.
[21:43:23] VeryBewitching: haha, I can't type today.
[21:43:25] FailBit: nice clarification
[21:44:28] craysiii: gist is down??
[21:44:35] FailBit: works for me
[21:44:47] craysiii: im getting 500
[21:44:53] FailBit: https://gist.github.com/liamwhite/63eb054e6310771aa29d
[21:44:54] Radar: Works for me
[21:45:12] craysiii: i can click that link and it renders fine
[21:45:19] craysiii: but i can't go to gist.github.com
[21:45:48] craysiii: ... yeah it won't let me go to my profile either
[21:46:01] FailBit: maybe you got btfo
[21:46:07] Radar: craysiii: support@github.com
[21:46:18] ruurd_: has joined #RubyOnRails
[21:46:28] craysiii: okay so in the meantime, i have somewhat of a simple question i feel, should i post to pastebin or something?
[21:46:39] FailBit: use https://paste.debian.net
[21:46:45] maxx88: has joined #RubyOnRails
[21:46:53] craysiii: omg that site..
[21:47:19] FailBit: it's not nearly as obnoxious as pastebin.com
[21:47:24] FailBit: plus it also has https enabled
[21:47:27] FailBit: so that's a nice bonus
[21:48:57] surrealanalysis: has joined #RubyOnRails
[21:50:33] n1ck7: has joined #RubyOnRails
[21:50:45] gambl0re: anyone have experience with facebook graph api?
[21:51:02] craysiii: http://openpaste.org/3E202E7C I am wondering why my json is coming back escaped, and i want to unescape it so i can validate with JSONLint, how can it be done?
[21:55:45] ktchup: has joined #RubyOnRails
[21:58:00] rickmasta: has joined #RubyOnRails
[21:58:10] Radar: gambl0re: !used
[21:58:10] helpa: gambl0re: Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
[21:58:19] Radar: craysiii: pastie.org
[21:59:38] FailBit: le openpaste https://i.imgur.com/9SCW52D.png
[21:59:42] craysiii: http://pastie.org/10507473
[21:59:43] shibabu: has joined #RubyOnRails
[22:03:12] rickmasta: has joined #RubyOnRails
[22:04:04] craysiii: https://status.github.com/messages i knew it lol, of course i would be one of the unlucky ones :P
[22:05:21] ktchup: has joined #RubyOnRails
[22:05:23] craysiii: anyway: escaped json strings- what gives?
[22:05:45] mag42c: has joined #RubyOnRails
[22:05:59] rhizome: what's the deal with toothpaste
[22:07:12] jamto11: has joined #RubyOnRails
[22:07:27] gambl0re: gambl0re: !used
[22:08:31] FailBit: helpa is a bad bot
[22:11:47] jahbrewski: has joined #RubyOnRails
[22:15:16] kitsuneyo: has joined #RubyOnRails
[22:16:31] beast_: has joined #RubyOnRails
[22:19:26] cac: has joined #RubyOnRails
[22:22:24] rory096: has left #RubyOnRails: ()
[22:23:21] PlasmaStar: has joined #RubyOnRails
[22:25:07] ja: Is there something like Hash#rekey (http://stackoverflow.com/a/19460706/1569350) in Active Support?
[22:25:23] kitsuneyo: best way to test the content of a flash message with minitest?
[22:26:02] Aeyrix: Do the action then verify the page contains the designated contents.
[22:26:37] hephaestus_rg: has joined #RubyOnRails
[22:28:17] bonhoeffer: has joined #RubyOnRails
[22:31:51] mrbubbles: has joined #RubyOnRails
[22:33:44] bonhoeffer: has joined #RubyOnRails
[22:33:57] marr: has joined #RubyOnRails
[22:36:03] rhizome: kitsuney_: save it for capybara
[22:36:10] rhizome: or whatever you use for integrations
[22:36:38] rhizome: point being, do it in an integration test
[22:36:44] kitsuneyo: i use the built in stuff for integration tests
[22:37:28] kitsuneyo: i went with assert_not_equal flash[:notice], "string"
[22:41:11] h7br1x: has joined #RubyOnRails
[22:45:10] maxx88: has joined #RubyOnRails
[22:46:14] ModusPwnens: has joined #RubyOnRails
[22:47:58] dan0034001: has joined #RubyOnRails
[22:54:28] htmldrum: has joined #RubyOnRails
[22:55:36] dan343434: has joined #RubyOnRails
[22:56:40] ror15: has joined #RubyOnRails
[22:56:45] blackhuey: has joined #RubyOnRails
[22:57:09] sdwrage: has joined #RubyOnRails
[22:59:26] capin: i'm using the refile gem to manage attachments in a rails app, and I'm trying to figure out how I can delete an attachment that has been uploaded via an API. I know I can go in the rails console and delete the attachment that way, but is there a way to delete the file / attachment through a web browser?
[23:00:21] h7br1x: has joined #RubyOnRails
[23:01:32] jmaradin: has joined #RubyOnRails
[23:02:34] czerasz: has joined #RubyOnRails
[23:04:55] rhizome: well sure, by making a request to an action that does the stuff you did in console
[23:05:13] bonhoeffer: has joined #RubyOnRails
[23:05:31] kitsuneyo: has joined #RubyOnRails
[23:06:50] benlieb: has joined #RubyOnRails
[23:08:48] capin: i created a destroy action in my controller, and stubbed out a view, but no dice :/
[23:08:58] capin: ill make a gist
[23:11:17] Motoservo: has joined #RubyOnRails
[23:12:09] trosborn: has joined #RubyOnRails
[23:12:25] capin: https://gist.github.com/ipatch/a2fa755ff6d8bb45ca58
[23:13:11] darrencauthon: has joined #RubyOnRails
[23:14:28] Cervajz__: has joined #RubyOnRails
[23:16:33] RegulationD: has joined #RubyOnRails
[23:16:41] beauby: Is there a helper in rails for transforming [ :symbol1, :symbol2, hash_key1: :hash_value1, hash_key2: :hash_value2] into { symbol1: :symbol1, symbol2: :symbol2, hash_key1: :hash_value1, hash_key_2: :hash_value2 } ?
[23:16:49] riotjones: has joined #RubyOnRails
[23:17:53] pydave6367: has joined #RubyOnRails
[23:18:23] Ropeney: has joined #RubyOnRails
[23:19:07] t27duck: has joined #RubyOnRails
[23:19:17] hmsimha: has joined #RubyOnRails
[23:20:25] Radar: beauby: Hash[array]
[23:22:24] beauby: >> a = [ :a, b: :c ]; Hash[a] # Radar
[23:22:32] rubyscraper: has joined #RubyOnRails
[23:22:53] Radar: beauby: huh.
[23:23:02] shinnya: has joined #RubyOnRails
[23:23:06] Radar: oh I see.
[23:23:10] beauby: yields a "Warning element type Symbol at 0"
[23:24:09] Radar: So it's an array containing elements that are either k-v or hashes?
[23:24:54] beauby: Radar: In my usecase it's an array containing (0 or more) symbols and possibly a hash at the end.
[23:25:47] quazimodo: has joined #RubyOnRails
[23:26:22] htmldrum: has joined #RubyOnRails
[23:27:11] EminenceHC: has joined #RubyOnRails
[23:27:49] t27duck: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[23:28:47] h7br1x: has joined #RubyOnRails
[23:30:03] Radar: beauby: I don't know of one
[23:30:05] sdwrage: has joined #RubyOnRails
[23:30:07] Radar: beauby: reconsider your use case, perhaps?
[23:31:37] oflannabhra: has joined #RubyOnRails
[23:34:30] bobbobbins: has joined #RubyOnRails
[23:35:49] bobbobbins: hey, I posted this earlier, but I still don't have a solution so I'll ask again....I'm overriding a module in an initializer, and when I use the console, it seems to work, but on the web it doesn't...I can't figure out why...here is the initializer code: https://gist.github.com/anonymous/28745432474c28b5c895
[23:36:01] dikaio: has joined #RubyOnRails
[23:36:26] Radar: why are you using globals
[23:37:00] beast_: has left #RubyOnRails: ()
[23:37:32] Radar: (the things with the $ before them)
[23:38:10] beauby: Radar: I currently have a homemade helper, which does the job, but I was wondering whether there was some rails sweetness to do it. My usecase is declaring a whitelist with overriding (i.e. whitelist all the symbols/keys)
[23:38:16] baweaver: and module eval and what looks like a permission system
[23:38:30] beauby: The idea is that you can do [:title, :body, author: :user]
[23:38:37] rshetty: has joined #RubyOnRails
[23:38:55] baweaver: Strong Parameters
[23:39:07] Radar: beauby: why do you need it to be { title: :title, ... } though?
[23:39:15] beauby: which means "whitelist :title, :body and :author, but keep in mind that :author will be renamed :user"
[23:39:23] Radar: Can't you just check the type of the current element in the array. If it's a symbol, process it one way. If it's a hash, process it another.
[23:39:32] Radar: I missed a question mark in there somewhere.
[23:39:39] beauby: Radar: That's what I'm currently doing
[23:40:57] beauby: baweaver: How do Strong Params solve my issue (appart from the whitelisting part, obviously)
[23:41:24] baweaver: self answering question is self answering
[23:41:33] FailBit: bobbobbins: doesn't work as in what?
[23:41:45] FailBit: also, ewglobals
[23:42:09] bobbobbins: FailBit: I added in that extra HR to the array(they used globals so I did, but yes ew)
[23:42:16] n1lo: has joined #RubyOnRails
[23:42:26] Radar: baweaver: I don't think it's that simple.
[23:42:30] Radar: Hard to know without more context, of course.
[23:42:35] rickmasta: has joined #RubyOnRails
[23:42:40] FailBit: bobbobbins: but what doesn't work?
[23:42:42] baweaver: For the whitelist
[23:42:51] baweaver: which is the only question I could get out of there.
[23:43:08] bobbobbins: FailBit: There is a form that calls that to populate a pulldown, the pulldown only has the original 2 items
[23:43:44] FailBit: is it cached/
[23:43:50] FailBit: and anything else obvious
[23:44:16] beauby: baweaver: Thanks for your answer. Strong Params do not allow for renaming parameters though.
[23:44:27] bobbobbins: I reset the server a few times to be sure...I dont' think its caching, but I guess I could double check
[23:44:47] baweaver: you're effectively trying to make your own DSL at this point
[23:45:41] bobbobbins: no, caching is turned off
[23:45:44] Radar: beauby: I'd really like to know the idea behind this/
[23:46:43] FailBit: also, bobbobbins are you sure you want module_eval and not class_eval
[23:47:07] bobbobbins: FailBit: yeah, thats how it was in the gem
[23:47:15] beauby: Radar: Give me 5 minutes to finish the description of the corresponding PR and I'll send you the link. Should give more context.
[23:47:19] bobbobbins: (plus its working in the console)
[23:47:23] Radar: beauby: ok
[23:47:29] codelahoma: has joined #RubyOnRails
[23:48:39] gambl0re: has joined #RubyOnRails
[23:48:50] Radar: bobbobbins: The console doesn't get reloaded on every request for your app though
[23:49:07] Radar: bobbobbins: It's likely that this code is only being evaluated once, and then the module is being reloaded and the monkeypatch isn't being reloaded.
[23:49:58] Radar: bobbobbins: https://gist.github.com/radar/d9d24ebfede132ec8b4d
[23:50:10] Radar: bobbobbins: Try that out and let me know if it fixes the issues.
[23:50:39] rubyscraper: has left #RubyOnRails: ()
[23:50:50] jenrzzz: has joined #RubyOnRails
[23:51:02] workmad3: has joined #RubyOnRails
[23:51:40] bobbobbins: Radar: Where do I put that?
[23:52:25] beauby: Radar: https://github.com/rails-api/active_model_serializers/pull/1248
[23:53:46] dan0034001: has joined #RubyOnRails
[23:55:36] FailBit: binding.binding
[23:55:38] FailBit: NoMethodError: private method `binding' called for #<Binding:0x007f6ac200b318>
[23:55:46] FailBit: binding.send :binding
[23:55:48] FailBit: => #<Binding:0x007f6ac5d51970>
[23:56:13] FailBit: and in the darkness
[23:56:55] gambl0re: has joined #RubyOnRails
[23:57:31] Radar: bobbobbins: config/initializers/somewhere.rb