Activity Graph

Page 1 of 29 | Next »


[15:13:48] ner0x: has joined #RubyOnRails
[15:14:34] ner0x: When starting passenger using a socket_file it creates the socket file but also does a GET request for the file as well, any ideas what might be causing this? I can jist any files you need. Thanks!
[15:27:14] ner0x: Quit: Leaving


[05:18:28] ner0x: has joined #RubyOnRails
[05:33:56] ner0x: Has anyone used simple_form for to display a hstore in a form? I've done some searching but I haven't found anything yet.
[06:12:30] ner0x: Ping timeout: 260 seconds
[06:40:19] ner0x: has joined #RubyOnRails
[08:59:50] ner0x: Quit: Leaving


[07:15:21] ner0x: has joined #RubyOnRails
[07:56:21] ner0x: Quit: Leaving


[19:06:07] ner0x: has joined #RubyOnRails
[19:38:29] ner0x: Quit: Leaving


[21:42:13] ner0x: has joined #RubyOnRails
[22:07:41] ner0x: Quit: Leaving


[21:09:06] ner0x: has joined #RubyOnRails
[21:27:33] ner0x: Remote host closed the connection


[06:57:25] ner0x: has joined #RubyOnRails
[07:48:55] ner0x: Ping timeout: 240 seconds
[07:51:55] ner0x: has joined #RubyOnRails
[08:12:40] ner0x: Quit: Leaving
[19:48:04] ner0x: has joined #RubyOnRails
[20:57:39] ner0x: Quit: Leaving


[13:01:46] ner0x: has joined #RubyOnRails
[13:05:33] ner0x: Is it possible to have a template something along the lines of:
[13:05:50] ner0x: Or, better yet, is there a way to use render() in coffeescript?
[13:06:18] ner0x: elaptics: Can you elaborate?
[13:07:36] ner0x: elaptics: Sure. I'd like to return a rendered simple_form @object inside a .js response so I can replace the old form with the new form (so that it may include any errors, etc)
[13:09:14] ner0x: elaptics: I can do that. So create.js.erb is the way to go?
[13:09:54] ner0x: elaptics: Seems simple enough. I'm having issues returning the proper action .js/.html
[13:10:03] ner0x: elaptics: I'm going to work up a gist before I start asking for help though.
[16:03:05] ner0x: Quit: Leaving


[09:49:55] ner0x: has joined #RubyOnRails
[10:34:47] ner0x: *.net *.split


[23:00:30] ner0x: has joined #RubyOnRails
[23:01:58] ner0x: I have three models, account, company, and address. Address is polymorphic. Both account and company have an address. Is there a way to require columns in address for when it's attached to a company and make them optional when it's a company?
[23:06:52] ner0x: Ping timeout: 265 seconds


[19:14:16] ner0x: has joined #RubyOnRails
[19:20:46] ner0x: When using rspec-rails with draper, is there a way to set the controllers :current_user helper method when testing using h.current_user in the draper decorator?
[19:33:48] ner0x: rhizome: type: :decorator
[20:23:13] ner0x: Quit: Leaving


[01:09:54] ner0x: Quit: Leaving


[23:33:47] ner0x: has joined #RubyOnRails


[00:30:53] ner0x: railscasts
[00:36:32] ner0x: Quit: Leaving


[23:53:20] ner0x: has joined #RubyOnRails


[00:27:03] ner0x: Quit: Leaving


[19:26:47] ner0x: has joined #RubyOnRails
[19:28:15] ner0x: Hello all, I'm trying to separate a "location" into it's own table so I can geocode all addresses. I wanted to do this from a polymorphic relationship so I may attach it to Accounts, Offices, Projects, etc. Has anyone heard of a way to do this properly?
[19:28:49] ner0x: I find has_one :location, as: :locatable isn't possible. I may be looking at the relationship in the wrong direction.
[19:29:31] ner0x: Many of my models will have locations.
[19:30:12] ner0x: Well, the location belongs to the model. An office, a project in a certain area, etc.
[19:37:25] ner0x: rhizome: I'm not completely following. Location is the owner and it has many models that can be located? If so where would the relationships go? I've done quite a bit of reading online; I may just not get the concept.
[19:46:31] ner0x: rhizome: What do you mean by "plug in"?


