« Back to channel list

#RubyOnRails - 16 June 2016

« Back 1 day Forward 1 day »
[00:03:51] startupality: has joined #RubyOnRails
[00:04:22] emachnic: has joined #RubyOnRails
[00:05:05] Oliphaunte: has joined #RubyOnRails
[00:05:11] macsteps: has joined #RubyOnRails
[00:06:14] dblessing: has joined #RubyOnRails
[00:06:23] quazimodo: has joined #RubyOnRails
[00:06:26] chouhoulis: has joined #RubyOnRails
[00:09:05] jenrzzz: has joined #RubyOnRails
[00:09:05] jenrzzz: has joined #RubyOnRails
[00:11:38] flashpoint9: has joined #RubyOnRails
[00:11:43] emachnic: has joined #RubyOnRails
[00:13:25] rickmasta: has joined #RubyOnRails
[00:14:53] gking: has joined #RubyOnRails
[00:15:14] gking: Hello, how do I remove a key from a non-hash object? Specifically, this object is returned from an API, via a RubyGem.
[00:15:21] Dios: has joined #RubyOnRails
[00:18:31] roamingdog: Darmani: depends of course on if there is valuable work in those branches
[00:19:16] Darmani: roamingdog: There isn't. It's just a record of the features from when I started the project.
[00:19:42] roamingdog: Darmani: ah, ja i always clean up branches after i've merged them, or am done with them
[00:21:03] Darmani: roamingdog: okay man ^^
[00:25:43] dblessing: has joined #RubyOnRails
[00:31:25] ekinmur: has joined #RubyOnRails
[00:32:04] Jasaka: has joined #RubyOnRails
[00:34:23] wethu: has joined #RubyOnRails
[00:35:16] moeabdol: has joined #RubyOnRails
[00:37:05] solars: has joined #RubyOnRails
[00:43:43] Tempesta: has joined #RubyOnRails
[00:44:52] manfrin: has joined #RubyOnRails
[00:48:50] Ericx2x: has joined #RubyOnRails
[00:50:37] dannyguk: has joined #RubyOnRails
[00:51:36] Sashimi: has joined #RubyOnRails
[00:51:46] Ropeney: has joined #RubyOnRails
[00:52:16] Sashimi: has joined #RubyOnRails
[00:57:49] Niham: has joined #RubyOnRails
[00:58:33] blackmes1: has joined #RubyOnRails
[00:59:16] emachnic: has joined #RubyOnRails
[01:00:13] danostrowski: has joined #RubyOnRails
[01:02:46] Rodya_: has joined #RubyOnRails
[01:07:13] jancel: has joined #RubyOnRails
[01:08:33] Rodya_: has joined #RubyOnRails
[01:17:40] rickmasta: has joined #RubyOnRails
[01:26:01] gking: has joined #RubyOnRails
[01:26:32] dblessing: has joined #RubyOnRails
[01:26:43] gking: How do I use methods like ActiveSupport::Inflector.transliterate in my own code in the lib/ folder? Is require(‘active_support/inflector’) the right way to do it?
[01:27:22] gking: but they are all available by default in controlls right?
[01:30:19] solars: has joined #RubyOnRails
[01:30:58] DiCablo: has joined #RubyOnRails
[01:31:06] ElFerna: has joined #RubyOnRails
[01:33:50] sevenseacat: has joined #RubyOnRails
[01:35:36] jgt3: has joined #RubyOnRails
[01:42:28] juan_: has joined #RubyOnRails
[01:45:25] ur5us: has joined #RubyOnRails
[01:47:54] jancel: has joined #RubyOnRails
[01:51:18] dannyh: has joined #RubyOnRails
[01:51:21] dannyguk: has joined #RubyOnRails
[01:53:23] emachnic: has joined #RubyOnRails
[01:56:53] kgrz: has joined #RubyOnRails
[01:57:01] drupald: has joined #RubyOnRails
[01:59:02] jayc0b0: has joined #RubyOnRails
[01:59:30] blackmes1: has joined #RubyOnRails
[02:02:46] JakFrist: has joined #RubyOnRails
[02:06:31] dblessing: has joined #RubyOnRails
[02:06:48] Alazoral: has joined #RubyOnRails
[02:09:06] rakm: has joined #RubyOnRails
[02:12:04] rakm: i have a unix-y question... i'm using the whenever gem to run a rake task every night. but this rake task requires some environment variables to be set. I'm using dotenv-rails and capistrano, so I have a .env file in a shared location on the machine. the `whenever` rake task is failing right now because those environment variables aren't loaded. what's the appropriate place/method for these env vars to be set so my rake task can run
[02:12:04] rakm: every night?
[02:13:13] dblessing: has joined #RubyOnRails
[02:16:42] webchat: has joined #RubyOnRails
[02:19:04] bool_: has joined #RubyOnRails
[02:19:42] JakFrist: has joined #RubyOnRails
[02:22:03] hutch: has joined #RubyOnRails
[02:23:22] moeabdol: has joined #RubyOnRails
[02:25:21] Niham: has joined #RubyOnRails
[02:32:32] dblessing: has joined #RubyOnRails
[02:34:46] bool_: has joined #RubyOnRails
[02:38:53] banisterfiend: has joined #RubyOnRails
[02:45:03] enitiz: has joined #RubyOnRails
[02:46:56] kies: has joined #RubyOnRails
[02:50:44] rueben: has joined #RubyOnRails
[02:52:07] dannyguk: has joined #RubyOnRails
[02:52:35] binaryplease1: has joined #RubyOnRails
[02:55:30] lictor36: has joined #RubyOnRails
[02:57:05] solars: has joined #RubyOnRails
[02:58:10] xall: has joined #RubyOnRails
[02:59:54] AdamOnRails: has joined #RubyOnRails
[03:00:33] aantix: has joined #RubyOnRails
[03:01:17] AdamOnRails: Soooo my question is this: Is passing a params hash to a model.create() safe? Is it the same as blah.create("a = ? and b = ?",params[:a],params[:b]) ?
[03:03:04] blackmes1: has joined #RubyOnRails
[03:03:22] sevenseacat: if you whitelist the fields you pass in via strong_parameters, yes
[03:04:26] sypheren: has joined #RubyOnRails
[03:04:45] ghormoon: has joined #RubyOnRails
[03:04:57] jancel: has joined #RubyOnRails
[03:06:47] jgt3: has joined #RubyOnRails
[03:07:30] teaearlgraycold: has joined #RubyOnRails
[03:10:37] fsteim: has joined #RubyOnRails
[03:10:59] lightt: has joined #RubyOnRails
[03:12:47] AdamOnRails: Thanks sevenseacat :)
[03:16:21] SteenJobs: has joined #RubyOnRails
[03:16:33] Ropeney: has joined #RubyOnRails
[03:19:03] zpr: has joined #RubyOnRails
[03:19:50] braincrash: has joined #RubyOnRails
[03:21:08] k3rn31: has joined #RubyOnRails
[03:21:57] zpr: hi, what might be the benefit of a has_one & embeds_many relationship (data store), vs a has_many relationship?
[03:23:01] Radar: zpr: Do you have an example you could gist us?
[03:23:22] zpr: other than to maintain some shared properties that is
[03:23:32] zpr: hmm sure
[03:26:05] zpr: Radar: http://codepad.org/zAJUnjE7 i hope this example sufficiently describes my question
[03:27:00] Radar: I don't understand the point of the second one.
[03:27:09] Radar: the first example looks like a traditional parent/child setup.
[03:27:43] zpr: me neither :)
[03:28:41] zpr: i guess the point was to keep the store relational and embed the other documents
[03:29:01] zpr: as the "childs" set can grow very large
[03:30:19] Oliphaunte: has joined #RubyOnRails
[03:31:40] stardiviner: has joined #RubyOnRails
[03:33:32] iceden: has joined #RubyOnRails
[03:34:33] zpr: just not sure if this optimization makes sense
[03:35:31] DoctorMonocular: has joined #RubyOnRails
[03:40:01] Oliphaunte: has joined #RubyOnRails
[03:41:40] roamingdog: zpr: i'd hope rails can handle 'children' instead of 'childs' fwiw
[03:41:45] wd40s: has joined #RubyOnRails
[03:42:00] emachnic: has joined #RubyOnRails
[03:43:52] pontiki: has joined #RubyOnRails
[03:44:37] AdamOnRails: When permitting mass assignment with strong params in the controller for a model that is camel-cased (in this case "TempUser").... with respect to params.require(:temp_user).permit(:foo,:bar) .... is the correct symbol to use the camelcased version :tempUser OR the underscored version temp_user ?
[03:45:44] sevenseacat: AdamOnRails: you're permitting params, so you permit whatever the params are called
[03:46:09] sevenseacat: while they usually correspond to a model and its attributes, they don't have to
[03:47:17] AdamOnRails: Ahhhhhh, copy that. Thanks :)
[03:51:19] Rodya_: has joined #RubyOnRails
[03:52:36] lightt: has joined #RubyOnRails
[03:52:50] dannyguk: has joined #RubyOnRails
[03:53:15] DiCablo: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[03:57:08] Long: has joined #RubyOnRails
[03:57:47] Coldblackice: has joined #RubyOnRails
[04:00:50] bool_: has joined #RubyOnRails
[04:02:24] k3rn31: has joined #RubyOnRails
[04:04:01] AdamOnRails: is validates_presence_of still the correct method?
[04:04:09] rueben: has joined #RubyOnRails
[04:04:27] AdamOnRails: or is it now...... validates :attribute_name, presence: true
[04:05:42] hahuang62: has joined #RubyOnRails
[04:05:43] zpr: roamingdog: I don't take any chances ;)
[04:06:06] AdamOnRails: Is there a preference for the newer framework?
[04:06:07] blackmes1: has joined #RubyOnRails
[04:08:51] moei: has joined #RubyOnRails
[04:09:27] slash_ni1k: has joined #RubyOnRails
[04:11:30] Oliphaunte: has joined #RubyOnRails
[04:11:32] moeabdol: has joined #RubyOnRails
[04:11:43] bruce_lee: has joined #RubyOnRails
[04:11:52] Dimik: has joined #RubyOnRails
[04:12:28] rubyonrails748: has joined #RubyOnRails
[04:16:17] lightt: has joined #RubyOnRails
[04:17:05] Radar: AdamOnRails: yes
[04:22:31] jgt3: has joined #RubyOnRails
[04:35:16] qejk: has joined #RubyOnRails
[04:36:09] emachnic: has joined #RubyOnRails
[04:37:15] paradisaeidae: has joined #RubyOnRails
[04:41:21] rogue_koder: has joined #RubyOnRails
[04:47:02] Klumben: has joined #RubyOnRails
[04:49:21] tildes: has joined #RubyOnRails
[04:51:21] pydave6367: has joined #RubyOnRails
[04:52:31] banister: has joined #RubyOnRails
[04:53:20] crystal77: has joined #RubyOnRails
[04:53:35] dannyguk: has joined #RubyOnRails
[04:54:05] duncannz: has joined #RubyOnRails
[04:54:52] rails3435: has joined #RubyOnRails
[04:54:58] duncannz: has joined #RubyOnRails
[04:55:46] jancel: has joined #RubyOnRails
[04:56:23] rails3435: rails newbie here. if i class belongs_to multiple classes should i write it as "belongs to a, belongs to b" in two separate lines or should i use belongs_to_many?
[04:56:30] rails3435: if a class*
[04:57:00] crystal77: has joined #RubyOnRails
[04:59:33] jas02: has joined #RubyOnRails
[04:59:56] snoobydoo: has joined #RubyOnRails
[05:00:01] Radar: there's a belongs_to_many?
[05:02:39] crystal77: has joined #RubyOnRails
[05:03:19] SteenJobs: has joined #RubyOnRails
[05:07:09] crystal77: has joined #RubyOnRails
[05:07:52] blackmes1: has joined #RubyOnRails
[05:19:23] agent_white: has joined #RubyOnRails
[05:20:07] tildes: has joined #RubyOnRails
[05:20:08] sevenseacat: has joined #RubyOnRails
[05:22:19] kgrz: has joined #RubyOnRails
[05:24:01] dionysus69: has joined #RubyOnRails
[05:27:22] alfiemax: can someone please take a look at this : https://gist.github.com/alfie-max/5cad9d99ea9786e5f95f136ad4472065
[05:27:57] crystal77: has joined #RubyOnRails
[05:28:13] axxyhtrx: has joined #RubyOnRails
[05:28:27] alfiemax: i can't seem to find any reason for this to happen
[05:28:53] alfiemax: even thought my Event model has_many requests, when trying out the same in the console gives me an error
[05:29:12] alfiemax: i tried reloading the console, restarted it several times
[05:32:23] sevenseacat: alfiemax: methinks Request is going to be a reserved class name in Rails
[05:32:59] alfiemax: hmm, but wouldn't rails through an error in that case?
[05:33:15] alfiemax: it did when i tried to create a Thread model
[05:33:27] alfiemax: it said that Thread was reserved
[05:33:31] sevenseacat: not if you've just redefined and mungled the existing class
[05:33:37] kgrz: has joined #RubyOnRails
[05:33:45] sevenseacat: Thread is a Ruby thing, not Rails
[05:33:46] alfiemax: no, i used a generator
[05:34:03] alfiemax: i'm aware of that, but the error said so
[05:34:08] sevenseacat: just try renaming it? :)
[05:34:28] alfiemax: `The name 'Thread' is either already used in your application or reserved by Ruby on Rails. Please choose an alternative and run this generator again.
[05:34:43] sevenseacat: though seeing the full error would be nice - I suspect it's not related to that code because that code doesn't specify class
[05:35:10] sevenseacat: you've specified :class somewhere that should be :class_name
[05:35:16] alfiemax: i tried it in the console
[05:35:49] alfiemax: yes, that was it
[05:36:03] alfiemax: silly of me..
[05:36:59] kgrz: has joined #RubyOnRails
[05:37:54] chandlerbing: has joined #RubyOnRails
[05:38:11] AmiMoench: has joined #RubyOnRails
[05:39:31] snoobydoo: has joined #RubyOnRails
[05:40:20] melonstorm: has joined #RubyOnRails
[05:40:45] arup_r: has joined #RubyOnRails
[05:42:30] jenrzzz: has joined #RubyOnRails
[05:42:51] crystal77: has joined #RubyOnRails
[05:53:29] arup_r: i m free :)
[05:53:41] AdamOnRails: Has anyone here used recaptcha gem before?
[05:54:08] tbuehlmann: AdamOnRails: I think I did
[05:54:19] dannyguk: has joined #RubyOnRails
[05:54:30] AdamOnRails: This is probably an easy one... :)
[05:54:32] AdamOnRails: https://richonrails.com/articles/recaptcha-and-rails
[05:55:44] AdamOnRails: I followed the above steps. But it's got me thinking - does that verify_recaptcha line in the controller also work to validate the model at the same time as the captcha? So if the captcha passes but validation returns errors will it still render "new" ?
[05:55:56] sevenseacat: easy way to find out
[05:56:08] AdamOnRails: haha, try it :P
[05:57:50] chandlerbing: has joined #RubyOnRails
[05:58:17] melonstorm: has joined #RubyOnRails
[05:58:31] apotry: has joined #RubyOnRails
[05:59:47] moeabdol: has joined #RubyOnRails
[06:00:30] voidDotClass: has joined #RubyOnRails
[06:00:36] AmiMoench: has joined #RubyOnRails
[06:01:48] arifba: has joined #RubyOnRails
[06:02:16] arifba: Could someone please take a look at this? https://gist.github.com/anonymous/c882c74454c4ae79422b2b780f3d3e23
[06:02:48] rvanlieshout: arif__: comment+_params.merge(user_id: current_user.id)
[06:04:44] eGGshke: has joined #RubyOnRails
[06:05:45] arifba: so @comment = @article.comments.create(comment+_params.merge(user_id: current_user.id))?
[06:06:14] rvanlieshout: comment_params
[06:06:16] rvanlieshout: ignore typo's :)
[06:06:47] Dreamer3: has joined #RubyOnRails
[06:07:12] chopin: has joined #RubyOnRails
[06:07:36] rvanlieshout: comment_params returns a hash
[06:07:41] rvanlieshout: merge that with a hash containing user_id
[06:09:11] jas02: has joined #RubyOnRails
[06:09:24] arifba: @rvanlieshout worked like a charm! thanks!
[06:09:37] blackmes1: has joined #RubyOnRails
[06:12:27] netzfisch: has joined #RubyOnRails
[06:13:27] czerasz: has joined #RubyOnRails
[06:14:30] solars: has joined #RubyOnRails
[06:15:47] arup_r: has joined #RubyOnRails
[06:18:52] dionysus69: has joined #RubyOnRails
[06:19:23] guidocalvano: has joined #RubyOnRails
[06:23:09] jgt3: has joined #RubyOnRails
[06:25:53] kgrz: has joined #RubyOnRails
[06:32:27] axxyhtrx: has joined #RubyOnRails
[06:33:03] gingray: has joined #RubyOnRails
[06:34:09] arifba: has joined #RubyOnRails
[06:37:26] arifba: @rvanlieshout sooo... i've ran into another problem regarding the comments
[06:37:38] brianpWins: has joined #RubyOnRails
[06:37:42] arifba: rvanlieshout: https://gist.github.com/anonymous/7b9b2afef5cce29e282564bbaf09e00a
[06:39:19] yardenbar: has joined #RubyOnRails
[06:39:51] snoobydo1: has joined #RubyOnRails
[06:40:21] sevenseacat: so where's the full error?
[06:40:59] yfeldblum: has joined #RubyOnRails
[06:41:35] kgrz: has joined #RubyOnRails
[06:42:24] yfeldblum: has joined #RubyOnRails
[06:43:04] rvanlieshout: arif__: undefined method `email' for nil:NilClass
[06:43:18] rvanlieshout: so you have a comment without a user
[06:43:59] ur5us: has joined #RubyOnRails
[06:44:38] jancel: has joined #RubyOnRails
[06:45:55] srinidhi: has joined #RubyOnRails
[06:47:09] arifba: ahh silly me. thanks again!
[06:47:24] rvanlieshout: .try(:email) or ?.email might help
[06:47:33] conta: has joined #RubyOnRails
[06:53:09] GoranPavlovic: has joined #RubyOnRails
[06:55:05] dannyguk: has joined #RubyOnRails
[06:55:46] jas02: has joined #RubyOnRails
[06:55:48] AdamOnRails: <%= link_to(@activation_url) %>
[06:55:54] AdamOnRails: that's throwing me an exception....
[06:56:05] AdamOnRails: No route matches {:action=>"index"}
[06:56:12] AdamOnRails: What am I missing?
[06:56:17] rvanlieshout: what's @activation_url ?
[06:57:25] AdamOnRails: @activation_url = "/register/activate/#{@temp_user.id}/#{@activation_code}"
[06:57:29] AdamOnRails: in my routes....
[06:57:38] rvanlieshout: that's not how routes work
[06:57:41] rvanlieshout: or how you should use them
[06:58:00] AdamOnRails: get 'register/activate_account/:id/:activation_code', :to => 'register#activate_account'
[06:58:25] rvanlieshout: you don't have resources?
[06:58:28] sevenseacat: right, so thats not @activation_url
[06:58:34] sevenseacat: where have you defined @activation_url
[06:58:35] rvanlieshout: else give this route a name
[06:59:02] rvanlieshout: and use name_i_gave_url(id: @temp_user.id, activation_code: @activation_code)
[06:59:19] sevenseacat: and also give the link the content to use as the text of the link
[07:00:49] mdw: has joined #RubyOnRails
[07:04:21] ferr1: has joined #RubyOnRails
[07:04:40] srinidhi: has joined #RubyOnRails
[07:11:25] blackmes1: has joined #RubyOnRails
[07:13:48] comrad: has joined #RubyOnRails
[07:14:08] DoubleMalt: has joined #RubyOnRails
[07:14:59] abracadaniel: has joined #RubyOnRails
[07:15:19] arup_r: has joined #RubyOnRails
[07:16:05] cgfbee: has joined #RubyOnRails
[07:16:06] czerasz: has joined #RubyOnRails
[07:16:59] abracadaniel: has joined #RubyOnRails
[07:17:54] abracadaniel: has left #RubyOnRails: ()
[07:18:29] emachnic: has joined #RubyOnRails
[07:19:20] arBmind: has joined #RubyOnRails
[07:21:49] Ergo: has joined #RubyOnRails
[07:23:40] artto: has joined #RubyOnRails
[07:24:00] jgt3: has joined #RubyOnRails
[07:29:07] KnownSyntax: has joined #RubyOnRails
[07:29:14] KnownSyntax: has joined #RubyOnRails
[07:29:35] antgel: has joined #RubyOnRails
[07:29:37] alfiemax: has joined #RubyOnRails
[07:32:52] dionysus69: I have a challenge. I want to be able to upload new (&delete old) images from the application. How can I do that? I have used paperclip but I only remember upload option. Is there a conventional way to manage images for my case?
[07:33:10] sevenseacat: check the paperclip docs
[07:33:15] guidocalvano: has joined #RubyOnRails
[07:34:29] dionysus69: ok thanks :)))
[07:34:50] sevenseacat: (I really shouldn't have to suggest that you do that, it should be your first port of call)
[07:35:33] dionysus69: well ye I know but its good to hear experienced couple words rather than drown in google for hours with disorientation syndrome :D
[07:35:45] KnownSyntax: has joined #RubyOnRails
[07:35:45] KnownSyntax: has joined #RubyOnRails
[07:36:43] dopie: sevenseacat, is a great rubber duck
[07:37:28] ur5us: has joined #RubyOnRails
[07:41:55] alfiemax: quick question
[07:42:18] alfiemax: i just setup nginx with passenger, following this : https://www.digitalocean.com/community/tutorials/how-to-install-rails-and-nginx-with-passenger-on-ubuntu
[07:42:26] darutoko: has joined #RubyOnRails
[07:42:49] alfiemax: but when i try to start nginx, using ` sudo service nginx start `
[07:42:52] alfiemax: it does nothing
[07:43:04] alfiemax: it doesnt show any error, or OK message or anything
[07:44:48] guest56: has joined #RubyOnRails
[07:45:26] rvanlieshout: alfiemax: check the nginx logs
[07:46:07] rvanlieshout: and /etc/init.d/nginx to see what it actually does
[07:46:20] Long1: has joined #RubyOnRails
[07:46:27] alfiemax: ok, checking..
[07:47:14] dannyguk: has joined #RubyOnRails
[07:47:39] gingray: has joined #RubyOnRails
[07:47:51] moeabdol: has joined #RubyOnRails
[07:48:45] aganov: has joined #RubyOnRails
[07:49:07] alfiemax: got it, the path was different in the /etc/init.d/nginx file
[07:51:45] jgt3: has joined #RubyOnRails
[07:59:35] Omen: has joined #RubyOnRails
[08:02:31] workmad3: has joined #RubyOnRails
[08:03:02] mikecmpbll: has joined #RubyOnRails
[08:03:47] arifba: how can i delete all records at once?
[08:04:20] soroot: has joined #RubyOnRails
[08:06:35] adre: has joined #RubyOnRails
[08:07:18] dopie: arif__, destroy_all
[08:08:51] arifba: so something like *.destroy_all for everything at once?
[08:11:01] Long: has joined #RubyOnRails
[08:11:28] diegoaguilar: has joined #RubyOnRails
[08:13:10] blackmes1: has joined #RubyOnRails
[08:13:27] emachnic: has joined #RubyOnRails
[08:14:06] Janno: has joined #RubyOnRails
[08:14:55] msyvich: has joined #RubyOnRails
[08:17:12] jsrn: has joined #RubyOnRails
[08:18:07] rvanlieshout: arif__: also check delete_all
[08:18:09] dopie: well you can drop the database
[08:19:36] arifba: i'm just trying to delete all user entry data, for eg, user accounts, articles, comments, etc all at once
[08:19:42] arifba: but keep everything else as is
[08:20:09] rvanlieshout: delete from <table>
[08:20:43] arifba: how would i go about doing that in the console?
[08:21:06] rvanlieshout: rails dbconsole -p
[08:22:23] sevenseacat: ACTION waits for foreign key errors
[08:25:05] arifba: ok i'm in the sqlite console now. how do i delete all data from here?
[08:25:15] blackmes1: has joined #RubyOnRails
[08:25:26] arifba: by the way, i'm only trying to delete user data, not the entire db structure
[08:25:39] edwinvdgraaf: has joined #RubyOnRails
[08:25:56] moeabdol: has joined #RubyOnRails
[08:26:08] guidocalvano: has joined #RubyOnRails
[08:26:48] kitsuneyo: has joined #RubyOnRails
[08:27:37] rvanlieshout: delete from <table>
[08:27:42] tvw: has joined #RubyOnRails
[08:27:46] rvanlieshout: and why not just recreate your db if you want it empty?
[08:31:51] alfiemax: has joined #RubyOnRails
[08:31:56] arifba: has joined #RubyOnRails
[08:32:13] arifba: thanks! any idea how to do the same in Heroku?
[08:34:12] sid_fules: has joined #RubyOnRails
[08:35:59] soroot: has joined #RubyOnRails
[08:41:14] Circuit8: has joined #RubyOnRails
[08:41:30] startupality: has joined #RubyOnRails
[08:42:12] AdamOnRails: Let's say at the end of my development phase, I have my complete Database Schema all sorted so I don't need to do any more migrations. Is there a way I can just export my schema to one giant migration file so that I just need to migrate using a single file?
[08:42:36] rvanlieshout: that's done for every migration
[08:42:39] rvanlieshout: it's in db/schema.rb
[08:42:41] rvanlieshout: rake db:schema:load
[08:42:58] rvanlieshout: artto: never used heroku, dunno about that one
[08:44:30] dminca: has joined #RubyOnRails
[08:44:37] dminca: has left #RubyOnRails: ()
[08:45:12] edwinvdgraaf: has joined #RubyOnRails
[08:46:12] edwinvdg_: has joined #RubyOnRails
[08:47:15] dminca: has joined #RubyOnRails
[08:48:11] dminca: has left #RubyOnRails: ()
[08:48:17] dminca: has joined #RubyOnRails
[08:48:23] dminca: has left #RubyOnRails: ()
[08:48:52] arBmind: has joined #RubyOnRails
[08:48:55] jenrzzz: has joined #RubyOnRails
[08:49:13] dminca: has joined #RubyOnRails
[08:49:19] dminca: has left #RubyOnRails: ()
[08:49:26] dminca: has joined #RubyOnRails
[08:49:34] dminca: has left #RubyOnRails: ()
[08:50:19] Ropeney: has joined #RubyOnRails
[08:50:26] dminca: has joined #RubyOnRails
[08:52:06] dminca: has left #RubyOnRails: ()
[08:52:16] arup_r: has joined #RubyOnRails
[08:52:34] moeabdol: has joined #RubyOnRails
[08:54:15] pawnbox: has joined #RubyOnRails
[08:55:40] apotry: has joined #RubyOnRails
[08:56:21] srinidhi: has joined #RubyOnRails
[08:58:21] arifba: has joined #RubyOnRails
[08:58:21] artto: has joined #RubyOnRails
[08:59:30] arifba: will devise's current_user run into an error if there are multiple users signed in?
[09:00:54] tbuehlmann: current_user is relative to the current request
[09:01:06] tbuehlmann: so you won't get problems when multiple users are signed in
[09:02:36] allenn: has joined #RubyOnRails
[09:02:36] allenn: has joined #RubyOnRails
[09:04:30] wethu: has joined #RubyOnRails
[09:07:23] emachnic: has joined #RubyOnRails
[09:07:49] weckl: has joined #RubyOnRails
[09:08:43] marr: has joined #RubyOnRails
[09:10:35] ksoze: has joined #RubyOnRails
[09:10:46] blackmesa: has joined #RubyOnRails
[09:15:40] sid_fules: has joined #RubyOnRails
[09:16:20] Olipro: has joined #RubyOnRails
[09:16:22] axxyhtrx: has joined #RubyOnRails
[09:16:42] AzaToth: has joined #RubyOnRails
[09:21:11] jenrzzz: has joined #RubyOnRails
[09:21:11] jenrzzz: has joined #RubyOnRails
[09:24:53] mariobros: has joined #RubyOnRails
[09:27:15] mariobros: I have a quick question : I'm building an e-store... I created a table for my product with default column status : "not sold"
[09:27:38] mariobros: After I checkout my cart I would like to change that status in "sold"
[09:27:50] mariobros: I was thinking to use some callback function
[09:28:11] mariobros: but I don't have clear idea on how
[09:28:28] mariobros: anybody can give some suggestion ? It would be awesome
[09:29:52] mariobros: In my ProductsController I did this: after_action :checkout, status: "sold"
[09:30:15] mariobros: but that checkout method exists only for my cart
[09:30:34] mariobros: CartsController*
[09:31:09] ddv: mariobros: that's not a very standard thing to do. I would just redirect them to some thank you page.
[09:34:33] mariobros: because my e-store is a kind of e-bay where everyone can sell and buy anything
[09:34:41] mariobros: on my user profile
[09:35:10] mariobros: I wanna show the product that he put and which ones are sold and which ones are not
[09:35:27] ddv: mariobros: you want to keep some history?
[09:35:39] ddv: mariobros: store it in a database
[09:35:42] mariobros: kind of ... yes
[09:35:59] mariobros: in a different table you mean?
[09:36:19] ddv: mariobros: for example, depends how you model this
[09:39:41] edwinvdg_: has joined #RubyOnRails
[09:40:33] mariobros: ddv: Thank you
[09:44:11] jenrzzz: has joined #RubyOnRails
[09:44:49] msyvich: has joined #RubyOnRails
[09:46:39] existensil: has joined #RubyOnRails
[09:46:40] AdamOnRails: I just tried to do validates_confirmation_of :password, but it threw an exception "can't write unknown attribute"
[09:47:09] AdamOnRails: I was under the impression that the params[:password_confirmation] was supposed to be passed through as like a virtual attribute?
[09:47:10] arup_r: you have this field added in DB? AdamOnRails
[09:47:40] arup_r: oh I see, what u mean
[09:48:01] AdamOnRails: But to answer your question - negative, its not in my DB Table.
[09:48:23] yfeldblum: has joined #RubyOnRails
[09:48:27] AdamOnRails: as per the above
[09:48:42] AdamOnRails: gimmy a sec and ill pastie
[09:49:06] arup_r: u need to have that, in db.. then the confirmtion helper creates for you by rails
[09:50:14] Ergo: has joined #RubyOnRails
[09:50:48] arup_r: hmm, ignore me for now. show the code, first. I am assuming something wrong without seeing it... nvm ignore me
[09:50:54] AdamOnRails: http://pastie.org/private/5ribqyafaaslr0psx19qbq
[09:51:24] AdamOnRails: The DB table has a :password column but not a :password_confirmation column
[09:52:10] AdamOnRails: I should probably add that :password_confirmation is not permitted as one of my strong attribtues
[09:52:35] AdamOnRails: strong parameters*
[09:52:40] quazimodo: has joined #RubyOnRails
[09:53:52] learner: has joined #RubyOnRails
[09:54:29] ddv: AdamOnRails: You need a password_digest column only -> http://api.rubyonrails.org/classes/ActiveModel/SecurePassword/ClassMethods.html
[09:54:44] learner: hey guys, can anyone please tell me what stub does and why this throws wrong number of arguments? coderetreats_presenter = stub
[09:54:48] dminca: has joined #RubyOnRails
[09:55:05] learner: it would work in old versions of rspec-mocks aparently
[09:55:23] arup_r: learner: show ur code
[09:56:56] AdamOnRails: Ah, I see. Cheers mate.
[09:58:39] lupine: has joined #RubyOnRails
[09:58:52] learner: arup_r: I'm following Corey Haines' tutorial, but it seems it was abandoned after 2015, so it's not up to date: here's the code I'm refering to: https://github.com/coreyhaines/bawch/blob/episode2/spec/controllers/coderetreats_controller_spec.rb
[09:59:19] arup_r: AdamOnRails: that is another way to do this. but why error came doesn't answered yet. I think, it is because u passed the in memory field and try to save. I forgot it.
[09:59:39] arup_r: learner: let me see
[10:00:37] edwinvdgraaf: has joined #RubyOnRails
[10:00:41] arup_r: learner: humm it is deprecated method
[10:01:01] learner: arup_r: what do i do instead? what's the new method of writing this?
[10:01:19] learner: arup_r: it's very hard to find documentation on these things
[10:01:25] arup_r: current is https://relishapp.com/rspec/rspec-mocks/v/3-4/docs
[10:01:32] arup_r: learner: ^ :)
[10:01:43] wd40s: has joined #RubyOnRails
[10:01:52] learner: arup_r: ok, but that still doesn't tell me how to translate this
[10:02:14] arup_r: learner: go to link https://relishapp.com/rspec/rspec-mocks/v/3-4/docs and change this to current version, u see what they say
[10:02:38] arup_r: learner: u need to use doubl() for mock and allow() for stub methods
[10:03:06] dminca: is there an alternative for number_field_tag on rails 2.3 ?
[10:03:13] voidDotClass: has joined #RubyOnRails
[10:03:22] arup_r: learner: coderetreats_presenter = stub to coderetreats_presenter = double()
[10:03:43] ddv: dminca: 2.3 is ancient
[10:03:46] learner: arup_r: what about the line under it: stub_const ...
[10:04:11] arup_r: and CoderetreatLive::Coderetreats.stub(:running_today) { coderetreats_presenter } to allow(CoderetreatLive::Coderetreats).to receive(:running_today) { coderetreats_presenter }
[10:04:34] tvw: has joined #RubyOnRails
[10:04:43] dminca: ddv I know man :)) but I can't change that, I'm working in this company with old rails :(
[10:04:49] ksoze: has joined #RubyOnRails
[10:04:49] arup_r: learner: I don't see stub_const here https://github.com/coreyhaines/bawch/blob/episode2/spec/controllers/coderetreats_controller_spec.rb
[10:05:47] yfeldblum: has joined #RubyOnRails
[10:06:52] learner: arup_r: line 8: initially was stub_const("CoderetreatLive::Coderetreats::Presenters::Collection", stub(for: coderetreats_presenter))
[10:07:06] learner: arup_r: he chanages it when he makes the presenter object to that line
[10:07:21] mdw: has joined #RubyOnRails
[10:07:29] arup_r: ok learner, read the current doc and convert them as I said above in 2 examples.. or downgrade rspec to old version?
[10:08:20] learner: arup_r: i really appreciate the help, I just don't understand what that stub_const is doing, if i did i could convert it
[10:08:36] c355E3B: has joined #RubyOnRails
[10:09:09] arup_r: learner: ok, read here https://relishapp.com/rspec/rspec-mocks/v/2-11/docs/stubbing-constants and that will tell u the usuage
[10:09:38] artto: has joined #RubyOnRails
[10:12:43] learner: arup_r: thanks, i still can't seem to understand that line fully, ok so the first part says that the fully qualified name "CoderetreatLive::Coderetreats::Presenters::Collection" is a constant that should be reset every time this file is reread, then it says make this available to coderetreats_presenter?
[10:14:03] arup_r: learner: point me to the link where it is saying.. pls
[10:14:21] snowy: has joined #RubyOnRails
[10:14:28] learner: arup_r: talking about this
[10:14:30] learner: stub_const("CoderetreatLive::Coderetreats::Presenters::Collection", stub(for: coderetreats_presenter)
[10:14:54] learner: the first part according to the link you sent is a fully qualified constant mock object
[10:15:33] learner: the second argument is the type according to this example: stub_const("CardDeck", fake_class, :transfer_nested_constants => true)
[10:15:55] learner: note the fake_class going the second arg
[10:16:21] learner: arup_r: correct so far?
[10:19:57] jancel: has joined #RubyOnRails
[10:20:17] sid_fules: has joined #RubyOnRails
[10:22:58] arup_r: learner: no idea whar for: does..
[10:24:20] arup_r: learner: ok, he is stubbing this method https://github.com/coreyhaines/bawch/blob/0144914097014355f29e97d5b245bfab06848593/app/coderetreat_live/coderetreats/presenters/collection.rb#L6
[10:25:05] arup_r: so CoderetreatLive::Coderetreats::Presenters::Collection.for will return your fake object coderetreats_presenter
[10:25:24] learner: arup_r: how would i do this in the new method :)
[10:25:30] arup_r: it will not call any original class or method of it.. all are fake things. :)
[10:25:53] arup_r: learner: that allow() syntax I told you
[10:26:42] sameerynho: has joined #RubyOnRails
[10:27:59] axxyhtrx: has joined #RubyOnRails
[10:28:57] learner: arup_r: so this? CoderetreatLive::Coderetreats.stub(:for) { coderetreats_presenter } to allow(CoderetreatLive::Coderetreats).to receive(:for) { coderetreats_presenter }
[10:29:47] allcentury: has joined #RubyOnRails
[10:30:06] brahman: has joined #RubyOnRails
[10:30:40] workmad3: learner: receive(:for).and_return(coderetreats_presenter) is slightly more idiomatic
[10:31:07] learner: ok so this:
[10:31:19] workmad3: learner: you tend to only use a block form for `receive` if you have to do something other than just stub out with a fixed return value
[10:31:37] learner: CoderetreatLive::Coderetreats.stub(:for) { coderetreats_presenter } to allow(CoderetreatLive::Coderetreats).to receive(:for).and_return( coderetreats_presenter )
[10:31:37] AimlessRAven: has joined #RubyOnRails
[10:31:47] AimlessRAven: hi all, i have carrier wave uploader for my product images
[10:32:05] AimlessRAven: how to fix image to display in good resolutioon
[10:32:15] jenrzzz: has joined #RubyOnRails
[10:32:15] jenrzzz: has joined #RubyOnRails
[10:32:24] AimlessRAven: for example if i set image more then my product image height widht the image is not initialize good
[10:32:27] AimlessRAven: is a little cutted
[10:32:40] learner: workmad3: thanks for the help too
[10:32:57] bonswouar: has joined #RubyOnRails
[10:33:26] learner: AimlessRaven: you need to give more detail and less vague words like good, say what resolution, what depth, give example code, use pastebin, gist etc for example
[10:33:41] arup_r: learner: wow :) thanks
[10:34:11] brahman: Hi, I need the ability to filter the objects I display in my views. I have a form with a simple select_field, what would be the best way to pass the selection across the user session? I was thinking using Rails.cache but would this be better in a cookie?
[10:34:15] learner: arup_r: is the code i posted correct?
[10:35:01] arup_r: yes.. workmad3 understand Rails/Ruby etc more than me. so u are guided properly.. don't worry
[10:35:31] learner: thanks, I really appreciate both you guys' help
[10:36:11] arup_r: block is for something like side effect or if I do something more instead of just returning a value. But someone told me to use `{..}` aalways. it looks good, and since then I use `{}` instead and_return
[10:37:42] Ergo: has joined #RubyOnRails
[10:40:01] jokke: i'm having some trouble mounting sidekiq-web into my rails app
[10:40:17] jokke: No route matches [GET] "" is the error i get when trying to visit the mounted path
[10:41:04] Circuit8: has joined #RubyOnRails
[10:41:16] jokke: here's how i mount sidekiq-web: https://p.jreinert.com/fj1/ruby
[10:41:32] Confiks: has joined #RubyOnRails
[10:42:39] learner_: has joined #RubyOnRails
[10:43:20] brahman: is using cookies[:environment] = 'dev' a good way of sharing state across browser requests?
[10:43:58] workmad3: jokke: if you're not logged in as an admin, that route will appear to not exist
[10:44:19] learner: workmad3: CC arup_r: can you please check my code to make sure it's correct? http://pastebin.com/fP2pz39c
[10:44:23] workmad3: brahman: depends on how private the state needs to be and how much of it there is
[10:44:42] jokke: workmad3: could i redirect with the constraint if user is nil?
[10:44:57] Confiks: I'm deploying my application server on AWS using blue/green deployment, and I have a separate server which handles ActiveJob jobs. Now during deployment, I want jobs of the 'old' application server to go to the 'old' worker server, and new jobs from the green environment go to the green worker server.
[10:44:57] learner: oops, sorry didn't know pastebin was bad
[10:44:59] jokke: on the other hand never mind
[10:45:02] Confiks: I've been thinking about sending the commit id with the job, but after some searching I can't really find anyone talking about best practices for this scenario. Would anyone know some good practices for this?
[10:45:04] jokke: it's a dev tool anyway
[10:45:25] brahman: workmad3: it doesn't need to be private at all. All users can filter out on the environment and the form is on every page. I just need a reliable way to make sure a user doens;'t have to keep setting the environment they want to deal with...
[10:45:29] workmad3: jokke: yeah, that's the attitude I normally take :) just pretend it doesn't exist if someone without a session url-hacks their way there
[10:46:20] workmad3: brahman: ah... I'd personally probably add that as a query param to URLs that I preserve, rather than stash it in a cookie out of sight :)
[10:46:24] jokke: workmad3: hmmm
[10:46:32] jokke: workmad3: it doesn't work when logged in either
[10:46:54] jokke: sidekiq_web_path /admin/sidekiq Sidekiq::Web
[10:47:05] jokke: is what rake routes gives me
[10:47:09] soroot: has joined #RubyOnRails
[10:47:27] workmad3: jokke: find your user in a rails console and check the `.is?(:admin)` call on it
[10:47:39] learner: workmad3: ok i used pastie.org http://pastie.org/10879232
[10:47:59] axxyhtrx: has joined #RubyOnRails
[10:48:26] workmad3: learner: looks about right to me
[10:48:35] learner: workmad3: thanks
[10:48:37] workmad3: learner: best thing to do is test it out ;)
[10:49:10] nettoweb: has joined #RubyOnRails
[10:49:30] jokke: workmad3: lol
[10:49:37] jokke: workmad3: good point
[10:49:43] jokke: workmad3: it was :superadmin :D
[10:50:01] learner: workmad3: got uninitialized constant CoderetreatsLive::Coderetreates
[10:50:04] d0nn1e: has joined #RubyOnRails
[10:50:14] SanguineAnomaly: has joined #RubyOnRails
[10:52:11] arup_r: has joined #RubyOnRails
[10:52:18] rodfersou: has joined #RubyOnRails
[10:53:09] brahman: workmad3: so with that approach when you handle the selection form, you have to pass the parameter between pages by storing it in a var and make sure to send it to every view? Or am I misunderstanding?
[10:54:36] axilla_: has joined #RubyOnRails
[10:56:12] sid_fules: has joined #RubyOnRails
[10:57:20] rodferso1: has joined #RubyOnRails
[10:58:19] learner: workmad3: http://pastie.org/10879240
[10:58:53] ksoze: has joined #RubyOnRails
[11:04:44] adre: has joined #RubyOnRails
[11:07:59] GodFather: has joined #RubyOnRails
[11:08:01] Ergo: has joined #RubyOnRails
[11:08:26] blackmesa: has joined #RubyOnRails
[11:09:45] learner: workmad3: i think something's missing, we need to "somehow" declare that this hierarchy is fake and doesn't exist: CoderetreatLive::Coderetreats::Presenters::Collection
[11:10:13] learner: since it refers to CoderetreatLive::Coderetreats as an uninitialized constant
[11:17:25] AimlessRAven: has joined #RubyOnRails
[11:17:32] AimlessRAven: hi all, i have = brand.redemption_method.join(", ")
[11:17:45] AimlessRAven: ho to capitalize all redemption_methods
[11:17:55] AimlessRAven: if i set = brand.redemption_method.join(", ").capitalize
[11:18:01] AimlessRAven: this make only first method capitalize
[11:18:45] arup_r: use `.map`, and capitalize them first and join.
[11:20:59] AimlessRAven: arup_r: = brand.redemption_method.map(&:value).capitalize.join(", ")
[11:21:05] AimlessRAven: undefined method `capitalize' for ["online"]:Array
[11:21:21] arup_r: :) u are a blind shooter.. :p
[11:21:46] arup_r: brand.redemption_method.map { |b| b.value.capitalize }.join(", ")
[11:21:56] AimlessRAven: your great ;)
[11:23:16] axilla_: has joined #RubyOnRails
[11:23:25] learner: arup_r: I think that code has something missing, we have a hierarchy of modules that we need to declare as fake, how do i do that
[11:23:37] learner: arup_r: http://pastie.org/10879240
[11:24:41] learner: arup_r: CoderetreatLive::Coderetreats::Presenters those are all modules, except for the CoderetreatLive that's the project module the rest aren't really defined anywhere
[11:25:17] learner: so the old stub method would declare the whole thing as a constant stub, but this new one doesn't do that part
[11:26:10] learner: the new one only takes care of allowing the class Collection to receive function call :for and returning coderetreats_presenter
[11:28:52] arup_r: learner: first stub constants which doesn';t exist http://www.relishapp.com/rspec/rspec-mocks/v/3-4/docs/mutating-constants/stub-undefined-constant
[11:29:42] michael_mbp: Anyone got any leads on Ruby/Rails jobs?
[11:29:47] dminca: has left #RubyOnRails: ()
[11:30:07] k3rn31: has joined #RubyOnRails
[11:31:07] arup_r: i am keep trying :p
[11:32:47] learner: arup_r: that link talks about defining constant values, doesn't really tell me how to define this
[11:33:11] arup_r: learner: first try
[11:33:39] arup_r: learner: what the topic means to you *Stub Undefined Constant* ?
[11:33:58] arup_r: in that link? and again this topic *Stub nested constant*
[11:35:47] artto: has joined #RubyOnRails
[11:35:47] flashpoint9: has joined #RubyOnRails
[11:37:41] Fernando-Basso: has joined #RubyOnRails
[11:37:48] artto: has joined #RubyOnRails
[11:38:17] snoobydoo: has joined #RubyOnRails
[11:39:16] snoobydoo: Question - If I have a rake task that pulls data from an api and updates the db, can I use cron to schedule it so that it runs every 2mins? Or is there a better way to do this?
[11:40:02] ddv: snoobydoo: sure why not? use something like the whenever gem
[11:40:35] michael_mbp: whenever is a wrapper around cron, easy to deploy.
[11:40:58] snoobydoo: ddv: Cool. I almost wrote schdeuler.rb and then I realised Heroku doesn't support cron. Going to have to use their scheduler I guess
[11:41:38] learner: arup_r: http://pastie.org/10879300
[11:42:03] learner: that's the error I'm getting despite the fact that we supposedly stubbed for?
[11:42:06] nickjj: snoobydoo, you can use clockwork. it uses sidekiq to keep track of state and doesn't depend on cron at all
[11:42:31] nickjj: much better approach for a 12factor-style app imo
[11:43:08] snoobydoo: nickjj: Wow cool, thanks!
[11:44:27] k3rn31: has joined #RubyOnRails
[11:44:27] nickjj: snoobydoo, np. its api is nice too.. in your example, it would be: every(2.minutes, 'pull_from_api.job')
[11:44:37] edwinvdgraaf: has joined #RubyOnRails
[11:47:35] kitsuneyo: has joined #RubyOnRails
[11:48:36] fisch123456: has joined #RubyOnRails
[11:50:30] jojojojo: has joined #RubyOnRails
[11:51:42] ElFerna: has joined #RubyOnRails
[11:52:38] universa1: learner: can you gist the full files please?
[11:53:02] wethu: has joined #RubyOnRails
[11:53:07] ksoze: has joined #RubyOnRails
[11:53:15] binaryplease: Hi I got this form code https://ptpb.pw/Y72F which generates this html https://ptpb.pw/GFJc . It should do a POST when clicked on submit but does a GET instead, what am I missing?
[11:53:28] maucar: has joined #RubyOnRails
[11:53:35] snoobydoo: nickjj: Thanks! If you've used clockwork before, could you tell me if DatabaseEvents are something I should be looking into for this/
[11:54:13] universa1: binaryplease: you probably set up some js to intercept the form submission.
[11:54:44] learner: universa1: i'm following along corey haines' https://github.com/coreyhaines/bawch/blob/episode2/spec/controllers/coderetreats_controller_spec.rb https://github.com/coreyhaines/bawch/commit/e55b96b09ac14c49c31074dd1e1e74a884cdb637
[11:55:26] nickjj: snoobydoo, i've used it in a few projects, there's really nothing special you need to do with clockwork
[11:55:38] nickjj: if your logic works inside of a background job, then it will work with clockwork
[11:56:11] universa1: learner: your code please.
[11:56:46] edwinvdgraaf: has joined #RubyOnRails
[11:56:50] learner: universa1: It's the same as that code on the github
[11:57:01] universa1: learner: your pastied code is different.
[11:57:02] conta: is there validation for number increment? eg number must be only x*10? or I need custom validation?
[11:57:27] universa1: conta: custom validation.
[11:57:32] learner: universa1: I am trying to make it work with the new rspec-mocks, so I'm translating the old code into new
[11:57:34] conta: oki thanks
[11:57:40] binaryplease: universa1: So something like bootstrap or similar could be the problem? How can I verify which script is the problem
[11:57:42] snoobydoo: nickjj: Great, thanks. I'll check it out. I got all confused with the DatabaseEvents/Manager stuff written on the Clockwork readme.
[11:57:52] universa1: learner: so what have you done so far? ...
[11:58:20] universa1: binaryplease: no, bootstrap usually not. disable js and try again, to figure out if it is really a get request. how do you know that it is a get request?
[11:58:58] binaryplease: universa1: I looked at the http headers being send in Chrome Dev tools
[11:59:11] universa1: binaryplease: what does the rails log say?
[11:59:17] binaryplease: universa1: GET
[11:59:22] universa1: binaryplease: *if it is really a js problem
[11:59:25] universa1: binaryplease: ok.
[11:59:32] universa1: binaryplease: only this form? all forms?
[11:59:50] ddv: binaryplease: show us your routes.rb
[12:00:06] nickjj: snoobydoo, been a while since i read it, checking... but i will say this, i have saved hundreds of thousands of records to a database through clockwork without ever using that feature
[12:00:25] binaryplease: ddv: routes.rb https://ptpb.pw/atge
[12:00:48] binaryplease: universa1: I dont have other forms
[12:01:23] nickjj: snoobydoo, i think this is in reference to setting dynamic scheduled jobs, rather than study ruby files where you hard code the recurring schedule details - it has nothing to do with saving data to a database as per your app logic
[12:01:36] nickjj: *study = static
[12:01:37] binaryplease: universa1: ddv The whole code is also here https://github.com/SoRoot/mocap Im having problems with the /signup page
[12:02:29] elSaxo: has joined #RubyOnRails
[12:02:32] ddv: try removing post 'users' => 'users#create' and see what happens
[12:03:37] binaryplease: ddv: no change
[12:03:44] ldnunes: has joined #RubyOnRails
[12:03:46] Mia: has joined #RubyOnRails
[12:03:46] Mia: has joined #RubyOnRails
[12:04:37] svankmajer: has joined #RubyOnRails
[12:04:37] svankmajer: has joined #RubyOnRails
[12:05:34] ferr1: has joined #RubyOnRails
[12:06:40] binaryplease: ddv: universa1 I tried disabling javascirpt in chrome, but it doesnt change anything either
[12:07:05] sergio_101: has joined #RubyOnRails
[12:07:36] ddv: binaryplease: maybe some sort of redirect?
[12:07:54] ddv: binaryplease: as in you are not logged in and get redirected to the sessions controller
[12:08:10] Mia: has joined #RubyOnRails
[12:09:47] christianrojas_: has joined #RubyOnRails
[12:10:08] ddv: binaryplease: what happens when you comment: https://github.com/SoRoot/mocap/blob/master/app/controllers/users_controller.rb#L9
[12:10:09] universa1: binaryplease: i cloned your repository, it does not generate a form tag for me...
[12:10:13] blackmesa: has joined #RubyOnRails
[12:11:03] ddv: is it because of <%= ? long time ago that I used erb
[12:11:11] adre: has joined #RubyOnRails
[12:11:18] hardtail: has joined #RubyOnRails
[12:11:32] universa1: binaryplease: oh... might be chrome having issues parsing your html.
[12:11:32] binaryplease: ddv: I commented out that line, doesnt change anyting
[12:11:42] ddv: ok well i'm just guessing here
[12:11:43] universa1: binaryplease: the form is in the generated html, but not in the inspect view.
[12:11:55] ur5us: has joined #RubyOnRails
[12:12:23] binaryplease: universa1: how can that be?
[12:12:40] dminca: has joined #RubyOnRails
[12:12:51] binaryplease: universa1: "curl localhost:3000/signup " gives me a form
[12:13:13] iamvery: has joined #RubyOnRails
[12:13:38] universa1: binaryplease: yes.
[12:13:44] universa1: binaryplease: your layout file is invalid html..
[12:13:48] universa1: footer tag after /body
[12:13:55] universa1: double closing /head tag...
[12:14:14] dminca: has left #RubyOnRails: ()
[12:14:39] learner: universa1: http://pastie.org/10879323
[12:14:46] christianrojas: has joined #RubyOnRails
[12:14:47] learner: does that satisfy?
[12:15:14] universa1: learner: spec/controllers/coderetreats_controller_spec.rb line 10-13 ?! what is this?
[12:15:26] allcentury: has joined #RubyOnRails
[12:15:37] universa1: learner: drop line 8 and 10
[12:15:46] universa1: learner: and the .to on line 11
[12:16:48] learner: universa1: i need to create a fake hierarchy CoderetreatLive::Coderetreats::Presenters::Collection, and a fake function for, that returns coderetreats_presenter
[12:16:49] universa1: binaryplease: fixing that, should give you back your forms ;)
[12:17:05] binaryplease: universa1: I corrected that. no change. the generated html is now https://ptpb.pw/Tqv6
[12:17:26] universa1: learner: allow(Foo).to receive(:bla).and_return(...) effectively stubs the :bla method.
[12:17:32] universa1: learner: try what i suggested ;)
[12:17:56] sid_fules: has joined #RubyOnRails
[12:17:59] tkiel: has joined #RubyOnRails
[12:18:25] joaumg: has joined #RubyOnRails
[12:18:33] axxyhtrx: has joined #RubyOnRails
[12:19:00] AlexJakeGreen: has joined #RubyOnRails
[12:19:07] joaumg: has joined #RubyOnRails
[12:19:16] universa1: binaryplease: https://validator.w3.org/ -- insert your html and look at the errors!
[12:20:35] minver: has joined #RubyOnRails
[12:20:50] Oliphaunte: has joined #RubyOnRails
[12:21:40] binaryplease: universa1: IT WORKS!
[12:21:52] universa1: binaryplease: i know ;)
[12:22:17] binaryplease: universa1: ddv thank you! the problem was a previously opened but not closed form tag, which made the other one ignored
[12:22:35] snoobydoo: nickjj: Understood. Thanks!
[12:22:49] universa1: binaryplease: yes, but you also should fix your other html problems ;) like the closing footer tag after the body tag ;)
[12:22:55] learner: universa1: http://pastie.org/10879339
[12:23:00] minver: If I have Project.joins(:tasks).group("projects.id").having("count(tasks.id)>0"), how do I count the number of projects (rows)?
[12:23:00] binaryplease: universa1: Will do!
[12:23:06] snoobydoo: nickjj: What worker did you use on top of clockwork, just curious? I'm considering sidekiq
[12:23:08] dipnlik: has joined #RubyOnRails
[12:23:18] universa1: learner: drop line 8
[12:23:23] learner: universa1: the issue remains, it says class Collection doesn't implement for
[12:23:54] learner: universa1: if i drop 8, the it says uninitialized constant CoderetreatsLive::Coderetreats
[12:24:09] christianrojas: has joined #RubyOnRails
[12:24:14] learner: universa1: I need to have the hierarchy defined
[12:24:41] nickjj: snoobydoo, i'm a fan of sidekiq (through activejob of course)
[12:24:47] learner: line 8 defines Collection as a class of the given hierarchy
[12:24:57] universa1: learner: well, do you have such a class somewhere?
[12:25:09] learner: universa1: no, i'm mocking it
[12:25:15] universa1: learner: why does your test define a class? it should be somewhere in your app.
[12:25:23] ddv: binaryplease: Nice
[12:25:23] rubyonrails670: has joined #RubyOnRails
[12:25:30] learner: universa1: first you mock it, then you create it
[12:26:19] arup_r: has joined #RubyOnRails
[12:26:29] eljimmy: has joined #RubyOnRails
[12:27:24] universa1: learner: you're probably looking more for something like this? https://relishapp.com/rspec/rspec-mocks/docs/verifying-doubles/using-a-class-double
[12:27:41] snoobydoo: snoobydoo: Ah. I didn't know i needed Activejob, I'll look into that - and I wouldn't need a sidekiq pro for just job scheduling, right? I just need a rake run every 1/2 minutes
[12:27:46] qejk: has joined #RubyOnRails
[12:29:12] Confiks: Hi. I'm using a ActiveJob worker within blue/green deployment. I'm struggeling to find a good practice to send jobs from a new application to a new worker server (the servers work alongside each other for a short period). I've been thinking about sending the commit id with the job, but I'm really trying to find best practices. Would anyone know something about that?
[12:30:19] nickjj: snoobydoo, activejob is built into rails, it's just a way for you to write your jobs in a way that lets you swap out sidekiq with another supported queue backend if you choose to do so
[12:30:41] nickjj: snoobydoo, and no, you don't need sidekiq pro -- the free version is completely fine for what you want to do
[12:32:39] christianrojas: has joined #RubyOnRails
[12:33:49] christianrojas_: has joined #RubyOnRails
[12:34:17] tvw: has joined #RubyOnRails
[12:34:33] artto: has joined #RubyOnRails
[12:35:48] christianrojas_: has left #RubyOnRails: ()
[12:36:54] AimlessRAven: arup_r: here?
[12:38:02] AimlessRAven: = f.input :redemption_method_cont_all, as: :check_boxes, collection: Occasion.redemption_method.values, item_wrapper_class: 'inline check-primary', label_html: {class: 'm-r-20'}, label: false
[12:38:12] AimlessRAven: how to humanize this Occasin.redemption_method.values here
[12:38:29] AimlessRAven: i try - redemption_methods = {'Online' => :online, 'In store' => :in_store}
[12:38:37] AimlessRAven: and in collect: call redemption_methods
[12:38:56] AimlessRAven: but when i submit my form checkbox is dont checkex
[12:39:02] truenito: has joined #RubyOnRails
[12:39:34] christianrojas: has joined #RubyOnRails
[12:40:15] christianrojas_: has joined #RubyOnRails
[12:40:34] swav: has joined #RubyOnRails
[12:41:22] AimlessRAven: arup_r: this is enumerize attributes
[12:42:26] universa1: AimlessRaven: enumerize provides simple_form support and i18n support.
[12:43:02] universa1: AimlessRaven: https://github.com/brainspec/enumerize#simpleform
[12:43:02] rubyonrails670: Maybe someone can help me out, I think I'm making it more difficult than it is, I have two tables, one of them is a user table and another table has stats for that user. I'm trying to create a view to output stats for each player into a table. (https://gist.github.com/rivacom/6376a2f89984a48a56bda2bd2a83adab) however, I'm stumped on getting each stat for that user from the second table. Any ideas what I should be doi
[12:43:30] universa1: rubyonrails670: !gist-usage
[12:43:30] helpa: rubyonrails670: How to use Gist properly: https://github.com/radar/guides/blob/master/using-gist.markdown
[12:43:34] universa1: rubyonrails670: !associations
[12:43:34] helpa: rubyonrails670: http://guides.rubyonrails.org/association_basics.html - Active Record Association Basics by Mike Gunderloy
[12:44:54] universa1: rubyonrails670: what else beside the view do you have? how do your models look like?
[12:45:02] christianrojas: has joined #RubyOnRails
[12:45:53] dannyguk: has joined #RubyOnRails
[12:47:15] ksoze: has joined #RubyOnRails
[12:47:15] roamingdog: has joined #RubyOnRails
[12:47:23] rubyonrails670: My models are all set I believe, I have the associations in there for each table.
[12:47:34] universa1: rubyonrails670: show!
[12:48:54] bbrowning: has joined #RubyOnRails
[12:50:53] rubyonrails670: https://gist.github.com/rivacom/b6eed748495422f8c7d924700f929495
[12:51:03] axxyhtrx: has joined #RubyOnRails
[12:51:30] universa1: rubyonrails670: so you have a dailystats association on the player class.
[12:51:38] universa1: rubyonrails670: why not use that?
[12:53:27] mdw: has joined #RubyOnRails
[12:54:48] banister: has joined #RubyOnRails
[12:55:04] chouhoulis: has joined #RubyOnRails
[12:55:11] christianrojas: has joined #RubyOnRails
[12:55:44] chouhoulis: has joined #RubyOnRails
[12:55:47] rubyonrails670: So I should be able to use player.dailystat correct?
[12:56:13] universa1: rubyonrails670: !try -- use the rails console
[12:56:14] helpa: rubyonrails670: Why don't you try it and find out for yourself?
[12:56:57] GodFather: has joined #RubyOnRails
[12:57:04] fox_mulder_cp: has joined #RubyOnRails
[12:58:21] hutch: has joined #RubyOnRails
[13:00:33] sevenseacat: has joined #RubyOnRails
[13:01:12] Guest683: has joined #RubyOnRails
[13:03:08] sk0r: has joined #RubyOnRails
[13:06:41] aegis3121: has joined #RubyOnRails
[13:09:32] soroot: has joined #RubyOnRails
[13:10:22] christianrojas: has joined #RubyOnRails
[13:10:36] ramortegui: has joined #RubyOnRails
[13:11:43] roamingdog: hey rubyonrails670, did you ever figure out how to get your top player based on highest avg score?
[13:12:43] roamingdog: rubyonrails670: coz i got a nice one liner for that if you still need
[13:13:15] blackmesa: has joined #RubyOnRails
[13:13:42] yellow5: has joined #RubyOnRails
[13:16:18] rubyonrails670: Kinda, I ended up grouping all the stats and than taking the sum of them to get the sum for each player id
[13:16:44] rubyonrails670: ie: gamesplayed = Dailystat.group(:player_id).sum(:gamesplayed)
[13:16:53] edwinvdgraaf: has joined #RubyOnRails
[13:17:27] rubyonrails670: I just need to figure out how to grab the top one, than the associated username from the player model
[13:18:11] roamingdog: rubyonrails670: joins(:games).group(:id).select('players.*, AVG(games.score) AS average_score').order('average_score desc').first.name
[13:18:34] Rodya_: has joined #RubyOnRails
[13:21:02] roamingdog: tbuehlmann: the circle of life
[13:21:22] roamingdog: tbuehlmann: my q started when i couldn't help rubyonrails670 the other day
[13:24:30] dipnlik: has joined #RubyOnRails
[13:27:23] k3rn31: has joined #RubyOnRails
[13:28:12] rubyonrails670: roamingdog: thank you
[13:29:30] TheMonster: If I'm using shallow nesting and I want to make a specific custom action be available for the nested version not the top one. How can I do that?
[13:31:21] Ebok: has joined #RubyOnRails
[13:32:34] matthewd: TheMonster: Define it separately, as non-shallow
[13:34:21] TheMonster: Alright, thanks :)
[13:35:10] kies: has joined #RubyOnRails
[13:35:40] sn1ff3r: has joined #RubyOnRails
[13:36:05] andatche: has joined #RubyOnRails
[13:37:44] andatche: has joined #RubyOnRails
[13:38:02] dipnlik: hi, i’m trying to better understand nginx and rails and make sure assets are not served by the rails app. at the moment when I load a page in the rails app, it loads no assets, and the app logs show ActionController::RoutingError for each asset. current nginx setup is https://gist.github.com/dipnlik/97bd16d8261d2a916b3e827142b4708e any glaring mistakes there? anywhere else I should look into? any tips are welcome
[13:38:29] bruce_lee: has joined #RubyOnRails
[13:38:29] darutoko: has joined #RubyOnRails
[13:39:09] GreatDanton: has joined #RubyOnRails
[13:39:23] andatche: has joined #RubyOnRails
[13:40:40] andatche: has joined #RubyOnRails
[13:40:58] AdamOnRails: Soooooo I was wondering
[13:41:15] AdamOnRails: I have a TempUser table, and a User table.
[13:41:19] ksoze: has joined #RubyOnRails
[13:41:48] AdamOnRails: The TempUser model has the bare essentials for signing up and creating an account, and once activated, the info is transferred to the more permanent User table and more info is added at a later date.
[13:42:00] andatche: has joined #RubyOnRails
[13:42:34] AdamOnRails: When I do use validates_uniqueness_of in the TempUser model, can I somehow have it validate against the User model also?
[13:43:33] andatche: has joined #RubyOnRails
[13:44:13] AdamOnRails: Or is that something I'll just have to do a User.find(:first,:conditions => ["email = ?",params[:temp_user][:email]]) to check manually?
[13:44:27] AdamOnRails: ...upon signing up, that is.
[13:46:34] artto: has joined #RubyOnRails
[13:46:37] bbrowning: has joined #RubyOnRails
[13:47:48] deur-: AdamOnRails: I think you'd need a custom validate method to get that done. As far as I know validates_uniqueness_of only accepts scopes on the same model.
[13:48:05] aegis3121: has joined #RubyOnRails
[13:48:43] startupality: has joined #RubyOnRails
[13:50:27] Fernando-Basso: has joined #RubyOnRails
[13:50:51] soroot: has joined #RubyOnRails
[13:54:15] snowy: has joined #RubyOnRails
[13:55:16] wmoxam: has joined #RubyOnRails
[13:55:39] blackmesa: has joined #RubyOnRails
[13:56:15] jancel: has joined #RubyOnRails
[13:56:44] sypheren: has joined #RubyOnRails
[13:57:55] sevenseacat: AdamOnRails: thats terribly outdated syntax
[13:57:56] SteenJobs: has joined #RubyOnRails
[13:58:19] SteenJobs: have any of you used Adobe Muse with a Rails app before?
[13:59:21] AdamOnRails: Sevensacat - no doubt haha, approx 6 years old I'd imagine. Still trying to get myself up to speed.
[13:59:33] AdamOnRails: Deur- Cheers mate, suspected as much.
[13:59:34] pawnbox: has joined #RubyOnRails
[14:01:07] elomatreb: Is there a good reason for having the two user states as separate models?
[14:01:56] AmiMoench: has joined #RubyOnRails
[14:05:00] deur-: AdamOnRails: If you'd have separate form objects that have their own validations, and add an "active" boolean column to User, there would not be need for 2 separate models and your validates_uniqueness_of only needs to check 1 pool of e-mails
[14:06:02] aantix: has joined #RubyOnRails
[14:06:15] jgt3: has joined #RubyOnRails
[14:08:26] prithaj: has joined #RubyOnRails
[14:09:46] nettoweb: huy guys, I have an app deployed wit capistrano on DO, and from time to time the app break pointing an error on ransack gem: ActionView::Template::Error (undefined method `id_eq' for Ransack::Search<class: Request, base: Grouping <combinator: and>>:Ransack::Search):
[14:09:56] nettoweb: if I just deploy again, with no changes, the app works again
[14:10:15] nettoweb: I dont know what this can be, because happens automatically from time to time
[14:11:42] SteenJobs_: has joined #RubyOnRails
[14:13:23] tubbo: nettoweb: what happens if that error occurs, and you restart the server?
[14:14:26] nettoweb: tubbo I've never tries, just re reploying, but I think it will work too
[14:14:56] nettoweb: I cant simulate this right now because this happen randomly
[14:15:02] tubbo: my hunch is that the deploy is just a sledgehammer solution to the problem of "your server needs to be restarted". however, restarting the server every time this happens isn't really a good solution either.
[14:15:46] nettoweb: I have ransack in other apps and always working perfectly...
[14:15:59] nettoweb: and this id column exists
[14:16:07] tubbo: nettoweb: !gist the code that it's happening at
[14:16:07] helpa: nettoweb: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[14:16:51] gingray: has joined #RubyOnRails
[14:18:33] arup_r: has joined #RubyOnRails
[14:19:01] nettoweb: tubbo https://gist.github.com/osnysantos/057d1809279bfb41682fbc94d319c80d
[14:20:57] tubbo: yeah it's possible the model in question isn't getting the ransack methods included in at some point
[14:21:15] tubbo: usually i don't see this in production though
[14:22:12] macsteps: has joined #RubyOnRails
[14:22:25] nettoweb: just happen with this app
[14:23:02] tubbo: haven't used ransack in years
[14:23:10] tubbo: it used to be called meta_search i think
[14:23:49] rafaelfranca: has joined #RubyOnRails
[14:23:54] rafaelfranca: has joined #RubyOnRails
[14:24:33] flashpoint9: has joined #RubyOnRails
[14:26:57] nettoweb: tubbo do you use any nowadays?
[14:27:51] tubbo: nettoweb: i use elasticsearch and pg_search primarily. it's a little more "free-form" but i think having the extra search index really helps
[14:28:04] wd40s: has joined #RubyOnRails
[14:28:07] tubbo: instead of having to figure out my data model and search from there, i just type what i want in the box and it usually comes back
[14:29:32] SteenJobs: has joined #RubyOnRails
[14:32:34] eserror: has joined #RubyOnRails
[14:33:00] christianrojas: has joined #RubyOnRails
[14:33:34] dminca: has joined #RubyOnRails
[14:35:09] tubbo: dminca: life is weird. let's get life.
[14:35:16] salty_solution: has joined #RubyOnRails
[14:35:26] ksoze: has joined #RubyOnRails
[14:35:51] dminca: true tubbo
[14:36:15] dminca: wise words
[14:37:36] dminca: has left #RubyOnRails: ()
[14:39:55] PotatoChipz: has joined #RubyOnRails
[14:40:11] tubbo: always like to help out
[14:40:27] fmcgeough: has joined #RubyOnRails
[14:40:42] agent_white: has joined #RubyOnRails
[14:46:54] hightower: has joined #RubyOnRails
[14:47:40] dionysus69: has joined #RubyOnRails
[14:48:08] salty_solution: So I am trying to create a custom controller method that can be called through standard api methods and am having issues hitting the endpoint properly. Anyone able to help me?
[14:48:30] salty_solution: https://gist.github.com/scooteronce/dfd309b7113c09966c4e2f58e4af1e60
[14:48:57] salty_solution: I have passing tests and everything
[14:49:56] futilegames: has joined #RubyOnRails
[14:49:57] Rodya_: has joined #RubyOnRails
[14:50:02] salty_solution: I am just using curl localhost:3000/patients/show_custom?id=1&format=json
[14:50:21] SteenJobs_: has joined #RubyOnRails
[14:51:13] SteenJobs: well if anyone HAS used Adobe Muse before, I can’t get the responsive stuff to work
[14:51:32] roamingdog: has joined #RubyOnRails
[14:51:57] moty66_: has joined #RubyOnRails
[14:52:50] macsteps: has joined #RubyOnRails
[14:53:08] moty66_: hello, what is the best way to set the env variables for a ror app deplyed on apache+passenger
[14:54:37] fsteim: has joined #RubyOnRails
[14:56:16] snowy: has joined #RubyOnRails
[14:58:38] jgt3: has joined #RubyOnRails
[14:59:03] snowy: has joined #RubyOnRails
[15:01:38] snoobydoo: has joined #RubyOnRails
[15:01:48] andatche: has joined #RubyOnRails
[15:02:33] aegis3121: has joined #RubyOnRails
[15:02:48] kitsuneyo: has joined #RubyOnRails
[15:04:10] schlauberg: has joined #RubyOnRails
[15:05:23] workmad3: moty66: http://httpd.apache.org/docs/2.4/mod/mod_env.html#setenv
[15:05:50] edwinvdgraaf: has joined #RubyOnRails
[15:06:06] moty66: workmad3: does this work also with rake?
[15:06:37] workmad3: moty66: no, you'd need to set environment variables in your shell for rake
[15:07:24] moty66: so if I need to set the secret key for devise, I have to set that on the shell env or I have to create a product.env file, right?
[15:08:17] chopin: has joined #RubyOnRails
[15:08:42] banister: has joined #RubyOnRails
[15:09:30] sniff: has joined #RubyOnRails
[15:11:02] Oliphaunte: has joined #RubyOnRails
[15:12:56] alfiemax: has joined #RubyOnRails
[15:13:15] diegoaguilar: has joined #RubyOnRails
[15:13:16] polishdub: has joined #RubyOnRails
[15:15:53] jancel: has joined #RubyOnRails
[15:16:26] mdw: has joined #RubyOnRails
[15:17:22] learner: workmad3: this is the final translation http://pastie.org/10879527
[15:17:35] learner: universa1: this finally worked ^
[15:17:52] learner: I needed to use double instead of stub / Class.new
[15:18:34] Ebok: has joined #RubyOnRails
[15:21:18] disgrntld: has joined #RubyOnRails
[15:22:28] ksoze: has joined #RubyOnRails
[15:23:05] brendan-: has joined #RubyOnRails
[15:25:15] xlegoman: has joined #RubyOnRails
[15:26:51] edwinvdgraaf: has joined #RubyOnRails
[15:29:13] nettoweb: has joined #RubyOnRails
[15:31:35] cschneid: has joined #RubyOnRails
[15:31:52] bbrowning: has joined #RubyOnRails
[15:34:45] alfiemax: has joined #RubyOnRails
[15:35:00] chouhoulis: has joined #RubyOnRails
[15:39:45] nettoweb: tubbo I have two different apps running in this DO, one of them use: gem 'ransack', github: 'activerecord-hackery/ransack' which is always on latest updated of gem. this could be affecting my other app?
[15:39:49] fsteim: has joined #RubyOnRails
[15:42:14] tubbo: nettoweb: not if they both use bundler and have separate gemfiles
[15:42:25] kitsuneyo: has joined #RubyOnRails
[15:42:45] nettoweb: they both have bundler and separated gemfiles, but I dont specify gemsets
[15:43:28] tubbo: that should be OK
[15:44:14] tjohnson: has joined #RubyOnRails
[15:45:45] antgel: has joined #RubyOnRails
[15:47:06] dminca: has joined #RubyOnRails
[15:47:17] dminca: what's up everyone
[15:47:58] dminca: has left #RubyOnRails: ()
[15:48:05] shinnya: has joined #RubyOnRails
[15:48:05] dipnlik: has joined #RubyOnRails
[15:49:57] snoobydoo: has left #RubyOnRails: ()
[15:51:02] roamingdog: has joined #RubyOnRails
[15:52:11] alfiemax: has joined #RubyOnRails
[15:53:02] davidw: has joined #RubyOnRails
[15:53:06] zel: has joined #RubyOnRails
[15:53:31] AdamOnRails: Ethical question: Should I force my users to have a super strong password (eg. at least 1 lowercase/uppercase/number/special char, min 8 chars)... or should I just provide them with a red/yellow/green strength rating and let them work it out on their own?
[15:53:46] learner: nettoweb: do they share any activerecord models?
[15:54:21] learner: AdamOnRails: your assumption about "super strong passwords" is false
[15:54:50] flopsec: has joined #RubyOnRails
[15:55:08] learner: ThisIsASuperStrongPasswordWhichNoSuperComputerCanBruteForceAnyTimeIntheNearFuture
[15:55:15] learner: AdamOnRails: ^
[15:56:41] AdamOnRails: Well, strong*
[15:57:08] ksoze: has joined #RubyOnRails
[15:57:23] edwinvdgraaf: has joined #RubyOnRails
[15:58:43] AdamOnRails: (approx 60)^8 is a good start anyhow
[15:59:46] roelof: has joined #RubyOnRails
[16:00:30] nickjj: AdamOnRails, i usually go with min 10 chars and let them figure it out with a meter (sometimes)
[16:00:30] railsonruby: has joined #RubyOnRails
[16:00:48] macsteps: has joined #RubyOnRails
[16:00:55] AdamOnRails: Yeah, I'm looking into a meter now. Cheers.
[16:01:16] nickjj: being told your 45 char password without a number isn't valid is infuriating heh, i've actually not used services simply because of that
[16:02:10] railsonruby: also needs one uppercase, one symbol and one chinese character :)
[16:03:10] roelof: why do I get this error message : Inconsistent indentation: 23 spaces used for indentation, but the rest of the document was indented using 2 spaces. on this code
[16:03:22] roelof: %td= link_to edit_account_path do
[16:03:41] artto: has joined #RubyOnRails
[16:03:41] roelof: %i.fa.fa-pencil-square-o
[16:03:48] adaedra: check the number of spaces, is it indented correctly?
[16:04:05] adaedra: there should be a 2-space difference between the two lines
[16:04:29] christianrojas: I need a little help pls
[16:04:44] roelof: here is a better paste : https://gist.github.com/rwobben/999d688c9961acb6af48c6032feb3ca2
[16:05:00] christianrojas: runnig rspec spec/
[16:05:24] adaedra: roelof: and in this gist, of how many spaces is the second line indented relative to the previous?
[16:05:26] rueben: has joined #RubyOnRails
[16:05:38] learner: roelof: are you using a mixture of tabs and spaces?
[16:05:43] christianrojas: I get this error: https://gist.github.com/christianrojas/0164ad4ec58328cf87b8f33256330e36
[16:06:03] christianrojas: uninitialized constant ActiveSupport::Autoload (NameError)
[16:06:44] learner: christianrojas: lol honestly would you be able to answer a question like that? where's your code? you just post the error? :P
[16:07:18] roelof: nope , everything is spaces. and there are 6 spaces between the two
[16:07:48] learner: roelof: rule of coding is that every step should be the same amount of spaces
[16:08:16] alfiemax: has joined #RubyOnRails
[16:08:27] diegoviola: has joined #RubyOnRails
[16:08:35] learner: roelof: if you use 2 spaces for other steps, similarly you should use 2 here as well, and usually people either use 2 or 4 spaces, 6 spaces is too much imho
[16:08:37] roelof: also with a do : I always learned that after a do two extra spaces are added
[16:09:23] learner: roelof: no idea what you're talking about
[16:09:52] roelof: If I do two extra spaced because of the do , I see this error : Illegal nesting: content can't be both given on the same line as %td and nested within it
[16:10:00] whathappens: has joined #RubyOnRails
[16:10:19] learner: roelof: can you gist full code, this isn't understabdable
[16:10:41] bonswouar: has joined #RubyOnRails
[16:11:10] macsteps: has joined #RubyOnRails
[16:11:47] flashpoint9: has joined #RubyOnRails
[16:12:47] roelof: learner: here the paste : https://gist.github.com/rwobben/1bc634028a455dcc2a8f96228699dac1
[16:13:09] kies: has joined #RubyOnRails
[16:14:02] tubbo: christianrojas: gist lets you edit your existing gists, please update that one with the code in question (your code, not rails')
[16:14:49] ElFerna: has joined #RubyOnRails
[16:15:08] augcesar: has joined #RubyOnRails
[16:15:33] tildes: has joined #RubyOnRails
[16:16:50] zave: has joined #RubyOnRails
[16:19:56] AdamOnRails: can I save .sj files into my assets folder? not sure about all this coffee business
[16:20:01] danostrowski: has joined #RubyOnRails
[16:20:04] conta: has joined #RubyOnRails
[16:20:08] railsonruby: for static pages like landing page is it best practice to have a static_pages controller?
[16:20:34] christianrojas: Just added rails_helper.rb and spec_helper.rb files to the gist
[16:20:44] railsonruby: as suggested here: https://www.railstutorial.org/book/static_pages
[16:21:20] VeryBewitching: has joined #RubyOnRails
[16:21:36] roelof: tubbo ; do you know haml ? I have a haml problem
[16:21:54] VeryBewitching: roelof: What's your question?
[16:23:40] roelof: VeryBewitching: I have this problem. I need to make a link with a font-awesome font icon
[16:23:49] roelof: code and error message: https://gist.github.com/rwobben/1bc634028a455dcc2a8f96228699dac1
[16:24:16] Dimik: has joined #RubyOnRails
[16:24:53] tubbo: christianrojas: you can reference me in channel by just mentioning my name, same way i'm doing to you
[16:24:59] tubbo: tab-complete in most clients works for nicknames
[16:25:14] tubbo: railsonruby: yeah, there's also HighVoltage that does it for you
[16:25:33] tubbo: roelof: try putting the link_to edit_account_path on another (indented) line
[16:25:45] macsteps: has joined #RubyOnRails
[16:25:52] VeryBewitching: roelof: Try https://gist.github.com/bewitchingme/56733964ecb6ffb7eae768914930674a
[16:25:56] zave: has joined #RubyOnRails
[16:26:50] VeryBewitching: And if you're concerned about a carriage return in that TD, do %td<
[16:26:56] [Butch]: has joined #RubyOnRails
[16:27:15] railsonruby: tubbo: thanks :)
[16:27:28] dipnlik: roelof: also you probably want to indent all td lines one more level
[16:27:40] barajasfab: has joined #RubyOnRails
[16:27:56] VeryBewitching: dipnlik: Good eye.
[16:28:01] roelof: thanks, that problem is not solved , I see now a missing edit action and that one I can solve
[16:28:22] christianrojas: tubbo: I get this error: https://gist.github.com/christianrojas/0164ad4ec58328cf87b8f33256330e36, Just added rails_helper.rb and spec_helper.rb files to the gist
[16:28:42] willardg: has joined #RubyOnRails
[16:30:49] roelof: VeryBewitching: dipnlik : both thanks
[16:30:53] jetpackjoe: has joined #RubyOnRails
[16:31:08] roelof: I can finally work on my pet project
[16:31:17] xall: has joined #RubyOnRails
[16:31:27] jancel: has joined #RubyOnRails
[16:32:24] tubbo: christianrojas: can't see anything in the spec/rails helpers that seems broken...perhaps you have a code-loading issue? try running `bundle exec rspec`
[16:32:27] tubbo: instead of just `rspec`
[16:32:32] tubbo: maybe it's using the wrong binstub
[16:33:01] tubbo: /Users/christian/.rvm/gems/ruby-2.1.5/bin/rspec indicates it's using the "global" rspec binstub, rather than the one in your gem bundle. that's a red flag to me.
[16:33:14] macsteps: has joined #RubyOnRails
[16:34:03] willardg: anyone have any ideas for a work around for the https://github.com/getsentry/raven-js/issues/495 issue?
[16:34:17] christianrojas: tubbo: same error with `bundle exec rspec`
[16:34:59] tubbo: intersting
[16:35:01] tubbo: interesting*
[16:35:55] tubbo: christianrojas: not sure what the issue is here
[16:36:16] christianrojas: tubbo: just run `bundle binstubs rspec-core --force`
[16:36:25] startupality: has joined #RubyOnRails
[16:36:35] christianrojas: tubbo: and then `bin/rspec spec...`
[16:37:26] christianrojas: tubbo: Updated the error log in the gist: https://gist.github.com/christianrojas/0164ad4ec58328cf87b8f33256330e36
[16:38:22] tubbo: eff rvm haha
[16:39:30] startupality: has joined #RubyOnRails
[16:39:53] choke: has joined #RubyOnRails
[16:40:22] havenwood: christianrojas: maybe try?: gem regenerate_binstubs
[16:41:01] christianrojas: tubbo: same error
[16:41:07] havenwood: dunno if rubygems-bundler is involved
[16:41:12] havenwood: NOEXEC_DISABLE=1
[16:41:21] whathapp_: has joined #RubyOnRails
[16:43:05] rodfersou: has joined #RubyOnRails
[16:44:46] manfrin: has joined #RubyOnRails
[16:44:55] DoctorMonocular: has joined #RubyOnRails
[16:45:14] choke: has joined #RubyOnRails
[16:46:32] cschneid_: has joined #RubyOnRails
[16:51:57] startupality: has joined #RubyOnRails
[16:52:27] hutch: has joined #RubyOnRails
[16:54:31] xall: has joined #RubyOnRails
[16:57:18] moeabdol: has joined #RubyOnRails
[16:57:56] startupality: has joined #RubyOnRails
[16:59:08] aless: has joined #RubyOnRails
[16:59:49] rafaelfranca: has joined #RubyOnRails
[17:03:22] mostlybadfly: has joined #RubyOnRails
[17:03:36] rodfersou: has joined #RubyOnRails
[17:04:57] bphogan: has joined #RubyOnRails
[17:05:24] pawnbox: has joined #RubyOnRails
[17:05:27] cnk: has joined #RubyOnRails
[17:06:46] rakm: has joined #RubyOnRails
[17:16:04] startupality: has joined #RubyOnRails
[17:16:37] roamingdog: has joined #RubyOnRails
[17:17:23] guidocalvano: has joined #RubyOnRails
[17:17:35] alfiemax: has joined #RubyOnRails
[17:19:47] pilne: has joined #RubyOnRails
[17:19:54] chopin: has joined #RubyOnRails
[17:20:17] startupality: has joined #RubyOnRails
[17:24:02] rails45: has joined #RubyOnRails
[17:24:28] rails45: Can someone take a look? https://gist.github.com/anonymous/162155fffd0789bf00853433580cf733
[17:26:36] roamingdog: rails45: markdown expects the argument 'content' and you're not providing it
[17:27:11] cnk: In the constructor or render? they have content in the render
[17:27:13] Circuit8: Hey guys, I'm working on a project that is essentially a private members area which will have videos for the members to view. Does anyone have any suggestions on the best way to do this? Do you think hosting them on vimeo would be easier than say using paperclip, or another solution? Thanks
[17:27:32] roamingdog: i assume he's hitting show
[17:27:41] rails45: @roamingdog but isn't @pins.description the content?
[17:27:59] roamingdog: rails45: yes, but are you going to the show action?
[17:28:35] rails45: and i wanted to link the markdown method to the show action
[17:28:38] roamingdog: rails45: in show, you call markdown, but don't provide the content, thus the error
[17:29:02] aegis3121: has joined #RubyOnRails
[17:29:09] roamingdog: rails45: remove 'markdown' from show
[17:29:52] whathappens: has joined #RubyOnRails
[17:29:53] rails45: yep and then?
[17:30:01] mrbubbles: has joined #RubyOnRails
[17:30:04] roamingdog: rails45: and then, does it get rid of the error?
[17:30:25] mrbubbles: Good evening... has anyone used the Mutations gem before (for adding a service layer)
[17:30:51] rails45: yep it gets a undefined method 'markdown' error
[17:31:04] cnk: You need to expose your markdown method to the view
[17:31:29] cnk: either put it in a helpers file or look up the syntax for making controller methods available in views
[17:31:35] roamingdog: rails45: now you're getting somewhere, that's a better error
[17:32:06] blackmesa: has joined #RubyOnRails
[17:33:34] roamingdog: rails45: i'm guessing you don't want a view called 'markdown', you want to show the parsed markdown in the show view?
[17:33:51] alfiemax: has joined #RubyOnRails
[17:34:26] whathappens: has joined #RubyOnRails
[17:34:39] rails45: @roamingdog yep. i only created it because of the nomethod error. right now i'm looking up helper methods and how they work to solve this
[17:35:09] pontiki: has joined #RubyOnRails
[17:35:27] SteenJobs: has joined #RubyOnRails
[17:36:07] roamingdog: rails45: you might end up with markdown(@pin.description) in the show method, dunno
[17:36:34] cnk: Glad you are reading. For this specific case, I think if you move the existing markdown method in ot pins_helper, it will jsut work
[17:39:16] marahin: Has anyone been experiencing issues with rubygems lately?
[17:39:26] alfiemax: issues like?
[17:39:31] marahin: For 40 minutes now it's "Resolving dependencies" with a milion of dots
[17:39:36] adre: has joined #RubyOnRails
[17:39:55] marahin: Then it goes for mysql2, and again - hangs up with Resolving dependencies..
[17:41:48] alfiemax: you mean like this ... Fetching dependency metadata from https://rubygems.org/
[17:41:52] jancel: has joined #RubyOnRails
[17:41:52] marahin: Looking up gems ["celluloid-gems"]
[17:41:52] marahin: Resolving dependencies........
[17:42:13] marahin: alfiemax, ^ that's where it hangs, by that I mean it continues to print a couple of dots every few seconds or so
[17:42:27] marahin: (that's an output w/ a --verbose flag0
[17:42:49] marahin: oh, actually it went through now
[17:43:20] rails45: I'm glad I learned about helper methods; this makes so many things so much easier! I put the method in pins_helper.rb and it worked like a charm. Thanks guys!
[17:43:43] rails45: Regarding Rails etiquette... is this the way to go when you want a method to be available to multiple controllers?
[17:43:45] alfiemax: marahin, hmm, that's odd. it's working fine for me
[17:44:00] rails45: vs creating a method in ApplicationController or the model?
[17:44:39] alfiemax: rails45, i believe that's done using concerns
[17:44:42] marahin: alfiemax, something on my end then it seems :)
[17:44:53] DoctorMonocular: has joined #RubyOnRails
[17:45:42] sameerynho: has joined #RubyOnRails
[17:45:44] flashpoint9: has joined #RubyOnRails
[17:45:58] rodfersou: has joined #RubyOnRails
[17:46:25] cnk: rails45: you can also just create a Ruby module and include it where you want. What I do depends largely on which layer (MVC) and how much I expect those common things to grow
[17:48:01] yellow5: has joined #RubyOnRails
[17:52:34] guidocalvano: has joined #RubyOnRails
[17:53:33] rails254: has joined #RubyOnRails
[17:56:02] erlendf: has joined #RubyOnRails
[17:58:42] evansbee: has joined #RubyOnRails
[17:58:45] rodfersou: has joined #RubyOnRails
[17:58:52] kprails3: has joined #RubyOnRails
[17:58:56] aantix: has joined #RubyOnRails
[17:59:07] danostrowski: has joined #RubyOnRails
[18:02:21] kprails3: When I access an AR association, like article.comments, does it directly access the association's target? -- I have a situation where article.comments is nil but the target is not
[18:02:21] jtong: has joined #RubyOnRails
[18:02:22] gusrub: has joined #RubyOnRails
[18:04:22] cnk: so you have comments but article.comments doesn't find it?
[18:05:03] cnk: That either means they are not associated - or that you do not have your associations setup to go both ways.
[18:05:13] 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.
[18:05:19] jtong: has joined #RubyOnRails
[18:05:31] choke: has joined #RubyOnRails
[18:05:39] kprails3: yes. For example: article.association("comments").target is set
[18:05:53] startupality: has joined #RubyOnRails
[18:05:57] jtong: has joined #RubyOnRails
[18:06:01] kprails3: So article.association("comments").target != article.comments
[18:06:12] kprails3: Helpa: I will look at putting something on gist, thanks
[18:06:45] cnk: what is article.association("comments").target
[18:06:58] cnk: some meta-programming or ??
[18:08:29] d5sx43: has joined #RubyOnRails
[18:09:14] kprails3: article.association("comments") returns the <ActiveRecord::Associations::HasManyAssociation>
[18:10:33] cnk: OK but why are you inspectng your associations?
[18:11:47] aantix: has joined #RubyOnRails
[18:12:06] dionysus70: has joined #RubyOnRails
[18:14:09] kprails3: I'm using an old gem that attempts to set associations via association().target= . Its correctly doing that but then its simply not available via article.comments. It worked correctly in 3.2 and I'm rewriting this app in 4.2, and it seems like setting the target is no longer sufficient.
[18:15:11] gingray: has joined #RubyOnRails
[18:16:47] enkristoffer: has joined #RubyOnRails
[18:17:17] SteenJobs: if i want to explicitly link a stylesheet using a stylesheet_link_tag instead of including it in the application manifest, where would i place such a file?
[18:18:18] DoubleMalt: has joined #RubyOnRails
[18:19:05] netzfisch: has joined #RubyOnRails
[18:19:25] christianrojas: has joined #RubyOnRails
[18:21:01] startupality: has joined #RubyOnRails
[18:23:57] emachnic: has joined #RubyOnRails
[18:24:46] emachnic: has joined #RubyOnRails
[18:26:35] rueben: has joined #RubyOnRails
[18:28:23] choke: has joined #RubyOnRails
[18:29:36] smathy: has joined #RubyOnRails
[18:33:37] havenwood: michael_mbp: hi
[18:34:25] arup_r: has joined #RubyOnRails
[18:34:26] SteenJobs_: has joined #RubyOnRails
[18:35:12] christianrojas: has joined #RubyOnRails
[18:35:46] meoblast001: has joined #RubyOnRails
[18:35:59] svankmajer: has joined #RubyOnRails
[18:36:15] cnk: SteenJobs_: try vendor/assets/stylesheets
[18:36:46] SteenJobs_: cnk: i’ve been trying a kajillion things, and still can’t get the necessary javascript code to run - the frontend code was generated with adobe muse - if i can’t figure it out soon, i’ll gist
[18:38:37] k3rn31: has joined #RubyOnRails
[18:38:50] tbuehlmann: SteenJobs: {app,vendor}/assets/stylesheets, and add it to Rails.application.config.assets.precompile
[18:39:23] SteenJobs: tbuehlmann: out of curiosity, one would add it to config.assets.paths if they wanted it to be part of the pipeline, right?
[18:39:46] tbuehlmann: you actually want it to be part of the pipeline so it gets minified
[18:39:55] mdw: has joined #RubyOnRails
[18:39:56] tbuehlmann: if not, place it directly in public/...
[18:40:31] SteenJobs: i don’t though, because i need to selectively add the asset tags
[18:40:33] SteenJobs: but honestly
[18:40:37] SteenJobs: i have no idea what i need at this point
[18:40:41] SteenJobs: to get this damn thing to integrate
[18:40:58] tbuehlmann: adding it to the asset pipeline doesn't mean adding it to your application.css
[18:42:08] SteenJobs: ah you’re right
[18:42:12] SteenJobs: important distinction too
[18:43:34] axilla_: has joined #RubyOnRails
[18:43:57] choke: has joined #RubyOnRails
[18:44:07] Criten: has left #RubyOnRails: ()
[18:44:46] antgel: has joined #RubyOnRails
[18:46:18] skywebro: has joined #RubyOnRails
[18:47:34] [Butch]: has joined #RubyOnRails
[18:48:56] AdamOnRails: anyone know if there is a pwstrength gem for bootstrap?
[18:49:54] AdamOnRails: tried to install it manually and having a few issues with the strength bar not re-appearing on the next page if my form throws validation errors
[18:52:42] crova: has joined #RubyOnRails
[18:52:45] neha-: has joined #RubyOnRails
[18:53:12] macsteps: has joined #RubyOnRails
[18:53:30] roamingdog: has joined #RubyOnRails
[18:55:02] crova: Greetings! Can someone take a look on this please: https://gist.github.com/crova/6ad69e7a4f2005965e3b4a7c620d17e0 // I'm trying to update the model based on the 'campaign_id', but right now, code takes all the fields in consideration, so instead of updating an existing record, it is creating a new one, with the new values. I tried a lot of different stuff and can't seem to get it right
[18:56:03] choke: has joined #RubyOnRails
[18:57:58] centrx: has joined #RubyOnRails
[18:58:45] srinidhi: has joined #RubyOnRails
[18:59:37] DoubleMalt: has joined #RubyOnRails
[19:03:20] chouhoul_: has joined #RubyOnRails
[19:04:37] yfeldblum: has joined #RubyOnRails
[19:05:08] tubbo: crova: i would imagine this is happening because you're doing a find_or_create_by on all those fields
[19:05:25] tubbo: when in reality, you want to find_or_create_by campaign_id:, but then update() the rest of those fields, right?
[19:05:25] yfeldblum: has joined #RubyOnRails
[19:05:46] tubbo: so find_or_create_by(campaign_id: 'F00').update(foo: 'bar') for example
[19:06:05] macsteps: has joined #RubyOnRails
[19:06:20] chouhoul_: has joined #RubyOnRails
[19:06:23] crova: tubbo, yes, indeed and I couldn't come up with what you just suggested I remeber trying with .save but not .update
[19:06:26] crova: let me give it a try
[19:06:55] tubbo: so find_or_create_by(campaign_id: 'F00').update(foo: 'bar') for example
[19:07:00] tubbo: lol sorry
[19:07:20] adre: has joined #RubyOnRails
[19:09:01] crova: tubbo, it completly ignores the .update statement. It iterates through each row and don't do anything
[19:11:03] SteenJobs: tbuehlmann: i think the problem is the Adobe Muse JS files use hardcoded filepaths as well, and while my html uses javascript_path and stylesheet_path, the Muse files do not
[19:12:19] cnk: are the muse files trying to access assets that are part of the rails assset pipiline?
[19:12:30] tubbo: crova: no it doesn't.
[19:12:33] cnk: or are the muse bits self-contained
[19:12:37] tubbo: crova: Campaign.find_or_create_by returns a Campaign, not an array of Campaigns.
[19:12:57] crova: yeah you're right, it does work
[19:13:17] crova: I was checking old log :x thanks for the input man
[19:13:28] helpa: What "didn't work"? Did your server not start? Did your computer explode? Did your webpage turn bright pink? Did your client not pay your bill on time? You may have to be more specific. A Gist (http://gist.github.com) of the code that doesn't work (and the error you are getting) will be helpful.
[19:13:34] tubbo: for future reference
[19:13:37] gingray: has joined #RubyOnRails
[19:14:03] SteenJobs: cnk: the former…unless there’s a better way to do it. they reference stylesheets and image assets based on the directory that muse generates, css/*.css and images/*.*
[19:14:17] SteenJobs: cnk: so i wrote a script with nokogiri to convert all image tags to erb tags, and use the correct asset path
[19:14:53] SteenJobs: cnk: and copied all images into the assets/images directory. with the CSS and JS, i put them in vendor and precompile, linking to them in the html, but i’m still having trouble and i think it’s because of file path issues in the JS itself
[19:15:30] DoctorMonocular: has joined #RubyOnRails
[19:15:51] quazimodo: has joined #RubyOnRails
[19:16:23] manfrin: has joined #RubyOnRails
[19:17:39] pawnbox: has joined #RubyOnRails
[19:17:43] cnk: Sorry, can't tell you exactly, but I bet googling "using JS libraries with rails asset pipeline" will turn up some blog posts
[19:18:04] wldcordeiro: has joined #RubyOnRails
[19:18:41] diegoviola: has joined #RubyOnRails
[19:20:25] StevenNunez: has joined #RubyOnRails
[19:20:56] diegoviola: I'm passing here the room_id as a hidden field: https://github.com/diegoviola/webhotel/blob/master/app/views/bookings/new.html.erb#L19 so that I can get it as part of my booking_params hash: https://github.com/diegoviola/webhotel/blob/master/app/controllers/bookings_controller.rb#L18
[19:21:18] diegoviola: is there a better way to do this? for some reason passing the room_id feels wrong to me
[19:21:59] diegoviola: I'm using a has_many through association, Booking belongs to Room and User
[19:22:06] StevenNunez: I'm trying to write some middleware that parses json-api form submissions. and updates params. How... do you access params from middleware, and update it from the call method?
[19:22:09] tubbo: diegoviola: yeah, that's a lot less secure because in theory one could change the room_id to anything they want
[19:22:55] tubbo: diegoviola: that's actually BS code anyway...look at how you're setting up a booking: https://github.com/diegoviola/webhotel/blob/master/app/controllers/bookings_controller.rb#L13-L15
[19:23:07] tubbo: oh wait a sec i see your issue.. https://github.com/diegoviola/webhotel/blob/master/app/controllers/bookings_controller.rb#L18
[19:23:26] StevenNunez: params = env['rack.input'].gets works
[19:23:36] diegoviola: tubbo: how should I do this then?
[19:23:41] StevenNunez: I guess I can just rewrite it and put it back
[19:23:45] tubbo: so what i would do in this case is actually @room.bookings.build, and then just set @room.user = current_user
[19:23:48] tubbo: that's how i typically handle this situation
[19:23:52] diegoviola: tubbo: or what do you suggest
[19:23:54] tubbo: it just forces the assignments on the controller side
[19:24:01] rueben: has joined #RubyOnRails
[19:24:08] tubbo: StevenNunez: you can't access the params hash from middleware.
[19:24:20] tubbo: that stuff is processed in the controller
[19:24:34] diegoviola: tubbo: thanks, I'll do that
[19:24:40] tubbo: i mean you _can_ access http params from within rack middleware, because they're part of the request env...but it's raw
[19:24:49] tubbo: you don't get all the nice things rails controllers give you
[19:26:30] czerasz: has joined #RubyOnRails
[19:27:48] StevenNunez: I see. I think i can modify that raw value
[19:29:48] tubbo: StevenNunez: yeah, you can definitely do that.
[19:31:11] jschoolcraft: has joined #RubyOnRails
[19:31:31] Rodya_: has joined #RubyOnRails
[19:31:48] StevenNunez: Off to try that
[19:31:53] SteenJobs: has joined #RubyOnRails
[19:32:41] diegoviola: tubbo: I can't do @room.user with my current association
[19:34:05] tubbo: diegoviola: why
[19:35:02] diegoviola: I think I mispelled something somewhere
[19:35:22] chopin_: has joined #RubyOnRails
[19:38:43] SteenJobs: cnk: sorry, comp died. you send anything?
[19:38:45] AdamOnRails: anyone in here familiar with Bootstrap Password strength indicator?
[19:39:15] cnk: Nothing useful
[19:39:16] choke: has joined #RubyOnRails
[19:39:22] AdamOnRails: I submit the form, and suddenly the pwstrength DIVS wont populate with the strength meter any more
[19:39:29] AdamOnRails: (on the next page)
[19:39:35] cnk: just a suggestiong about googling javascript library + asset pipeline
[19:40:03] cnk: AdamOnRails: you keep saying next page
[19:40:04] Ergo: has joined #RubyOnRails
[19:40:20] cnk: but doesn't the controller just rerender the form when there are errors?
[19:40:27] cnk: so should be the same page
[19:40:50] AdamOnRails: so... my setup is like...
[19:41:48] chouhoulis: has joined #RubyOnRails
[19:42:08] AdamOnRails: RegistrationController#registration_form & RegistrationController#form_submitted. If @newUser.save validations fail, the #formSubmitted action will render :registratoin_form.
[19:43:42] cnk: pretty usual rails flow. And you have all the instance variables the registration form expects?
[19:44:05] cnk: how is your pwstrength stuff implemented?
[19:44:27] cnk: the form is the same, right? so it is an issue with the js not binding
[19:44:38] sk0r: has joined #RubyOnRails
[19:44:57] AdamOnRails: The pwstrength JS will work its magic and populate a DIV with a fancy red/yellow/green live-action password strength meter. However it only works on the original page. After the form has been submitted (and failed validation), after the page has finished loading, Upon inspection (firefox -> dev -> inspector) the HTML hasn't been populated.
[19:44:58] diegoviola: tubbo: I'm doing Room has_many :users, maybe that's why?
[19:45:01] jxs_: has joined #RubyOnRails
[19:45:21] diegoviola: @room.users works
[19:45:30] AdamOnRails: Yeah, all instance variables are working fine. Validation errors are working correctly, input fields are being repopulated correctly.
[19:45:50] AdamOnRails: Yeah I suspect its a JS issue, and I've tinkered with it but without luck
[19:47:05] whathappens: has joined #RubyOnRails
[19:47:52] AdamOnRails: But it's wierd, because a certain <ul> is being populated by the JS with some custom error messages, which is fine and what its supposed to do. However it just refuses to loadup the visual password strength meter itself.
[19:47:58] AdamOnRails: Really annoying.
[19:52:02] jancel: has joined #RubyOnRails
[19:52:19] danostrowski: has joined #RubyOnRails
[19:52:46] gambl0re: has joined #RubyOnRails
[19:53:42] emachnic: has joined #RubyOnRails
[19:57:12] jgt3: has joined #RubyOnRails
[19:57:16] ashleyw: has joined #RubyOnRails
[19:59:17] christianrojas: has joined #RubyOnRails
[19:59:50] guidocalvano: has joined #RubyOnRails
[20:00:21] cnk: has left #RubyOnRails: ()
[20:01:21] Jasaka: has joined #RubyOnRails
[20:01:36] DoctorMonocular: has joined #RubyOnRails
[20:01:50] centrx: has joined #RubyOnRails
[20:02:08] rafaelfranca: has joined #RubyOnRails
[20:02:08] rafaelfranca: has joined #RubyOnRails
[20:03:46] nettoweb: has joined #RubyOnRails
[20:04:00] FreddieFresh: has joined #RubyOnRails
[20:04:16] chouhoulis: has joined #RubyOnRails
[20:04:21] rails686: has joined #RubyOnRails
[20:06:30] macsteps: has joined #RubyOnRails
[20:07:17] flashpoint9: has joined #RubyOnRails
[20:09:01] eserror: has joined #RubyOnRails
[20:09:02] Darmani: has joined #RubyOnRails
[20:10:14] lightt: has joined #RubyOnRails
[20:11:54] Darmani: Hello everyone ^^
[20:12:03] moeabdol: has joined #RubyOnRails
[20:14:51] diegoviola: tubbo: this worked but still doesn't feel right: https://github.com/diegoviola/webhotel/blob/master/app/controllers/bookings_controller.rb#L20
[20:14:54] eserror_: has joined #RubyOnRails
[20:14:59] diegoviola: tubbo: I think my associations might be iffy
[20:15:02] arBmind: has joined #RubyOnRails
[20:16:26] blackmesa: has joined #RubyOnRails
[20:18:53] kies: has joined #RubyOnRails
[20:20:15] tubbo: diegoviola: yeah that's basically what i did. i just set @booking.user = current_user
[20:20:20] tubbo: but what you did is the same thing
[20:20:42] voidfire: is ruby on rails easy to learn when u know the basics of php/mysql/bootstrap/jquery and js?
[20:20:52] macsteps: has joined #RubyOnRails
[20:21:00] voidfire: or should I start learning seriusly another framework like it?
[20:21:13] AdamOnRails: RubyOnRails is easy to learn - Period. Everything just makes sense.
[20:21:14] conta: has joined #RubyOnRails
[20:21:24] deur-: voidfire: depends what your goals are really
[20:21:30] lightt: has joined #RubyOnRails
[20:21:35] diegoviola: tubbo: that assumes your Booking has_one :user right?
[20:21:57] AdamOnRails: Ok....http://pastie.org/private/njzs8wijhyyyebnzzj69g
[20:22:07] AdamOnRails: Here is my big challenge for the night ^^
[20:22:07] voidfire: getting my self to be able to develop web apps and implement ideas from 0 to 100% following regular procedures most of the time
[20:22:17] voidfire: i tried my luck with laravel. didnt really got that far
[20:22:28] tubbo: diegoviola: if you have multiple users you can do @booking.users << user i'm pretty sure
[20:22:34] deur-: voidfire: PHP has laravel nowadays, if you're comfortable with that then Rails probably won't take long. more getting used to Ruby syntax than anything else
[20:22:38] deur-: voidfire: ah :)
[20:22:50] tubbo: voidfire: work on stuff you want to work on
[20:22:58] tubbo: use tools that help you create
[20:23:08] tubbo: languages are bullshit
[20:23:36] voidfire: I ve done some laravel but it was baby steps imho and I dont seem to understand fundamental stuff bout the way u use it
[20:23:53] voidfire: for example ive dont couple route based projects
[20:24:01] AdamOnRails: Would someone mind taking a look at that pastie. I'm having problems getting my bootstrap password strength meter working properly across two pages.
[20:24:16] voidfire: but with controlers and models im not that okay. I know Icould generally study mvc
[20:24:48] AdamOnRails: Original registration form - it works fine. But when I submit the form, and validations fail, the form is rendered again but the JS fails to generate the strength meter properly. Not sure why?
[20:24:57] diegoviola: tubbo: it seems like I misunderstood you, @booking.user = current_user works fine
[20:25:13] diegoviola: tubbo: I thought you said @room.user
[20:25:24] tubbo: i might have, haha
[20:25:39] diegoviola: https://github.com/diegoviola/webhotel/commit/b9a949629195eec85a70c2fe9c8bf4c63c0b480e
[20:25:57] tubbo: diegoviola: also why are you setting @room on ln 18 when you already run set_room in a before_filter on create?
[20:26:09] diegoviola: tubbo: yeah I was going to take that out
[20:26:45] diegoviola: https://github.com/diegoviola/webhotel/commit/16ac0f4f0bd1d445c17c7715f66e026e2afd6820
[20:27:13] diegoviola: thanks for the tips
[20:28:37] GodFather: has joined #RubyOnRails
[20:28:51] ur5us: has joined #RubyOnRails
[20:29:37] eljimmy: has joined #RubyOnRails
[20:30:03] jenrzzz: has joined #RubyOnRails
[20:33:54] adamf: has left #RubyOnRails: ()
[20:35:38] truenito: has joined #RubyOnRails
[20:36:06] chopin: has joined #RubyOnRails
[20:37:02] sameerynho: has joined #RubyOnRails
[20:39:41] ksoze: has joined #RubyOnRails
[20:41:09] manfrin_: has joined #RubyOnRails
[20:42:58] DoctorMonocular: has joined #RubyOnRails
[20:44:03] et09: has joined #RubyOnRails
[20:44:30] d0nn1e: has joined #RubyOnRails
[20:45:02] et09: if i have a concern 'Foobarable', is there a way to say, include this concern if the record has attribute baz == true
[20:46:31] enkristoffer: has joined #RubyOnRails
[20:47:20] aantix: has left #RubyOnRails: ()
[20:47:57] eljimador: has joined #RubyOnRails
[20:48:03] aantix: has joined #RubyOnRails
[20:48:16] fox_mulder_cp: tubbo: can we make include/require when some property have(n't) a some value?
[20:48:17] whathappens: has joined #RubyOnRails
[20:48:34] Coldblackice: has joined #RubyOnRails
[20:54:08] diegoaguilar: has joined #RubyOnRails
[20:54:14] arooni: has joined #RubyOnRails
[20:55:17] flashpoint9: has joined #RubyOnRails
[20:57:26] jetpackjoe: has joined #RubyOnRails
[20:58:05] chouhoulis: has joined #RubyOnRails
[20:58:24] dblessing: has joined #RubyOnRails
[21:00:21] neanderslob: has joined #RubyOnRails
[21:00:32] neanderslob_: has joined #RubyOnRails
[21:00:58] Darmani: Hey guys, quick question.
[21:01:20] Darmani: I'm making an online t shirt store. Would the shirts themselves be a model? I think they would right?
[21:01:53] neanderslob: has joined #RubyOnRails
[21:02:22] Darmani: I'm imagining "users" would have an "order" and that would consist of "shirts".
[21:03:17] gary: has joined #RubyOnRails
[21:03:26] meoblast001: has joined #RubyOnRails
[21:03:43] workmad3: has joined #RubyOnRails
[21:03:49] tubbo: fox_mulder_cp: no idea what you're talking about
[21:04:33] jenrzzz: has joined #RubyOnRails
[21:04:44] AmiMoench: has joined #RubyOnRails
[21:04:48] moep: has joined #RubyOnRails
[21:05:43] mustmodify: has joined #RubyOnRails
[21:05:44] dblessing: has joined #RubyOnRails
[21:07:41] macsteps: has joined #RubyOnRails
[21:09:48] mustmodify: I have a process that will run nightly. If it doesn't happen, models will be in a bad state and the business won't find out about it for up to 12 days, by which time it will have become a mess. I believe the system will work. It's stable. But things do fail. And given the severity of the consequences, I feel like there needs to be a stop-gap measure. I can (a) add a fairly superflous date_processed to my most-used model just to show that the nightly
[21:10:29] mustmodify: (d) some variation on (b) with memcache or whatever.
[21:11:11] mustmodify: There isn't a direct way to detect whether the worker has run without leaving crumbs behind because the stuff that it does won't necessarily happen every day.
[21:13:35] lightt: has joined #RubyOnRails
[21:14:08] moeabdol: has joined #RubyOnRails
[21:15:37] gking: has joined #RubyOnRails
[21:15:47] pwnd_nsfw: has joined #RubyOnRails
[21:16:13] gking: Hello, how can I run application.js before controller-specific JS files? So I can have my global JS functions run first to change the DOM in some way, then my controller specific JS files can use those changes, such as new classes added to elements, etc.
[21:19:31] mustmodify: Order of inclusion.
[21:19:49] roamingdog: has joined #RubyOnRails
[21:20:07] mustmodify: gking: If you list your application.js file before your controller-specific files, it will run first.
[21:20:19] mustmodify: do you know how to do that?
[21:21:11] gking: But isn’t the application.js loaded first, and then within it, there are the “//= require_tree .” lines?
[21:21:35] jtong: has joined #RubyOnRails
[21:21:51] axilla_: can someone explain to me exactly what happens when a SLIM template is rendered into the view.. how much longer does it take to render a slim template(it has to be longer right? it has to be converted)
[21:22:26] futilegames: has joined #RubyOnRails
[21:22:59] fidalgo: has joined #RubyOnRails
[21:24:07] mustmodify: axilla_: If you mean slim vs erb, haml, whatever... it's not *necessarily* slower. it doesn't need to be converted to ERB. I haven't seen the implementation but there is a way to register a rendering engine and it would go through the same process as ERB.
[21:24:20] fidalgo: given an resource (post instance for example) is it possible to know the URL to the destroy action? I want to create an helper to create generic delete buttons.
[21:24:51] diegoaguilar: has joined #RubyOnRails
[21:25:00] mustmodify: axilla_: I don't know the exact process but rough pseudo-code would be render :text => TemplateEngine.new('template_name.slim', data = {}).render
[21:25:11] mustmodify: and then slim does whatever it does.
[21:25:55] mustmodify: fidalgo: when you say "post instance" I assume you mean "after an instance has been created" rather than some kind of reference to POST /instance or whatever.
[21:26:40] mustmodify: For a product, assuming a normal resource, the delete URL will always be link_to 'delete', product_path(product), method: :delete
[21:26:47] mustmodify: OR just DELETE /products/:id
[21:27:07] fidalgo: mustmodify: yes, after an instace being created
[21:27:11] yfeldblum: has joined #RubyOnRails
[21:28:53] mustmodify: yeah, generic delete button should be pretty easy.
[21:30:05] vjacob: has joined #RubyOnRails
[21:33:21] dblessing: has joined #RubyOnRails
[21:36:40] fidalgo: I remember to see somewhere a post related about creating helpers for common actions, which handles CSS classes and texts... but can't find it. Does anyone know or have a sample project?
[21:37:10] mustmodify: fidalgo: when you say 'handles' ... what do you mean?
[21:37:17] manfrin: has joined #RubyOnRails
[21:38:27] fidalgo: mustmodify: creates a link for the resource, with the proper styles, avoid repeating CSS classes and other options
[21:39:29] fidalgo: imagine a 'link_to_edit(post)' method that will create a new link_to('Post', new_post_path, options....)
[21:40:12] fidalgo: sorry if this seems too obvious, but been away from Rails for quite long time
[21:40:19] null__: has joined #RubyOnRails
[21:40:22] macsteps: has joined #RubyOnRails
[21:43:01] Axilla: has joined #RubyOnRails
[21:45:27] diegoviola: has joined #RubyOnRails
[21:45:29] mustmodify: hm... yeah I'm not familiar with that. It may have been specific to your project, especially if it added styles.
[21:45:34] mustmodify: Wouldn't be too hard to create.
[21:45:50] emachnic_: has joined #RubyOnRails
[21:46:52] whathappens: has joined #RubyOnRails
[21:47:48] macsteps: has joined #RubyOnRails
[21:48:26] dblessing: has joined #RubyOnRails
[21:49:18] jenrzzz: has joined #RubyOnRails
[21:49:18] jenrzzz: has joined #RubyOnRails
[21:49:45] ksoze: has joined #RubyOnRails
[21:52:51] macsteps: has joined #RubyOnRails
[21:53:00] dblessing: has joined #RubyOnRails
[21:53:17] czerasz: has joined #RubyOnRails
[21:53:18] startupality: has joined #RubyOnRails
[21:57:17] jtong: has joined #RubyOnRails
[21:58:15] kies: has joined #RubyOnRails
[21:58:46] quazimodo: has joined #RubyOnRails
[21:59:15] flashpoint9: has joined #RubyOnRails
[21:59:45] [Butch]_: has joined #RubyOnRails
[22:02:35] yfeldblum: has joined #RubyOnRails
[22:04:02] mdw: has joined #RubyOnRails
[22:06:59] dblessing: has joined #RubyOnRails
[22:09:58] nettoweb: has joined #RubyOnRails
[22:10:47] yfeldblum: has joined #RubyOnRails
[22:12:42] centrx: has joined #RubyOnRails
[22:12:52] asahi: has joined #RubyOnRails
[22:15:18] moeabdol: has joined #RubyOnRails
[22:16:00] Darmani: I'm building an online t shirt store, could someone tell me if I'm doing these migration correctly?
[22:16:01] Darmani: https://gist.github.com/mfifth/3bf66df71b9655a7a2fa43fafec53377
[22:18:08] iamdevnul: looks good to me Darmani
[22:18:14] iamdevnul: anything specific
[22:18:47] Darmani: iamdevnul: Okay... The idea was for a "user" to have an "order" that has_many "shirts".
[22:19:15] rails750: has joined #RubyOnRails
[22:20:14] rails750: hey all. with Safari still not validating HTML5 "required" in forms, what is the best practice the forms still corporate in Safari?
[22:20:15] arooni: has joined #RubyOnRails
[22:21:21] apotry: has joined #RubyOnRails
[22:21:47] iamdevnul: this is a weird one...on our staging site i received this airbrake: https://gist.github.com/mjgreer/f48d40d390af43d7972c2f1554d112cb
[22:21:50] edwinvdgraaf: has joined #RubyOnRails
[22:21:53] iamdevnul: how could this even be possible?
[22:22:39] iamdevnul: i've never used the foreign key option myself Darmani
[22:22:57] iamdevnul: but yeah, it looks good
[22:23:36] iamdevnul: on one line, i'm doing a if object.present?
[22:23:41] Darmani: iamdevnul: thanks man ^^
[22:23:42] iamdevnul: then next object.destroy
[22:23:44] mustmodify: iamdevnul: I'm assuming `user` is a method.
[22:23:52] iamdevnul: no, it's an object
[22:23:55] asahi: has left #RubyOnRails: ()
[22:24:03] mustmodify: I mean, a method that returns an object.
[22:24:21] mustmodify: I'd have to see that method.
[22:24:31] squaresurf: has joined #RubyOnRails
[22:24:53] mustmodify: And then my answer would either be "threads" or "user could be cleared out"
[22:25:31] mustmodify: That's not really a method.
[22:25:36] iamdevnul: no, it's not
[22:25:52] iamdevnul: we keep seeing these pop up in airbrake in stage and production
[22:25:58] mustmodify: so I'm going to need more to help you.
[22:25:59] iamdevnul: they don't seem easily repeatable
[22:26:11] iamdevnul: and they are in spots that seem 'impossible'
[22:26:30] iamdevnul: i'm wondering if threads are to blame too, but we are running this in passenger...everything should be non threaded
[22:26:36] mustmodify: but either params[:user_id] is being cleared out, or you're using threads and simultaneous requests aren't thread-safe
[22:26:43] squaresurf: Hi, so I've recently decided that I would like to dive in and learn the Rails core so I could start to contribute. My first approach has been to get all the tests passing on my machine. Unfortunately I haven't been able to get all tests passing locally on my Mac as well as the Rails dev vagrant box. Is there a Travis url or the equivalent for me to see if the commit I'm on is
[22:26:43] squaresurf: passing for the CI machine that runs the Rails core tests?
[22:26:51] iamdevnul: but how could the control loop if object.present? pass
[22:26:55] iamdevnul: and then the next line it be nil
[22:27:01] squaresurf: I'm also curious if there is a better channel to discuss my question.
[22:27:01] iamdevnul: that makes no sense to me
[22:27:02] mustmodify: that's true. I believe passenger should protect you from that.
[22:27:38] mustmodify: Well as I said, if user is a method, then you'd have to look at the method. But if it's a variable... then threads is your only option.
[22:28:06] jtong: has joined #RubyOnRails
[22:28:22] dblessing: has joined #RubyOnRails
[22:28:27] iamdevnul: we use capistrano to deploy, i wonder if it could coincide with our deployments as well
[22:28:41] mustmodify: well, airbrake should show you that, but...
[22:28:58] ashleyw: has joined #RubyOnRails
[22:29:08] mustmodify: passenger doesn't use any kind of 'kill' switch, unless it's changed a LOT since I used it. Still tmp/restart.txt ?
[22:29:12] mustmodify: If so, then that's not the issue.
[22:29:41] iamdevnul: well, this is passenger and apache
[22:29:51] iamdevnul: but yeah, tmp/restart.txt
[22:30:08] iamdevnul: we actually issue a reload command to the app on deployments
[22:30:16] pwnd_nsfw: has joined #RubyOnRails
[22:30:24] iamdevnul: squaresurf: are you sure you have the right ruby version?
[22:30:35] mustmodify: Well give me more code or ... good luck. :P
[22:30:52] iamdevnul: yeah, that's really the only relevant parts...it's weird
[22:31:01] iamdevnul: i appreciate you taking a look though
[22:31:08] flashpoint9: has joined #RubyOnRails
[22:31:22] rails750: Required attribute doesn't work on Safari browser with my rails4 app. what's the best practice to fix this?
[22:32:00] flashpoint9: has joined #RubyOnRails
[22:32:36] squaresurf: Shouldn't the rails-dev-box install that by default?
[22:33:30] squaresurf: It says here >= 2.2.2 - https://github.com/rails/rails/blob/master/rails.gemspec#L10
[22:33:31] macsteps: has joined #RubyOnRails
[22:33:34] squaresurf: I have 2.3.1
[22:33:53] squaresurf: Oh, I found it: https://travis-ci.org/rails/rails
[22:34:19] squaresurf: Looks like it's passing with 2.3.1 so it's probably something to do with my set up.
[22:34:20] flashpoint9: has joined #RubyOnRails
[22:34:51] squaresurf: Interesting there are allowed failures for 2.3.1
[22:36:51] davidw: has joined #RubyOnRails
[22:37:00] eljimmy: has joined #RubyOnRails
[22:39:39] danostrowski: has joined #RubyOnRails
[22:48:34] wethu: has joined #RubyOnRails
[22:51:24] lightt: has joined #RubyOnRails
[22:51:47] arooni: has joined #RubyOnRails
[22:52:47] yfeldblum: has joined #RubyOnRails
[22:58:13] jenrzzz: has joined #RubyOnRails
[22:58:13] jenrzzz: has joined #RubyOnRails
[22:58:33] jancel: has joined #RubyOnRails
[22:58:57] mikeiniowa: has joined #RubyOnRails
[23:00:28] tildes: has joined #RubyOnRails
[23:04:25] macsteps: has joined #RubyOnRails
[23:05:59] Axilla: has joined #RubyOnRails
[23:08:26] danostrowski: has joined #RubyOnRails
[23:08:59] banister: has joined #RubyOnRails
[23:09:50] ruby750: has joined #RubyOnRails
[23:10:44] ruby750: The Required attribute doesnt work on Safari browser with my RoR4 app. What is the best practice to work around it?
[23:11:32] lightt: has joined #RubyOnRails
[23:11:51] Uranio: has joined #RubyOnRails
[23:14:02] moeabdol: has joined #RubyOnRails
[23:18:03] blackmesa: has joined #RubyOnRails
[23:21:29] sypheren: has joined #RubyOnRails
[23:23:42] mustmodify: has left #RubyOnRails: ()
[23:25:52] tildes: has joined #RubyOnRails
[23:26:35] dblessing: has joined #RubyOnRails
[23:26:54] Rodya_: has joined #RubyOnRails
[23:27:58] moeabdol: has joined #RubyOnRails
[23:29:54] jtong: has joined #RubyOnRails
[23:30:09] Rodya_: has joined #RubyOnRails
[23:32:04] dalbuschat: has joined #RubyOnRails
[23:32:51] lightt: has joined #RubyOnRails
[23:33:16] lightt: has joined #RubyOnRails
[23:37:30] jgt3: has joined #RubyOnRails
[23:38:13] Rodya_: has joined #RubyOnRails
[23:39:17] emachnic: has joined #RubyOnRails
[23:42:06] rueben: has joined #RubyOnRails
[23:42:38] helpa: Saying that something "doesn't work" is completely useless to the people who are trying to help you. Please show all available information you have that indicates to you that something doesn't work. (remember to use http://gist.github.com for code/error messages)
[23:43:10] upsell5: has joined #RubyOnRails
[23:45:21] mdw: has joined #RubyOnRails
[23:46:10] roamingdog: has joined #RubyOnRails
[23:46:20] Ropeney: has joined #RubyOnRails
[23:46:57] ElFerna: has joined #RubyOnRails
[23:47:48] DoctorMonocular: I was just thinking about the methods you can pass a block to or a shorthand like map(&:blah). Is &:blah just ruby sugar, or what is the language construct that enables that?
[23:48:48] jhass: DoctorMonocular: & is the operator, :blah is a regular Symbol
[23:49:14] jhass: DoctorMonocular: & allows to pass a proc as a block, .map(&proc {|x| x.upcase }) for example
[23:49:30] jhass: now it also has that handy property of calling to_proc on its argument
[23:49:51] DoctorMonocular: isn't & the reference operator?
[23:49:54] jhass: Symbol#to_proc happens to return a handy proc that takes one argument and calls the method of the symbols name on it
[23:50:10] jhass: Ruby has no such thing as a "reference operator"
[23:57:18] tildes: has joined #RubyOnRails