« Back to channel list

#RubyOnRails - 10 December 2015

« Back 1 day Forward 1 day »
[00:00:18] cac: has joined #RubyOnRails
[00:00:19] jmimi: has joined #RubyOnRails
[00:01:22] n1lo_: has joined #RubyOnRails
[00:03:39] soahccc: When I register a mime_type does the lookup work both ways? I have this problem: https://gist.github.com/2called-chaos/ed8027e3347ba75c6ada
[00:05:03] Ropeney: has joined #RubyOnRails
[00:05:14] renegadeandy: has joined #RubyOnRails
[00:05:22] DeXterbed: has joined #RubyOnRails
[00:07:06] bmalum: has joined #RubyOnRails
[00:07:10] unreal_: has joined #RubyOnRails
[00:07:34] cac: has joined #RubyOnRails
[00:10:38] ap4y_: has joined #RubyOnRails
[00:14:22] juddey: has joined #RubyOnRails
[00:16:06] TheNet: has joined #RubyOnRails
[00:18:17] rubyonrailed: has joined #RubyOnRails
[00:20:28] TheMoonMaster: has joined #RubyOnRails
[00:20:39] rhizome: soahccc: what's in send_packshot
[00:21:00] lyoshajapan: has joined #RubyOnRails
[00:21:39] paulodiniz: has joined #RubyOnRails
[00:22:12] hoylemd: has joined #RubyOnRails
[00:22:43] maloik: has joined #RubyOnRails
[00:22:47] quazimodo: has joined #RubyOnRails
[00:24:27] hoylemd: Hey, I'm trying to set up the oauth plugin from here https://github.com/pelle/oauth-plugin. I have a `consumer_token` model in `app/models/consumer_token.rb` but `rake db:migrate` didn't create a `consumer_tokens` table in my database
[00:24:34] hoylemd: Do I have to do something else to create the tables?
[00:24:51] hoylemd: (if it's not obvious, I'm pretty new to rails, but not to programming in general)
[00:26:05] Scriptonaut: you have to generate a migration
[00:26:20] lemur: has joined #RubyOnRails
[00:26:20] Scriptonaut: the model alone won't create the table in the database
[00:26:24] Scriptonaut: rails generate migration CreateConsumerTokens token:string
[00:26:24] sleungcy_: has joined #RubyOnRails
[00:26:24] Scriptonaut: something like that
[00:26:25] hoylemd: oh! well that'll do it. I wonder why the tutorial left that out -_-
[00:26:34] hoylemd: Hmm is there any way to just be like 'crate a table for this model' with rails generate migration?
[00:26:36] hoylemd: Just looking at the help page isn't really helping there
[00:26:41] hoylemd: or even 'make a migration to match my models'?
[00:26:43] SteenJobs: has joined #RubyOnRails
[00:26:47] neanderslob: has joined #RubyOnRails
[00:26:47] Xentil: has joined #RubyOnRails
[00:26:50] Maletor: has joined #RubyOnRails
[00:26:52] creyes_: I have a model Packet that has_many Forms. I'd like to write an after_create method that creates a new instance of each Form. Do I do that in the Packet model or the controller?
[00:26:52] rhizome: the migration is what your model matches
[00:26:52] rhizome: in a manner of speaking
[00:26:53] Xentil: has joined #RubyOnRails
[00:26:59] tejasmanohar: has joined #RubyOnRails
[00:27:02] mary5030: has joined #RubyOnRails
[00:27:07] 64MAACYPY: has joined #RubyOnRails
[00:27:27] owenjones: has joined #RubyOnRails
[00:27:32] rayzaum: has joined #RubyOnRails
[00:27:36] skyjumper: i'm trying to test an enqueued ActiveJob in a request spec, but the proper way of performing the job isn't making sense
[00:27:36] skyjumper: https://gist.github.com/anonymous/41939d8803c2a42824d8
[00:27:39] sleungcy_: has joined #RubyOnRails
[00:27:47] skyjumper: i'd expect "perform_enqueued_jobs" to do exactly that - but for some reason it takes a block where you're adding new jobs?
[00:27:51] rayzaum: has joined #RubyOnRails
[00:27:55] rayzaum: hey, someone can help me, im install rails now and show me this msg when a i put "rails server" Usage: rails new APP_PATH [options], and more option..
[00:27:55] TheNet: has joined #RubyOnRails
[00:27:56] rhizome: rayzaum: server only works in the context of an app. create an app or cd into an existing app's directory
[00:28:02] SalexW: has joined #RubyOnRails
[00:28:10] soahccc: rhizome: https://gist.github.com/2called-chaos/ed8027e3347ba75c6ada#file-products_controller-rb-L13 (I added it, yeah I know its evil to send jpeg in all cases but those spiders drive my errbit nuts)
[00:28:13] annlewis: has joined #RubyOnRails
[00:28:13] Scriptonaut: Does anyone know if I can do an includes on a model with a table that doesn't actually exist? I have a person model, they have many tasks. However, a person also has man incomplete_tasks like so: has_many :incomplete_tasks, -> { incomplete }, as: :taskable
[00:28:15] Scriptonaut: incomplete_tasks is really just a subset of tasks, but there is no incomplete_tasks table
[00:28:15] soahccc: rhizome: but my thought was that webp is the only custom mime type and with the accept header it doesn't work while the URL way of things works
[00:28:15] Scriptonaut: is there a way for me to includes the :incomplete_tasks?
[00:28:18] sevenseacat: has joined #RubyOnRails
[00:28:18] soahccc: Scriptonaut: I would say scopes?
[00:28:19] Scriptonaut: so define a scope on the Person model or the Task model
[00:28:21] soahccc: Scriptonaut: you _can_ do something like this: https://gist.github.com/2called-chaos/70ae01fa8e94983f7d12
[00:28:24] matthewd: Scriptonaut: What happened when you just tried to include that association as is?
[00:28:29] CarlosYoo: has joined #RubyOnRails
[00:28:30] Scriptonaut: matthewd: I get: NameError: uninitialized constant Person::IncompleteTask
[00:28:32] matthewd: Scriptonaut: Oh, right.. which is nothing to do with includes.. your has_many definition is incomplete
[00:28:33] Scriptonaut: ahh, I'm missing class_name
[00:28:36] nyaa: has joined #RubyOnRails
[00:28:36] soahccc: Scriptonaut: I would say my gist if you pretend them to be different models "kinda". if it is a subset I would say scopes are the better way
[00:28:37] Scriptonaut: Ok, I almost have it working. I already includes(:tasks) on my Person collection, would includes(:incomplete_tasks) re include the tasks that were already loaded?
[00:28:37] brendan-: has joined #RubyOnRails
[00:28:37] Scriptonaut: ok, so a scope on people called incomplete_tasks?
[00:28:37] Scriptonaut: scope on Person*
[00:28:37] soahccc: Scriptonaut: on task... person.tasks.incomplete
[00:28:37] Scriptonaut: I already have that
[00:28:37] Scriptonaut: I'm trying to order people by their tasks due_on field
[00:28:37] rhizome: incomplete_tasks is an entire association?
[00:28:37] Scriptonaut: it is now, on person
[00:28:39] ap4y: has joined #RubyOnRails
[00:28:39] Scriptonaut: let me gist this
[00:28:39] Scriptonaut: to simplify it
[00:28:39] rayzaum: rhizome, thanks, works!
[00:28:45] Scriptonaut: rhizome: soahccc: https://gist.github.com/robins35/f61e319a417e05d481c4
[00:28:45] shanemcd: has joined #RubyOnRails
[00:28:46] Scriptonaut: The top file is the ordering I want to do, on people. Next is my collection of people, with the includes, finally are the associations on Person
[00:28:54] rhizome: what does that Permission.accessible_by return?
[00:28:54] Scriptonaut: a collection of people
[00:28:54] Scriptonaut: an activerecord relation
[00:28:54] sevenseacat: tis a cancan thing to return a relation
[00:28:54] FooMunki: has joined #RubyOnRails
[00:28:55] rhizome: that construction?
[00:28:56] rhizome: my nerdly sensibilities want that to be called from Person
[00:28:56] Scriptonaut: when I call .class on @permissable, it gives me: Person::ActiveRecord_Associations_CollectionProxy
[00:28:56] FCser: has joined #RubyOnRails
[00:28:56] rhizome: makes sense
[00:28:56] rhizome: depending on what's in accessible_by, but whatev
[00:28:56] rhizome: my eye is twitching
[00:28:56] Scriptonaut: my problem is, when I go to order the collection, I can't order by "incomplete_tasks.due_on", because incomplete_tasks isn't a table, it's just an association
[00:28:57] bmalum: has joined #RubyOnRails
[00:28:57] rhizome: incomplete should just be a scope/method on Task
[00:28:57] rhizome: i'm going to try not to 'should you to death
[00:28:57] sevenseacat: an association is chainable
[00:28:57] sevenseacat: if incomplete_tasks returns a relation of Foo and due_on is a scope on Foo, then it works
[00:29:19] Scriptonaut: rhizome: I do have the scope on Task as well
[00:29:25] Scriptonaut: I can go: Task.incomplete
[00:29:54] Scriptonaut: my problem is, how do I order only on the subset of tasks, the incomplete ones
[00:29:57] daivyk: has joined #RubyOnRails
[00:30:09] sevenseacat: what was wrong with incomplete_tasks.due_on ?
[00:30:13] Scriptonaut: I can't do: .order("incomplete_tasks.due_on")
[00:30:22] Scriptonaut: because there is no table incomplete_tasks
[00:30:30] jessemcgilallen: has joined #RubyOnRails
[00:30:33] Scriptonaut: it gives me a PG::UndefinedTable error
[00:30:37] helpa: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[00:31:09] Scriptonaut: https://gist.github.com/robins35/d6e366eff78e17af8162
[00:31:15] rhizome: so now you do want both incomplete tasks and otherwise in the list, right?
[00:31:22] Scriptonaut: peeps in this case is just a collection of people I'm testing with in rails c
[00:31:38] Scriptonaut: rhizome: no I want to sort people based /only/ on the incomplete tasks due_on
[00:31:51] sevenseacat: uh... you're trying to order people by a property of tasks? that wont work
[00:31:58] sevenseacat: that doesnt even make sense
[00:32:01] rhizome: but you want people without incomplete tasks, too?
[00:32:11] Scriptonaut: yes rhizome they should all be grouped together
[00:32:16] Scriptonaut: sevenseacat: wait, why not?
[00:32:26] rhizome: just checking, it makes a difference
[00:32:53] rhizome: so you want a list of people, also listing their incomplete tasks, if any
[00:33:30] sevenseacat: because people have more than one task
[00:33:44] Scriptonaut: yes sevenseacat I want to order it based on the first task
[00:33:49] Scriptonaut: I was under the impression that's how it worked
[00:33:57] Scriptonaut: because it works for the other associated field I'm ordering on
[00:34:20] Scriptonaut: I have a table of people, one of the columns is the result of this method: https://gist.github.com/robins35/4a056c1acea3fbb25d69
[00:34:36] Scriptonaut: I want to be able to sort the table based on that method (by date)
[00:34:42] sevenseacat: this is just weird
[00:35:08] Scriptonaut: I might just tell the lady at work that this will take me too long and that unless it's really important we should ditch this idea
[00:35:14] sevenseacat: that method is also really weird
[00:35:18] sevenseacat: no its easy to do, your code is just weird
[00:35:26] Scriptonaut: let me Gblame it
[00:35:31] sevenseacat: why are you iterating through all the tasks to find the next one
[00:35:35] Scriptonaut: aha, wasn't me who wrote it
[00:35:52] matthewd: Scriptonaut: The table is called tasks in your query
[00:35:53] Scriptonaut: I'm not iterating through them
[00:35:56] Uranio: has joined #RubyOnRails
[00:36:03] sevenseacat: well you're definitely loading them all
[00:36:05] sevenseacat: just to return one
[00:36:12] Scriptonaut: you mean with the includes?
[00:36:15] Scriptonaut: where is it loading them all
[00:36:20] sevenseacat: no, in the next_task_description
[00:38:10] Scriptonaut: tasks.find will only return one though
[00:38:50] sevenseacat: yes, but its loading them all from the db and then searching through them in ruby
[00:39:06] Scriptonaut: Would it make more sense to do: tasks.incomplete.first
[00:39:23] Scriptonaut: Ok, I'll change it
[00:39:26] sevenseacat: that will all be done in sql if your scopes are right
[00:39:56] sevenseacat: you'll still have N+1 queries if this is being output in a table, but at least the queries are smaller
[00:40:28] Scriptonaut: I wonder if this has to do with the terrible performance we've been having lately
[00:40:58] hahuang65: has joined #RubyOnRails
[00:41:18] rhizome: maybe, if you're loading tons of stuff you don't use
[00:41:26] Scriptonaut: either way, I'm still facing the issue of sorting based on the due_date of the first task
[00:41:28] DLSteve: has joined #RubyOnRails
[00:41:47] rhizome: i'm gonna say it won't be a problem
[00:41:52] maloik: has joined #RubyOnRails
[00:42:46] sevenseacat: time to install skylight or new relic and check out your performance issues
[00:43:08] sevenseacat: skylight has a great thing called an Agony Index - https://reinteractive.net/posts/267-rescuing-an-exploding-rails-app-with-skylight-io
[00:43:17] Scriptonaut: ya I use newrelic
[00:43:49] rhizome: den use it mang
[00:43:52] sevenseacat: we switched from newrelic to skylight
[00:44:10] sevenseacat: yeah no point in guessing about performance problems if you have all the data right there :P
[00:44:16] Scriptonaut: The performance isn't what I'm focused on right now, I just want to know how to sort my people based on the due date of their first task
[00:44:31] Scriptonaut: the performance comment was just me thinking out loud
[00:44:38] rhizome: definitely first things first, but if your slowdown is noticeable you should be able to find hotspots easily
[00:44:55] rickmasta: has joined #RubyOnRails
[00:45:20] sevenseacat: I'd put that ordering into a scope on your task model, then you could do something like self.table_name in the scope
[00:45:34] robertmay: has joined #RubyOnRails
[00:45:47] threeminutemonta: has joined #RubyOnRails
[00:46:06] Scriptonaut: Ah, that's a great idea
[00:46:10] Scriptonaut: so much simpler than what I was trying to do
[00:46:25] Scriptonaut: wait, but I can't pass in the scope to the order method
[00:47:42] sevenseacat: that sentence doesnt make much sense, but i see the problem
[00:48:17] Scriptonaut: :o what's the problem
[00:48:26] threeminutemonta: has joined #RubyOnRails
[00:48:31] sevenseacat: you want your Person model to know about the schema of your tasks table
[00:48:51] Scriptonaut: should I avoid that then?
[00:49:21] DiCablo: has joined #RubyOnRails
[00:50:24] sevenseacat: I'd have to play around with it to figure out a way to avoid it
[00:50:36] Scriptonaut: ah, I won't trouble you then
[00:50:42] Scriptonaut: Thanks for thinking that through with me
[00:50:47] Scriptonaut: I understand the problem a bit better
[00:51:21] Scriptonaut: out of curiosity, what does: people_collection.includes(:tasks).order("tasks.due_on") do?
[00:51:30] sevenseacat: try it and see
[00:52:42] Scriptonaut: It is ordering it, I'm just not sure how. I can't tell if it's ordering it based on each person's first task, or somehow determining order based on the collection of each person's tasks
[00:53:11] Maletor: has joined #RubyOnRails
[00:53:58] sevenseacat: and the SQL generated is?
[00:54:23] Scient: gah, i dont thin I have ever had to deal with customer support so clueless and unhelpful as mailchimp
[00:54:31] Scient: fuck those guys times infinity
[00:54:57] Scriptonaut: here's the SQL is a somewhat hard to read format: https://gist.github.com/robins35/da4b528cc8e4bcc4aa3a
[00:55:19] Scriptonaut: it just has a "ORDER BY tasks.due_on" at the end, but I"m not sure what that means
[00:56:02] elton: has joined #RubyOnRails
[00:56:57] hnanon: has joined #RubyOnRails
[00:57:14] hnanon: If I have: handle_success_invoice event_object
[00:57:37] hnanon: Does that mean event_object is an argument of handle_success_invoice?
[00:58:13] sevenseacat: an argument *to* handle_success_invoice
[00:58:22] hnanon: I see. Thank you.
[00:58:35] sevenseacat: with the optional parens left off
[00:58:50] hnanon: Ok, yeah that tripped me up a little.
[00:59:00] lyoshajapan: has joined #RubyOnRails
[00:59:13] hnanon: Are the parens normally left out?
[00:59:24] sevenseacat: most of the time if they're not required
[00:59:38] sevenseacat: people do things differently, its a style thing.
[01:00:10] maloik: has joined #RubyOnRails
[01:00:31] rawrwx: has joined #RubyOnRails
[01:01:32] lyoshajapan: Is there a way to click on something with capybara no matter where it is on the screen? even if its behind other elements that will render it unclickable for users normally?
[01:01:48] sevenseacat: thats not how capybara works.
[01:01:56] sevenseacat: well, not how your webdriver will work
[01:02:02] one_zero: has joined #RubyOnRails
[01:02:07] Scriptonaut: you can can't you? with find
[01:02:15] Scriptonaut: find("#element-id").click
[01:02:29] Scriptonaut: find("#element-id").trigger 'click'
[01:02:31] Scriptonaut: something like that
[01:02:44] nyaa: has joined #RubyOnRails
[01:03:09] nyaa: has joined #RubyOnRails
[01:03:13] lyoshajapan: .click wont work since 2.5.0 if there is a div overlaying it
[01:04:42] hnanon: https://gist.github.com/anonymous/a5c761ea1eb098ea6f2c
[01:05:01] Scriptonaut: ah, didn't know that
[01:05:04] hnanon: The webhook action in the controller is not firing off the method in the model.
[01:05:21] lyoshajapan: has joined #RubyOnRails
[01:05:29] hnanon: I receive the response, though.
[01:05:48] helpa: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[01:05:50] lyoshajapan: Ill try the trigger 'click', Ill let you know if it works shortly :-)
[01:06:28] hnanon: sevenseacat: the code is in the gist. There is no error.
[01:06:42] sevenseacat: there's some debug information in the logs though
[01:06:44] hnanon: I just get the response back.
[01:06:48] sevenseacat: like what the data that hits this method looks like
[01:07:03] annlewis: has joined #RubyOnRails
[01:07:26] hnanon: Yes, the response.
[01:07:32] hnanon: Do you need that too?
[01:08:05] hnanon: I'm just not sure if I'm calling the method properly.
[01:08:14] sevenseacat: I'll pretend I didn't just ask for it then you asked me if I just asked for it
[01:09:41] hnanon: Sorry. 1 sec.
[01:10:29] rakm_: has joined #RubyOnRails
[01:10:34] eddiegrey: has joined #RubyOnRails
[01:12:33] hnanon: sevenseacat: https://gist.github.com/anonymous/6dca6c20c534f1af9291
[01:12:53] diegoviola: has joined #RubyOnRails
[01:13:38] CarlosYoo: has joined #RubyOnRails
[01:13:44] sevenseacat: ok, so how do you know your method isnt being called?
[01:14:07] sevenseacat: have you tried debugging and stepping through that webhook?
[01:15:10] hnanon: I put the print statement in the method name...
[01:15:13] sevenseacat: if you cant provide things like logs, I'll just tell *you* to look at them
[01:15:30] hnanon: It's not in the logs.
[01:15:48] hnanon: And, the order is not being created.
[01:15:54] diegoviola: has joined #RubyOnRails
[01:16:31] hnanon: Am I calling the method properly in the webhook action?
[01:16:33] sevenseacat: now can you please gist the logs like I asked you to ten minutes ago?
[01:18:54] quazimodo: has joined #RubyOnRails
[01:19:06] silkwood: has joined #RubyOnRails
[01:19:06] quazimod1: has joined #RubyOnRails
[01:19:26] CarlosYoo: has joined #RubyOnRails
[01:19:41] silkwood: what's the right way to jump through multiple has_many relationships?
[01:19:46] CarlosYoo: has joined #RubyOnRails
[01:20:00] hnanon: sevenseacat: https://gist.github.com/anonymous/4c7a2cec8a6c5b66b5a0
[01:20:18] silkwood: items.things.bars.where(:name => "something")
[01:20:19] sevenseacat: hnanon: aaaaand the rest
[01:20:29] hnanon: There's nothing else.
[01:20:37] sevenseacat: so the method has no response?
[01:20:38] hnanon: It's just the response.
[01:20:52] hnanon: It's a post request.
[01:20:52] sevenseacat: what the crap do you think I'm asking to see
[01:21:06] hnanon: The response is there!
[01:22:17] hnanon: That's all I have for that request.
[01:22:28] sevenseacat: so it doesnt have a response?
[01:22:52] sevenseacat: all requests have responses.
[01:23:12] hnanon: That's the webhook posting back.
[01:23:21] sevenseacat: hnanon: you're wasting my time.
[01:23:44] hnanon: sevenseacat: Sorry. I'll keep toiling. Thank you for the time you spent on it so far.
[01:23:52] lemur: has joined #RubyOnRails
[01:23:57] threeminutemonta: has joined #RubyOnRails
[01:23:58] sevenseacat: a simple request 'can you show me the logs' and then 20 minutes of crap
[01:25:12] hnanon: I'm not sure how I should reply to you.
[01:25:22] hnanon: Seriously, thank you.
[01:25:27] lyoshajapan: has joined #RubyOnRails
[01:26:19] Radar: !popcornm
[01:26:21] helpa: http://i.imgur.com/tyViD.gif
[01:27:11] tenderlove: has joined #RubyOnRails
[01:27:54] tenderlove: has joined #RubyOnRails
[01:27:56] RegulationD: has joined #RubyOnRails
[01:28:00] rgrmatt: has joined #RubyOnRails
[01:28:32] shibabu: has joined #RubyOnRails
[01:29:35] bmalum: has joined #RubyOnRails
[01:31:42] rawrwx: has joined #RubyOnRails
[01:34:20] sunya7a: has joined #RubyOnRails
[01:39:43] mary5030: has joined #RubyOnRails
[01:39:57] helpa: http://i.imgur.com/FQREopd.gif
[01:43:33] arooni: has joined #RubyOnRails
[01:46:56] samuelkadolph: has joined #RubyOnRails
[01:49:42] pyemkey: has joined #RubyOnRails
[01:53:58] Maletor: has joined #RubyOnRails
[01:55:27] Obi_obi: has joined #RubyOnRails
[01:55:28] jds: has joined #RubyOnRails
[01:55:28] mjc_: has joined #RubyOnRails
[01:55:33] c355E3B: has joined #RubyOnRails
[01:55:33] alxndr: has joined #RubyOnRails
[01:55:43] CornishPasty: has joined #RubyOnRails
[01:55:54] crdpink: has joined #RubyOnRails
[01:55:57] iamdevnul: has joined #RubyOnRails
[01:56:16] robertmay: has joined #RubyOnRails
[01:56:36] sfr^: has joined #RubyOnRails
[01:56:48] kumavis: has joined #RubyOnRails
[01:56:57] elton: has joined #RubyOnRails
[02:00:41] eddiegrey: has joined #RubyOnRails
[02:00:47] crdpink: has joined #RubyOnRails
[02:01:55] maloik: has joined #RubyOnRails
[02:07:49] annlewis: has joined #RubyOnRails
[02:08:07] diego1: has joined #RubyOnRails
[02:08:12] kalzz: has joined #RubyOnRails
[02:09:45] rickmasta: has joined #RubyOnRails
[02:10:53] lyoshajapan: has joined #RubyOnRails
[02:10:53] diego1: has joined #RubyOnRails
[02:11:23] lyoshajapan: has joined #RubyOnRails
[02:11:51] sonofdirt: has joined #RubyOnRails
[02:14:48] theblang: has joined #RubyOnRails
[02:17:43] kies: has joined #RubyOnRails
[02:21:19] tenderlove: has joined #RubyOnRails
[02:21:59] tenderlove: has joined #RubyOnRails
[02:22:40] hardtail: has joined #RubyOnRails
[02:24:30] nyanz: has joined #RubyOnRails
[02:25:14] Rodya_: has joined #RubyOnRails
[02:25:21] owenjones: has joined #RubyOnRails
[02:25:25] ornerymoose: has joined #RubyOnRails
[02:30:41] bmalum: has joined #RubyOnRails
[02:30:49] baweaver: has joined #RubyOnRails
[02:33:06] duncannz: has joined #RubyOnRails
[02:33:55] rubyonrailed: has joined #RubyOnRails
[02:35:32] _Tariq: has joined #RubyOnRails
[02:36:27] eddiegrey: has joined #RubyOnRails
[02:37:58] maloik: has joined #RubyOnRails
[02:38:57] rubyonra_: has joined #RubyOnRails
[02:40:20] caiogouveia: has joined #RubyOnRails
[02:40:45] Cervajz: has joined #RubyOnRails
[02:41:44] nickenchuggets: has joined #RubyOnRails
[02:41:44] nickenchuggets: has joined #RubyOnRails
[02:42:21] DeXterbed: has joined #RubyOnRails
[02:43:28] iateadonut: has joined #RubyOnRails
[02:44:10] rubyonrailed: has joined #RubyOnRails
[02:46:34] crdpink: has joined #RubyOnRails
[02:47:50] diegoviola: has joined #RubyOnRails
[02:48:29] lessless: has joined #RubyOnRails
[02:50:08] Bloomer: has joined #RubyOnRails
[02:52:01] tenderlove: has joined #RubyOnRails
[02:52:37] tenderlove: has joined #RubyOnRails
[02:53:08] tjbiddle: has joined #RubyOnRails
[02:53:24] lyoshajapan: has joined #RubyOnRails
[02:54:45] Maletor: has joined #RubyOnRails
[02:56:52] ellisTAA: has joined #RubyOnRails
[02:57:44] ellisTAA: could someone help me change the color of the labels on this form? https://gist.github.com/ellismarte/2b2fc30369a5c6d663d9 i???ve tried .input-field label { color: white !important; } but that doesn???t work (i got this from the materialize docs)
[02:57:46] rubyonra_: has joined #RubyOnRails
[02:58:01] ellisTAA: note: this form is being loaded onto the page through ajax ???
[02:59:24] Radar: Where on earth did you get .input-field for?
[02:59:48] sevenseacat: without knowing the HTML, kinda hard to help with a CSS selector - but whats wrong with something like .sign-up-form label ?
[02:59:58] ellisTAA: radar: http://materializecss.com/forms.html from the materialize docs
[02:59:59] Radar: ellistaa: Inspect those labels. They probably don't have the .input-field class.
[03:00:07] Radar: ellistaa: Classes aren't magically applied to fields.
[03:00:31] ellisTAA: Radar: ahhh thanks thats probably it
[03:00:50] hardtail: has joined #RubyOnRails
[03:02:23] artX000: has joined #RubyOnRails
[03:02:23] ellisTAA: Radar: that was it
[03:02:31] Radar: ellistaa: np
[03:03:41] hoodow_: has joined #RubyOnRails
[03:03:41] hoodow_: has joined #RubyOnRails
[03:05:05] rubyonrailed: has joined #RubyOnRails
[03:05:44] hardtail: has joined #RubyOnRails
[03:05:55] Bloomer: has joined #RubyOnRails
[03:06:13] hardtail: damn my connection is blowing up
[03:07:00] diegoviola: has joined #RubyOnRails
[03:08:35] annlewis: has joined #RubyOnRails
[03:08:54] baweaver: has joined #RubyOnRails
[03:09:03] smathy: has joined #RubyOnRails
[03:11:02] zubnola: has joined #RubyOnRails
[03:11:31] rhizome: q8 smurfin u hardc0r3
[03:11:46] twilling: has joined #RubyOnRails
[03:12:16] Radar: Again in english plz
[03:13:14] rhizome: Middle H4x0r with an efnet accent
[03:14:27] lyoshajapan: has joined #RubyOnRails
[03:14:55] lyoshajapan: has joined #RubyOnRails
[03:16:06] Radar: If I have an Item model which belongs_to a Product model, and I find a collection of items, what's a good way for me to return the products for those items?
[03:16:17] Radar: I'm currently thinking Product.find(@items.pluck(:product_id).uniq)
[03:16:46] lyoshaja_: has joined #RubyOnRails
[03:17:21] lyoshaja_: has joined #RubyOnRails
[03:18:04] fryguy: Radar: Does the product model have a corresponding has_one or has_many?
[03:18:13] Radar: fryguy: has_many
[03:18:18] Radar: product has_many items, item belongs_to product.
[03:18:32] Radar: I feel like I'm blanking on something obvious, so I thought I'd double check.
[03:19:10] fryguy: @items.map(&:product) ?
[03:20:15] Radar: fryguy: I only want the unique products.
[03:21:11] Aasha: has joined #RubyOnRails
[03:21:29] fryguy: does adding uniq to the end do what you want? I forget if AR objects compare on ID or not
[03:21:59] Radar: Good point. I can query for the products with an includes on the item query, so that'll load the products.
[03:22:55] diegoviola: I have this shitty helper with some conditionals that I'm trying to get rid of/replace with something saner: https://gist.github.com/diegoviola/9c972e101016f169f209
[03:23:03] helpa: Do not beg / plead with people to help you. This includes asking questions like "Any ideas?" after posting your original question.
[03:23:17] diegoviola: I've watched talks from sandi metz, etc. but I'm still confused as to what to do
[03:23:57] diegoviola: I call those from my views
[03:24:29] Radar: Hard to know for me because I don't know what "Cinza" "Vermelho" "Amarela" and "Verde" are in English.
[03:24:35] Radar: I think Verde is like "now"?
[03:24:54] Radar: Ok, completely wrong. Green.
[03:25:47] sevenseacat: I don't think a view helper is the right place for those methods.
[03:25:57] fryguy: I think step 1 is to just remove all of the duplication
[03:26:18] DeXterbed: has joined #RubyOnRails
[03:26:19] Radar: what looks like duplication here isn't.
[03:26:25] Radar: Similar business logic but different.
[03:26:31] diegoviola: Radar: verde is green, cinza is gray, vermelho is red, amarela is yellow
[03:26:38] sevenseacat: indeed, only two of the methods look the same
[03:26:53] sevenseacat: but even theyre not identical
[03:26:54] Radar: This logic hurts my brain.
[03:27:01] RegulationD: has joined #RubyOnRails
[03:27:03] diegoviola: Radar: I didn't grow that logic
[03:27:14] fryguy: 18-22 and 32-36 are basically identical
[03:27:23] sevenseacat: how is a status a colour?
[03:27:29] Radar: What is sedex.ts_print?
[03:27:36] Radar: Time to print?
[03:27:37] diegoviola: Radar: it's a datetime
[03:27:56] fryguy: gah, no it's not
[03:28:07] Radar: Well, have fun peeps. I need to focus on this stuff :)
[03:28:29] diegoviola: ts_methods are datetimes
[03:28:37] sevenseacat: I'd put the logic to calculate statuses in models, and then decorators/helpers to make it into colours
[03:28:57] shibabu: has joined #RubyOnRails
[03:30:07] diegoviola: sevenseacat: so you call the helper from the view and I call the methods from the model in the helper?
[03:30:21] owenjones: has joined #RubyOnRails
[03:30:38] diegoviola: model <- helper <- view
[03:30:46] sevenseacat: at the risk of repeating myself, yes.
[03:31:15] diegoviola: that makes sense
[03:31:38] bmalum: has joined #RubyOnRails
[03:34:19] diegoviola: I'm still confused as to what to put in the helper and what to put in model, but I need to think more about that
[03:37:20] rickmasta: has joined #RubyOnRails
[03:44:21] rawrwx: has joined #RubyOnRails
[03:46:34] tenderlove: has joined #RubyOnRails
[03:51:25] kp666: has joined #RubyOnRails
[03:51:40] pyemkey: has joined #RubyOnRails
[03:51:43] owenjones: has joined #RubyOnRails
[03:53:20] _Tariq: has joined #RubyOnRails
[03:55:33] Maletor: has joined #RubyOnRails
[03:58:17] elton: has joined #RubyOnRails
[04:00:28] dopie: has joined #RubyOnRails
[04:04:41] jmimi: has joined #RubyOnRails
[04:07:14] rickmasta: has joined #RubyOnRails
[04:08:23] rakm: has joined #RubyOnRails
[04:09:21] annlewis: has joined #RubyOnRails
[04:09:57] sankaber: has joined #RubyOnRails
[04:17:55] braincrash: has joined #RubyOnRails
[04:20:34] lyoshajapan: has joined #RubyOnRails
[04:23:49] chipotle: has joined #RubyOnRails
[04:24:24] DeXterbed: has joined #RubyOnRails
[04:25:24] jgt4: has joined #RubyOnRails
[04:26:57] sadaf2606: has joined #RubyOnRails
[04:30:13] lyoshajapan: has joined #RubyOnRails
[04:32:15] bmalum: has joined #RubyOnRails
[04:33:08] rawrwx: has joined #RubyOnRails
[04:34:41] diego1: has joined #RubyOnRails
[04:34:43] diego1: has joined #RubyOnRails
[04:36:05] lyoshajapan: has joined #RubyOnRails
[04:36:07] chipotle: has joined #RubyOnRails
[04:39:34] Tokenizer: has joined #RubyOnRails
[04:40:33] tenderlove: has joined #RubyOnRails
[04:40:59] tenderlove: has joined #RubyOnRails
[04:41:04] djbkd: has joined #RubyOnRails
[04:41:31] maloik: has joined #RubyOnRails
[04:42:12] Cervajz: has joined #RubyOnRails
[04:52:40] owenjones: has joined #RubyOnRails
[04:53:48] bronson: has joined #RubyOnRails
[04:56:24] Maletor: has joined #RubyOnRails
[04:57:14] hahuang65: has joined #RubyOnRails
[04:57:18] krzkrzkrz: has joined #RubyOnRails
[04:57:38] berserk_ren: has joined #RubyOnRails
[04:59:11] elton: has joined #RubyOnRails
[05:01:33] rubyonrailed: has joined #RubyOnRails
[05:02:11] maloik: has joined #RubyOnRails
[05:05:02] melonstorm: has joined #RubyOnRails
[05:10:07] annlewis: has joined #RubyOnRails
[05:10:13] kegan_: has joined #RubyOnRails
[05:13:16] tjbiddle: has joined #RubyOnRails
[05:13:43] tjbiddle: Sorry - resending this, as I was disconnected right after for some reason:
[05:13:44] tjbiddle: Security question: I have an app that authenticates via phone number + sms code. The API then returns an auth_token that all future api requests must include as a header in order to authenticate. This auth_token is stored in the database. Is this just as bad as storing a password in a database?
[05:14:14] Radar: Is the API key hashed in anyway?
[05:14:52] sankaber: has joined #RubyOnRails
[05:15:26] tjbiddle: Radar: No - And that's what I was thinking may be the issue. So the auth_token is generated and stored as-is in the database. When the user authenticates via phone number + auth code sent to SMS, it returns this auth_token as-is
[05:15:32] shibabu: has joined #RubyOnRails
[05:15:44] tjbiddle: Should I generate an auth_token; hash it - store that in the database; and return the auth_token before it was hashed when the user authenticates?
[05:15:50] Radar: tjbiddle: Yeah, so when someone gets access to your DB then they have access to the auth tokens.
[05:16:01] Ropeney: tjbiddle: and https
[05:16:28] Radar: (I don't hash API keys in this app that I'm working on atm)
[05:20:42] tjbiddle: Cool - okay; I'll has them then. Next question: I'm doing authentication via before_action :authenticate - Which is doing a User.find_by_auth_token (Or in this case - will generate the hash, etc.) - I'm assuming this will be called on every single API request then, yes? Is this going to be slowing down my API?
[05:20:50] EXCHGR: has joined #RubyOnRails
[05:22:48] arup_r: has joined #RubyOnRails
[05:22:50] maloik: has joined #RubyOnRails
[05:23:42] fryguy: tjbiddle: only tangentially related, but you should consider doing something like HMAC instead of just sending the hash around
[05:25:36] tjbiddle: fryguy: Wouldn't the hash only be sent around during the initial login in this case? The auth_token (Randomly generated upon authentication) is sent to the user and used for all future requests; when they make a request and send this auth_token - I'll generate the hash and compare against database. No?
[05:25:41] rickmasta: has joined #RubyOnRails
[05:25:43] tjbiddle: Or are we thinking of different things
[05:25:58] arup_r: I forgot, if I can set the default value when adding a column to a table using a command line migration like this: rails g add_column_watermark_to_links watermark:boolean .. Is it possible ? I know can I add it by edit migration, asking just to know if such option exist ornot
[05:26:34] fryguy: tjbiddle: and if that auth_token gets intercepted, you lose. and people can just intercept requests and replay them
[05:27:06] tjbiddle: fryguy: SSL?
[05:27:18] fryguy: solves some of your problems, not all of them
[05:27:26] tjbiddle: fryguy: How so?
[05:27:50] fryguy: depends on the types of things you are trying to prevent I guess
[05:27:50] elton: has joined #RubyOnRails
[05:27:56] RegulationD: has joined #RubyOnRails
[05:28:07] fryguy: token management is trickier than you are giving it credit for
[05:28:26] chipotle: has joined #RubyOnRails
[05:28:47] tjbiddle: What else would I want to implement?
[05:29:34] fryguy: expiring tokens namely
[05:30:08] PlasmaStar: has joined #RubyOnRails
[05:30:44] tjbiddle: Seems simple enough; just require users to re-authenticate every x days when I expire then token?
[05:30:52] bronson: has joined #RubyOnRails
[05:31:21] fryguy: seems pretty long
[05:31:35] fryguy: what happens if 1 users tries to generate 2 tokens at the same time
[05:31:48] owenjones: has joined #RubyOnRails
[05:31:51] pwnd_nsfw: has joined #RubyOnRails
[05:31:54] fryguy: or is doing things like async threaded concurrent access to your api? how do you handle the error messaging to them in that case?
[05:32:16] fryguy: and, in doing that error messaging, how sure are you that you aren't enabling various side-channel attacks?
[05:32:26] arup_r: possible ? :)
[05:32:35] ewnd9: has joined #RubyOnRails
[05:33:30] arup_r: ok, not possible. http://stackoverflow.com/questions/22216355/how-to-add-default-value-to-a-column-being-added-through-rails-g-migration-com#comment33730993_22216405 :)
[05:34:53] tenderlove: has joined #RubyOnRails
[05:35:27] tenderlove: has joined #RubyOnRails
[05:35:45] tjbiddle: fryguy: 1 auth_token per user; auth_token is only given when a user authenticates with an sms code - Race condition in that case that only one of those requests will win before the acceptable auth_code is deleted. I don't see any issue with asynchronous api calls?
[05:35:52] tjbiddle: Am I being naive on this or offering proper solutions?
[05:36:20] lyoshajapan: tenderlove: can I haz rubykaigi ?
[05:36:26] fryguy: tjbiddle: you are being very naive
[05:36:34] johnflux: has joined #RubyOnRails
[05:36:35] johnflux: has joined #RubyOnRails
[05:36:36] fryguy: anyway, i'm going to bed
[05:36:56] tjbiddle: Thanks for your help fryguy
[05:36:58] lyoshajapan: The startup that promised me a ticket went under, and when I realised I wouldnt get one, I was too late to buy one, Im 29th in the waiting line
[05:38:07] IFrank00: has joined #RubyOnRails
[05:38:17] owenjones: has joined #RubyOnRails
[05:38:25] techsethi_: has joined #RubyOnRails
[05:39:56] DeXterbed: has joined #RubyOnRails
[05:43:32] maloik: has joined #RubyOnRails
[05:43:45] mary5030: has joined #RubyOnRails
[05:44:15] techsethi_: has joined #RubyOnRails
[05:49:24] sadaf2605: has joined #RubyOnRails
[05:50:03] techsethi: has joined #RubyOnRails
[05:51:50] bronson: has joined #RubyOnRails
[05:53:54] pyemkey: has joined #RubyOnRails
[05:55:11] annlewis: has joined #RubyOnRails
[05:56:11] dh5: has joined #RubyOnRails
[05:57:03] Maletor: has joined #RubyOnRails
[05:59:28] SteenJobs: has joined #RubyOnRails
[05:59:46] techsethi: has joined #RubyOnRails
[06:00:06] dh5: I cannot get my RoR application to route to staticpages made using a controller, i've tried everything manually possible adjusting the controllers and routes.rb, can anyone hint me where I might be wrong?
[06:00:35] sevenseacat: dh5: without seeing your code? no
[06:00:45] dh5: there is no code, its a brand new application
[06:01:06] sevenseacat: you have a controller, and you have made changes to routes
[06:01:16] Radar: dh5: Please put this app up on GitHub so that we can inspect it.
[06:01:31] dh5: I deleted the last set of files i generated
[06:01:55] Radar: dh5: Try it again and then when you get stuck put the code up on GitHub .
[06:02:02] Radar: dh5: We can't help you with problems that don't have code.
[06:02:10] bmalum: has joined #RubyOnRails
[06:02:18] Ropeney: dh5: https://www.railstutorial.org/book good one to follow to make again :)
[06:02:21] dh5: What code do you need to see? I'm literally using the generate function
[06:02:29] Radar: dh5: The application's code.
[06:02:31] Avon: has left #RubyOnRails: ("Bye!")
[06:02:39] Radar: dh5: If you're running "generate", you're running it inside an application.
[06:02:41] sevenseacat: and seeing the error might help too.
[06:02:52] dh5: rails generate controller StaticPages home
[06:02:59] dh5: Yes, I'm running it inside the application
[06:03:14] dh5: and I can see the files being generated via FTP
[06:03:55] rakm: dh5 if there's a def home; end in StaticPagesController, it should render app/views/static_pages/home.html.erb by default
[06:04:12] maloik: has joined #RubyOnRails
[06:04:28] SteenJobs: has joined #RubyOnRails
[06:05:13] dh5: @rakm its not
[06:05:20] Radar: FTP? You poor soul.
[06:05:23] dh5: I have no clue why
[06:05:35] rakm: anything interesting in server logs?
[06:05:38] Radar: dh5: Well, we'll happily help you as soon as we can see the code. until then, we can't really be much help.
[06:05:46] dh5: there is no code
[06:05:50] sevenseacat: there is code.
[06:05:53] Coldblackice: has joined #RubyOnRails
[06:05:56] Radar: dh5: Say it one more time. I dare ya. :)
[06:06:05] sevenseacat: what do you think 'generate' does? generates code.
[06:06:05] Radar: ACTION waits for sevenseacat to flip her lid
[06:06:27] dh5: dude, its a brand new application and I'm using the generate function
[06:06:40] sevenseacat: and you said you made every possible change to the existing code that you could think of
[06:06:44] Radar: dh5: Then there's code! Please stop saying there isn't, because "generate" generates new code.
[06:06:45] sevenseacat: which we would like to see.
[06:06:51] dh5: fine, there is code
[06:06:54] dh5: its default code
[06:06:57] dh5: which should work by default
[06:06:58] dh5: and its not
[06:06:59] helpa: If you don't provide any code, it becomes really difficult for us to help you. Providing code to reproduce the problem increases your chances of getting great, accurate help immensely.
[06:07:04] helpa: Show rather than tell. Explaining your problem with code, stacktraces or errors is always preferred to explaining it with just text. Show us what's happening, rather than telling us. Put the code on https://gist.github.com and then give us the HTTP link to the Gist.
[06:07:07] Radar: dh5: So you're going to put the code up on GitHub so that we can see it.
[06:07:12] sevenseacat: please follow the channel rules.
[06:07:41] lyoshajapan: has joined #RubyOnRails
[06:08:04] rakm: dh5 can you do `cat app/controllers/static_pages_controller.rb` in terminal from inside the proejct directory and paste it somewhere like gist.github.com or pastie.org?
[06:08:27] troys: has joined #RubyOnRails
[06:08:31] sevenseacat: "I can't get my app to route" is also not a useful error message that we can help with.
[06:09:07] bmalum: has joined #RubyOnRails
[06:09:10] dh5: http://pastebin.com/yKEdKXr5
[06:09:12] dh5: seriously
[06:09:28] dh5: http://pastie.org/10622200
[06:09:33] ur5us: has joined #RubyOnRails
[06:09:37] Radar: dh5: Ok, that's the controller. Where's the routeS?
[06:09:50] rakm: ok that looks fine. and now `cat config/routes.rb`
[06:10:23] dh5: http://pastie.org/10622202
[06:10:35] Radar: dh5: And how are you trying to access that route?
[06:10:41] Radar: http://localhost:3000/...?
[06:10:49] dh5: Radar, this is not my first time using RoR
[06:11:04] dh5: yes, localhost:3000/static_pages/home
[06:11:04] Radar: dh5: Please answer the question.
[06:11:04] sevenseacat: talk about biting the hand that feeds you
[06:11:12] Radar: dh5: and what happens when you do that?
[06:11:20] dh5: The page you were looking for doesn't exist. You may have mistyped the address or the page may have moved. If you are the application owner check the logs for more information.
[06:11:21] Radar: dh5: Take a screenshot if that'll make it easier.
[06:11:27] Radar: dh5: Did you start the server up yet>
[06:11:30] yfeldblum: has joined #RubyOnRails
[06:11:40] sevenseacat: are you running this app in a production env?
[06:11:43] sevenseacat: you mentioned ftp
[06:12:20] sevenseacat: if so, you'll need to restart your server after making changes.
[06:12:24] rakm: and can you also do `ls -al app/views/static_pages` just to be sure
[06:12:57] sevenseacat: thats also not an error you would ever see in a development env.
[06:13:32] maloik: has joined #RubyOnRails
[06:14:42] Radar: #rubyonrails to dh5
[06:15:18] rakm: hmm yeah i think restart server might be the issue
[06:15:27] rakm: everything else looks fine
[06:16:58] dh5: unicorn wasn't restarting
[06:17:07] dh5: go figure
[06:17:39] sevenseacat: I suggest not developing in a production environment.
[06:17:49] sevenseacat: it will be much more time consuming and error prone.
[06:18:27] Radar: ^^^^^^^^^
[06:18:47] Radar: Deploying app through FTP is a recipe for disaster
[06:18:50] dh5: Yeah. I'm not one for developing RoR using Windows
[06:18:59] Radar: Have you heard of our lord and saviour Linus, who begot Git?
[06:19:06] sevenseacat: whats that got to do with production?
[06:19:11] Radar: dh5: Great, so develop on an Ubuntu VM then.
[06:19:13] shibabu: has joined #RubyOnRails
[06:19:40] h7br1x: has joined #RubyOnRails
[06:20:37] dh5: I've done that too, still a pain in the ass.
[06:20:52] thejamespinto: dh5: set up full linux, buy a mac
[06:21:15] pontiki: what sort of remote system are you using, dh5 ?
[06:21:16] sevenseacat: most things on windows are a pain in the ass.
[06:21:33] sevenseacat: however, you still shouldnt develop in a production environment.
[06:22:11] dh5: I'm not going after anything complex, not yet at least @sevenseacat
[06:22:18] thejamespinto: your development environemtn needs to be as close to your production env as possible, and sadly Windows does not give us that, many Ruby libraries are built on top of Unix-only libs written in C. While Windows requires a system32 DLL for everything :(
[06:22:23] dh5: I'm using RubyMine + ftp, it works fine
[06:22:31] pontiki: why not ssh?
[06:22:41] sevenseacat: yeah except when you have to restart your server after every single code change
[06:22:41] h7br1x: Hey guys, I'm having an issue with multiple domains and Video.js.. Everything works fine on my main domain and localhost but on the 2nd domain the video isn't displayed. Any Suggestions? Working: http://viwwr.com/watch/564847 Broken: http://ontheblocknetwork.com/watch/564847
[06:22:45] thejamespinto: ACTION jaw drops
[06:22:50] dh5: SFTP, lol
[06:22:59] thejamespinto: ACTION jaw drops
[06:23:16] thejamespinto: dh5: dude, you cannot version your code?
[06:23:35] sevenseacat: anyway, if it works for you, good luck :)
[06:23:40] thejamespinto: if you work up something and fuck it over and need to come back to where you were before the day started?
[06:23:43] thejamespinto: what do you do?
[06:23:45] sevenseacat: but damn, I'd quit developing before I had to put up with that shit
[06:23:46] pontiki: dh5: if it works fine, then you're not having any problems
[06:23:53] thejamespinto: Control-Z Z Z Z Z Z?
[06:23:57] pontiki: if you're having problems, it's not working fine
[06:23:57] dh5: Jesus...GitHub is running on the server
[06:24:31] sevenseacat: all of github?
[06:24:34] sevenseacat: the entire site?
[06:24:39] dh5: I had one problem, and that problem was that Unicorn wasn't putting up with soft restarts...
[06:24:45] thejamespinto: What about when Windows crashes? (because it does, every day almost)
[06:24:46] sevenseacat: thats a big server.
[06:24:48] dh5: not even RoR related, lmao
[06:24:57] thejamespinto: how do you Control Z then?
[06:25:39] nertzy: has joined #RubyOnRails
[06:25:43] dh5: https://www.jetbrains.com/ruby/help/version-control-with-rubymine.html
[06:25:59] dh5: are you guys still using vim? lol
[06:26:03] dh5: It's 2015
[06:26:14] DeXterbed: has joined #RubyOnRails
[06:26:18] jgt4: has joined #RubyOnRails
[06:26:39] sevenseacat: dh5: thanks for telling us, we wouldnt have known
[06:26:45] sevenseacat: I thought it was still 1997
[06:26:50] helpa: http://i.imgur.com/tyViD.gif
[06:27:02] Radar: !popcorn3
[06:27:02] helpa: http://i.imgur.com/SsZ8pbG.gif
[06:27:10] Radar: Yup, that's the one that I wanted.
[06:28:01] Radar: "Windows is hard, but not hard enough for a badass like me so I'm trying to develop my Rails app by using FTP and running it on production"
[06:28:23] Radar: I have a very strong opinion that you're "doing it wrong"
[06:28:32] sevenseacat: I concur with that opinion
[06:28:39] sevenseacat: but if you're happy, enjoy
[06:28:43] Radar: Sublime Text 3 also runs on Ubuntu.
[06:28:56] tenderlove: has joined #RubyOnRails
[06:29:36] tenderlove: has joined #RubyOnRails
[06:29:52] dh5: I prefer visual studio
[06:30:21] otherj: has joined #RubyOnRails
[06:30:22] Radar: I _think_ it runs on Ubuntu too now.
[06:30:37] sevenseacat: that I'm not sure about.
[06:30:48] sevenseacat: rubymine does work on ubuntu though.
[06:31:09] thejamespinto: dh5: you do realize half of us left Microsoft 5..10 years ago, right?
[06:31:10] dh5: I'm actually on Enterprise 2015 :P
[06:31:32] dh5: But hey, if you like running express studio, be my guest!
[06:31:34] thejamespinto: dh5: I'm just checking if you are aware
[06:31:47] sevenseacat: more than half
[06:31:48] arBmind: has joined #RubyOnRails
[06:31:58] dh5: I'm not aware, lol.
[06:32:01] sevenseacat: windows is fine if you're developing windows-specific apps
[06:32:05] thejamespinto: dh5: OK now you are
[06:32:09] sevenseacat: if you're not, I have no idea why you would develop under windows
[06:32:37] sevenseacat: though even if i was, i'd be tempted to just put windows in a vm
[06:32:53] thejamespinto: dh5: as a matter of fact I was playing with some C# code today that I wanted to rewrite in Ruby, it is too small and it was running Mono anyways
[06:33:22] sevenseacat: windows is the least common OS for ruby dev, by far
[06:33:53] dh5: I'm sure I'll evenutally move over to one of the 20 ubuntu VMs I have on my NAS
[06:34:04] thejamespinto: It feels really funny, I feel 8 years younger when I look at C# code
[06:34:36] darkxploit: has joined #RubyOnRails
[06:34:52] dh5: As much as I'd like to work with C#, I have no interest outside of web development.
[06:35:11] dh5: It's the new craze apparently. Everyone got tired of recommending python.
[06:35:33] elton: has joined #RubyOnRails
[06:35:35] mdel: has joined #RubyOnRails
[06:35:37] thejamespinto: dh5: enough trolling, my apologies, I strongly recommend you read Lazarus' article on coming to Ruby. http://www.arubystory.com/2013/11/dont-give-up-on-ruby.html
[06:36:58] dh5: I've been working with ruby on and off for three years, every time I come up with an idea, ruby is the first thing that comes to mind. I've far from given up on it, I just never had the time until now.
[06:38:46] thejamespinto: dh5: I hear you :)
[06:39:03] dh5: I'm gonna go swap my build to use phusion passenger now ;) you fellas have a good night, I'm sure I'll you around.
[06:39:44] sevenseacat: ACTION shakes head in disbelief
[06:39:50] dh5: thanks radar/sevensea ;)
[06:40:45] sevenseacat: lucky fellas get to have a good night.
[06:40:55] sevenseacat: ACTION goes back to work
[06:41:13] thejamespinto: jeez C# is so cheesy :sigh: http://cl.ly/3o0O1Z000B40
[06:41:38] ElectricAlan: has joined #RubyOnRails
[06:41:40] dh5: Ah, you're in Australia
[06:41:45] ElectricAlan: ACTION all up in here
[06:41:51] sevenseacat: ElectricAlan: wb
[06:41:53] dh5: Tough luck :P
[06:42:04] sevenseacat: ACTION watches the point fly over dh5's head
[06:42:17] ElectricAlan: sevenseacat, do you know a good implementation of lookup fields I can use?
[06:42:23] sevenseacat: dh5: don't assume that everyone you're talking to is a 'fella'.
[06:42:33] sevenseacat: ElectricAlan: what do you define a 'lookup field' as?
[06:42:45] ElectricAlan: so like I want a field a user can type into and autocomplete, or click on and open up a searchable list
[06:42:48] ElectricAlan: preferably both
[06:42:49] Cervajz: has joined #RubyOnRails
[06:43:05] Oog: has joined #RubyOnRails
[06:43:10] sevenseacat: err... google javascript autocomplete plugins?
[06:43:29] sevenseacat: or do it manually if you want more control?
[06:43:36] helpa: dh5: Do not PM members of the channel without first asking if that is OK.
[06:43:40] sevenseacat: second warning.
[06:44:03] dh5: second warning?
[06:44:06] ElectricAlan: good thinking
[06:44:13] sevenseacat: to follow the channel rules.
[06:44:19] ElectricAlan: I was expecting ror might have something built in for that functionality
[06:44:25] ElectricAlan: but js plugins should be fine too
[06:44:32] rawrwx: has joined #RubyOnRails
[06:44:35] dh5: What was the first?
[06:44:42] ElectricAlan: ACTION has to read up on collection_select
[06:44:54] sevenseacat: [17:07:11] sevenseacat: please follow the channel rules.
[06:45:49] dh5: My fault. I didn't know pastebin was frowned upon.
[06:46:15] dh5: I'm not intentionally trying to break "the rules"
[06:46:28] sevenseacat: thats why we give warnings. you've had two.
[06:46:41] dh5: Yeah, and I used pastie right after
[06:46:44] dh5: Funny how that works
[06:46:53] sevenseacat: the warning wasnt even for pastebin.
[06:47:05] dh5: The first one was, apparently.
[06:47:10] sevenseacat: it was for refusing to provide code when you were asked to show it
[06:47:19] dh5: The second one was for apologizing to you for saying "fellas"
[06:47:20] sevenseacat: you will get one more warning.
[06:47:37] sevenseacat: I suggest reading the channel rules, as linked in the channel topic.
[06:47:44] dh5: It so happens that I did
[06:48:02] dh5: No need to be rude, honestly.
[06:48:08] ElectricAlan: dh5, imo, it's not really worth haggling over semantics with channel admins
[06:48:13] ElectricAlan: even if you're in the right
[06:48:48] dh5: Taking dumps on new comers to your community really doesn't do anyone much good
[06:48:51] ElectricAlan: 'rudeness' is subjective, and it may be inferred when none was intended, or vice-versa
[06:49:01] dh5: Specially for a community like ruby, which keeps getting smaller
[06:49:04] lemur: can we all calm down
[06:49:20] ElectricAlan: alright, everyone grab the popcorn and settle in
[06:49:44] baweaver: rules were mentioned, point was made, shows over folks
[06:49:47] dh5: Not really arguing Alan
[06:50:06] dh5: I had a pretty straight forward question and was trolled to the ground by four different channel admins
[06:50:28] ElectricAlan: my point is that they might have seen it differently
[06:50:37] ElectricAlan: humility is a virtue in all things
[06:51:03] ElectricAlan: they could claim that you were rude and disruptive, and their action were perfectly in line with the channel rules
[06:51:04] dh5: Yeah, and it goes both ways.
[06:51:21] ElectricAlan: either way, there's little to be gained in pressing the issue
[06:51:21] ChanServ: +o baweaver
[06:51:31] dh5: Yep. Good night.
[06:51:48] ChanServ: -o baweaver
[06:51:52] baweaver: ACTION sighs
[06:51:57] sevenseacat: that was entertaining.
[06:51:58] lyoshajapan: has joined #RubyOnRails
[06:52:11] ElectricAlan: I was about to say I respect the stubbornness even if I don't agree with it
[06:52:19] ElectricAlan: but they left
[06:52:42] ElectricAlan: baweaver, sry for stirring things up, if that's the perception of my actions
[06:52:50] sevenseacat: ElectricAlan: you're fine.
[06:52:53] ElectricAlan: more than happy to rein myself in if need be
[06:53:13] baweaver: let's not worry about the meta discussion and leave it at that shall we?
[06:53:37] ElectricAlan: well for now I'm gonna not bother with the lookup functionality, I can implement that later on if I want it that badly
[06:53:37] tagrudev: has joined #RubyOnRails
[06:53:53] sevenseacat: ACTION still looking at checkboxes that aren't staying checked
[06:56:16] rvanlieshout: has joined #RubyOnRails
[06:56:54] solars: has joined #RubyOnRails
[06:57:35] nbdy: has joined #RubyOnRails
[06:57:41] krz: has joined #RubyOnRails
[06:57:52] Maletor: has joined #RubyOnRails
[06:58:18] ur5us: has joined #RubyOnRails
[06:58:37] ElectricAlan: rofl checkboxes
[06:59:13] sevenseacat: oh yeah you were talking about those lol
[07:00:09] rawrwx: has joined #RubyOnRails
[07:00:10] ibouvousaime: has joined #RubyOnRails
[07:00:19] tenderlove: has joined #RubyOnRails
[07:00:29] lemur: has joined #RubyOnRails
[07:00:39] ElectricAlan: yeah and everyone saying they're fine and never the cause of problems
[07:01:04] sevenseacat: they are fine, same as any other type of field :) i just made a silly mistake
[07:01:24] ElectricAlan: so I just went through the rules and there's no mention of family friendly language being a requirement
[07:01:40] ElectricAlan: ACTION is satisfied now
[07:01:57] lessless: has joined #RubyOnRails
[07:02:04] kmckelvi1: has joined #RubyOnRails
[07:02:05] sevenseacat: we swear like troopers :P though if you get crazily excessive, or say offensive things, you might get asked to watch yorself
[07:02:19] ElectricAlan: so jsut at a guess, the checkbox issue you were having, did it happen to be forgetting to add the checkboxes to include params in your controller?
[07:02:21] sevenseacat: but the odd shit or fuck or whatever? meh, who cares
[07:02:31] sandstrom: has joined #RubyOnRails
[07:02:51] Pazician: has joined #RubyOnRails
[07:03:06] sevenseacat: nah, it was trying to check the boxes if the ID of the record (as an integer) matched the form param (as a string), which was an oops
[07:03:29] sevenseacat: rvanlieshout: howdy
[07:03:52] aganov: has joined #RubyOnRails
[07:04:07] annlewis: has joined #RubyOnRails
[07:06:14] baweaver_: has joined #RubyOnRails
[07:06:53] havenwood: has joined #RubyOnRails
[07:07:54] elton: has joined #RubyOnRails
[07:08:13] agit0: has joined #RubyOnRails
[07:08:14] AzaToth: has joined #RubyOnRails
[07:09:04] ElectricAlan: man fucking checkboxes and their value types
[07:13:21] rvanlieshout: checkboxes are like the simples thing?
[07:14:09] jmrepetti: has joined #RubyOnRails
[07:16:20] elton: has joined #RubyOnRails
[07:20:39] arup_r: has joined #RubyOnRails
[07:20:43] yardenbar: has joined #RubyOnRails
[07:25:25] havenwood: has left #RubyOnRails: ("Bye!")
[07:28:38] RegulationD: has joined #RubyOnRails
[07:28:45] Cervajz: has joined #RubyOnRails
[07:29:04] ewnd9: has joined #RubyOnRails
[07:32:09] lyoshajapan: has joined #RubyOnRails
[07:33:44] ElectricAlan: ACTION has to get gone
[07:33:52] ElectricAlan: I got a question for yo when I get home tho
[07:35:06] comrad: has joined #RubyOnRails
[07:36:18] trautwein: has joined #RubyOnRails
[07:38:32] defsdoor: has joined #RubyOnRails
[07:38:39] tjbiddle: has joined #RubyOnRails
[07:41:27] elton: has joined #RubyOnRails
[07:42:24] emilkarl: has joined #RubyOnRails
[07:44:11] lyoshajapan: has joined #RubyOnRails
[07:45:04] lyoshajapan: ruby magic: why true && nil returns nil?
[07:45:49] thejamespinto: lyoshajapan: for the same reason `true and 'awesome'` returns 'awesome'
[07:45:52] Coldblackice: has joined #RubyOnRails
[07:47:05] brunto: has joined #RubyOnRails
[07:48:03] lyoshajapan: thejamespinto: How does it work under the hood?
[07:49:57] thejamespinto: lyoshajapan: (true && 1) retuns 1; (false && 1) returns false
[07:50:05] thejamespinto: it is ruby bitwise
[07:50:08] thejamespinto: pretty standard
[07:55:58] thecyclone: has joined #RubyOnRails
[07:56:00] pyemkey: has joined #RubyOnRails
[07:57:17] ibouvousaime: has joined #RubyOnRails
[07:58:17] tjbiddle: has joined #RubyOnRails
[07:58:38] Maletor: has joined #RubyOnRails
[07:59:40] sevenseacat: has joined #RubyOnRails
[08:00:56] raunicolae: has joined #RubyOnRails
[08:02:02] krz: has joined #RubyOnRails
[08:04:35] maloik: has joined #RubyOnRails
[08:04:55] annlewis: has joined #RubyOnRails
[08:06:19] steffkes: has joined #RubyOnRails
[08:06:19] steffkes: has joined #RubyOnRails
[08:07:30] rtl: has joined #RubyOnRails
[08:10:01] jgt4: has joined #RubyOnRails
[08:10:13] darutoko: has joined #RubyOnRails
[08:10:36] pyemkey: has joined #RubyOnRails
[08:11:32] redondos: has joined #RubyOnRails
[08:11:43] arup_r: has joined #RubyOnRails
[08:14:01] brunto: has joined #RubyOnRails
[08:14:15] jas02: has joined #RubyOnRails
[08:14:17] kmckelvi1: has joined #RubyOnRails
[08:16:59] agit0: has joined #RubyOnRails
[08:18:46] iateadonut: has joined #RubyOnRails
[08:21:14] shibabu: has joined #RubyOnRails
[08:21:16] arup_r: has joined #RubyOnRails
[08:23:33] Coldblackice: has joined #RubyOnRails
[08:23:36] chandlerbing: has joined #RubyOnRails
[08:24:38] tenderlove: has joined #RubyOnRails
[08:25:22] speakingcode: has joined #RubyOnRails
[08:25:28] paulodiniz: has joined #RubyOnRails
[08:27:06] jbrhbr: has joined #RubyOnRails
[08:27:33] Cervajz: has joined #RubyOnRails
[08:28:47] SalexW: has joined #RubyOnRails
[08:28:56] theod: has joined #RubyOnRails
[08:30:01] arup_r: has joined #RubyOnRails
[08:30:18] sandstrom: has joined #RubyOnRails
[08:30:28] tjbiddle: has joined #RubyOnRails
[08:32:09] netzfisch: has joined #RubyOnRails
[08:33:15] lyoshajapan: has joined #RubyOnRails
[08:35:19] blackhuey: has joined #RubyOnRails
[08:36:16] arup_r: has joined #RubyOnRails
[08:36:59] arBmind: has joined #RubyOnRails
[08:39:57] kitsuneyo: has joined #RubyOnRails
[08:41:01] tjbiddle: has joined #RubyOnRails
[08:41:44] johnflux: has joined #RubyOnRails
[08:41:45] johnflux: has joined #RubyOnRails
[08:43:17] Tempesta: has joined #RubyOnRails
[08:43:53] wmdrossard: has joined #RubyOnRails
[08:45:30] gthank: has joined #RubyOnRails
[08:45:30] gthank: has joined #RubyOnRails
[08:47:29] tjbiddle: has joined #RubyOnRails
[08:48:26] jgt4: has joined #RubyOnRails
[08:50:58] theod: has joined #RubyOnRails
[08:55:16] diegoviola: has joined #RubyOnRails
[08:56:42] cornerma1: has joined #RubyOnRails
[08:59:22] Maletor: has joined #RubyOnRails
[08:59:43] krzkrz: has joined #RubyOnRails
[09:00:59] Xentil: has joined #RubyOnRails
[09:01:10] artto: has joined #RubyOnRails
[09:02:05] yfeldblum: has joined #RubyOnRails
[09:03:48] lyoshajapan: has joined #RubyOnRails
[09:04:48] rubyonrails798: has joined #RubyOnRails
[09:04:54] chipotle: has joined #RubyOnRails
[09:05:41] annlewis: has joined #RubyOnRails
[09:07:34] drptbl: has joined #RubyOnRails
[09:09:07] kitsuneyo: i'm using a bootstrap modal to show an edit form. my update action updates the record and refreshes the list of records, but scrolling locks.
[09:09:13] jsrn_: has joined #RubyOnRails
[09:10:15] kitsuneyo: here's a gist with the controller: https://gist.github.com/kitsuneyo/58e9384fdd130d74b414
[09:11:04] sevenseacat: "scrolling locks"?
[09:11:46] quazimodo: has joined #RubyOnRails
[09:13:22] sevenseacat: you dont have an edit or an update action
[09:13:35] sevenseacat: did you post the right controller?
[09:14:15] DavidDudson: has joined #RubyOnRails
[09:16:07] kitsuneyo: hey sevenseacat
[09:16:29] Guest3483: has joined #RubyOnRails
[09:17:22] bruce_lee: has joined #RubyOnRails
[09:17:38] kitsuneyo: i've updated the gist properly now: https://gist.github.com/kitsuneyo/58e9384fdd130d74b414
[09:18:19] kitsuneyo: i kind of hacked this update action together, i guess it's this that's at fault
[09:18:39] tenderlove: has joined #RubyOnRails
[09:18:56] bryanl: has joined #RubyOnRails
[09:19:06] kitsuneyo: i followed somebody else's solution for the modal - http://www.jetthoughts.com/blog/tech/2014/08/27/5-steps-to-add-remote-modals-to-your-rails-app.html
[09:19:22] tenderlove: has joined #RubyOnRails
[09:19:33] sevenseacat: so what exactly is the problem?
[09:19:42] Sceko: has joined #RubyOnRails
[09:19:43] Sceko: has joined #RubyOnRails
[09:20:24] kitsuneyo: the page locks after an edit
[09:20:30] kitsuneyo: it won't let me scroll up or down
[09:20:46] sevenseacat: the modal still blocks the window?
[09:21:09] kitsuneyo: no, the modal disappears as it should
[09:21:23] sevenseacat: how are you closing the modal?
[09:21:25] kitsuneyo: but scrolling of the page freezes
[09:22:23] Macaveli: has joined #RubyOnRails
[09:23:11] kitsuneyo: sevenseacat, see modals.js.coffee which i just added to the gist: https://gist.github.com/kitsuneyo/58e9384fdd130d74b414
[09:23:27] shibabu: has joined #RubyOnRails
[09:24:31] Macaveli: I've created following method to strip all strange characters from my strings https://gist.github.com/DelawareConsulting/12adc0e2cf0c5bf45f22 but the Word Bullets are not filtered "??? Zefzefz ??? Zefzefze Zef zefz" Anyone have a suggestion for this?
[09:24:53] sevenseacat: uh.... interesting code
[09:25:03] sevenseacat: that was to kitsuneyo
[09:25:16] darkxploit: has joined #RubyOnRails
[09:26:33] sevenseacat: so which code is being hit there?
[09:26:52] adac: has joined #RubyOnRails
[09:27:41] Macaveli: me or kitsuneyo sevenseacat ?
[09:27:48] sevenseacat: I already said kitsuneyo
[09:29:20] RegulationD: has joined #RubyOnRails
[09:29:44] kitsuneyo: sevenseacat: i guess the part from "$(document).on 'ajax:success'," to "window.location = url"
[09:31:00] bigbob: has joined #RubyOnRails
[09:31:37] njero: has joined #RubyOnRails
[09:34:03] kitsuneyo: yeah i guess, i'm not so good with the javascript
[09:34:51] theod: has joined #RubyOnRails
[09:35:22] sevenseacat: well I'm "guessing" that your modal window isnt closing properly, meaning the blocking backdrop is catching your scrolling
[09:35:57] kitsuneyo: sounds a decent guess
[09:37:06] paulodiniz: has joined #RubyOnRails
[09:37:57] futilegames: has joined #RubyOnRails
[09:40:26] bryanl: has joined #RubyOnRails
[09:41:44] paulodiniz: has joined #RubyOnRails
[09:42:29] xwalk: has joined #RubyOnRails
[09:43:01] reber: has joined #RubyOnRails
[09:43:07] Mac|AFK: sevenseacat I've created an SO topic about this http://stackoverflow.com/questions/34198300/clean-tabs-crlf-word-bullets-but-keep-french-characters-in-rails
[09:43:21] maesitos: has joined #RubyOnRails
[09:43:24] bigbob: has joined #RubyOnRails
[09:46:55] lacrymology: has joined #RubyOnRails
[09:47:00] rodfersou: has joined #RubyOnRails
[09:47:22] lacrymology: has joined #RubyOnRails
[09:50:04] tenderlove: has joined #RubyOnRails
[09:50:08] xwalk: Hello. When clicking the link shown in this gist, my application throws a "Couldn't find User with 'id'=destroy" message. Can someone clarify how I should be sending the parameters or configuring routing?: https://gist.github.com/crosswalk/7c4c2199f164bbf80862
[09:52:36] tbuehlmann: xwalk, you are missing an `method: :delete` option in your link_to method
[09:52:38] sevenseacat: xwalk: I have a lot of issues with that code, but the reason its not working is because you're not making a DELETE request with your link
[09:52:57] bigbob: i think you're missing a comma after the id parameter
[09:53:15] tbuehlmann: also, why exactly don't you use `resources :users`?
[09:54:02] sevenseacat: thats the other major issue i have with it
[09:54:07] bigbob: i think answering xwalk's most pressing question first is more helpful.
[09:54:15] tbuehlmann: I'm afraid I'm entering a rabbit hole here, I'll leave it to the other friendly helpers in here :)
[09:54:17] sevenseacat: plus you're not specifying which user to destroy
[09:55:02] conta: has joined #RubyOnRails
[09:55:54] diegoviola: sevenseacat: can you tell me if this is more or less what you recommended by moving statuses to models and doing the colors stuff in helper: https://gist.github.com/diegoviola/d7f470bbfa401b709f34
[09:56:10] kitsuneyo: xwalk, my guess is you need something like: <%= link_to image_tag("deletesprite.png"), users_destroy_path(id: user.id), method: delete, data: { confirm: 'Are you sure you want to remove this user?' } %>
[09:56:31] diegoviola: I'm not sure how else I can refactor this
[09:56:39] xwalk: tbuehlmann: ":action => destroy" doesn't perform the same action as the `method: :delete`?
[09:56:42] ibouvousaime: has joined #RubyOnRails
[09:56:49] sevenseacat: diegoviola: sort of, the model code could be incredibly simplified, and i'm not sure what's with all the `try` in the view helper
[09:57:13] sevenseacat: xwalk: not at all.
[09:57:49] bmalum: has joined #RubyOnRails
[09:57:56] xwalk: sevenseacat: The line in my controller `@user = User.find(params[:id]) doesn't specify the user?
[09:58:07] sevenseacat: you're not even getting to that part
[09:58:38] sevenseacat: the route users_destroy_path does not specify which user you should be deleting
[09:59:03] triangles: has joined #RubyOnRails
[09:59:08] xwalk: Ah. That needs to have user passed to it as an argument, doesn't it?
[09:59:08] sevenseacat: xwalk: !gettingstarted see http://guides.rubyonrails.org/getting_started.html#deleting-articles
[09:59:08] helpa: xwalk: http://guides.rubyonrails.org/getting_started.html - Getting started with Ruby on Rails guide written by Mike Gunderloy and Ryan Bigg
[09:59:11] diegoviola: sevenseacat: well, I have to return either one
[09:59:35] sevenseacat: diegoviola: your code says "return true if (something truthy) else return false"
[09:59:57] sevenseacat: why not just "(something that might be truthy)"
[10:00:05] sevenseacat: its either going to be true or false
[10:00:16] Maletor: has joined #RubyOnRails
[10:00:42] kitsuneyo: xwalk, in routes you should try resources :users instead of all the routes you've set. then check rake routes in terminal to see how your paths have changed
[10:01:52] xwalk: kitsuneyo: Alright. Doing it here. sevenseacat: Going through that part again and checking that as well.
[10:01:55] artto: has joined #RubyOnRails
[10:02:03] ebryn: has joined #RubyOnRails
[10:02:08] Hosh: has joined #RubyOnRails
[10:02:17] kitsuneyo: xwalk, but first you should really go through an up to date rails tutorial like https://www.railstutorial.org so you can learn some basics
[10:02:35] sevenseacat: !r4ia I recommend that book (disclaimer: I wrote it)
[10:02:35] helpa: Rails 4 in Action - http://manning.com/bigg2 - An excellent book combining Rails and TDD/BDD development. Written by Rebecca Skinner, Steve Klabnik, Ryan Bigg, Yehuda Katz
[10:02:44] kitsuneyo: you're almost making me look like i know what i'm talking about, and that can't be good.
[10:03:16] jhill: has joined #RubyOnRails
[10:03:30] upgrayeddd: has joined #RubyOnRails
[10:04:28] diegoviola: sevenseacat: https://gist.github.com/a9c22e4abb7a91a6add3
[10:04:30] diegoviola: sevenseacat: ?
[10:04:44] sevenseacat: much simpler, isnt it
[10:04:50] diegoviola: yeah, thanks
[10:05:16] sevenseacat: though those methods dont look like theyre in the right place
[10:05:29] sevenseacat: none of them have anything to do with the correspondence theyre being called on
[10:06:26] annlewis: has joined #RubyOnRails
[10:06:35] xwalk: kitsuneyo: I've spend a week or so away from the code I've been working on, so revisiting the tutorial is wise advice.
[10:07:03] xwalk: sevenseacat: I'll go through that section with more focus as well.
[10:07:06] xwalk: Thank you for your help.
[10:07:35] diegoviola: sevenseacat: I was thinking about creating a Sedex/Department class for them, etc
[10:08:08] diegoviola: then have Sedex#status and #status_late
[10:08:12] diegoviola: but I don't know what I can use for that
[10:08:58] diegoviola: I don't want to create a new model for Sedex
[10:09:03] kitsuneyo: how do i monitor how my DOM is changing in the browser when i open and close a javascript modal? (using Safari or Chrome)
[10:09:33] srinidhi: has joined #RubyOnRails
[10:10:17] kitsuneyo: i guess it's the css i need to monitor actually
[10:10:35] maesitos: has joined #RubyOnRails
[10:11:30] solars: has joined #RubyOnRails
[10:13:24] kitsuneyo: sevenseacat, i think i found the problem. when a modal is opened, it adds a 'modal-open' class to the body tag. when i save a record, that class isn't being removed. i don't know how to fix it yet, but thanks for your help
[10:14:02] Pumukel: has joined #RubyOnRails
[10:18:09] morsik: has left #RubyOnRails: ()
[10:18:45] maesitos: has joined #RubyOnRails
[10:19:50] teclator: has joined #RubyOnRails
[10:20:09] FernandoBasso: has joined #RubyOnRails
[10:20:51] DukeDave: has joined #RubyOnRails
[10:23:11] Bloomer: has joined #RubyOnRails
[10:23:12] kitsuneyo: fixed by adding $( 'body' ).removeClass( 'modal-open' ) to my modals.js :DDDD
[10:23:54] Peg-leg: has joined #RubyOnRails
[10:26:11] tvw: has joined #RubyOnRails
[10:26:44] kmckelvi1: has joined #RubyOnRails
[10:26:49] baweaver: has joined #RubyOnRails
[10:29:02] ewnd9: has joined #RubyOnRails
[10:29:19] bronson: has joined #RubyOnRails
[10:30:53] Tempesta: has joined #RubyOnRails
[10:34:02] iateadonut: has joined #RubyOnRails
[10:37:21] sandstrom: has joined #RubyOnRails
[10:38:28] davonrails: has joined #RubyOnRails
[10:39:16] davonrails: has left #RubyOnRails: ()
[10:39:21] puria: has joined #RubyOnRails
[10:40:03] davfabonrails: has joined #RubyOnRails
[10:43:32] tenderlove: has joined #RubyOnRails
[10:46:45] elton: has joined #RubyOnRails
[10:47:29] weckl: has joined #RubyOnRails
[10:50:11] ibouvousaime: has joined #RubyOnRails
[10:50:52] davfabonrails: has left #RubyOnRails: ()
[10:50:55] adre: has joined #RubyOnRails
[10:51:10] davfabonrails: has joined #RubyOnRails
[10:53:11] nfk|laptop: has joined #RubyOnRails
[10:53:12] marr: has joined #RubyOnRails
[10:53:51] nettoweb: has joined #RubyOnRails
[10:54:32] nettoweb: guys, is it possible to validate phone field in user model just when my user has_one company? if not (single user), dont validate phone field
[10:55:04] davfabonrails: has left #RubyOnRails: ()
[10:57:10] defsdoor: nettoweb, yes that is possible
[10:58:01] kitsuneyo: has joined #RubyOnRails
[10:59:41] wireshark: has joined #RubyOnRails
[10:59:55] nettoweb: defsdoor can you send me some thing about how to do it?
[11:00:32] defsdoor: you need either a conditional validation or a method that you call when validating - google it
[11:00:54] SalexW: has joined #RubyOnRails
[11:00:55] Maletor: has joined #RubyOnRails
[11:01:45] emilebosch: has joined #RubyOnRails
[11:02:12] workmad3: has joined #RubyOnRails
[11:02:49] emilebosch: hi people, i was wondering if anyone here build a multi db/user solution on rails which plays nicely with connectionpools?
[11:03:23] emilebosch: all the solutions i come up with revolve around hacking connectionhandler which is a bit crazy
[11:03:45] davfabonrails: has joined #RubyOnRails
[11:04:01] davfabonrails: has left #RubyOnRails: ()
[11:08:05] annlewis: has joined #RubyOnRails
[11:09:24] srinidhi: has joined #RubyOnRails
[11:10:05] brunto: has joined #RubyOnRails
[11:11:47] sadaf2606: has joined #RubyOnRails
[11:12:25] loren: has joined #RubyOnRails
[11:13:14] teclator: has joined #RubyOnRails
[11:14:57] bbrowning: has joined #RubyOnRails
[11:18:30] blackhuey1: has joined #RubyOnRails
[11:21:28] spiman: has joined #RubyOnRails
[11:24:11] davonrails: has joined #RubyOnRails
[11:24:20] spiman: hello, has anyone followed the growing rails application in practice book? I'm following the advice about namespacing my models, since it feels very well suited to my situation. But I've reached a point where some of my models could be nested two namespaces deep, and I'm not so sure if it would be beneficial. Any thoughts on this?
[11:25:06] shibabu: has joined #RubyOnRails
[11:25:20] c355E3B: has joined #RubyOnRails
[11:26:14] sevenseacat: I've never wanted to namespace models.
[11:28:14] daivyk: has joined #RubyOnRails
[11:28:36] spiman: Me too up to now, but I have a lot of small model classes (either AR or POROs) , and moving them around would be easier for the newer guys to navigate through the important stuff in the application
[11:29:24] Spami: has joined #RubyOnRails
[11:30:11] RegulationD: has joined #RubyOnRails
[11:30:28] dangerousdave: has joined #RubyOnRails
[11:32:50] dideler: has joined #RubyOnRails
[11:35:01] renegadeandy: has joined #RubyOnRails
[11:36:25] Diabolik: im trying to write a validation in spree with an international store to ensure the basket value is less than 20k swiss francs, but using a variety of currencies
[11:36:28] Diabolik: how would i write the callback
[11:36:30] Diabolik: here's what i have so far
[11:36:34] Diabolik: https://gist.github.com/askl56/6d9d53b1ab09b831f40e
[11:37:09] silverdust: Hi. I need help making a model structure decision . I'm building a soughta ecommerce platform and there's users (as in merchants) and users (as in people who manage content from cms). Should I put them in one table and distinguish by a usertype column or put them in different tables
[11:37:38] tenderlove: has joined #RubyOnRails
[11:38:14] tenderlove: has joined #RubyOnRails
[11:38:27] rvanlieshout: silverdust: there are several ways
[11:38:44] rvanlieshout: a role could do fine i guess
[11:39:34] kmckelvi1: has joined #RubyOnRails
[11:40:26] Cervajz: has joined #RubyOnRails
[11:40:30] silverdust: Yea a role perhaps. So you think distinguishing by a column is a lot more sensible
[11:40:53] silverdust: Instead of having to repeat an Auth process on an entirely new model
[11:41:37] kitsuneyo: what is the best way to set a <li> class on a view to 'active' if it's the current page? i'm using this -- current_page?(link_path)? 'active' : '' -- but it doesn't work with pagination because of the params in the url
[11:41:38] silverdust: I'd go with that and role is a better name than usertype. Thanks
[11:41:52] rvanlieshout: as long as you don't use STI you're set :)
[11:42:30] mostlybadfly: has joined #RubyOnRails
[11:43:30] silverdust: As in Software Thread Integration?
[11:44:01] silverdust: nvm. Saw a thread to describe what you mean
[11:46:52] weckl: Hi guys. I'm trying to run "rvm use ..." with system/exec, inside a method but I'm getting "RVM is not a function, selecting rubies with 'rvm use ...' will not work.". Is there any change I can run this commands as if it was in the terminal? Thanks.
[11:47:44] elton: has joined #RubyOnRails
[11:49:40] emilkarl: has joined #RubyOnRails
[11:53:15] craigp: has joined #RubyOnRails
[11:53:52] adre: has joined #RubyOnRails
[11:54:19] zpe: has joined #RubyOnRails
[11:54:25] Fly80: has joined #RubyOnRails
[11:59:27] silverdust: rvanlieshout: I've been reading about STI and wonder why you suggest against it. Also I remember that I once had a problem using type column and when I asked response was it is reserved. Then why can it be used with STI
[11:59:31] gambl0re: has joined #RubyOnRails
[11:59:44] sandstrom: has joined #RubyOnRails
[12:00:33] rvanlieshout: i've been here a long time and still waiting for the case where STI works well
[12:00:40] rvanlieshout: and where somebody has choosen it because of a proper comparison
[12:01:37] renegadeandy: Can somebody help me to understand if this searchable block for sunspot would correctlhy include address line 1, line 2, city and postcode? https://gist.github.com/ArmyAndy/1d91f0b680ede1786e87 Because it seems it only includes venue.address_line_1
[12:01:41] Maletor: has joined #RubyOnRails
[12:02:02] nfk|laptop: has joined #RubyOnRails
[12:02:16] silverdust: but about the type column. So it's reserved for just STI cases
[12:02:26] rvanlieshout: it's not reserved
[12:02:29] rvanlieshout: it's just a type column
[12:02:42] rvanlieshout: and don't confuse polymorphic with sti
[12:03:09] silverdust: I just read this on STI http://juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/
[12:03:18] emilebosch: I sorta can for some cases understand STI
[12:03:22] rvanlieshout: i don't use info from 9 years ago
[12:03:26] emilebosch: but polymorphic is the devilbut
[12:03:38] emilebosch: i regret all my polymorphic decisions i???ve ever made haha
[12:03:43] rvanlieshout: there is nothing wrong with polymorphic :)
[12:03:48] rvanlieshout: people choose STI of false reasons
[12:03:58] emilebosch: on database level polymorphic is quite painful.
[12:04:07] emilebosch: ie. no foreigh constraints
[12:04:24] emilebosch: so now i just go for a model with x times belongs_to
[12:04:33] emilebosch: also polymorphic kills eager loading
[12:04:46] rvanlieshout: and that's a valid reason
[12:05:04] rvanlieshout: so what would a valid reason for STI?
[12:05:24] emilebosch: i know use a hybrid aproach of STI and the multiple_belongs_to
[12:05:25] rvanlieshout: because of some few attributes that only exist on some of your subclasses? so how much do empty columns actually cost in your db engine?
[12:05:27] emilebosch: which is actually working like a gem
[12:05:44] emilebosch: but maybe thats jsut for my activity feed use case
[12:05:52] adre: has joined #RubyOnRails
[12:06:46] raunicolae: has left #RubyOnRails: ("Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is")
[12:07:10] Or1on: has joined #RubyOnRails
[12:07:11] Or1on: has joined #RubyOnRails
[12:07:11] speakingcode: has joined #RubyOnRails
[12:08:00] annlewis: has joined #RubyOnRails
[12:08:24] tenderlove: has joined #RubyOnRails
[12:08:45] renegadeandy: Can somebody help me to understand if this searchable block for sunspot would correctlhy include address line 1, line 2, city and postcode? https://gist.github.com/ArmyAndy/1d91f0b680ede1786e87 Because it seems it only includes venue.address_line_1
[12:09:05] tenderlove: has joined #RubyOnRails
[12:10:14] artto: has joined #RubyOnRails
[12:12:15] renegadeandy: Any sunspot users here?
[12:13:05] brunto: has joined #RubyOnRails
[12:15:11] krzkrz: has joined #RubyOnRails
[12:15:38] lacrymology: has joined #RubyOnRails
[12:16:31] artto: has joined #RubyOnRails
[12:17:02] emilkarl: has joined #RubyOnRails
[12:19:00] artto: has joined #RubyOnRails
[12:19:10] Detch: has joined #RubyOnRails
[12:24:36] quazimodo: has joined #RubyOnRails
[12:25:37] nya: has joined #RubyOnRails
[12:26:05] tknz: has joined #RubyOnRails
[12:26:16] yfeldblum: has joined #RubyOnRails
[12:26:45] jgt4: has joined #RubyOnRails
[12:28:08] baweaver: has joined #RubyOnRails
[12:29:57] bronson: has joined #RubyOnRails
[12:33:06] artto: has joined #RubyOnRails
[12:35:04] chipotle: has joined #RubyOnRails
[12:43:25] zeel: has joined #RubyOnRails
[12:44:16] thecyclone: has joined #RubyOnRails
[12:47:24] ornerymoose: has joined #RubyOnRails
[12:54:52] Denis_: has joined #RubyOnRails
[12:56:21] Ergo: has joined #RubyOnRails
[12:56:50] alias-ls-to-rm: has joined #RubyOnRails
[12:56:55] KnownSyntax_: has joined #RubyOnRails
[12:56:55] KnownSyntax_: has joined #RubyOnRails
[12:57:20] tercenya: has joined #RubyOnRails
[12:59:25] execute: has joined #RubyOnRails
[12:59:26] execute: has joined #RubyOnRails
[12:59:34] Olipro: has joined #RubyOnRails
[13:01:56] SalexW: has joined #RubyOnRails
[13:02:26] Maletor: has joined #RubyOnRails
[13:03:11] tenderlove: has joined #RubyOnRails
[13:03:45] Spami: has joined #RubyOnRails
[13:04:38] hardtail: has joined #RubyOnRails
[13:08:35] FooMunki: has joined #RubyOnRails
[13:08:45] annlewis: has joined #RubyOnRails
[13:10:49] Pro|: has joined #RubyOnRails
[13:12:49] jkamenik: has joined #RubyOnRails
[13:13:03] artto: has joined #RubyOnRails
[13:17:16] d0nn1e: has joined #RubyOnRails
[13:17:21] ornerymoose: has joined #RubyOnRails
[13:17:25] A124: has joined #RubyOnRails
[13:18:43] jamo: has joined #RubyOnRails
[13:24:44] nya: has joined #RubyOnRails
[13:25:52] nonmadden: has joined #RubyOnRails
[13:26:45] jtb__: has joined #RubyOnRails
[13:27:50] shibabu: has joined #RubyOnRails
[13:30:11] B1n4r10: has joined #RubyOnRails
[13:30:56] RegulationD: has joined #RubyOnRails
[13:33:11] lacrymology: has joined #RubyOnRails
[13:35:26] hardtail: has joined #RubyOnRails
[13:36:51] zpe: has joined #RubyOnRails
[13:43:56] Spami: has joined #RubyOnRails
[13:44:44] chipotle: has joined #RubyOnRails
[13:44:58] artto: has joined #RubyOnRails
[13:47:43] ldnunes: has joined #RubyOnRails
[13:49:11] IrishGringo: has joined #RubyOnRails
[13:49:36] tagrudev: has joined #RubyOnRails
[13:49:44] goldbug: has joined #RubyOnRails
[13:50:23] elton: has joined #RubyOnRails
[13:50:56] goldbug: Hey dudes and dudettes. I'm trying to pass a parameter (language_key) to a javascript via the URL. I'm doing it wrong, but not sure how. Here's what I'm trying: <%= link_to I18nData.languages[other_language.to_s.upcase], data: { language_key: other_language.to_s.upcase }, remote: true %>
[13:54:03] nullwarp: has joined #RubyOnRails
[13:54:37] acosonic: Hi, how would a route to controller look like for this:
[13:54:37] _Tariq: has joined #RubyOnRails
[13:54:38] acosonic: ActionView::Template::Error (No route matches {:action=>"show", :controller=>"assigned_kanbans", :id=>nil}):
[13:55:12] uranther: has joined #RubyOnRails
[13:55:13] jxf: has joined #RubyOnRails
[13:57:45] andrew-l`: has joined #RubyOnRails
[13:59:23] n1lo: has joined #RubyOnRails
[13:59:32] IFrank00: has joined #RubyOnRails
[13:59:50] null__: has joined #RubyOnRails
[13:59:50] null__: has joined #RubyOnRails
[13:59:56] w0rd-driven: has joined #RubyOnRails
[14:00:05] webdestroya: has joined #RubyOnRails
[14:00:11] dstarh: has joined #RubyOnRails
[14:00:23] gr3yR0n1n: has joined #RubyOnRails
[14:01:02] elaptics: acosonic: I'm not sure what you're asking
[14:01:23] dstarh: Uing rack proxy to proxy some requests to another server with ssl. In our staging which is server > server it's working just fine. Going server > load balancer > server in production I'm getting "OpenSSL::SSL::SSLError (SSL_connect returned=1 errno=0 state=unknown state: unknown protocol):"
[14:01:48] thecyclone: has joined #RubyOnRails
[14:01:53] elaptics: acosonic: that error is occurring because you haven't specified an ID and there's no other routes that are matching what's getting sent as the url
[14:01:57] dstarh: no code differences only difference is hitting the LB which is handling the ssl handshake
[14:02:51] Papierkorb: dstarh: sounds like you LB doesn't support the correct TLS version
[14:03:14] Maletor: has joined #RubyOnRails
[14:03:28] dstarh: Papierkorb yeah i'm gathering it's an issue with the handshake
[14:03:46] dstarh: it's an EC2 ELB
[14:03:55] acosonic: elaptics: it triggers for non-logged in users
[14:04:05] theblang: has joined #RubyOnRails
[14:04:20] loren: has joined #RubyOnRails
[14:04:20] Papierkorb: dstarh: no idea what amzn supports. you can ask the server though with the 'sslscan' utility
[14:04:33] dstarh: oh good idea thx
[14:04:55] IFrank00: Hi I got a Group and Task model. group has_many tasks and that belong to group. I need to create a hash like this https://gist.github.com/Frank004/a51d8646cd152cc4f56a and im using the group date gem
[14:05:00] elaptics: acosonic: we need more context in order to help in a meaningful way - at the most basic level something is nil that you're expecting not to be that's getting to wherever it's being passed to make this url
[14:05:10] elaptics: acosonic: !gist your code
[14:05:10] helpa: acosonic: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[14:05:20] sankaber: has joined #RubyOnRails
[14:05:37] MaDErroR123: has joined #RubyOnRails
[14:06:28] gregf_: has joined #RubyOnRails
[14:06:29] acosonic: elaptics: http://prntscr.com/9ciyqf
[14:07:13] acosonic: I'm figuring out how to properly write routes for this https://gist.github.com/acosonic/e214d3b762aee3e7f91b
[14:07:37] Hates_: IFrank00: my_groups.collect { |g| { name: g.name, data: g.tasks.collect(&:id) } }
[14:07:48] kmckelvi1: has joined #RubyOnRails
[14:08:00] acosonic: Initially routes were like this: https://gist.github.com/acosonic/784ec5c03eb525762be6
[14:08:15] IFrank00: hates thnx ill try it out on my terminal
[14:09:03] dstarh: Papierkorb another interesting thing is I pointed my local server at the load balancer, same code and it works just fine :\
[14:09:06] IFrank00: Hates_, great
[14:09:31] annlewis: has joined #RubyOnRails
[14:09:36] Papierkorb: dstarh: sounds like your systems openssl library versions mismatch. Are you sure the LB doesn't use SSLv3?
[14:09:56] IFrank00: Hates_, works!!! lol so happy do you have docs or guide on that topic
[14:09:58] dstarh: checking had to update brew before I could install sslutil
[14:10:31] Hates_: IFrank00: Not really. It's just using Enumerable's collect/map method :)
[14:11:40] IFrank00: Hates_, now i just need to group the task by month and get the count and im done with
[14:11:52] dstarh: Papierkorb elb Preferred TLSv1.2, v1.1 and v1.0
[14:12:05] Papierkorb: dstarh: TLSv1.2 sounds good
[14:12:23] dstarh: indeed, perhaps ruby is sending sslv3
[14:12:42] Papierkorb: dstarh: doesn't ruby use the systems openssl library?
[14:12:53] dstarh: hrm yeah it might
[14:13:17] Papierkorb: dstarh: if so, it will do the negotiation for you, as long you haven't somehow overriden it, and thus the system may just be dangerously old
[14:13:38] george2_: has joined #RubyOnRails
[14:15:06] ramortegui: has joined #RubyOnRails
[14:16:40] jgt4: has joined #RubyOnRails
[14:17:12] rickmasta: has joined #RubyOnRails
[14:18:15] IFrank00: Hates_, this what I did https://gist.github.com/Frank004/a51d8646cd152cc4f56a now I think I can pass this to my highchart
[14:19:02] sankaber: has joined #RubyOnRails
[14:19:19] acosonic: elaptics: I gisted it...
[14:19:55] jgpawletko: has joined #RubyOnRails
[14:22:19] lapide_viridi: has joined #RubyOnRails
[14:23:28] paulodiniz: has joined #RubyOnRails
[14:25:21] Bloomer: has joined #RubyOnRails
[14:25:24] puria: has joined #RubyOnRails
[14:25:52] viiralvx: has joined #RubyOnRails
[14:28:26] mustmodify: has joined #RubyOnRails
[14:30:36] mustmodify: Need some brainstorming. I have a Rails app that contains metadata about medical tests. When we make changes, I want to create a log of that change. Who and why. What does that workflow look like? I just can't quite see it.
[14:30:56] mustmodify: Do I want some kind of modal to pop up? That seems terrible.
[14:30:56] shibabu: has joined #RubyOnRails
[14:30:57] Papierkorb: mustmodify: Sounds like the PaperTrail gem
[14:31:27] mustmodify: but PaperTrail stores the change. I want to actually ask the user why.... like a git commit message.
[14:31:51] mustmodify: git commits would actually be perfect if that were a kind of datastore.
[14:32:07] Papierkorb: Just have an input above the Save button asking for clarification?
[14:32:08] mustmodify: ActiveGit::Base
[14:32:16] Papierkorb: mustmodify: Rugged gem
[14:33:15] User458764: has joined #RubyOnRails
[14:33:36] jscheel: has joined #RubyOnRails
[14:34:35] trautwein: has joined #RubyOnRails
[14:35:46] kitsuneyo: has joined #RubyOnRails
[14:35:52] ql6wlld: has joined #RubyOnRails
[14:36:08] n1lo: has joined #RubyOnRails
[14:36:42] _Tariq: has joined #RubyOnRails
[14:40:18] jkamenik1: has joined #RubyOnRails
[14:41:13] jkamenik1: has joined #RubyOnRails
[14:41:54] emilebosch: has joined #RubyOnRails
[14:42:29] tenderlove: has joined #RubyOnRails
[14:45:24] krzkrz: has joined #RubyOnRails
[14:45:30] Rinalds: has joined #RubyOnRails
[14:46:05] pulgalipe: has joined #RubyOnRails
[14:46:08] jcromartie: has joined #RubyOnRails
[14:51:20] elton: has joined #RubyOnRails
[14:52:10] tjbiddle: has joined #RubyOnRails
[14:54:30] Xentil: has joined #RubyOnRails
[14:57:32] stannard: has joined #RubyOnRails
[14:57:46] akshat: has joined #RubyOnRails
[14:58:03] rawrwx: has joined #RubyOnRails
[14:59:29] nickenchuggets: has joined #RubyOnRails
[14:59:29] nickenchuggets: has joined #RubyOnRails
[15:01:25] MaDErroR_: has joined #RubyOnRails
[15:02:17] kmckelvin: has joined #RubyOnRails
[15:02:36] SalexW: has joined #RubyOnRails
[15:03:03] uris: has joined #RubyOnRails
[15:03:33] sonofdirt: has joined #RubyOnRails
[15:04:05] Maletor: has joined #RubyOnRails
[15:04:58] RegulationD: has joined #RubyOnRails
[15:05:20] adre: has joined #RubyOnRails
[15:05:27] vasilakisFiL: has joined #RubyOnRails
[15:05:45] roverslim: has joined #RubyOnRails
[15:06:54] vasilakisFiL: is there any difference defining a namespaced controller like class Api::V1::FoobarsController; end than module Api; module V1; class FoobarsController; end; end; end; ? Because in the first case, calling another namespaced class (again under Api::V1 I get uninitialized constant errors :/
[15:07:10] hfp: Hi all! With Active Job, does it matter which queuing backend I use or are they all interchangeable?
[15:08:51] tbuehlmann: vasilakisfil, yes, there is a difference: namespace resolution
[15:08:52] tenderlove: has joined #RubyOnRails
[15:09:15] vasilakisFiL: is the second case a bad practice ?
[15:09:23] vasilakisFiL: eeh sorry the first case :)
[15:09:26] tenderlove: has joined #RubyOnRails
[15:09:50] shashank: has joined #RubyOnRails
[15:10:15] annlewis: has joined #RubyOnRails
[15:12:37] tommy2118: has joined #RubyOnRails
[15:13:33] Aasha: has joined #RubyOnRails
[15:14:23] rawrwx: has left #RubyOnRails: ()
[15:15:00] matthewd: vasilakisfil: No, they just work differently
[15:15:34] matthewd: hfp: http://api.rubyonrails.org/classes/ActiveJob/QueueAdapters.html
[15:17:07] ibouvousaime_: has joined #RubyOnRails
[15:17:39] lacrymology: has joined #RubyOnRails
[15:18:01] rubyonrails007: has joined #RubyOnRails
[15:21:02] thejamespinto: has joined #RubyOnRails
[15:21:09] Frem: has joined #RubyOnRails
[15:21:11] rubyonrails007: i have recently started learning ror. need advice
[15:21:24] rubyonrails007: anyone, please?
[15:21:32] mary5030: has joined #RubyOnRails
[15:21:54] hfp: matthewd: Thanks
[15:22:02] shanemcd: has joined #RubyOnRails
[15:22:28] wmdrossard: has joined #RubyOnRails
[15:23:43] mustmodify: rubyonrails007: avoid O**n
[15:24:12] tbuehlmann: vasilakisfil, it's not bad practice, you just need to remember to always use the full namespace path
[15:24:31] adavia: has joined #RubyOnRails
[15:24:57] matthewd: rubyonrails007: !ask
[15:24:57] helpa: rubyonrails007: How to ask good questions and get great answers: http://www.mikeash.com/getting_answers.html
[15:25:09] Jasaka: has joined #RubyOnRails
[15:25:25] acosonic_: has joined #RubyOnRails
[15:25:52] helpa: Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
[15:26:00] matthewd: That's the one I was looking for :)
[15:26:27] krzkrz: has joined #RubyOnRails
[15:27:10] rubyonrails007: helpa i am new in irc too.. just trying to get the hang of it
[15:27:47] ibouvousaime_: has joined #RubyOnRails
[15:27:51] rubyonrails007: helpa: i am new in irc too.. just trying to get the hang of it
[15:27:58] puria: has joined #RubyOnRails
[15:28:24] rubyonrails007: <helpa> just trying to get the hang of it
[15:29:14] acosonic_: how would a route to show action look on rails 4? https://github.com/acosonic/redmine_kanban/blob/master/app/controllers/assigned_kanbans_controller.rb
[15:29:37] jgt4: has joined #RubyOnRails
[15:31:16] hobodave: has joined #RubyOnRails
[15:32:47] matthewd: acosonic_: resources inside a member block doesn't sound right to me
[15:33:15] nya: has joined #RubyOnRails
[15:33:24] bronson: has joined #RubyOnRails
[15:33:57] shibabu: has joined #RubyOnRails
[15:35:18] acosonic_: matthewd: are you reffering to routes.rb or? That???s what I???m trying to fix, I keep getting
[15:35:19] mustmodify: has left #RubyOnRails: ()
[15:35:38] mustmodify: has joined #RubyOnRails
[15:35:49] acosonic_: ActionView::Template::Error (No route matches {:action=>"show", :controller=>"assigned_kanbans", :id=>nil}) no matter what I try
[15:36:05] acosonic_: for non-logged in users...
[15:37:17] zpe: has joined #RubyOnRails
[15:37:26] mustmodify: Papierkorb: ok so say I wanted to put a "commit message" text field just above the submit button. I wouldn't want that to stay with the record... say, for instance, Noumenon is one of our classes. So I don't want Noumenon#commit_message. I would want Noumenon#has_many :changes and Change#commit_message.
[15:38:14] mustmodify: So then I couldn't use the normal accepts_nested_attributes_for form view helpers because that would show all the previous commit messages.
[15:38:58] mustmodify: I wonder if instead of saying f.fields_for :association you can do f.fields_for @model
[15:40:04] symbol: has joined #RubyOnRails
[15:43:10] hnanon: has joined #RubyOnRails
[15:43:50] Ergo^: has joined #RubyOnRails
[15:45:13] teclator: has joined #RubyOnRails
[15:46:16] kp666: has joined #RubyOnRails
[15:47:11] marr: has joined #RubyOnRails
[15:47:23] rubyonrailed: has joined #RubyOnRails
[15:47:39] moeabdol: has joined #RubyOnRails
[15:48:28] marr: has joined #RubyOnRails
[15:49:02] ewnd9: has joined #RubyOnRails
[15:49:13] Bloomer: has joined #RubyOnRails
[15:49:27] hnanon: I have: product = Product.where(year: Time.at(event_object['period_start']).year, month: Time.at(event_object['period_start']).month)
[15:49:34] hnanon: In my model.
[15:50:05] hnanon: Can I do print product.id?
[15:50:05] akshat: has joined #RubyOnRails
[15:50:25] mustmodify: hnanon: that will give you a collection of products.
[15:50:34] mustmodify: append .first or .first! if you want only one.
[15:50:39] mag42c: has joined #RubyOnRails
[15:50:49] mustmodify: .first will give you the first one, if any, regardless of the number of items returned
[15:51:27] hnanon: Nevermind. I need to append .take
[15:51:54] hnanon: Should I use .first or .take?
[15:52:13] mustmodify: hnanon: I was just looking at that.
[15:52:13] tfitts: hhannon, first orders, take just gets one
[15:52:29] mustmodify: kind of doesn't matter as long as you think your query is only likely to produce one record.
[15:52:43] hnanon: Ok. There will only be just one.
[15:52:44] mustmodify: I guess take would be bits-of-a-microsecond faster.
[15:52:52] umdstu: has joined #RubyOnRails
[15:53:00] mustmodify: unless there are a lot of records, in which case it might be much faster.
[15:53:45] mustmodify: hnanon: learned something new today. Thanks. But one thing.
[15:53:50] brunoalano: has joined #RubyOnRails
[15:54:05] mustmodify: Oh, yeah, take! works too.
[15:54:16] mustmodify: If you're using it in a controller, you likely want take! instead of take
[15:54:26] mustmodify: because that will know to abort if the record isn't found.
[15:54:41] mustmodify: For instance, if someone changes a url from /products/123 to /products/1234567890
[15:54:47] mustmodify: take! will result in a 404.
[15:54:58] mustmodify: take will result in nil, which will lead to a 500.
[15:55:03] mustmodify: (presumably.)
[15:55:43] umdstu: I have a yaml file where I have some configurations stored. I have a gem installed that requires this. I recently tried to replace the password in the field with a Rails.application.secrets call.
[15:55:43] hnanon: mustmodify.thanks.
[15:56:09] umdstu: I think the Gem is getting loaded before the Rails.application secrets get setup because it errors out
[15:56:30] umdstu: undefined method secrets
[15:56:58] umdstu: anyway to reorder this?
[15:57:00] B1n4r10: has joined #RubyOnRails
[15:57:58] brunoalano: System Information: Model: Mac Mini (Mid-2011)
[15:58:51] brunoalano: In a SAAS application, where users can use subdomain and/or custom domain, what is the proper way to set the cookies (session) domain?
[16:00:27] Aasha: has left #RubyOnRails: ("Leaving")
[16:00:59] hardtail: has joined #RubyOnRails
[16:02:05] matthewd: acosonic_: What have you tried? What does `rake routes` say?
[16:02:55] tenderlove: has joined #RubyOnRails
[16:03:33] dopie: has joined #RubyOnRails
[16:03:36] tenderlove: has joined #RubyOnRails
[16:04:19] srinidhi: has joined #RubyOnRails
[16:04:27] acosonic_: matthewd: http://pastie.org/10623285 retrying now
[16:04:47] Maletor: has joined #RubyOnRails
[16:06:01] owenjones: has joined #RubyOnRails
[16:07:05] acosonic_: matthewd: still the same problem ActionView::Template::Error (No route matches {:action=>"show", :controller=>"kanbans"}):
[16:07:44] Cervajz: has joined #RubyOnRails
[16:08:05] acosonic_: matthewd: wait it???s not the same problem??? Hm???
[16:08:16] matthewd: acosonic_: That output shows two instances of :id in the URL. You don't want that.
[16:08:19] willywos: has joined #RubyOnRails
[16:10:26] IFrank00: Hi i have 2 arrays A [1,3,5] and B[2,4] how can I merge it to a new array[1,2,3,4,5] the number are just a example im using data on it
[16:10:50] rdavila: has joined #RubyOnRails
[16:10:57] acosonic_: matthewd: do I need to tweak routes.rb to remove that?
[16:11:08] matthewd: acosonic_: Yes
[16:11:08] elaptics: IFrank00: a.merge!(b)
[16:11:24] elaptics: IFrank00: well, a.merge(b) will give you a new array
[16:11:43] elaptics: IFrank00: the bang version will modify the a array
[16:12:37] lxsameer: has joined #RubyOnRails
[16:12:37] lxsameer: has joined #RubyOnRails
[16:12:51] build22: has joined #RubyOnRails
[16:13:00] IFrank00: elaptics, will it give me the one item form each array like this array[1,3] and array[2,4] so ill get the 1 form the first array and the 2 form the second array
[16:13:03] acosonic_: matthewd: this is how I did it https://github.com/acosonic/redmine_kanban/blob/master/config/routes.rb and original was like this: https://github.com/kostgr/redmine_kanban/blob/master/config/routes.rb I see maybe i know the answer now...
[16:13:04] IrishGringo: has joined #RubyOnRails
[16:13:40] elaptics: IFrank00: not sure what you're asking
[16:13:42] matthewd: acosonic_: If you can run the original, you should be able to see its `rake routes` output, then you know what you need to end up with
[16:17:46] claytonzaugg: has joined #RubyOnRails
[16:17:46] brunto: has joined #RubyOnRails
[16:17:46] IFrank00: elaptics, A has 1 and 3 . B has a 2 and 4 I need the new array to grab 1 from A and 2 from B so I end up with Array[1,2,3,4]
[16:17:47] matthewd: IFrank00: I'd normally suggest you Try It And See, but I'm not sure what Array#merge elaptics is talking about :/
[16:17:47] jhass: has left #RubyOnRails: ("WeeChat 1.3")
[16:17:47] jhass: has joined #RubyOnRails
[16:17:47] elaptics: matthewd: duh, I wasn't paying attention
[16:17:47] elaptics: IFrank00: it's even simpler then, Just do a + b
[16:17:47] elaptics: I have hashes on my mind :)
[16:17:47] matthewd: IFrank00: `a.zip(b).flatten.compact` will do what you want with the examples you've cited
[16:17:47] bbrowning_: has joined #RubyOnRails
[16:17:48] matthewd: IFrank00: .. but note the implied disclaimer: it probably won't do what you expect most of the times that A and B are different lengths
[16:17:48] IFrank00: elaptics, that do the merge but did it like this array1[1,3] array2[2,4] new array[1,3,2,4] and not what i need [1,2,3,4]
[16:17:50] elaptics: IFrank00: do you want it to specifically alternate between the two array values?
[16:18:08] IFrank00: elaptics, yes
[16:18:23] annlewis: has joined #RubyOnRails
[16:18:47] sharkman: has joined #RubyOnRails
[16:18:59] elaptics: IFrank00: then matthewd is exactly correct
[16:19:11] cydrobolt: has joined #RubyOnRails
[16:19:12] cydrobolt: has joined #RubyOnRails
[16:19:14] adam_: has joined #RubyOnRails
[16:19:16] kitsuneyo: has joined #RubyOnRails
[16:19:35] IFrank00: elaptics, that one works
[16:19:51] kitallis: has joined #RubyOnRails
[16:19:59] kadoppe: has joined #RubyOnRails
[16:20:02] sharkman: Game.where("away_team_id is not nil").all, how do i do this?
[16:20:05] sandstrom: has joined #RubyOnRails
[16:20:05] futilegames: has joined #RubyOnRails
[16:20:42] ql6wlld: has joined #RubyOnRails
[16:20:59] matthewd: sharkman: 'null', not 'nil'
[16:21:36] AntiSpamMeta: has joined #RubyOnRails
[16:21:50] acosonic_: matthewd: I got it working!
[16:22:31] User458764: has joined #RubyOnRails
[16:22:54] umdstu: anyone know how to get Rails.application.secrets to be set before gems are loaded?
[16:23:02] rubyonrailed: has joined #RubyOnRails
[16:23:23] matthewd: umdstu: Load the gem later
[16:24:08] umdstu: nvm, knee jerk question. i'll google that
[16:24:33] matthewd: umdstu: You probably want to be doing your thing in an initializer, if you're not already
[16:24:50] umdstu: what thing?
[16:24:55] mustmodify: umdstu: yeah, your secret should be set in /config/initializers
[16:25:01] adre: has joined #RubyOnRails
[16:25:14] matthewd: umdstu: If that's not sufficient (I don't recall exactly when secrets are loaded), you might need to be more specific about when the initializer runs
[16:25:38] umdstu: the gem uses a config/gem-helper.yml . Inside I use Rails.application.secrets and when when gem loads, .secrets is nil
[16:25:38] mustmodify: umdstu: and any gems you use should not require you to do anything unusual with secrets. If you set your secret the correct way, gems should work fine. If not, you probably don't want to use that Gem anyway.
[16:25:43] matthewd: umdstu: I meant the thing that reads the secret.. but mustmodify has a point... one would generally read the secret in an app initializer, and then pass it on to the gem
[16:25:49] tubbo: umdstu: is .secrets nil, or is Rails.application nil?
[16:26:06] umdstu: gimme a sec to read everyones input
[16:26:16] mustmodify: NO. RESPOND NOW.
[16:26:22] umdstu: .secrets is NIL
[16:27:07] matthewd: If your gem is loading something, it is (or, should be) a railtie... in which case, said loading should be in an `initializer do` block inside the railtie definition
[16:28:03] umdstu: yea it's not a railtie
[16:28:34] umdstu: in the class initializer in the gem it accesses the config file
[16:28:41] matthewd: "regular gem" and "messes around in ./config" don't generally go together
[16:29:13] umdstu: matthewd: well the gem has it's on copy of that config file
[16:29:22] umdstu: it's just not filled in
[16:29:28] matthewd: If it's not a railtie, the application should probably be passing the config in, in an app initializer
[16:29:48] umdstu: ok, sounds like this gem should be re-worked
[16:29:59] umdstu: it was written many years ago
[16:30:36] momomomomo: has joined #RubyOnRails
[16:30:38] SalexW: has joined #RubyOnRails
[16:30:42] matthewd: If the loading doesn't happen until the class is initialized, though, a short-term fix would presumably be to avoid creating an instance until after the rails app is more fully loaded
[16:30:46] baweaver: has joined #RubyOnRails
[16:30:57] matthewd: So maybe you just need to track down what's currently doing that so early? ??\_(???)_/??
[16:31:26] umdstu: in the stack trace, bundler calls it
[16:31:47] matthewd: bundler will require it (because it's in the gemfile), but that shouldn't be creating an instance
[16:32:28] matthewd: Though again, you can just tell bundler not to require it, and do so later, once you're "ready"
[16:32:29] georgeonr: has joined #RubyOnRails
[16:32:34] SalexW: has joined #RubyOnRails
[16:32:42] umdstu: i'll need to look that up
[16:34:10] baweaver: has joined #RubyOnRails
[16:34:20] umdstu: ok so in application.rb i would want to exclude the gem from Bundler.require(*Rails.groups)
[16:34:26] jbrhbr: has joined #RubyOnRails
[16:34:28] SalexW: has joined #RubyOnRails
[16:34:30] umdstu: and that create an initializer that requires it
[16:34:40] matthewd: In the gemfile, you give it a `require: false`
[16:35:37] moei: has joined #RubyOnRails
[16:36:24] SalexW_: has joined #RubyOnRails
[16:36:57] davonrails: Hi guys, I???m struggling using AngularJS with assets pipeline in prod. Getting an injection error due to Ugglifier mangling. My question is, is it ok if I disable mangling ? Using ????config.assets.js_compressor = Uglifier.new(:mangle => false)???? ?
[16:36:59] umdstu: that was too easy
[16:36:59] hobodave: has joined #RubyOnRails
[16:37:01] jbermudes: has joined #RubyOnRails
[16:37:01] jbermudes: has joined #RubyOnRails
[16:37:02] acosonic_: ok new question what do I replace conditions = ARCondition.new with ?
[16:37:33] Kedric: has joined #RubyOnRails
[16:38:02] Diabolik: is it bad practice to declare instance variables within a private method
[16:38:19] SalexW: has joined #RubyOnRails
[16:38:25] Kedric: has left #RubyOnRails: ()
[16:38:31] cajone: has joined #RubyOnRails
[16:38:37] netzfisch: has joined #RubyOnRails
[16:40:14] SalexW_: has joined #RubyOnRails
[16:40:14] Kedric: has joined #RubyOnRails
[16:40:33] Kedric: Anybody use a pngcrush like util with paperclip? What is the goto gem?
[16:42:07] SalexW: has joined #RubyOnRails
[16:42:43] andrew-l: has joined #RubyOnRails
[16:44:01] elton: has joined #RubyOnRails
[16:44:02] SalexW: has joined #RubyOnRails
[16:44:35] darkxploit: has joined #RubyOnRails
[16:45:55] [Butch]: has joined #RubyOnRails
[16:46:08] uris: has joined #RubyOnRails
[16:46:19] SalexW: has joined #RubyOnRails
[16:47:11] Hates_: Diabolik: I don't see anything wrong with doing so.
[16:47:58] SalexW: has joined #RubyOnRails
[16:48:02] matthewd: acosonic_: What's an ARCondition? :|
[16:48:40] acosonic_: matthewd: somehing from Redmine. Active record I assume??? I found some samples, trying to implement them...
[16:48:51] DeXterbed: has joined #RubyOnRails
[16:49:10] kmckelvi1: has joined #RubyOnRails
[16:49:52] SalexW: has joined #RubyOnRails
[16:50:33] zpe: has joined #RubyOnRails
[16:51:49] SalexW: has joined #RubyOnRails
[16:52:28] pontiki: morning, all
[16:52:36] pontiki: or whatever is appropriate
[16:52:54] mustmodify: "#{time_specific_greeting}"
[16:53:08] Axilla: has joined #RubyOnRails
[16:53:15] mustmodify: "#{time_specific_greeting} all"
[16:53:23] pontiki: i'm having a problem creating a self-referencial model, the canonical "Category" model which references a parent category.
[16:53:44] SalexW: has joined #RubyOnRails
[16:53:52] Axilla: how can i check if username is blank when using authenticate_with_http_basic?
[16:53:57] pontiki: this doesn't seem to work in PG 9.4: https://github.com/tamouse/example_nested_category
[16:54:03] elton: has joined #RubyOnRails
[16:54:06] Axilla: u.blank? doesn't seem be right.
[16:54:21] pontiki: specifically, this migration causes an error
[16:55:37] SalexW_: has joined #RubyOnRails
[16:55:50] pontiki: This is the error trace: https://gist.github.com/tamouse/b85be10c572921f2aac9
[16:56:05] pontiki: this is the migration: https://github.com/tamouse/example_nested_category/blob/master/db/migrate/20151125005034_create_categories.rb
[16:56:41] Axilla: https://gist.github.com/travisdmathis/4efd2233968764381f52
[16:57:02] s2013: has joined #RubyOnRails
[16:57:03] tenderlove: has joined #RubyOnRails
[16:57:29] Scient: yeah so the migrations run inside a tx...
[16:57:36] Scient: add the FK after the create table statement pontiki
[16:57:44] s2013: i have an User model and an Interaction model. user has many interactions.. interaction belongs to user.. trying to figure out most efficient query for all users with 0 interactions.. i can do all users with < or > a count but not 0
[16:57:44] tenderlove: has joined #RubyOnRails
[16:57:50] disgrntld: has joined #RubyOnRails
[16:57:52] krzkrz: has joined #RubyOnRails
[16:57:52] Scient: also why are your FK-s at the beginning of the table #ocd
[16:58:12] Scient: pretty sure thats the issue yes
[16:58:18] Scient: your create table statement has not commited yet
[16:58:26] Scient: and its trying to reference itself
[16:58:34] pontiki: that was how the rails generator put them out
[16:58:36] Axilla: @pontiki t.belongs_to is just a alias
[16:58:39] pontiki: yes, self-referential
[16:58:41] Axilla: for add_reference
[16:58:44] s2013: i guessa left join would work
[16:58:48] Axilla: you're not referencing it to anything
[16:58:57] Scient: try moving the FK statement out of the create table block
[16:59:01] pontiki: it is in the model axilla
[16:59:01] Scient: and see if that works
[16:59:08] pontiki: will try, thanks
[16:59:08] Pazician: has joined #RubyOnRails
[16:59:14] Scient: I always create FK-s and indexes outside of the create_table stuff anyway :P
[16:59:16] Axilla: add_reference :categories, :parent, index: true
[16:59:18] Scient: makes it seem cleaner, idk why
[16:59:24] Scient: maybe its just a old habit
[16:59:39] paulodiniz: has joined #RubyOnRails
[16:59:45] pontiki: it's interesting the generator does it that way, neh?
[16:59:56] pontiki: the schema has them after
[16:59:56] Scient: it might not be accounting for self-referential stuff
[17:02:54] kurtf: has joined #RubyOnRails
[17:03:49] agit0: has joined #RubyOnRails
[17:04:47] eurii: has joined #RubyOnRails
[17:05:34] Maletor: has joined #RubyOnRails
[17:05:39] mustmodify: has left #RubyOnRails: ()
[17:07:13] s2013: has joined #RubyOnRails
[17:07:42] tommy2118: has joined #RubyOnRails
[17:07:50] rakm: has joined #RubyOnRails
[17:08:43] acosonic_: matthewd: so I get this error, after resolving several others NoMethodError (undefined method `conditions' for #<String:0x000000050d6380>):
[17:08:43] acosonic_: lib/redmine/sudo_mode.rb:63:in `sudo_mode
[17:09:10] pontiki: that must be it, Scient. putting the fk after works fine. <shrug>
[17:09:13] eurii: has joined #RubyOnRails
[17:09:46] pontiki: makes sense, really, now that i think about it
[17:09:48] eurii: has joined #RubyOnRails
[17:10:00] qejk: has joined #RubyOnRails
[17:10:10] pontiki: the generator doesn't have any idea i'm trying to make a self-reference
[17:10:13] djbkd: has joined #RubyOnRails
[17:10:17] pontiki: ok, cool, thanks
[17:13:12] matthewd: acosonic_: Nope, sorry.. sounds like you're still having issues with redmine API, which I don't know
[17:15:13] dionysus69: has joined #RubyOnRails
[17:15:17] paulodiniz: has joined #RubyOnRails
[17:15:46] troyready: has joined #RubyOnRails
[17:17:44] ql6wlld: has joined #RubyOnRails
[17:18:37] _lazarevsky: has joined #RubyOnRails
[17:19:00] _lazarevsky: I keep getting this error whenever I try and run my server -> /home/woland/.gem/ruby/2.2.3/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:492:in `load_missing_constant': Circular dependency detected while autoloading constant RequirementVerificationDependency (RuntimeError)
[17:19:08] annlewis: has joined #RubyOnRails
[17:19:12] _lazarevsky: what the heck is going on? where do i even start debugging?
[17:19:34] Scient: do you have two files containing that class definition?
[17:21:07] The_Phoenix: has joined #RubyOnRails
[17:21:07] _lazarevsky: Scient: I grepped for RequirementVerificationDependency -> https://gist.github.com/Lazarevsky/7e9ccc837cd78a8d2a37
[17:21:34] _lazarevsky: Scient: to answer your question - no
[17:22:07] Scient: what does the RequirementVerificationDependency class look like?
[17:22:12] tubbo: how about AbstractTracingDependency?
[17:25:03] _lazarevsky: tubbo: what about AbstractTracingDependency
[17:25:09] _lazarevsky: multiple models inherit from it
[17:25:14] ornerymoose: has joined #RubyOnRails
[17:25:28] tubbo: but it's not defined in multiple places, or reopened anywhere
[17:25:32] nettoweb: has joined #RubyOnRails
[17:25:44] _lazarevsky: Scient: class RequirementVerificationDependency < AbstractTracingDependency include RequiresApproval include TracingDependencyCommonScopes dependency_links :requirement, :verification end
[17:25:49] agit0: has joined #RubyOnRails
[17:26:10] _lazarevsky: tubbo: was the last thing you wrote a question or a statement?
[17:26:30] claytonzaugg: has joined #RubyOnRails
[17:27:00] tubbo: _lazarevsky: it was more of a confirmation...i think it's a bit of an obvious question but i figured i'd check anyway. sometimes asking obvious questions provokes questioning in the person having the problem.
[17:27:13] tubbo: _lazarevsky: i guess it was more like a question :D
[17:27:34] _lazarevsky: tubbo: no it's not
[17:27:47] tenderlove: has joined #RubyOnRails
[17:28:18] tubbo: lol what if you had a class named CircularDependency
[17:28:35] DiCablo: has joined #RubyOnRails
[17:30:39] markh: has joined #RubyOnRails
[17:30:44] s2013: just wondering if i did something wrong.. i created a migration and added "add_index(:interactions, :user_id)" and am running the migration but its stalled for minutes now.. however before when i went to mysql and manuallya dded the index it took less than a sec
[17:30:45] chipotle: has joined #RubyOnRails
[17:31:59] smathy: has joined #RubyOnRails
[17:32:28] tubbo: s2013: *shrug* you using spring?
[17:32:37] matthewd: _lazarevsky: One of the constants mentioned in the above class definition, when autoloaded, will eventually lead to a reference to RequirementVerificationDependency
[17:32:42] tubbo: could be just that spring is fucked and you need to bin/spring stop or kill -9 $THE_RUBY_PID
[17:32:42] paulodiniz: has joined #RubyOnRails
[17:33:02] matthewd: _lazarevsky: Given what your grep turned up, however, that seems unlikely... too unlikely?
[17:34:02] matthewd: _lazarevsky: According to that output, nothing but tests ever use RequirementVerificationDependency, and nothing at all uses the Policy or Serializer
[17:34:08] _lazarevsky: matthewd: removing this line from abstract_tracing_dependency solves the problem -> Dir[Rails.root + 'app/models/*.rb'].map {|f| File.basename(f, '.*').camelize.constantize }
[17:34:39] _lazarevsky: matthewd: but the backend guy needs that line for something.. I'm just doing the front-end on this app tbh.. I am blocked becaus emy server aint running
[17:34:54] matthewd: Move it to the end
[17:35:04] _lazarevsky: it is at the very end
[17:35:55] kuroro: has joined #RubyOnRails
[17:36:00] hobodave: has joined #RubyOnRails
[17:36:17] matthewd: You'll need to ensure you load / access ATD before anything that might cause it to autoload
[17:36:22] shibabu: has joined #RubyOnRails
[17:36:24] tubbo: _lazarevsky: get rid of it, it's a stupid idea and tell your backend guy to think of another way to load that :P
[17:36:46] matthewd: Actually.. yeah.. that's loading *everything*, not just a set of subclasses :|
[17:36:58] tubbo: trust me on this, my company has dealt with plenty of autoloading problems and the best solution is to not create constants on the fly in autoloaded code like that
[17:37:12] tubbo: if you're gonna do that, load the code yourself from lib/
[17:37:13] demonlove: has joined #RubyOnRails
[17:37:15] syzygy_: has joined #RubyOnRails
[17:37:16] tubbo: s/load/require
[17:38:50] _lazarevsky: what are some other ways of loading them?
[17:40:45] kuroro: I'm looking for an alternative to the "asset pipeline" model (slow initial load, faster loads afterwards on other pages). What I want is a modular approach where only required javascripts/css are loaded on a page (fast initial load, average subsequent loads)
[17:40:55] arup_r: has joined #RubyOnRails
[17:40:58] kuroro: any good tools for that?
[17:41:30] pipework: kuroro: You can do that yourself.
[17:41:51] matthewd: kuroro: Just define a separate stylesheet for each page
[17:42:04] pipework: You can make additional files in the asset pipeline as manifests that contain the part you want, then you just need to add them to your assets in your config so they compile each one separately.
[17:42:19] kuroro: ah ic. yeah, that makes sense
[17:42:39] nertzy: has joined #RubyOnRails
[17:42:40] kitsuneyo: has joined #RubyOnRails
[17:42:45] chipotle: has joined #RubyOnRails
[17:42:47] matthewd: kuroro: A somewhat-popular alternative is to have a tiny "landing" stylesheet, then if people get past that, you inflict one slow load for the "application" stylesheet
[17:42:59] tubbo: _lazarevsky: well, the way i like to do it is to add ./lib to my $LOAD_PATHS in config/boot.rb, then require 'the_lib' before my Rails::Application object is defined. like so: https://gist.github.com/tubbo/9474310a587dd9135846
[17:43:05] pipework: Some people definitely dig on progressive enhancement.
[17:43:20] matthewd: kuroro: Actually keeping track of exactly which styles are used on every page, and keeping the css sufficiently split-up to do so, seems rather onerous
[17:43:29] tubbo: i like the idea of progressive enhancement
[17:44:44] _lazarevsky: tubbo: would it be to much to ask of you to put together a solution for my problem?
[17:44:50] _lazarevsky: tubbo: seeing how it's a 2 liner
[17:44:58] _lazarevsky: I would be eternally grateful
[17:46:18] tubbo: _lazarevsky: did you not see my gist?
[17:47:25] bronson: has joined #RubyOnRails
[17:48:32] tubbo: _lazarevsky: the big takeaway from that is adding the lib/ dir to Ruby's $LOAD_PATHS global, where it looks for files. that enables the `require` line in your config/application.rb
[17:51:19] _lazarevsky: how is this different to what the dude's already doing
[17:51:30] _lazarevsky: what does it matter how the files are loaded anyway?
[17:52:28] matthewd: _lazarevsky: As the error says, there's a circular dependency
[17:52:34] jbrhbr: has joined #RubyOnRails
[17:55:42] crunk_bear: has joined #RubyOnRails
[17:57:09] thecyclone: what is the current stable version on bootstrap-sass?
[17:57:22] pipework: Weird place to ask, innit
[17:57:29] pipework: Can't you look at rubygems, github, or google?
[17:57:44] thecyclone: the option i get there does not work
[17:57:53] drptbl: has joined #RubyOnRails
[17:57:56] pipework: thecyclone: I have a lot of things that don't work.
[17:58:15] thecyclone: also if I use 3.2.0.0, i cannot get it to work on other pc
[17:58:18] tubbo: thecyclone: !dw
[17:58:18] helpa: thecyclone: What "didn't work"? Did your server not start? Did your computer explode? Did your webpage turn bright pink? Did your client not pay your bill on time? You may have to be more specific. A Gist (http://gist.github.com) of the code that doesn't work (and the error you are getting) will be helpful.
[18:01:49] rubyonrailed: has joined #RubyOnRails
[18:01:59] kmckelvi1: has joined #RubyOnRails
[18:02:24] Maletor: has joined #RubyOnRails
[18:02:34] sbarg: has joined #RubyOnRails
[18:04:42] chipotle_: has joined #RubyOnRails
[18:04:43] yardenbar: has joined #RubyOnRails
[18:05:42] d0nn1e: has joined #RubyOnRails
[18:05:44] annlewis: has joined #RubyOnRails
[18:09:04] silkwood: has joined #RubyOnRails
[18:09:08] sleungcy: has joined #RubyOnRails
[18:09:09] FooMunki: has joined #RubyOnRails
[18:10:04] silkwood: What is the best way to go through multiple has_many associations? "things.items.bars.where(:name => "something")"
[18:10:31] pontiki: silkwood: join them
[18:10:47] pontiki: things.joins(:items).joins(:bars)...
[18:10:58] KensoDev: has joined #RubyOnRails
[18:11:39] User458764: has joined #RubyOnRails
[18:11:56] johnnegron: has joined #RubyOnRails
[18:13:08] shanemcd: has joined #RubyOnRails
[18:15:21] kitsuneyo: has joined #RubyOnRails
[18:15:43] djbkd: has joined #RubyOnRails
[18:16:31] silkwood: pontiki: that doesn't seem to be working. I'm probably doing something wrong :P
[18:17:01] silkwood: pontiki: Doing something like that gives me a collection of "things". I want a collection of "bars" in the end
[18:17:04] tubbo: things.where( items: { bars: { name: 'something' } }) :)
[18:17:08] jessemcgilallen: has joined #RubyOnRails
[18:17:53] _Tariq: has joined #RubyOnRails
[18:18:07] silkwood: tubbo: that would also give me a collection of "things" wouldn't it?
[18:18:49] versatiletech: has joined #RubyOnRails
[18:18:49] Bloomer: has joined #RubyOnRails
[18:20:01] FernandoBasso: has joined #RubyOnRails
[18:20:31] adre: has joined #RubyOnRails
[18:21:04] execute: has left #RubyOnRails: ("Leaving...")
[18:21:41] tubbo: yeah i think so
[18:21:44] kknight: has joined #RubyOnRails
[18:21:50] tenderlove: has joined #RubyOnRails
[18:21:51] banister: has joined #RubyOnRails
[18:21:52] pipework: tubbo loves things.
[18:21:53] tubbo: you'd still need to things.join(:bars) and then .bars on the end iirc
[18:22:30] tenderlove: has joined #RubyOnRails
[18:23:04] podman: has joined #RubyOnRails
[18:24:33] RegulationD: has joined #RubyOnRails
[18:25:43] silkwood: tubbo: meh. I'm getting "undefined method bars"
[18:28:21] adre: has joined #RubyOnRails
[18:28:58] kknight: has joined #RubyOnRails
[18:30:26] kknight: has joined #RubyOnRails
[18:31:13] shanemcd: has joined #RubyOnRails
[18:31:21] hobodave: has joined #RubyOnRails
[18:31:48] acosonic_: how can I see trace in error log?
[18:32:14] renegadeandy: has joined #RubyOnRails
[18:32:20] tubbo: acosonic_: !vague
[18:32:20] helpa: acosonic_: Your question has just been deemed vague; please consider rewording it. It may also help to give us any relevant code or errors so that we may better assist you.
[18:32:30] baweaver: has joined #RubyOnRails
[18:33:25] baweaver: has joined #RubyOnRails
[18:33:36] acosonic_: I have redmine 3.0 and 3.2 and in 3.0 I get errors like this ArgumentError (wrong number of arguments (1 for 0)):
[18:33:36] acosonic_: activerecord (4.2.1) lib/active_record/scoping/named.rb:24:in `all' but in 3.2 I get only ArgumentError (wrong number of arguments (1 for 0))
[18:35:14] tubbo: acosonic_: in config/initializers/backtrace_silencers.rb, uncomment the # Rails.backtrace_cleaner.remove_silencers! line
[18:36:12] achamian: has joined #RubyOnRails
[18:37:16] Somnius: has joined #RubyOnRails
[18:37:49] rakm: has joined #RubyOnRails
[18:40:15] jvanbaarsen: has joined #RubyOnRails
[18:40:32] matthias_: has joined #RubyOnRails
[18:40:36] shibabu: has joined #RubyOnRails
[18:41:13] shanemcd: has joined #RubyOnRails
[18:41:17] paulodiniz: has joined #RubyOnRails
[18:41:19] puria: has joined #RubyOnRails
[18:41:23] acosonic_: tubbo: thnx!
[18:43:04] User458764: has joined #RubyOnRails
[18:44:35] acosonic_: tubbo: I???m trying to migrate one redmine plugin https://github.com/acosonic/redmine_kanban/ to newer rails, and I got stuck here currently http://pastie.org/10623599
[18:44:44] Synthead: has joined #RubyOnRails
[18:45:23] stannard: has joined #RubyOnRails
[18:45:49] treehug88: has joined #RubyOnRails
[18:46:29] rhizome: guessing you're going to want to pay attention to the lines that begin with "plugins"
[18:47:11] pulgolino: has joined #RubyOnRails
[18:48:38] WizJin: has joined #RubyOnRails
[18:48:51] colleenmcguckin: has joined #RubyOnRails
[18:48:51] kitsuneyo: has joined #RubyOnRails
[18:50:10] acosonic_: rhizome: can you be more specific?
[18:50:20] ruid: has joined #RubyOnRails
[18:50:21] ruid: has joined #RubyOnRails
[18:51:36] rhizome: sure, the lines that begin with "plugins/redmine_kanban"
[18:52:18] smathy: acosonic_, these lines: http://pastie.org/10623599#7-10
[18:52:44] tenderlove: has joined #RubyOnRails
[18:53:09] smathy: Especially the top one, see what's being called on that line, looks like it's doing things wrong.
[18:53:19] tenderlove: has joined #RubyOnRails
[18:54:11] lemur: has joined #RubyOnRails
[18:54:55] jessemcgilallen: has joined #RubyOnRails
[18:55:12] FernandoBasso: has joined #RubyOnRails
[18:55:29] asxbr: has joined #RubyOnRails
[18:56:15] kmckelvi1: has joined #RubyOnRails
[18:56:17] kegan_: for the sake of adding a glyphicon to a button
[18:56:41] greengriminal: has joined #RubyOnRails
[18:56:50] kegan_: i changed a form helper f.button :submit to f.button :button
[18:57:07] berserk_ren: has joined #RubyOnRails
[18:57:32] kegan_: what's the best way to approach it still submitting the form
[18:57:33] craigp: has joined #RubyOnRails
[18:57:52] shanemcd: has joined #RubyOnRails
[18:57:55] netzfisch: has joined #RubyOnRails
[18:58:48] nettoweb: has joined #RubyOnRails
[18:59:00] cnk: has joined #RubyOnRails
[19:02:02] momomomomo: has joined #RubyOnRails
[19:02:12] crunk_bear: has joined #RubyOnRails
[19:03:25] james1: has left #RubyOnRails: ()
[19:03:43] sonofdirt: has joined #RubyOnRails
[19:04:03] momomomomo: has joined #RubyOnRails
[19:04:29] jtperreault: has joined #RubyOnRails
[19:04:34] SteenJobs: has joined #RubyOnRails
[19:04:59] acosonic_: yeah I know but when I open it I don???t understand why is there wrong number of arguments???
[19:05:39] sharkman: has joined #RubyOnRails
[19:07:34] zanzarel: has joined #RubyOnRails
[19:10:08] Pazician: has joined #RubyOnRails
[19:10:59] MrPunkin: has joined #RubyOnRails
[19:12:36] rhizome: acosonic_: in the stacktrace you'll find line numbers following the filepath
[19:12:49] MrPunkin: Is there a simple way to cache an instance variable in rails across controllers / models for a single request without getting into memcached or anything of that nature, and without risking it sticking around for multiple requests due to cached classes or anything of that nature?
[19:13:22] baweaver: has joined #RubyOnRails
[19:13:22] B1n4r10: has joined #RubyOnRails
[19:13:57] annlewis: has joined #RubyOnRails
[19:14:32] sonofdirt: has joined #RubyOnRails
[19:15:46] chipotle: has joined #RubyOnRails
[19:15:54] johnnegron: has joined #RubyOnRails
[19:16:11] tubbo: MrPunkin: well, all of those classes are being instantiated on a per-request basis. what exactly are you trying to share?
[19:17:12] MrPunkin: Tubbo: Simply it???s just not making another API request again when requesting similar information??? but it???s for a very small subset of our application and so I don???t necessarily need to build in something like memcached with expirations and such.
[19:18:51] puria: has joined #RubyOnRails
[19:19:23] jscheel: has joined #RubyOnRails
[19:19:28] owenjones: has joined #RubyOnRails
[19:19:47] IFrank00: has joined #RubyOnRails
[19:20:19] seaworthy: has joined #RubyOnRails
[19:22:26] dopie: Ok I'm perplexed by this error in production
[19:22:27] dopie: https://gist.github.com/staycreativedesign/8e062d2540b21b5fca59
[19:22:40] dopie: I set everything right and it works locally
[19:24:35] seaworthy: hi, I have a Message object that has receiver_id and sender_id. I need to do some kind of join with User.Active record to get username for both id. I am not sure how to do that. Can someone help plz?
[19:25:03] _Tariq: has joined #RubyOnRails
[19:27:07] annlewis: has joined #RubyOnRails
[19:27:26] reber: has joined #RubyOnRails
[19:28:16] Papierkorb: seaworthy: message.receiver.name
[19:28:47] atumzin: has joined #RubyOnRails
[19:29:03] seaworthy: does that mean i have to set up the Message class
[19:29:06] seaworthy: Papierkorb:
[19:29:26] Papierkorb: well, it does have to exist of course, and needs a belongs_to or has_one relation.
[19:29:37] Papierkorb: seaworthy: http://guides.rubyonrails.org/active_record_migrations.html
[19:29:45] acosonic_: has joined #RubyOnRails
[19:30:01] uris: has joined #RubyOnRails
[19:30:04] Papierkorb: err http://guides.rubyonrails.org/association_basics.html
[19:30:41] seaworthy: so i do not need to do any db migration tho right?
[19:30:52] seaworthy: still confused about that part
[19:30:55] Papierkorb: not if you don't want to use foreign keys
[19:31:43] juddey: has joined #RubyOnRails
[19:32:01] s2013: has joined #RubyOnRails
[19:32:25] seaworthy: i might have to
[19:32:30] seaworthy: this is my schema
[19:32:31] seaworthy: https://bpaste.net/show/345f95553c49
[19:32:55] seaworthy: i want the sender_id and recepient_id refer to the User model
[19:33:02] seaworthy: would i still need to migrate?
[19:33:03] Papierkorb: t.references :receiver
[19:33:11] Papierkorb: saame for the other one
[19:33:35] Papierkorb: you don't have to, but use references over deciding that "integer is the correct datatype for that"
[19:34:03] Papierkorb: seaworthy: where did you get that migration from?
[19:34:08] kuroro: has joined #RubyOnRails
[19:34:17] seaworthy: generate scaffold
[19:34:55] Papierkorb: aha. generate model writes "t.timestamps null: false" instead, which generates the created/updated_at's
[19:36:14] Papierkorb: the first link (if the second doesn't) tells you how to add foreign keys, which you'll have to add outside the create_table. You don't *need* them, but it tells the database more about your data which it can maybe use, plus you get all the databse-level verification too.
[19:36:44] Papierkorb: and then, add the belongs_to and has_one associations to your model
[19:37:01] Papierkorb: I guess the message belongs_to the sender, and has_one recipient
[19:37:31] sbarg: has left #RubyOnRails: ()
[19:38:01] replay: has joined #RubyOnRails
[19:38:06] seaworthy: okay going to read up right now
[19:38:20] seaworthy: a little over my head but thanks for the direction
[19:40:28] ap4y: has joined #RubyOnRails
[19:40:41] seaworthy: so i dont need to have separate models for recipient and sender tho
[19:40:52] seaworthy: can i point them just to User?
[19:41:11] tfitts: I have the rmagick gem in my project. It requires image_magick to be installed in order for the gem to complete installation. I've tried setting require: false on the gem but when I try to bundle install on a different system the install fails on rmagick. Is there something else I can do so I can keep it in my gemfile but not have other installs fail if it can't install?
[19:41:50] Papierkorb: seaworthy: yes
[19:42:08] Papierkorb: seaworthy: belongs_to :recipient, class_name: 'User'
[19:42:17] Maletor: join #mapbox]
[19:42:49] johnnegron: seaworthy and I think in the association you specify the foreign_key
[19:43:04] paulodiniz: has joined #RubyOnRails
[19:43:29] seaworthy: what do you mean john?
[19:43:39] seaworthy: thanks Papierkorb
[19:43:42] mrbubbles: has joined #RubyOnRails
[19:43:59] s2013: has joined #RubyOnRails
[19:44:04] mrbubbles: good evening
[19:44:22] sonofdirt: has joined #RubyOnRails
[19:44:32] tfitts: seaworthy: User has_many :models, foreign_key => 'recipient_id'
[19:44:32] johnnegron: has_one :recipient, foreign_key: :some_other_name_id
[19:44:52] tfitts: oh, has_one
[19:44:57] tfitts: I caught this conversation in the middle.
[19:45:27] seaworthy: hmm how does it know that it has to use User model tho tfitts ?
[19:45:43] seaworthy: the same user can be a recipient or sender
[19:46:54] codeurge: has joined #RubyOnRails
[19:47:29] tenderlove: has joined #RubyOnRails
[19:48:03] jgt4: has joined #RubyOnRails
[19:50:13] tfitts: I have pretty much the same thing going with a User model and a Message model. User has_many :messages, User has_many :sent_messages, foreign_key: 'sender_id'. Message belongs_to :user, belongs_to: sender, class_name: 'User'
[19:50:31] tfitts: so the message knows to look up a User for the sender_id
[19:50:43] jvanbaarsen: has joined #RubyOnRails
[19:50:55] rubyonrailed: has joined #RubyOnRails
[19:51:07] tfitts: whoop's User has_many :sent_messages, class_name: 'Message', :foreign_key => 'sender_id'
[19:51:07] johnnegron: tfitts exactly
[19:51:37] tfitts: And the user knows to look up class Message for sent messages where message.sender_id = user.id
[19:52:37] tfitts: seaworthy: make sense?
[19:52:46] ur5us: has joined #RubyOnRails
[19:53:11] seaworthy: i am not sure whether i do a db migration
[19:53:21] seaworthy: or just edit the model files
[19:53:45] tfitts: what are your two models?
[19:53:55] seaworthy: User and Message
[19:54:01] tfitts: User and Recipient?
[19:54:01] _Tariq: has joined #RubyOnRails
[19:54:06] tfitts: oh, same as mine
[19:54:24] seaworthy: yes but you dont have recipient
[19:54:29] tfitts: what fields does does message have?
[19:54:43] pramsky: has joined #RubyOnRails
[19:54:43] seaworthy: https://bpaste.net/show/345f95553c49
[19:55:04] tfitts: so you don't need a migration
[19:55:15] LambdaSource: has joined #RubyOnRails
[19:56:06] shibabu: has joined #RubyOnRails
[19:56:15] tfitts: but you need to reference the foreign key for both fields. so User has_many :messages, foreign_key: 'receiver_id'
[19:57:18] hfp: I'm confused between what delayed_job and active_job do. Which one performs the actual processing?
[19:58:23] johnnegron: hfp delayed_job does since the background workers are the actual processors
[19:58:35] seaworthy: so that only take care of the receiver
[19:58:41] futilegames: has joined #RubyOnRails
[19:58:48] seaworthy: what about the sender?
[19:59:35] johnnegron: hfp: active_job is an adapter pattern for rails so that you can use a few different kinds of background processors like resque or sidekiq
[20:00:05] jmrepetti: has joined #RubyOnRails
[20:00:25] hfp: johnnegron: right... so where do I put the actual code that will be executed? Inside the ActiveJob::Base object or within the delayed_job object?
[20:01:17] User458764: has joined #RubyOnRails
[20:01:20] johnnegron: hfp: you should implement an active job and write your code in that. See http://edgeguides.rubyonrails.org/active_job_basics.html
[20:01:22] tfitts: User has_many :sent_messages, class_name: 'Message', :foreign_key => 'sender_id'
[20:01:43] johnnegron: hfp: sorry http://guides.rubyonrails.org/active_job_basics.html
[20:01:44] tfitts: then user.sent_messages will show which messages they sent
[20:04:11] hfp: johnnegron: I read that guide and thought I understood but then I read this: https://github.com/collectiveidea/delayed_job/tree/v4.1.1#custom-jobs
[20:05:21] craysiii: has joined #RubyOnRails
[20:05:39] johnnegron: hfp: right, this is outside of rails and/or not using the ActiveJob pattern. Unless you???re doing something really custom to delayed job, you can just use ActiveJob.
[20:06:11] hfp: johnnegron: I see, thanks
[20:07:01] lacrymology: has joined #RubyOnRails
[20:07:17] s2013: has joined #RubyOnRails
[20:07:29] ethe: has joined #RubyOnRails
[20:08:55] johnnegron: hfp: just remember you need to specify your adapter in your configs like ???config.active_job.queue_adapter = :delayed_job???
[20:09:01] netzfisch: has joined #RubyOnRails
[20:10:43] yfeldblum: has joined #RubyOnRails
[20:11:03] alex88: has joined #RubyOnRails
[20:11:08] RegulationD: has joined #RubyOnRails
[20:12:29] jetpackjoe: has joined #RubyOnRails
[20:13:09] syzygy_: has joined #RubyOnRails
[20:14:50] owenjones: has joined #RubyOnRails
[20:15:31] matthias_: has joined #RubyOnRails
[20:17:18] shanemcd: has joined #RubyOnRails
[20:17:32] tenderlove: has joined #RubyOnRails
[20:18:09] tenderlove: has joined #RubyOnRails
[20:19:19] hfp: johnnegron: yup, thanks
[20:19:28] colleenmcguckin: has joined #RubyOnRails
[20:19:46] srinidhi: has joined #RubyOnRails
[20:20:03] rdavila: has joined #RubyOnRails
[20:22:32] hfp: I'm facing another problem now... My use case is that a user can upload a file with up to 750k lines. Each line contains a word. My goal is to find the longest word sequence that starts with a 4 chars word and where each word contains all the previous word's letters + 1. So I split it in two jobs: first I extract every word sequence from the file in one job. Then I pass each sequence to another job that c
[20:22:38] hfp: hecks if they are valid sequences. But now I'm stuck because I don't know how to return the longest sequence since I can only do it once I'm done checking every sequence... How do I know when I have processed all the sequences? Should that be a third job?
[20:23:14] rhizome: is this an interview test?
[20:23:24] [Butch]: has joined #RubyOnRails
[20:24:07] s2013: has joined #RubyOnRails
[20:25:21] User458764: has joined #RubyOnRails
[20:26:06] sandstrom: has joined #RubyOnRails
[20:28:23] MrPunkin: has joined #RubyOnRails
[20:29:22] nickenchuggets: has joined #RubyOnRails
[20:29:22] nickenchuggets: has joined #RubyOnRails
[20:29:23] stannard: has joined #RubyOnRails
[20:32:02] stannard: has joined #RubyOnRails
[20:32:40] paulodiniz: has joined #RubyOnRails
[20:32:45] Coldblackice: has joined #RubyOnRails
[20:33:24] sonofdirt: has joined #RubyOnRails
[20:33:52] SteenJobs: has joined #RubyOnRails
[20:34:45] matthias_: has joined #RubyOnRails
[20:35:51] versatiletech: has joined #RubyOnRails
[20:36:12] duderonomy: has joined #RubyOnRails
[20:36:19] johnnegron: has joined #RubyOnRails
[20:37:29] versatiletech: has joined #RubyOnRails
[20:37:45] pushpak: has joined #RubyOnRails
[20:39:15] neanderslob: has joined #RubyOnRails
[20:39:51] adac: has joined #RubyOnRails
[20:42:06] hfp: rhizome: I think the engineering team uses it sometimes when hiring
[20:47:03] seaworthy: has left #RubyOnRails: ()
[20:48:20] tenderlove: has joined #RubyOnRails
[20:48:40] B1n4r10: has joined #RubyOnRails
[20:48:58] tenderlove: has joined #RubyOnRails
[20:49:37] d5sx43: has joined #RubyOnRails
[20:50:06] baweaver: has joined #RubyOnRails
[20:50:46] agit0: has joined #RubyOnRails
[20:53:54] kadoppe: has joined #RubyOnRails
[20:54:16] kuroro: has joined #RubyOnRails
[20:56:21] Pumukel: has joined #RubyOnRails
[20:58:28] marahin: has joined #RubyOnRails
[20:59:01] marahin: Hello! If I'm having a sidekiq worker ran by clockwork, what's the best way to code it, when it needs to iterate through ~6k database records and do some operations on each?
[20:59:25] renegadeandy: has joined #RubyOnRails
[21:00:19] nya: has joined #RubyOnRails
[21:02:41] baweaver: has joined #RubyOnRails
[21:03:02] lxsameer: is there any misc method to convert "A::B::C" to "a/b/c" ? ( ruby path to fs path )
[21:03:42] sevenseacat: has joined #RubyOnRails
[21:03:44] tubbo: lxsameer: active_support has methods that can do this.
[21:04:18] lxsameer: tubbo: do you know the name of it?
[21:05:04] tubbo: lxsameer: underscore -> http://api.rubyonrails.org/classes/String.html#method-i-underscore
[21:05:10] s2013: has joined #RubyOnRails
[21:06:07] treehug88: has joined #RubyOnRails
[21:06:17] bahar: has joined #RubyOnRails
[21:07:08] ewnd9: has joined #RubyOnRails
[21:08:24] Cohedrin: has joined #RubyOnRails
[21:11:12] idakyne: has joined #RubyOnRails
[21:13:42] smathy: has joined #RubyOnRails
[21:15:21] bahar: has joined #RubyOnRails
[21:15:26] chihaja_: has joined #RubyOnRails
[21:16:41] corioliss: has joined #RubyOnRails
[21:17:19] Cervajz: has joined #RubyOnRails
[21:17:24] seaworthy: has joined #RubyOnRails
[21:18:00] sonofdirt: has joined #RubyOnRails
[21:18:10] Potatomound: has joined #RubyOnRails
[21:18:33] seaworthy: does anyone know why i cant include relevant associations in a json object for my controller?
[21:18:44] seaworthy: i can print them out to console fine
[21:19:23] IFrank00: How can I group record by month and sum all the records column value by the month
[21:20:56] djbkd: has joined #RubyOnRails
[21:24:05] SteenJobs: has joined #RubyOnRails
[21:24:13] colleenmcguckin: has joined #RubyOnRails
[21:24:19] smathy: seaworthy, !gist what the code you're using, and maybe the console showing what you're trying to achieve.
[21:24:19] helpa: seaworthy: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[21:24:56] uri___: has joined #RubyOnRails
[21:27:30] seaworthy: https://bpaste.net/show/023a2ef5e488
[21:27:42] seaworthy: it prints the sender info for every message
[21:28:04] seaworthy: but when the client receives the array of message via API it does not have sender info
[21:28:21] johnnegron: has joined #RubyOnRails
[21:31:58] dstarh: has joined #RubyOnRails
[21:32:34] uris: has joined #RubyOnRails
[21:34:06] maesitos: has joined #RubyOnRails
[21:34:22] MrPunkin: has joined #RubyOnRails
[21:34:45] failasLStoRM: has joined #RubyOnRails
[21:35:43] nickenchuggets: has joined #RubyOnRails
[21:35:43] nickenchuggets: has joined #RubyOnRails
[21:36:04] MrPunkin: has left #RubyOnRails: ()
[21:36:56] maesitos: has joined #RubyOnRails
[21:38:15] owenjones: has joined #RubyOnRails
[21:38:34] mary5030: has joined #RubyOnRails
[21:39:05] Pazician: has joined #RubyOnRails
[21:41:00] zpe: has joined #RubyOnRails
[21:42:07] MrPunkin: has joined #RubyOnRails
[21:42:26] tenderlove: has joined #RubyOnRails
[21:42:36] MrPunkin: tubbo: Sorry if you responded to my simple caching of instance variable earlier. We had a tornado and lost power. Am I trying to make something more complex than it should be?
[21:43:03] smathy: Probably it was my ambiguous English, although I said "maybe" I meant that I needed that as well.
[21:43:07] tenderlove: has joined #RubyOnRails
[21:43:34] duncannz: has joined #RubyOnRails
[21:44:34] colleenmcguckin: has joined #RubyOnRails
[21:44:45] tfitts: seaworthy: are you using serializers or jbuilder to build your json?
[21:44:56] tubbo: MrPunkin: you could maybe define the method in a module within config/initializers, then memoize it with `@some_ivar ||= YourAPI.some_information`, that way every time you access YourModule.some_information, it will only run once?
[21:45:09] hardtail: has joined #RubyOnRails
[21:45:18] tubbo: MrPunkin: hope you're alright after that tornado :D
[21:45:57] MrPunkin: tubbo: Yeah I was effectively doing that but then started to think about expirations and all sorts of stuff and realized I may be heading into legit caching territory. Yeah, we are good. Watched a full-size trampoline fly about 4-6 blocks though
[21:46:52] fox_mulder_cp: has joined #RubyOnRails
[21:47:46] ewnd9: has joined #RubyOnRails
[21:48:47] quazimodo: has joined #RubyOnRails
[21:50:31] jessemcgilallen: has joined #RubyOnRails
[21:51:09] seaworthy: tfitts: how do i check?
[21:51:52] uri___: has joined #RubyOnRails
[21:56:33] steffkes: has joined #RubyOnRails
[21:56:33] steffkes: has joined #RubyOnRails
[21:58:32] sonofdirt: has joined #RubyOnRails
[22:00:18] tenderlove: has joined #RubyOnRails
[22:00:29] jessemcgilallen: has joined #RubyOnRails
[22:00:40] colleenmcguckin: has joined #RubyOnRails
[22:00:58] tenderlove: has joined #RubyOnRails
[22:02:57] sonofdirt: has joined #RubyOnRails
[22:02:59] paulodiniz: has joined #RubyOnRails
[22:03:29] rdavila: has joined #RubyOnRails
[22:06:00] seaworthy: i think i found it
[22:09:22] s2013: has joined #RubyOnRails
[22:13:02] s2013: has joined #RubyOnRails
[22:13:23] zanzarel: has left #RubyOnRails: ()
[22:14:31] rromanchuk: has joined #RubyOnRails
[22:14:52] djbkd_: has joined #RubyOnRails
[22:15:40] replay: has joined #RubyOnRails
[22:15:55] michaeldeol: has joined #RubyOnRails
[22:16:34] marahin: has left #RubyOnRails: ("Leaving")
[22:18:13] nickenchuggets: has joined #RubyOnRails
[22:18:13] nickenchuggets: has joined #RubyOnRails
[22:19:18] yfeldblum: has joined #RubyOnRails
[22:19:19] racheljs: has joined #RubyOnRails
[22:20:21] tenderlove: has joined #RubyOnRails
[22:20:25] renegadeandy: has joined #RubyOnRails
[22:20:56] tenderlove: has joined #RubyOnRails
[22:21:20] mrbubbles: has joined #RubyOnRails
[22:23:48] arash: has joined #RubyOnRails
[22:23:55] arash: has left #RubyOnRails: ()
[22:24:55] |PiP|: has joined #RubyOnRails
[22:24:57] |PiP|: when I access request.headers in a controller, how come it is case sensitive?
[22:24:58] stannard: has joined #RubyOnRails
[22:28:23] The_Phoenix: has joined #RubyOnRails
[22:28:33] hfp: I think I don't understand how carrierwave works. I want to process a text file using carrierwave with active_job. So I have defined my processing function within the uploader and I'm calling it with `process: process_func`. All the process function does is pass the uploaded file's location to an ActiveJob for processing. And it never gets there because it seems the processing function inside the Uploader
[22:28:39] hfp: is never called. I haven't used ActiveJob before and I'm very confused. This is what I have: https://gist.github.com/anonymous/8e0612a419b11a466a4d
[22:29:08] Sawbones: has joined #RubyOnRails
[22:29:35] hfp: I'm using delayed_job and carrierwave_backgrounder
[22:30:23] quazimodo: has joined #RubyOnRails
[22:32:09] hfp: I'm also wondering if I need carrierwave at all, considering I only use the uploaded file to process it and then never use it again
[22:32:09] baweaver: has joined #RubyOnRails
[22:33:46] renegadeandy: has joined #RubyOnRails
[22:34:06] Sylario: has joined #RubyOnRails
[22:34:29] renegadeandy: Hey everyone! Can somebody explain to me, if i have the private_pub gem in my rails project, and I want to override this file with my own implementation, how i can do this? https://github.com/ryanb/private_pub/blob/master/lib/private_pub/faye_extension.rb ???i.e if i want to write my own faye_extension.rb using the rest of the gem as is???.?
[22:34:30] cnk: hfp: how extensive is your processing? Is it just cropping? or more manipulation?
[22:37:37] hfp: cnk: I am analyzing the text file, its structure and then running a small algorithm on it to validate or reject subsets of the file.
[22:38:16] cnk: Ah so depending on the size of the file, worth doing in the background
[22:38:43] cnk: Does your upload + processing work if you are not trying to pass it to ActiveJob?
[22:39:25] cnk: I don't know a lot about carrierwave or active job but ideally I would try to split the problem and check / develop one half before adding the second
[22:39:55] cnk: in your case, it seems the main thing carrierwave gives you is upload / error handling
[22:41:32] zpe: has joined #RubyOnRails
[22:42:12] smathy: |PiP|, what makes you think they're case sensitive?
[22:42:28] |PiP|: When I use them, they are.
[22:42:45] hfp: carrierwave lets you define a function to call to process the uploaded file. This function never gets called so no processing is ever happening. It's what I'm stuck with at the moment
[22:42:57] duderonomy: has joined #RubyOnRails
[22:43:18] alias-ls-to-rm: has joined #RubyOnRails
[22:43:45] Sylario: I have an active record collection. Is there some map/hash syntax that would allow me to generate a hash like that : {identifier: 5,name: product6},{identifier: 6,name: product6} etc...
[22:43:57] cnk: does it get called if you don't try to add in the active_job delay?
[22:44:05] cnk: or handoff
[22:45:09] hfp: I dont think so. I put a `puts` in the function as the first statement to see if it ever gets run and nope
[22:46:15] cnk: Not sure where 'puts' would end up. Try logger.debug
[22:46:20] quazimodo: do Railtie initializer blocks get called during the same phase as config/initializer files?
[22:46:40] renegadeandy: can anybody see my commentd
[22:46:44] renegadeandy: **comments, nobody ever replies!
[22:47:18] quazimodo: because one of my gem's dependencies is not defined in the railtie initializer, i thought all the gems (including their deps) would be required first, then rails moves onto it's initialization phase
[22:48:05] quazimodo: renegadeandy: write your new file into lib/foo/bar/whatever.rb
[22:48:12] hfp: cnk: Same thing, no logs in the console or in the logfile :(
[22:48:16] quazimodo: then require it in an initializer or in application.rb
[22:48:23] quazimodo: although, monkey patching sucks
[22:48:37] renegadeandy: quazimodo: or i could just write anything.rb and put it inside initializer?
[22:48:45] s2013: has joined #RubyOnRails
[22:48:48] quazimodo: renegadeandy: yeah, although monkey patching sucks
[22:49:15] renegadeandy: quazimodo: ok so literally copy paste the file from github, into my lib dir???.and then make an intiializer???how do i make one of those?
[22:49:26] hobodave: has joined #RubyOnRails
[22:49:27] s2013: how would you guys handle a table that can belong to multiple models.. but not more than one at the same time..
[22:49:34] shibabu: has joined #RubyOnRails
[22:50:50] failasLStoRM: has joined #RubyOnRails
[22:50:51] cnk: hfp: and just to make sure - you do have multipart turned on in your form, right? I recently spent more than an hour looking through upload code - only to find the issue was I forgot to edit the form tag
[22:50:56] quazimodo: s2013: sounds like it
[22:51:07] tenderlove: has joined #RubyOnRails
[22:51:08] s2013: or polymorphic?
[22:51:12] htmldrum: has joined #RubyOnRails
[22:51:15] renegadeandy: quazimodo: ??
[22:51:46] renegadeandy: quazimodo: how does that ensure rails loads my class implementation rather than the gems>?
[22:51:46] tenderlove: has joined #RubyOnRails
[22:52:29] quazimodo: renegadeandy: the gem should already be loaded
[22:52:54] renegadeandy: so if we require my new rb file, which has a copy paste with some alterations to that class???.itll simply override it all?
[22:53:06] quazimodo: yes, ruby can do this
[22:53:30] quazimodo: is dangerous
[22:53:52] quazimodo: google aronud for monkey patching or duck punching
[22:54:14] renegadeandy: quazimodo: sounds dangerous but very useful in this instance for me!
[22:54:38] quazimodo: is not wise
[22:54:58] renegadeandy: quazimodo: but i have no other option as it stands in my app
[22:55:37] jessemcgilallen: has joined #RubyOnRails
[22:56:02] quazimodo: what are you changing?
[22:56:10] quazimodo: different solutions for different cases
[22:57:14] moeabdol: has joined #RubyOnRails
[22:57:16] renegadeandy: quazimodo: I wnt to keep track of currently subscribed users, so i would capture a list which is updated in incoming : https://gist.github.com/ArmyAndy/ea70cdc8ee2e4651e404 ??? so i can literally have this file in my lib dir somewhere, and require it, and it replaces the gem???s implementation???..thats crazy, not really sure how that works!
[22:57:48] kuroro: has joined #RubyOnRails
[22:59:02] elton: has joined #RubyOnRails
[22:59:05] quazimodo: it works like this
[22:59:14] quazimodo: ruby opens the class, redefines things, badaboom badabing it's done
[22:59:30] quazimodo: and thus it is that ruby is a bitch to optimize and is very slow
[22:59:31] renegadeandy: hahahah quazimodo thats brilliant.
[23:00:40] renegadeandy: quazimodo: so does ruby see module PrivatePub line and look to see if that is already loaded???if loaded, it replaces it?
[23:01:11] quazimodo: doesn't replace it
[23:01:18] quazimodo: just opens it and redefines stuff inside
[23:01:20] alias-ls-to-rm: has joined #RubyOnRails
[23:01:27] quazimodo: why am i teaching you this?
[23:01:31] quazimodo: it's bad bad juju
[23:01:46] renegadeandy: quazimodo: because I want a way to override an interface???s implementation
[23:01:59] sbarg1: has joined #RubyOnRails
[23:02:32] diegoviola: has joined #RubyOnRails
[23:03:06] tenderlove: has joined #RubyOnRails
[23:03:35] renegadeandy: quazimodo: so then I just add this to my application.rb - require 'lib/gem_overrides/private_pub/faye_extension.rb'
[23:03:39] syzygy_: has joined #RubyOnRails
[23:03:53] beingjohnm: has joined #RubyOnRails
[23:04:25] yfeldblum: has joined #RubyOnRails
[23:05:38] mary5030_: has joined #RubyOnRails
[23:06:19] tds5016: has joined #RubyOnRails
[23:06:22] renegadeandy: except that doesnt seem to work : quazimodo : https://gist.github.com/ArmyAndy/ea70cdc8ee2e4651e404#file-error
[23:06:53] kuroro: has joined #RubyOnRails
[23:07:04] cassioscabral: has joined #RubyOnRails
[23:07:10] smathy: |PiP|, "use them" doesn't help me understand your problem. They're not case sensitive, I don't think they've ever been.
[23:07:36] tds5016: hi all. It looks like after_update is callbacks are being run after the destroy method is called; is that expected?
[23:08:06] ornerymoose: has joined #RubyOnRails
[23:10:47] failasLStoRM: has joined #RubyOnRails
[23:11:25] annlewis: has joined #RubyOnRails
[23:11:43] null__: has joined #RubyOnRails
[23:11:44] null__: has joined #RubyOnRails
[23:11:47] maesitos: has joined #RubyOnRails
[23:12:16] hahuang65: has joined #RubyOnRails
[23:12:17] smathy: tds5016, no.
[23:13:02] mary5030: has joined #RubyOnRails
[23:14:12] jessemcgilallen: has joined #RubyOnRails
[23:15:14] zubnola: has joined #RubyOnRails
[23:16:19] tds5016: smathy: never mind; I just realized what I was doing, and it was dumb.
[23:16:20] renegadeandy: quazimodo: I am not seeing this override actually working, my version is not running?
[23:16:29] tds5016: lol. I needed to run skip_callbacks on something else.
[23:17:29] rickmasta: has joined #RubyOnRails
[23:17:40] baweaver: has joined #RubyOnRails
[23:19:36] hahuang61: has joined #RubyOnRails
[23:20:08] _Tariq: has joined #RubyOnRails
[23:23:57] _Tariq: has joined #RubyOnRails
[23:27:07] rgrmatt: has joined #RubyOnRails
[23:28:53] quazimodo: renegadeandy: no idea why
[23:29:01] quazimodo: the idea does wok
[23:29:24] quazimodo: you just need to require it after the gem is required
[23:29:53] quazimodo: put it after line 8 ma
[23:29:57] quazimodo: *line 8 man
[23:30:13] tenderlove: has joined #RubyOnRails
[23:30:19] quazimodo: you see in line 8 that bundler is used to require all your gems, so your changes are being over written
[23:31:30] versatiletech: has joined #RubyOnRails
[23:33:05] pwnd_nsfw: has joined #RubyOnRails
[23:35:10] FastJack: has joined #RubyOnRails
[23:37:13] nya: has joined #RubyOnRails
[23:38:03] wmdrossard: has joined #RubyOnRails
[23:39:46] sarink: has joined #RubyOnRails
[23:41:45] renegadeandy: quazimodo: what about line 25???
[23:43:18] rakm: has joined #RubyOnRails
[23:43:48] renegadeandy: quazimodo: shouldnt that auto load all my lib subdirectories anyway?
[23:44:51] centrx: has joined #RubyOnRails
[23:45:14] Xentil: has joined #RubyOnRails
[23:46:00] mrbubbles: has joined #RubyOnRails
[23:50:58] baweaver: has joined #RubyOnRails
[23:54:05] yfeldblum: has joined #RubyOnRails
[23:55:50] FastJack: has joined #RubyOnRails
[23:56:00] stannard: has joined #RubyOnRails
[23:57:04] Ropeney: has joined #RubyOnRails
[23:57:08] hnanon: has joined #RubyOnRails
[23:57:44] renegadeandy: quazimodo: im now trying this inside a file called require.rb inside initializers/ : ???require "#{Rails.root}/lib/gem_overrides/private_pub/faye_extension" ???
[23:58:06] moeabdol: has joined #RubyOnRails
[23:58:24] rhizome: what insanity are you all attempting
[23:58:43] renegadeandy: rhizome: monkey patch
[23:59:11] smathy: http://images.sodahead.com/polls/000940442/CrazyMonkey_answer_1_xlarge.jpeg
[23:59:30] jgt: has joined #RubyOnRails
[23:59:51] elton: has joined #RubyOnRails
[23:59:55] _Tariq: has joined #RubyOnRails