[02:38:05] ner0x: Hey all, any way to send parameters to a server via ajax that have multiple levels?
[02:38:55] ner0x: IE { order: { col: 'id', dir: 'asc' }, page: { page: 1, per: 25} } etc.
[02:39:18] ner0x: Sorry, I have no idea why I put levels. lol Yes, json objects.
[02:41:00] ner0x: Apparently restangular is fscking it up somehow.
[02:42:31] ner0x: Sending the second level objects as strings.
[02:44:57] ner0x: Sorry about that; internet is shit here.
[02:45:42] ner0x: When sending this data, does it have to be POSTed?


[02:58:35] ner0x: Anyone use angular in their app and know a way around getting the functionality of simple_form without having to render it as such?


[03:29:11] ner0x: While attempting to test my javascript files with jasmine I started getting this error. I believe I might have now have the proper preprocessor. If anyone can help I'd appreciate it.
[03:51:45] ner0x: Does spec/javascripts using jasmine parse coffeescript by default or do I have to install some sort of preprocessor?
[03:53:07] ner0x: sevenseacat: I've already tried it and come up with errors I can't seem to track down.


[00:56:47] ner0x: When using activerecord selectors and enum. What does the <> mean in the selection? IE: Image.where("status <> ?", Image.statuses[:type]); ?
[00:57:05] ner0x: And is there a simple way to say all excluding a scope?
[01:34:51] ner0x: jenrzzz: No, that's what I needed. Thank you!
[01:35:28] ner0x: jenrzzz: I have :pending, :active, :deleted I'm doing scope :alive, -> { where('status <> ?', STATUS[:deleting]) }
[01:36:04] ner0x: yakko_: Read four lines above. :)
[01:38:19] ner0x: yakko_: That's using enum though.
[01:38:34] ner0x: yakko_: If you do != it equates to "IS NOT NULL"


[00:17:26] ner0x: Anyone using carrierwave use the in the store_dir url?


[03:24:52] ner0x: How can I query using the new email for all records not of type :delete ?
[03:27:36] ner0x: Radar: I'm working up a gist.
[03:28:44] ner0x: Radar: <--- Trying to query the database for all statuses that are not :destroying from the enum type
[03:46:42] ner0x: Radar: Did you happen to see my gist?
[03:49:02] ner0x: Radar: I did not. Did you happen to use my nick to tell me? :)
[03:51:41] ner0x: Radar: Just messing with you mang. :)
[03:58:15] ner0x: Radar: I have. I actually just figured it out. Didn't know they automatically pluralized the enum name to get the array.
[03:58:52] ner0x: Radar: 98% of the time I look at the docs before bother people who yell at me. ;)
[03:59:45] ner0x: Radar: I looked at the docs before I came here. I just missed the extra "es" at the end of "statuses". :)
[04:00:57] ner0x: Radar: It is a pretty nice addition to rails though.
[04:01:17] ner0x: Especially the auto-scope creation part of it.
[04:02:45] ner0x: Thanks for the help. Work in the AM. Night.


