« Back to channel list

#RubyOnRails - 13 June 2015

« Back 1 day Forward 1 day »
[00:02:33] Spami: smathy, any idea?
[00:03:16] drale2k: where do you guys host your sites? I don't feel like running my own server and heroku is too expensive
[00:03:23] drale2k: is there a sane ruby / rails host ?
[00:03:45] Spami: drale2k, i run my own server :/
[00:03:54] drale2k: i feel like everyone does :/
[00:04:06] Axsuul: has joined #RubyOnRails
[00:04:17] jhass: Spami: what about bundle show metamagic ?
[00:04:24] bkparso: has joined #RubyOnRails
[00:05:09] bkparso: has left #RubyOnRails: ()
[00:06:26] jhass: drale2k: there's OpenShift, if you don't need rails 4.2
[00:06:33] Spami: jhass, /var/www/data/shared/bundle/ruby/2.1.0/gems/metamagic-3.1.7
[00:06:38] rdavila: has joined #RubyOnRails
[00:06:40] cesarstafe: has joined #RubyOnRails
[00:06:54] jhass: Spami: maybe it's time to elaborate on "not being used"
[00:07:12] Spami: I have in in my gem file
[00:07:18] Spami: I add the code in my files
[00:07:33] Spami: and I get:undefined method `metamagic'
[00:07:38] Spami: but it works in dev env
[00:08:14] hotpancakes: has joined #RubyOnRails
[00:08:35] yoongkang: has joined #RubyOnRails
[00:08:57] Spami: when I run a bundle install on the server i get: Using metamagic (3.1.7)
[00:09:07] drale2k: jhass: hm still $18 / month .. for a single site that's too expensive
[00:09:10] baweaver: has joined #RubyOnRails
[00:09:38] drale2k: is there no old school host with web space, ftp ,email etc and you pay a fixed price
[00:10:10] jhass: Spami: one odd thing is that the gem isn't written as a rails engine
[00:10:28] renews: has joined #RubyOnRails
[00:10:49] fryguy: drale2k: should be pretty straightforward to get a digital ocean setup for $5/mo
[00:11:09] drale2k: fryguy: it's not straight forward when i have to manage a server myself
[00:11:23] drale2k: setup rails, postgres, capistrano etc
[00:11:41] jhass: Spami: wth https://github.com/lassebunk/metamagic/issues/14
[00:11:43] smathy: Spami, doesn't look like it installed any gems.
[00:11:56] jhass: smathy: note --quiet
[00:12:00] fryguy: it's really not that hard
[00:12:10] smathy: jhass, ah :)
[00:12:31] SteenJobs: Devise - i???m trying to allow a user to update their profile picture on their profile page by embedding an edit_registration form on the profile page - however, in order to edit the profile devise requires a password to be entered - how can i get around this just for when the user updates their photo?
[00:12:38] Spami: jhass, yeah I saw that issue
[00:12:48] Spami: but it's closed without an answer
[00:13:21] jhass: well the answer is "restart unicorn until it works" :/
[00:13:28] allcentury: has joined #RubyOnRails
[00:13:33] Spami: jhass, I tried
[00:13:36] Spami: (I have puma)
[00:13:43] jhass: my guess is that it's a load order issue due to not properly deferring the include due to not using a rails engine
[00:14:13] Spami: also, it works on my computer
[00:14:16] Spami: with production env
[00:14:51] jhass: load order issues can do that, since load order is not deterministic
[00:15:17] Spami: How can I fix that?
[00:15:19] jhass: but it's only a rough guess
[00:15:32] jhass: well, if I'm right you probably can't
[00:15:46] cmisenas: has joined #RubyOnRails
[00:16:05] Spami: that doesn't make sense
[00:16:07] jhass: note I'm only 60-70% sure about that, I just find it the most likely explanation atm
[00:16:24] Spami: I have 2 rails app on the same server
[00:16:30] Spami: could it be an issue?
[00:16:43] jhass: doubt it, bundler should properly isolate them
[00:17:19] Spami: yeah, /var/www/data is a specific directory
[00:18:36] jhass: actually you could try doing https://github.com/lassebunk/metamagic/blob/master/lib/metamagic.rb#L15 again in an initializer
[00:19:17] DoctorMonocular: has joined #RubyOnRails
[00:20:38] ascarter: has joined #RubyOnRails
[00:22:22] Spami: jhass, works
[00:22:30] Spami: I'm not sure what happened tho
[00:22:58] Spami: but thanks a lot!!!
[00:23:33] krisquigley: has joined #RubyOnRails
[00:24:23] jhass: Spami: make sure to open an issue about that
[00:24:27] sinkensabe: has joined #RubyOnRails
[00:24:28] jhass: it's the wrong way to do it
[00:24:33] Spami: in the gem ?
[00:24:50] asheinfeld: has joined #RubyOnRails
[00:25:27] cmisenas: has joined #RubyOnRails
[00:26:24] Casty: has joined #RubyOnRails
[00:35:15] rickmasta: has joined #RubyOnRails
[00:35:49] fedexo: has joined #RubyOnRails
[00:39:31] jesterfraud: has joined #RubyOnRails
[00:40:11] robustus: has joined #RubyOnRails
[00:40:36] asheinfeld: has joined #RubyOnRails
[00:40:39] rdavila: has joined #RubyOnRails
[00:41:44] jenrzzz: has joined #RubyOnRails
[00:45:16] bmurt: has joined #RubyOnRails
[00:48:25] jphenow: has joined #RubyOnRails
[00:50:51] ascarter: has joined #RubyOnRails
[00:51:21] dstarh: has joined #RubyOnRails
[00:52:30] ascarter: has joined #RubyOnRails
[00:53:18] jenrzzz: has joined #RubyOnRails
[00:53:41] bronson: has joined #RubyOnRails
[00:56:14] jacaballero: has joined #RubyOnRails
[00:57:51] neanderslob: hi all, I'm trying to understand some basic terminology
[00:58:43] DLSteve: has joined #RubyOnRails
[00:58:53] neanderslob: if I have a loop inside my controller: @contractor_type.each do |ctype| is "ctype" considered an instance variable?
[01:01:10] Casty: no i believe it would be called a local var. instance vars begin with @
[01:01:48] neanderslob: Casty: cool thanks
[01:03:15] smathy: neanderslob, confirmed, Casty is right. Although we often further differentiate those variables calling them "block variable" because they're only scoped to within that block.
[01:03:29] jstanton: has joined #RubyOnRails
[01:03:59] neanderslob: smathy: nice tip; I'd been seeing the term "block variable" in different posts
[01:04:03] neanderslob: smathy: that makes sense
[01:04:07] pulgalipe: has joined #RubyOnRails
[01:05:04] pulgalipe: has joined #RubyOnRails
[01:05:15] neanderslob: smathy: would I be correct in assuming that using the @ symbol automatically makes a given variable an instance variable?
[01:05:43] acti0nman: has joined #RubyOnRails
[01:06:14] crevax: has joined #RubyOnRails
[01:08:24] chintanparikh: has joined #RubyOnRails
[01:08:34] ght: Question: What is the ideal way to stop controller execution? For example, I'm writing an API, and if certain paraemters aren't present in the API string, I want the controller to render JSON with status: fail, and I want execution to halt, because there are operations I perform in the controller that require certain parameters that I know will generate an execption if the parameters are nil.
[01:09:01] ght: Basically, just trying to avoid an explantion that tries to get me to change the methodology instead of answering the question.
[01:09:09] ght: Is there a good way to halt controller execution?
[01:10:41] neanderslob: ght: have you tried using break?
[01:10:46] ferr1: has joined #RubyOnRails
[01:10:55] ght: Is that the ideal method to use?
[01:11:04] ght: I figured abort, what I'd normally use in ruby, wouldn't apply to a rails application.
[01:11:14] ght: But break is the preferred one to use, ok.
[01:11:27] ght: Thank you neanderslob.
[01:12:16] neanderslob: ght: welcome; I've used break before for (as far as I can tell) similar applications
[01:14:10] smathy: neanderslob, yes, although depending on the context it might not be the instance variable of what you expect it to be, because in ruby all code is executed in the context of some instance.
[01:14:54] neanderslob: smathy: fair enough, thanks
[01:15:51] pereba: has joined #RubyOnRails
[01:16:52] bronson: has joined #RubyOnRails
[01:21:25] pulgalipe: has joined #RubyOnRails
[01:21:35] michael_mbp: has joined #RubyOnRails
[01:22:32] bin_005_i: has joined #RubyOnRails
[01:22:58] cesarstafe: has joined #RubyOnRails
[01:23:44] pulgalipe: has joined #RubyOnRails
[01:23:45] ferr1: has joined #RubyOnRails
[01:25:10] bruno-: has joined #RubyOnRails
[01:26:14] imuglyandimproud: has joined #RubyOnRails
[01:26:46] imuglyandimproud: hey all, I'm looking for some help with setting up Chewy mappings
[01:27:28] pulgalipe: has joined #RubyOnRails
[01:27:31] rhizome: what's "chewy?"
[01:27:42] imuglyandimproud: rails interface for elasticsearch
[01:28:58] nobitanobi: has joined #RubyOnRails
[01:29:51] pulgalipe: has joined #RubyOnRails
[01:31:15] ferr1: has left #RubyOnRails: ()
[01:32:12] funnel: has joined #RubyOnRails
[01:32:18] ferr: has joined #RubyOnRails
[01:32:24] commondream: has joined #RubyOnRails
[01:33:54] asheinfeld: has joined #RubyOnRails
[01:36:05] CyborgCygnus: has joined #RubyOnRails
[01:37:12] neruda: has joined #RubyOnRails
[01:40:39] quazimodo: has joined #RubyOnRails
[01:43:26] mary5030: has joined #RubyOnRails
[01:44:12] beauby: has joined #RubyOnRails
[01:44:34] neruda: what does it really mean to add a product to a "cart"? does it mean storing data into session until POST or building an object? or both?
[01:48:21] scottmatheina: has joined #RubyOnRails
[01:50:23] Axsuul: has joined #RubyOnRails
[01:51:25] SteenJobs: anyone familiar with overriding devise methods that require password submission for updating a user?
[01:52:00] ivanskie: has joined #RubyOnRails
[01:52:15] rhizome: neruda: can be any/all of that
[01:52:15] weaksauce: has joined #RubyOnRails
[01:53:45] one_zero: has joined #RubyOnRails
[01:54:12] chouhoulis: has joined #RubyOnRails
[01:54:15] annlewis: has joined #RubyOnRails
[01:55:29] djbkd: has joined #RubyOnRails
[01:57:20] jeramy_s: has joined #RubyOnRails
[01:58:30] baweaver: has joined #RubyOnRails
[01:59:16] merryfett: has joined #RubyOnRails
[02:02:56] bendangelo: has joined #RubyOnRails
[02:03:22] jenrzzz: has joined #RubyOnRails
[02:03:52] umgrosscol: has joined #RubyOnRails
[02:06:35] kinduff: has joined #RubyOnRails
[02:08:26] CyborgCygnus: has joined #RubyOnRails
[02:09:04] beauby: has joined #RubyOnRails
[02:09:42] mheld: has joined #RubyOnRails
[02:09:53] nobitanobi: has joined #RubyOnRails
[02:09:53] jstanton: has joined #RubyOnRails
[02:12:33] krisquigley: has joined #RubyOnRails
[02:13:32] SteenJobs: has joined #RubyOnRails
[02:13:48] neruda: rhizome: i understand, it certainly feels like i need both, but i want to be sure, so is the approach of 1] storing in session 2] bind to object just before POST the "rails way"?
[02:18:04] johntrails: has joined #RubyOnRails
[02:19:21] CyborgCygnus: has joined #RubyOnRails
[02:20:54] rickmasta: has joined #RubyOnRails
[02:21:51] kinduff: has joined #RubyOnRails
[02:24:17] SeanLazer: has joined #RubyOnRails
[02:27:48] beauby: has joined #RubyOnRails
[02:31:15] bronson: has joined #RubyOnRails
[02:31:33] chintanparikh: has joined #RubyOnRails
[02:32:45] siaw23: has joined #RubyOnRails
[02:32:59] duderonomy: has joined #RubyOnRails
[02:35:42] francois_: has joined #RubyOnRails
[02:36:25] RegulationD: has joined #RubyOnRails
[02:38:35] djbkd: has joined #RubyOnRails
[02:38:57] bahar: has joined #RubyOnRails
[02:39:37] pontiki: has joined #RubyOnRails
[02:45:46] bobbobbins: has joined #RubyOnRails
[02:46:33] dalafa: has joined #RubyOnRails
[02:46:33] asheinfeld: has joined #RubyOnRails
[02:49:57] yoongkang: has joined #RubyOnRails
[02:51:27] johntrails: has joined #RubyOnRails
[02:52:35] daveg_: has joined #RubyOnRails
[02:53:32] doodlehaus: has joined #RubyOnRails
[02:53:58] adavia: any idea why im not being redirected plus not getting the notice in line 9 http://pastie.org/10238188
[02:55:27] pontiki: adavia:did the @user.send_activation_mail fail for some reason? anything in the logs, etc?
[02:55:48] pontiki: can you say what is happening instead?
[02:56:19] x1337807x: has joined #RubyOnRails
[02:56:31] adavia: pontiki: no.. it works fine
[02:56:45] adavia: everything is good except im not getting the notice
[02:56:54] pontiki: so you are getting redirected?
[02:57:07] pontiki: then everything is not fine
[02:57:13] pontiki: what is happening instead
[02:57:37] hotpancakes: has joined #RubyOnRails
[02:58:10] adavia: pontiki: i just only get the json response in line 10
[02:58:11] gmixalot: has joined #RubyOnRails
[02:58:33] pontiki: what's the log show for the POST?
[02:59:03] MEATCHICKEN: has joined #RubyOnRails
[02:59:09] adavia: im kind new in this field. how can i check that?
[02:59:40] pontiki: look in the log directory. assuming you're running in the development environment, it would be log/development.log
[03:01:13] jcaho: has joined #RubyOnRails
[03:02:16] adavia: pontiki: i get the rendered email and also Completed 201 Created in 766ms (Views: 1.7ms | ActiveRecord: 162.3ms)
[03:02:45] adavia: seems like it skips the redirect part
[03:02:48] pontiki: look above that for the POST line
[03:05:00] adavia: Started POST "/users.json" for 127.0.0.1 at 2015-06-12 21:59:29 -0500 Processing by UsersController#create as JSON
[03:05:15] pontiki: that's why: you have called /users.json
[03:05:43] pontiki: so it responds with the json format
[03:06:03] Forgetful_Lion: has joined #RubyOnRails
[03:07:25] adavia: pontiki: yeah beacause im setting format: "json" in my form
[03:08:15] beauby: has joined #RubyOnRails
[03:09:35] michael_mbp: has joined #RubyOnRails
[03:10:14] braincrash: has joined #RubyOnRails
[03:11:01] pontiki: then i'm curious why you expect it to respond with format html?
[03:11:29] commondream: has joined #RubyOnRails
[03:12:25] adavia: pontiki: then how can i respond with json when the ajax failed or html on success
[03:13:10] pontiki: i have no idea how you'd do that
[03:13:20] pontiki: it doesn't really make sense to me
[03:13:48] pontiki: if you're making an ajax call, complete the ajax cycle and have your browser make the request
[03:14:17] bruno-: has joined #RubyOnRails
[03:14:29] adavia: pontiki: im following basically this http://edgeguides.rubyonrails.org/working_with_javascript_in_rails.html#server-side-concerns
[03:14:43] yoongkang: has joined #RubyOnRails
[03:14:54] pontiki: then you're probably looking at something that hasn't been implemented yet.
[03:15:06] pontiki: just use the guides
[03:15:16] adavia: its the ruby guide
[03:15:22] pontiki: no, it's the edge guide
[03:17:09] baweaver: has joined #RubyOnRails
[03:17:23] adavia: guess i will add the notice messge in the json response
[03:21:32] salc1: has joined #RubyOnRails
[03:24:37] Axsuul: has joined #RubyOnRails
[03:27:44] umgrosscol: has joined #RubyOnRails
[03:30:28] yoongkang: has joined #RubyOnRails
[03:31:10] scottmatheina: has joined #RubyOnRails
[03:33:03] justintv90: has joined #RubyOnRails
[03:40:39] aloneintheworld: has joined #RubyOnRails
[03:42:09] commondream: has joined #RubyOnRails
[03:45:32] stalcott: has joined #RubyOnRails
[03:46:49] SteenJobs: has joined #RubyOnRails
[03:47:54] sonofdirt: has joined #RubyOnRails
[03:47:56] intuxicated: has joined #RubyOnRails
[03:49:45] ivanskie: has joined #RubyOnRails
[03:52:12] mary5030: has joined #RubyOnRails
[03:53:11] cornerma1: has joined #RubyOnRails
[03:57:38] byprdct: has joined #RubyOnRails
[03:59:28] byprdct: has joined #RubyOnRails
[04:01:27] krisquigley: has joined #RubyOnRails
[04:05:06] merryfett: has joined #RubyOnRails
[04:05:07] x1337807x: has joined #RubyOnRails
[04:10:23] jstanton: has joined #RubyOnRails
[04:11:03] asheinfeld: has joined #RubyOnRails
[04:14:54] salc1: has joined #RubyOnRails
[04:15:01] Spami: has joined #RubyOnRails
[04:19:38] byprdct: has joined #RubyOnRails
[04:20:18] yoongkang: has joined #RubyOnRails
[04:20:44] byprdct: has joined #RubyOnRails
[04:21:01] x-light: has joined #RubyOnRails
[04:25:50] RegulationD: has joined #RubyOnRails
[04:28:09] moeabdol: has joined #RubyOnRails
[04:28:54] ndrei: has joined #RubyOnRails
[04:29:02] daveg_: has joined #RubyOnRails
[04:36:07] DoctorMonocular: has joined #RubyOnRails
[04:36:59] dseitz: has joined #RubyOnRails
[04:37:02] RegulationD: has joined #RubyOnRails
[04:38:22] rickmasta: has joined #RubyOnRails
[04:39:57] bobbobbins: has joined #RubyOnRails
[04:42:55] riotjones: has joined #RubyOnRails
[04:46:56] joaomdmoura: has joined #RubyOnRails
[04:49:31] jenrzzz: has joined #RubyOnRails
[04:50:43] bronson: has joined #RubyOnRails
[04:53:20] SteenJobs: has joined #RubyOnRails
[04:59:05] DLSteve: has joined #RubyOnRails
[05:00:33] ght: Question: Does controller action execution stop when a respond_to block is called?
[05:01:49] rhizome: put a logger.debug "
[05:01:58] rhizome: logger.debug "can u see me?" after it
[05:03:02] bruno-: has joined #RubyOnRails
[05:04:49] CalvinnHobbes: has joined #RubyOnRails
[05:05:26] Mia: has joined #RubyOnRails
[05:06:51] guest123: has joined #RubyOnRails
[05:08:49] Behi: has joined #RubyOnRails
[05:09:35] Behi: Using simple_form is there a way to create a field that is not associated with the form's model?
[05:09:44] strcmp1: has joined #RubyOnRails
[05:14:14] CalvinnHobbes: has joined #RubyOnRails
[05:18:09] rhizome: what do you want it for?
[05:18:35] yoongkang: has joined #RubyOnRails
[05:19:13] ferr: has joined #RubyOnRails
[05:19:57] greengriminal: has joined #RubyOnRails
[05:21:06] robbyoconnor: has joined #RubyOnRails
[05:27:19] jeramy_s: has joined #RubyOnRails
[05:27:33] ivanskie: has joined #RubyOnRails
[05:28:06] Xiti: has joined #RubyOnRails
[05:29:44] x1337807x: has joined #RubyOnRails
[05:30:30] KamalKaur: has joined #RubyOnRails
[05:33:00] aloneintheworld: has joined #RubyOnRails
[05:33:01] joaomdmoura: has joined #RubyOnRails
[05:34:30] lxsameer: has joined #RubyOnRails
[05:34:30] lxsameer: has joined #RubyOnRails
[05:39:42] montagne_goat: has joined #RubyOnRails
[05:40:08] xfny: has joined #RubyOnRails
[05:41:03] fny: has joined #RubyOnRails
[05:42:55] jacaballero_: has joined #RubyOnRails
[05:47:40] Gaelan: has joined #RubyOnRails
[05:47:57] arBmind: has joined #RubyOnRails
[05:49:03] otherj: has joined #RubyOnRails
[05:49:27] commondream: has joined #RubyOnRails
[05:50:19] yfeldblum: has joined #RubyOnRails
[05:50:22] krisquigley: has joined #RubyOnRails
[05:51:09] duncannz: has joined #RubyOnRails
[05:55:55] JamesDH: has joined #RubyOnRails
[06:03:26] op: has joined #RubyOnRails
[06:08:31] siaw23: has joined #RubyOnRails
[06:13:11] francoi__: has joined #RubyOnRails
[06:13:41] drale2k: has joined #RubyOnRails
[06:16:40] Guest80523: has left #RubyOnRails: ()
[06:18:53] silverdust: has joined #RubyOnRails
[06:24:41] commondream: has joined #RubyOnRails
[06:25:34] bronson: has joined #RubyOnRails
[06:34:30] roolo: has joined #RubyOnRails
[06:34:41] SteenJobs: has joined #RubyOnRails
[06:37:06] michael_mbp: has joined #RubyOnRails
[06:40:34] codezomb: has joined #RubyOnRails
[06:44:34] lessless: has joined #RubyOnRails
[06:51:47] bruno-: has joined #RubyOnRails
[06:53:35] AussieDownUnder: has joined #RubyOnRails
[06:58:32] rickmasta: has joined #RubyOnRails
[07:00:26] DoubleMalt: has joined #RubyOnRails
[07:00:49] yfeldblum: has joined #RubyOnRails
[07:01:59] chintanparikh: has joined #RubyOnRails
[07:04:14] x44x45x41x4E: has joined #RubyOnRails
[07:06:39] siaw23: has joined #RubyOnRails
[07:07:35] GPrime: has joined #RubyOnRails
[07:08:22] siaw23: has joined #RubyOnRails
[07:10:03] siemprefresco: has joined #RubyOnRails
[07:18:49] moeabdol: has joined #RubyOnRails
[07:24:12] chintanparikh: has joined #RubyOnRails
[07:24:15] Dreamer3: has joined #RubyOnRails
[07:24:26] haz111_: has joined #RubyOnRails
[07:26:29] RegulationD: has joined #RubyOnRails
[07:31:08] srinidhi: has joined #RubyOnRails
[07:32:18] hardlin3r: has joined #RubyOnRails
[07:34:18] CalvinnHobbes: has joined #RubyOnRails
[07:38:00] yoongkang: has joined #RubyOnRails
[07:38:14] ohhmaar: has joined #RubyOnRails
[07:39:22] krisquigley: has joined #RubyOnRails
[07:41:01] Guest6: has joined #RubyOnRails
[07:43:19] DoctorMonocular: has joined #RubyOnRails
[07:43:58] DoctorMonocular: has joined #RubyOnRails
[07:45:24] Pupeno: has joined #RubyOnRails
[07:46:47] jsrn_: has joined #RubyOnRails
[07:48:47] attlasbot: has joined #RubyOnRails
[07:52:15] salc1: has joined #RubyOnRails
[07:53:44] sandstrom: has joined #RubyOnRails
[07:56:35] Cache_Money: has joined #RubyOnRails
[07:57:32] x-light: has joined #RubyOnRails
[08:03:53] ylla: has joined #RubyOnRails
[08:05:28] ohhmaar: has joined #RubyOnRails
[08:05:57] edwinvdgraaf: has joined #RubyOnRails
[08:07:09] salc1: has joined #RubyOnRails
[08:07:49] salc1: Hello everyone! Does anyone know how to "tell" a controller to "print" a view?
[08:08:05] salc1: I'm new to this, so please forgive me for wrong terminology
[08:08:46] ndrei: has joined #RubyOnRails
[08:08:54] salc1: Basically when I visit localhost:3000/static_pages/home, I want to open the "home" html file
[08:09:18] salc1: However in the StaticPages controller, the "home" action is empty, so I get an error.
[08:09:33] djellemah: has joined #RubyOnRails
[08:09:34] salc1: What should I put in this "home" method (or action) in the controller?
[08:11:36] michael_mbp: has joined #RubyOnRails
[08:12:16] jhass: salc1: if you define app/views/static_pages/home.html.erb, it should just work
[08:12:44] salc1: Jhass, sorry, what do you mean by define?
[08:12:46] Pupeno: has joined #RubyOnRails
[08:12:56] jhass: create, write
[08:13:46] salc1: So right now it's empty - I tried typing "render text: "hello"" and it prints it fine. But what if I want to pull up that home view?
[08:14:02] salc1: I just type the path to the view?
[08:14:40] darutoko: has joined #RubyOnRails
[08:16:26] neanderslob: has joined #RubyOnRails
[08:17:01] jhass: I just tried it, empty action works fine
[08:17:13] jhass: what's the error you're getting?
[08:18:46] edwinvdgraaf: has joined #RubyOnRails
[08:19:11] salc1: http://i.imgur.com/1qyJ9VE.png
[08:20:22] salc1: Weird, empty doesn't work for me
[08:20:44] jhass: well, that error doesn't look like it's empty
[08:21:23] jhass: but that line 3 of static_pages_controller.rb has something that references "app"
[08:22:16] salc1: Oh that might have been because I just addded it right now while on here
[08:22:19] salc1: just trying new things
[08:22:23] salc1: ill send you the original error
[08:22:40] SteenJobs: has joined #RubyOnRails
[08:22:49] neanderslob: has joined #RubyOnRails
[08:22:52] Kovensky: has joined #RubyOnRails
[08:23:29] salc1: http://i.imgur.com/z1bQzSc.png
[08:23:34] salc1: It says line 6
[08:23:58] salc1: which is "def help" - I wonder why that would be an error?
[08:24:19] salc1: This is all I have in my controller.
[08:24:22] salc1: class StaticPagesController < ApplicationController
[08:24:51] jhass: notice the file!
[08:24:58] jhass: it's not static_pages_controller.erb
[08:25:02] jhass: it's your layout
[08:26:03] Rubie: has joined #RubyOnRails
[08:27:00] jenrzzz: has joined #RubyOnRails
[08:27:12] wethu: has joined #RubyOnRails
[08:27:54] salc1: Oh! So it's this line that's giving an error
[08:27:55] salc1: <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
[08:28:14] salc1: Do you see anything syntactically incorrect? By the way, this is all autogenerated code - I didn't type any of this.
[08:28:21] salc1: Learning from the Rails Tutorial
[08:28:47] jhass: that error is quite weird tbh, I've never seen it before
[08:29:17] jhass: you really didn't touch a single line in application.html.erb, not by a single character?
[08:30:28] salc1: This is what I did yesterday when I was looking for help - in line 5
[08:30:29] salc1: (<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>)
[08:30:37] salc1: (ignore the parenthesis)
[08:30:49] salc1: someone suggested that I do media=> instead of media:
[08:30:57] salc1: I tried that out, it didn't work, so I reverted it back to the way it was
[08:31:28] jhass: mixing them is style wise not so nice but syntactically valid
[08:31:39] SteenJobs: post the application.html.erb file?
[08:31:40] yottanami: has joined #RubyOnRails
[08:31:40] RegulationD: has joined #RubyOnRails
[08:32:00] salc1: <!DOCTYPE html>
[08:32:00] rromanchuk: has joined #RubyOnRails
[08:32:00] salc1: <title>SampleApp</title>
[08:32:00] salc1: <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
[08:32:01] salc1: <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
[08:32:01] yottanami: Is anyway to define some conditions in default_scope?
[08:32:01] jhass: salc1: did you edit anything in assets/javascripts/application.js ?
[08:32:03] salc1: <%= csrf_meta_tags %>
[08:32:09] salc1: <%= yield %>
[08:32:14] jhass: salc1: !gist
[08:32:14] helpa: salc1: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[08:32:28] yottanami: I want check if user.admin? returns all elese returns only published items
[08:32:53] salc1: @jhass - nope, editing nothing there!
[08:33:08] salc1: @yottanami - sorry, not sure what you mean?
[08:33:28] salc1: ^oh, you're not talking to me lol. My bad.
[08:33:55] SteenJobs: salc1: post your application.html.erb in a gist
[08:34:00] KamalKaur: has joined #RubyOnRails
[08:34:03] jhass: salc1: I guess we shall IT's first response: have you tried turning it off and on again? kill rails s (rails server), spring stop, start again with rails s
[08:34:03] SteenJobs: so we can see what line 6 is. also post the full trace
[08:34:09] jhass: *shall try
[08:34:15] Lightsword: has joined #RubyOnRails
[08:35:01] salc1: @SteenJobs - https://gist.github.com/sahilc0/a170ffd6e6fb70295a49
[08:35:26] salc1: @jhass - yep, I tried this yesterday as well, so I've done that :(
[08:36:10] jhass: running out of clues... can you zip the whole thing up and upload it somewhere?
[08:36:16] hotpancakes: has joined #RubyOnRails
[08:36:31] SteenJobs: salc1: are you pushing it remotely to github?
[08:37:03] salc1: @jhass @SteenJobs - yep I am
[08:37:10] SteenJobs: what???s the link to the reop
[08:37:42] SteenJobs: nvrm, got it
[08:37:52] salc1: Oh got it?
[08:37:58] salc1: It's the static_pages branch
[08:38:12] salc1: *static-pages
[08:38:17] jhass: you didn't paste any link
[08:38:55] salc1: https://github.com/sahilc0/sample_app
[08:39:02] salc1: static-pages branch
[08:39:53] SteenJobs: is your folder named views/layouts? layouts should be a subdirectory within the views folder
[08:40:27] SteenJobs: oh i was checking master
[08:40:50] edwinvdgraaf: has joined #RubyOnRails
[08:41:38] sinkensabe: has joined #RubyOnRails
[08:41:42] jhass: github just displays it that way
[08:41:51] jhass: if there's a single child in the directory
[08:41:55] jhass: anyway, it just works here
[08:41:59] jcaho: has joined #RubyOnRails
[08:42:01] jhass: ACTION blames windows :P
[08:42:15] l0oky: has joined #RubyOnRails
[08:42:15] jhass: which ruby version do you use?
[08:42:23] SteenJobs: jhass: oh word
[08:42:41] SteenJobs: jhass: good question. my money is on that.
[08:42:42] salc1: Oh so it works for you?? :O I have ruby 2.1
[08:42:52] salc1: rails 4.2.1
[08:44:05] SteenJobs: salc1: http://stackoverflow.com/questions/12520456/execjsruntimeerror-on-windows-trying-to-follow-rubytutorial
[08:44:10] jhass: yap, just works here, Ruby 2.1, bundle exec rails s (so we got the same as you)
[08:44:32] ArrogantPrick: has joined #RubyOnRails
[08:44:43] jhass: ah, so windows indeed then :P
[08:44:57] SteenJobs: salc1: as a heads up, that took about 3 seconds to find...
[08:45:19] jhass: I should've googled that, yeah
[08:45:25] SteenJobs: jhass: another win against those that ignorantly love flouting how much better windows is than mac OS X :)
[08:45:56] jhass: well, I ignorantly flout that arch is better than any of those two ;P
[08:46:06] SteenJobs: at least it???s not windows!
[08:46:27] SteenJobs: jhass: any wild chance you???re well versed in devise + facebook omniauth?
[08:46:36] ArrogantPrick: I use ubuntu, but it's my first linux distro. I only started about 6 months ago
[08:46:43] ArrogantPrick: I'm a little intimidated by Arch
[08:46:48] jhass: I have a very long stick between me and facebook
[08:47:03] jhass: ArrogantPrick: that's fine
[08:47:06] salc1: Sorry guys! Thanks so much for your help!
[08:47:18] salc1: (definitely getting a Mac next)
[08:47:30] ArrogantPrick: it's better than winblows
[08:47:51] sinkensabe: has joined #RubyOnRails
[08:47:52] SteenJobs: salc1: no worries - let us know if you still have trouble getting it up and running
[08:48:04] jhass: ArrogantPrick: if you like to play a lot and try out new stuff something like Antergos might be something for you though, but getting the first skills on Ubuntu is just fine, did the same and just got tired of reinstalling it after every dist upgrade ;)
[08:48:36] ArrogantPrick: well.. I chose 14.04 LTS.. I don't think I'll be upgrading soon
[08:48:52] jhass: aw, I couldn't get stuck on ancient stuff like that :P
[08:49:13] ArrogantPrick: I need a stable system. I only have the one laptop and can't afford to fuck anything up on it
[08:49:28] jhass: backups...
[08:49:37] ArrogantPrick: also, what do you recommend for a good cli irc client
[08:49:45] jhass: that said I fucked up my ubuntus a lot more often
[08:49:58] ArrogantPrick: for command line?
[08:50:11] SteenJobs: aright, peace brothers. sun is rising, probs time to head to sleep.
[08:50:20] ArrogantPrick: night SteenJobs
[08:50:26] SteenJobs: i swear, this stuff is harder to stop than cocaine
[08:50:31] ArrogantPrick: word, I think I'll check it out
[08:50:46] jhass: ArrogantPrick: http://dev.weechat.org/post/2011/08/28/Beautify-your-WeeChat is a good base so it doesn't look too boring
[08:50:58] jhass: + buffers.pl of course
[08:52:51] Pazician: has joined #RubyOnRails
[08:54:07] SteenJobs: has left #RubyOnRails: ()
[08:55:58] ArrogantPrick: has joined #RubyOnRails
[08:56:11] ArrogantPrick: alright dude, you're going to have to give Me the lowdown on this client
[08:56:12] DoctorMonocular: has joined #RubyOnRails
[08:57:11] jhass: well, you connected already, right?
[08:57:21] KamalKaur: has joined #RubyOnRails
[08:57:31] jhass: everything else will come over time
[08:57:51] jhass: no seriously, it's extremely configurable
[08:57:52] ArrogantPrick: what about going to the other window.. specifically the server window
[08:58:13] jhass: Alt+1 should do it
[08:58:19] ArrogantPrick: I used to write extensive MiRC scripts, but that was a long time ago
[08:58:40] jhass: Ctrl+X to switch in the server window between it and the weechat one
[08:59:01] jhass: and actually these are called buffers in weechat and windows are a group of them
[08:59:16] wethu: has joined #RubyOnRails
[08:59:17] ArrogantPrick: kind of like vim?
[08:59:24] DLSteve: has joined #RubyOnRails
[08:59:25] jhass: yeah I guess
[08:59:35] jhass: things like the input etc are called bars
[08:59:47] wethu: has joined #RubyOnRails
[08:59:57] ArrogantPrick: can I have more than one buffer up in a window?
[08:59:57] jhass: best is you do /script and install buffers.pl and iset for starters
[09:00:03] sinkensabe: has joined #RubyOnRails
[09:00:31] jhass: yeah there's a way but I get confused by that every time so I don't know it from the top of my head :P
[09:00:45] jhass: probably explained in /help window
[09:00:57] Surt_Q: has joined #RubyOnRails
[09:01:27] ArrogantPrick: I'll poke around
[09:01:43] n008f4g_: has joined #RubyOnRails
[09:02:33] jhass: ArrogantPrick: http://dev.weechat.org/post/2008/10/25/Smart-IRC-join-part-quit-message-filter another one that should be active by default btw
[09:03:09] ArrogantPrick: right, now I'm all setup (kinda) I'm gonna go to bed. Got a bit day tomorrow and a party to attend. See you later.
[09:03:12] jhass: 15 minutes works well IME
[09:03:19] ArrogantPrick: Thanks for the help
[09:13:31] ruurd: has joined #RubyOnRails
[09:16:58] Sylario: has joined #RubyOnRails
[09:17:40] Ropeney: has joined #RubyOnRails
[09:17:59] ndrei: has joined #RubyOnRails
[09:18:45] Ropeney: has joined #RubyOnRails
[09:20:06] Ropeney: has joined #RubyOnRails
[09:25:17] salc1: @SteenJobs :( Edited the runtimes.rb file, but still not working! Did something different this time, though
[09:25:40] salc1: Actually no, it did the same thing
[09:25:49] salc1: Same error
[09:26:34] salc1: According to the Stackoverflow answer you sent me, I did numbers 1 & 3, which involved deleting a few lines from a couple files.
[09:27:28] salc1: Think I'd need to install node?
[09:27:32] dideler: has joined #RubyOnRails
[09:28:16] krisquigley: has joined #RubyOnRails
[09:32:41] justintv90: has joined #RubyOnRails
[09:33:18] Nigel_: has joined #RubyOnRails
[09:33:26] alex88: has joined #RubyOnRails
[09:33:44] alex88: has joined #RubyOnRails
[09:41:28] hotpancakes: has joined #RubyOnRails
[09:43:43] riotjones: has joined #RubyOnRails
[09:44:06] haz111__: has joined #RubyOnRails
[09:50:44] sinkensabe: has joined #RubyOnRails
[09:50:48] francois_: has joined #RubyOnRails
[09:50:59] ylla: has joined #RubyOnRails
[09:51:45] salc1: I think I'm just going to install node and see if that helps
[09:52:42] l0oky: I can't run rails server with rails -v 4.2.1 on windows. It shows me somekind of nokogiri error.
[09:53:27] salc1: ^Working fine for me, with v 4.2.1
[09:53:29] l0oky: `require': cannot load such file -- nokogiri/nokogiri (LoadError)
[09:53:32] tskogberg: has joined #RubyOnRails
[09:56:08] siaw23: has joined #RubyOnRails
[09:56:29] FernandoBasso: has joined #RubyOnRails
[09:56:44] DoctorMonocular: has joined #RubyOnRails
[09:58:21] l0oky: Wow nokogiri is such a pain
[09:58:25] AzaToth: has joined #RubyOnRails
[09:58:30] l0oky: why does rails 4.2.1 even use it
[09:59:13] jhass: works fine on linux ;P
[09:59:32] siaw23: has joined #RubyOnRails
[09:59:40] l0oky: but I am used to windows :(
[10:00:00] l0oky: I tried linux It's really hard to install applications
[10:00:15] FernandoBasso: Can I start the server and log only errors instead of everything?
[10:00:34] l0oky: you either have to compile them or use some kind of package manager
[10:01:03] l0oky: That's my complaint with linux :D
[10:01:13] frank_o: has joined #RubyOnRails
[10:01:16] l0oky: everything else is great
[10:02:24] FernandoBasso: I have resource :states in routes.rb, and when I do localhost:3000/states rails is going to the states#show method. How come?
[10:03:16] l0oky: resources root state method is show
[10:03:26] sinkensabe: has joined #RubyOnRails
[10:05:40] jhass: l0oky: package manager is a benefit, controlled installation and deinstallation
[10:05:49] siaw23: has joined #RubyOnRails
[10:06:26] l0oky: Not every application is using package managers
[10:06:28] jhass: FernandoBasso: http://guides.rubyonrails.org/routing.html#singular-resources
[10:06:38] l0oky: that's a downside
[10:06:48] FernandoBasso: And I don't see an index method in rake routes output
[10:06:55] jhass: l0oky: writing packages for my distros is so easy, you just do it if it's missing
[10:07:11] jhass: FernandoBasso: see my link, you use resource not resources
[10:07:12] alex88: has joined #RubyOnRails
[10:08:20] l0oky: I tried to install nokogiri and it worked
[10:08:21] l0oky: https://gist.github.com/l0oky/2af43b68d80cc5fcc6e9
[10:08:33] l0oky: I tried to run my 4.2.1 rails server it didn't
[10:09:14] FernandoBasso: I'm not sure if the docs are clear.
[10:09:32] jhass: FernandoBasso: resource and resources are two different things
[10:09:56] l0oky: Actionpack is using nokogiri argh
[10:09:57] FernandoBasso: `singular resources` mean that the resource :state should be in plural, or the method :resource should be in plural?
[10:10:20] jhass: l0oky: probably incompatible for windows on Ruby 2.2, try Ruby 2.1
[10:10:29] l0oky: You know what
[10:10:32] FernandoBasso: jhass: But it works now. Thanks.
[10:10:35] l0oky: I am going to install linux
[10:10:48] jhass: FernandoBasso: no "should", they're different things
[10:10:53] jhass: use the one you need/want
[10:10:54] l0oky: Just to give it another chance
[10:11:07] jhass: l0oky: how about a VM?
[10:11:22] l0oky: i don't know
[10:11:57] jgt4: has joined #RubyOnRails
[10:12:45] nohminn: has joined #RubyOnRails
[10:13:05] jgt: has joined #RubyOnRails
[10:13:09] jgt: hey folks
[10:15:33] Rubie: has joined #RubyOnRails
[10:16:10] frank_o: Hi! Anybody tried the Discourse forum? I'm attempting to migrate its database, but https://github.com/discourse/discourse/blob/master/db/migrate/20120921162512_add_meta_data_to_forum_threads.rb gives me `PG::InvalidParameterValue: ERROR: version to install must be specified` -- https://gist.github.com/dt1973/26a1ead829e400c2f2ac
[10:16:48] jgt: I???m trying to raise an ActionController::ParameterMissing if an endpoint is POSTed to without a needed param
[10:17:02] jgt: but my test is failing with wrong number of args
[10:17:04] jgt: https://gist.github.com/jezen/12fc55ed6b2c0017624e
[10:17:06] jgt: any ideas?
[10:18:19] jgt: if I change line 26 to ` allow(controller).to receive(:params) { { time_entries: [] } }
[10:18:41] jgt: then the flow continues past the fetch/raise
[10:18:43] Pounce: has joined #RubyOnRails
[10:19:14] jgt: I want to say ???if you don???t find the thing, die instantly???
[10:19:33] l0oky: jgt: Excuse me If I may ask this question, I am new to rails myself. But what part of your test actually POST's ?
[10:20:26] jgt: l0oky: on line 18, you can see I???m creating an anonymous function that calls the .part_invoice method
[10:20:33] RegulationD: has joined #RubyOnRails
[10:21:02] jgt: though I think you???re right, I???m not actually POSTing to the endpoint in the spec; I???m calling the method explicitly
[10:21:35] jgt: which means I should be able to test the method in isolation
[10:22:33] jgt: if I were to POST to the route, it would be an integrated test and I would have to set the test case in such a way that clears authentication
[10:23:09] jgt: which is also a valid approach, but I???d rather leave most integrated tests to my cucumber suite
[10:24:44] otherj: has joined #RubyOnRails
[10:25:32] netzfisch: has joined #RubyOnRails
[10:26:33] l0oky: Will it raise an error If you put 'raise ActionController::ParameterMissing' out of the block at the beginning of the method?
[10:28:08] jgt: l0oky: I still get wrong number of args???
[10:28:17] jgt: maybe I???m supposed to give it some string?
[10:29:45] edwinvdgraaf: has joined #RubyOnRails
[10:30:55] meoblast001: has joined #RubyOnRails
[10:31:15] l0oky: Are you supposed to pass controller.part_invoice some arguments?
[10:31:37] jgt: no, it???s a controller action. Its inputs come from the params hash.
[10:31:48] jgt: I managed to get the test to pass with `raise ActionController::ParameterMissing.new("derp")`
[10:32:32] DEA7TH: has joined #RubyOnRails
[10:33:14] jhass: jgt: expect { action }.to raise_exception...
[10:33:25] jhass: you need to pass a block to expect
[10:33:44] jhass: er, controller.part_invoice directly I guess
[10:33:57] jgt: jhass: I do, don???t I? I assign a block to `action`
[10:34:08] jhass: you pass a lambda as first argument
[10:34:09] jgt: or maybe it???s not the same thing
[10:34:12] jhass: that's quite different
[10:34:22] jgt: it still seems to work though
[10:34:30] jhass: then why are you here?
[10:34:42] jgt: because it wasn???t working before :)
[10:34:46] edwinvdg_: has joined #RubyOnRails
[10:35:15] jgt: Looks like I don???t new to explicitly call .new on the exception either. I can do `raise ActionController::ParameterMissing, "derp"`
[10:35:27] edwinvdgraaf: has joined #RubyOnRails
[10:35:34] jhass: ACTION shrugs
[10:36:49] l0oky: has joined #RubyOnRails
[10:36:54] jgt: jhass: my tests show that passing a block or a lambda is the same in this context
[10:37:07] l0oky: Sorry my irc client disconnected me for some reason
[10:38:13] jhass: jgt: btw why don't you use strong parameters?
[10:38:45] l0oky: jgt: :params is empty?
[10:39:19] jgt: jhass: I???m using strong params when creating new records, as is described in the rails tutorial
[10:39:30] jgt: I???m not sure how I would use them in this method though
[10:39:30] _2easy: has joined #RubyOnRails
[10:40:07] jgt: jhass: if you could slightly more guidance, I???d be most grateful :)
[10:40:09] jhass: just the same
[10:40:25] jhass: params.require(:time_entries)
[10:41:13] jhass: combine that with using the controller spec helpers and it'll work
[10:41:32] jhass: post :part_invoice, {}
[10:42:21] startupality: has joined #RubyOnRails
[10:42:44] jgt: jhass: I think I???d rather call the method explicitly so I can test it in isolation
[10:42:46] pontiki: has joined #RubyOnRails
[10:43:12] jhass: well, these helpers exists because it's the recommended way to do it
[10:43:17] jgt: otherwise I have to work around authentication
[10:43:38] jhass: they make sure the environment in which the method is called actually matches that of when you run the app
[10:43:59] jhass: like params is not a plain Hash in your real app, yet in your test it is
[10:44:32] jhass: just stub out current_user or whatever
[10:44:33] nhhagen: has joined #RubyOnRails
[10:45:58] otherj: has joined #RubyOnRails
[10:46:16] jhass: you'll have to do that anyway once you test something like "user is allowed to see this model"
[10:46:18] raj___: has joined #RubyOnRails
[10:47:18] qwertme: has joined #RubyOnRails
[10:47:22] jgt: jhass: Ok, makes sense. Should I be running assertions against the controller? Or the response?
[10:48:03] jhass: usually the response, I'd argue expect(foo).to receive stuff is okay though
[10:48:14] otherj: Could anyone examine this and let me know where I'm off the mark? when I try to destroy a member, I get a nomethoderror on number_of_siblings, but I can use @receiver.number_of_siblings in a view https://gist.github.com/otherjustin/8925bdb87302170cd6c7
[10:48:44] jhass: otherj: please edit your gist and add file with the full and exact error
[10:49:48] hamster88: has joined #RubyOnRails
[10:49:52] hamster88: hello everyone.
[10:50:24] otherj: done => https://gist.github.com/otherjustin/8925bdb87302170cd6c7
[10:50:38] pehlert: has joined #RubyOnRails
[10:51:18] jhass: otherj: gists have an edit and an add file button ;)
[10:51:36] jhass: reload failed somehow
[10:51:40] maz-dev: has joined #RubyOnRails
[10:51:45] otherj: damn rails apps! ;)
[10:51:54] thelastinuit: has joined #RubyOnRails
[10:51:57] THpubs: has joined #RubyOnRails
[10:52:01] jhass: well, that's not the full error
[10:52:07] jhass: I'm sure you got a backtrace
[10:52:08] maz-dev: has joined #RubyOnRails
[10:52:11] otherj: you're wanting the error from the console?
[10:52:36] jhass: I want to know the exact position in your code it's happening
[10:52:40] jhass: so the backtrace
[10:53:03] otherj: ah, ok. well, I'm using better_errors, so it's kind of obscured in the pretty html
[10:53:05] otherj: but it's at the if household.number_of_siblings = 1 line
[10:53:15] pehlert: Hey folks, is anyone of you using the apartment gem for multi-tenancy? Since I've started using it, I cannot run my migrations from scratch anymore since it expects the tenants table to be present for startup
[10:53:20] hamster88: I have a question regarding implementing bootstrap in ruby on rails.. I am using bootstrap-sass gem and my gist is here https://gist.github.com/thedesignable/0c9638202d7f0a17c5ef . the mobile menu button is not working. can anyone please point me at what i am doing wrong?
[10:53:39] jhass: otherj: that line doesn't exist in your gist
[10:53:43] centrx: has joined #RubyOnRails
[10:54:02] jgt: jhass: I???m making the request with `post "/projects/1/part-invoice", {}`, and I have this route: `match "/projects/:id/part-invoice", to: "projects#part_invoice", via: "post"`, and still I get an ActionController::UrlGenerationError :(
[10:54:32] jhass: jgt: plain action name should suffice in a controller test, after all you're testing the controller, not the routing
[10:54:44] jhass: post :part_invoice
[10:54:44] otherj: oh, mistype. was just looking at a different model. it's this one: https://gist.github.com/otherjustin/8925bdb87302170cd6c7#file-members-rb-L13
[10:55:08] jhass: otherj: club model & relevant db/schema.rb ?
[10:55:15] jgt: jhass: Same exception; slightly different message.
[10:55:18] jgt: No route matches {:action=>"part_invoice", :controller=>"projects"}
[10:55:54] otherj: I guess that's a weird request, but sure, one second :-P
[10:56:03] jhass: jgt: ah well, I guess that's actually true since without an id none matches ;P
[10:56:26] jhass: jgt: post :part_invoice, id: 0
[10:56:33] jhass: or whatever fake id
[10:57:15] jgt: jhass: well that changed the message at least
[10:57:22] ninja_python: has joined #RubyOnRails
[10:57:25] jgt: expected ActionController::ParameterMissing but was not given a block
[10:57:44] edwinvdg_: has joined #RubyOnRails
[10:57:50] jhass: expect { post :part_invoice, id: 0 }.to raise_error ...
[10:58:53] jgt: ok, that works
[10:59:47] jgt: now it???s saying nothing was raised
[10:59:57] jgt: and I???m guessing it???s because it???s not actually ending up at the action
[11:00:02] otherj: jhass: https://gist.github.com/otherjustin/8925bdb87302170cd6c7
[11:00:05] jgt: but getting redirected to the sign in page
[11:00:38] otherj: I assume it's some way I'm trying to access the method from the private method, but I'm not sure why it fails
[11:00:43] jgt: can I skip a before_action from within a spec? I???m guessing I can???t.
[11:01:21] jgt: ah, nevermind
[11:01:38] jgt: I stubbed out the :signed_in_user
[11:01:40] jhass: otherj: I don't see anything that defines the number_of_siblings= method explicitly or implicitly (through a database column for example) on your Club model
[11:01:45] jgt: jhass: Thanks for all your help!
[11:01:46] startupality: has joined #RubyOnRails
[11:01:56] jhass: jgt: welcome!
[11:02:14] otherj: jhass, it's a class method in the club model
[11:02:16] FernandoBasso: has joined #RubyOnRails
[11:02:29] jhass: otherj: no
[11:02:41] otherj: which is supposed to count the number of "sibling" members for the "parent" club
[11:02:50] jhass: otherj: also note that I said number_siblings= not number_of_siblings
[11:03:15] jhass: a.b = c is syntax sugar for a.b=(c), calling the method b= on a with the parameter c
[11:03:52] jhass: (you probably meant == 1)
[11:04:03] otherj: heh. I probably did
[11:04:23] jhass: but that one is neither defined on the Club model
[11:04:31] jhass: but as an instance method on your Member model
[11:05:13] otherj: definitely an interesting way to point out a typo :P
[11:05:16] otherj: yeah, you're right
[11:05:18] otherj: thanks jhass
[11:06:16] nhhagen_: has joined #RubyOnRails
[11:06:19] jhass: otherj: slight hope is that you actually learn why they are not the same and a bit of where the magic in ruby is ;)
[11:06:31] otherj: do you mean = and == ?
[11:07:07] otherj: I guess putting that method in the member model was an oversight, and the = rather a typo. but I'm not sure if that's what you mean
[11:10:15] CyborgCygnus: has joined #RubyOnRails
[11:12:56] nhhagen: has joined #RubyOnRails
[11:13:21] jhass: otherj: well more understand rubys syntax, that a.b = c is a.b=(c) while a.b == c is a.b.==(c)
[11:13:34] otherj: yeah, I get that. it was just a typo
[11:13:36] jhass: and that both are just method calls
[11:15:14] netzfisch: has joined #RubyOnRails
[11:15:40] salc1: has joined #RubyOnRails
[11:15:50] bronson: has joined #RubyOnRails
[11:16:37] mutuma: has joined #RubyOnRails
[11:17:18] sameerynho: has joined #RubyOnRails
[11:17:22] krisquigley: has joined #RubyOnRails
[11:18:47] nhhagen: has joined #RubyOnRails
[11:19:36] yottanami1: has joined #RubyOnRails
[11:19:55] jenrzzz: has joined #RubyOnRails
[11:20:49] rickmasta: has joined #RubyOnRails
[11:21:58] mutuma: has joined #RubyOnRails
[11:25:33] siaw23: has joined #RubyOnRails
[11:26:48] doodlehaus: has joined #RubyOnRails
[11:27:37] lxsameer_: has joined #RubyOnRails
[11:28:51] yottanami: has joined #RubyOnRails
[11:30:05] hotpancakes: has joined #RubyOnRails
[11:31:02] Pazician: has joined #RubyOnRails
[11:31:10] commondream: has joined #RubyOnRails
[11:31:15] lxsameer: has joined #RubyOnRails
[11:31:15] lxsameer: has joined #RubyOnRails
[11:32:16] yaw: has joined #RubyOnRails
[11:32:44] qwertme: has joined #RubyOnRails
[11:34:33] Spami: has joined #RubyOnRails
[11:40:24] frank_o: has joined #RubyOnRails
[11:40:36] krisquigley: has joined #RubyOnRails
[11:43:03] symbol: has joined #RubyOnRails
[11:46:17] symbol: has joined #RubyOnRails
[11:47:54] arup_r: has joined #RubyOnRails
[11:48:10] yaw: has joined #RubyOnRails
[11:48:13] surrealanalysis: has joined #RubyOnRails
[11:50:00] arup_r: Hi.. I need little help with AWS Ec2 set up.. Any body used it in your project ?
[11:50:49] arup_r: I am not able bind the public IP given by aws with rails default server.. when I am trying to bind the public IP like RAILS_ENV=production rails server --binding=32.24.66.137 --port=80 getting error
[11:50:55] arup_r: I am on Ubuntu server
[11:51:15] arup_r: any idea what could be the issue ?
[11:52:18] arup_r: error: /home/ubuntu/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/socket.rb:206:in `bind': Cannot assign requested address - bind(2) for 32.24.66.137:80 (Errno::EADDRNOTAVAIL)
[11:53:12] jhass: does ip addr list an interface with it?
[11:53:36] vedu: hello. I am trying to do @object.to_json(...) and send the json to my view.html.erb but I get `&quot;` characters instead of " characters. code: https://gist.github.com/vedant1811/04550f709858709dca16
[11:53:50] otherj: god I hope you're not using webrick in production
[11:54:08] vedu: arup_r: yes exactly.
[11:54:24] jhass: vedu: try <%= j ... %>
[11:54:38] arup_r: jhass: didn't get you
[11:54:52] vedu: jhass: you mean without quotes?
[11:55:28] jhass: mmh, right, why the quotes anyway?
[11:55:55] arup_r: otherj: not I wouldn't just I would like to test... I am configuring the server
[11:56:09] jhass: so the important part is passing it through j, but the quotes will break it too
[11:56:20] arup_r: I was tried to check if I can access it for a while.. but I am failing..
[11:56:20] jhass: arup_r: it's a command, like ls, cd
[11:56:35] DLSteve_: has joined #RubyOnRails
[11:56:36] darrencauthon: has joined #RubyOnRails
[11:57:13] vedu: jhass: I am not sure. but without quotes doesn't work. I get something like: `var orderJson = {\&quot;or....`
[11:57:25] krisquigley: has joined #RubyOnRails
[11:57:26] jhass: vedu: did you try passing it through j yet?
[11:57:36] nhhagen: has joined #RubyOnRails
[11:57:46] vedu: jhass: yes. '<%= j @order.as ....
[11:57:56] gerep: has joined #RubyOnRails
[11:58:08] qwertme: has joined #RubyOnRails
[11:58:28] krisquigley: has joined #RubyOnRails
[11:58:46] gerep: How can I achieve this <option value="" disabled selected>Select your option</option> with f.select(:installments, [['1', '1'], ...)
[11:58:49] gerep: Can anyone help?
[11:59:03] gerep: I need to disable only one option in my select
[11:59:04] jhass: vedu: welp, <%= j(...).html_safe %> it is then :/
[11:59:16] pehlert: When I use fixtures (I know it's not considered best-practice anymore, but I'm working on a legacy application), will it go through the model when they are created and run stuff like the after_create hooks?
[12:00:16] jhass: gerep: http://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#method-i-options_for_select
[12:00:52] gerep: jhass, thanks ;)
[12:00:54] roolo_: has joined #RubyOnRails
[12:01:45] vedu: jhass: thanks :)
[12:04:29] nhhagen: has joined #RubyOnRails
[12:05:16] erichu: has joined #RubyOnRails
[12:05:21] nohminn: has joined #RubyOnRails
[12:05:25] jenrzzz: has joined #RubyOnRails
[12:07:30] strcmp1: form_for & friends need some love.
[12:09:26] RegulationD: has joined #RubyOnRails
[12:09:52] alfie_max15: has joined #RubyOnRails
[12:10:10] alfie_max15: need a quick help
[12:10:28] alfie_max15: how can i change routes of a model to a custom route?
[12:10:36] alfie_max15: like for a user model
[12:10:42] jhass: models don't have routes, controllers do
[12:10:48] alfie_max15: instead of /user/edit
[12:10:56] alfie_max15: yes sorry, my mistake.. :)
[12:11:27] alfie_max15: instead of /user/1 it should be /u/1
[12:11:43] alfie_max15: you get my point right?
[12:11:51] jhass: http://guides.rubyonrails.org/routing.html you should take your time and read through that, it's basics
[12:11:59] alfie_max15: or is it possible to make it like /1 itself?
[12:12:22] alfie_max15: is it possible to do what i just asked?
[12:12:25] jhass: http://api.rubyonrails.org/classes/ActionDispatch/Routing/Mapper/Resources.html#method-i-resources but take a look at the options
[12:12:33] jhass: yes, see my link
[12:13:11] Hates__: has joined #RubyOnRails
[12:13:44] gerep: jhass, I can't make it work without disabling the entire select :(
[12:13:57] gerep: jhass, can you help?
[12:14:29] helpa: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[12:15:33] gerep: jhass, https://gist.github.com/gerep/b4aaaa8ffcac2b47498d
[12:16:02] raj___: has joined #RubyOnRails
[12:16:15] jhass: I was hoping for the one that "disables everything"
[12:17:13] gerep: jhass, https://gist.github.com/gerep/b4aaaa8ffcac2b47498d
[12:17:37] jhass: gerep: you noticed that I linked you to options_for_select, not select?
[12:17:38] siaw23: has joined #RubyOnRails
[12:17:47] gerep: jhass, yes I did
[12:18:03] Pupeno: has joined #RubyOnRails
[12:18:04] gerep: jhass, but there is also select("post", "category", Post::CATEGORIES, {disabled: 'restricted'})
[12:18:10] gerep: jhass, in the link you sent
[12:18:22] jhass: yes but that's not what you want as you experienced
[12:18:48] jhass: and it's on the same page, but I linked you to a specific method for reason
[12:19:58] gerep: jhass, so you are suggesting me to use options_for_select
[12:20:32] alfie_max15: jhass, thanks for the help, fixed it.. :)
[12:20:39] nhhagen: has joined #RubyOnRails
[12:20:58] jhass: alfie_max15: great
[12:22:52] Pupeno: has joined #RubyOnRails
[12:23:07] Scripore: has joined #RubyOnRails
[12:23:51] gerep: jhass, working ;)
[12:23:53] gerep: jhass, thanks
[12:23:59] alfie_max15: has left #RubyOnRails: ("Ex-Chat")
[12:24:14] gerep: jhass, I like the kind of help you give because it forces us to think
[12:24:31] gerep: jhass, this way I won't have problems with that again
[12:25:27] strcmp1: if you dont want to think programming is not for you :)
[12:26:18] gerep: if I'm not willing to think, nothing if for me :)
[12:26:29] gerep: programming is just a really small piece of the pie :D
[12:30:24] pehlert: has joined #RubyOnRails
[12:40:04] krisquigley: has joined #RubyOnRails
[12:40:36] sinkensabe: has joined #RubyOnRails
[12:41:35] laut: has joined #RubyOnRails
[12:41:53] frank_o: Hi! Trying to install the Discourse forum (https://github.com/discourse/discourse) manually without Docker. Unfortunately https://github.com/discourse/discourse/blob/master/db/migrate/20120921162512_add_meta_data_to_forum_threads.rb gives me `PG::InvalidParameterValue: ERROR: version to install must be specified` during migration, anybody know why? https://gist.github.com/dt1973/26a1ead829e400c2f2ac
[12:41:59] frank_o: Only Docker installs are supported meaning the Discourse team won't help me with this one. Docker or not though, it's still odd that the migration should fail like this.
[12:43:47] ferr: has joined #RubyOnRails
[12:44:08] symbol: has joined #RubyOnRails
[12:46:02] siaw23: has joined #RubyOnRails
[12:49:51] bruno-: has joined #RubyOnRails
[12:50:40] jcaho: has joined #RubyOnRails
[12:50:47] nhhagen: has joined #RubyOnRails
[12:52:09] nohminn: has joined #RubyOnRails
[12:54:33] nhhagen: has joined #RubyOnRails
[12:54:44] srinidhi: has joined #RubyOnRails
[12:56:19] benhuda: has joined #RubyOnRails
[12:59:11] yaw: has joined #RubyOnRails
[13:03:06] xcesariox: has joined #RubyOnRails
[13:05:03] Rubie: has joined #RubyOnRails
[13:05:58] Ropeney: has joined #RubyOnRails
[13:06:10] siaw23: has joined #RubyOnRails
[13:12:39] Detch: has joined #RubyOnRails
[13:13:28] nohminn: has joined #RubyOnRails
[13:17:10] Sharcho: has joined #RubyOnRails
[13:17:50] Sharcho: Any recommendations for web scraping gems? On Ruby Toolbox all the projects seem to be inactive. https://www.ruby-toolbox.com/categories/Web_Content_Scrapers
[13:18:48] hotpancakes: has joined #RubyOnRails
[13:22:37] strcmp1: Sharcho, spidr
[13:24:10] doodlehaus: has joined #RubyOnRails
[13:24:33] terminal_fee: has joined #RubyOnRails
[13:25:30] apeiros: which gem do you folks recommend to add authentication via github? https://github.com/intridea/omniauth ?
[13:28:08] francois_: has joined #RubyOnRails
[13:30:51] pehlert: has joined #RubyOnRails
[13:30:54] fertapric: has joined #RubyOnRails
[13:31:04] siaw23: has joined #RubyOnRails
[13:32:10] darrencauthon: has joined #RubyOnRails
[13:34:30] bendangelo: has joined #RubyOnRails
[13:36:02] Hates_: has joined #RubyOnRails
[13:36:07] commondream: has joined #RubyOnRails
[13:38:08] fraguk: has joined #RubyOnRails
[13:44:32] Sigma00: yes, omniauth
[13:46:14] strcmp1: i dont know of any other options, besides implementing the oauth handshake yourself.
[13:48:03] siaw23: has joined #RubyOnRails
[13:48:27] apeiros: Sigma00: thanks :)
[13:50:29] ruv: has joined #RubyOnRails
[13:50:42] krisquigley: has joined #RubyOnRails
[13:53:12] scottmatheina: has joined #RubyOnRails
[13:55:58] jenrzzz: has joined #RubyOnRails
[13:58:03] nhhagen: has joined #RubyOnRails
[14:06:16] givanse: has joined #RubyOnRails
[14:07:13] surrealanalysis: has joined #RubyOnRails
[14:09:43] fertapric: has joined #RubyOnRails
[14:11:44] nohminn: has joined #RubyOnRails
[14:18:18] arup_r: has joined #RubyOnRails
[14:18:55] maximski: has joined #RubyOnRails
[14:19:29] drale2k: has joined #RubyOnRails
[14:19:34] hotpancakes: has joined #RubyOnRails
[14:19:58] maximski: how can i cache a single variable and how can i check if this variable is cached?
[14:20:23] Guest6: has joined #RubyOnRails
[14:21:10] arup_r: Hi anybody there have a good handy tutorial with you people which can help me to set my production server with nginx + puma? I found some blogs which are all different from each other.. so not able to understand how to start or do it /
[14:21:55] pehlert: has joined #RubyOnRails
[14:22:28] Pupeno: has joined #RubyOnRails
[14:24:05] givanse_: has joined #RubyOnRails
[14:25:42] srinidhi: has joined #RubyOnRails
[14:26:28] justintv90: has joined #RubyOnRails
[14:27:10] rromanchuk: has joined #RubyOnRails
[14:27:43] vickleton: has joined #RubyOnRails
[14:28:08] nohminn: has joined #RubyOnRails
[14:28:44] byprdct: has joined #RubyOnRails
[14:30:15] byprdct: has joined #RubyOnRails
[14:30:23] Pupeno: has joined #RubyOnRails
[14:31:22] ebbflowgo_: has joined #RubyOnRails
[14:31:25] byprdct: has joined #RubyOnRails
[14:31:40] Scripore: has joined #RubyOnRails
[14:31:52] acti0nman: has joined #RubyOnRails
[14:32:09] jhass: has joined #RubyOnRails
[14:32:34] byprdct: has joined #RubyOnRails
[14:33:03] Scripore: has joined #RubyOnRails
[14:33:47] byprdct: has joined #RubyOnRails
[14:34:32] hfp: has joined #RubyOnRails
[14:35:02] ndrei_: has joined #RubyOnRails
[14:35:11] byprdct: has joined #RubyOnRails
[14:36:28] byprdct: has joined #RubyOnRails
[14:37:40] byprdct: has joined #RubyOnRails
[14:39:08] byprdct: has joined #RubyOnRails
[14:40:27] byprdct: has joined #RubyOnRails
[14:41:51] byprdct: has joined #RubyOnRails
[14:43:06] j_mcnally: has joined #RubyOnRails
[14:43:08] byprdct: has joined #RubyOnRails
[14:43:19] patrick_star: has joined #RubyOnRails
[14:44:17] byprdct: has joined #RubyOnRails
[14:44:36] annlewis: has joined #RubyOnRails
[14:45:29] byprdct: has joined #RubyOnRails
[14:46:38] byprdct: has joined #RubyOnRails
[14:47:50] byprdct: has joined #RubyOnRails
[14:49:07] byprdct: has joined #RubyOnRails
[14:50:20] byprdct: has joined #RubyOnRails
[14:50:46] Cork: has joined #RubyOnRails
[14:51:15] drale2k: has joined #RubyOnRails
[14:51:38] byprdct: has joined #RubyOnRails
[14:51:40] ndrei: has joined #RubyOnRails
[14:52:32] justintv90: has joined #RubyOnRails
[14:53:03] byprdct: has joined #RubyOnRails
[14:54:10] byprdct: has joined #RubyOnRails
[14:54:11] fraguk: has joined #RubyOnRails
[14:55:11] paulcsmith: has joined #RubyOnRails
[14:55:13] yoongkang: has joined #RubyOnRails
[14:55:22] byprdct: has joined #RubyOnRails
[14:56:27] symbol: has joined #RubyOnRails
[14:56:38] byprdct: has joined #RubyOnRails
[14:56:57] ndrei: has joined #RubyOnRails
[14:57:13] darrencauthon: has joined #RubyOnRails
[14:57:55] byprdct: has joined #RubyOnRails
[14:58:46] allcentury: has joined #RubyOnRails
[14:59:23] byprdct: has joined #RubyOnRails
[14:59:36] patrick_star: has joined #RubyOnRails
[15:00:28] seank_: has joined #RubyOnRails
[15:00:33] byprdct: has joined #RubyOnRails
[15:01:49] byprdct: has joined #RubyOnRails
[15:02:40] patrick_star: has joined #RubyOnRails
[15:02:48] stevednd: has joined #RubyOnRails
[15:02:57] byprdct: has joined #RubyOnRails
[15:03:22] patrick_star: has joined #RubyOnRails
[15:04:06] byprdct: has joined #RubyOnRails
[15:05:23] byprdct: has joined #RubyOnRails
[15:06:39] byprdct: has joined #RubyOnRails
[15:07:53] byprdct: has joined #RubyOnRails
[15:09:10] byprdct: has joined #RubyOnRails
[15:09:15] Pazician: has joined #RubyOnRails
[15:09:18] LicHacker: has joined #RubyOnRails
[15:10:29] carlesso: has joined #RubyOnRails
[15:10:30] byprdct: has joined #RubyOnRails
[15:11:05] yaw: has joined #RubyOnRails
[15:11:45] byprdct: has joined #RubyOnRails
[15:12:53] byprdct: has joined #RubyOnRails
[15:13:17] lxsameer: has joined #RubyOnRails
[15:13:45] Rubie: has joined #RubyOnRails
[15:14:12] byprdct: has joined #RubyOnRails
[15:15:05] hotpancakes: has joined #RubyOnRails
[15:15:24] nohminn: has joined #RubyOnRails
[15:15:31] byprdct: has joined #RubyOnRails
[15:16:50] byprdct: has joined #RubyOnRails
[15:18:12] byprdct: has joined #RubyOnRails
[15:18:35] Pazician: has joined #RubyOnRails
[15:19:25] byprdct: has joined #RubyOnRails
[15:20:51] byprdct: has joined #RubyOnRails
[15:22:10] byprdct: has joined #RubyOnRails
[15:23:37] byprdct: has joined #RubyOnRails
[15:24:52] byprdct: has joined #RubyOnRails
[15:25:40] jan1337z: has joined #RubyOnRails
[15:26:03] byprdct: has joined #RubyOnRails
[15:27:15] byprdct: has joined #RubyOnRails
[15:27:19] scottmatheina: has joined #RubyOnRails
[15:28:36] byprdct: has joined #RubyOnRails
[15:29:10] RegulationD: has joined #RubyOnRails
[15:30:03] byprdct: has joined #RubyOnRails
[15:31:24] byprdct: has joined #RubyOnRails
[15:32:50] byprdct: has joined #RubyOnRails
[15:32:59] tsvenson: has joined #RubyOnRails
[15:34:07] byprdct: has joined #RubyOnRails
[15:35:25] byprdct: has joined #RubyOnRails
[15:36:50] byprdct: has joined #RubyOnRails
[15:37:35] ebbflowgo: has joined #RubyOnRails
[15:37:38] yoongkang: has joined #RubyOnRails
[15:38:16] byprdct: has joined #RubyOnRails
[15:38:54] commondream: has joined #RubyOnRails
[15:39:31] byprdct: has joined #RubyOnRails
[15:39:39] krisquigley: has joined #RubyOnRails
[15:40:05] arup_r: has joined #RubyOnRails
[15:40:47] commondream: has joined #RubyOnRails
[15:41:05] Gaelan: has joined #RubyOnRails
[15:41:10] byprdct: has joined #RubyOnRails
[15:42:42] byprdct: has joined #RubyOnRails
[15:42:48] joaomdmoura: has joined #RubyOnRails
[15:43:39] futilegames: has joined #RubyOnRails
[15:43:51] nhhagen: has joined #RubyOnRails
[15:44:05] jgt: has joined #RubyOnRails
[15:44:08] marr: has joined #RubyOnRails
[15:44:08] byprdct: has joined #RubyOnRails
[15:44:41] pehlert: Guys.. Is there a way to automatically scope all links generated by the named route helpers, based on a certain condition? i.e. I have two ways of accessing a resource. Scoped by customer and unscoped. If I access it via /customers/2/users, I want all links (like edit_user_path(1)) to remain in the /customers/2 scope
[15:45:46] byprdct: has joined #RubyOnRails
[15:45:46] arup_r: I am looking for a good step by step tutorials to set up my production rails server deployment nginx + puma .. any body have something to share ?
[15:45:57] nhhagen_: has joined #RubyOnRails
[15:47:06] byprdct: has joined #RubyOnRails
[15:48:44] byprdct: has joined #RubyOnRails
[15:49:30] Flowrhent: has joined #RubyOnRails
[15:50:11] byprdct: has joined #RubyOnRails
[15:51:15] pepelui: has joined #RubyOnRails
[15:51:47] byprdct: has joined #RubyOnRails
[15:53:04] byprdct: has joined #RubyOnRails
[15:53:42] adavia: has joined #RubyOnRails
[15:54:21] byprdct: has joined #RubyOnRails
[15:55:34] byprdct: has joined #RubyOnRails
[15:57:05] byprdct: has joined #RubyOnRails
[15:58:01] darrencauthon: has joined #RubyOnRails
[15:58:26] byprdct: has joined #RubyOnRails
[15:59:42] doodlehaus: has joined #RubyOnRails
[15:59:53] byprdct: has joined #RubyOnRails
[16:01:10] byprdct: has joined #RubyOnRails
[16:02:33] hotpancakes: has joined #RubyOnRails
[16:02:38] byprdct: has joined #RubyOnRails
[16:03:20] Exuma: has joined #RubyOnRails
[16:04:08] byprdct: has joined #RubyOnRails
[16:04:36] Spami: has joined #RubyOnRails
[16:05:35] byprdct: has joined #RubyOnRails
[16:06:06] qwertme: has joined #RubyOnRails
[16:06:46] byprdct: has joined #RubyOnRails
[16:07:25] gaussblurinc1: has joined #RubyOnRails
[16:07:33] skandi: has joined #RubyOnRails
[16:07:55] byprdct: has joined #RubyOnRails
[16:09:20] byprdct: has joined #RubyOnRails
[16:10:17] m0r0n: has joined #RubyOnRails
[16:10:48] byprdct: has joined #RubyOnRails
[16:10:55] Guest70044: has joined #RubyOnRails
[16:12:15] byprdct: has joined #RubyOnRails
[16:12:15] eggoez: has joined #RubyOnRails
[16:12:32] DoctorMonocular: has joined #RubyOnRails
[16:13:38] byprdct: has joined #RubyOnRails
[16:13:45] j_mcnally: has joined #RubyOnRails
[16:14:47] byprdct: has joined #RubyOnRails
[16:15:32] neruda: has joined #RubyOnRails
[16:16:12] byprdct: has joined #RubyOnRails
[16:16:38] towski_: has joined #RubyOnRails
[16:17:21] byprdct: has joined #RubyOnRails
[16:18:44] byprdct: has joined #RubyOnRails
[16:19:41] wmoxam: has joined #RubyOnRails
[16:19:45] justintv90: has joined #RubyOnRails
[16:19:59] drale2k: has joined #RubyOnRails
[16:20:08] byprdct: has joined #RubyOnRails
[16:20:32] tianyi_: has joined #RubyOnRails
[16:21:18] byprdct: has joined #RubyOnRails
[16:21:24] asheinfeld: has joined #RubyOnRails
[16:22:18] Arnie25: has joined #RubyOnRails
[16:22:23] byprdct: has joined #RubyOnRails
[16:23:28] byprdct: has joined #RubyOnRails
[16:24:01] Arnie25: I followed this guide http://guides.rubyonrails.org/generators.html to create a generator. But I can't seem to find a way to create a DESTROY for my generator. Basically right now I am doing rails generate mygenerator NAME- to run the generator. I want to be able to reverse all the file creation and changes with rails destroy mygenerator NAME. Can someone point me in the right direction?
[16:24:45] byprdct: has joined #RubyOnRails
[16:24:59] SteenJobs: has joined #RubyOnRails
[16:25:54] byprdct: has joined #RubyOnRails
[16:26:04] givanse_: has joined #RubyOnRails
[16:27:05] byprdct: has joined #RubyOnRails
[16:28:23] byprdct: has joined #RubyOnRails
[16:29:39] byprdct: has joined #RubyOnRails
[16:29:41] cornerma1: has joined #RubyOnRails
[16:30:48] byprdct: has joined #RubyOnRails
[16:30:59] meier_: has joined #RubyOnRails
[16:32:01] byprdct: has joined #RubyOnRails
[16:33:19] byprdct: has joined #RubyOnRails
[16:34:33] byprdct: has joined #RubyOnRails
[16:35:50] byprdct: has joined #RubyOnRails
[16:37:17] byprdct: has joined #RubyOnRails
[16:38:35] pontiki: has joined #RubyOnRails
[16:38:37] byprdct: has joined #RubyOnRails
[16:40:02] byprdct: has joined #RubyOnRails
[16:40:26] allcentury: has joined #RubyOnRails
[16:40:51] daneo: has joined #RubyOnRails
[16:41:16] pulgalipe: has joined #RubyOnRails
[16:41:16] frank_o: has joined #RubyOnRails
[16:41:28] byprdct: has joined #RubyOnRails
[16:41:48] simplyianm: has joined #RubyOnRails
[16:41:50] hotpancakes: has joined #RubyOnRails
[16:42:50] byprdct: has joined #RubyOnRails
[16:42:51] benhuda: has joined #RubyOnRails
[16:43:06] jgt: has joined #RubyOnRails
[16:43:14] salc1: has joined #RubyOnRails
[16:43:19] Limix: has joined #RubyOnRails
[16:44:06] byprdct: has joined #RubyOnRails
[16:45:06] simplyianm: has joined #RubyOnRails
[16:45:33] byprdct: has joined #RubyOnRails
[16:46:15] jenrzzz: has joined #RubyOnRails
[16:46:48] byprdct: has joined #RubyOnRails
[16:47:59] byprdct: has joined #RubyOnRails
[16:48:23] dontdont: has joined #RubyOnRails
[16:49:28] byprdct: has joined #RubyOnRails
[16:49:43] Cache_Money: has joined #RubyOnRails
[16:50:57] byprdct: has joined #RubyOnRails
[16:52:19] commondream: has joined #RubyOnRails
[16:52:25] byprdct: has joined #RubyOnRails
[16:53:52] byprdct: has joined #RubyOnRails
[16:55:19] byprdct: has joined #RubyOnRails
[16:56:31] stevednd: has joined #RubyOnRails
[16:56:47] byprdct: has joined #RubyOnRails
[16:57:42] sinkensabe: has joined #RubyOnRails
[16:58:14] byprdct: has joined #RubyOnRails
[16:58:44] darrencauthon: has joined #RubyOnRails
[16:59:20] byprdct: has joined #RubyOnRails
[16:59:58] ferr: has joined #RubyOnRails
[17:00:02] teufelChiCoder: has joined #RubyOnRails
[17:00:20] fedexo: has joined #RubyOnRails
[17:00:25] jcaho: has joined #RubyOnRails
[17:00:38] byprdct: has joined #RubyOnRails
[17:01:55] byprdct: has joined #RubyOnRails
[17:03:06] byprdct: has joined #RubyOnRails
[17:03:10] towski_: has joined #RubyOnRails
[17:03:39] Scripore: has joined #RubyOnRails
[17:04:23] byprdct: has joined #RubyOnRails
[17:05:22] francoi__: has joined #RubyOnRails
[17:05:29] byprdct: has joined #RubyOnRails
[17:06:13] arup_r: has joined #RubyOnRails
[17:06:20] haz111__: has left #RubyOnRails: ()
[17:06:36] byprdct: has joined #RubyOnRails
[17:07:30] Pazician: has joined #RubyOnRails
[17:07:46] byprdct: has joined #RubyOnRails
[17:07:52] blackmesa: has joined #RubyOnRails
[17:08:36] Scripore: has joined #RubyOnRails
[17:08:47] maz-dev: has joined #RubyOnRails
[17:08:55] byprdct: has joined #RubyOnRails
[17:09:10] CalvinnHobbes: has joined #RubyOnRails
[17:09:16] Pazician: has joined #RubyOnRails
[17:10:10] byprdct: has joined #RubyOnRails
[17:11:22] byprdct: has joined #RubyOnRails
[17:12:08] Scripore: has joined #RubyOnRails
[17:12:26] baweaver: has joined #RubyOnRails
[17:12:35] byprdct: has joined #RubyOnRails
[17:13:40] byprdct: has joined #RubyOnRails
[17:13:40] salc1: has joined #RubyOnRails
[17:13:44] eggoez: has joined #RubyOnRails
[17:13:56] teufelChiCoder: has joined #RubyOnRails
[17:14:20] Scripore: has joined #RubyOnRails
[17:14:49] byprdct: has joined #RubyOnRails
[17:15:02] RegulationD: has joined #RubyOnRails
[17:15:56] byprdct: has joined #RubyOnRails
[17:17:12] byprdct: has joined #RubyOnRails
[17:18:45] byprdct: has joined #RubyOnRails
[17:19:47] Encapsulation: has joined #RubyOnRails
[17:21:17] yoongkang: has joined #RubyOnRails
[17:21:54] bruno-: has joined #RubyOnRails
[17:22:18] justintv90: has joined #RubyOnRails
[17:22:50] allcentury: has joined #RubyOnRails
[17:23:25] madsobel: has joined #RubyOnRails
[17:23:28] siaw23: has joined #RubyOnRails
[17:24:58] Rubie: has joined #RubyOnRails
[17:27:48] Rubie: has joined #RubyOnRails
[17:28:29] krisquigley: has joined #RubyOnRails
[17:30:15] gabeodess: has joined #RubyOnRails
[17:30:51] gabeodess: is it possible to invert a scope? something like Model.where.not.my_scope ?
[17:30:55] DoctorMonocular: has joined #RubyOnRails
[17:32:06] DoctorMonocular: has joined #RubyOnRails
[17:33:00] DoctorMo_: has joined #RubyOnRails
[17:33:50] Cache_Money: has joined #RubyOnRails
[17:33:50] SteenJobs: has joined #RubyOnRails
[17:33:53] asheinfeld: has joined #RubyOnRails
[17:33:54] DoctorMonocular: has joined #RubyOnRails
[17:34:18] fryguy: gabeodess: the contents of a scope can be completely arbitrary, so it's not guaranteed that every operation in it is invertible in any sane way, so no.
[17:34:37] gabeodess: fryguy: okay
[17:35:37] Sigma00: gabeodess: write your inverted scope as another scope
[17:35:52] fryguy: Arnie25: version control is the best way to approach your problem
[17:36:20] Arnie25: fryguy is that how "rails destroy scaffold" does it?
[17:36:45] fryguy: Arnie25: unlikely
[17:37:04] fryguy: i think i misread your question
[17:38:28] Sigma00: Arnie25: http://factore.ca/blog/126-reversible-rails-generators
[17:38:42] Sigma00: a bit old but might still work
[17:39:45] joaomdmoura: has joined #RubyOnRails
[17:44:35] gerep: has joined #RubyOnRails
[17:45:14] gerep: If the last erubies version is from 2011, why is it considered the most used on The Ruby Toolbox? https://www.ruby-toolbox.com/categories/template_engines
[17:45:20] gerep: Or am I getting things wrong? :)
[17:45:51] DoctorMonocular: has joined #RubyOnRails
[17:46:11] weckl: has joined #RubyOnRails
[17:46:59] Arnie25: Sigma00: Thank you!!
[17:49:42] weckl: has left #RubyOnRails: ()
[17:50:02] Scripore: has joined #RubyOnRails
[17:51:08] Lightsword: has joined #RubyOnRails
[17:52:41] jenrzzz: has joined #RubyOnRails
[17:52:45] DoctorMonocular: has joined #RubyOnRails
[17:52:57] nertzy: has joined #RubyOnRails
[17:53:37] cytoskeletor: has joined #RubyOnRails
[17:54:40] devdazed: has joined #RubyOnRails
[17:55:49] Sharcho: gerep: it's included with Rails.
[17:56:11] gerep: Sharcho, got it ;)
[17:56:27] gerep: Sharcho, which one do you use?
[17:56:39] Sharcho: gerep: personally I use HAML
[17:56:50] gerep: Sharcho, I'm using ERB because it is default but lots of friends are telling me to use HAML
[17:56:55] gerep: ah....I'll use it too
[17:56:56] weckl_: has joined #RubyOnRails
[17:57:23] DoctorMonocular: has joined #RubyOnRails
[17:57:46] teufelChiCoder: has joined #RubyOnRails
[17:57:50] weckl_: has joined #RubyOnRails
[17:58:39] DoctorMonocular: has joined #RubyOnRails
[17:59:30] darrencauthon: has joined #RubyOnRails
[18:00:59] Cache_Money: has joined #RubyOnRails
[18:02:19] ruurd: has joined #RubyOnRails
[18:02:37] Rubie: has joined #RubyOnRails
[18:03:00] weaksauce: gerep eruby doesn't do all that much so it doesn't need many updates i'd imagine
[18:03:13] weaksauce: I prefer HAML
[18:04:08] fryguy: slim is probably preferable to haml nowadays if you are starting a new project and want that style of templating
[18:04:23] DoctorMonocular: has joined #RubyOnRails
[18:06:02] DoctorMo_: has joined #RubyOnRails
[18:07:23] Axsuul: has joined #RubyOnRails
[18:07:52] DoctorMonocular: has joined #RubyOnRails
[18:07:53] gerep: fryguy, why?
[18:08:25] gerep: fryguy, why is it preferable?
[18:08:31] weaksauce: slim looks nice too
[18:08:33] gerep: fryguy, I'm not worried about styling
[18:08:46] fryguy: gerep: slim is a bit more actively developed, has a simpler execution model, eschews a lot of junk, runs faster, and most important supports streaming output
[18:09:03] gerep: fryguy, that's enough for me :)
[18:09:12] gerep: fryguy, thanks for the suggestion
[18:09:28] fryguy: i use haml at work though, so it's fine too :)
[18:09:31] qejk: has joined #RubyOnRails
[18:10:16] weaksauce: the only time erb seems to win is in templates for files not meant to be html
[18:10:30] rromanchuk: has joined #RubyOnRails
[18:10:43] fryguy: weaksauce: well the h in haml DOES stand for html, so...
[18:12:49] kristof: has joined #RubyOnRails
[18:12:57] webguynow: has joined #RubyOnRails
[18:13:36] michael_mbp: has joined #RubyOnRails
[18:14:56] Ergo: has joined #RubyOnRails
[18:15:56] RegulationD: has joined #RubyOnRails
[18:18:02] darrencauthon: has joined #RubyOnRails
[18:18:18] cura95: has joined #RubyOnRails
[18:27:52] givanse: has joined #RubyOnRails
[18:27:59] armyriad: has joined #RubyOnRails
[18:29:03] yoongkang: has joined #RubyOnRails
[18:29:27] sonofdirt: has joined #RubyOnRails
[18:30:16] LicHacker_: has joined #RubyOnRails
[18:30:16] rromanchuk: has joined #RubyOnRails
[18:31:03] Scripore: has joined #RubyOnRails
[18:31:58] LicHacker__: has joined #RubyOnRails
[18:32:15] hamster88: has joined #RubyOnRails
[18:32:19] hamster88: hello everyone :)
[18:32:28] SeanLazer: has joined #RubyOnRails
[18:33:15] hamster88: I have a question. how can i fetch the last post of my post model to a static page?.
[18:33:48] ruurd: has joined #RubyOnRails
[18:36:18] batasrki: has joined #RubyOnRails
[18:38:55] srinidhi: has joined #RubyOnRails
[18:39:58] mary5030: has joined #RubyOnRails
[18:40:06] Guest6: has joined #RubyOnRails
[18:40:36] netzfisch: has joined #RubyOnRails
[18:43:27] differentreality: has joined #RubyOnRails
[18:43:42] cytoskeletor: has joined #RubyOnRails
[18:44:02] SteenJobs: anyone use any of the in-place editing gems before?
[18:45:29] hakunin: has joined #RubyOnRails
[18:46:10] rubyonrailed: has joined #RubyOnRails
[18:47:15] hamster88: i guess i used in one of the project of mine..
[18:47:28] hamster88: you got stuck somewhere?
[18:48:19] SteenJobs: or you???ve actually used one before???.
[18:49:01] hamster88: which one are you talking about , can you give me the link please?
[18:49:17] hakunin: has joined #RubyOnRails
[18:51:22] SteenJobs: rest_in_place
[18:51:45] toretore: has joined #RubyOnRails
[18:51:46] batasrki: anyone here able to help me with a bundler/jruby problem? #bundler channel is quiet atm
[18:52:21] Pazician: has joined #RubyOnRails
[18:52:30] hamster88: nope i didn't used that one SteenJobs sorry bud
[18:52:39] SteenJobs: haha aright
[18:52:45] SteenJobs: they???re all the same, but cool
[18:53:06] hamster88: tell me the prob tho, i might try to help you
[18:54:05] Sharcho: batasrki: don't ask to ask, just ask
[18:54:19] jenrzzz: has joined #RubyOnRails
[18:55:17] cytoskeletor: I'm having an issue reloading a partial with jquery. Here is my gist https://gist.github.com/Joshuaatt/df5c7274cb3633cd9749
[18:55:28] batasrki: jruby 1.7.19, bundler 1.7.9, gem is flying_saucer
[18:55:34] batasrki: gem list -r shows the gem
[18:55:45] SteenJobs: hamster88: the gem functions based on expected REST protocol, but if i???m embedding an update form within a view corresponding to a different controller than the update controller, how do i route the request properly?
[18:55:52] batasrki: bundle install with that gem in the Gemfile says it can't find it
[18:56:09] commondream: has joined #RubyOnRails
[18:56:35] reber: has joined #RubyOnRails
[18:57:25] hamster88: SteenJobs, have you tried doing using a redirect_to action ?
[18:57:59] hamster88: eg: redirect_to your_controller_action_url
[18:59:03] hamster88: or doing like routing from outside in probably that might do the job
[18:59:43] DoctorMonocular: has joined #RubyOnRails
[19:01:24] SteenJobs: tried rerouting, didn???t work
[19:01:30] SteenJobs: although your redirect idea seems cleve
[19:01:52] earthquake: has joined #RubyOnRails
[19:04:05] SteenJobs: hamster88: getting stuck while saving though
[19:04:59] rhizome: it doesn't matter where a form is pointed, it can go on any page
[19:05:54] SteenJobs: rhizome: i know i know
[19:06:09] SteenJobs: rhizome: the issue here isn???t submitting a form, it has to do with the way this gem is designed
[19:06:41] SteenJobs: it normally expects a restful controller corresponding to the view - but in this case, since i???m using devise, updating on the profile page points to the update action in my users controller, not registrations controller
[19:07:16] rhizome: i don't understand
[19:08:15] joaomdmoura: has joined #RubyOnRails
[19:08:29] mostlybadfly: has joined #RubyOnRails
[19:09:42] chintanparikh: has joined #RubyOnRails
[19:12:51] cytoskeletor: I'm trying to reload a partial using jquery so that I don't have to do a full page reload when information is updated. I have a gist if any of you would like to take a look
[19:13:45] cytoskeletor: For some reason the view has no problem loading the partial but when I try to reload with ajax it throws an undefined method for nil error
[19:14:45] batasrki: cytoskeletor: you set the local as users, but the partial expects a variable named @users
[19:14:48] batasrki: see the difference?
[19:16:45] Maletor: has joined #RubyOnRails
[19:16:55] nohminn: has joined #RubyOnRails
[19:17:30] SteenJobs: rhizome: if i???m placing the in-place form to edit in my users show file, then the gem will route the put request to users#update
[19:17:31] krisquigley: has joined #RubyOnRails
[19:17:52] joaomdmoura: has joined #RubyOnRails
[19:18:49] smathy: has joined #RubyOnRails
[19:18:52] cytoskeletor: I thought I was making the @users variable available to the partial by setting the local to @users
[19:19:42] batasrki: cytoskeletor: inside the partial, it's referred to as users, with no @
[19:20:13] darrencauthon: has joined #RubyOnRails
[19:20:23] cytoskeletor: <%= @users.each do |user| %>?
[19:20:36] rhizome: SteenJobs: oh. maybe use a different gem, or maybe it has config options, or
[19:20:51] SteenJobs: rhizome: all the in place gems seem to function this way
[19:20:54] SteenJobs: whatever i???ll figure it out
[19:21:17] batasrki: cytoskeletor: and what does the error say?
[19:22:02] cytoskeletor: ActionView::Template::Error (undefined method `each' for nil:NilClass):
[19:22:28] batasrki: and where's the only occurrence of each?
[19:22:46] cytoskeletor: @users.each in the partial
[19:22:54] batasrki: so what does that tell you?
[19:23:22] cytoskeletor: @users is not an object with information
[19:24:03] i: has joined #RubyOnRails
[19:24:10] alex165: has joined #RubyOnRails
[19:24:25] hamster88: how can i view last post from post model to the view(home) of pages controller??
[19:26:26] batasrki: cytoskeletor: ok
[19:26:47] batasrki: cytoskeletor: when you set a local, the name of the key is how that variable is referred to in the partial
[19:27:07] batasrki: cytoskeletor: the reason @users works in the normal case is that it's an implicit assignment done by Rails
[19:27:31] hamster88: here goes gist > https://gist.github.com/thedesignable/7cd3ba3ce5ce0f523a33
[19:27:32] batasrki: cytoskeletor: when you use jQuery to render the partial, Rails doesn't make the same implicit assignment
[19:27:44] batasrki: cytoskeletor: so, in that context, @users doesn't exist
[19:27:49] batasrki: cytoskeletor: but users does
[19:28:05] batasrki: cytoskeletor: because you've explicitly set it
[19:28:13] bruno-: has joined #RubyOnRails
[19:28:15] pehlert: has joined #RubyOnRails
[19:28:35] batasrki: so, to fix your current problem, just remove the @ from @users
[19:28:37] cytoskeletor: How can I make both the implicit behavior and my ajax work
[19:28:55] batasrki: change the normal partial such that you set the same local
[19:29:03] batasrki: remove the implicit behaviour, essentially
[19:29:06] i: has joined #RubyOnRails
[19:29:54] joaomdmoura: has joined #RubyOnRails
[19:29:57] devdazed: has joined #RubyOnRails
[19:30:01] dopie: has joined #RubyOnRails
[19:30:16] cytoskeletor: I will see what I can do. Thanks
[19:31:26] batasrki: rhizome: you don't use jruby, right?
[19:31:32] simplyianm: has joined #RubyOnRails
[19:32:11] rubyonra_: has joined #RubyOnRails
[19:32:52] simplyia_: has joined #RubyOnRails
[19:34:06] SteenJobs: rhizome: almost got it. redirecting now to my registrations#edit instead of #update for some reason
[19:35:00] Coldblackice: has joined #RubyOnRails
[19:35:03] simplyianm: has joined #RubyOnRails
[19:36:49] hamster88: anyone might be able to point me to the right direction please
[19:39:08] asheinfeld: has joined #RubyOnRails
[19:41:54] SteenJobs: any idea how to get ???redirect_to edit_user_registration_path(@user, format: :json)??? to point to #update rather than #edit?
[19:42:58] hamster88: SteenJobs, what does it says for your rake routes?
[19:43:10] hamster88: for the update i mean.
[19:43:19] startupality: has joined #RubyOnRails
[19:43:36] SteenJobs: hamster88: it???s the correct helper. in rails, often the same helper is used for different requests when they???re performing different CRUD operations
[19:45:00] hamster88: SteenJobs, did you tried using update_user_path <<
[19:45:21] ellisTAA: has joined #RubyOnRails
[19:45:28] rickmasta: has joined #RubyOnRails
[19:45:31] SteenJobs: hamster88: no???why would that do anything?
[19:46:11] hamster88: SteenJobs, you can also do this way.. set a redirect for edit to update and then use that redirect path for this one
[19:46:27] SteenJobs: that???ll mess up other things
[19:46:47] hamster88: eek , true that
[19:46:50] SteenJobs: i can???t have my edit action redirecting to update, how am i then supposed to access the edit form
[19:46:53] ellisTAA: i can???t find a definition for what paritals or helpers. can anyone define those for me?
[19:47:27] diegoviola: has joined #RubyOnRails
[19:47:28] fryguy: EllisTAA: helpers = methods you can call from views. partial = a template that represents part of a view
[19:47:43] ellisTAA: fryguy: thank you so much
[19:48:06] ellisTAA: fryguy: and where would those methods be stored?? in a controller?
[19:48:09] weckl: has joined #RubyOnRails
[19:48:23] fryguy: EllisTAA: no, in a helper class
[19:48:52] ellisTAA: and where is that helper class stored?
[19:48:57] ellisTAA: in the controller folder?
[19:48:59] fryguy: EllisTAA: app/helpers
[19:49:57] weckl: has joined #RubyOnRails
[19:49:58] meoblast001: has joined #RubyOnRails
[19:50:16] ellisTAA: and i???m guessing partials have a partial folder?
[19:50:36] cytoskeletor: batasrki: I tried what you suggested and some other things. When I remove @ from users the variable is no longer recognized
[19:50:57] arooni-mobile: has joined #RubyOnRails
[19:50:59] Coldblackice: has joined #RubyOnRails
[19:52:09] MEATCHICKEN: cytoskeletor, http://guides.rubyonrails.org/layouts_and_rendering.html
[19:52:23] MEATCHICKEN: Read the section on partials
[19:52:35] cytoskeletor: Thanks meatchicken. I've been reading through that
[19:52:49] MEATCHICKEN: What exactly are you trying to do?
[19:52:56] MEATCHICKEN: And what's not working?
[19:53:10] batasrki: cytoskeletor: in what case is it not recognized?
[19:53:13] batasrki: normal case?
[19:53:21] fryguy: EllisTAA: no, they are in app/views, their name is prefixed with an underscore
[19:53:42] ellisTAA: fryguy: thanks
[19:54:08] cytoskeletor: If I simply remove the @ from the ajax I get an undefined variable when that is triggered
[19:54:31] cytoskeletor: I've tried many different combinations in all three files
[19:54:32] batasrki: from the @users.each?
[19:54:51] cytoskeletor: I've tried that too
[19:55:49] batasrki: did you add a locals hash to show.html.erb?
[19:55:52] simplyianm: has joined #RubyOnRails
[19:56:00] batasrki: meatchicken: this is cytoskeletor's original gist, https://gist.github.com/Joshuaatt/df5c7274cb3633cd9749
[19:56:33] steve_mc: has joined #RubyOnRails
[19:57:44] gerep: fryguy, slim is really nice
[19:57:52] gerep: fryguy, and cleaner
[19:58:06] cytoskeletor: Okay, the show is <%= render partial: 'users/users/, locals: { users: @users } %> and the partial is just <% users.each do %>
[19:58:09] simplyianm: has joined #RubyOnRails
[19:58:36] batasrki: and if you update through ajax?
[19:59:30] mtchllbrrn: has joined #RubyOnRails
[19:59:54] cytoskeletor: Undefined local variable `users'
[20:00:35] batasrki: is your update action setting @users?
[20:02:28] DLSteve: has joined #RubyOnRails
[20:04:01] cytoskeletor: Well, this is being rendered in the show of a different controller than users, but @users is set
[20:04:04] DLSteve: has joined #RubyOnRails
[20:04:12] cytoskeletor: in that controller
[20:04:28] batasrki: ok, that's the missing link then
[20:04:36] batasrki: try setting @users in the show of that different controller
[20:05:00] cobragoat: has joined #RubyOnRails
[20:07:08] allcentury: has joined #RubyOnRails
[20:07:42] siemprefresco: has joined #RubyOnRails
[20:08:15] futilegames: has joined #RubyOnRails
[20:08:51] batasrki: I'm unsure then why it's giving you that error
[20:09:00] batasrki: someone else here might be able to help, though
[20:09:12] batasrki: add to that gist the relevant controller actions
[20:09:34] earthquake: has joined #RubyOnRails
[20:09:36] cytoskeletor: You've gotten me closer to an answer. I really appreciate it
[20:10:11] startupality: has joined #RubyOnRails
[20:10:22] Alex1651: has joined #RubyOnRails
[20:12:06] mary5030: has joined #RubyOnRails
[20:13:16] Pazician: has joined #RubyOnRails
[20:13:59] Alex1651: Identify A!3xander1
[20:15:32] dopie: has joined #RubyOnRails
[20:16:02] cytoskeletor: batasrki: I updated it with the show action in the controller
[20:16:36] jphenow: has joined #RubyOnRails
[20:16:37] jhass: Alex1651: new password time! and don't use your name this time ;)
[20:17:34] Coldblackice: has joined #RubyOnRails
[20:17:41] ivanskie: has joined #RubyOnRails
[20:17:46] Alex1651: Hey guys i am writing a study app for the math portion of the gre and am having issues when it comes to the difficulty of the question that is being displayed to the user, right now i have a difficulty scale ranging from 1-4 1 being easiest and in the app it displays a 1 where i would rather it display the word easy, while keeping the difficulty scale intact, can anyone help?
[20:18:20] hamster88: where do i need to define map.resource in which file?
[20:18:56] eggoez: has joined #RubyOnRails
[20:19:07] fryguy: Alex1651: one solution is to write a helper that takes a numeric output and outputs a string representation of it, and use that where you want it
[20:19:32] Honeycomb: has joined #RubyOnRails
[20:21:18] darrencauthon: has joined #RubyOnRails
[20:21:35] Pazician_: has joined #RubyOnRails
[20:21:51] Alex1651: fryguy that is a good solution, would i need to write a help for each numeric output (1-4)?
[20:22:01] fryguy: Alex1651: no
[20:22:05] fryguy: use a case statement or something
[20:23:51] Alex1651: fryguy could you point me in the right direction?
[20:24:13] jhass: or just a hash
[20:24:50] jhass: {1 => "easy", 2 => "middle", 3 => "hard", 4 => "genius"}
[20:25:03] yfeldblum: has joined #RubyOnRails
[20:25:18] jhass: Alex1651: since I got no ack, you noticed that you posted your password and changed it?
[20:26:15] Alex1651: Yes i accidentally posted it and yes have changed it as well
[20:26:34] hamster88: I am trying to map the posts resource to pages controller , am i doing it right? >> \ resources :posts, :controller => "pages"
[20:26:40] hamster88: resources :posts, :controller => "pages"
[20:27:37] bratsche: has joined #RubyOnRails
[20:27:46] hamster88: I want the posts resources to be mapped for pages, so that i can use them in the page's views
[20:28:15] Alex1651: jhass thanks for the help, i am just a little overwhelmed, i am just starting and am not exactly sure how to implement the helper, could you help me?
[20:28:42] jhass: Alex1651: do you know Ruby hashes?
[20:28:58] bruno-: has joined #RubyOnRails
[20:29:04] pehlert: has joined #RubyOnRails
[20:29:13] shyshy: has joined #RubyOnRails
[20:29:39] Alex1651: jhass no sir
[20:29:54] jhass: well, that might be a good topic to learn. What tutorial do you follow to learn Ruby?
[20:31:46] Scripore: has joined #RubyOnRails
[20:33:54] FernandoBasso: has joined #RubyOnRails
[20:34:00] jhass: question per query: None, can you recommend any?
[20:34:14] jhass: Alex1651: Chris Pine's Learn to Program is generally recommended
[20:34:46] hotpancakes: has joined #RubyOnRails
[20:34:47] jenrzzz: has joined #RubyOnRails
[20:37:40] aloneintheworld: has joined #RubyOnRails
[20:38:13] steve_mc: has joined #RubyOnRails
[20:40:39] asheinfeld: has joined #RubyOnRails
[20:42:48] francois_: has joined #RubyOnRails
[20:42:58] SteenJobs: has joined #RubyOnRails
[20:45:05] bronson: has joined #RubyOnRails
[20:51:53] dopie: has joined #RubyOnRails
[20:52:02] futilegames: has joined #RubyOnRails
[20:53:51] Cache_Money: has joined #RubyOnRails
[20:54:03] ebbflowgo: has joined #RubyOnRails
[20:54:56] ebbflowgo: has left #RubyOnRails: ()
[20:56:14] dopie: what can i use to automate refreshing the browser every time i change something?
[20:57:52] asheinfeld: has joined #RubyOnRails
[20:59:31] commondream: has joined #RubyOnRails
[21:00:05] dopie: hey Alex1651 if you want a good investment I suggest learning Ruby taught by Trea Leaf Academy
[21:00:15] dopie: they have by far the best program
[21:00:48] DoctorMonocular: has joined #RubyOnRails
[21:03:46] pontiki: has joined #RubyOnRails
[21:05:00] cytoskeletor: has joined #RubyOnRails
[21:06:21] krisquigley: has joined #RubyOnRails
[21:08:42] hardtail: dopie you think so?
[21:08:58] ght: When writing CoffeeScript in RoR 4.2, what is the preferred method for logging errors for debugging purposes? Is there a standard method for sending output to the rails log/development.log, or is something else preferred?
[21:09:38] jcaho: has joined #RubyOnRails
[21:09:46] dopie: hardtail, yes
[21:10:13] dopie: I tried code academy, code school, thoughtbot...
[21:10:22] dopie: countless free websites
[21:10:45] dopie: their course is cheap and very deep in what they teach you
[21:11:44] hardtail: I am currently enrolled in Bloc but I have heard great things about it
[21:12:00] hardtail: Yeah same, I tried the free ones, even Treehouse...just didn't work for me
[21:12:19] hardtail: Treehouse I enjoyed, just never felt like anything I learned was applied to any projects.
[21:12:22] dopie: hardtail, my response to you from what I heard from other bloc users is that tea leaf teaches a lot better
[21:12:32] dopie: I also did treehouse
[21:12:58] hardtail: mentor can play a large part of it for any of them I think
[21:13:08] Pazician: has joined #RubyOnRails
[21:13:13] fryguy: ght: your coffeescript runs on a different machine from your webserver, so it won't have acces to the server logs to write to it. unless you are referring to the asset compilation stage
[21:13:24] DEA7TH: has joined #RubyOnRails
[21:13:48] Mchl: has joined #RubyOnRails
[21:14:05] dopie: hardtail, $400 ... to learn ruby or $5k to learn rails
[21:14:06] earthquake: has joined #RubyOnRails
[21:14:22] dopie: i prefer $400 , they have teach assistants online 24/7
[21:14:22] erichu: has joined #RubyOnRails
[21:14:45] sonofdirt: has joined #RubyOnRails
[21:14:51] hardtail: that's great
[21:15:36] Rubie: has joined #RubyOnRails
[21:17:22] hotpancakes: has joined #RubyOnRails
[21:18:16] hardtail: thanks for the info, I have a family member interested in learning. I will forward this to her
[21:18:32] dopie: and the whole course goes deep
[21:18:36] dopie: there are 3 courses
[21:18:43] dopie: each one builds upon the other
[21:18:52] dopie: and its self paced
[21:20:02] Lightsword: has joined #RubyOnRails
[21:21:18] hardtail: great, originally I was looking at Thinkful for her
[21:21:25] hardtail: but this looks like an excellent option as well
[21:21:31] hardtail: she wasn't liking Treehouse either lol
[21:22:07] darrencauthon: has joined #RubyOnRails
[21:30:10] pehlert: has joined #RubyOnRails
[21:31:15] ght: fryguy: You're right, duh. Ok, say I"m troubleshooting it using my local machine.
[21:32:09] DoctorMonocular: has joined #RubyOnRails
[21:32:29] ruv: has joined #RubyOnRails
[21:34:28] dopie: has joined #RubyOnRails
[21:39:38] dopie: whatrs a blerp
[21:42:06] x1337807x: has joined #RubyOnRails
[21:42:32] siaw23: has joined #RubyOnRails
[21:42:44] rhizome: it's like a sigh
[21:42:50] SteenJobs: what i???m feeling right now
[21:42:55] pontiki: a dryer, but more exaspertated burp
[21:44:34] SteenJobs: i literally have to identical edit forms on two different pages and yet one of them doesn???t work. blerp.
[21:44:37] nahtnam: Hey! Quck question. Is there a way I can tell rails to go to a specific controller if its a json request, and a different controller if its a normal request?
[21:45:52] x-light: has joined #RubyOnRails
[21:46:45] eggoez: has joined #RubyOnRails
[21:48:56] siaw23: has joined #RubyOnRails
[21:49:25] nahtnam: Would I use `, :constraints => { :format => 'json' }`?
[21:49:26] JamesDH: has joined #RubyOnRails
[21:49:38] rickmasta: has joined #RubyOnRails
[21:50:42] asheinfeld: has joined #RubyOnRails
[21:53:39] RegulationD: has joined #RubyOnRails
[21:54:36] workmad3: has joined #RubyOnRails
[21:55:35] nahtnam: Nope. This doesnt work https://gist.github.com/nahtnam/bd8a644c6f1ffb83fd9d
[21:55:53] Lightsword: has joined #RubyOnRails
[21:58:18] CheckYourSix: has joined #RubyOnRails
[22:01:06] dvjones89: has joined #RubyOnRails
[22:01:27] qwertme: has joined #RubyOnRails
[22:01:41] commondream: has joined #RubyOnRails
[22:01:47] cytoskeletor: has joined #RubyOnRails
[22:02:21] nahtnam: Anyone? Is it possible?
[22:03:01] dvjones89: Hi nahtnam, sorry I???ve only just joined the channel. What???s your question?
[22:03:23] nahtnam: Hi dvjones89
[22:03:24] nahtnam: " Is there a way I can tell rails to go to a specific controller if its a json request, and a different controller if its a normal request?"
[22:03:32] nahtnam: "This doesnt work https://gist.github.com/nahtnam/bd8a644c6f1ffb83fd9d"
[22:04:29] siemprefresco: has joined #RubyOnRails
[22:04:43] darrencauthon: has joined #RubyOnRails
[22:06:58] dvjones89: nahtnam: The second half of this blog post might be helpful?
[22:07:00] dvjones89: https://railsadventures.wordpress.com/2012/10/07/routing-only-ajax-requests-in-ror/
[22:09:34] dvjones89: I think the strictly all your requests should route to a single controller and then the controller behaves differently depending on the format of the request
[22:11:15] dvjones89: In your controller, you can use request.format to determine if the request is HTML or JSON etc
[22:11:55] leex: Hi I am saving a value to my record in an after_create action and then I would like to serve the newly changed values, but since the record is still cached it returns the old values, is there a way to do a cache dropping find?
[22:12:26] nahtnam: dvjones89: I cant do that. assets#index is for ember. I want it so that if its a json request, rails returns json but otherwise ember handles the request
[22:13:42] baweaver: has joined #RubyOnRails
[22:13:42] dvjones89: nahtnam: Forgive me, I???m unfamiliar with Ember. Are you saying that the server should *only* respond to JSON requests?
[22:13:46] wt: has joined #RubyOnRails
[22:14:10] nahtnam: dvjones89: Yes, otherwise it should forward to the assets#index which renders the ember.js files
[22:15:11] Oog: has joined #RubyOnRails
[22:15:17] Oog: is it possible to use enums with activemodel
[22:16:05] hololeap: has joined #RubyOnRails
[22:16:21] Maletor: has joined #RubyOnRails
[22:16:30] bronson: has joined #RubyOnRails
[22:16:33] wt_: has joined #RubyOnRails
[22:16:35] dvjones89: Ah, I see. It still feels to me that there could be a single route in routes.rb where *all* requests are forwarded to. Then, once in the controller, you can inspect the request format and if it???s JSON, return some JSON, otherwise render the ember.js
[22:16:56] dvjones89: So basically, do the clever stuff in a controller action, rather than at the routing layer
[22:17:05] hololeap: if i wanted to run some code when a client finishes downloading a file, where would i need to start looking? rack?
[22:17:57] bruno-: has joined #RubyOnRails
[22:19:00] nahtnam: dvjones89: Kk. I ended up doing this: https://gist.github.com/nahtnam/18b1ab6e26c6c5117791
[22:19:13] nahtnam: Does that seem ok?
[22:19:17] nahtnam: Is that what you mean?
[22:19:31] dvjones89: Yup, that???s exactly what I mean :-)
[22:19:51] dvjones89: Does it work? :)
[22:20:01] cytoskeletor: I'm trying to rerender a partial with ajax when a modal closed so that I don't have a full page refresh. https://gist.github.com/Joshuaatt/df5c7274cb3633cd9749
[22:21:33] nahtnam: dvjones89: Yes! Thank you! :)
[22:21:48] dvjones89: Great! You???re welcome
[22:21:53] cytoskeletor: It seems that the partial has @user available to it, but not @users
[22:22:07] leex: disregard my question :) found a solution
[22:23:14] dvjones89: cytoskeletor: I might be misreading, but are you just missing an ???@??? sign in update.js.erb
[22:23:53] dvjones89: In the partial you???re trying to iterate over the collection called ???@users??? which in the locals hash, you???ve called your key ???users???
[22:24:04] dvjones89: s/which/while
[22:24:23] dvjones89: leex What was your solution? I???m intrigued :)
[22:25:13] Alex1651: jhass i am getting an undefined method inside my controller when i define question difficulty
[22:25:25] meier_: has joined #RubyOnRails
[22:25:29] helpa: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[22:25:37] bruno-: has joined #RubyOnRails
[22:25:39] x1337807x: has joined #RubyOnRails
[22:26:26] cytoskeletor: I took the @ out of the partial
[22:27:17] cytoskeletor: dvjones89 I may not have updated that by the time you saw the gist
[22:27:35] allcentury: has joined #RubyOnRails
[22:28:02] erich: has joined #RubyOnRails
[22:28:56] dvjones89: cytoskeletor: Ah, yes I must have been viewing an older version - I thought that was too easy ;)
[22:30:18] cytoskeletor: The initial partial loads when I load the view, but when I go to reload it with the js file I keep getting errors
[22:30:57] pehlert: has joined #RubyOnRails
[22:30:59] leex: Is there an increment(!) that gets called immediately? and where I can be sure to get the updated value when I do record.value right afterwards?
[22:31:21] Alex1651: jhass what do you need to see? Everything?
[22:31:58] jhass: Alex1651: probably, at least the error message and the entire file mentioned in it
[22:32:26] cytoskeletor: dvjones89 is there any other part of the code you would like to see?
[22:32:42] jenrzzz: has joined #RubyOnRails
[22:33:26] dvjones89: cytoskeletor Nah, I think that gist covers it - It has been a while since I???ve used JS to re-render views, I???m trying to remember how it all works :)
[22:33:37] cytoskeletor: dvjones89 my ultimate goal is to just reload this partial instead of the whole page so they the updated user information shows. If there is a better way to do that I would love to know
[22:34:13] Lightsword: has joined #RubyOnRails
[22:36:57] Alex1651_: has joined #RubyOnRails
[22:39:05] ogpastaling: has joined #RubyOnRails
[22:40:47] dvjones89: cytoskeletor Aha, I might have spotted it. When you run your JS, is it making a call to the server?
[22:41:19] dvjones89: Since your JS is called update.js.erb , I think you might need a controller action called update
[22:41:26] cytoskeletor: dvjones89 yes
[22:41:33] dvjones89: And in that controller action, you set the @users variable
[22:41:44] dvjones89: Or rather you *need* to set the @users variable
[22:42:09] dvjones89: I don???t think you can re-use the @users variable that was set when the show view was originally rendered
[22:42:26] diegoviola: has joined #RubyOnRails
[22:42:52] rubyonrailed: has joined #RubyOnRails
[22:43:05] cytoskeletor: I will try that and let you know how it goes. I wish I could just use the @users in the show view that's being rendered
[22:43:33] dvjones89: Yeah, I know what you mean. Let me know how you get on (I need to go AFK for a while anyways)
[22:43:57] dvjones89: Hope that puts you on the right track, cytoskeletor
[22:45:11] nertzy: has joined #RubyOnRails
[22:45:15] wmoxam: I'm having a problem when building from source
[22:45:17] wmoxam: "Error: No available formula for llvm36"
[22:45:59] wmoxam: however even with that warning it seems to build
[22:46:06] wmoxam: but running specs fail
[22:46:11] wmoxam: "ld: library not found for -lgc"
[22:46:19] wmoxam: any ideas?
[22:46:30] wmoxam: wrong room :(
[22:46:38] starfox_sf: has joined #RubyOnRails
[22:46:39] Alex1651: has joined #RubyOnRails
[22:47:01] arBmind: has joined #RubyOnRails
[22:49:26] cytoskeletor: dvjones89 I apparently can't copy and paste my groups_controller @users logic into my users_controller, but I'm still working on it
[22:50:02] baron: has joined #RubyOnRails
[22:50:41] Guest87235: has left #RubyOnRails: ()
[22:50:49] bar0n: has joined #RubyOnRails
[22:50:59] hardlin3r: has joined #RubyOnRails
[22:51:11] Alex1651: has joined #RubyOnRails
[22:53:03] chouhoulis: has joined #RubyOnRails
[22:54:06] hardlin3r: is it ok, $ is defined and jQuery is not?
[22:54:07] ebbflowgo: has joined #RubyOnRails
[22:54:39] Alex1651: has joined #RubyOnRails
[22:54:56] hardlin3r: i have all those things in my application.js and application.html.erb
[22:55:12] krisquigley: has joined #RubyOnRails
[22:56:01] hardlin3r: and my link to sign out path with method destroy doesn't work
[22:56:05] hardlin3r: i use devise
[22:56:09] Alex1651: jhass https://gist.github.com/anonymous/c6ab2d5f8fe3c27e7331
[22:56:53] givanse: has joined #RubyOnRails
[22:57:31] jhass: Alex1651: I see no call to difficulty_name in that code
[22:58:07] ellisTAA: has joined #RubyOnRails
[22:58:26] Rubie: has joined #RubyOnRails
[22:58:29] Alex1651: How is the best way to call it?
[22:59:25] qwertme: has joined #RubyOnRails
[22:59:36] ellisTAA: i???m creating an app in sinatra, if i want to create a registration page for new users would i create a get ???/register/ to display a sign up form, or would i use post?
[22:59:59] cytoskeletor: Hey dvjones89, its no longer throwing errors, but it isn't updating the partial. In my view I have the partial rendered between the <tbody> tags and in my ajax I have the rendering attached to the id of the <tbody>. Should my ajax clear out the initial rendering and replace it?
[23:00:40] jhass: Alex1651: what do you mean?
[23:01:24] Alex1651: I am not sure how to call it, could you help me
[23:01:59] sandstrom: has joined #RubyOnRails
[23:02:04] dseitz: has joined #RubyOnRails
[23:02:41] jhass: maybe you meant to create a view helper?
[23:03:48] gerep: Why I'm getting "Missing partial /home/_header" here? Can't I render the layouts/_header.html.slim? https://gist.github.com/gerep/a9a1e8eecf060501c462
[23:05:18] Alex1651: has joined #RubyOnRails
[23:08:00] laut: has left #RubyOnRails: ()
[23:08:01] cytoskeletor: gerep I'm assuming your _header file is in your home directory?
[23:08:08] centrx: has joined #RubyOnRails
[23:08:20] gerep: cytoskeletor, no, it is in the layouts/
[23:08:31] gerep: cytoskeletor, I'm used to load partials from other directories
[23:08:41] gerep: cytoskeletor, why do I have to place this one there?
[23:08:42] cytoskeletor: try render "layouts/header"
[23:09:06] gerep: cytoskeletor, yes, that was it :)
[23:09:21] gerep: cytoskeletor, so it loads the file based on the current one that is yield
[23:10:49] x1337807x: has joined #RubyOnRails
[23:11:54] dvjones89: cytoskeletor: Yes, my understanding of .html() is that it???ll replace the contents of the selected element entirely. There???s a typo in the JQuery selector (???purchace??? rather than ???purchase???), is that the issue?
[23:11:54] cytoskeletor: gerep, Based on the location of the view you are in
[23:12:04] gerep: cytoskeletor, ok, thanks a lot ;)
[23:12:51] cytoskeletor: dvjones89 That typo is just in my gist, not my code
[23:12:54] dvjones89: cytoskeletor: I???m afraid I need to go AFK overnight (I???m in Scotland so it???s gone midnight here). I???ll check back here tomorrow - Hope you get it working!
[23:13:11] cytoskeletor: dvjones89 Thanks!
[23:14:38] towski_: has joined #RubyOnRails
[23:19:10] jonr22: has joined #RubyOnRails
[23:21:58] bzb: has joined #RubyOnRails
[23:22:26] x-light: has joined #RubyOnRails
[23:22:38] x1337807x: has joined #RubyOnRails
[23:23:49] darrencauthon: has joined #RubyOnRails
[23:24:42] ellisTAA: anyone know the name of the sinatra irc channel?
[23:24:43] xisall: has joined #RubyOnRails
[23:24:50] Alex1651: has joined #RubyOnRails
[23:24:59] jhass: EllisTAA: /msg alis help
[23:25:23] dented42: has joined #RubyOnRails
[23:26:41] ellisTAA: can someone give me feedback on my routes and tell me if they are restful? https://gist.github.com/ellismarte/ff4da421a7f2fb2a1c9b
[23:26:59] n3b_: has joined #RubyOnRails
[23:27:38] erichu: has joined #RubyOnRails
[23:27:55] meier_: has joined #RubyOnRails
[23:28:13] lupine: they are not
[23:28:28] jphenow: has joined #RubyOnRails
[23:28:38] symbol: has joined #RubyOnRails
[23:29:02] Elion46: has joined #RubyOnRails
[23:29:05] lupine: you're meant to be applying verbs [HTTP methods] to nouns [your URLS]
[23:29:11] funnymanva_: has joined #RubyOnRails
[23:29:17] lupine: register in the sense you're using it there is a verb
[23:29:45] lupine: the only restful thing in there is get /connections/:id
[23:29:57] lindii_: has joined #RubyOnRails
[23:30:34] ellisTAA: ahhh ok so the url is always a noun?
[23:30:56] Liothen: has joined #RubyOnRails
[23:31:03] Jelmer: has joined #RubyOnRails
[23:31:15] stylus: has joined #RubyOnRails
[23:31:16] aep: has joined #RubyOnRails
[23:31:31] lupine: well, REST calls them resources, but yes, if it's not expressible as a noun it's probably a smell
[23:31:44] ellisTAA: post ???/results??? seems to be using a url that is noun, is it not?
[23:31:45] pehlert: has joined #RubyOnRails
[23:32:13] lupine: yeah, that's bearable, but I'd have to question why you can't get /results/:id
[23:32:21] centrx: register, accept, see
[23:32:36] michael_mbp: has joined #RubyOnRails
[23:32:43] ellisTAA: lupine can i pm you?
[23:32:49] centrx: /connections/:id should be /connection/:id right?
[23:32:57] lupine: centrx, I tend to go for plural
[23:33:03] lupine: unless it's a singleton, obviously
[23:33:15] lupine: not a hard and fast rule though
[23:33:18] ellisTAA: what would the value of using ???results:id??? be over results?
[23:33:30] lupine: you'd POST /results
[23:33:30] xisall: has left #RubyOnRails: ()
[23:33:34] lupine: and GET /results/:id
[23:33:47] lupine: assuming that's a sane thing in your modelling
[23:33:50] ebbflowgo: has joined #RubyOnRails
[23:34:41] ellisTAA: ok. and if i change get ???/register??? and post ???/register??? to get ???/registration??? and post ???/registration???, would that be restful?
[23:34:47] lupine: GET /results would return all the results you're eligible to see, and you could provide query-string parameters to filter server-side - GET /results?syphilis_status=negative say
[23:35:43] lupine: could be. it's not all about names, though, it's about a particular way of modelling the concepts you present to the user of your API
[23:35:54] lupine: don't worry, nobody gets it right
[23:36:13] lupine: to me, registering is creating a new user. So I'd POST /users
[23:36:21] ellisTAA: where can i read more about this particular way of modeling the concepts you present to the user of your api?
[23:36:27] lupine: if I were feeling contrary, I might introduce a verb REGISTER
[23:36:32] lupine: and make it REGISTER /
[23:36:42] lupine: but that tends to send kool-aid restists insane
[23:37:08] symbol: has joined #RubyOnRails
[23:38:27] lupine: you could do worse than http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm
[23:39:05] ellisTAA: i dont really understand the :id thing
[23:39:07] lupine: (custom verbs must be treated as POST, so by ignorant middlemen, so verbs that aren't intended to have POST-style effects on intermediate caches are Bad)
[23:39:21] asheinfeld: has joined #RubyOnRails
[23:39:45] lupine: rails will transpose the part of the URL mentioned as :id into the params object
[23:40:01] lupine: GET /connections/:id matches URLs like /connections/1, /connections/2, etc
[23:40:09] ellisTAA: by that you mean the objects id correct?
[23:40:11] lupine: and your controller will have params[:id] == 1 or == 2
[23:40:28] lupine: what it corresponds to is up to you, but typically some model's id column, yes
[23:40:33] ebbflowgo: has left #RubyOnRails: ()
[23:40:36] lupine: (I would avoid Connection as a name in rails)
[23:40:40] ellisTAA: ok thanks for clarifying
[23:40:49] lupine: it'll break belongs_to and has_one associations for instance
[23:41:00] pontiki: has joined #RubyOnRails
[23:41:10] lupine: the list of useful words rails reserves to itself is too damn high
[23:41:39] simplyianm: has joined #RubyOnRails
[23:41:51] ellisTAA: yeah i??????m in a bootcamp and we are learning sinatra, then rails in a few weeks
[23:42:02] lupine: fun stuff
[23:42:08] lupine: anyway, it's often fine not to be restful
[23:42:25] lupine: it's only really useful when you're designing APIs. for websites, it's meh
[23:42:34] RegulationD: has joined #RubyOnRails
[23:43:05] ts310_: has joined #RubyOnRails
[23:43:24] workmad3: has joined #RubyOnRails
[23:43:26] jonr22: has joined #RubyOnRails
[23:43:30] ellisTAA: so rest mostly is a convention of naming urls correct? and how does this relate to the idae of transfering states that represent (what is being represented?)
[23:43:45] lupine: the URLs are a fairly minor part of it
[23:43:56] ellisTAA: so the verb is the important part?
[23:43:58] lupine: the idea is that your API exposes various things (these are your nouns)
[23:44:10] lupine: the verbs specify widely-understood things you can do to your nouns
[23:44:30] lupine: if everyone follows the conventions, you can make certain assumptions that hold true across all APIs
[23:44:38] lupine: (i.e., a GET will never change state)
[23:45:10] lupine: if someone does GET /foo, then someone else does GET /foo later, with no intervening actions, you know that the state should not have changed
[23:45:28] lupine: which, if true, means the response is the same. which means you can cache the response
[23:45:52] lupine: I think there's a #rest channel which might be more appropriate for in-depth stuff
[23:46:30] ellisTAA: ok thanks, i really appreciate it. i???ve got a better understanding of this stuff now
[23:46:50] patrick_star: has joined #RubyOnRails
[23:48:23] cytoskeletor: EllisTAA: Epicodus?
[23:48:58] cytoskeletor: EllisTAA: I was wondering if that was your bootcamp, but I guess not
[23:50:43] twilling: has joined #RubyOnRails
[23:51:22] twilling: Aren???t all files under app/ autoloaded by Rails?
[23:51:36] one_zero: has joined #RubyOnRails
[23:51:36] lupine: it does its best
[23:52:07] lupine: I think if you have extra subdirectories, you need to add them to config.autoload_something_or_another
[23:52:21] twilling: oh perhaps thats what it is (extra subdirs)
[23:52:41] lupine: when I threw in delayed job I needed to do it for app/jobs for instance
[23:52:52] sjeijk: has joined #RubyOnRails
[23:53:16] lupine: ACTION is rather anti-auto-loading, it leads to a poor understanding of dependencies
[23:53:39] bmurt: has joined #RubyOnRails
[23:54:22] chouhoulis: has joined #RubyOnRails
[23:55:45] pipework: ACTION also does not like autoloading or big environments
[23:56:31] lupine: rails man. not even once.
[23:57:14] pipework: Ain't even, but gotta make money.
[23:57:41] FernandoBasso: has joined #RubyOnRails
[23:58:05] siemprefresco: has joined #RubyOnRails
[23:59:04] ellisTAA: anyone free to take a look @ my schema and tell me if it is good? https://gist.github.com/ellismarte/ff4da421a7f2fb2a1c9b#file-schema-rb-L1
[23:59:24] ellisTAA: http://postimg.org/image/6byvc2g4f/