« Back to channel list

#RubyOnRails - 24 January 2014

« Back 1 day Forward 1 day »
[00:00:54] bricker`work: techmaster242: allow_blank is probably a better option to use
[00:01:13] bricker`work: techmaster242: nil checks for literal `nil` (which is almost never the case in form POST requests)
[00:01:20] bricker`work: allow_nil* checks for literal nil
[00:01:39] techmaster242: should I use that in addition to allow_nil? I'm using inclusion validation, and nil is literally one of the values I will accept. either nil, L, M, or H
[00:02:04] techmaster242: but if the user passes nothing at all, then I just won't update it is what I'm thinking
[00:02:33] bricker`work: techmaster242: allow_blank will catch nil
[00:02:59] bricker`work: techmaster242: I am not 100% sure what a radio checkbox does if nothing is select, you can inspect your params in the logs to check that
[00:03:43] techmaster242: bricker`work: I'm making a grid of radio buttons, and the left column of the grid will equate to nil, so it will always have something selected
[00:04:04] bricker`work: techmaster242: yeah but "nil" can't be sent as a form paramter.
[00:04:20] bricker`work: techmaster242: er, I mean, literal nil can't
[00:14:52] techmaster242: bricker`work: So how could I save nil to the db, and have that interact with a radio button?
[00:16:17] momomomomo: Techmaster242: you know blank can be included as a value, right?
[00:16:52] momomomomo: top of the page: http://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html
[00:17:57] suciuvlad: What value should i set my sidekiq's currency if my unicorn worker_processes is set to 3 and i have 1 worker assigned in heroku for sidekiq ?
[00:18:01] momomomomo: then http://guides.rubyonrails.org/migrations.html#supported-type-modifiers
[00:18:05] momomomomo: allow null there
[00:20:33] techmaster242: momomomomo: it's allowing null in the database, so I don't think the model is the issue
[00:21:15] momomomomo: Techmaster242: if you set up the form as i suggested in the first link, you will receive a blank string as the value for that attribute
[00:21:25] momomomomo: which will go to the database as blank
[00:21:26] momomomomo: and save as NULL
[00:21:45] techmaster242: momomomomo: the first link was for a select, I'm doing radio buttons
[00:24:41] momomomomo: Techmaster242: oh, i see - i would just have different buttons for each option, then
[00:24:58] momomomomo: ie: f.radio_button :my_attribute, 'nil'
[00:25:29] techmaster242: momomomomo: I do. I have 4 possible options though. None, L, M, H. It should default to None if they haven't selected anything, and save to the db
[00:25:30] momomomomo: whichever is selected will send up the data. you'll have a blast verifying that they actually selected something, and didn't just miss the question/option, though
[00:25:40] momomomomo: then whats the issue
[00:26:11] techmaster242: momomomomo: I've got nil as the value for none, which matches the value that it puts in by default
[00:26:44] momomomomo: i guess I don't understand why that's an issue
[00:26:47] momomomomo: explain yourself better
[00:26:53] techmaster242: momomomomo: I guess another way to put it, is how can I set a set of radio buttons to default to a certain option when you're doing a new form, but in an edit form it should use what ever is stored in the db
[00:27:28] techmaster242: I think if you could answer that for me, I could make it work
[00:27:53] helpa: Techmaster242: 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.
[00:27:53] momomomomo: Techmaster242: !code for both views
[00:28:43] techmaster242: https://gist.github.com/anonymous/8589751
[00:29:15] techmaster242: the html is ugly right now, I will fix that up later. just trying to get it functional first. ;)
[00:29:23] momomomomo: that's the same form used for both views?
[00:29:25] momomomomo: edit and new
[00:29:32] techmaster242: it's a partial form
[00:29:41] momomomomo: and now, if you save 'l' does it not select the 'l' radio by default?
[00:30:10] techmaster242: yes it will, but it won't let me save because they're mostly set to nil
[00:30:13] Radar: holy indentation batman
[00:31:19] techmaster242: they want to only select a few options, but leave the rest set to none
[00:32:01] techmaster242: Radar: Not my fault that site uses 8 spaces for a tab. That's insane. ;)
[00:32:07] momomomomo: Techmaster242: you can set the 'nil' value to be checked if the value is nil
[00:32:10] helpa: techmaster242: Two spaces is *the* standard indentation for Ruby. Please always use two-space indentation. Tabs are evil. See http://www.caliban.org/ruby/rubyguide.shtml#indentation
[00:32:10] Radar: techmaster242: !indent
[00:32:21] Radar: techmaster242: Not my fault you're not following best practices within the Ruby community :)
[00:32:32] techmaster242: I've got my tab set to 2 spaces. LOL
[00:32:39] Radar: techmaster242: LOL no you don't
[00:32:52] momomomomo: Techmaster242: then you need to realign that shit in your gist :p
[00:32:57] momomomomo: anyways stop it Radar
[00:33:02] Radar: momomomomo: pass
[00:33:03] momomomomo: i want to leave work
[00:33:06] Radar: momomomomo: then go
[00:33:09] momomomomo: ok you help this dude
[00:33:12] Radar: momomomomo: bye
[00:33:24] Radar: techmaster242: so what's the problem?
[00:33:56] techmaster242: Radar: I'm trying to have 4 options on a set of radio buttons. none, L, M, H
[00:34:30] techmaster242: Radar: I need it to default to none, and allow them to save that value somehow. they don't have to select L, M, or H
[00:35:17] Radar: techmaster242: ok, and I guess that's not happening at the moment?
[00:36:02] techmaster242: Radar: Right, right now I'm using nil but it won't save that. so I guess I'm not sure where to go from here, as that's what's in the db
[00:36:17] Radar: techmaster242: Then pass '0' instead?
[00:36:50] techmaster242: I'm using a form partial for both new and edit. is there a way to tell the radio to use a certain default, but allow it to pick one of the others during edit?
[00:38:18] Radar: techmaster242: You can pass checked in the optiosn hash
[00:38:41] Radar: <%= f.radio_button :ba_agriculture, nil, :checked => f.object.ba_agriculture.nil? %>
[00:38:52] Radar: Although if it's not going to be nil, you're going to have to change that to something else.
[00:38:54] techmaster242: Radar: it will ignore that on edit?
[00:39:14] Radar: 0 would make sense, given that you've got L, M and H which probably stand for Low, Medium and High.
[00:39:20] csaunders: If I'm trying to create a module that works with request objects I can just pass in something like this right?
[00:39:41] csaunders: ActionDispatch::Request.new(Rack::MockRequest.env_for("", {method: 'POST'})
[00:39:42] techmaster242: yeah I'm fine with that
[00:39:44] csaunders: or whatever yeh?
[00:40:07] techmaster242: that might work then... :checked => f.object.ba_agriculture.nil? so even if the field is nil, it will switch to that option
[00:41:40] csaunders: basically I'm trying to pass in some headers but it looks like just passing them in via the options hash isn't doing it's thing
[00:42:06] csaunders: https://gist.github.com/csaunders/8589906
[00:45:07] techmaster242: Radar: Once it saves, it's updating the db to '0' which then keeps it from evaluating as true on the next edit, so next go around it's unchecked
[00:45:40] Radar: techmaster242: Try changing that .nil? check to .zero?
[00:46:12] techmaster242: Radar: that won't include nil though will it?
[00:47:05] Radar: techmaster242: You could do both :)
[00:47:10] Radar: have a check for nil? and one for zero?
[00:47:34] techmaster242: Radar: would they have to be seperarated with an OR? Or can I chain them together somehow?
[00:47:53] Radar: techmaster242: f.object.ba_agriculture.nil? || f.object.ba_agriculture.zero?
[00:49:51] csaunders: request.headers.to_a returns my header in that array, though attempting to access it is resulting in nil :/
[00:50:42] techmaster242: Radar: zero is an undefined method
[00:51:35] bricker`work: techmaster242: come on
[00:52:02] techmaster242: == 0 works though
[00:52:09] bricker`work: techmaster242: *applause*
[00:54:01] techmaster242: cool the db is full of 0's now. perfect. thanks guys
[00:54:50] Radar: techmaster242: zero? with a questionmark
[00:55:26] techmaster242: Radar: yeah that's undefined
[00:55:33] techmaster242: nil? works but not zero?
[00:55:47] Radar: irb(main):002:0> 0.zero?
[00:55:55] Radar: line 1 was a typo
[00:55:58] Radar: techmaster242: what version of ruby?
[00:56:14] techmaster242: weird it works in console
[00:57:31] techmaster242: Radar: I see why. because it's a string. there's no zero method for a string. it's an integer method
[00:57:42] techmaster242: that makes sense
[00:58:01] Radar: irb(main):001:0> "0" == 0
[00:58:08] Radar: You're going to have a bad time using == 0
[00:58:12] Radar: "0".to_i == 0
[00:58:37] techmaster242: yeah I could do that... value.to_i.zero?
[00:58:52] techmaster242: but == '0' will work fine
[00:59:06] techmaster242: better than getting an error trying to do 'H'.to_i
[00:59:30] Radar: techmaster242: All good now?
[01:00:12] techmaster242: yep it's working just fine now. thanks
[01:06:18] Radar: bbl, lunch
[01:09:51] lethjakman: is there a way to declare a role on a capistrano befoe/after hook?
[01:13:32] lethjakman: hmmm if anyone cares to know I fixed my migrations not running on deploy. I just needed a : set :migration_role, :app
[01:19:58] nickenchuggets: https://gist.github.com/brlafreniere/8590331
[01:22:07] v10energy: hmm... for some reason i thought it's possible to send e-mails from localhost. I didn't know that I must get a paid service?
[01:22:45] lethjakman: anyone have some nice cap 3 tasks for tailing the logs rails c and rails db?
[01:22:56] lethjakman: perhaps even ssh in?
[01:23:04] lethjakman: I have a feeling they're out there somewhere.
[01:23:26] nickenchuggets: v10energy: where is localhost in your case?
[01:24:25] v10energy: nickenchuggets: :) I mean like.. from the local computer. I thought it would be enough to setup an e-mail server
[01:24:59] nickenchuggets: v10energy: you could send outgoing mail only from a local computer that's not exposed to the internet.
[01:25:10] pipecloud: v10energy: You can send email from any machine.
[01:25:26] pipecloud: Even your toaster.
[01:25:31] droptone: nickenchuggets up in this bitch!
[01:25:33] nickenchuggets: v10energy: if you install postfix, it will provide you with the sendmail command, from which you can send e-mails from your command line.
[01:26:00] nickenchuggets: v10energy: and software such was WordPress can send outgoing mails by having a default postfix install.
[01:26:00] pipecloud: You don't even need that, but you can use it.
[01:26:45] nickenchuggets: droptone: have we met before?
[01:26:54] droptone: Nope, but I enjoy your nick.
[01:27:08] nickenchuggets: Ah, I see. Ok then. :D
[01:27:16] rhizome: i hope this is none of you: http://ruby.about.com/od/testdrivendevelopment/ss/Unit-Testing-With-Minitest.htm
[01:27:22] v10energy: nickenchuggets: I did setup postfix but the e-mail won't go through
[01:27:28] rhizome: pretty much the most useless article ever
[01:27:34] rhizome: "possibly"
[01:27:37] nickenchuggets: v10energy: you might have to do some basic configuration then.
[01:28:00] nickenchuggets: v10energy: also, depending on where you're sending it to, it's likely it's being marked as spam.
[01:28:01] v10energy: nickenchuggets: I followed some guide, but it didn't seem to do it.
[01:28:10] v10energy: nickenchuggets: to my own gmail account
[01:28:18] v10energy: nickenchuggets: didn't find it under spam though
[01:28:19] nickenchuggets: v10energy: check your spam folder.
[01:28:26] v10energy: nickenchuggets: can you recommend me a good guide to setup postfix?
[01:28:45] nickenchuggets: v10energy: tail -f the /var/log/mail.* files and it'll give you more info.
[01:29:32] nickenchuggets: v10energy: what OS?
[01:29:36] v10energy: nickenchuggets: ubuntu
[01:29:41] v10energy: kubuntu to be exact
[01:30:01] v10energy: nickenchuggets: how do i check? I think 13 or something
[01:30:07] nickenchuggets: cat /etc/os-release
[01:30:45] v10energy: VERSION="13.04, Raring Ringtail"
[01:31:18] nickenchuggets: v10energy: this might be helpful, https://help.ubuntu.com/13.04/serverguide/postfix.html
[01:31:27] v10energy: nickenchuggets: thank you sir
[01:31:56] nickenchuggets: the basic configuration section should be all you need in your case
[01:32:28] nickenchuggets: that will work for sending/receiving e-mails with accounts on the local machine only
[01:32:46] nickenchuggets: well, probably not receiving
[01:33:16] nickenchuggets: v10energy: if you're behind a router, you probably won't be able to configure it to receive e-mails, unless you do some fancy configuring with your router
[01:33:33] nickenchuggets: but, you should be able to send e-mail with that setup
[01:44:25] nickenchuggets: So, yeah, still don't understand why this is happening: https://gist.github.com/brlafreniere/8590331
[01:49:42] ner0x: Does anyone know how to use cancan with strong_parameters?
[01:52:05] rhizome: survey says?
[01:54:43] droptone: quick question: I'm rendering the show action after successful execution of the create action in this controller, and I need to pass the standard :id parameter.
[01:54:47] droptone: What is the syntax for doing such?
[01:54:58] droptone: right now I have: format.html { render action: 'show', notice: 'Image added to gallery' }
[01:55:30] droptone: but that doesn't work, since I need to pass current_user.id
[01:57:05] uberjar: droptone: use instance variables, or just call current_user.id inside your view
[01:58:37] droptone: oh, I see, ok. So just set the variable then render the action.
[01:58:41] droptone: got it, thank you.
[02:15:01] rhizome: and redirect, not render
[02:33:50] hashpuppy: anyone using webpack or browserify with rails?
[02:53:14] t3i: Has anyone had problems sending emails? In dev my emails go out with a bit of text and the pdf attachment as expected. On my staging server the attachment is missing. I did notice the width is 61 chars in dev and 77 chars in staging.
[02:55:23] Radar: t3i: no, nobody in the history of the interner has ever had trouble sending emails.
[02:55:39] t3i: hi radar
[02:56:04] Radar: What width are you measuring there?
[02:56:20] t3i: i'm looking at the raw source to see what is different
[02:56:47] t3i: one is from my mac, one is from my debian server
[02:57:05] t3i: it is the width in chars of the email attachment
[02:57:22] t3i: both are attached and about the correct length
[02:57:34] t3i: the staging one doesn't show up in the mail client
[02:57:45] t3i: i guess it could be apple mail
[03:00:02] Radar: I dont' know. There are quite a number of things which can go wrong with email.
[03:02:41] t3i: I logged into gmail and the attachment is visible there
[03:02:55] t3i: so it looks like apple mail is failing
[03:03:06] t3i: it does say there is an attachment, i just can't see it
[03:07:50] t3i: It seems to be an OSX lion mail bug
[03:13:06] t3i: radar, thanks for answering
[03:13:11] Radar: that's alright
[03:15:46] JoshuaPaling: Hi, in my rails app, I want to override a helper method in the Ransack gem.
[03:16:03] JoshuaPaling: The original helper file is: https://github.com/activerecord-hackery/ransack/blob/master/lib/ransack/helpers/form_helper.rb
[03:16:23] JoshuaPaling: I've created a file /app/helpers/ransack_overrides_helper.rb
[03:16:28] JoshuaPaling: which contains https://gist.github.com/joshuapaling/2dbeb224222a8de3470f
[03:17:02] JoshuaPaling: As you can see, in my gist, I've commented out the nested modules at the top of the file - Ransack, Helpers, FormHelper
[03:17:09] JoshuaPaling: It's all working for me.
[03:17:56] JoshuaPaling: But if I uncomment those nested modules in my Gist, to match the nested structure of Ransack's original helper, it breaks - I get "Circular dependency detected while autoloading constant RansackOverridesHelper"
[03:18:22] JoshuaPaling: I'm just wondering if someone can explain why that is, and what the nested modules are there for in the original file?
[03:18:46] JoshuaPaling: In terms of the original goal (to override a single ransack helper method) am I going about it the right way?
[03:50:34] Baluse: nsfl http://i.imgur.com/v7FCp1v.jpg
[03:51:19] espinet: I'm having some trouble with associations, includes, scopes, and arguments all combined into one problem. can anyone lend a brain? https://gist.github.com/espinet/8591772
[03:55:59] espinet: no ones going to bite
[03:57:23] helpa: espinet: Patience, young grasshopper
[03:57:23] Radar: espinet: !patience
[03:57:35] Radar: 'sif helpa doesn't have a tip for that
[03:57:56] Radar: Oh, there it is.
[03:58:23] Radar: espinet: Why not User.first.tests.records.includes(:user)?
[04:00:16] espinet: Radar: tests.records?
[04:00:32] espinet: essentially i need to pass in an argument into an includes
[04:00:39] espinet: because of that association scope
[04:01:52] espinet: all the examples for eager loading don't have an argument, but you can use an argument in an association with a scope
[04:01:59] espinet: i need to combine the two
[04:07:02] ciwolsey: when using devise, does anyone know why when i do @users = User.all , then Users.each in my view a get a nil class? it works fine from "rails console"
[04:07:32] espinet: @users.each
[04:07:44] ciwolsey: yeah thats what i meant
[04:08:09] espinet: you hitting the correct controller action?
[04:09:00] ciwolsey: yeah its...
[04:09:41] ciwolsey: ill triple check that
[04:10:01] espinet: put a debugger in the controller action and the view
[04:10:04] espinet: make sure they both hit
[04:10:48] ciwolsey: no theyre definitely the right controller/action
[04:11:31] ciwolsey: i changed nothing
[04:11:35] ciwolsey: now its working...
[04:11:56] ciwolsey: literally all i did was put stuff you said in and took it out
[04:12:05] ciwolsey: and suddenly its not empty anymore
[04:12:27] espinet: now solve my issue "I'm having some trouble with associations, includes, scopes, and arguments all combined into one problem. can anyone lend a brain? https://gist.github.com/espinet/8591772"
[04:12:37] ciwolsey: ah i know what may have happened
[04:12:55] ciwolsey: i forgot to maybe control+s to save the controller.. then when i came in to put that debug line in.. ive saved it.. removed it, saved it again
[04:13:45] ciwolsey: so i had it written in my controller just forgot to save.. and thats why nil in the view
[04:13:58] ciwolsey: doh.. thanks, sorry
[04:34:37] nahtnam: Hey guys! I need a little bit of help. Every time I visit a page, this error gets put into the log http://pastie.org/private/6degy9hi8mgxmqcp6jctg. The thing is that I know what the error is and its coming from a gem so I cant do anything about it but I would like to disable it since it makes a few millisecond page load take 5-6 seconds.
[04:43:47] dseitz: Gem is going through a transition; you'll need to silence those until it is done
[04:46:16] nahtnam: dseitz: How would I do that?
[04:46:43] dseitz: config/initializers/<something> probably money.rb if it isn't generated
[04:46:44] nahtnam: I need to do this in both dev and prod mode. It is really annoying in dev
[04:47:28] nahtnam: dseitz: Nope, not there.
[04:48:35] nahtnam: There is no money.rb and all other files dont contain anything similar to it.
[04:50:01] dseitz: https://github.com/RubyMoney/money/pull/357
[04:50:22] dseitz: Money.silence_core_extensions_deprecations = true will flag them away
[04:52:06] nahtnam: dseitz: Thanks. I still dont know WHERE to put it
[04:52:16] dseitz: initializer somewhere
[04:53:39] dseitz: I usually like to create a new file
[04:53:45] dseitz: start here: http://guides.rubyonrails.org/configuring.html#using-initializer-files
[04:53:50] dseitz: that way I can just delete/modify one context
[04:57:33] dseitz: config/application.rb might be appropriate if it's not getting too big already
[04:58:05] nahtnam: dseitz: Thanks a lot! :)
[05:13:49] Dreamer3: is there a place to globally define used ruby libraries in Rails?
[05:13:51] Dreamer3: I'm spoiled but all my Gems being global
[05:13:53] Dreamer3: thanks to bundler
[05:13:55] Dreamer3: do we still have to slap require 'csv' in every file that uses it or is there a convention for where to put the require 'csv' globally?
[05:16:34] Dreamer3: everyone asleep?
[05:17:45] rhizome: you can put it in application.rb
[05:18:02] Dreamer3: or environment or boot
[05:18:06] Dreamer3: but is there some convention?
[05:18:09] Dreamer3: i haven't heard of any
[05:18:28] Dreamer3: we have such a nice way to manage gems with bundler and Gemfile
[05:18:38] Dreamer3: i just haven't heard about the same thing for regular ruby libraries used app-wide
[05:19:53] Dreamer3: makes me want to make a LIbfile
[05:19:54] Dreamer3: or something
[05:22:57] Dreamer3: feel like bundler should handle this
[05:24:30] nahtnam: Hey! I created a little ruby app, but it has a bug. I am a total ruby newbie so I need a little help on a simple problem. Here is my code. http://pastie.org/8662574 Basically (Without lines 5-7) if I just put puts page_url, it goes through every single page but once I added the file open, it only puts the first link
[05:24:35] nahtnam: How would I fix this?
[05:25:53] nahtnam: dseitz: Any idea on how to fix this?
[05:33:41] dseitz: nathancahill: 'w' mode is wrong mode for this one
[05:35:26] elliotec: does the asset pipeline not source assets from the assets/vendor directory in production? even when precompiling?
[05:36:30] Dreamer3: man looks like bundler has no concept of dependencies that are not gems
[05:36:48] dseitz: It's a logic bug; since every time you are opening the file, you are truncating the existing [basically deleting it]
[05:36:48] dseitz: 'a', read IO::new's documentation
[05:38:11] corehook: hi all! i've trouble with devise gem. After adding to Gemfile and execute bundle install, rails generate devise operator
[05:38:37] Radar: corehook: what
[05:38:41] Radar: corehook: that doesn't make any sense :(
[05:39:05] Dreamer3: Radar: does Bundler have any provision for saying that a standard ruby library is a dependency?
[05:39:19] Radar: Dreamer3: not unless it's a gem.
[05:39:26] Dreamer3: funny the image title and page title are different
[05:39:34] Radar: Dreamer3: Aren't you supposed to include those things in application.rb or whatever?
[05:39:35] Dreamer3: "The best way to manage your applications dependencies" is in the image
[05:39:41] Dreamer3: but in the title is says "Gems"
[05:39:47] Radar: Dreamer3: pendat
[05:39:48] Dreamer3: the or whatever is what i'm wondering about
[05:39:53] Radar: If it's standard libraries then it should be required.
[05:39:55] Dreamer3: i've never heard of a pattern
[05:39:58] Radar: And it should be standard.
[05:40:18] Dreamer3: i know i need to require it, but you have application, environment, boot, etc
[05:40:27] Dreamer3: it seems we need some global place to define app wide libraries
[05:40:45] Radar: config/application.rb, after Bundler.require is where I have put my requires.
[05:41:08] Dreamer3: makes sense, but i was thinking of making a root/Libfile
[05:41:12] Dreamer3: and then requiring that
[05:45:12] Scient: im using initializers/dependencies.rb for that
[05:46:40] elliotec: anyone have an answer to my earlier question?
[05:46:43] Dreamer3: yeah, i'm thinking about having the hook there
[05:46:57] Dreamer3: vs application.rb
[05:47:09] Dreamer3: though i already have a ton of files there
[05:47:14] Scient: elliotec: you question isnt really clear
[05:48:50] elliotec: So lets say I am integrating a theme with zurb foundation, and I get all the assets from that 3rd party theme. Technically I'd put them in the vendor directory is that correct? But if I do, the assets aren't served in production
[05:49:13] elliotec: even after precompilation
[05:50:04] elliotec: test env and development env can find them though
[05:50:45] Scient: you need to require them in one of the manifests
[05:50:56] Scient: or if you are trying to include them directly, you need to add them to the precompilation list
[05:51:09] dseitz: I don't think vendor/assets are included as a default anymore
[05:51:11] nahtnam: dseitz: What would I change it to?
[05:51:22] Scient: im sure it is
[05:51:27] Scient: why wouldnt it be?
[05:51:34] dseitz: 'w' would be a better mode, appends to end of file or creates the file
[05:51:37] dseitz: 'a' I mean
[05:51:41] dseitz: hehe silly me
[05:52:23] dseitz: The directory itself is created, doesn't mean rails pays much attention to it
[05:52:58] Scient: is there ANYTHING to support your assumption?
[05:54:13] elliotec: Scient: yeah I tried requiring it in the manifests, to no avail. I guess i could try adding to the precompilation list
[05:54:38] dseitz: "In Rails 4.0, precompiling assets no longer automatically copies non-JS/CSS assets from vendor/assets and lib/assets. Rails application and engine developers should put these assets in app/assets or configure config.assets.precompile."
[05:54:41] dseitz: Migration documentation
[05:54:57] Scient: you're not giving a whole lot of info though, what exactly is happening
[05:55:14] Scient: note that it says "non js/css assets"
[05:56:01] elliotec: dseitz: thank you! that answers it.
[05:56:18] dseitz: I would add config.assets.paths << "#{Rails.root}/vendor/assets/*" or something alike
[05:56:43] elliotec: yeah thats for sure how to do it. thanks again.
[05:57:09] Scient: so rails4 not loading non-js and css assets from vendor makes your css and js stuff broken then?
[05:57:15] Scient: ACTION sighs
[05:57:37] nahtnam: your the best dseitz Thanks a lot!
[05:57:52] Scient: this is called debugging by accident
[05:59:02] elliotec: Scient: its unclear what you're unclear on.
[05:59:42] Scient: unclear which assets are "not working" - css and js or something else - and what "not working" means
[06:00:13] Scient: the migration doc clearly states the change affects non js and css files, im also using assets out of vendor/assets without any precompilation or asset path changes just fine
[06:00:28] dseitz: Small quote that adds to this problem: "It is important to note that files you want to reference outside a manifest must be added to the precompile array or they will not be available in the production environment."
[06:00:40] Scient: so you either are not providing enough info or you fixed this by accident now
[06:01:18] Scient: well that applies to rails 3 as well, you cant reference stuff thats not in some manifest or explicitly marked as a precompilation target
[06:02:32] elliotec: it was images, though i did have to change a couple paths to css after being enlightened.
[06:03:21] Scient: see, that turned out to be quite important, that little detail
[06:03:41] dseitz: Well, that means he can include JS/CSS
[06:03:54] dseitz: but has to define precompile for that directory i assume
[06:04:13] Scient: why did they change this though
[06:04:35] elliotec: I had a font-awesome css file that had strange paths. when i put it in public it would find the icons and fonts, when in vendor it wouldn't. I had to change the paths for it to work from vendor in production. that is new as far as I remember
[06:04:50] elliotec: the images were totally evading me though. js was fine
[06:05:22] elliotec: yeah i had to define precompile as well
[06:06:02] elliotec: thanks again, i'll try to be more specific next time
[06:07:31] dseitz: You know, I have no idea why
[06:08:57] dseitz: Looking at history, someone suggested
[06:08:59] dseitz: DHH approved
[06:09:03] dseitz: it was pulled :)
[06:11:48] mjc_: sprockets-better-errors is awesome
[06:11:50] dseitz: Supposedly the 'it works in test/dev' will be snipped soon by sprockets team
[06:11:51] mjc_: highly recommended
[06:12:03] mjc_: should use it in the meantime
[06:12:32] mjc_: fixes the "it works in test/dev" and also gives you meaningful messages
[06:12:33] dseitz: new config is: config.assets.raise_asset_errors = true # in dev
[06:12:53] mjc_: https://github.com/schneems/sprockets_better_errors
[06:13:24] mjc_: gives you all that right now so you don't have to wait
[06:25:44] toretore: hi guys, my rails doesn't work, pls2fix?
[06:26:24] rvanlieshout: toretore: reinstall your computer
[06:26:42] toretore: what's a cumpoter?
[06:27:12] bricker`LA: wat r computr
[07:15:31] MatthewJamesB: Just checking if I can talk here.
[07:35:10] krz: whatever tagrudev
[07:35:53] tagrudev: happy Friday krz :D
[07:42:13] krz: morning yo
[08:23:05] dseitz: omg I my daughter forces my little pony upon the tv all the time, php.net had a my little pony easter egg? glad I missed it, I would have checked myself in somewhere
[08:23:33] dseitz: https://github.com/php/web-php/commit/681bea8bb4d646ef628ab80bdfec0df07a07c561 | If anyone missed PHP's weird antics... odd community I tell ya
[08:32:34] prateekp: how to get absolute url of image from relative href #nokogiri
[09:05:13] Obi_obi: Ryan_420 hey man
[09:05:36] Ryan_420: How are you?
[09:05:56] Ryan_420: and how do i reply private like that?
[09:06:00] Ryan_420: Im new to the irc world
[09:07:53] Silex: Ryan_420: to talk to one person only you type "/query SomeNickName" and a new window should popup
[09:21:08] Ryan_420: Hey everyone! I'm here looking for a mentor/friend/tutor to guide me along the path to learning rails. Anyone wanna help out a bit? Any help would be greatly appreciated!
[09:25:35] tobago: why the task is invalid? https://gist.github.com/trinibago/8594374
[09:25:53] tobago: the validator prevents it from saving.
[09:25:54] certainty: prateekp: just append relative href to current uri path
[09:26:19] tobago: though I thought, the task was saved first and the person was validated?
[09:26:23] certainty: pathinfo that is
[09:27:34] tobago: I want to create a deep copy of tasks, but also want to ensure every associated person is valid (means associatedwith an existing task)
[09:37:17] mauro1254: Hi guys, a question on assets pipeline: http://edgeguides.rubyonrails.org/asset_pipeline.html#customizing-the-pipeline
[09:37:53] mauro1254: Is application.css by default NOT compressed?
[09:38:29] rvanlieshout: mauro1254: have you looked at the result in your production app?
[09:38:32] mauro1254: It is not clear ... If I analyze it on the production server I can find comments
[09:38:52] rvanlieshout: how did you analyze it? viewed the result the browser is presented?
[09:39:03] mauro1254: It seems that carriage return have been removed
[09:39:15] mauro1254: on production server
[09:39:44] mauro1254: my production server, connected through ssh
[09:39:51] mauro1254: public/assets/
[09:39:58] rvanlieshout: view the result the browser is presented
[09:40:49] tobago: mmh. why does the validate prevent the cloned task from beiing saved? https://gist.github.com/trinibago/8594374
[09:41:11] rvanlieshout: tobago: execute cloned_task.errors.to_a
[09:41:38] tobago: rvanlieshout, i did. the last line in console.rb is the result
[09:41:40] rvanlieshout: it'll show you that people is of an invalid format
[09:41:48] rvanlieshout: tobago: isn't that the result of .save?
[09:41:55] rvanlieshout: cause that doesn't look like the result of .errors.to_a
[09:42:09] tobago: rvanlieshout, right. I'll do it.
[09:43:39] tobago: rvanlieshout, right. people is in invalid format (like the errros object itself say)
[09:43:46] mauro1254: rvanlieshout: it is the same ... carriage returns have been removed, but there are comments
[09:43:55] rvanlieshout: mauro1254: and what do they say?
[09:44:11] rvanlieshout: mauro1254: ok.. and you've ran assets precompile?
[09:44:29] rvanlieshout: tobago: so you've passed people as an invalid format
[09:44:36] mauro1254: comments: eg. jquery copyright etc
[09:44:53] rvanlieshout: mauro1254: then it seems it's not enabled. or it's defined as important (see the yui compressor docs)
[09:45:04] mauro1254: js have been minified thorugh uglifier
[09:45:24] mauro1254: I'd like to know if there is a default for css
[09:45:31] mauro1254: js => ok, css ?
[09:45:51] rvanlieshout: the docs say :yui
[09:46:31] mauro1254: yes, I understand ... but ... which library removed carriage return from my files ?
[09:46:39] tobago: rvanlieshout, right. but the only validator is the presence => true for the association to task (which is a new record through cloning indeed).
[09:46:39] mauro1254: I didn't install yui
[09:46:55] rvanlieshout: tobago: that doesn't mean you can pass invalid things
[09:48:18] tobago: rvanlieshout, but my expectation was, that in the transaction chain: task was validated; check; task was created; check; association of person was set; check; person was validated; check and person was saved. but the order in rails seems different?
[09:48:52] rvanlieshout: mauro1254: tobago it's invalid...
[09:48:55] rvanlieshout: it's just invalid
[09:49:34] rvanlieshout: what does .errors.to_a show?
[09:49:59] tobago: rvanlieshout, Person Xinvalid format.
[09:50:08] greengriminal: Morning/Afternoon people wherever you maybe :)
[09:50:23] tobago: i'll check
[09:50:26] rvanlieshout: still morning :)
[09:50:44] greengriminal: If i do: @w = current_user.widgets.map(&:snippets) this returns back all snippets for a widget that belongs to the current_user.
[09:50:50] rvanlieshout: tobago: and add the full output to your gist
[09:51:08] rvanlieshout: greengriminal: in an array with arrays
[09:51:18] greengriminal: Now my question is I want to pluck the ids from this. But i know the following won't work: @w = current_user.widgets.map(&:snippets).pluck(:id)
[09:52:09] rvanlieshout: Snippet.joins(:widget).where(widgets: { user_id: current_user.id }).pluck(:id)
[09:52:16] rvanlieshout: or current_user.widgets.map(&:snippet_ids).flatten
[09:52:58] rvanlieshout: tobago: what is cloned_errors?
[09:53:21] greengriminal: rvanlieshout: second option is cleaner cheers :)
[09:53:32] rvanlieshout: greengriminal: not really
[09:53:38] rvanlieshout: uses the db more
[09:53:47] rvanlieshout: tobago: what is @person?
[09:53:47] tobago: rvanlieshout, https://gist.github.com/trinibago/8594374 invalid? is true. the question is, why is it true? the answer: because the assocuiation was not set before validating the person.
[09:54:20] rvanlieshout: tobago: because this code is wrong in many ways
[09:54:36] tobago: rvanlieshout, o.k. whaT am I doing wrong?
[09:54:53] rvanlieshout: tobago: you're assining @person.to_a to something called people
[09:54:57] rvanlieshout: @person implies it's only one person
[09:55:04] rvanlieshout: to_a makes 1 thing an array? and that shold be people?
[09:55:34] tobago: rvanlieshout, @person.to_a != [@person] ?
[09:56:00] helpa: tobago: Why don't you try it and find out for yourself?
[09:56:34] tobago: rvanlieshout, I tried. and @person.to_a == [@person]
[09:57:16] tobago: @person.to_a is equal to [@person]
[09:57:29] tobago: though it's deprecated....
[09:57:37] rvanlieshout: and what if you remove that assignment
[09:57:49] rvanlieshout: your person requires a task
[09:57:55] tobago: rvanlieshout, yes.
[09:58:04] tobago: the validator is the one who cries.
[09:58:08] rvanlieshout: set the inverse_of of your relationships
[09:58:14] rvanlieshout: your person doesn't have a task
[09:58:24] rvanlieshout: has_many :people, inverse_of :task
[09:58:35] tobago: rvanlieshout, ahh. o.k. i'll try
[09:58:44] rvanlieshout: belongs_to :task, inverse_of :people
[10:03:26] tobago: rvanlieshout, that doesn't solve the invalid issue. @task and @person are both cloned objects. the belongs_to assoc is validated. please tell me if my assumption is correct: rails validates the cloned person before saving the cloned task? is that true?
[10:04:23] tobago: I mean what I'm trying to do, is to deep clone an object (@task), but also ensure that every person belongs_to a task.
[10:04:23] alex88: hi guys, I'm trying to create a favoritable concern, my idea is to create a polymorphic association favorite which can favorite from an user to another kind of class, someone already done something like that and could share some code?
[10:05:17] rvanlieshout: tobago: it needs to save the object without the foreign key first
[10:05:18] tobago: and furthermore the associated people of the deep copied task shall be cloned as well. maybe that doesn't work while validating the person?
[10:05:43] tobago: rvanlieshout, o.k. that's what I was afraid of.
[10:06:30] rvanlieshout: it cannot be done otherwhise
[10:06:35] mikecmpbll: i wrote a deep clone to clone my entire application data in to objects in memory the other day
[10:06:36] rvanlieshout: it needs to have the id of the foreign key in order to save
[10:06:40] tobago: rvanlieshout, so saving the cloned task first and then associate the cloned people afterwards.
[10:06:44] rvanlieshout: but you can still set the relationships
[10:07:33] Cork: anyone know how to specify what data should be sent on an ActiveResource destroy call?
[10:07:41] Cork: right now it doesn't send any for me
[10:07:58] Cork: (the resource doesn't have id's)
[10:08:01] tobago: o.k. and that entire clong process need to be done in a transaction. and I was afraid of putting that stuff into an unamed transaction.
[10:08:35] rvanlieshout: but you should be able to have the validation pass if you use inverse_of
[10:08:48] rvanlieshout: and make sure you're not validating on _id, but on the object
[10:08:51] rvanlieshout: away for a sec
[10:09:05] clocKwize: that moment when you are about to ask irc the best gem to do a certain job, then realise you wrote one 3 years ago
[10:09:12] clocKwize: that nobody uses I might add
[10:09:18] clocKwize: didn't write any documentation though lol
[10:09:22] clocKwize: probably would hlep
[10:09:38] toydestroyer: hi guys! What is the best way to generate and render QR-code in Rails 4?
[10:10:28] tobago: rvanlieshout, I do always validate the object instead of the foreign_key attribute. thank you for your patience, anyway.
[10:10:34] mikecmpbll: toydestroyer: www.ruby-toolbox.com
[10:12:21] toydestroyer: mikecmpbll: and which one is the best? rqrcode, zxing, zbar, rqr, qrencoder,pngqr, qrtools?
[10:13:08] mikecmpbll: i've no clue, never used any. rqrcode looks popular, wouldn't you say?
[10:13:47] toydestroyer: mikecmpbll: okay, thanks anyway.
[10:14:00] certainty: yeah, anyway
[10:14:37] greengriminal: I have the following: https://gist.github.com/anonymous/8594917 the purpose is that it is supposed to print out the paperTrail version for the snippets
[10:15:15] greengriminal: In my gist I show that in the console it works. But when I *attempt* to print it out on my page I have nothing returned back inside the array.
[10:16:24] sarovin: hi, i'm studyng about has_many through association
[10:17:18] sarovin: but i have a problem about _form
[10:17:52] sarovin: Can we see here?? http://stackoverflow.com/questions/21307281/has-many-through-not-saving-associations
[10:18:57] sarovin: if i insert manualy the id in week_shifts table, it work...
[10:19:41] sarovin: but with the _form i can't save it
[10:19:50] mikecmpbll: sarovin: is there anything wrong with the params?
[10:19:54] sarovin: (sorry for my bad english)
[10:20:52] sarovin: mikecmpbll, i use it http://nopaste.info/e4c3bb85eb.html
[10:22:01] mauro1254: For gzipped assets, is there an option for javascript_include_tag & stylesheet_link_tag? Do I have to link to gzipped files only for production and NON gzipped ones in development ?
[10:25:28] mikecmpbll: sarovin: noticed that your week_ids parameter is not part of your "shift" parameters
[10:25:41] mikecmpbll: it should be params[:shift][:week_ids], not params[:week_ids]
[10:25:57] mikecmpbll: you need to namespace your form inputs
[10:38:17] sarovin: mikecmpbll, i am trying to translate :D
[10:38:35] mikecmpbll: sarovin: check your SO question, i added an answer there.
[10:38:40] alex88: is there a way to run db:migrate without actually doing the queries?
[10:38:53] alex88: like a dry run?
[10:39:12] mikecmpbll: alex88: what would that achieve?
[10:39:20] alex88: show the queries that it would run
[10:41:02] mikecmpbll: ah okay. not that i know of
[10:43:36] alex88: np thanks mikecmpbll
[10:45:19] sarovin: mikecmpbll, thank you
[10:46:07] grimly: I want to open Sublimef rom Terminal OSX
[10:46:07] grimly: using the following command
[10:46:07] grimly: alias subl='open -a "Sublime Text 2"'
[10:46:09] grimly: ???> where can I locate the following file ?
[10:46:11] grimly: .bash_profile
[10:46:13] grimly: thanks in advance
[10:46:26] besson3c: Hey guys, I have a weird problem... I'm trying to rename a table/model, but my Rails project is still referencing the old table after my rename. I'm not seeing any references to that table at all via a Unix find and grep command
[10:46:52] besson3c: Where else does Rails store references to tables, where can I trace this down?
[10:47:44] MickeySoFine: I'm trying to wrap some html into a string, I used html = <<END but that doesnt seem to work, anyone have any suggestions on wrapping multiline text into a string?
[10:48:49] besson3c: I've even tried recreating the table/model, I just can't get rid of this old reference
[10:49:41] mikecmpbll: grimly: ~/.bash_profile
[10:50:28] mikecmpbll: grimly: however the sublime website suggest that you symlink to /bin/subl http://www.sublimetext.com/docs/2/osx_command_line.html
[10:51:12] greenarrow: grimly: alias subl='open -a /Applications/Sublime\ Text.app'
[10:51:51] besson3c: Does Rails contain some sort of binary file containing relationships between models and table names that I should delete or something?
[10:52:17] besson3c: Any hints you guys have for why my model is pointing at the old table name prior to the rename would be super helpful
[10:52:29] besson3c: Or things I can try, I'm getting desperate
[10:52:32] greenarrow: drop db and recreate?
[10:52:47] greenarrow: rake db:drop rake db:create rake db:migrate
[10:53:02] besson3c: that will recreate everything?
[10:53:20] alex88: I've these two classes http://pastie.org/8663242, so I'm able to use the favoritable concern on an image model, now I've to do the reverse, so being able from the user to get the favorites (all favorites belonging to the user) but also filter like favorited_images and so on for the other objects, I thought of creating an has_many :favorites but then?
[10:53:36] mikecmpbll: besson3c: don't do that in production.
[10:54:18] besson3c: Yeah, I'm just trying to fix my test environment. I have no data of importance saved
[10:55:26] mikecmpbll: how did you change the table name?
[10:56:52] greenarrow: hopefully he used a migration
[10:57:03] besson3c: greenarrow, mikecmpbll: after doing the drop + create + migrate my model is still pointing at the old table name.. WTF?
[10:57:17] greenarrow: how did you rename the table
[10:57:18] besson3c: mikecmpbll: with a rename_table migration
[10:57:24] mikecmpbll: did you change the model name ...
[10:57:41] besson3c: there are absolutely no traces of the old table name in the code
[10:57:47] mikecmpbll: have you restarted your app
[10:57:56] greenarrow: in your schema is the old table name there
[10:58:01] besson3c: my app is running on Apache
[10:58:09] _lazarevsky: hello all. I'm quite new to rails so please dont be harsh in your comments. I am building a demo app with rails as the backend and ember as the front-end framework. I am using api controllers. I defined a controller called TShirtSizes, updated the routes.rb file
[10:58:10] mikecmpbll: have you restarted it? :)
[10:58:15] _lazarevsky: when i do rake routes I can see the route is there
[10:58:19] besson3c: old table name is not in schema or anywhere, according to grep/find
[10:58:23] _lazarevsky: however when I access it I get uninitialized constant Api::TShirtSizesController
[10:58:25] _lazarevsky: whats up with that??
[10:58:27] besson3c: mikecmpbll: yes, but I'll try that again
[10:59:01] _lazarevsky: what am I doing wrong?
[10:59:02] mikecmpbll: _lazarevsky: gist your routes file and controller? :)
[10:59:12] _lazarevsky: mikecmpbll: right away
[10:59:13] besson3c: mikecmpbll: just restarted it, still the same silly problem
[10:59:57] mikecmpbll: besson3c: did you check your db/schema.rb like greenarrow suggested?
[11:00:21] _lazarevsky: mikecmpbll: http://pastebin.de/39228
[11:00:36] besson3c: mikecmpbll: yes, like I said there are no traces of the old table name when I grep -r my entire project
[11:01:03] besson3c: except for old migrations and log files
[11:01:03] mikecmpbll: then i'd suggest you're not running the same code that you think you are.
[11:01:10] _lazarevsky: mikecmpbll: I keep getting uninitialized constant Api::TShirtSizesController
[11:01:40] _lazarevsky: I also have the backing TShirtSizeController
[11:02:01] _lazarevsky: which was generated by executing rake controller TShirtSize
[11:02:17] besson3c: mikecmpbll: a logical deduction, but that's not the case
[11:03:07] mikecmpbll: besson3c: what's the actual error?
[11:03:35] besson3c: mikecmpbll: Mysql2::Error: Table 'healthabacus.diagnoses' doesn't exist: SHOW FULL FIELDS FROM `diagnoses`
[11:03:41] _lazarevsky: mikecmpbll: the url im hitting is http://localhost:3000/api/t_shirt_sizes
[11:03:53] besson3c: mikecmpbll: the new name should be healthabacus.diagnosis
[11:04:20] _lazarevsky: is there no one else around to help? mikecmpbll seems to be overwhelmed.. c'mon you guys..
[11:04:23] mikecmpbll: _lazarevsky: what's the name of the file that contains API::TShirtSizesController
[11:04:49] greenarrow: Have you tried setting the table name inside the model to see if that changes anything self.set_table_name "diagnosis"
[11:05:29] _lazarevsky: mikecmpbll: t_shirt_size_controller.rb
[11:05:55] mikecmpbll: _lazarevsky: it should be t_shirt_sizes_controller.rb
[11:05:58] mikecmpbll: note the plural
[11:06:03] _lazarevsky: I just changed it to sizes
[11:06:06] _lazarevsky: still doesnt work
[11:06:21] mikecmpbll: have you restarted?
[11:06:35] mikecmpbll: i'll assume not.
[11:07:39] _lazarevsky: had to change the underlying controller's filename aswell
[11:07:42] _lazarevsky: mikecmpbll: thanks bru
[11:09:27] besson3c: mikecmpbll: thanks man, one final recreate seems to have fixed the problem...
[11:09:45] besson3c: No it didn't
[11:09:56] mikecmpbll: besson3c: why are you going from diagnoses to diagnosis anyway
[11:10:10] mikecmpbll: diagnoses is the table name that is accurate for Rails.
[11:10:23] besson3c: mikecmpbll: naming consistency
[11:10:37] diegoviola: i have a rails 4 app that is still using attr_accessible in most of the models, but i want to migrate to strong parameters, any ideas how do i go in doing this?
[11:10:46] mikecmpbll: what's the model called?
[11:11:29] besson3c: class Diagnosis < ActiveRecord::Base
[11:11:40] mikecmpbll: that's why it's looking for diagnoses then ...
[11:11:42] diegoviola: any ideas please
[11:11:52] mikecmpbll: unless you have specified the table name explicitly rails will pluralise your model name
[11:12:03] besson3c: mikecmpbll: diagnoses is plural for diagnosis?
[11:12:03] mikecmpbll: "diagnosis".pluralize => "diagnoses"
[11:12:07] mikecmpbll: besson3c: yes.
[11:12:19] besson3c: damn, I feel dumb...
[11:13:08] mikecmpbll: nah it's not so obvious i suppose.
[11:13:30] besson3c: So, should the other tables be named along the lines of diagnosis_groups or diagnoses_groups
[11:13:38] mikecmpbll: diagnoses_groups
[11:13:50] mikecmpbll: if it's a join between diagnoses and groups.
[11:14:18] greenarrow: di??ag??nose
[11:14:18] greenarrow: v. di??ag??nosed, di??ag??nos??ing, di??ag??nos??es
[11:14:59] besson3c: I'm tempted to just recreate all of these tables with their proper names then so I don't have to rename 2094823 things... If I delete all migration files, records in schema_migrations, and all tables and models can I start from scratch with defining stuff?
[11:15:15] besson3c: I'm sure I don't really have to do this, but I'd like to start from scratch for my sanity
[11:15:29] mikecmpbll: sure, if you want.
[11:16:07] besson3c: Okay, perhaps I'll do that tomorrow...
[11:16:31] besson3c: Thanks again for your help, I like Rails, but maybe sometimes it tries to be too smart with its fancy English :)
[11:16:44] mikecmpbll: heh. convention over configuration and all that.
[11:16:56] besson3c: Diagnoses? Would Rails like some tea with that or some shit?
[11:17:08] mikecmpbll: :'D. it's not always that clever
[11:17:56] besson3c: Thanks again, I'm heading out now!
[11:29:37] diegoviola: i'm trying to move some code from attr_accessible to strong parameters, but how can i see what are the values i need to whitelist?
[11:30:16] diegoviola: i mean some are in the model, but i need to do something like: params.require(:classroom).permit(:level, :sublevel, :period)
[11:30:36] diegoviola: any ideas please?
[11:39:22] elaptics: diegoviola: whatever you have in your attr_accessible are what you have whitelisted so they are what need moving to the strong params permit list, and the require will likely be the name of the model assuming you follow the usual rails conventions
[11:40:46] diegoviola: elaptics: ok so i if I have a model that is called Accountant and that has: attr_accessible :crc, :person_id, I need params.require(:accountant).permit(:crc, :person_id) ?
[11:40:59] diegoviola: in the controller
[11:41:27] diegoviola: btw, I tried that but for some reason my capybara tests are failing
[11:41:31] Macaveli: id linkinpark
[11:41:41] elaptics: diegoviola: yes
[11:43:00] diegoviola: any ideas how to debug this if that fails
[11:44:10] Macaveli: favicon_link_tag any idea why this doesn't work in IE8
[11:49:04] alex88: having an n image models, I'm serializing them to the user and checking if it's has been favourited with current_user.favorited_images.include?(i) but that creates multiple queries
[11:49:24] alex88: what should I do? get also current user favorited images in the controller and check against that variable in serialization?
[11:49:36] alex88: or is there a better way to do such matchings?
[11:51:36] tyrone_: I used Rails 4 on another project and now my gems are borked on an existing 3.2.13 project. even though the Gemfile.lock file says to use a different version guard and spork give the following error: You have already activated spork 1.0.0rc4, but your Gemfile requires spork 0.9.2. Prepending `bundle exec` to your command may solve this. But I am using bundle exec guard
[11:51:46] tyrone_: Anyone with ideas welcome
[11:55:07] greenarrow: tyrone_: bundle update?
[11:55:35] workmad3: tyrone_: sounds like your guardfile is forking a spork process without using bundler
[12:02:16] tyrone_: workmad3. I think you are right. spec the command using the cmd option in Guardfile?
[12:02:38] tyrone_: greenarrow, tried a gazillion of those types of options not working
[12:04:08] greenarrow: in your gemfile has you specifying exact version for your gems?
[12:04:34] tyrone_: greenarrow, it isn't using what I see in Gemfile.lock nevermind the Gemfile
[12:04:56] greenarrow: :( No clue then
[12:06:59] tyrone_: Thanks anyway greenarrow I am hopeful on workmad3 's solution.
[12:08:14] elaptics: tyrone_: I assume you have reverted your gemfile.lock after trying bundle update options? Otherwise you're just changing your gem versions anyway
[12:08:16] certainty: also be sure to check out his sudoku solutions
[12:08:53] elaptics: tyrone_: how do you manage your ruby and gems? Do you use rvm or something else? This is one reason why I stick with rvm and use gemsets
[12:09:06] tyrone_: elaptics, indeed I have I run bundle update with much fear and trepidation
[12:09:22] tyrone_: elaptics, I am starting to see the merit of doing os
[12:10:20] tyrone_: elaptics, rbenv nice and simple but seems doesn't take care of such things.
[12:14:55] tyrone_: k thanks workmad3 . I had only had rails 3 projects till wed and hadn't specified the cmd option in the rspec config in my guard file. Now that I have rails 4 and incompatible gems running it revealed the error. Great catch thank you.
[12:23:25] Macaveli: I have the following code for my favicon : <%= favicon_link_tag 'favicon.ico' %> works great in chrome, anyone have an idea how to get it to work in IE8? I think in IE8 he cannot find /assets/favicon.ico
[12:25:46] Squarepy: good question Macaveli, I think one option is to serve it directly with the static webserver (apache) using an alias
[12:25:57] ljarvis: is it possible for a transaction to be aborted due to something other than an exception? (or the db connection failing)
[12:27:09] Macaveli: Squarepy, that works fine if you always have the same icon BUT I have rails admin where users can change the favicon dynamically so it needs to be dynamic
[12:28:17] Squarepy: Macaveli, ok, couldn't you do a internal redirect?
[12:29:13] Macaveli: Funny thing is for testing reasons I change the url to an URL everything works fine
[12:29:15] Macaveli: damn you IE8
[12:30:39] Squarepy: Macaveli, why not overwrite the favicon file when user has selected on, so you can preserve the alias?
[12:36:08] Macaveli: Squarepy, no good, what if they want the standard one
[12:36:36] Squarepy: it is rough of course :)
[13:06:37] guilund: how can we search the de when theres any field blank or nil ?
[13:06:45] guilund: how can we search the de db when theres any field blank or nil ?
[13:07:23] guilund: i need to verify if theres any entry with blank fields, and list them
[13:07:35] rvanlieshout: with any of the attributes blank?
[13:08:05] rvanlieshout: blank or null?
[13:08:05] guilund: something like .where(:all => :blank)
[13:08:21] rvanlieshout: all attributes? or any of the attributes?
[13:08:41] guilund: it has a lot of attributes, i dont know wich one will be blank
[13:08:47] guilund: so i need to check all
[13:08:53] rvanlieshout: so only if ALL attributes are blank?
[13:09:01] rvanlieshout: excluding 'id' i guess
[13:09:04] zelrik: loop over all records and check every attribute for each of them :D
[13:09:16] guilund: i mean, if theres any blank attribute, in all
[13:09:33] guilund: its difficutl to explain in english
[13:10:01] guilund: zelrik: theres any 'rails'
[13:10:02] rvanlieshout: Person.all.select{ |p| p.attributes.values.select{ |value| value.blank? }.present? }
[13:10:05] guilund: zelrik: theres any 'rails' way?
[13:10:15] rvanlieshout: not a clean way, but i'll get you there
[13:10:24] guilund: rvanlieshout: nice, ill try it
[13:10:33] zelrik: I think you can't do a simple query to check that
[13:10:59] zelrik: the code above will loop over all records
[13:11:15] guilund: rvanlieshout: it will return me the attributes that are blank, the select?
[13:11:18] rvanlieshout: zelrik: it does, but if you only need them once
[13:11:22] guilund: i need more a where
[13:11:23] zelrik: there might be a sql query to do it
[13:11:28] zelrik: but no AR method
[13:11:32] rvanlieshout: guilund: it'll return people objects
[13:11:56] guilund: rvanlieshout: let me test it
[13:12:01] rvanlieshout: guilund: you have to build up your where
[13:12:24] zelrik: generally if you have missing records
[13:12:31] zelrik: you want an async task
[13:12:39] zelrik: that loops over them to fix them or so
[13:12:43] guilund: yeah, i think i will have to loop
[13:13:04] rvanlieshout: Person.new.attributes.reject{ |attribute, nothing| attribute == "id" }.map{ |attribute, nothing| "#{attribute} IS NULL" }.join(" OR ")
[13:13:23] zelrik: and if you want something reusable you could just set a bool
[13:13:23] rvanlieshout: Person.new.attributes.reject{ |attribute, nothing| attribute == "id" }.map{ |attribute, nothing| "#{attribute} IS NULL OR #{attribute} = ''" }.join(" OR ")
[13:13:31] zelrik: in the model
[13:13:45] zelrik: 'missing_attributes: true false'
[13:14:21] guilund: missing_Atributes is a rails method?
[13:14:49] guilund: sorry, im a little bit confused, i think i didnt explain what i need the right way
[13:16:01] guilund: i need to check if any of the attributes of an entry is blank, if theres a blank attribute it goes to the Model.where(whatever) result
[13:16:15] guilund: if theres not a blank attribute, it doesnt go to the result
[13:18:55] guilund: http://apidock.com/ruby/Enumerator
[13:19:02] guilund: theres a any? method
[13:20:16] rushed: guilund: you've been given several snippets, what you're asking for is complex (the definition of blank is non-trivial) and (depending on your dataset) potentially a performance issue so the approach to take depends on your situation, you might get better answers if you try some of the code you've been given and if it doesn't work as expected create a gist.github.com with an example case to illustrate what you're trying to do and whe
[13:20:17] rushed: the advice you've been given so far isn't working for you :)
[13:21:01] guilund: rushed: oh, ok thanks
[13:21:24] guilund: i was sharing the any? method :P
[13:21:50] guilund: not asking any method haha
[13:22:02] guilund: its like the who joke
[13:22:23] pontiki: i have a sort of different question: guilund: why do you care? what is important about finding any record where at least one of the attributes is blank/empty/null ?
[13:23:07] guilund: pontiki: a manager of the sys have to check if the forms are properly filled, so i need to check if some attribute is blank, to make a list for the manager in dashboard
[13:23:20] rvanlieshout: shouldn't you validate that in advance
[13:23:24] rvanlieshout: prior to saving these records?
[13:23:53] guilund: rvanlieshout: i cant validate because the guy can leave blank fields, its a form that is filled not in one time
[13:24:04] guilund: it take weeks to check things and fill
[13:24:12] guilund: in the use case
[13:24:14] rvanlieshout: and at what point would you notify the manager?
[13:24:39] guilund: the manager will have access on time to the list, to see which ones are still missing data
[13:24:51] zelrik: guilund, it s not a rails method, it s a bool you add in your model
[13:25:04] zelrik: you can call it foo if you want
[13:25:17] guilund: zelrik: nice
[13:26:04] pontiki: all right, that sounds like a valid use-case
[13:26:19] zelrik: the positive side is that it will make your query very simple and fast
[13:26:30] zelrik: the downside is that it will inflate your table
[13:27:27] zelrik: and that you ll have to write methods to keep track of that attribute
[13:27:29] mupkoo: Hey guys, how can I add permit param key with condition, for example, if current_user.admin?, I want to add one additional field to the list
[13:27:40] pontiki: if your manager doesn't need the dashboard info to be absolutely current, i'd run that query in the background
[13:27:58] rvanlieshout: mupkoo: add if current_user.admin?
[13:28:09] rvanlieshout: just use if and else
[13:28:18] guilund: pontiki: im not very worried about performance because its a sys that will be used for, lets say, 30 people only
[13:28:30] pontiki: guilund: fair enough
[13:29:47] guilund: pontiki: :)
[13:31:07] mupkoo: for now, I have an array, permited = [ :title, :content ], then I add << [ :is_published ] if current_user.admin? and pass it to permit like so: params.require(:news).permit *permited. But I was wondering if there is a better way
[13:31:41] elaptics: mupkoo: that's pretty much how I'd do it
[13:32:17] mupkoo: Thank you :)
[13:32:52] guilund: i will use it @pao_pendente_arr = @pao_pendente.any? { |i| i.attributes { |a| a.blank? } }
[13:33:04] guilund: it return true if theres any blank
[13:33:13] thomasfedb: mupkoo, you can also: `[:a, :b, (:c if condition)]`
[13:33:32] guilund: i just need to loop and check if its true
[13:35:49] elaptics: mupkoo: if you have similar admin special cases everywhere then I'd also plan to split them out into their own objects
[13:36:35] mupkoo: elaptics: what do you mean?
[13:36:44] elaptics: mupkoo: depends on app complexity but something along the lines of pundit might be suitable, https://github.com/elabs/pundit#strong-parameters
[13:39:25] mupkoo: This gem looks like a replacement for CanCan which is the one that I currently use, thank you elaptics
[13:39:50] elaptics: mupkoo: a lot are switching to it from cancan, particularly for new rails 4 apps
[13:39:55] rvanlieshout: punt is awesome
[13:57:26] avril14th: Hello, I get a message W, [2014-01-24T14:53:10.303237 #15809] WARN -- : uninitialized constant Tax when starting rails console but then Tax is recognized. How can I know where the require for tax is ?
[14:09:00] guilund: guys, p.attributes.slice(:id) returns empty, how can i slice attributes?
[14:13:36] rushed: guilund: did you look at p.attributes ? maybe you mean p.attributes.slice('id') ?
[14:14:12] guilund: rushed: it worked, let me see with an array
[14:14:46] guilund: with an array it returns empty
[14:16:24] rvanlieshout: are you still trying to solve that blank thing?
[14:16:47] guilund: rvanlieshout: yeah, im finishing, i resolved, but i need to slice the data
[14:17:04] guilund: of attributes
[14:17:45] guilund: why slice doesnt work with array?
[14:17:52] guilund: it doesnt make sense...
[14:18:07] guilund: it work with 'bla', 'foo', 'bar'
[14:18:16] guilund: but if its an array, dont work
[14:19:10] rushed: guilund: you might get a better answer if you explain what you have & what you want out as opposed to describing fake scenarios that aren't working for you :)
[14:19:30] workmad3: guilund: because '.slice(["id", "foo"])' will slice the hash and give you a hash with the value that has the key ["id", "foo"]
[14:19:44] workmad3: guilund: remember, keys can be arbitrary objects (which include arrays)
[14:20:43] alex88: if I've to fetch n resources, and for each of these resources have also the count of 3 has_many, how should I do that?
[14:21:38] guilund: workmad3: it gives me empty when i use an array
[14:22:29] guilund: workmad3: even if there a value
[14:22:56] workmad3: guilund: need to see code
[14:23:04] guilund: workmad3: https://gist.github.com/glundgren/f5d92613a13de7fac6d9
[14:23:21] workmad3: guilund: right, so it's as I said
[14:23:28] guilund: workmad3: its not final code, im just seeing if it works
[14:23:39] workmad3: guilund: you're trying to slice out the *single* key [big array]
[14:24:06] workmad3: guilund: because an array is a valid thing to have as a hash key, so passing an array in to slice means that
[14:24:18] workmad3: guilund: what you probably meant to do was .slice(*select)
[14:24:31] workmad3: guilund: which will splat the array into a parameter list
[14:24:47] workmad3: guilund: and then .slice will be slicing out multiple keys ;)
[14:25:35] guilund: now it worked
[14:26:27] guilund: so, the * converts an array in a parameter list, like i am writing .whatever('foo', 'bar')
[14:26:32] workmad3: guilund: yup
[14:26:45] workmad3: guilund: rather than .whatever(['foo', 'bar']) (which is not the same)
[14:27:20] guilund: workmad: .whatever(['ee', 'er']) is like the first value of the parameter
[14:27:32] guilund: being an array
[14:27:33] workmad3: guilund: yes, you're passing one parameter there, and it's an array object
[14:27:41] guilund: right, got it!
[14:27:59] workmad3: guilund: which would mean that if whatever was ' def whatever(*args)' then args[0] is an array
[14:28:13] helpa: http://youtu.be/kfVsfOSbJY0
[14:28:18] helpa: tagrudev: Why not try Chinese Food? http://www.youtube.com/watch?v=wWLhrHVySgA
[14:28:18] workmad3: tagrudev: !hungry !!!
[14:28:31] tagrudev: I am hungry and it's Friday
[14:28:56] guilund: rebecca black friday
[14:29:06] guilund: fake discounts
[14:36:25] Criten: Morning rails!
[14:44:33] alex88: having an user, with many images, with many comments, is possible to keep the counter cache of comments in the user?
[14:45:05] rvanlieshout: anything is possible. you could just set the value after commit
[14:49:04] elaptics: alex88: has_many :comments is in the user model or the images model?
[14:49:43] alex88: elaptics: image model, I've to count one level on top of that
[14:51:21] alex88: maybe I'll just hook comment save/destroy and do the count there
[15:10:56] Rhainur: this is more of a question about general app design than anything rails specific
[15:11:12] Rhainur: but I'm trying to make a simple table tennis rating system ( https://github.com/Rhainur/tt/blob/master/db/schema.rb )
[15:11:38] Rhainur: the basic idea is Matches have an odd number of Games (usually best of 3 or 5)
[15:11:56] Rhainur: and I have a page that simply displays a players last 10 matches played
[15:12:24] Rhainur: but it feels like I'm doing a lot of queries for that one page
[15:12:35] Rhainur: just because I have to pull info from so many tables
[15:12:51] Criten: What was that online rails course people on here where talking about earlier this week?
[15:12:58] Criten: My frontend dev wants to get into rails
[15:13:40] csaunders: Rhainur: You can add ".includes" to your query which will pull all that other data in, which should help reduce the number of queries
[15:13:46] AntelopeSalad: Criten: i don't know about earlier this week but the codeschool courses are pretty popular
[15:13:49] Rhainur: that's what I'm using
[15:15:21] elaptics: Criten: if you can be more specific about when it was discussed you can probably find the references to it in the logs
[15:15:37] elaptics: Criten: see topic for logs url
[15:15:49] Criten: elaptics, yeah i could too.. i probably will do that.
[15:15:52] AntelopeSalad: it may have been the edX course too "develop software as a service using rails"
[15:15:53] Criten: completly forgot that was a thing
[15:16:45] Criten: Some girl was here asking about this 8k course she found (in person) and people where suggesting all these online courses for like ~100-200ish
[15:17:05] Criten: She's been through most of the rails for zombies things
[15:17:15] AntelopeSalad: https://www.edx.org/course/uc-berkeleyx/uc-berkeleyx-cs169-1x-software-service-1136 is free
[15:17:45] AntelopeSalad: but i'm not sure i would recommend it, it's too opinionated and didn't really go much into depth at all
[15:17:46] Criten: She doesn't have a huge programming background so allot of the base concepts are kind of foreign
[15:22:10] Criten: Yeah I think she should just go through more stuff on codeschool.
[15:22:16] rdevilla: Is ActionController::TestCase::Behaviour::xhr async?
[15:23:04] AntelopeSalad: Criten: you could always point her to railscasts too, depends on how she learns tho i guess
[15:23:54] Criten: Yeah... railscasts helped me when I first started
[15:24:02] Criten: but i think it's better for specific things
[15:24:12] Criten: Like.. "how to implement X"
[15:25:19] Criten: I started with rails for zombies but it went wayyy to slow for me so i just gave up on it and dove into just figuring out stuff through the API docs
[15:25:20] AntelopeSalad: yeah, after doing 1 or 2 full blown end to end tutorials/courses i think railscasts would become really valuable tho
[15:25:35] Criten: but once again.. I come from a programming background.. so i understand the base concepts haha
[15:25:55] Criten: AntelopeSalad, yeah that's true
[15:26:09] AntelopeSalad: that's what i did to learn rails about 7 months ago but i had prior programming experience too
[15:26:39] Criten: Yeah.. rails is kind of large to just jump head first into
[15:27:02] AntelopeSalad: went through the official introduction guide, then the unofficial twitter clone tutorial, then just jumped into railscasts while reading random blog articles in between
[15:27:32] Criten: Yeah.. I feel like you need to be realy self motivated to do it that way... i'm not sure if she is haha
[15:28:01] workmad3: Criten: get your frontend dev to pair with you/another rails dev
[15:28:24] workmad3: Criten: that'll probably be the best way to get them up to speed with rails ;)
[15:28:25] Criten: workmad3, yeah we've done a bit of that. Maybe that is the route we need to go
[15:28:37] AntelopeSalad: i also went through the codeschool stuff too somewhere in between after someone linked a free 2 day pass here once
[15:29:16] AntelopeSalad: yeah nothing beats being mentored
[15:30:38] AntelopeSalad: Criten: how motivated is she to learn how to program?
[15:31:39] Criten: I think she's motivated enough, just gets frustrated
[15:31:47] workmad3: yeah, that's where pairing can help
[15:31:57] Criten: She's learned a ton of javascript since she started so i know the spark is there
[15:32:15] AntelopeSalad: maybe ask her to take cs50x before doing anything to get a decent foundation
[15:32:27] workmad3: you don't have to stew in frustration when something isn't immediately clear, you can just ask a question to your pair
[15:32:57] Criten: workmad3, yeah, very true.
[15:33:12] alex88: was creating a concern, isn't there a way to just set the action name of the route? instead of the full controller#action?
[15:33:24] alex88: since the controller changes with the resource I attach it into
[15:33:27] andrew9183: yeah, i was lucky to have a ROR mentor for times when I got stuck
[15:33:30] andrew9183: and it was priceless
[15:33:33] workmad3: and pairing with a motivated novice in a teacher/learner situation can be pretty fun for both :)
[15:34:07] workmad3: it gets the teacher to think through stuff they may not have really clarified in their mind, the learner gets to see stuff in-situ straight away and learn through QA and osmosis
[15:34:42] andrew9183: my mentor went far and above their expectations and actually Skype called me to explain important concepts.
[15:35:43] alex88: oh, just use symbol instead of a string
[15:44:29] dethkrieg: Anyone know of a way to convert a array of book hashes: {:title => "Book1", :pages => 121}, {:title => "Book2", :pages => 50} into a comma-separated list of titles: Book1, Book2
[15:44:47] dethkrieg: or do i just have to loop the array/hash and build one?
[15:45:52] rushed: dethkrieg: book_hashs.map{ |b| b[:title] }.join(',')
[15:47:59] dethkrieg: sweet, gonna try it
[15:48:18] andrew9183: that still looks through it :)
[15:48:56] dethkrieg: true, but it's pretty short
[15:49:54] dethkrieg: rushed, you're amazing
[15:50:14] dethkrieg: I tried googling my question and couldn't find that type of function
[15:58:02] guilund: man, i realized a very strange thing, different versions of ruby render the DOM elements in different ways
[15:58:30] guilund: im going to test it later extensively
[15:59:21] rushed: guilund: generally speaking ruby doesn't render dom elements
[15:59:28] guilund: rushed: obviously :P
[15:59:38] guilund: but i assure you it happened
[15:59:49] guilund: i was using ruby 2.0 then i downgrade to 1.9.3
[15:59:58] guilund: and the glithces disappeared
[16:00:09] guilund: maybe its something with the css parser
[16:02:35] dethkrieg: guilund: did you use the same browser both times?
[16:02:56] rushed: guilund: outside of some narrow exceptions browsers render, rails just produces text :) and changing versions means reinstalling all of your gems and tools so it's fairly likely you're misattributing the source of whatever you're seeing :)
[16:02:57] guilund: chrome, same version, same thing
[16:03:39] guilund: rushed: well, maybe it send an extrea header parameter, or the css parse wrond
[16:03:46] rushed: guilund: also, 2.1 is significantly faster then 1.9 at this point so there is almost no reason you would want to downgrade :)
[16:03:48] guilund: i dont know, but it happened :P
[16:03:56] guilund: rushed: active admin
[16:04:19] elaptics: anything is possible if active admin is involved :)
[16:04:26] helpa: talk to epochwolf about ActiveAdmin
[16:05:14] guilund: 0.6.0 is buggy with 2.0, when i update to 0.6.2, everything blows up
[16:05:21] guilund: so i had to downgrade
[16:06:01] rushed: guilund: ah, the roulette problem solving approach, good luck on your next spin :)
[16:06:09] guilund: hahahahaha
[16:06:15] guilund: it was really a roulette
[16:06:15] Criten: active_admin +1
[16:06:19] guilund: i even filled a bug
[16:06:49] guilund: had absolutely no clue what was raising the errors
[16:06:57] guilund: then, in a moment of deep meditation
[16:07:07] guilund: i achieve active admin nirvana
[16:07:13] guilund: and realized what could be
[16:07:34] guilund: "there's no spoon'
[16:07:49] band: Hello. I got stuck at "Getting started with rails" tutorial (http://guides.rubyonrails.org/getting_started.html). I'm getting ActiveModel::ForbiddenAttributesError in PostsController#create error even after I have defined def post_params params.require(:post).permit(:title, :text). Do you have any ideas what am I doing wrong?
[16:08:52] guilund: but really
[16:09:12] guilund: why we dont unite and make a interface framework better than active admin/
[16:09:47] guilund: i use it only because it makes my development faster, mostly because of interface/devise
[16:10:40] Criten: I agree it could be better.. but i don't really have a problem with active admin. It's pretty powerful
[16:11:07] guilund: now i dont have much problem, but the learning curve was hard
[16:11:14] Criten: That's true
[16:11:18] guilund: i can do a lot of things too
[16:11:29] guilund: b ut the lack of docs and debug
[16:11:35] guilund: is the worst
[16:11:43] rushed: guilund: because when you get to the point where you could successfully accomplish that task you've likely also gotten enough experience to realize that generic interfaces don't get you very far?
[16:11:43] Criten: I think it just needs some more contributers
[16:13:20] greengriminal: I have a question regarding rails+angular if anyone here has experience using the both together.
[16:13:31] guilund: rushed: in my case, most of my projects the interface is not very important, basically crud stuff, but i really prefer doing everything, as i do in my personal projects
[16:13:36] elaptics: Criten: I think it should be nuked from a great height :)
[16:13:52] rushed: greengriminal: looks like you mistyped "ember" :P
[16:14:42] band: Can I ask you for assistance?
[16:15:11] helpa: band: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[16:15:11] elaptics: band: !gist your current code
[16:15:40] elaptics: band: gist your controller, model and the specific error you're getting with the full backtrace
[16:17:00] mwlang: I'm following the Rails guide http://guides.rubyonrails.org/testing.html#testing-your-mailers for testing mailers on Rails 4. I've got my mailer configured, an email template and appropriate mailer action, and I've double-checked action_mailer settings on my config/environments files. But nothing at all happens when I call the #deliver method
[16:17:21] mwlang: no errors, nothing printed to log -- nothing.
[16:17:25] mwlang: any clue how to debug?
[16:17:54] macpool: elaptics: are you in today?
[16:18:08] rushed: mwlang: did you restart your environment after making config changes?
[16:18:11] elaptics: macpool: for while :)
[16:18:19] mwlang: rushed: yup
[16:18:20] elaptics: macpool: for a* while :)
[16:18:44] mwlang: guard was nice enough to do that for me, but I restarted guard just to be sure.
[16:18:52] macpool: elaptics, can we continue from yesterday
[16:19:00] mwlang: I've done these mailer tests many times before???.not sure what the heck I could be missing.
[16:19:09] elaptics: macpool: sure, remind me where you are now
[16:19:35] band: There it is. https://gist.github.com/anonymous/0ca492085c1d5c1f5fd1
[16:19:40] rushed: mwlang: how did you confirm you're calling deliver?
[16:20:39] elaptics: band: and is this a fresh rails 4 project?
[16:21:06] band: yes. i'm following this tutorial step by step
[16:21:15] mikecmpbll: don't you have to pass post_params to the new() method
[16:21:19] elaptics: band: you need to reference post_params in line 7 of your controller, not params[:post]
[16:21:21] mikecmpbll: i'm not a strong params user yet so i dunno.
[16:21:36] elaptics: mikecmpbll: congrats you're right :)
[16:21:37] mwlang: rushed: https://gist.github.com/mwlang/8600618
[16:23:00] mikecmpbll: band: the guide actually goes through the exact error message and fix that you're getting: http://guides.rubyonrails.org/getting_started.html#saving-data-in-the-controller
[16:23:41] mikecmpbll: oh, i guess you just didn't see the change there. easily done
[16:23:45] macpool: elaptics: here is the form again for your reference https://gist.github.com/macpool/53422cd53b08bed0c872
[16:24:23] band: I didn't notice that params[:post] has to be changed to post_params. thanks elaptics
[16:25:52] elaptics: band: yes, the point is that you pass the params through strong parameters to filter unwanted data before passing it to the model
[16:26:18] elaptics: macpool: and where are you up to with it now?
[16:27:14] guilund: oh god, asset precompile, the slowest thing on earth
[16:27:23] macpool: elaptics: same as was yesterday
[16:27:53] elaptics: macpool: remind me
[16:28:15] rushed: mwlang: looks right to me, check config.action_mailer.delivery_method = :test in your test.rb maybe? any mail testing gems installed that might be diverting things?
[16:28:21] mikecmpbll: you mean to say you didn't take notes
[16:29:29] macpool: elaptics: form not showing any error message and email getting delevered twice
[16:29:36] mwlang: rushed: :test is confirmed in the environment file for test. It doesn't work in the app itself, either, so not likely a gem???although, come to think of it, I just installed better_errors gem (which is relatively new to me)
[16:31:53] elaptics: macpool: did we establish if it was a successful request you see the message sent successfully message?
[16:32:22] elaptics: macpool: iirc you were getting an explicit rails error on the failure branch?
[16:32:44] bufferloss: so I've done a bit of googling and so far haven't found specific docs on making new form input types, ala things that go in app/inputs/my_custom_checkboxes.rb for example
[16:32:46] macpool: elaptics: http://cl.ly/image/2l0Q0V3S3o0V
[16:32:48] bufferloss: where do I find the docs for that?
[16:33:14] mwlang: the baffling thing to me is that its just silently swallowed. I don't even know where to begin to look to see where I can uncover what's happening.
[16:33:20] rushed: bufferloss: what form helper are you using?
[16:34:21] elaptics: bufferloss: are you talking about simple_form
[16:34:59] elaptics: macpool: is that what you get for the failure or success, or both?
[16:35:48] macpool: elaptics: both
[16:36:06] mwlang: bufferloss: I thought I knew where as I built some custom inputs myself, but after googling, I realized I just went into the Rails form builder code directly and looked at how the standard helpers were built.
[16:36:26] macpool: now the form is not subitting at all
[16:37:45] bufferloss: mwlang: yeah that's probably what I'll do, I guess I was hoping for something like guides.rubyonrails.org but it doesn't have anything on this topic
[16:38:00] bufferloss: and I haven't found specific mention of the app/inputs folder except in the documentation for simple_form
[16:38:18] greengriminal: rushed: :P I am sure I typed angular ;)
[16:39:03] rushed: bufferloss: you might check out simple_form http://railscasts.com/episodes/234-simple-form and then https://github.com/plataformatec/simple_form/wiki/Adding-custom-input-components https://github.com/plataformatec/simple_form/wiki/Adding-custom-components etc...
[16:39:44] bufferloss: rushed: yeah that's what I'm using already, but I hadn't found the wiki yet, thanks
[16:40:06] elaptics: macpool: you should be getting an error backtrace in your logs then
[16:40:20] elaptics: macpool: that'll tell you where the error is - suggests in your ruby code
[16:40:29] rushed: greengriminal: ah, your mistake then :)
[16:40:54] bookies: i am trying to input a variable in the middle of a string. like that: elsif current_user
[16:40:55] bookies: return "Enquiries - " + current_user.username +" - AwesomeWeb"
[16:41:01] mwlang: bufferloss: formtastic also has some info on custom inputs: https://github.com/justinfrench/formtastic#modified--custom-inputs
[16:41:06] bookies: is this possible in ruby?
[16:41:22] greengriminal: rushed: i take it you've used ember+rails then
[16:41:26] dpdawson: can anyone tell me why this is not working? it's my first time messing around with a JSON API in rails. http://pastie.org/8664109
[16:41:58] mwlang: bookies: http://ruby-doc.org/core-2.1.0/String.html#method-i-insert
[16:42:10] ljarvis: dpdawson: 'not working' isn't extremely informative
[16:42:16] macpool: elaptics: i've got it working again. its now delivering the email
[16:43:34] macpool: elaptics: error log https://gist.github.com/macpool/1c1d939b6c9b4260111b
[16:44:00] evenix: Ho do I force radio_tag to use an id without the sanitize methods
[16:44:12] evenix: I tried to overwrite the method but the id
[16:44:28] evenix: is still "#{name} #{value}"
[16:45:07] evenix: "id" => "#{sanitize_to_id(name)}_#{sanitize_to_id(value)}"
[16:45:35] elaptics: macpool: so you have fixed that error you've just posted the logs for?
[16:46:08] macpool: elaptics: nope..
[16:46:27] elaptics: macpool: so how do you have it working then?
[16:46:44] dpdawson: As in it won't save the User
[16:46:48] mwlang: Hmmm???messing around at console???I see this: MainMailer.event_registration(er)
[16:46:49] mwlang: => #<ActionMailer::Base::NullMail:0x007fc11cbe3108>
[16:46:57] mikecmpbll: dpdawson: you're not saving the user anywhere in that code
[16:47:08] mwlang: Does NullMail mean nothing will happen on calling deliver?
[16:47:10] dpdawson: I do right after, sorry
[16:47:20] dpdawson: cut one line
[16:47:29] mikecmpbll: post your actual code
[16:47:54] brain_shim: bookies: "Enquiries - #{current_user.user_name} - AwesomeWeb" It's called string interpolation.
[16:48:08] bookies: cheers i found out just now. thanks :)
[16:48:28] mwlang: what gem is ActionMailer part of?
[16:49:58] macpool: elaptics: the error log is of form not showing any error message
[16:50:10] macpool: on failure to send
[16:50:46] droptone: question: We're interseted in our users being able to set a vanity URL for their profile, any suggestions on a specify gem to assist with this?
[16:50:49] droptone: or an article outlying it?
[16:50:55] dpdawson: mikecmpbll, nevermind... I'm an idiot.
[16:51:00] mikecmpbll: dpdawson: oh right
[16:51:09] dpdawson: did you see it?
[16:51:39] dpdawson: password was too short...
[16:52:20] mikecmpbll: well, you didn't show us your user model so there was no way i could've seen that
[16:53:00] elaptics: macpool: ok, well as the error says it's that error_messages_for method causing the problem - what is this? What are you trying to do here?
[16:53:27] dpdawson: because it was devise
[16:53:33] macpool: elaptics: i tried to submit empty form
[16:53:38] dpdawson: that's why I didn't even think about it
[16:53:40] mikecmpbll: the plot thickens.
[16:54:25] elaptics: macpool: no, I mean the code that's causing the error - what is that error_messages_for method? It's not defined so what do you think you're doing - i.e. where did this code come from?
[16:55:20] elaptics: droptone: add a field for this in your users table and add a unique validation and index on it - why would you need a gem for this?
[16:55:42] elaptics: droptone: just parameterize the input before storing it so that you can be sure it's fine in a url
[16:57:09] macpool: elaptics: might have come form here https://gist.github.com/macpool/53422cd53b08bed0c872#file-create-js-erb
[16:58:27] evenix: lol neverr mind i figured it out
[16:59:03] elaptics: macpool: that is what I am saying - it is exactly from this line https://gist.github.com/macpool/53422cd53b08bed0c872#file-create-js-erb-L4 - I am asking what is that error_messages_for method - is this something you have written. It is not being recognised here in this context
[17:01:19] macpool: elaptics: i was trying to get the error displayed
[17:01:27] macpool: whats the correct cide?
[17:01:56] elaptics: macpool: what version of rails is it?
[17:04:03] elaptics: macpool: error_messages_for was from rails 2 - think it was removed in rails 3
[17:05:01] elaptics: macpool: it's up to you now how you deal with the errors. You just need to iterate through @shopper.errors creating the markup you want
[17:05:37] elaptics: macpool: usually you'd want to put the errors in the form and so on that line in your create.js.erb you'd render the form partial
[17:07:05] macpool: elaptics: please help me get it sorted out
[17:11:06] benlieb: how do I get my rails app to find gems on a shared host. It looks as though the env vars are "taking". Is this set in a passenger or apache config file? and if so, how can configure my app to look in the right spot, i.e. the one listed in gem env
[17:11:21] elaptics: macpool: I suggest you read http://www.alfajango.com/blog/rails-3-remote-links-and-forms/ and http://www.alfajango.com/blog/rails-3-remote-links-and-forms-data-type-with-jquery/ to understand what's going on and the process involved
[17:11:22] benlieb: env vars are *not* taking
[17:11:24] mwlang: alright, digging further into ActionMailer, I'm somehow ending up with NullMail which I just found really does do nothing, so my #deliver call just simply returns nil.
[17:11:43] mwlang: The question is, why isn't a real mailer getting instantiated.
[17:12:05] elaptics: macpool: part 2 ends with a worked example for what you're trying to do
[17:12:28] mwlang: I've added my Gemfile and test.rb configuration file to the gist (along with the model and rspec test) https://gist.github.com/mwlang/8600618
[17:17:20] benlieb: Is there a way to add another place to find gems in a rails app?
[17:17:31] benlieb: And where would I do that?
[17:19:21] mwlang: benlieb: your best bet may be to read through the bundler docs: http://bundler.io/
[17:20:34] benlieb: mwlang: that would talk about how rails looks for gem? I'm forced to be on a shared host, and passenger is seems to be looking for gems in the system dir. If I bundle into vendor, all works but I don't want to have to do that every time.
[17:20:55] Jacky: benlieb: bundling into vendor is a good practice
[17:21:17] Jacky: forces your app to use the specific version of gems you have so nothing acts crazy in production
[17:21:26] mwlang: benlieb: if you automate it with capistrano, it should be a breeze
[17:21:50] benlieb: Jacky: I can sometimes deploy 10 + a day, and that's just a lot of waiting...
[17:24:33] Jacky: better safe than shit outta luck
[17:24:38] mwlang: benlieb: capistrano has some helpers that would allow you to clone "current" then update, so you don't have to rebuild every gem when bundling into vendor
[17:27:38] antoine: hello, i'm new to rails (or ruby), I'm getting a response from Net::LDAP as #<OpenStruct code=0, error_message="", matched_dn="", message="Success"> , trying to check the status with @ldap.get_operation_result.code == 0 or @ldap.get_operation_result.message == "Success" but it fails (does not execute if) , what am I doing wrong ?
[17:28:23] brendan6: antoine: You'll have to create a gist so we can see more
[17:30:10] antoine: brendan6, http://pastebin.ubuntu.com/6809484/
[17:31:52] elaptics: benlieb: fairly sure that the default capistrano bundler tasks create a bundler cache for the gems and point it to that so it only takes longer when there's new gems to install or update
[17:33:05] benlieb: elaptics: I don't know if I'm running the capistrano bundler task. Is this run automatically?
[17:33:49] elaptics: benlieb: do you have require "bundler/capistrano" at or near the top of your deploy.rb file?
[17:34:14] benlieb: elaptics: no
[17:34:18] benlieb: what will that do?
[17:34:53] elaptics: benlieb: it'll add and use the tasks to let capistrano deal with bundler and the gems
[17:35:19] elaptics: benlieb: http://bundler.io/v1.5/deploying.html
[17:36:17] elaptics: benlieb: it bundles them into the shared directory rather than vendor/bundle
[17:36:35] benlieb: lemme try that...
[17:36:41] elaptics: you'll find a shared/bundle directory afterwards
[17:37:02] antoine: elaptics, can you please help me ?
[17:37:20] elaptics: benlieb: basically it does what Jacky said but keeps it in shared rather than into the app itself which effectively is blown away each deploy
[17:38:02] elaptics: antoine: not without a lot more information on your situation but I have to go in a sec
[17:38:19] antoine: elaptics, if I'm getting #<OpenStruct code=0, error_message="", matched_dn="", message="Success"> from Net::LDAP as @ldap.get_operation_result , if @ldap.get_operation_result.code == 0 does not work, 0:Fixnum when inspecting the code
[17:39:50] benlieb: adding that line to my deploy file gets error
[17:40:17] benlieb: undefined method `instance' for Capistrano::Configuration:Class
[17:40:26] elaptics: antoine: what does not work - you're not getting to the redirect_to on line 18?
[17:40:49] antoine: just getting to raise
[17:41:00] elaptics: antoine: is that a controller action you've pasted?
[17:41:32] antoine: I just need it to raise anything but in the "if" , not outside :)
[17:41:45] elaptics: antoine: well you'd need to do redirect_to(???) and return if you want to end there
[17:42:14] elaptics: antoine: and why not do an if, else then?
[17:42:22] antoine: but in all cases it goes to raise skipping the if , inspecting results #<OpenStruct code=0, error_message="", matched_dn="", message="Success">
[17:43:03] antoine: shouldn't the redirect take over the raise if it came first ? I thought this is how interpreters work
[17:43:06] antoine: let me try
[17:43:19] elaptics: antoine: no, it's not how the controller actions work
[17:44:17] antoine: damn, you're right, in other languages it does, for example PHP, header takes over throw new exception if header came before in code
[17:44:22] antoine: thanks elaptics
[17:45:57] elaptics: antoine: read the docs here http://api.rubyonrails.org/classes/ActionController/Base.html
[17:46:08] elaptics: antoine: see last bit about calling multiple reidrects or renders
[17:46:18] antoine: sure thanks
[17:48:07] macpool: elaptics: your help needed
[17:48:41] antoine: elaptics, thanks a lot I was missing the "and return if <>.nil?" thing
[17:50:11] Jacky: What's a recommended searching tool for Rails? (elasticsearch, sphinx and the likes)
[17:52:18] brain_shim: What's your db, and what kind of searching do you want to do?
[17:52:33] pipecloud: Jacky: I like elasticsearch
[17:52:48] Jacky: I'm leaning towards them
[17:53:00] Jacky: brain_shim: postgresql and full-text mainly
[17:54:41] brain_shim: Jacky: I haven't used it, but https://github.com/Casecommons/pg_search looks interesting.
[17:56:56] Jacky: brain_shim: indeed
[17:57:00] Jacky: I'll try it out
[17:57:09] Jacky: I'm not 100% sure if I even need elasticsearch atm
[17:57:25] Jacky: I'd assume things like Elastic would only be needed at "scale"
[17:58:13] macpool: I need a ajax contact form. can someone do it?
[17:58:26] Jacky: macpool: you can
[17:58:41] macpool: trying for two days
[17:58:53] Jacky: no one's going to do it *for* you
[17:59:03] Jacky: but point you in the necessary directions; sure
[17:59:03] macpool: but not able to get it working
[17:59:19] Jacky: macpool: mind pasting what you have so far?
[17:59:28] Jacky: ACTION sighs
[18:00:44] macpool: Jacky: this is the form https://gist.github.com/macpool/53422cd53b08bed0c872
[18:01:12] macpool: I am not able to get the error message displayed
[18:01:30] macpool: here is the error log https://gist.github.com/macpool/1c1d939b6c9b4260111b
[18:04:26] brain_shim: the salient part is: undefined method `error_messages_for'
[18:04:50] brain_shim: It looks like you might be using a depricated method http://www.suffix.be/blog/error-messages-for-rails3
[18:05:36] smathy: Not just deprecated, removed now.
[18:05:42] smathy: (for a while)
[18:06:52] brain_shim: macpool: Are you maybe copy-pasting from an old tutorial?
[18:07:21] brain_shim: macpool: Spree has been around for ages. You might have hit some out of date information.
[18:07:23] Jacky: looks like it
[18:08:25] macpool: brain_shim: tried to create the js file from a tutorial
[18:08:32] Jacky: pipecloud: looking at http://www.elasticsearch.org/overview/, I think I might use it first
[18:08:55] mwlang: four hours later, I finally figure out why my emails aren't going out ???. wait for it???. forgot the last line of code needed in the mailer actions: mail(to: @recipients, from: @from, subject: @subject, body: @body)
[18:09:44] mwlang: D-OH! maybe ActionMailer needs to be enhanced to throw a NoRender or NoMail error like controller actions do for render/redirect
[18:11:37] mwlang: need to go find a rock to crawl under and a beer to nurse
[18:12:22] brain_shim: ACTION claps
[18:12:56] mwlang: hey! who turned out the lights!?
[18:13:38] brendan6: Does anybody know of a way to have accepts_nested_attributes_for use a _type attribute to build the appropriate model? (One base model with many subclasses all stored in an single embedded_in with mongoid)
[18:17:05] brain_shim: brendan6: You talking like, type coercion or something? https://github.com/solnic/virtus
[18:18:31] codezomb: I have the situation of an ember front end app, and a rails backed api. The api handles invitations, and sending an invitation email. This works fine in development, but in a production situation, I need the link in the email to be that of the front end client. I was thinking having the client submit a url along with the invitation request, but I thought I'd get some other opinions on the matter. Any recommendations for
[18:18:31] codezomb: handling something like this?
[18:20:07] brendan6: brain_shim: No, not exactly. There is one Base class that has many descendants. One or more of the decendants will be stored in an embeds_many relationship. However, I need some way of specifying which subclass to build when using accepts_nested_attributes_for
[18:22:13] brain_shim: brendan6: What in particular about accepts_nested_attributes_for is tripping you up?
[18:23:31] brain_shim: brendan6: You could flatten up that form with a form model https://github.com/phildionne/associates
[18:25:06] brain_shim: I hate how accepts_nested_attributes_for does makes me compose my strong_parameters, associates is a nice respite from that pattern.
[18:28:26] brendan6: brain_shim: An example of what I'm trying to achieve https://gist.github.com/HuffMoody/8603152
[18:29:02] brendan6: brain_shim: I'm going to look into associates to see if that will solve the problem
[18:33:47] antoine: brendan6, what does this mean ? ActionDispatch::Request::Session:0x7fac3e55e578 not yet loaded , how can I auto load session before all my controllers
[18:35:44] kaldrenon: Is there a better (more ruby-esque) way to do descending order in a query than Model.order('rowname desc') ? I'm having trouble finding a syntax using symbols or methods
[18:39:18] centrx: kaldrenon, http://api.rubyonrails.org/classes/ActiveRecord/QueryMethods.html#method-i-order
[18:39:39] brain_shim: brendan6: It looks like associates is ActiveRecord only. Maybe try using the value of ark_params[:_type] to do what you want to do before it saves?
[18:40:00] kaldrenon: centrx: Thanks!
[18:44:11] brendan6: brain_shim: The _type field is on the nested attributes so it would be more like params[:animals_attributes][0][:_type]. But I have actually found a solution using include Mongoid::Attributes::Dynamic and allowing the _type parameter to be passed in. Mongoid uses the _type field internally so it knows how to build the appropriate model on read
[18:44:11] shinobi_one: What free project management systems do you guys recommend? i'm leaning toward Redmine, but I just discovered GitLab as well
[18:49:23] centrx: shinobi_one, I have used JIRA it was pretty good. I have not used the two you mentioned.
[18:49:45] shinobi_one: centrx: JIRA isn't free
[18:50:03] shinobi_one: thanks though :)
[18:52:39] kaldrenon: shinobi_one: Team, or individual?
[18:52:49] shinobi_one: kaldrenon: team
[18:53:29] kaldrenon: shinobi_one: Darn - had a good recommendation but it's only free for individual (thought it was free for up to 5, but I was wrong =\)
[18:53:58] shinobi_one: kaldrenon: so far Redmine and GitLab both look good, both are Rails apps :P
[18:55:04] kaldrenon: Redmine is pretty solid. Has its quirks, and last time I tried setting it up I found the process a little hairy, but once it's running, it's solid.
[18:55:15] kaldrenon: Have not used GitLab
[18:55:56] shinobi_one: GitLab basically looks a lot like github lol
[18:57:54] TheMoonMaster: shinobi_one: It's a github clone for the most part.
[18:57:55] Gabriel403: I'm developing an app that I want to release as opensource, and it's also an app we'd use, so how would we handle things like newrelic licence keys, logger keys and prevent them from going into the public vcs, would our only option to maintain 2 repos? one sanitised and one private? Or should we put all our keys as env variables being pushed into the app by apache? And other people just choose not to set those env cars if they don't use em?
[18:58:14] shinobi_one: TheMoonMaster: appears that way, looks like github on bootstrap lol
[18:58:23] TheMoonMaster: Gabriel403: env or capistrano shared folder on servers.
[18:58:41] TheMoonMaster: Just scrub out the info in git history if you have it
[18:59:01] Gabriel403: Yeh, I was thinking env vars would be the easiest
[18:59:10] TheMoonMaster: shinobi_one: Yeah, not a fan of it. That's why I started writing Ember + Rails pm app since Redmine isn't great and gitlab is just ugly github
[19:00:07] shinobi_one: TheMoonMaster: oh really? open source?
[19:00:22] Jacky: github uses bootstrap
[19:00:51] TheMoonMaster: shinobi_one: Yes and yes, it's not very far into it yet though.
[19:01:02] centrx: bootstrap does not use semicolons
[19:01:17] TheMoonMaster: I just have logins, projects, and issues going, no issue view yet.
[19:01:27] TheMoonMaster: So it's way early in the project.
[19:04:20] shinobi_one: i just need to get away from svn + trac, so honestly git + whatever will work at this point lol
[19:06:28] mwlang: does anyone know if "transaction" is reserved or "sensitive" in Rails before I got down the road of generating a Transaction model
[19:07:38] centrx: mwlang, It is used a lot in the ActiveRecord code, so I would avoid it
[19:08:26] mwlang: that's what my gut is telling me, too???trouble is, I'm mentally blocked on the word???need another. :-p
[19:09:00] TheMoonMaster: mwlang: I want to say I've used a project with a Transaction model in the past with 0 issues
[19:09:36] shinobi_one: I can't imagine there would be an issue using a model named "Transaction"
[19:09:37] TheMoonMaster: But we might have called it something different. mwlang Think about adding a prefix
[19:09:40] TheMoonMaster: Like PaymentTransaction
[19:09:48] shinobi_one: ^ but something more specific could be better
[19:10:51] mwlang: I'd call it TickerTapeRibbon, but boy that sure sounds arcane
[19:11:06] terrellt: I'm seeing schema_migration tables without a primary key. Does that make sense?
[19:11:14] bricker`away: terrellt: yes
[19:11:14] mwlang: recording membership renewals, reservations, credits, and refunds
[19:12:01] bricker`work: terrellt: It's just not part of the schema file. Rails handles the primary key under the hood.
[19:12:03] TheMoonMaster: mwlang: Yeah, I'd see that and go wtf
[19:12:24] terrellt: bricker`work: No, the generated table doesn't have one.
[19:12:31] terrellt: It has a unique key...
[19:12:39] mwlang: Gosh. "Intercourse" is a synonym for "transaction"
[19:13:04] centrx: shinobi_one, Model.transaction is already a method
[19:13:14] mwlang: Activity seems to be a decent one.
[19:13:22] kaldrenon: mwlang: A transaction in this case is a single action or event? Could you call it TransactionEvent or similar?
[19:13:42] mwlang: monetary exchange event, essentially.
[19:13:45] shinobi_one: mwlang: I really think you should call it Intercourse ;)
[19:13:56] kaldrenon: Or, of it's associated with a client/customer/etc call it AccountTransaction or CustomerTransaction, etc
[19:14:02] TheMoonMaster: PaymentTransaction is still the most understandable imo
[19:14:12] TheMoonMaster: Account, or customer is equally as good
[19:14:19] mwlang: shinobi_one: and if I get done early because of no name collisions, I can go home and have transaction with my wife. :-D
[19:14:42] mwlang: (heh, sounded funnier in my head)
[19:15:00] Trudko: Guys I am dealing with little bug in my app. Basicly there is some weird stuff stored in my db and I am courious hwo to find out how did it got there. I am checking the production logs and if the value was set through app(by saving model) it HAS to be in production logs right?
[19:15:09] shinobi_one: mwlang: sounds like a good plan
[19:15:57] mwlang: Trudko: depends on the specific field and whether its marked "[FILTERED]"
[19:16:13] mwlang: masked*, I should say...
[19:16:38] Trudko: what do you mean by masked field?
[19:18:17] Rhainur: I can't get checkbox acceptance validation to work
[19:18:41] Rhainur: and I feel like I'm misunderstanding the rails "under-the-hood" magic
[19:19:15] Rhainur: does it check if the POST parameter exists or something?
[19:20:00] csaunders: Trudko, mwlang: I think he means where sensitive data isn't logged
[19:20:05] csaunders: like a password or credit card number
[19:20:16] Trudko: ou it is usual integer number
[19:20:31] mwlang: Trudko: config.filter_parameters << :password for example
[19:20:56] Trudko: i see no that isnt the case for sure it is simple integer value
[19:22:30] mwlang: if logs are rotated or you deploy and wipe the logs, then that would be other scenarios where you wouldn't find the values in the logs
[19:38:29] Rhainur: in rails 4, how can I make attributes in a model that won't be saved to the database?
[19:38:53] rushed: Rhainur: the model won't be saved, or the attributes?
[19:39:03] Rhainur: the attribute
[19:39:10] rushed: Rhainur: attr_accessor
[19:39:18] Rhainur: that seems to be for earlier rails versions
[19:39:37] rushed: Rhainur: why do you say that?
[19:39:48] Rhainur: mixing it up with attr_accessible
[19:39:54] shinobi_one: Rhainur: you want virtual attributes you mean?
[19:42:45] Rhainur: rushed: attr_accessor does what I wanted, thanks
[19:45:24] rhizome: Trudko: it may not be in the logs
[19:46:51] droptone: question: I'm interesting in providing users the ability to set vanity URLs
[19:47:07] droptone: can anyone point me towards a gem or a tutorial that explains that functionality?
[19:48:06] rhizome: what have you looked for so far?
[19:48:39] droptone: what have I looked for so far.
[19:49:04] droptone: Well, I've used Google and found several articles on vanity URLs, but none are approaching the practice in a facebook-like manner.
[19:49:17] droptone: Where a user can set a vanity URL a single time, and once set, it becomes mydomain.com/vanityurl
[19:50:14] droptone: bricker`work: I'm sorry, come again?
[19:50:24] bricker`work: 1. Add a "slug" attribute to your table. 2. Add a controller which handles that route, and look up a record by the slug.
[19:50:25] rhizome: droptone: right. what's the complication you're finding?
[19:50:32] rhizome: and yes, that.
[19:51:49] droptone: bricker`work: interesting, ok, thank you.
[19:54:09] bricker`work: *you're* interesting.
[19:54:38] droptone: I'm interesting?
[19:54:53] bricker`work: not anymore sorry. lost your charm.
[19:54:54] droptone: That's flattering of you to say, but I don't know that I'm very interesting.
[19:55:12] droptone: We'll always have the memories!
[19:58:58] centrx: "droptone> question: I'm interesting..."
[19:59:32] maximski: is there a way to disable sti for specific child models?
[20:01:17] rhizome: sure, don't have them inherit from another model
[20:04:03] maximski: but then my code will not be following dry concept as i need to use almost the same characteristics on both models
[20:04:58] rhizome: so why do you want to disable that inheritance?
[20:05:12] rhizome: you have conflicting goals
[20:06:19] maximski: because the child class is not particularly the same and isn't treated like the superclass. it just has the same attributes.
[20:06:23] maximski: no i don't think so
[20:08:16] maximski: in short: i have Item, which is superclass for Script and Theme. i'm using sti there and it's fine. now i want to create versions for Item, so all Versions basically are the same as an Item, though they are completely encapsuled from the rest of the system
[20:10:12] maximski: so i also don't want to waste place for Version in the same table as for Items. Versions shall have an own table, that's why i'd like to disable sti here
[20:11:12] lifestream: Can anyone recommend a tutorial for a very, *very* simple user authentication system? Something I can do on my own instead of installing a gem like devise. Easier than Hart's Railstutorial.org. I want to learn more but I don't have a lot of attention span right now
[20:11:33] rhizome: i may be an idiot, but that seems like a bad use of STI. are you just tracking URLs of scripts/themes/etc.?
[20:11:58] rhizome: because otherwise there doesn't seem to be too much overlap between the concepts
[20:12:06] maximski: lifestream: http://railscasts.com/episodes/250-authentication-from-scratch-revised
[20:12:15] rhizome: lifestream: has_secure_password
[20:12:16] rushed: maximski: if versions are old copies of things you might consider https://github.com/airblade/paper_trail
[20:13:00] maximski: rushed: versions are updates for items, so paper trail won't work.
[20:13:27] maximski: rhizome: what do you mean by "just tracking" ?
[20:14:04] rhizome: sorry, persisting. item is basically a simple model storing filename or url or something?
[20:14:14] maximski: it's an ecommerce system, items in general are more complicated than just tracking urls
[20:15:18] rhizome: well i'm not going to just sit here and guess all day. so people are buying scripts and themes...
[20:16:01] tubbo: maximski: why don't you just mix in the code you need instead of using inheritance?
[20:16:13] maximski: rhizome: i don't see which information you are asking for exactly otherwise i would have told you exactly
[20:17:17] maximski: tubbo: you mean using a module as a mixin? that's what I'm going to do if i don't find a prettier solution :)
[20:17:36] tubbo: maximski: do you define "pretty" as "unnecessarily complicated"? ;)
[20:17:57] tubbo: maximski: yeah, using modules is kinda what you want here. especially if you wish to keep both scripts and themes using different tables.
[20:18:03] rhizome: i'm thinking your modeling is goofy, but a module might be the best way
[20:18:14] tubbo: maximski: which they should be using, imho
[20:18:15] maximski: i hoped there would be some single line which would tell the model to use a specific table instead the parent model table
[20:18:26] tubbo: maximski: there is, you just have to find it on your own.
[20:18:31] rhizome: so you just get the methods? that's what a module does for you
[20:18:32] tubbo: maximski: because that's bad practice.
[20:19:00] rhizome: or at least can do
[20:19:07] tubbo: i just don't understand why you're so adamant about shoehorning in classical inheritance when object composition would work for you and is much easier to reason about..
[20:19:27] maximski: it's about the validation, too
[20:19:42] droptone: do any of you fine gentlemen have a recommendation on a gem or helper of some sort for playing mp3s on a Rails 3.2.x website?
[20:19:57] tubbo: droptone: i like jPlayer
[20:20:03] droptone: there's a simple_audioplayer gem, but it's about a year old, not many commits.
[20:20:10] droptone: tubbo: thank you, yes.
[20:20:21] tubbo: maximski: if you use AS::Concern you have a really nice DSL for adding validations
[20:21:58] bricker`work: droptone: Use the HTML <audio> tag.
[20:22:24] rhizome: was just looking at the styling options for <audio>, i wonder how that is cross-browser
[20:22:55] tubbo: maximski: check this out, https://gist.github.com/tubbo/18b23f50c3c25ae61cff
[20:26:01] maximski: okay, that looks cool :)
[20:26:12] maximski: thank you all guys and tubbo for scribbling that up :)
[20:39:48] pwz2000: I am getting a NoMethoderror at /searches `undefined method `search_for_zipcodes' ` https://gist.github.com/pwz2k/8605840 . My code works when I use the search_for_ids method to avoid instantiating unnecessary location objects. However when I make the switch from location id to zip codes I get that error. Can someone point me in the right direction for this small fix? I am making the change because I do not want to have to set the
[20:39:48] pwz2000: location id on the Users table, and would rather stick with the zip codes which can be found on both of the tables.
[20:43:00] benlieb: New to rspec. Getting undefined method `has_tag?' for this: response.should have_tag("li#nav-li-membership.active")
[20:43:20] bricker`work: benlieb: that won't work in a controller spec
[20:43:28] bricker`work: benlieb: it might work in a request spec, using capybara
[20:43:35] bricker`work: or a feature spec, they call it now
[20:43:37] benlieb: where would has_tag come from? I'm upgrading an older app, and I assume this used to work fine
[20:43:43] bricker`work: benlieb: probably capybara
[20:44:22] benlieb: bricker`work: so what do you recommend here?
[20:44:41] benlieb: make a new spec?
[20:45:12] bricker`work: benlieb: if you upgraded from capybara 1 to capybara 2, you need to rename your requests directory to features, I think
[20:45:19] Malgorath: Hi I played with RoR last year a bit but never got to deep into it. Pretty much forgot most of it I think. Was wondering is it better to start with 4.0.2 or 3.1.12?
[20:45:30] bricker`work: Malgorath: 4.0.2
[20:45:36] benlieb: bricker`work: this is in a controller spec
[20:45:51] rushed: Malgorath: 4.1.0.beta1
[20:45:54] bricker`work: benlieb: then you shouldn't be testing the DOM
[20:46:14] benlieb: bricker`work: it's an old app that I've been given to rewrite
[20:46:27] bricker`work: benlieb: move that test into a feature spec
[20:46:35] bricker`work: benlieb: under spec/features
[20:46:45] Malgorath: rushed, are betas a good idea to learn from?
[20:46:51] Criten: Someone give me something to listen to
[20:47:01] bricker`work: Criten: Amelie soundtrack by Yann Tiersen
[20:47:12] helpa: http://i.imgur.com/m9m3wr9.gif
[20:47:25] rushed: Malgorath: skate to where the puck is going to be, also does the beta label matter if people are using it in production?
[20:47:44] Malgorath: oh wow, people are using it in production ... okay then
[20:47:54] bricker`work: Malgorath: Basecamp is
[20:48:16] Criten: bricker`work, do you know if that's on spotify by any chance?
[20:48:21] bricker`work: Criten: definitely
[20:49:12] pipecloud: Malgorath: Betas aren't good for stability. But if you're willing to live near the edge, it's fun.
[20:49:26] nickmarx: Is there a reason a model wouldn't be able to save on a heroku worker process when it works fine locally? I can read from other models no problem
[20:49:28] Criten: bricker`work, hmm.. I found Yan Tiersen...
[20:49:58] Malgorath: pipecloud, I'm trying to learn something to redo my small business database in besides php.
[20:50:03] nickmarx: The table exists and can be accessed/saved on from the command line interface
[20:50:06] pipecloud: Malgorath: fun.
[20:53:36] nickmarx: I've tried a bunch of ways to get info from the call to save but cant seem to get anything
[20:53:55] bricker`work: Criten: http://open.spotify.com/album/6hzdQgjn3wTJhOUI4cVKu2
[20:55:06] Criten: bricker`work, WOW
[20:55:10] Criten: the 4th song
[20:55:16] Criten: my friend plays this on piano haha
[20:55:21] Criten: small world
[20:55:36] Criten: (i found it before you sent the link.. sorry)
[20:55:46] momomomomo: Afternoon all :O
[20:55:50] benlieb: bricker`work: i would like to move the have_tag to a feature at some point, that is best. but i'd like to get this work in the controller specs for now if possible, and swap them out later. Any suggestions?
[20:56:51] bricker`work: benlieb: try have_selector instead, might work
[20:57:29] benlieb: bricker`work: is that a rspec method or something else?
[20:59:38] bricker`work: capybara probably, I don't know
[20:59:53] bricker`work: benlieb: you have google, right?
[21:04:08] droptone: Any of you guys work with friendly_id much?
[21:07:12] rhizome: just ask your question. if someone knows and wants to help, they will answer.
[21:07:39] droptone: According to the documentation, friendly_id still prepends the model in the URL, such as, if you're using friendly_id with the user model, then the URL will end up mydomain.com/users/joe
[21:08:14] droptone: I"m curious as to whether or not anyone has gotten friendly_id to provide simply mydomain.com/joe, without prepending "users"
[21:08:25] rhizome: read up on routes
[21:08:26] droptone: and, if not, if there' an alternative for such people are aware of.
[21:08:48] droptone: rhizome: could you be more specific?
[21:08:50] Fire-Dragon-DoL: droptone: as rhizome said, read on routes, it's already possible
[21:09:03] droptone: so just study everything relating to routes, got it.
[21:09:10] Fire-Dragon-DoL: droptone: http://guides.rubyonrails.org/routing.html
[21:09:30] droptone: I'm famliiar with routing in rails, the functionality I need is allowing users to set a vanity URL.
[21:09:35] droptone: akin to Facebook.
[21:09:38] Fire-Dragon-DoL: droptone: if you are using friendly_id, you should really understand routes already well, to understand what's happening behind
[21:09:42] rhizome: you think your question is specific, but it isn't
[21:10:10] Fire-Dragon-DoL: droptone: the thing you are asking is quite common
[21:10:18] droptone: ahh, I see.
[21:10:19] rhizome: it's about a basic routing concept
[21:10:28] Advocation: Is there something similar to render where you can pass in arguments? For example, I want to write out bootstrap alerts (http://getbootstrap.com/components/#alerts) and am trying to figure out the best way of just passing in the content and the alert type (success, info, etc)
[21:10:34] droptone: and allowing users to set those routes via a form?
[21:10:45] Fire-Dragon-DoL: droptone: it's used for a different reason but it's a really common thing: "dinamically generated pages": yoururl.com/page-name
[21:10:50] rhizome: droptone: that's basically unrelated
[21:11:03] rhizome: you'll see
[21:11:09] Fire-Dragon-DoL: Advocation: flash messages
[21:11:15] droptone: ok, thank you.
[21:11:46] Fire-Dragon-DoL: Advocation: and render if I'm not wrong already accept a hash on the end which generate flash messages
[21:12:32] Advocation: Fire-Dragon-DoL: do flash messages have to be initiated in the controller? I'm trying to display an info alert if there is no data to display in the view
[21:13:31] Fire-Dragon-DoL: Advocation: yea they must be set in controller, is it an issue for you? How do you "understand" if a view it's empty?
[21:14:10] droptone: I always enjoy asking a question and being handed the encyclopedia britannica in return, that's very useful.
[21:14:20] Advocation: Fire-Dragon-DoL: the way I'm currently doing it is - if @users then write out table, else write out error - so it's all handled in the view
[21:15:34] Fire-Dragon-DoL: well you can definitely do the same
[21:15:40] Fire-Dragon-DoL: considering @users is set there
[21:16:27] Advocation: Fire-Dragon-DoL: https://gist.github.com/Advocation/d3acd015630c7080cdb5
[21:16:41] Advocation: that's how I'm currently doing it, how would I move that into the controller?
[21:17:41] Fire-Dragon-DoL: add controller code to the gist so I can fork
[21:19:23] Advocation: Fire-Dragon-DoL: https://gist.github.com/Advocation/d3acd015630c7080cdb5
[21:19:23] Fire-Dragon-DoL: Advocation: anyway, what's wrong directly with the code you already have?
[21:19:48] Advocation: I'm going to be using alerts all over the place, so just want to clean it up :)
[21:21:05] Fire-Dragon-DoL: ahhh so you want the opposite
[21:21:13] Fire-Dragon-DoL: you want that if an alert is set
[21:21:19] Fire-Dragon-DoL: ti doesn't show the talbe
[21:21:25] Fire-Dragon-DoL: (even if there is data there)
[21:21:40] Advocation: um, if there isn't any data in @users, it should not show the table
[21:21:50] Advocation: and instead should show an alert
[21:22:08] Advocation: I think render should do it, you can pass in a hash so I think that will work ell
[21:22:35] Fire-Dragon-DoL: I'm telling you why I'm not sure about using flash: flash set something in user session
[21:22:53] Fire-Dragon-DoL: is used expecially in redirects or to inform a user of something, not to REPLACE content, is used to "add" content
[21:23:11] Fire-Dragon-DoL: I think you should handle what you are doing at view thing
[21:23:15] Fire-Dragon-DoL: view level sorry
[21:23:31] Fire-Dragon-DoL: if you want to cleanup everything, you may come with something like this
[21:24:04] Advocation: Fire-Dragon-DoL: yeah, thats what I was thinking about flash :) Glad to know I'm not going crazy!
[21:28:03] Fire-Dragon-DoL: Advocation: https://gist.github.com/Fire-Dragon-DoL/6aed8954649b85222fb5 what about something like this
[21:28:39] Fire-Dragon-DoL: it may be a problem if you start typing a lot of html into the alert_message field, in that case it should be changed
[21:29:51] Advocation: Fire-Dragon-DoL: I've actually gone with this - https://gist.github.com/Advocation/d3acd015630c7080cdb5
[21:30:18] frem: I'm having trouble setting params in the URL on a redirect. Why isn't this working? https://gist.github.com/jamesgecko/426126b1b6e31210fd7b
[21:30:32] Advocation: I'll need to write out alerts in other places where I won't necessarily be replacing data, so I think this gives me better flexibility.
[21:33:10] Fire-Dragon-DoL: Advocation: I think it's ok but I suggest you to transform the render partial into a helper (which just render your partial)
[21:33:17] soahccc: Okay guys, why haven't I heard of the xray-rails gem like 9 months ago?
[21:33:36] Fire-Dragon-DoL: so you can just type <%= alert_message(:info, "bla") %>
[21:33:47] cnk_: frem: guessing you need your ) after the attributes
[21:33:50] Fire-Dragon-DoL: Advocation: much less verbose :P
[21:34:10] Advocation: Fire-Dragon-DoL: That's a good idea. I can create different ones for different alert types <%= info_message("blah") %> or <%= warning_message("blah") %>
[21:34:17] Advocation: Fire-Dragon-DoL: I'll do that now :)
[21:35:02] Fire-Dragon-DoL: Advocation: y ;)
[21:35:29] Fire-Dragon-DoL: Advocation: still provide a "generic" one so you may actually reuse it for flash messages too, in case you'll use them for other reasons :P
[21:36:04] Fire-Dragon-DoL: soahccc: that looks pretty cool as a gem O_O
[21:36:45] frem: cnk_: excellent guess. thanks!
[21:36:53] soahccc: Fire-Dragon-DoL: It is the magical thing I always wanted, just awesome
[21:40:24] n88: any reason why `rake assets:clean` wouldn't be doing anything
[21:40:33] n88: and same with `assets:precompile`
[21:40:53] Advocation: Fire-Dragon-DoL: https://gist.github.com/Advocation/d3acd015630c7080cdb5
[21:40:55] n88: the only thing it returns is "You are not setting Devise.secret_key within your application..."
[21:41:14] Fire-Dragon-DoL: ...did you do that?
[21:41:34] bricker`work: n88: how do you know it's not doing anything?
[21:41:46] n88: bricker`work: nothing is clearing out of public/assets
[21:41:49] n88: everything stays the same
[21:42:01] n88: git status shows no changes... heroku isn't seeing my assets etc
[21:42:57] gnagno: hello all
[21:44:02] gnagno: I get an error while trying to install mongoid on rails4, I get Gem::Ext::BuildError: ERROR: Failed to build gem native extension. An error occurred while installing bson (2.2.0), and Bundler cannot continue.
[21:44:09] gnagno: can someone please help me?
[21:45:16] n88: bricker`work: it just seems to be one png file that isn't get picked up for some reason
[21:45:28] ddd: read the output log for the gem. the error gave you a logfile path and name. it will tell you in that file exactly what failed, and why
[21:45:33] ddd: fix that, then try again
[21:45:40] ddd: probably missing some header files. who knows
[21:45:46] n88: gnagno: are you using rvm
[21:45:58] ddd: even under rvm thats the same (I'm on the dev team)
[21:46:20] n88: rvm seems to throw 'native extension' build errors a lot for me
[21:46:35] ddd: the log will tell you why. *we* install the deps we know of, that are listed for ruby itself, and for the most common gems, but for not so common, we might miss a -dev pkg or 2
[21:46:50] bricker`work: n88: assets:clean doesn't remove anything if nothing needs to be removed
[21:46:53] ddd: naa, the death of a native build in 99% of cases is a lack of header files
[21:47:02] bricker`work: n88: if you're trying to remove all assets, use rake assets:clobber
[21:47:06] bricker`work: or just rm -rf public/assets
[21:47:27] n88: bricker`work: thx i just threw the bg.png file manually into public/ssets
[21:47:33] n88: assets* , and heroku is picking it up now
[21:48:15] ddd: see rvm requirements. it will output for your platform
[21:48:28] ddd: then check your installed pkgs and mnake sure you have them all. also check the log file specifically
[21:48:47] ddd: see what it says it bombed for. i'd wager you're just missing a header pkg
[21:49:15] ddd: or you have some configure or build time var set it doesn't like. but thats outside of RVM's jurisdiction
[22:07:36] tubbo: go fuck yourself
[22:07:38] tubbo: that is all
[22:08:08] tubbo: LOL my mysql database has a 'postgres' user apparently???
[22:08:28] tubbo: no clue lol
[22:16:38] shinobi_one: anyone know of something like Travis, but can be private and self-hosted?
[22:16:54] terrellt: Jenkins, Gitlab-CI.
[22:17:07] terrellt: ...Travis? Has anyone managed to run github's travis on a local cluster?
[22:17:31] terrellt: tubbo: MariaDB++.
[22:17:36] tubbo: terrellt: bleh
[22:17:37] rhizome: never tried. jenkins is fine for me
[22:17:40] terrellt: We just set up a Galera cluster and it's pretty much the shit.
[22:17:46] tubbo: shinobi_one: Jenkins
[22:17:55] tubbo: terrellt: it no worky ;)
[22:18:04] tubbo: j/k i never tried
[22:18:59] shinobi_one: i forgot about jenkins
[22:19:16] tubbo: not exactly *easy* to set up but certainly easier than travis or whatever
[22:19:31] tubbo: though i believe redhat openshift has a little one-click install for a jenkins ci box :)
[22:19:42] nahtnam: Hey guys! Where would I add `Money.silence_core_extensions_deprecations = true"?
[22:20:35] ljarvis: nahtnam: in an initializer
[22:20:48] nahtnam: ljarvis: I put it in /config/application.rb right?
[22:21:02] ljarvis: nahtnam: config/initializers/money.rb
[22:21:22] tubbo: you could do both tbh
[22:21:24] tubbo: err, either*
[22:21:26] tubbo: not both :D
[22:22:04] nahtnam: When I create one, do I have to add it in routes or something or will rails auto detect that a new initializer has been created?
[22:22:59] rhizome: it has nothing to do with routes
[22:29:05] ljarvis: nahtnam: you must restart your app
[22:32:10] nahtnam: ljarvis: For some reason, `undefined method `silence_core_extensions_deprecations=' for Money:Class (NoMethodError)` comes up when I try to start the server. All I did was make a money.rb file, and put this in it `Money.silence_core_extensions_deprecations = true`
[22:35:55] tubbo: nahtnam: hmm, you ever think maybe "silence_core_extensions_deprecations" isn't a method on Money?
[22:36:02] tubbo: nahtnam: because that is exactly what the error is telling you..
[22:36:20] nahtnam: :D Its there tho. 1 sec ill get you the link
[22:36:46] tubbo: nahtnam: my guess would be you are using an out-of-date version
[22:36:59] nahtnam: gem 'money'
[22:37:02] nahtnam: Thats all I put'
[22:37:32] tubbo: nahtnam: yeah so when you don't specify a version, what happens is that it uses the most recent version at the time you first bundled.
[22:37:52] tubbo: nahtnam: so if money was 1.0.0 at that point, it will continue to download money v1.0.0 until you run bundle update money
[22:38:01] tubbo: nahtnam: or you specify the version and run bundle update
[22:38:12] terrellt: I wanna bundle money.
[22:38:24] nahtnam: terrellt: :D
[22:39:07] rhizome: just 'bundle update money' or you may receive a sad
[22:39:51] nahtnam: I am running bundle update
[22:39:59] terrellt: bundle update --source money
[22:41:04] nahtnam: https://github.com/RubyMoney/money/pull/357
[22:42:40] tubbo: nahtnam: so if you look at that commit, you can tell which version it's been added to
[22:42:59] terrellt: Be a rebel, :branch => "master"
[22:43:04] tubbo: nahtnam: https://github.com/RubyMoney/money/commit/35527fc644dec5687537c8cdf7a934ae7b4e3f32 see the tags?
[22:43:25] nahtnam: Oh 6 beta :(
[22:43:42] terrellt: nahtnam: You probably want 6.0.1.
[22:44:12] terrellt: If you're using < 6 it's allowed to break everything though.
[22:44:14] terrellt: So be careful.
[22:44:52] terrellt: Sometimes I'm tempted to increment a major version on a gem and make it just do something entirely different. v 1.0, parses google. v 2.0, makes toast
[22:46:55] nahtnam: I updated the gemfile to include 6.0.1, and its throwing this error. http://screencloud.net/v/aGAN
[22:51:43] tubbo: nahtnam: uh oh!
[22:51:53] tubbo: nahtnam: welcome to dependency hell, enjoy your stay.
[22:55:43] terrellt: nahtnam: https://github.com/coinbase/coinbase-ruby/blob/master/coinbase.gemspec And that one's not fixed. Guess you get to submit a pull request.
[22:56:07] nahtnam: Kk. Will do.
[23:02:11] nahtnam: terrellt: Wouldnt it be a bad thing to push a beta version of moeny?
[23:02:24] terrellt: 6.0.1 isn't a beta anymore, is it?
[23:03:29] nahtnam: terrellt: It is
[23:03:54] nahtnam: Oh its not
[23:04:05] nahtnam: ill do that. Thanks.
[23:04:08] terrellt: What a weird release schedule. They published beta1 on Jan 21, beta 4 on Jan 13, and the proper version on jan 17?
[23:05:21] bricker`work: terrellt: look more closely
[23:05:49] nahtnam: terrellt: How does a pull request work? Do I need to clone it, fix it and THEN make a pull request or is the first thing I do a pull request?
[23:06:14] terrellt: 6.1.0, stupid eyes.
[23:06:35] terrellt: nahtnam: Fork it, fix it, run specs, pull request.
[23:06:46] terrellt: Well, run specs, push it, pull request.
[23:07:03] nahtnam: run specs?
[23:07:21] terrellt: nahtnam: https://github.com/RubyMoney/money/blob/master/CONTRIBUTING.md
[23:07:50] nahtnam: sorry for being a noob
[23:07:58] terrellt: No worries, just happy you're actually willing.
[23:08:02] nahtnam: Ill make a pull request for coinbase in a hour or so
[23:08:08] terrellt: Many would just go "meh"
[23:08:41] terrellt: nahtnam: https://github.com/coinbase/coinbase-ruby#contributing You're looking for that.
[23:09:34] nahtnam: Thank you very much! :)
[23:13:20] nahtnam: I should also delete the gemfile.lock right?
[23:16:08] adac: HI folks! Is someone familiar with bootstrap and slim? I'm trying to create a navbar, but I think something I'm doing wrong: https://gist.github.com/anonymous/8608779 Any ideas why the user menu is not in place?
[23:17:43] Radar: https://gist.github.com/anonymous/8608779#file-gistfile1-txt-L5-L6
[23:17:48] Radar: adac: y u no 2 space indent
[23:19:09] nahtnam: adac: No idea on how to use slim, but I am very familiar bootstrap. If you want, I can create a navbar for you and then use this. http://html2slim.herokuapp.com/
[23:19:55] adac: nahtnam, I tried to past the bootstrap html example code there, but the rsult was that the result did not work :(
[23:20:21] adac: Radar, thanks I will try out
[23:20:26] nahtnam: Oh. Let me give it a shot
[23:22:20] nahtnam: adac: Try this? http://pastie.org/8665127
[23:22:24] adac: nahtnam, yeah sure! thanks!
[23:22:34] nahtnam: no problem
[23:25:28] nahtnam: terrellt: Do you know where the contributors section is?
[23:58:13] mmun: if I have two models post and comment with post has_many comments, how can I get all posts that satisfy "all my comments were created_at < 1.month.ago"
[23:59:18] mmun: oh... maybe the easiest way is to check if the negation of the statement has count == 0