[01:50:29] ner0x: How do I fix the "Can't dup NilClass" ?
[03:13:46] ner0x: TypeError (can't dup NilClass) <--- this is a well know issue when using carrierwave and trying to manually set the files?


[22:32:06] ner0x: Parameters: {"temp_filename"=>"2011-09-24_15-06-15_473.jpg", "uuid"=>"68bb26a5-49e3-4556-beba-db8463487aa1", "content_type"=>"image/jpeg", "size"=>291095, "album_id"=>"3", "image"=>{"content_type"=>"image/jpeg", "size"=>291095, "temp_filename"=>"2011-09-24_15-06-15_473.jpg", "uuid"=>"68bb26a5-49e3-4556-beba-db8463487aa1"}}
[22:32:36] ner0x: How can I get it to not have temp_filename, uuid, content_type, etc in the root but rather only in the wrapped_parameter?
[22:39:34] ner0x: momomomomo: I *almost* always do that. Figured it was just one line. Sorry. I'll jist it really quick.
[22:42:25] ner0x: drale2k: I don't. It's just there for some reason.
[22:44:15] ner0x: lucianosousa: yes.
[22:45:59] ner0x: drale2k: Yeah, I'm trying to not have it in there.
[22:46:56] ner0x: drale2k: I believe rails is wrapping the parameters and leaving them in the root.
[23:49:27] ner0x: This might be a stupid question but when using active_model_serializers how can you create json attributes that are multi level? IE: url: 'myurl', thumb: { url: 'my url' }


[04:55:21] ner0x: Anyone know how I can generate a crc32 with carrierwave?


[00:04:08] ner0x: Any gems that will allow me to automatically generate images or urls based on size/text/border type?


[01:33:50] ner0x: Anyone in here use carrierwave and know how to stop the automatic creation of "version :thumb" until a later time specified by you? I don't need the sidekiq, etc. stuff, just the way to stop it automatically generating each version.


[22:47:10] ner0x: So I'm creating a direct_to_s3 uploader using carrierwave. I want to auto-orient and resize_to_fill the image unfortunately it's not on the same server. Anyone know any resources I can look up to get this done? I'm assuming sidekiq or something similar to process an uploaded image queue or something similar.


[01:18:01] ner0x: How can I make a module on an ActiveRecord module that will add actions and methods to it? Any examples programs I can look at the source?
[01:20:33] ner0x: pontiki: I'll look it up. Thank you.
[01:20:57] ner0x: pontiki: No worries, I'll google search and check it out.


[04:27:14] ner0x: Using this code, if I select an account_type and hit enter, the second time I hit enter I get an error because STI changed the class therefore changing what my params.require is expecting. Anyone had this project or know a workaround?
[04:30:36] ner0x: centrx: Not very helpful. lol
[04:38:48] ner0x: Radar: I think I'm doing it for the right reasons. I don't have null columns, just different "limits" to what they can do. I figured defining them in separate classes was the cleaner approach.
[04:53:15] ner0x: Anyone use simple_form and know how to manually set the class name so that name="account[:type]" doesn't become "general_contractor[:type]" when the type is selected, then submitted?
[05:18:27] ner0x: sevenseacat: has a 'type' column which changes the class name. That's the problem.
[05:19:02] ner0x: sevenseacat: simple_form is changing account[:column_name] to account_type[:column_name].
[05:19:56] ner0x: sevenseacat: No, apparently it automatically sets the instance to the STI main class, not the parent.
[05:20:35] ner0x: sevenseacat: account_params[:type] = 'GeneralContractor'; is returning a class of "GeneralContractor".
[05:21:06] ner0x: sevenseacat: Well, if it does, simple_form isn't using the name of the inherited class but the instance class name itself.
[05:23:59] ner0x: sevenseacat:
[05:24:13] ner0x: sevenseacat: My gist says otherwise... :-/
[05:25:09] ner0x: sevenseacat: Am I doing something wrong?
[05:35:22] ner0x: sevenseacat: Ah, I'll try that, thank you.
[05:36:01] ner0x: sevenseacat: I could kiss you.
[05:36:30] ner0x: sevenseacat: I could *hypothetically* kiss you.
[05:36:46] ner0x: sevenseacat: Like the shrimp on Finding Nemo... I will refrain.. lol
[05:37:35] ner0x: sevenseacat: Oh wait, you're female correct? That makes it way more weird. lol
[05:38:47] ner0x: sevenseacat: Sorry about that. Well... thank you for the as: :account simple_form reference. I looked on the simple_form docs and apparently missed it. Must have had "change the class name" in my head while searching.
[05:39:35] ner0x: I was tempted to say "Honestly, I'm not a weirdo or anything" but that pretty much puts you on the fast lane to "He's definitely a weirdo". lol


[21:53:23] ner0x: Any UMO tools for linux (non KDE/Gnome) people in here use?
[21:53:30] ner0x: s/UMO/UML


[19:50:35] ner0x: Hello all. Anyone in here use "Dia" to flowchart their program? If so, can anyone send me an example of theirs? (Yes, I google searched but was disappointed with what I found)
[19:57:26] ner0x: rhizome: Semi-familiar. Quick study though.
[19:59:15] ner0x: I definitely learn from example though. If I can make a relation from what I see is "correct" and what I'm doing I can spot the inconsistencies and fix them.


[23:04:48] ner0x: Okay, here's my situation. Single, small, ec2 server. Need to be able to upload large (Sometimes 1+GB) files to my application. Seeing as small ec2s have low RAM I will experience a shortage of RAM. I was thinking of direct s3 uploading but I need to do processing on some of these files. Anyone have any experience on how they've handled this in the past?
[23:07:14] ner0x: MrPunkin: If you were restricted to a single, low ram server, how would you go about it?
[23:08:51] ner0x: workmad3: So it would send it piece by piece allowing for multiple uploads of 1GB+?
[23:08:54] ner0x: workmad3: Yeah, I hear ya. Unfortunately I'm limited in resources ATM.
[23:09:38] ner0x: How about a clientside image processor?
[23:09:43] ner0x: Make the browser do the work.
[23:10:49] ner0x: The client-side idea?
[23:11:49] ner0x: ryanw: Right now, MiniMagick with carrierwave.
[23:13:09] ner0x: ryanw: Can definitely queue it up and display a default "Image being processed" imag.e
[23:13:31] ner0x: MrPunkin: Fantastic suggestion.
[23:15:30] ner0x: workmad3: One or two customers in that won't be an issue but I don't want to fsck myself with something if I don't get one quickly. I probably should just dedicate a server to downloading the image, processing, then reuploading it to s3.
[23:18:12] ner0x: workmad3: I agree. The image processing isn't the real problem. It's having users upload huge files, use all the ram, slow the service down to a crawll.
[23:25:11] ner0x: So... if I'm stuck with one server the best option, so far, seems to be direct s3 upload and have a background process work on manipulating the images with a "highly configured" imagemagick stack?
[23:33:40] ner0x: Radar: So it would seem, since the images are particularly small, vips + a background processor with s3 direct uploader, and and the background processor downloading the image, manipulating, and then uploading, should work quite nicely actually.
[23:41:46] ner0x: terrellt: The vips suggestion was a good one. Thank you.


[02:15:49] ner0x: When cover_id is nil it chooses a random image; any ideas?
[02:16:56] ner0x: bricker`LA: Is that how it works? Interesting.
[02:17:08] ner0x: bricker`LA: That works out fairly well, actually.
[02:17:47] ner0x: bricker`LA: Damn rails and it's intelligent general-use defaults.
[02:18:15] ner0x: bricker`LA: Really?
[02:21:24] ner0x: bricker`LA: Doesn't really matter; actually. As long as it picks something it works. This was the gallery chooses a "random" cover image unless cover_id is specified. Pretty convenient.
[02:23:43] ner0x: bricker`LA: Unless there are no images as of yet.
[02:24:07] ner0x: bricker`LA: Wonderful.
[02:25:04] ner0x: bricker`LA: Unfortunately it's almost always going to be nil since no images will exist on the create.
[02:25:14] ner0x: Ah... unless save is after create or update.
[02:25:53] ner0x: Which it is.
[02:25:59] ner0x: ACTION has a "duh" moment.


[00:05:28] ner0x: existensil: You have to include the to_tsvector('english', colname)
[00:12:21] ner0x: existensil: That's what I ended up doing. lol


[23:22:44] ner0x: How can I create a gin index using a migration?
[23:25:58] ner0x: existensil: t.index :my_col, using: :gin is a no go. :-/
[23:29:38] ner0x: existensil: I'm surprised it works that way and not the other.
[23:40:33] ner0x: PG::UndefinedObject: ERROR: data type character varying has no default operator class for access method "gin" I get this each time I try to create the index.
[23:42:26] ner0x: add_index :contacts, :company, using: :gin
[23:48:52] ner0x: existensil: CREATE INDEX "index_contacts_on_company" ON "contacts" USING gin ("company")


[23:13:12] ner0x: Using simple_form can you specify two priority time_zones?
[23:17:08] ner0x: elaptics: priority: ["US", "CA"] ?
[23:17:36] ner0x: elaptics: undefined method `name' for "US":String
[23:18:02] ner0x: elaptics: I thought the same thing. Oddly enough it doesn't work like that. :-(
[23:19:58] ner0x: elaptics: I think it's expecting the actual objects.
[23:24:35] ner0x: elaptics: I thought that too. Ugh.
[23:32:12] ner0x: elaptics: Appears to take a regexp run on the TimeZone names.
[23:38:30] ner0x: elaptics: Tell me about it.


[22:27:33] ner0x: Is there a clever way to compare two activerecord models for the attribute diff? say current_user.dup and current_user.reload ?


[23:33:37] ner0x: Is this an acceptable way to do the session "remember me" feature?
[23:37:11] ner0x: <-- This is how I'm currently handling remember_me with sessions. A mix of session and cookies.signed. Look aight?
[23:49:13] ner0x: Is there a "guideline" as to what dictates the use of a controller spec vs a feature spec?
[23:52:19] ner0x: shinobi_one: Even when using capybara?
[23:56:38] ner0x: shinobi_one: Interesting. I'll sit down and do a thorough read. Thank you.
[23:59:02] ner0x: theskript: gist and we'll see what you're talking about? :)


[23:46:41] ner0x: Anyone using devise know..., if I roll my own SessionsController, do I have to manually setup @resource.remember_me! It shows that's it's setting the :remember_me_created_at column but when I close the browser and then open it back up; no dice. Any tips/help/links?
[23:47:32] ner0x: I'm going to investigate the source a bit more.
[23:49:26] ner0x: I'm using activerecord sessions, not sure if that would effect it.
[23:51:00] ner0x: gizmore: I'll peek around a bit to see what I come up with. Thanks.


[02:26:13] ner0x: How can I tell if an attribute has been changed on an update inside an if: my_custom_def? method?


[01:29:10] ner0x: How do I make it so a column can be or null?
[01:47:01] ner0x: whatasunnyday: I have that alright. Rails seems to still insert "" instead of null.
[01:49:16] ner0x: whatasunnyday: That works.


[01:31:57] ner0x: Is there a way to do a "before {}" before all features tests in rspec?
[01:34:35] ner0x: Fire-Dragon-DoL: In which file?
[01:35:03] ner0x: Fire-Dragon-DoL: But it only applies to the capybara enabled tests. That's the trick.
[01:35:14] ner0x: Fire-Dragon-DoL: Trying to do a "visit root_path"
[01:40:03] ner0x: Fire-Dragon-DoL: Before all my features/* tests I'd like to "visit root_path" so I can click through my app instead of visiting the page directly, to ensure
[01:40:22] ner0x: Fire-Dragon-DoL: to ensure that the links work*


[02:52:37] ner0x: Having some issues having foundation-icons displaying during one of my tests:


[13:01:59] ner0x: Anyone using pundit for their authorization with moderate success?
[13:02:37] ner0x: universa1: Oh, well in that case I won't be using it.
[13:03:49] ner0x: universa1: Just looking for opinions; wondering if anyone used or liked it.
[13:05:07] ner0x: universa1: Good stuff. delcarative_authorization was a bit much and cancan no longer works because of strong_parameters. Seems simple enough to work.
[13:06:00] ner0x: universa1: Ah, I'll have to check that out.
[13:32:52] ner0x: Is it normal to put :index, :contact, etc actions in ApplicationController if they're for the "guest" portion of your application?
[13:36:58] ner0x: AntelopeSalad: I have them in PagesController atm.
[13:56:49] ner0x: Okay I *really* like pundit.


[01:08:37] ner0x: When using factory_girl and creating accounts I notice either factory_girl or activerecord does not use postgresql sequences, So when I try to create any new records I get the "duplicate key (id) = 1" error. Is there a workaround?
[01:12:56] ner0x: That's what I thought.
[01:13:08] ner0x: I'll have to dig a little deeper. Thank you.


[17:47:41] ner0x: So what's the standard way to validate activerecord email attributes?
[17:47:56] ner0x: I'm sure there's a bot command for this. :) (Yes, I did google search)
[17:59:56] ner0x: pontiki: Thank you. Saw that example.. always say the validates_email_format_of gem. Interested although I believe the i18n support is broken.
[18:05:14] ner0x: pontiki: Good enough for me.
[20:26:10] ner0x: How can I properly seed a test database with default values without using fixtures? I have db/seeds.rb working but it seems to only work with development. Any help or links would be appreciated.
[20:35:16] ner0x: brycesenz: I'll check it out. Thank you.
[20:39:17] ner0x: brycesenz: Would you happen to have any code you could gist me that I could skim over?
[20:40:29] ner0x: brycesenz: Often the docs show what you're supposed to do and reference putting code in "a file" but rarely tell you which file.
[20:40:45] ner0x: brycesenz: I think I've figured it out by examining the test suite for that gem.
[20:42:27] ner0x: brycesenz: Sounds fantastic. I'll git it a try and see what I come up with.
[20:45:16] ner0x: brycesenz: "At the bottom of your applications Rakefile"... Where is that?
[20:45:27] ner0x: brycesenz: Nevermind..
[20:45:48] ner0x: brycesenz: I thought it meant a specific custom rakefile. It's literally the global "Rakefile" lol
[23:30:53] ner0x: Any reason to use activerecord-session_store over cookies? I'm getting a ActionDispatch::Cookies::CookieOverflow exception at the moment. It's the reason for my thinking about switching.


[01:49:42] ner0x: Does anyone know how to use cancan with strong_parameters?


[00:00:32] ner0x: Radar: If you think that wasn't my first option you're more stupider than the people that would use this sentence before searching google themselves.
[00:01:00] ner0x: Radar: That's fair enough. You do sort of know me though? lol
[00:01:39] ner0x: Radar: I was being funny. The bad grammar was a joke based on the level of stupid someone would have to be to not look at google first. :)
[00:01:46] ner0x: Radar: And yes, we've talked many a time in here.
[00:01:56] ner0x: Radar: I've been MIA due to a recent promotion though.
[00:03:03] ner0x: Radar: At work. Kept me a bit busier.
[00:08:33] ner0x: Radar: Anyway, you know of a way? I've used google for two days and it thinks I'm mean something else. lol
[00:10:19] ner0x: Radar: Nevermind, figured it out. Duh.
[00:11:37] ner0x: Radar: ng-model="newAccount.users_attributes[0].first_name" set on the input. The trick is to $scope.newAccount = { users_attributes: [{ first_name: '' }];
[00:12:05] ner0x: Radar: Something similar. Had to set the scope variable first because the first entry in the array didn't exist. After that it worked.
[00:12:40] ner0x: Radar: It's supposed to create them as they're called but I guess it doesn't for arrays. Still: win in my book.


[02:55:08] ner0x: Is there an easy way to pull hash keys/values into another hash? IE: all_opts = { ... bunch of opts ... }; one_opts = all_opts.get(:height, :width); two_opts = all_opts.get(:size, :weight); etc?
[02:57:23] ner0x: soahccc: Thank you. I'll look those up.
[03:00:33] ner0x: soahccc: That did the trick. Thank you sir.
[23:57:23] ner0x: Anyone here use angularjs and know how to set a model to the same thing as an accepts_nested_attributes_for form?


[01:15:29] ner0x: Is there a way to permanently redirect f.input :name (when name is a 'text' type) to f.input :name, as: :string ?


[22:48:31] ner0x: Will there be any harm in naming my initial migrations 0000_name.rb 0001_name.rb etc.
[22:50:52] ner0x: Radar: So when I start using the dated migrations it'll flow like the nile?
[22:53:57] ner0x: lethjakman: I just may have a tardis.
[22:54:22] ner0x: lethjakman: It was more a simple numbering system since the dates are useless until you push to production.
[22:56:21] ner0x: Radar: Wait how is 001 < 2014?
[22:56:43] ner0x: Radar: Oh wait. I'm dumb. Nevermind.
[23:00:39] ner0x: Radar: lethjakman: Thank you sirs.


[01:06:25] ner0x: Anyone in here just plain turn turbolinks off?
[01:08:12] ner0x: rhizome: It's causing hell with jQuery, and zurb foundation.
[01:09:20] ner0x: rhizome: Turned it off. All is well. The speed increase isn't the worth the hassle. lol
[01:54:47] ner0x: Is it safe to user jQuery 2.0.3 in production apps?
[01:58:02] ner0x: cenhyperion: I'm just asking if there are any interconnectivity issues with the pipeline since jquery-rails is the older version.
[01:59:55] ner0x: cenhyperion: I'll do some homework. Thanks. :)
[06:01:00] ner0x: Just realized foundation doesn't have an example of a submit button in forms... lol


[05:35:00] ner0x: jalcine: No. I was being rude and on another desktop. :-/