« Back to channel list

#RubyOnRails - 16 July 2016

« Back 1 day Forward 1 day »
[00:01:32] roamingdog: has joined #RubyOnRails
[00:03:25] codezomb: has joined #RubyOnRails
[00:04:41] crystal77: has joined #RubyOnRails
[00:06:24] kies: has joined #RubyOnRails
[00:07:15] amperry: well, forging ahead. Have a good one, all.
[00:08:25] DoctorMonocular: has joined #RubyOnRails
[00:09:25] euphoria-: has joined #RubyOnRails
[00:10:48] travismathis: has joined #RubyOnRails
[00:14:32] superlou: has joined #RubyOnRails
[00:18:52] broman: has joined #RubyOnRails
[00:19:00] broman: what am I doing wrong? <%= form_for @imagen, :html => { :multipart => false } do |f| %>
[00:21:53] xlegoman: has joined #RubyOnRails
[00:22:55] broman: When i try the default form_for it adds the multipart/form-data to my form tag... how can I supress that?
[00:24:52] matthewd: broman: https://github.com/rails/rails/blob/1091d746c9fac4b056ad7597bdd37a07e6283bfd/actionview/lib/action_view/helpers/form_helper.rb#L451 seems relevant
[00:25:03] coder4543: has joined #RubyOnRails
[00:25:36] adam12: Doesn't it get added automatically if there is a file field?
[00:25:48] matthewd: broman: Why do you want to suppress it?
[00:26:20] jtong: has joined #RubyOnRails
[00:27:39] Ebok: has joined #RubyOnRails
[00:28:13] Rodya_: has joined #RubyOnRails
[00:28:25] benlieb: has joined #RubyOnRails
[00:30:38] willl: has joined #RubyOnRails
[00:31:38] willl: Upgrading from 4->5, I only require action_controller and action_mailer instead of rails/all. Would this be why in rails 5 Rails::Application::Configuraiton no longer has the #assets method?
[00:33:43] broman: so I can the the file name without uploading the file
[00:34:27] beingjohnm: I need to save an attribute to a new user based on the subdomain they use to create the account. This is what I have but I'm not sure if I'm on the right track. https://gist.github.com/willjohnson/a889cdcc29f788ff5bfc855ec16902f2
[00:40:04] twilling: has joined #RubyOnRails
[00:40:12] mwlang: has joined #RubyOnRails
[00:41:58] mwlang: I’m trying to retrieve the class name stored in the `type` column of a STI table. The goal is to prevent merging to dissimilar types, so we check the passed array of ids, aka: “merge_list” in the following: Person.where(id: merge_list).distinct.pluck(:type) => [nil]
[00:42:11] euphoria-: has joined #RubyOnRails
[00:42:42] mwlang: any idea why the pluck(:type) returns nil instead of the class_name stored in the `type` column?
[00:43:06] roamingdog: has joined #RubyOnRails
[00:43:50] roamingdog: has joined #RubyOnRails
[00:46:18] matthewd: mwlang: What's the query that's being run?
[00:47:17] nettoweb: has joined #RubyOnRails
[00:47:25] beingjohnm: ahhh...finally got it.
[00:47:27] mwlang: matthewd: SELECT DISTINCT `people`.`type` FROM `people` WHERE `people`.`id` IN (6, 4)
[00:48:05] blackmesa: has joined #RubyOnRails
[00:48:41] fckyoufreenode: has joined #RubyOnRails
[00:49:25] matthewd: mwlang: And does running that query directly give the result you expect?
[00:50:09] mwlang: matthewd: I’m actually looking at that now…suspecting the base class Person isn’t storing class “Person” for the base class in the FactoryGirl Factory.
[00:50:16] mwlang: looking for the INSERT statement in the test logs.
[00:51:42] mwlang: that’s it…when creating a base Person record with FactoryGirl, the type isn’t populated with “Person” as expected. All the others STI models, on the other hand are populated as expected.
[00:52:19] ankhers: has joined #RubyOnRails
[00:53:11] dminuoso: has joined #RubyOnRails
[00:54:05] conta: has joined #RubyOnRails
[00:56:34] wiskirz: has joined #RubyOnRails
[00:58:35] SteenJobs: has joined #RubyOnRails
[00:59:02] swemoney: has joined #RubyOnRails
[01:00:12] swemoney: Does anyone know if it would be possible to use ActionCable and use the users geolocation to only broadcast to nearby users?
[01:02:27] bronson: has joined #RubyOnRails
[01:03:33] matthewd: swemoney: Yes
[01:04:32] willl: has left #RubyOnRails: ()
[01:04:44] swemoney: matthewd: How would you conceptualize this? I'm having trouble figuring out how I would go about it. I have a chat room with a handful of "interests". The user joins a room, but then I only want them to actually be able to chat with people around them.
[01:05:10] swemoney: I've considered just filtering the messages on the client side but that seems wasteful and hacky.
[01:07:15] swemoney: I've also thought about just broadcasting to each individual user (like "roomname_userid" as the broadcast channel), but I don't know how well that would scale if I have to broadcast to 100 users or something
[01:07:40] matthewd: swemoney: Divide the world up into sections, then subscribe to the interest+section pair
[01:08:07] mrgreenfur: has joined #RubyOnRails
[01:08:44] SteenJobs: has joined #RubyOnRails
[01:09:07] swemoney: matthewd: I'm thinking much more local (like 10 miles). That would be a LOT of sections. heh.
[01:10:12] matthewd: You don't need a model for it; just round the lat/long to the desired precision
[01:10:16] quazimodo: has joined #RubyOnRails
[01:10:59] macsteps: has joined #RubyOnRails
[01:11:20] swemoney: matthewd: I see. That's something that could work. Would be a little weird on the edges of each "section" but I might just have to deal with that
[01:12:11] matthewd: Yeah.. just subscribe to neighbouring sections too, and then do final filtering in the client if you want to be exact
[01:12:50] twilling: has joined #RubyOnRails
[01:13:16] Leepoff: has joined #RubyOnRails
[01:14:40] quazimod1: has joined #RubyOnRails
[01:14:55] swemoney: matthewd: I like it. Thanks for the help. I'll see how well it works.
[01:15:49] amperry: has joined #RubyOnRails
[01:16:31] amperry: hey all, got a basic question regarding iterating over ActiveRecord::Relations
[01:18:38] amperry: meh, I'm being silly. It's a console problem.
[01:19:06] amperry: I always seem to figure it out right after I ask someone.
[01:24:15] mrgreenfur: has joined #RubyOnRails
[01:27:47] jtong: has joined #RubyOnRails
[01:28:11] amperry: nope, I didn't get it right, so here's a gist for anyone who wants to take a look: https://gist.github.com/amp108/27b484725b1cc90b2a8dc1beedcfcaa6
[01:28:47] Oliphaunte: has joined #RubyOnRails
[01:28:56] baash05: has joined #RubyOnRails
[01:29:52] Oliphaunte: has joined #RubyOnRails
[01:31:58] pawnbox: has joined #RubyOnRails
[01:32:54] matthewd: amperry: "doesn't [work]" is not so easy to resolve. What does happen, and what are you expecting?
[01:33:47] amperry: I get the error: "NoMethodError: undefined method `apt_type' for nil:NilClass"
[01:34:49] amperry: for any single element of @residents, say, @residents[6], I can find the apt_type_name with, e.g. @residents[6].apt.apt_type.apt_type_name
[01:35:14] matthewd: Apparently there's one for which that's not true
[01:35:19] SteenJobs: anyone get a “stop: Unknown parameter: app” error when trying to run sudo service puma [stop | start | restart]
[01:36:25] hahuang61: has joined #RubyOnRails
[01:38:05] amperry: matthewd: hrm... let me see if I can catch that exception and continue
[01:38:07] AndrewIsHere: has joined #RubyOnRails
[01:38:25] Oliphaunte: has joined #RubyOnRails
[01:39:29] mrgreenfur: has joined #RubyOnRails
[01:44:07] roamingdog: SteenJobs: for my app here, 'app' is defined in /etc/init/puma-manager.conf, and used in /etc/init/puma.conf, if that helps
[01:44:24] amperry: matthewd: thanks, that was it.
[01:44:33] oystersauce8: has joined #RubyOnRails
[01:44:36] SteenJobs: roamingdog: thanks. that’s more than i had before. had absolutely no idea what instance ${app} was. but that should help, i’m sure it’s a filepaths thing
[01:44:50] SteenJobs: roamingdog: feels like that’s ltierally every kind of bug i encounter in server world
[01:45:15] roamingdog: amperry: ambethia?
[01:47:12] euphoria-: has joined #RubyOnRails
[01:47:49] claypo: has joined #RubyOnRails
[01:49:07] blackmesa: has joined #RubyOnRails
[01:53:40] amperry: roamingdog: nope
[01:54:03] roamingdog: amperry: k, similar name to a guy i know, thanks
[01:54:06] dminuoso: has joined #RubyOnRails
[01:54:58] mrgreenfur: has joined #RubyOnRails
[01:59:16] euphoria-: has joined #RubyOnRails
[02:04:54] AndrewIsHere: has joined #RubyOnRails
[02:14:08] macsteps: has joined #RubyOnRails
[02:15:15] bronson: has joined #RubyOnRails
[02:16:44] coder4543: has joined #RubyOnRails
[02:17:09] coder4543: Hi Guys, a Question. How can I save images in a DB?
[02:17:38] mfilipe: i have one model that has an enum field. when i use object.attributes, it returns the integer value and not the string. is there any way to replace the integer value to string?
[02:18:49] coder4543: You tried with ".to_s"?
[02:20:56] mfilipe: coder4543, i don't see a way to apply .to_s using .attributes
[02:21:55] coder4543: Sorry, I new on Rails i come from Ruby
[02:22:05] coder4543: I'm learning
[02:22:32] coder4543: Just I wanted help
[02:24:00] mfilipe: no problem
[02:24:37] oystersauce8: has joined #RubyOnRails
[02:25:28] coder4543: You know how I can include images in a DB?
[02:25:50] coder4543: What attribute must I use?
[02:25:58] coder4543: for my model
[02:26:38] adam12: You likely don't want images in your database
[02:26:48] adam12: if you want to store them in a filesystem, and _reference_ them in your database, I am partial to Dragonfly
[02:26:53] zacts: has joined #RubyOnRails
[02:26:54] adam12: (the Gem)
[02:27:01] euphoria-: has joined #RubyOnRails
[02:27:10] adam12: Others like Paperclip and CarrierWave. I encourage you to check them all out and decide which one you like best.
[02:27:15] Leepoff: has joined #RubyOnRails
[02:28:04] mfilipe: the solution I found: flow.flow_actions.map {|action| action.attributes.update('unit' => action.unit)
[02:28:15] mfilipe: it is ugly but works
[02:28:19] coder4543: I must create a Database with products and each product must have an imagen. I can do it with DragonFly?
[02:28:45] adam12: coder4543: Sure. You specify an "image_uid" field on the table and use "dragonfly_accessor :image" in your model.
[02:28:53] adam12: coder4543: Read the dragonfly docs. All explained.
[02:29:13] jtong: has joined #RubyOnRails
[02:29:22] coder4543: A lot of thanks adam
[02:29:32] coder4543: I'll read it and learn
[02:30:07] Oliphaunte: has joined #RubyOnRails
[02:31:23] nettoweb: has joined #RubyOnRails
[02:34:07] Oliphaunte: has joined #RubyOnRails
[02:37:08] wiskirz: has joined #RubyOnRails
[02:42:36] hahuang61: has joined #RubyOnRails
[02:42:57] moeabdol2: has joined #RubyOnRails
[02:43:23] Axsuul: Anyone use LiveReload with Sublime Text, or is there a better alternative these days?
[02:46:15] harfangk: has joined #RubyOnRails
[02:50:03] Oliphaunte: has joined #RubyOnRails
[02:50:08] zacts: has joined #RubyOnRails
[02:51:06] blackmesa: has joined #RubyOnRails
[02:54:39] dminuoso: has joined #RubyOnRails
[02:56:28] bronson: has joined #RubyOnRails
[02:57:09] xall: has joined #RubyOnRails
[03:02:09] siaW: has joined #RubyOnRails
[03:04:01] rakm: has joined #RubyOnRails
[03:05:07] rickmasta: has joined #RubyOnRails
[03:08:38] yfeldblum: has joined #RubyOnRails
[03:08:42] filter85: has joined #RubyOnRails
[03:09:10] filter85: has joined #RubyOnRails
[03:09:10] filter85: has joined #RubyOnRails
[03:09:48] pawnbox: has joined #RubyOnRails
[03:11:40] nettoweb: has joined #RubyOnRails
[03:12:12] roamingdog: has joined #RubyOnRails
[03:14:57] drupald: has joined #RubyOnRails
[03:17:41] flashpoint9: has joined #RubyOnRails
[03:19:36] kies: has joined #RubyOnRails
[03:23:40] k3rn31: has joined #RubyOnRails
[03:26:39] treaki_: has joined #RubyOnRails
[03:28:27] calmchaos: has joined #RubyOnRails
[03:29:57] lxsameer: has joined #RubyOnRails
[03:30:44] jtong: has joined #RubyOnRails
[03:31:09] l4v2: has joined #RubyOnRails
[03:31:27] rickmasta: has joined #RubyOnRails
[03:33:21] calmchaos: has joined #RubyOnRails
[03:35:30] neohunter: has joined #RubyOnRails
[03:43:27] hahuang61: has joined #RubyOnRails
[03:46:41] pawnbox: has joined #RubyOnRails
[03:49:29] claypo: has joined #RubyOnRails
[03:52:23] blackmesa: has joined #RubyOnRails
[03:53:12] cd-rum: has joined #RubyOnRails
[03:53:43] rickmasta: has joined #RubyOnRails
[03:55:26] dminuoso: has joined #RubyOnRails
[03:55:37] wiskirz: has joined #RubyOnRails
[04:03:26] leea: has joined #RubyOnRails
[04:05:31] bronson: has joined #RubyOnRails
[04:11:16] daffy_duck_2: has joined #RubyOnRails
[04:12:58] roamingdog: has joined #RubyOnRails
[04:13:00] zacts: has joined #RubyOnRails
[04:16:14] AndrewIsHere: has joined #RubyOnRails
[04:19:51] rakm: has joined #RubyOnRails
[04:24:17] flashpoint9: has joined #RubyOnRails
[04:24:21] djbkd: has joined #RubyOnRails
[04:24:23] harfangk: has joined #RubyOnRails
[04:24:36] Tempesta: has joined #RubyOnRails
[04:31:13] Devalo: has joined #RubyOnRails
[04:32:22] jtong: has joined #RubyOnRails
[04:41:44] blackhuey: has joined #RubyOnRails
[04:44:19] dtzuzu: has joined #RubyOnRails
[04:44:29] dtzuzu: how does one disable action cable logging?
[04:47:08] k3rn31: has joined #RubyOnRails
[04:47:17] siaW: if someone knows a bit a bout react/rails and can help: http://stackoverflow.com/questions/38407809/expose-model-data-in-component please do :)
[04:48:17] DoctorMonocular: has joined #RubyOnRails
[04:56:14] dminuoso: has joined #RubyOnRails
[04:57:56] pawnbox: has joined #RubyOnRails
[05:07:26] bronson: has joined #RubyOnRails
[05:11:08] Cohedrin: has joined #RubyOnRails
[05:11:35] wethu: has joined #RubyOnRails
[05:13:20] Cohedrin: has joined #RubyOnRails
[05:14:21] hahuang61: has joined #RubyOnRails
[05:14:52] _Tariq: has joined #RubyOnRails
[05:16:22] Cohedrin: has joined #RubyOnRails
[05:18:10] zacts: has joined #RubyOnRails
[05:21:10] blackmesa: has joined #RubyOnRails
[05:25:48] flashpoint9: has joined #RubyOnRails
[05:30:25] fcser_: has joined #RubyOnRails
[05:33:34] bronson: has joined #RubyOnRails
[05:33:40] wiskirz: has joined #RubyOnRails
[05:34:04] jtong: has joined #RubyOnRails
[05:40:18] pawnbox: has joined #RubyOnRails
[05:43:04] Rodya_: has joined #RubyOnRails
[05:56:58] dminuoso: has joined #RubyOnRails
[06:00:03] euphoria-: has joined #RubyOnRails
[06:03:32] pawnbox: has joined #RubyOnRails
[06:04:34] sergey_makagon: has joined #RubyOnRails
[06:05:29] Axsuul: has joined #RubyOnRails
[06:12:18] speaking1ode: has joined #RubyOnRails
[06:12:55] euphoria-: has joined #RubyOnRails
[06:14:57] Dimik--: has joined #RubyOnRails
[06:16:40] yfeldblum: has joined #RubyOnRails
[06:21:59] blackmesa: has joined #RubyOnRails
[06:25:59] pawnbox: has joined #RubyOnRails
[06:27:06] flashpoint9: has joined #RubyOnRails
[06:28:28] lalalaaa: has joined #RubyOnRails
[06:30:36] rails45: has joined #RubyOnRails
[06:31:29] rails45: How can you make a has_many and belongs_to association between two existing models from the console?
[06:32:36] Devalo: has joined #RubyOnRails
[06:35:31] jtong: has joined #RubyOnRails
[06:37:21] jstransky: has joined #RubyOnRails
[06:45:45] SteenJobs: has joined #RubyOnRails
[06:51:43] claypo: has joined #RubyOnRails
[06:53:06] crdpink: has joined #RubyOnRails
[06:54:50] Rodya_: has joined #RubyOnRails
[06:55:23] baash05: has joined #RubyOnRails
[06:55:46] baash05: Anyone running rails on a MySQL db?
[06:55:53] baash05: I'm new to it..
[06:55:56] baash05: and I've got this
[06:55:58] baash05: <Mysql2::Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)>
[06:56:10] baash05: when I run rake db:create
[06:56:24] baash05: Does anyone know how to get around it?
[06:56:32] baweaver: do you have mysql server installed?
[06:56:36] baweaver: is it running?
[06:56:45] baash05: http://www.cyberciti.biz/faq/howto-install-mysql-on-ubuntu-linux-16-04/
[06:56:51] baweaver: rails won't magically start it or install it for you
[06:56:51] baash05: I followed those instructions.
[06:57:08] baash05: and it all seemed good.
[06:57:24] baweaver: sudo systemctl start mysql
[06:57:27] baweaver: or that in this case
[06:57:33] baweaver: did you run either?
[06:57:42] dminuoso: has joined #RubyOnRails
[06:57:43] baash05: sudo systemctl start mysql.service
[06:57:43] baash05: [sudo] password for dave:
[06:58:04] darutoko: has joined #RubyOnRails
[06:58:07] baash05: Nothing negative shows up.
[06:58:46] baweaver: ps aux | grep mysql | grep -v grep
[06:58:52] baweaver: any rows show up?
[06:58:54] baash05: Humm.. and now it seem to be working..
[06:59:07] baweaver: so somehow it got shut off
[06:59:22] baweaver: well, if it works it works then.
[06:59:28] baash05: mysql 960 0.0 10.5 1915424 847984 ? Ssl 13:51 0:06 /usr/sbin/mysqld
[06:59:36] baweaver: it's running
[06:59:51] baash05: cool.. Woot..
[07:00:02] baash05: Thanks baweaver
[07:00:18] baash05: How do you pronounce your nic?
[07:00:44] baweaver: baweaver -> b.a. weaver -> Brandon A Weaver
[07:00:54] baash05: Ah.. cool.
[07:01:20] baweaver: I'll also accept Badass Weaver
[07:03:28] arup_r: has joined #RubyOnRails
[07:04:35] hahuang65: has joined #RubyOnRails
[07:08:41] Dimik: has joined #RubyOnRails
[07:15:36] blackmesa: has joined #RubyOnRails
[07:17:52] KnownSyntax: has joined #RubyOnRails
[07:17:52] KnownSyntax: has joined #RubyOnRails
[07:18:26] baash05: And I thought I was through
[07:18:29] baash05: rake aborted!
[07:18:29] baash05: Mysql2::Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
[07:18:46] baash05: but the grep still returns the thing I had above.
[07:21:10] zacts: has joined #RubyOnRails
[07:21:49] zacts: has joined #RubyOnRails
[07:23:07] arup_r: has joined #RubyOnRails
[07:23:45] arup_r: baash05: that happens when db is not running. did you check that/
[07:24:46] baash05: I've run this ps aux | grep mysql | grep -v grep
[07:24:54] baash05: is that what you mean.
[07:25:09] baash05: it returns a line.
[07:25:35] baash05: mysql 960 0.0 10.5 1915424 847984 ? Ssl 13:51 0:06 /usr/sbin/mysqld
[07:25:56] baash05: does that mean I'm running?
[07:26:05] baash05: or rather it's running?
[07:26:44] arup_r: hmm it means it is running
[07:26:52] baash05: excellent.
[07:27:28] arup_r: show your database.yml file
[07:28:21] baash05: Mind if I paste here?
[07:28:29] baash05: Just the dev section?
[07:28:34] arup_r: no.. in gist
[07:28:41] arup_r: yes dev section
[07:30:04] baash05: https://gist.github.com/baash05/4e26289578e28a2b5046e80a0b59f1f1
[07:30:46] arup_r: baash05: what this mysqladmin variables | grep socket shows?
[07:30:59] arup_r: i mean run `mysqladmin variables | grep socket`
[07:31:07] baash05: I just removed the socket bit..
[07:31:08] arup_r: and tell me the output or paste in gist
[07:31:12] baash05: of the yml.
[07:31:21] arup_r: hm.. and then?
[07:31:26] baash05: and the migration worked..
[07:31:41] arup_r: I never used socket .. and it just worked. And also you shouldn't
[07:31:59] arup_r: if you want to use socket, then run the command I said.. and it will tell you the socket path
[07:32:02] baash05: cool.. it's for a client and I got this 4 year old rails app.
[07:32:10] arup_r: and you can put that then in database.yml
[07:32:45] arup_r: better is don't put any settings if you really need it.. :)
[07:32:51] arup_r: baash05: good luck! :)
[07:33:18] baash05: sudo mysqladmin variables | grep socket
[07:33:18] baash05: | performance_schema_max_socket_classes | 10
[07:33:34] arup_r: that's it?
[07:33:42] arup_r: no more output ?
[07:33:57] baash05: socket | /var/run/mysqld/mysqld.sock
[07:34:05] baash05: I think that's the line I care about.
[07:34:20] arup_r: that is the line if you want can put in yml file
[07:34:36] arup_r: but I would ignore to put it in the yaml file at all.
[07:34:57] baash05: Perfect.. I shall take your advice.
[07:35:28] baash05: The migration still fails.. but after running a pile..
[07:35:40] baash05: they were on rails 2..
[07:36:09] baash05: Sadly I didn't count getting things running in my estimates.
[07:36:43] pawnbox: has joined #RubyOnRails
[07:37:03] jtong: has joined #RubyOnRails
[07:37:18] arup_r: baash05: I guessed it is Rails 2 .. as you said 4 years old app :p
[07:37:30] lizard2010: that happens with absolete code..
[07:38:05] arup_r: it was a disaster for me few months back. I was assigned 2 rails 2 projects to upgrade, and I failed and quit the job
[07:38:56] pawnbox: has joined #RubyOnRails
[07:39:11] arup_r: they took me for something after somedays gave me those shits to upgrade alone.. :( And myself started rails from V4.. still I can code in Rails 3.. but Rails 2 migration for me is No NO. I am not that much experienced really.. :(
[07:41:43] arup_r: brb "shower time"
[07:45:49] baash05: I don't think it's going to be all that hard.. the app is very very simple.
[07:52:36] marr: has joined #RubyOnRails
[07:54:27] tvw: has joined #RubyOnRails
[07:55:39] Rodya_: has joined #RubyOnRails
[07:57:44] solars: has joined #RubyOnRails
[07:58:28] dminuoso: has joined #RubyOnRails
[08:04:43] arup_r: has joined #RubyOnRails
[08:19:28] AndrewIsHere: has joined #RubyOnRails
[08:20:37] rails123: has joined #RubyOnRails
[08:21:33] rails123: Could someone take a look? https://stackoverflow.com/questions/38401781/most-liked-posts-in-last-2-hours-with-acts-as-votable-gem
[08:23:23] Tempesta: has joined #RubyOnRails
[08:25:41] Devalo: has joined #RubyOnRails
[08:35:09] Devalo: has joined #RubyOnRails
[08:37:12] AzaToth: has joined #RubyOnRails
[08:38:31] jtong: has joined #RubyOnRails
[08:45:55] arup_r: has joined #RubyOnRails
[08:48:06] FastJack: has joined #RubyOnRails
[08:48:19] moeabdol2: has joined #RubyOnRails
[08:50:20] blackmesa: has joined #RubyOnRails
[08:52:34] baash05: has joined #RubyOnRails
[08:53:14] claypo: has joined #RubyOnRails
[08:53:38] apotry: has joined #RubyOnRails
[08:56:38] Rodya_: has joined #RubyOnRails
[08:56:53] dminuoso: has joined #RubyOnRails
[09:00:48] jxs_: has joined #RubyOnRails
[09:06:00] bronson: has joined #RubyOnRails
[09:12:30] oqui: has joined #RubyOnRails
[09:13:58] hahuang65: has joined #RubyOnRails
[09:17:27] m1lt0n: has joined #RubyOnRails
[09:19:03] m1lt0n: hello. I'm facing an issue with rails-api 5 with rack cors enabled. Everything works properly, but when I change some code (in development) in the api, all requests (with provisional headers) are stuck as pending in the browser
[09:19:26] dionysus69: has joined #RubyOnRails
[09:20:17] m1lt0n: the issue happens only when changing code in the back end. When starting the server and the front-end and everything works, everything works properly
[09:20:24] m1lt0n: any ideas?
[09:26:12] Devalo: has joined #RubyOnRails
[09:26:41] mdel: has joined #RubyOnRails
[09:28:41] StevenXL: has joined #RubyOnRails
[09:30:19] arup_r: has joined #RubyOnRails
[09:32:44] Palsson: has joined #RubyOnRails
[09:36:40] moeabdol2: has joined #RubyOnRails
[09:39:54] jtong: has joined #RubyOnRails
[09:45:00] _tpavel: has joined #RubyOnRails
[09:47:48] roshanavand: has joined #RubyOnRails
[09:48:31] snowy: has joined #RubyOnRails
[09:51:01] baash05: has joined #RubyOnRails
[09:58:25] Rodya_: has joined #RubyOnRails
[10:00:17] arBmind: has joined #RubyOnRails
[10:00:19] neohunter: has joined #RubyOnRails
[10:01:16] yardenbar: has joined #RubyOnRails
[10:14:35] apotry: has joined #RubyOnRails
[10:14:42] hahuang65: has joined #RubyOnRails
[10:15:03] roamingdog: has joined #RubyOnRails
[10:18:57] blackmesa: has joined #RubyOnRails
[10:22:48] pawnbox: has joined #RubyOnRails
[10:28:31] shinnya: has joined #RubyOnRails
[10:31:27] roamingdog: has joined #RubyOnRails
[10:33:07] netzfisch: has joined #RubyOnRails
[10:33:24] snowy: has joined #RubyOnRails
[10:33:39] Mia: has joined #RubyOnRails
[10:33:39] Mia: has joined #RubyOnRails
[10:41:51] jtong: has joined #RubyOnRails
[10:42:16] c355E3B: has joined #RubyOnRails
[10:44:26] SirOliver: has joined #RubyOnRails
[10:46:17] AntiSpamMeta: has joined #RubyOnRails
[10:50:34] netzfisch: has joined #RubyOnRails
[10:53:53] quazimodo: has joined #RubyOnRails
[10:53:56] quazimod1: has joined #RubyOnRails
[10:59:10] Rodya_: has joined #RubyOnRails
[11:01:57] Devalo: has joined #RubyOnRails
[11:07:22] bronson: has joined #RubyOnRails
[11:13:15] triptec: has joined #RubyOnRails
[11:15:32] chipotle: has joined #RubyOnRails
[11:17:53] mikecmpbll: has joined #RubyOnRails
[11:27:53] blackmesa: has joined #RubyOnRails
[11:29:56] dionysus69: has joined #RubyOnRails
[11:39:55] sergey_makagon: has joined #RubyOnRails
[11:43:17] jtong: has joined #RubyOnRails
[11:53:13] deur-: I was wondering if someone could help me understand something, I'm not sure how to google for information
[11:53:36] deur-: We're working on an engine at our company, it has a bunch of lib classes
[11:54:33] deur-: If I define a class with Blaze::Forms::SubmissionsDatagrid
[11:54:46] deur-: it keeps saying it does not know the constant Blaze::Forms
[11:55:22] deur-: Yet when I define it with explicit notation of module Blaze; module Forms; class SubmissionsDatagrid, it does.
[11:55:48] deur-: This seems to make sense at first glance, but why doesn't Ruby know that in the first example Blaze::Forms are modules?
[11:56:01] deur-: They can't be anything else, can they?
[11:56:20] rickmasta: has joined #RubyOnRails
[11:59:50] Rodya_: has joined #RubyOnRails
[12:02:08] lele: has joined #RubyOnRails
[12:02:29] trifling-jest: has joined #RubyOnRails
[12:03:39] Palsson: has joined #RubyOnRails
[12:03:57] trifling-jest: anyone here can help me with deploying an api rails app on AWS?
[12:06:11] trifling-jest: has left #RubyOnRails: ("Leaving")
[12:06:29] trifling-jest: has joined #RubyOnRails
[12:07:15] Devalo: has joined #RubyOnRails
[12:07:28] trifling-jest: has joined #RubyOnRails
[12:07:42] trifling-jest: hi guys, can anyone help me with configuring an api rails app on AWS?
[12:09:21] oystersauce8: has joined #RubyOnRails
[12:20:27] fox_mulder_cp: it's a russian weekend webapp ^) gem 'barbecue' gem 'brazier' gem 'alcohol'
[12:21:15] jhass: trifling-jest: just ask about your actual issue, if anybody has any tip, they'll respond
[12:22:40] SirOliver: has joined #RubyOnRails
[12:23:47] doodlehaus: has joined #RubyOnRails
[12:28:43] l4v2: has joined #RubyOnRails
[12:29:25] blackmesa: has joined #RubyOnRails
[12:29:35] harfangk: has joined #RubyOnRails
[12:35:55] flashpoint9: has joined #RubyOnRails
[12:36:26] futilegames: has joined #RubyOnRails
[12:38:11] netzfisch: has joined #RubyOnRails
[12:40:21] blackmesa: has joined #RubyOnRails
[12:42:11] flashpoint9: has joined #RubyOnRails
[12:44:32] bryanculver: has joined #RubyOnRails
[12:44:51] jtong: has joined #RubyOnRails
[12:50:56] FCser: has joined #RubyOnRails
[12:51:53] roamingdog: has joined #RubyOnRails
[12:53:03] calmchaos: has joined #RubyOnRails
[12:53:37] quazimodo: has joined #RubyOnRails
[12:55:11] netzfisch: has joined #RubyOnRails
[12:56:43] sergey_makagon: has joined #RubyOnRails
[12:58:33] quazimod1: has joined #RubyOnRails
[12:59:04] trifling-jest: how do you setup an API rails app on EC2?
[13:00:47] Rodya_: has joined #RubyOnRails
[13:01:15] wiskirz: has joined #RubyOnRails
[13:07:13] qejk: has joined #RubyOnRails
[13:07:28] jhass: like any other rails app on any other VPS
[13:08:26] harfangk: has joined #RubyOnRails
[13:10:56] trifling-jest: can you walk me through it?
[13:11:01] trifling-jest: i've already deployed the web app
[13:11:20] trifling-jest: problem is that webapp is namespaced as another API app for our mobile app
[13:11:35] trifling-jest: how do i access api.myapp.com?
[13:11:53] trifling-jest: www.myapp.com is accessible already
[13:12:01] trifling-jest: the api part of it is not
[13:15:35] jhass: trifling-jest: just add another vhost to your reverse proxy?
[13:18:58] baash05: You know how some applications in the past had attr_accessible
[13:19:18] baash05: And how some applications just left everything wide open
[13:19:50] baash05: and how now strong params are "the thing"
[13:20:17] baash05: Is there a way to make all attributes accessible without going into each model?
[13:20:33] baash05: and without adding strong params.
[13:20:47] futilegames: has joined #RubyOnRails
[13:20:53] baash05: Before you fry me (and I should be I suppose)
[13:21:06] baash05: I've been asked to make some small changes to an existing application.
[13:21:38] baash05: An application that has zero tests.
[13:21:42] siaW: if someone can help: http://stackoverflow.com/questions/38411542/submitting-a-form-to-rails-with-reactjs :)
[13:24:00] jhass: baash05: cool, where are my free user accounts? :P
[13:25:40] khelair: has joined #RubyOnRails
[13:26:34] jhass: baash05: not sure what your question is though, so the app is still using protected attributes, right?
[13:27:02] jhass: how to bypass strong params?
[13:27:04] baash05: Or well all attributes are protected now.
[13:27:10] jhass: the "going into each model" part confuses me
[13:27:37] baash05: Sorry.. the app was on rails 2, and all attributes were public.
[13:28:10] baash05: not an attr_accessible in the code.
[13:28:26] khelair: does anybody have any ideas why <%= status_tag(subst.flat_rate) %> wouldn't work in a new project I created when it's working fine in the tutorial I was working with?
[13:28:28] baash05: I tested it on the live site.. you can litterally write to any field..
[13:28:46] khelair: I'm getting an 'undefined method' for status_tag()
[13:28:51] khelair: rails 4, btw
[13:29:20] baash05: khelair: where is that value defined?
[13:29:26] baash05: where is it set?
[13:29:28] jhass: khelair: my guess would be that the tutorial added some gem that provided the status_tag method
[13:29:35] jhass: because it's not provided by rails
[13:29:46] jhass: or perhaps defined a helper by that nae
[13:30:10] jhass: baash05: and you want to restore that behavior while using strong params or.... ?
[13:30:17] jhass: I'm still confused
[13:30:21] baash05: No.. when I upgraded to 4.
[13:30:41] khelair: baash05: you mean the value subst.flat_rate or the status_tag() method?
[13:30:46] baash05: it all stopped working because now none of the fields are accessible.
[13:31:02] khelair: jhass: I'll check the gemfile out, thnx
[13:31:17] baash05: Ah.. I see now..
[13:31:56] baash05: I added the gem protected_attributes because the devise gem demands it.
[13:32:08] jhass: uh, no it doesn't
[13:32:22] jhass: maybe your ancient version of it does...
[13:32:31] baash05: Crap.. they monkey patched it.
[13:32:40] jhass: anyway, yeah, protected attributes restores rails 3 behavior
[13:32:49] crystal77: has joined #RubyOnRails
[13:33:00] baash05: Yeah.. ha ha.
[13:34:02] baash05: I am very cautious in this codebase. There was not even a test/spec folder.
[13:35:35] baash05: thanks.. I think I see what I've got to do.
[13:35:42] baash05: Sometimes just talking it out.
[13:40:10] w1sk: has joined #RubyOnRails
[13:46:04] jtong: has joined #RubyOnRails
[13:47:17] axilaris: has joined #RubyOnRails
[13:47:42] axilaris: sorry for the dumb question, i'ved got this migration
[13:47:43] axilaris: t.references :user, index: true, foreign_key: true
[13:47:56] axilaris: what does foreign_key means here
[13:48:50] axilaris: after deleting user, it then caused an exception for this table "update or delete on table "users" violates foreign key constraint"
[13:51:37] pawnbox: has joined #RubyOnRails
[13:52:47] triptec: has joined #RubyOnRails
[14:08:10] crystal77: has joined #RubyOnRails
[14:08:31] dangerousdave: has joined #RubyOnRails
[14:08:33] yadobujo: has joined #RubyOnRails
[14:09:11] Terens: ruby tapas
[14:09:31] Terens: ioctl abuse
[14:14:28] fmcgeough: has joined #RubyOnRails
[14:14:31] yadobujo: has left #RubyOnRails: (requested by jhass (Your behavior is not conducive to the desired environment.))
[14:16:04] fox_mulder_cp: axilaris in model has_many :somesubmodel, dependent: :destroy|:nullify
[14:16:34] axilaris: oh whats nullify ?
[14:16:41] axilaris: u mean one destroy
[14:16:47] jhass: set the value to NULL
[14:16:56] axilaris: u mean on destroy, the dependent will just set to null
[14:17:04] axilaris: oh thats good to know.
[14:17:07] nettoweb: has joined #RubyOnRails
[14:17:21] fox_mulder_cp: axilaris: read about references :)
[14:17:34] axilaris: actually just before your answer i tried to just put , dependent: :destroy
[14:17:47] axilaris: but that would mean it will delete those records
[14:18:04] axilaris: which if possible i would like to maintain
[14:18:20] fox_mulder_cp: destroying of model does not need everytimes :)
[14:18:24] jhass: setting a foreign key constraint in the first place kinda implies they make no sense without their referenced record though
[14:19:18] fox_mulder_cp: when i start drops my webapps with associated ip's model my server drops all associated ip's too
[14:19:25] fox_mulder_cp: seems bad idea :)
[14:19:39] jhass: in the case of referencing a user, it might be a good practice to associate them to a special ghost account before deleting the user
[14:19:39] axilaris: yup... sometimes u want to do some historical audits
[14:19:39] hahuang65: has joined #RubyOnRails
[14:20:00] axilaris: so nullifying still doesnt seem to be a real solution
[14:20:29] axilaris: ghost account is one way
[14:20:31] fox_mulder_cp: jhass: thanks for idea for me
[14:21:03] jhass: another way is instead of destroying the user, replace all identifying information with dummy values and lock the account
[14:21:25] axilaris: jhass: yeah like a status.
[14:21:32] fox_mulder_cp: in one of my tables i have ~100gb historical datas for block it's using by new visitors
[14:21:34] axilaris: account lock for example
[14:21:51] jhass: devise has a lockable strategy iirc
[14:21:59] fox_mulder_cp: such as squotyting domains/emails
[14:22:55] axilaris: question if we dont have foreignkey contraints would those foreign key be refereble still ?
[14:23:31] axilaris: foreignkey is just for referential integrity right ?
[14:24:02] axilaris: not much for optimizing, thats indexing right ? sorry for my db ignorance
[14:25:26] jhass: right, the index is to make the lookup on the column faster
[14:25:41] jhass: the foreign key ensures the value of a common exists in another column (in another table)
[14:25:47] jhass: *of a column
[14:26:02] jhass: not sure how you define "referable"
[14:28:02] myntcake: has joined #RubyOnRails
[14:39:24] w1sk: has joined #RubyOnRails
[14:43:15] arup_r: has joined #RubyOnRails
[14:44:06] iamdevnul: has joined #RubyOnRails
[14:47:21] futilegames: has joined #RubyOnRails
[14:47:38] jtong: has joined #RubyOnRails
[14:48:40] mrbubbles: has joined #RubyOnRails
[14:50:10] mrbubbles: Sorry for the n00b question - my system rails has been updated to 5.0.0 but I'm trying to create a project that only - at present - supports 4.2.6. What's the best solution to use rails 4.2.6 for that project? I'm using Rails 5.0.0 for other projects.
[14:55:34] twilling: has joined #RubyOnRails
[14:55:54] jhass: mrbubbles: rails _4.2.6_ new my_project
[14:56:47] mrbubbles: Ah, yep literally just stumbled across that. Thanks jhass
[14:57:38] jhass: mrbubbles: ^ there's 4.1.7 btw
[14:57:44] jhass: er, 4.2.7
[14:57:55] mrbubbles: will see if it works with that
[15:01:34] SteenJobs: has joined #RubyOnRails
[15:04:32] srinidhi: has joined #RubyOnRails
[15:07:26] siaW: can someone who knows a bit about React help me out: http://stackoverflow.com/questions/38411542/submitting-a-form-to-rails-with-reactjs
[15:08:16] daffy_duck: has joined #RubyOnRails
[15:09:11] bronson: has joined #RubyOnRails
[15:12:38] barajasfab: has joined #RubyOnRails
[15:14:57] harfangk: has joined #RubyOnRails
[15:14:58] Oliphaunte: has joined #RubyOnRails
[15:16:39] dvinciguerra_: has joined #RubyOnRails
[15:16:51] arBmind: has joined #RubyOnRails
[15:20:25] hahuang65: has joined #RubyOnRails
[15:22:43] pontiki: has joined #RubyOnRails
[15:23:23] rafaelflores: has joined #RubyOnRails
[15:23:50] flashpoint9: has joined #RubyOnRails
[15:24:25] flashpoint9: has joined #RubyOnRails
[15:26:47] AndrewIsHere: has joined #RubyOnRails
[15:27:03] arup_r: has joined #RubyOnRails
[15:29:43] adavia: has joined #RubyOnRails
[15:32:06] benlieb: has joined #RubyOnRails
[15:37:00] rollinDyno: has joined #RubyOnRails
[15:37:04] rollinDyno: When I run `bundle check` I find a list of gems that are missing. However, if I do `bundle install`, it’ll say it’s complete. The missing gems are in `Gemfile.lock` but not in `Gemfile`, how can I sort this out rather than install these one by one?
[15:41:24] arup_r: rollinDyno: Are you sure those are not dependencies if actuals gems ?
[15:42:28] rollinDyno: arup_r: they were actual gems, but I sorted it out. apparently the puma gem wasn't being installed properly and that stops the rest of the gems from being installed. here i thought bundle installs all of the gems in parallel and I wasted time on an assumption
[15:43:39] harfangk: has joined #RubyOnRails
[15:45:15] pawnbox: has joined #RubyOnRails
[15:45:39] arup_r: rollinDyno: ah I see. I experienced the same thing few weeks back.. there was some junk character in my gemfile. Due to which all gems after that junk character was ignored silently
[15:45:40] flashpoint9: has joined #RubyOnRails
[15:45:57] arup_r: and I spent hours to understand that
[15:46:04] rollinDyno: it's up and running now, can finally get to coding :-/
[15:46:18] arup_r: awesome.. !! good luck!
[15:46:29] arup_r: harfangk: what does it mean? :p
[15:47:17] harfangk: arup_r it's the meaning of life version 2.0!
[15:48:30] harfangk: has joined #RubyOnRails
[15:49:10] jtong: has joined #RubyOnRails
[15:49:36] The_Phoenix: has joined #RubyOnRails
[15:50:41] The_Phoenix: has joined #RubyOnRails
[15:51:43] roamingdog: has joined #RubyOnRails
[15:52:41] blackmesa: has joined #RubyOnRails
[15:55:19] Suguki: has joined #RubyOnRails
[15:56:53] pawnbox: has joined #RubyOnRails
[15:57:40] roamingdog: has joined #RubyOnRails
[16:01:13] mrgreenfur: has joined #RubyOnRails
[16:05:59] rocketsurgeon: has joined #RubyOnRails
[16:06:07] rocketsurgeon: good evening all
[16:08:28] arup_r: rocketsurgeon: Hi
[16:08:50] Suguki: rocketsurgeon: Hi
[16:09:17] rocketsurgeon_: has joined #RubyOnRails
[16:10:06] rocketsurgeon_: i have a form in rails, in which i want to use an array instead of 'regular' variable
[16:10:28] rocketsurgeon_: for example: f.radio_button :answers, 100
[16:10:55] Hobogrammer: has joined #RubyOnRails
[16:11:10] rocketsurgeon_: in which :answers is an array
[16:11:45] rocketsurgeon_: if i do: f.radio_button :answers[index], 100 it wont work
[16:11:51] arup_r: rocketsurgeon: so you want to display in the form radio buttons whose number is same as the array size?
[16:12:19] arup_r: i mean if array has 3 data, your form will have 3 radio buttons etc?
[16:12:25] arup_r: something like that ^
[16:12:31] rocketsurgeon_: and i wnana save the first radio_button in array[0]
[16:12:43] arup_r: ok check the `collection_radio_buttons` method
[16:12:46] rocketsurgeon_: second button value (that user clicks) in array[1] et.c
[16:13:20] rocketsurgeon_: allright thanks
[16:13:22] rocketsurgeon_: im gonna check it out
[16:13:41] arup_r: and you will be pleased when you will use it.. :)
[16:14:06] rocketsurgeon_: i think i mis-explained my problem
[16:14:30] rocketsurgeon_: lets say i have 10 questions, and each question has 4 multiple-choice answers
[16:14:51] qejk: has joined #RubyOnRails
[16:14:53] rocketsurgeon_: my problem isnt outputting all the radioboxes, that works
[16:15:06] rocketsurgeon_: but i want question1 with answer A to be stored in array[1]
[16:15:14] rocketsurgeon_: question2 with answer B to be stored in array[2]
[16:15:20] arup_r: show your form in a gis
[16:15:39] DoctorMonocular: has joined #RubyOnRails
[16:16:05] arup_r: also I would like to know what is the model set up for questions you have
[16:16:29] The_Phoenix: has joined #RubyOnRails
[16:17:29] fox_mulder_cp: official ubuntu forum hacked
[16:17:35] eserror: has joined #RubyOnRails
[16:17:39] The_Phoenix: has joined #RubyOnRails
[16:18:34] The_Phoenix: has joined #RubyOnRails
[16:19:00] rocketsurgeon_: https://gist.github.com/anonymous/1597e5c54e5414133bf579068b36b897
[16:19:03] rocketsurgeon_: here you go arup_r
[16:19:13] rocketsurgeon_: my problem is i think on line 45
[16:19:31] rocketsurgeon_: i was hoping to use :answers[questionIndex]
[16:19:33] rocketsurgeon_: instead of just :answers
[16:19:34] The_Phoenix: has joined #RubyOnRails
[16:20:41] The_Phoenix: has joined #RubyOnRails
[16:21:25] hahuang65: has joined #RubyOnRails
[16:21:51] The_Phoenix: has joined #RubyOnRails
[16:22:16] Cohedrin: has joined #RubyOnRails
[16:24:02] arup_r: rocketsurgeon: the helper you are using will not do what you want. for that you need to use http://apidock.com/rails/v4.0.2/ActionView/Helpers/FormOptionsHelper/collection_radio_buttons . Because look at the html generated by this method, and the 1 you got right now in your browser.
[16:24:28] arup_r: to get an array, you need to rename the each radio type input tags names
[16:24:47] rocketsurgeon_: i was hoping it could become name="report[answers[whatever]]"
[16:24:53] fox_mulder_cp: arup_r: and how radiobutton group mapped into model property(es)?
[16:25:03] rocketsurgeon_: thanks for taking a look
[16:25:12] rocketsurgeon_: im gonna readup on the collection_radio_buttons
[16:25:15] arup_r: if you want to use the current set up then use radio_button_tag and build the name manually or use the method I lined
[16:28:17] moeabdol: has joined #RubyOnRails
[16:28:52] rocketsurgeon_: arup_r, i got it working with radio_button_tag
[16:28:59] Meow-J: has joined #RubyOnRails
[16:29:17] arup_r: check twice.. I am confused for a while here.. after fox_mulder_cp shoot :p
[16:29:46] benlieb: has joined #RubyOnRails
[16:30:21] fox_mulder_cp: arup_r: i'm idiot, yep :)
[16:30:49] arup_r: but anyway.. radio button is for selecting 1 option out of multiple, but checkbox is selecting as many as out of multiple from the same group. That is basic AFAIK. Build stuff by keeping this in mind
[16:31:18] arup_r: fox_mulder_cp: No dude. that is not what I meant. I was bit confused for some reasons.. it seems to me you were right
[16:31:55] fox_mulder_cp: arup_r u about my 'i'm idiot'?%)
[16:32:00] arup_r: neither we are actually coding.. things are coming from day to day work experience.. and spreading it here .. hehe
[16:32:26] arup_r: fox_mulder_cp: how are you today?
[16:32:27] macsteps: has joined #RubyOnRails
[16:32:54] Axsuul: has joined #RubyOnRails
[16:33:29] fox_mulder_cp: arup_r: u right about experience. i said some days ago - i'm preparing to speech about my hosting app speech on Kyiv opensource conference )
[16:35:08] fox_mulder_cp: arup_r: i'm write hosting control panel app, based on rails, pgsql and docker
[16:35:10] arup_r: rocketsurgeon_: : I want to send 1 of my rocket to my neighbor house, but it is not kicking ... can you do a surgery of
[16:35:19] arup_r: good thing.. fox_mulder_cp
[16:35:49] fox_mulder_cp: arup_r: it's a my diploma to rails web dev :)
[16:35:53] arup_r: ACTION wants to hire rocketsurgeon_ for his rocket.. 
[16:36:13] arup_r: fox_mulder_cp: You are basically from devops background?
[16:36:53] fox_mulder_cp: arup_r: hostmaster on some small hostings located in Kyiv, update from support engineer
[16:37:00] crystal77: has joined #RubyOnRails
[16:37:12] fox_mulder_cp: and devops knowledges too
[16:38:31] workmad3: has joined #RubyOnRails
[16:38:33] fox_mulder_cp: i'm think. that all panels, such as cpanel, plesk, ispmanager are idiotic
[16:38:35] travismathis: has joined #RubyOnRails
[16:39:11] dionysus70: has joined #RubyOnRails
[16:39:24] harfangk: has joined #RubyOnRails
[16:40:53] roamingdog: has joined #RubyOnRails
[16:46:46] rogue_koder: has joined #RubyOnRails
[16:48:59] leea: has joined #RubyOnRails
[16:49:03] rizenine: has joined #RubyOnRails
[16:50:29] dminuoso: has joined #RubyOnRails
[16:50:33] jtong: has joined #RubyOnRails
[16:50:42] futilegames: has joined #RubyOnRails
[16:53:03] triptec: has joined #RubyOnRails
[16:57:07] eserror: has left #RubyOnRails: ()
[16:59:35] claypo: has joined #RubyOnRails
[16:59:40] The_Phoenix: has joined #RubyOnRails
[17:00:20] flashpoint9: has joined #RubyOnRails
[17:01:04] Huop: has joined #RubyOnRails
[17:02:23] dminuoso: has joined #RubyOnRails
[17:08:40] triptec: has joined #RubyOnRails
[17:10:05] darutoko: has joined #RubyOnRails
[17:15:09] Devalo: has joined #RubyOnRails
[17:15:58] SteenJobs: has joined #RubyOnRails
[17:19:09] Oliphaunte: has joined #RubyOnRails
[17:22:28] hahuang65: has joined #RubyOnRails
[17:31:01] speakingcode: has joined #RubyOnRails
[17:31:32] Anchoaman: has joined #RubyOnRails
[17:37:14] srinidhi: has joined #RubyOnRails
[17:40:06] flashpoint9: has joined #RubyOnRails
[17:42:23] flashpoint9: has joined #RubyOnRails
[17:45:41] nettoweb: has joined #RubyOnRails
[17:45:53] pawnbox: has joined #RubyOnRails
[17:46:25] AndrewIsHere: has joined #RubyOnRails
[17:46:30] Anchoaman: can anyone help me with this gist?
[17:46:45] Anchoaman: I am a completly noob in rails
[17:46:52] Anchoaman: https://gist.github.com/anonymous/0e5452d3363f39854c01981d155fe252
[17:47:29] Anchoaman: basically what I want to make is a simple inventory of my electronic components, just a way to practice rails
[17:48:12] Anchoaman: but I have no idea how to make in a has_may through relation not create a component when it already exist in db
[17:49:13] arup_r: has joined #RubyOnRails
[17:51:58] jtong: has joined #RubyOnRails
[17:53:13] zacts: has joined #RubyOnRails
[17:53:14] rollinDyno: has joined #RubyOnRails
[17:54:10] rafaelflores: has joined #RubyOnRails
[17:54:41] Devalo: has joined #RubyOnRails
[17:54:45] apotry: has joined #RubyOnRails
[17:55:17] netzfisch: has joined #RubyOnRails
[17:57:17] crystal77: has joined #RubyOnRails
[17:57:55] jxs_: has joined #RubyOnRails
[18:00:15] speaking1ode: has joined #RubyOnRails
[18:02:00] n1lo: has joined #RubyOnRails
[18:02:49] macsteps: has joined #RubyOnRails
[18:08:46] Dimik: has joined #RubyOnRails
[18:12:47] Rodya_: has joined #RubyOnRails
[18:14:13] djbkd: has joined #RubyOnRails
[18:14:17] armyriad: has joined #RubyOnRails
[18:14:54] chipotle: has joined #RubyOnRails
[18:16:17] speaking1ode: has joined #RubyOnRails
[18:16:50] Anchoaman: has joined #RubyOnRails
[18:17:18] benlieb: has joined #RubyOnRails
[18:18:20] roamingdog: has joined #RubyOnRails
[18:23:31] hahuang65: has joined #RubyOnRails
[18:29:24] pawnbox: has joined #RubyOnRails
[18:29:46] srinidhi: has joined #RubyOnRails
[18:31:03] Dimik--: has joined #RubyOnRails
[18:35:53] DoctorMonocular: I'm pretty confused about FileUtils.rm_r
[18:36:30] netzfisch: has joined #RubyOnRails
[18:36:31] arup_r: join #ruby :)
[18:36:53] DoctorMonocular: buh, even more dead :( Ok though, you're right
[18:38:25] Oliphaunte: has joined #RubyOnRails
[18:40:56] xall: has joined #RubyOnRails
[18:43:26] sergey_makagon: has joined #RubyOnRails
[18:43:51] roamingdog: has joined #RubyOnRails
[18:46:56] AndrewIsHere: has joined #RubyOnRails
[18:50:55] roamingdog: has joined #RubyOnRails
[18:51:00] doodlehaus: has joined #RubyOnRails
[18:53:32] jtong: has joined #RubyOnRails
[18:54:34] zacts: has joined #RubyOnRails
[18:55:02] jottr: has joined #RubyOnRails
[18:56:15] banisterfiend: has joined #RubyOnRails
[18:59:14] rafaelflores: has joined #RubyOnRails
[19:02:46] rollinDyno: has joined #RubyOnRails
[19:06:54] siaW: has joined #RubyOnRails
[19:10:22] w1sk: has joined #RubyOnRails
[19:11:13] roamingdog: has joined #RubyOnRails
[19:11:54] codezomb: has joined #RubyOnRails
[19:12:35] leea: has joined #RubyOnRails
[19:13:28] hinbody: has joined #RubyOnRails
[19:18:36] moeabdol: has joined #RubyOnRails
[19:19:43] macsteps: has joined #RubyOnRails
[19:20:19] triptec: has joined #RubyOnRails
[19:20:22] roamingdog: has joined #RubyOnRails
[19:20:32] rickmasta: has joined #RubyOnRails
[19:22:27] amped: has joined #RubyOnRails
[19:22:40] Amras0000: has joined #RubyOnRails
[19:22:45] srinidhi1: has joined #RubyOnRails
[19:23:31] crystal77: has joined #RubyOnRails
[19:24:11] oystersauce8: has joined #RubyOnRails
[19:24:16] hahuang65: has joined #RubyOnRails
[19:24:50] Amras0000: How would I go about finding all the 'User's whose name is in a given array?
[19:25:10] Amras0000: I know I could just call find_by(name: value) for each value in the array, wondering if I can do it in one query
[19:28:17] Amras0000: something to the effect of name.include? my_array
[19:28:26] Amras0000: other way around
[19:28:36] amped: Amras0000: try User.where(name: array)
[19:28:54] amped: where array is the name of the array
[19:28:57] arup_r: Amras0000: that ^ does an IN query FYI
[19:29:06] arup_r: and that is what you want
[19:30:40] siaW: if someone who knows react can help :) http://stackoverflow.com/questions/38411542/submitting-a-form-to-rails-with-reactjs
[19:31:32] amped: anyone know what else, outside application_policy.rb and a specific class_policy.rb, might give a scope NoMethodError? https://gist.github.com/amp108/fed8f84a56b31b0a08202563f7d7ab9a
[19:35:00] Rodya_: has joined #RubyOnRails
[19:35:48] triptec: has joined #RubyOnRails
[19:44:55] ElFerna: has joined #RubyOnRails
[19:45:38] futilegames: has left #RubyOnRails: ()
[19:45:51] djbkd: has joined #RubyOnRails
[19:46:18] alex88: has joined #RubyOnRails
[19:46:34] alex88: hi there, my websocket connection works fine in production
[19:46:42] alex88: in development it connects, I get 'Successfully upgraded to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket)' in logs
[19:46:51] pat: has joined #RubyOnRails
[19:46:54] alex88: but after a few seconds the client reconnects again
[19:46:57] alex88: over and over
[19:47:04] roamingdog: has joined #RubyOnRails
[19:47:27] yfeldblum: has joined #RubyOnRails
[19:47:29] alex88: any clue?
[19:47:35] alex88: no console errors, no errors on rails side
[19:48:30] futilegames: has joined #RubyOnRails
[19:48:51] alex88: no, I thought it was a port issue but it's not, same problem
[19:52:13] wiskirz: has joined #RubyOnRails
[19:54:57] jtong: has joined #RubyOnRails
[19:55:34] HalcyonicStorm: has joined #RubyOnRails
[19:56:35] amped: anyone able to help with https://gist.github.com/amp108/fed8f84a56b31b0a08202563f7d7ab9a ?
[20:01:55] meoblast001: has joined #RubyOnRails
[20:02:00] claypo: has joined #RubyOnRails
[20:06:27] macsteps: has joined #RubyOnRails
[20:06:31] ekinmur: has joined #RubyOnRails
[20:07:06] jhass: amped: the interesting bit would be the corresponding Scope.new call
[20:10:14] amped: jhass: "interesting"?
[20:10:41] moeabdol1: has joined #RubyOnRails
[20:10:45] jhass: yes, as to where to figure out what Apt is and where it comes from any why it's passed as the scope parameter
[20:11:06] roamingdog: has joined #RubyOnRails
[20:12:03] efy: has joined #RubyOnRails
[20:12:42] HalcyonicStorm: has joined #RubyOnRails
[20:13:10] amped: jhass: if I understand the first part of your question, that's ">> scope.class
[20:13:32] jhass: I'm afraid you don't
[20:13:41] jhass: you didn't show anything about Apt
[20:14:01] jhass: all we know so far is that it doesn't have a method called where
[20:14:10] arup_r: jhass: https://gist.github.com/amp108/fed8f84a56b31b0a08202563f7d7ab9a#file-apt_policy-rb
[20:14:27] jhass: Apt is not AptPolicy
[20:14:44] arup_r: yeah, sorry
[20:16:44] jhass: amped: as it stands the options are that you didn't intend to pass an Apt instance but something else, which could possibly be inferred from the code calling Scope.new or that you defined Apt in the wrong way, which could possibly inferred from the code defining it
[20:18:24] amped: jhass: an Apt instance is intended. It is only defined by calling edit. I can include the controller, but the weird thing is, I haven't touched that in over a week, and this worked two days ago.
[20:20:13] xall_: has joined #RubyOnRails
[20:21:18] rafaelflores: has joined #RubyOnRails
[20:25:09] amped: jhass: hmmm... or did I? I don't *remember* working on it, but it has a timestamp of Jul 14 14:48. Wonder if I revert it to an earlier version...
[20:25:18] hahuang65: has joined #RubyOnRails
[20:25:46] jhass: you should try to understand the issue, not randomly revert stuff until it appears to be working again
[20:27:10] amped: well, looking through the diff now
[20:28:14] banisterfiend: has joined #RubyOnRails
[20:30:41] xibalba: has joined #RubyOnRails
[20:34:16] amped: jhass: it seems like changing the line in set_apt from `@apt = Apt.find(params[:id])` to `@apt = policy_scope(Apt.find(params[:id]))` did it
[20:35:13] roamingdog: has joined #RubyOnRails
[20:35:20] srinidhi: has joined #RubyOnRails
[20:36:00] ur5us: has joined #RubyOnRails
[20:41:22] amped: jhass: I think the problem lies in that an instance of a single record won't have a 'where' method, which is logical. The base problem is, I don't remember altering that line, but that's a problem no-one else can help me with.
[20:41:23] weaksauce: has joined #RubyOnRails
[20:42:31] amped: jhass: thanks for looking at it. I'll alter the Scope code to test for single object vs. collection.
[20:46:42] apotry: has joined #RubyOnRails
[20:48:23] roamingdog: has joined #RubyOnRails
[20:52:32] solars: has joined #RubyOnRails
[20:55:44] zacts: has joined #RubyOnRails
[20:56:28] jtong: has joined #RubyOnRails
[20:59:22] Amras0000: so I'm relatively new to rails, and I'm just looking through the guide on layouts, and while I don't imagine I'll use half the features there anytime soon, holy fuck that syntax is elegant
[20:59:44] Amras0000: I just want to dump a bunch of rails code into a pool and swim in it
[21:03:22] travismathis: has joined #RubyOnRails
[21:09:55] Papierkorb: Amras0000: If you're referring to the view code too, ERB is just the start :)
[21:10:13] rafaelflores: has joined #RubyOnRails
[21:14:42] levifig: has joined #RubyOnRails
[21:14:50] ur5us: has joined #RubyOnRails
[21:16:59] djbkd: has joined #RubyOnRails
[21:18:35] snowy: has joined #RubyOnRails
[21:23:09] grvgr: has joined #RubyOnRails
[21:25:55] KnownSyntax: has joined #RubyOnRails
[21:25:55] KnownSyntax: has joined #RubyOnRails
[21:26:17] zacts: has joined #RubyOnRails
[21:26:19] hahuang65: has joined #RubyOnRails
[21:26:35] futilegames: has left #RubyOnRails: ()
[21:29:20] Oliphaunte: has joined #RubyOnRails
[21:30:06] leea: has joined #RubyOnRails
[21:31:27] iwada: has joined #RubyOnRails
[21:32:17] crystal77: has joined #RubyOnRails
[21:34:43] Moeh: has joined #RubyOnRails
[21:40:55] leea: has joined #RubyOnRails
[21:45:54] nettoweb: has joined #RubyOnRails
[21:46:31] moeabdol1: has joined #RubyOnRails
[21:46:57] flashpoint9: has joined #RubyOnRails
[21:47:10] dminuoso: has joined #RubyOnRails
[21:47:23] triptec: has joined #RubyOnRails
[21:49:11] silentpost: has joined #RubyOnRails
[21:51:43] silentpost: has joined #RubyOnRails
[21:52:19] macsteps: has joined #RubyOnRails
[21:52:24] silentpost: has left #RubyOnRails: ()
[21:55:12] marr: has joined #RubyOnRails
[21:57:34] doodlehaus: has joined #RubyOnRails
[22:01:19] AndrewIsHere: has joined #RubyOnRails
[22:03:28] claypo: has joined #RubyOnRails
[22:04:48] roamingdog: has joined #RubyOnRails
[22:05:06] rafaelflores: has joined #RubyOnRails
[22:11:59] zz_timnovinger: has joined #RubyOnRails
[22:12:43] matt_d: Amras0000: go for it!! welcome to rails.
[22:13:09] rollinDyno: has joined #RubyOnRails
[22:16:45] rafaelflores: has joined #RubyOnRails
[22:17:31] carpeliam: has joined #RubyOnRails
[22:19:15] pawnbox: has joined #RubyOnRails
[22:19:22] rocketsurgeon: has joined #RubyOnRails
[22:19:34] carpeliam: any advice on testing that an ActiveJob has broadcasted to ActionCable.server?
[22:20:01] Coldblackice: has joined #RubyOnRails
[22:20:39] AndrewIsHere: has joined #RubyOnRails
[22:20:44] jtd: has joined #RubyOnRails
[22:21:22] gthank: has joined #RubyOnRails
[22:21:22] gthank: has joined #RubyOnRails
[22:21:29] humd1ng3r: has joined #RubyOnRails
[22:22:36] xall_: has joined #RubyOnRails
[22:23:29] rafaelflores: has joined #RubyOnRails
[22:24:17] flashpoint9: has joined #RubyOnRails
[22:30:57] alfiemax: has joined #RubyOnRails
[22:33:54] Rodya_: has joined #RubyOnRails
[22:34:59] workmad3: has joined #RubyOnRails
[22:37:51] xall_: has joined #RubyOnRails
[22:40:10] Monolithe: has joined #RubyOnRails
[22:41:25] rafaelfranca: has joined #RubyOnRails
[22:45:54] zacts: has joined #RubyOnRails
[22:46:28] crystal77: has joined #RubyOnRails
[22:47:42] chipotle: has joined #RubyOnRails
[22:48:56] chipotle: has joined #RubyOnRails
[22:53:09] Oliphaunte: has joined #RubyOnRails
[22:56:36] sniff: has joined #RubyOnRails
[22:56:57] nersoh: has joined #RubyOnRails
[22:57:16] flashpoint9: has joined #RubyOnRails
[22:59:10] jtong: has joined #RubyOnRails
[22:59:47] diegoviola: has joined #RubyOnRails
[23:05:29] agent_white: has joined #RubyOnRails
[23:08:22] djbkd: has joined #RubyOnRails
[23:14:02] flashpoint9: has joined #RubyOnRails
[23:14:11] Uranio: has joined #RubyOnRails
[23:16:33] leea_: has joined #RubyOnRails
[23:21:26] qejk: has joined #RubyOnRails
[23:23:28] Rodya_: has joined #RubyOnRails
[23:23:43] FernandoBasso: I have config/locales/activerecord/attributes/pt-BR.yml with post:... attribute values but rails doesn't use them (it works if I have those attributes translated in the main pt-BR.yml file. Rails is configured to load translations in subdirectories. Any ideas?
[23:24:35] AndrewIsHere: has joined #RubyOnRails
[23:28:01] hahuang65: has joined #RubyOnRails
[23:29:02] jhass: FernandoBasso: putting them into a directory doesn't namespace them, you still have to repeat the namespace inside the file
[23:29:11] qejk: has joined #RubyOnRails
[23:30:00] jottr_: has joined #RubyOnRails
[23:32:47] carpeliam: has joined #RubyOnRails
[23:37:50] doodlehaus: has joined #RubyOnRails
[23:39:42] xall_: has joined #RubyOnRails
[23:42:48] der-landgraf: has joined #RubyOnRails
[23:44:09] yfeldblum: has joined #RubyOnRails
[23:46:42] DevMagpie: has joined #RubyOnRails
[23:47:03] gavri: has joined #RubyOnRails
[23:47:11] gavri: I'd using ActiveRecord and would like to create where conditions for a relation that I also want to reuse when this relation is included with #includes to eager load it with its parent association
[23:47:55] travismathis: has joined #RubyOnRails
[23:48:17] gavri: I'd like to reuse a bunch of where clauses both when finding records on this class and also when this class is eagerloaded with its parent class. Is there a way to do this?
[23:48:41] dminuoso: has joined #RubyOnRails
[23:49:44] gavri: I know it would just work if the child class doesn't have any attributes shared with the parent class. But my child and parent activerecord classes have attributes/columns with the same names like 'status'
[23:53:37] FernandoBasso: jhass: Thanks. The rails guide on i18n is not very verbose about this specific part.
[23:55:33] DoctorMonocular: has joined #RubyOnRails
[23:56:24] dalbusch1t: has joined #RubyOnRails
[23:57:11] nettoweb: has joined #RubyOnRails
[23:58:14] one_zero: has joined #RubyOnRails