« Back to channel list

#RubyOnRails - 13 July 2017

« Back 1 day Forward 1 day »
[00:01:48] hahuang65: Radar: I've been a bit demotivated lately to do anything lol
[00:01:52] hahuang65: just kind of lazying around
[00:03:33] brent__: has joined #RubyOnRails
[00:03:46] quirkycoders: has joined #RubyOnRails
[00:03:57] Radar: why demotivated?
[00:04:54] hahuang65: Radar: idk, just don't have any ideas for anything outside of work and don't feel like doing anything outside of work... some kind of fatigue i suppose
[00:05:24] Radar: Time to take a vacation
[00:06:27] hahuang65: maybe I will visit the outback
[00:08:13] hahuang65: i actually know quite a few austrailians
[00:12:21] jhfisc: has joined #RubyOnRails
[00:17:31] jhfisc: has joined #RubyOnRails
[00:23:14] jhfisc: has joined #RubyOnRails
[00:24:17] quirkycoders: has joined #RubyOnRails
[00:25:17] weiyang: has joined #RubyOnRails
[00:29:18] umaaji: has joined #RubyOnRails
[00:37:15] weiyang: has joined #RubyOnRails
[00:38:04] npgm: has joined #RubyOnRails
[00:40:04] mokiwis: has joined #RubyOnRails
[00:41:42] jhfisc: has joined #RubyOnRails
[00:52:21] brent__: has joined #RubyOnRails
[00:58:04] jhfisc: has joined #RubyOnRails
[00:59:26] quirkycoders: has joined #RubyOnRails
[01:01:25] aperkins81: oi oi ;) queenslander lurking here :P our state won the national football (state of origin) last night.. 11 years of wins out of 12 years isnt too shabby ;)
[01:04:06] jhfisc: has joined #RubyOnRails
[01:04:39] twilling: has joined #RubyOnRails
[01:12:30] ddubs: has joined #RubyOnRails
[01:17:04] bronson: has joined #RubyOnRails
[01:23:24] elevenx0: has joined #RubyOnRails
[01:25:35] jhfisc: has joined #RubyOnRails
[01:33:03] hendry: has joined #RubyOnRails
[01:33:31] jhfisc: has joined #RubyOnRails
[01:34:00] hendry: hi guys, at a new job I'm asked to interact with a Restful Rails API, but I am finding it awkware to PUT/POST/DELETE all the time. Is this normal or could our Rails developers make it easier? https://codereview.stackexchange.com/questions/169070/javascript-client-using-a-rest-api-to-edit-a-playlist
[01:35:23] quirkycoders: has joined #RubyOnRails
[01:39:24] mtkd: has joined #RubyOnRails
[01:41:23] Jason: hendry: that's literally the design of rails...
[01:42:29] ddubs: hendry: looking at the codereview post and you are correct, RESTful endpoints use HTTP verbs to manipulate data. http://restful-api-design.readthedocs.io/en/latest/methods.html
[01:45:16] jhfisc: has joined #RubyOnRails
[01:45:42] Jameser: has joined #RubyOnRails
[01:48:59] hendry: Jason: ummm, am I the only one who thinks it's a bit painful to update a new list of stuff?
[01:49:54] hendry: seems a bit convuluted. I expected one POST. Not a combo of GET/PUT/POST/DELETE
[01:55:27] jhfisc: has joined #RubyOnRails
[02:00:34] mokiwis: has joined #RubyOnRails
[02:05:10] jhfisc: has joined #RubyOnRails
[02:11:22] hendry: i.e. 4 calls when I was expecting from the client to do 1. Tad inefficient.
[02:17:26] jhfisc: has joined #RubyOnRails
[02:19:12] cpruitt: has joined #RubyOnRails
[02:25:29] mokiwis: has joined #RubyOnRails
[02:27:12] jeromelanteri: how to change specific colors for rails-vim IDE inside vim (for exemple for comments...) ? this is not rails question, but it is for rails-vim, so rails and vim conern if someone here use vim, maybe...
[02:28:08] Chernobuk: has joined #RubyOnRails
[02:29:16] jhfisc: has joined #RubyOnRails
[02:29:57] ddubs: hendry: are you updating an existing object? if so that should simply be a PUT
[02:36:00] hendry: ddubs: well I can't PUT without a GET first, since I need to know the item's ID iiuc.
[02:49:39] jhfisc: has joined #RubyOnRails
[02:54:08] ddubs: hendry: i assumed you'd do a GET first as you need to have the objects ID in order to update it
[02:56:04] jhfisc: has joined #RubyOnRails
[02:57:12] jeromelanteri: any help for use a javascript gallery with rails-4 ? this one: http://unitegallery.net/index.php?page=documentation#using_the_api
[02:58:14] jeromelanteri: i tryed many different ways... actually, i'm trying to include js code of it inside all pages by application.js and assets.rb precompile... then put inside all of the splitted js codes from this javascript gallery...
[03:00:29] jeromelanteri: just put the repo of this gallery and make application.js go for find unitegallery.js doesn't works... and html page show exctly same html tags then exmple provide and running for gallery packages... and use same code to coffeescript translate by the way rails use it (in a assets/javascript file use with controller load from layout/application.html.haml file (all are loaded... but gallery is not running ...)
[03:00:42] hendry: ddubs: point is, even in the simplest case, it's a GET & a POST. Is there no paradigm to get things down to *one http* request to update a list of stuffs?
[03:00:47] jeromelanteri: no one use gallery with rails here ?
[03:00:56] hendry: ddubs: sorry a GET & a PUT.
[03:01:47] ascarter: has joined #RubyOnRails
[03:02:29] jhfisc: has joined #RubyOnRails
[03:08:01] zireaileron: has joined #RubyOnRails
[03:17:58] bronson: has joined #RubyOnRails
[03:20:47] blindMoe: has joined #RubyOnRails
[03:21:35] zireaileron: Hello everyone
[03:21:39] blindMoe: Is it possible to render a .jbuilder file into a variable? I have a jbuilder file setup for the format I use on the API responses but I want to also store the same format into a variable for use on a different part of the site
[03:25:29] duderonomy: has joined #RubyOnRails
[03:29:18] jhfisc: has joined #RubyOnRails
[03:29:23] chouhoulis: has joined #RubyOnRails
[03:31:01] irishfromua: has joined #RubyOnRails
[03:35:15] jhfisc: has joined #RubyOnRails
[03:39:08] quirkycoders: has joined #RubyOnRails
[03:41:15] jhfisc: has joined #RubyOnRails
[03:44:42] rakm: has joined #RubyOnRails
[03:46:23] rakm: hello.. just upgraded to rails 5 and this has_many relationship is throwing an error: `has_many :members, -> { uniq }, through: :groups, source: :users`. The error is "undefined method `extensions' for #<Array:0x007ffbdb6d7ae8>". is there a different way to do this uniq now?
[03:47:31] kies: has joined #RubyOnRails
[03:49:14] jhfisc: has joined #RubyOnRails
[03:55:15] jhfisc: has joined #RubyOnRails
[04:04:57] jhfisc: has joined #RubyOnRails
[04:10:34] jhfisc: has joined #RubyOnRails
[04:21:13] jhfisc: has joined #RubyOnRails
[04:38:56] knight33: has joined #RubyOnRails
[04:44:13] jhfisc: has joined #RubyOnRails
[04:59:23] jhfisc: has joined #RubyOnRails
[05:03:23] ascarter: has joined #RubyOnRails
[05:04:02] umaaji: has joined #RubyOnRails
[05:04:09] brent__: has joined #RubyOnRails
[05:04:19] bronson: has joined #RubyOnRails
[05:07:51] sevenseacat: has joined #RubyOnRails
[05:15:39] jhfisc: has joined #RubyOnRails
[05:36:18] jhfisc: has joined #RubyOnRails
[05:49:43] timdotrb: has joined #RubyOnRails
[05:52:43] Ergo: has joined #RubyOnRails
[05:55:54] quirkycoders: has joined #RubyOnRails
[06:05:15] ascarter: has joined #RubyOnRails
[06:09:35] roshanavand: has joined #RubyOnRails
[06:12:41] lexileo: has joined #RubyOnRails
[06:14:20] krmela: has joined #RubyOnRails
[06:21:28] timdotrb: has joined #RubyOnRails
[06:31:28] quirkycoders: has joined #RubyOnRails
[06:31:51] krmela: has joined #RubyOnRails
[06:39:36] krmela: good day there i have question i am edit some day offers for food for canteen and i dont know which is best way to save array of choices in rails can anybody see on attached gist https://gist.github.com/netmoleCBA/089950c54a4b8e066da8afc54fa5a62e ty
[06:43:33] havenwood_: has joined #RubyOnRails
[06:49:57] conta: has joined #RubyOnRails
[06:54:03] arBmind: has joined #RubyOnRails
[06:56:27] pootiscoder: has joined #RubyOnRails
[07:05:14] bronson: has joined #RubyOnRails
[07:07:48] xall: has joined #RubyOnRails
[07:13:06] havenwood: has joined #RubyOnRails
[07:16:53] DrYockel: has joined #RubyOnRails
[07:25:55] quirkycoders: has joined #RubyOnRails
[07:26:31] timdotrb: Radar: you ‘round?
[07:34:55] Guest63175: has joined #RubyOnRails
[07:35:46] dminuoso: timdotrb: Mr Radar is currently unavailable as he is playing Pokemon Blue on his brand new gameboy color. Would you like some water while you wait?
[07:36:30] timdotrb: dminuoso: I’d prefere a poke-battle instead
[07:39:03] patarr: has joined #RubyOnRails
[07:39:56] rakm: has joined #RubyOnRails
[07:40:41] rakm: has joined #RubyOnRails
[07:41:26] rakm: has joined #RubyOnRails
[07:42:30] rakm: has joined #RubyOnRails
[07:43:06] rakm: has joined #RubyOnRails
[07:43:51] rakm: has joined #RubyOnRails
[07:45:24] ur5us: has joined #RubyOnRails
[07:47:35] DoubleMalt: has joined #RubyOnRails
[07:47:43] srinidhi: has joined #RubyOnRails
[07:55:35] mikecmpbll: has joined #RubyOnRails
[07:58:15] arBmind: has joined #RubyOnRails
[08:00:24] jeromelanteri: has joined #RubyOnRails
[08:06:59] ascarter: has joined #RubyOnRails
[08:11:23] Guest74581: has joined #RubyOnRails
[08:22:28] Radar: timdotrb: I am around for about the next 25 mins
[08:22:38] timdotrb: Radar: sweet
[08:22:57] Radar: Maybe longer if the trains are as shitfucked as they've been all afternoon :D
[08:23:13] timdotrb: Hah, I’ll cross my fingers for you :)
[08:23:50] timdotrb: Was wondering if you could assist with an issue I’m having getting sorting done with elasticsearch. In short, my results are not being sorted by serial_number. https://gist.github.com/willc0de4food/222fe7a924071916a6e5b509dd33bfdb
[08:24:21] timdotrb: Or rather, they’re not being sorted at all
[08:24:49] Radar: sort: [{order: { "order": direction} }]
[08:24:50] Radar: Seems weird.
[08:24:53] Radar: What gem are you using?
[08:24:59] Radar: weird as in: I don't think it requires two order keys
[08:25:04] timdotrb: elasticsearch-rails
[08:25:23] timdotrb: I did just try sort: [{ order: direction}]
[08:25:27] timdotrb: *also, not just
[08:28:43] Radar: iirc the correct param order is: "sort: [ clicks: { order: 'desc' } ]"
[08:29:00] Radar: Did you try that format?
[08:29:07] Radar: where "clicks" is the field name
[08:29:16] timdotrb: Yea, order is a variable holding the field name
[08:29:29] timdotrb: Which makes it slightly confusing
[08:30:12] timdotrb: Although your code has one less hash than mine
[08:30:23] Radar: Oh I think in that case then you might want [{ order => { order: direction} }],
[08:30:42] Radar: because in your code you're using the key "order:" and not the variable
[08:32:06] timdotrb: No change :/
[08:32:11] ferr: has joined #RubyOnRails
[08:33:37] Radar: I don't know then, sorry. I don't have an elasticsearch Ruby codebase to toy around in for this now and I don't think I could come up with one in the time before I get home
[08:33:56] timdotrb: No worries, I appreciate the help
[08:37:51] quirkycoders: has joined #RubyOnRails
[08:39:38] lxsameer: has joined #RubyOnRails
[08:39:39] timdotrb: Radar: next question, is it possible to further search a subset of the original objects returned?
[08:41:50] Radar: Yes I think you can call search a second time on the final result to further scope it
[08:42:22] timdotrb: Interesting.. I will give that a try
[08:42:33] timdotrb: So I’d just append another .search(“another term”) ?
[08:42:36] marr: has joined #RubyOnRails
[08:42:55] Radar: I think so?
[08:44:04] timdotrb: Cool, I’ll give it a try
[09:04:25] havenwood: has joined #RubyOnRails
[09:04:53] brent__: has joined #RubyOnRails
[09:06:11] bronson: has joined #RubyOnRails
[09:07:26] dionysus69: has joined #RubyOnRails
[09:07:52] ascarter: has joined #RubyOnRails
[09:08:41] arBmind: has joined #RubyOnRails
[09:13:49] quirkycoders: has joined #RubyOnRails
[09:15:10] timdotrb: Radar: I must admit, searching with solr feels faster than elasticsearch
[09:15:11] jeromelanteri: http://unitegallery.net/index.php?page=documentation#using_the_api
[09:15:38] workmad3: has joined #RubyOnRails
[09:15:42] jeromelanteri: i tryed many different way... i'm not able to make this working with rails (but works without). no one know and would like to try to help me please ?
[09:19:53] Terens: has joined #RubyOnRails
[09:25:24] Terens: https://gist.github.com/anonymous/ada126a329db71269f63a1d20b0b492f
[09:25:29] Terens: is refactored better?
[09:30:29] sonOfRa: terens: in your refactored version you parse the entire JSON twice.
[09:30:38] sonOfRa: That may not be a good idea if the json isn't just 4 lines
[09:31:03] Terens: I know. I did the first but senior dev said that it breaks single responsibility pattern and refactored it
[09:33:35] sonOfRa: That's silly. Single Responsibility is about classes and modules, not really functions. And the responsibility of that function is to, well, parse the json
[09:33:51] sonOfRa: Parsing the json twice is completely silly
[09:38:53] cseder: has joined #RubyOnRails
[09:39:53] patarr: has joined #RubyOnRails
[09:40:07] jhfisc: has joined #RubyOnRails
[09:42:19] Terens: I know but he is unpredictable.
[09:42:28] Terens: this is just an example.
[09:45:18] tbuehlmann: I agree, that's silly
[09:51:13] Aherin: has joined #RubyOnRails
[09:52:13] jhfisc: has joined #RubyOnRails
[10:03:25] Terens: I have lots of these kind of issues I can't tell what is right
[10:08:59] fox_mulder_cp: hi. folks. i have a AMS with enabled redis cache. One of my model (Customer) have a has_many relation to Order. I want cache this customer.orders.count before serialization too, but now AMS make select count from Orders where customer.id before all json serialization. how i can tune this?
[10:10:35] dminuoso: fox_mulder_cp: Is the cache hit outside AMS?
[10:11:13] dminuoso: fox_mulder_cp: Just for completeness sake, can you just gist the serializer you have?
[10:12:52] dminuoso: And did you counter_cache on the association?
[10:13:02] fox_mulder_cp: dminuoso: in serializer i have def orders; object.orders.count; end
[10:13:13] fox_mulder_cp: dminuoso: hm. how i can add counter_cache ?
[10:14:44] dminuoso: fox_mulder_cp: You just pass `counter_cache: true` to the belongs_to association
[10:14:52] dminuoso: fox_mulder_cp: Beyond that make sure that perform_caching is enabled
[10:15:45] fox_mulder_cp: dminuoso: and i don't set manual some like counter_cache: orders_count?
[10:16:20] dminuoso: fox_mulder_cp: It's manual because you put it on the other side
[10:16:58] dminuoso: fox_mulder_cp: since you do this in your class Order; belongs_to :custmer, counter_cache: true end
[10:17:23] dminuoso: Thats for database caching
[10:17:46] dminuoso: fox_mulder_cp: Mmm. Well you could just use the `cache` directive in your AMS serializer
[10:17:52] frojnd: has joined #RubyOnRails
[10:17:56] frojnd: Hello my friends
[10:18:11] frojnd: I have an interesting problem :)
[10:18:46] fox_mulder_cp: database cache != MS redis auto cache?
[10:19:15] jhfisc: has joined #RubyOnRails
[10:20:05] arup_r: has joined #RubyOnRails
[10:21:11] frojnd: I installed activeadmin gem and devise gem. I've installed devise gem because activeadmin needs devise... but for my users I already have monban gem.... now the problem is because monban is clashing with devise, whenever I'm hitting localhost:3000/admin I get: Redirected to http://localhost:3000/ Filter chain halted as :require_login rendered or redirected I thought monban should run after activeadmin,
[10:21:13] frojnd: devise so I tried with gem 'monban', require: false in Gemfile and in Monban.rb initializer added require 'monban' but of no luck
[10:21:20] frojnd: Any superhere here to help me out?
[10:21:31] frojnd: s/superhere/superhero
[10:22:47] dminuoso: fox_mulder_cp: Mmm yeah.
[10:23:47] arup_r: frojnd: Why not build the admin dashboard by yourself using vanila Rails?
[10:24:18] jhfisc: has joined #RubyOnRails
[10:24:23] frojnd: arup_r: by admin you mean activeadmin?
[10:24:57] frojnd: Client wants activeadmin because on the other project I'm working on there is devise for authentication by default + activeadmin, but here we have monban for authentication
[10:25:54] arup_r: activeadmin helps to roll a admin dashboard faster and later it will slow you down and eventually u will think why did I add this shi*
[10:26:12] fox_mulder_cp: dminuoso: i want orders.count in serializer, not all tons of order serializing
[10:26:25] cseder: has joined #RubyOnRails
[10:26:33] arup_r: I could make it by myself and maintain it more easily. it is good that you just see what could go wrong with it..
[10:26:43] arup_r: it is forcing you to go its way..
[10:27:42] frojnd: arup_r: currently I'm stuck with activeadmin :( searching for solutions how to make it work with devise + monban
[10:28:42] arup_r: good luck! :) I know companies had to put more hours to remove this gem from a production site and that was horrible.
[10:28:51] arup_r: none of the admin gems are good
[10:29:18] frojnd: arup_r: Yeah I am not making those decisions...
[10:29:18] arup_r: U can tell your client and convince so that i can build it by yourself.. which is pretty easy
[10:29:39] frojnd: The problem is that she wants it because she "knows" how to use it
[10:29:42] tbuehlmann: arup_r: you are just describing the bad case. admin interfaces can also just work
[10:29:43] arup_r: clients should listen to their developers :)
[10:29:48] frojnd: arup_r: haha
[10:30:10] arup_r: tbuehlmann: it doesn't work always ... it is bad ..
[10:30:10] frojnd: But on the other side, can I force monban to load after devise?
[10:30:34] tbuehlmann: telling people none of the admin gems are good is pretty disrespectful
[10:30:58] tbuehlmann: wow, that's an attitude. so when rails doesn't work for you always, you tell people it's bad?
[10:31:06] jhfisc: has joined #RubyOnRails
[10:31:06] arup_r: tbuehlmann: from experiences. .. I don't know how I am hitting respects.. it is good to share experiences
[10:32:11] arup_r: tbuehlmann: You are comparing 2 wrong things.. http://rubyjunky.com/get-rid-of-your-admin-gem.html
[10:32:31] arup_r: Rails and ActiveAdmin are not different things, technically yes they both are gems.
[10:32:52] tbuehlmann: I'm working on your argument. just because something doesn't always work, it doesn't mean it's bad
[10:33:13] frojnd: Please guys I did not meant to start flame war here... I need a help to make activeadmin work with devise and monban
[10:33:35] arup_r: frojnd: no all good :) it wouldn't burn anything.
[10:34:16] frojnd: I asked if it's possible - somehow - to load monban devise 'after' devise gem?
[10:34:56] arup_r: tbuehlmann: Don't u ask or check reviews before u buy something to use genrally? Or u buy and test by yourself and burn your money.. :) General approach.
[10:35:09] arup_r: anyway.. I will step back now.
[10:41:10] Jameser: has joined #RubyOnRails
[10:42:34] frojnd: Can someone tell me how loading gems actually work? Is there a way to tell rails to run spesific gem after someone or make them dependant or something similar to systemd services in Linux?
[10:43:13] gregf_: has joined #RubyOnRails
[10:43:21] jhfisc: has joined #RubyOnRails
[10:45:32] pootiscoder: has joined #RubyOnRails
[10:46:59] arup_r: has joined #RubyOnRails
[10:49:39] Aherin_: has joined #RubyOnRails
[10:52:39] tbuehlmann: frojnd: you put the gems you need in your Gemfile and run `$ bundle install`
[10:53:05] frojnd: tbuehlmann: yes
[10:53:14] jhfisc: has joined #RubyOnRails
[10:59:14] jhfisc: has joined #RubyOnRails
[11:07:49] bronson: has joined #RubyOnRails
[11:07:52] jhfisc: has joined #RubyOnRails
[11:13:17] jhfisc: has joined #RubyOnRails
[11:19:17] jhfisc: has joined #RubyOnRails
[11:20:31] brent__: has joined #RubyOnRails
[11:22:55] patarr: has joined #RubyOnRails
[11:23:39] mrbubbles: has joined #RubyOnRails
[11:25:27] jhfisc: has joined #RubyOnRails
[11:32:54] charlielor: has joined #RubyOnRails
[11:35:07] jhfisc: has joined #RubyOnRails
[11:39:20] srinidhi: has joined #RubyOnRails
[11:40:14] jhfisc: has joined #RubyOnRails
[11:42:24] Jameser: has joined #RubyOnRails
[11:44:08] jhfisc: has joined #RubyOnRails
[11:49:14] jhfisc: has joined #RubyOnRails
[11:52:05] jhfisc: has joined #RubyOnRails
[11:55:08] wethu: has joined #RubyOnRails
[11:55:15] jhfisc: has joined #RubyOnRails
[11:57:19] krmela: has joined #RubyOnRails
[11:59:02] dblessing: has joined #RubyOnRails
[12:01:15] jhfisc: has joined #RubyOnRails
[12:04:56] Jameser: has joined #RubyOnRails
[12:05:19] krmela: good day , i am tryed add to generated resource controller WeekDay ransack search form with kaminari with remote true and it stopped works and i am dont see any entered records just search form sources is on Gist https://gist.github.com/netmoleCBA/dead5201c2f2534a8483c78dd4fadaed can anybody correct me i am looking for two hours for any my mistake
[12:06:01] himynameisvic: has joined #RubyOnRails
[12:08:55] jhfisc: has joined #RubyOnRails
[12:09:51] ascarter: has joined #RubyOnRails
[12:17:18] jhfisc: has joined #RubyOnRails
[12:22:42] jhfisc: has joined #RubyOnRails
[12:31:07] jhfisc: has joined #RubyOnRails
[12:35:51] truenito: has joined #RubyOnRails
[12:37:49] sevenseacat: has joined #RubyOnRails
[12:40:23] cgfbee: has joined #RubyOnRails
[12:49:43] jhfisc: has joined #RubyOnRails
[12:51:32] charlielor: has joined #RubyOnRails
[12:53:40] Jameser: has joined #RubyOnRails
[12:55:41] jhfisc: has joined #RubyOnRails
[12:58:21] jhfisc: has joined #RubyOnRails
[13:01:36] apparition: has joined #RubyOnRails
[13:02:31] Jameser: has joined #RubyOnRails
[13:03:33] cagmz: has joined #RubyOnRails
[13:07:42] dblessing: has joined #RubyOnRails
[13:08:32] bronson: has joined #RubyOnRails
[13:10:10] charlielor: has joined #RubyOnRails
[13:11:10] jhfisc: has joined #RubyOnRails
[13:17:05] jhfisc: has joined #RubyOnRails
[13:22:14] jhfisc: has joined #RubyOnRails
[13:22:56] charlielor: I’m issue with data not showoing in my view. Here’s my code: https://gist.github.com/chucklor/f8a7cf710a076457ee56ce1d5ff017e6
[13:23:05] charlielor: any help is much appreciated
[13:24:12] lexileo: has joined #RubyOnRails
[13:24:55] knight33: has joined #RubyOnRails
[13:26:18] charlielor: has joined #RubyOnRails
[13:28:35] roshanavand: has joined #RubyOnRails
[13:29:31] arup_r: has joined #RubyOnRails
[13:33:54] jhfisc: has joined #RubyOnRails
[13:36:54] ar1a: has joined #RubyOnRails
[13:37:26] rkellermeyer: has joined #RubyOnRails
[13:41:44] akshat: has joined #RubyOnRails
[13:43:15] Jameser: has joined #RubyOnRails
[13:44:49] jhfisc: has joined #RubyOnRails
[13:45:05] jphase: has joined #RubyOnRails
[13:47:31] charlielor: has joined #RubyOnRails
[13:51:14] jhfisc: has joined #RubyOnRails
[13:53:53] DoubleMalt: has joined #RubyOnRails
[13:56:34] jhfisc: has joined #RubyOnRails
[13:59:11] cam27: has joined #RubyOnRails
[14:02:03] cpruitt: has joined #RubyOnRails
[14:04:41] dionysus70: has joined #RubyOnRails
[14:13:56] charlielor: has joined #RubyOnRails
[14:18:47] truenito: has joined #RubyOnRails
[14:25:29] jhfisc: has joined #RubyOnRails
[14:25:54] ar1a: has left #RubyOnRails: ("WeeChat 1.9")
[14:26:55] jschoolcraft: has joined #RubyOnRails
[14:32:38] jhfisc: has joined #RubyOnRails
[14:38:52] charlielor: has joined #RubyOnRails
[14:41:46] npgm: has joined #RubyOnRails
[14:42:41] mikecmpb_: has joined #RubyOnRails
[14:50:44] Papierkorb: has joined #RubyOnRails
[14:51:39] jhfisc: has joined #RubyOnRails
[14:56:27] cpruitt: Curiousity question. When generating a new rails app, spring is put in the :development group in the gemfile. Anyone know if there is there a reason spring works when running tests when not included in :test (or :development, :test)? Is this because spring is started from the dev environment and then forks for :test or something?
[14:57:14] jhfisc: has joined #RubyOnRails
[15:00:33] m4sk1n: has joined #RubyOnRails
[15:00:49] jhfisc: has joined #RubyOnRails
[15:01:28] m4sk1n: hello, is there any channel for Ruby-related questions dedicated to newbies? :D
[15:09:23] bronson: has joined #RubyOnRails
[15:17:57] cagomez: has joined #RubyOnRails
[15:19:19] conta: has joined #RubyOnRails
[15:20:57] mikecmpbll: has joined #RubyOnRails
[15:23:06] jhfisc: has joined #RubyOnRails
[15:23:06] tanuki: has joined #RubyOnRails
[15:25:53] knight33: has joined #RubyOnRails
[15:29:14] jhfisc: has joined #RubyOnRails
[15:31:24] baweaver: m4sk1n: You can ask in #ruby.
[15:32:00] patarr: has joined #RubyOnRails
[15:33:11] m4sk1n: has left #RubyOnRails: ()
[15:34:09] jhfisc: has joined #RubyOnRails
[15:35:34] rakm: has joined #RubyOnRails
[15:39:01] kt: has joined #RubyOnRails
[15:39:47] brent__: has joined #RubyOnRails
[15:40:21] pLaTo0n: has joined #RubyOnRails
[15:41:01] Abhijit: has joined #RubyOnRails
[15:43:23] Jameser: has joined #RubyOnRails
[15:45:00] charlielor: has joined #RubyOnRails
[15:46:17] patarr1: has joined #RubyOnRails
[15:51:31] truenito: has joined #RubyOnRails
[15:53:49] choke: has joined #RubyOnRails
[15:55:33] sloggerkhan: has joined #RubyOnRails
[15:57:56] jhfisc: has joined #RubyOnRails
[16:00:53] jhfisc: has joined #RubyOnRails
[16:03:39] Jameser: has joined #RubyOnRails
[16:06:09] jhfisc: has joined #RubyOnRails
[16:07:08] charlielor: has joined #RubyOnRails
[16:12:04] jhfisc: has joined #RubyOnRails
[16:13:29] ascarter: has joined #RubyOnRails
[16:16:57] choke: has joined #RubyOnRails
[16:23:47] truenito: has joined #RubyOnRails
[16:27:02] cagomez: I'm using Rails.cache.fetch to cache a query but perf_check says it's running 140 queries vs 87 (without caching). why would this happen?
[16:27:55] fryguy: cagomez: show some code
[16:28:46] patarr: has joined #RubyOnRails
[16:29:41] gusrub: has joined #RubyOnRails
[16:34:15] googleplex: has joined #RubyOnRails
[16:34:58] mtkd: has joined #RubyOnRails
[16:51:07] rakm: has joined #RubyOnRails
[16:55:55] truenito: has joined #RubyOnRails
[17:01:30] jhfisc: has joined #RubyOnRails
[17:07:00] timdotrb_: has joined #RubyOnRails
[17:10:44] bronson: has joined #RubyOnRails
[17:17:42] jhfisc: has joined #RubyOnRails
[17:18:06] charlielor: has joined #RubyOnRails
[17:18:11] stormbytes: has joined #RubyOnRails
[17:18:29] ruby-noob: has joined #RubyOnRails
[17:18:38] stormbytes: Am I correct that this won't work: Subject.find(2).page.subject_id = 3
[17:20:30] havenwood: stormbytes: What are you trying and what seems to be the problem?
[17:20:31] havenwood: stormbytes: Are you going to save the change?
[17:20:45] havenwood: stormbytes: Is there a Subject with the id of 2?
[17:20:51] stormbytes: I'm playing around in the rails c, following a tutorial
[17:20:59] stormbytes: yep, there's a subject(2)
[17:21:15] stormbytes: subj:page = 1:1
[17:22:29] havenwood: stormbytes: And are you just checking this change is valid? Are you trying to save it? What makes you think it won't work?
[17:23:30] stormbytes: well, i tried it in the console and it didn't update the record so.. I'm guessing that there's no implicit 'update'
[17:23:58] havenwood: stormbytes: You'll just need to save your changes.
[17:24:29] havenwood: stormbytes_page = Subject.find(2).page; stormbytes_page.subject_id = 3; stormbytes_page.save!
[17:24:35] stormbytes: yes, I understand that.. i was wondering if that could be chained in this way
[17:24:54] havenwood: stormbytes: You could use #tap
[17:25:01] stormbytes: right, i'm aware. I'm just playing around with it
[17:25:19] havenwood: stormbytes: I guess I don't quite get what you're asking. Happy coding though!
[17:25:33] stormbytes: last time I used a framework was codeigniter some 7 years back.. seems it really borrowed a lot from rails
[17:25:41] stormbytes: havenwood thanks :)
[17:26:07] havenwood: yeah, a myriad of frameworks followed in rails' steps
[17:26:36] havenwood: sinatra has more than its fair share of clones too ;-)
[17:27:01] stormbytes: yea but Sinatra is pretty straight forward... afaic tell
[17:27:21] stormbytes: rails.. now there's a business concept well developed
[17:28:12] gusrub: has joined #RubyOnRails
[17:28:35] truenito: has joined #RubyOnRails
[17:31:05] ruby-noob: Hi! I'm new to Ruby and code on a Windows environment. Just wanted to ask how far I could get in Ruby/Rails using the new Ubuntu Bash shell on Windows?
[17:31:21] havenwood: ruby_noob: You can get really far! It works well.
[17:31:51] havenwood: ruby_noob: I've setup a few people with it and was impressed that it *just works*.
[17:32:17] ruby-noob: Oh sweet! So, even things like launching servers etc. work well? (I've read that those are generally a problem with these shells)
[17:32:22] kies: has joined #RubyOnRails
[17:32:27] centrx: has joined #RubyOnRails
[17:32:28] havenwood: ruby_noob: I've done a few chruby/ruby-install setups on WSL and they're great.
[17:32:34] mikecmpbll: has joined #RubyOnRails
[17:32:52] havenwood: ruby_noob: A guide like this should get you setup with a nice dev env: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you
[17:33:28] ruby-noob: Awesome! Thanks :)
[17:33:36] havenwood: ruby_noob: No prob. Happy coding!
[17:37:31] ruby-noob: Oh, one more thing, would other stuff like curl also work on the bash shell? (I've had trouble with those on Windows command prompt)
[17:38:03] duderonomy: has joined #RubyOnRails
[17:39:20] havenwood: ruby_noob: Yes, it comes with curl out of the box.
[17:39:36] DoubleMalt: has joined #RubyOnRails
[17:39:51] Aherin_: i heard Canonical is putting Ubuntu in the windows store these days? :)
[17:39:56] ruby-noob: Phew! Thanks again havenwood :)
[17:40:38] ruby-noob: Yes, I think that's where the bash shell comes from, Aherin_
[17:40:58] ruby-noob: When installing it through command prompt, it does say that it downloads it from the Windows Store
[17:41:40] mostlybadfly: has joined #RubyOnRails
[17:42:13] knight33: has joined #RubyOnRails
[17:43:11] cagomez: has joined #RubyOnRails
[17:44:55] charlielor: has joined #RubyOnRails
[17:48:37] ruby-noob: has left #RubyOnRails: ()
[17:53:19] rakm: has joined #RubyOnRails
[17:58:12] pwnd_nsfw: https://gist.github.com/SirUncleCid/aadf8c076c8da55c68a833235113042a
[17:58:15] pwnd_nsfw: I'm so misguided :(
[17:58:53] pwnd_nsfw: I want ShortLinkGenerator to take in any ActiveRecord::Base class, so that I may be able to call methods on it (like seeing if a short link already exists)
[17:59:16] pwnd_nsfw: Anytime I get a couple lines into an implementation
[17:59:23] pwnd_nsfw: I shit myself and don't know what to do
[17:59:41] pwnd_nsfw: I'm trying to learn how to test it, overall
[18:05:32] cagomez: has joined #RubyOnRails
[18:09:38] cagomez: has joined #RubyOnRails
[18:14:41] jhfisc: has joined #RubyOnRails
[18:15:09] googleplex: anyone seen dviola?
[18:16:23] VeryBewitching: has joined #RubyOnRails
[18:23:15] jhfisc: has joined #RubyOnRails
[18:24:03] cagomez: has joined #RubyOnRails
[18:25:24] cagomez: has joined #RubyOnRails
[18:34:46] netzfisch: has joined #RubyOnRails
[18:35:11] jottr: has joined #RubyOnRails
[18:35:23] jhfisc: has joined #RubyOnRails
[18:35:51] dviola: has joined #RubyOnRails
[18:36:50] KaaK: has left #RubyOnRails: ()
[18:37:44] watersoul: has joined #RubyOnRails
[18:39:46] lxsameer: has joined #RubyOnRails
[18:40:17] truenito: has joined #RubyOnRails
[18:41:22] quirkycoders: has joined #RubyOnRails
[18:42:57] twilling: has joined #RubyOnRails
[18:53:18] googleplex: so i know this is going to be a total longshot in here but.. is anyone in here fluent enough in ruby on rails to assist me on a project, my coder dropped off the face of the earth. i need a almost omplete website made, then more stuff down the line so there will be good work.
[18:55:05] mtkd: has joined #RubyOnRails
[18:55:36] gambl0re: has joined #RubyOnRails
[18:57:26] Jason: googleplex: you're still looking? :/
[18:59:12] centrx: googleplex: What's the site? Are you with a company?
[18:59:45] jordanm: has joined #RubyOnRails
[19:01:03] cagomez: has joined #RubyOnRails
[19:01:37] stormbytes: Page = ActiveRecord model, how is it that you can pass JSON-style arguments to Page.create(name: foo, age: ;23', location: 'nyc') ?
[19:01:51] Chernobuk: has joined #RubyOnRails
[19:01:51] jordanm: I am using rails + searchkick with `searchkick callbacks: :async` defined in the model. I am trying to to figure out a way to to make searchkick update synchronous only inside of a rake task. does anyone know how?
[19:02:08] stormbytes: is it converting it to a JSON object? I'm no ruby expert but afaik that's not a hash
[19:02:21] jordanm: I tried wrapping the relevant code in a `Searchkick.callbacks(:bulk) do ...end` block, but it still tried to queue up async
[19:05:56] googleplex: yeah i need to keep it simple
[19:06:06] googleplex: a complete auction website made
[19:06:42] dionysus69: has joined #RubyOnRails
[19:06:50] googleplex: once i have a prototype, NDA, non-competes will be signed and other things will be introduces
[19:07:10] daed: has joined #RubyOnRails
[19:07:32] googleplex: centrx we are creating a corp for this
[19:07:42] Jason: stormbytes: iirc that is a hash, yes
[19:07:54] Jason: stormbytes: i remember reading about this, give me a minute, i'll try to find a link for you
[19:08:06] centrx: stormbytes: That's the format for Ruby keyword arguments, it's a Ruby method with Ruby arguments
[19:08:14] googleplex: jason i am i dont like usi ng freelance sites far too impersonal
[19:08:26] stormbytes: interesting...
[19:08:39] Jason: googleplex: i'm not trying to turn you off from asking in here -- it just looks like you're not finding success, so i'm making recommendations :)
[19:09:12] defsdoor: has joined #RubyOnRails
[19:09:13] stormbytes: googleplex sounds like a lot of headache :)
[19:09:26] lxsameer: has joined #RubyOnRails
[19:09:45] Jason: centrx: i remember reading about a change relating to x(blah: true) etc where it's essentially the same as x(:blah=>true)
[19:09:55] stormbytes: Jason, thanks.. found it here https://docs.ruby-lang.org/en/2.0.0/Hash.html
[19:10:16] Jason: stormbytes: you had me interested too, i was looking for that :)
[19:10:17] stormbytes: yeah I didn't realize you could do that..
[19:10:19] masscrx: has joined #RubyOnRails
[19:11:39] bronson: has joined #RubyOnRails
[19:13:38] masscrx: I have some question regarding activemodel serializer, I want to get from API user with related department in json format like a { user: { user_departments: [ {id: 1, name: 'department 1', department_id:3} ] } }, user has_many departments through user_departments
[19:14:29] stormbytes: Jason apparently ruby implicitly converts h = { a: 'foo', b: 'bar' } keys into symbols, so.. to access it would be h[:a], h[:b]
[19:14:33] stormbytes: interesting..
[19:14:39] masscrx: I need a department's id from user_departments table for user's nested attributes
[19:14:40] stormbytes: string keys aren't converted
[19:16:03] srinidhi: has joined #RubyOnRails
[19:17:03] masscrx: with jbuilder I would do that by:
[19:17:05] masscrx: json.user_departments_attributes @user.user_departments do |user_department| json.id user_department.id json.name user_department.department.name
[19:17:09] centrx: Jason: stormbytes: Right the Hash symbol syntax came in Ruby 1.9, and the keyword argument syntax came in 2.0
[19:17:27] stormbytes: centrx which is which
[19:17:30] centrx: Jason: stormbytes: The keyword argument syntax is technically a different implementation, e.g. it handles things like default values
[19:18:24] Jason: centrx: unsure of what you mean by default values?
[19:18:27] centrx: stormbytes: Both use "key: value", but { key: value } defines a Hash, while my_method(key: value) is the keyword arguments
[19:18:58] centrx: Jason: You can define a method: my_method(my_param: default_value), if that parameter is not passed into the method when calling it, the default is used
[19:20:46] stormbytes: centrx great tip, thanks
[19:20:51] Jason: centrx: i'm still not following. so `def sayHi(name: "friend") puts "Hello, #{name}" end`
[19:21:03] Jason: sayHi("Jason") # ArgumentError: wrong number of arguments (given 1, expected 0)
[19:21:50] cagomez: has joined #RubyOnRails
[19:22:54] stormbytes: Jason looks like it expects a hash as an arg
[19:22:55] stormbytes: try sayHello(name: 'foo')
[19:23:08] stormbytes: or wtv you named it
[19:23:33] Jason: stormbytes: you are right
[19:23:48] stormbytes: i guess that's an implicit default
[19:24:01] Jason: though i honestly don't see the difference between that and, say, `def sayHi(name="jason")`
[19:24:25] stormbytes: with php (which I haven't done in ages) you have explicit defaults... function foo($arg = "blah") { echo $arg } => either 'blah' or whtv was passed
[19:24:35] stormbytes: i'm sure there's an analog for that in ruby
[19:24:49] Jason: stormbytes: that sounds just like what i said - def sayHi(name="xyz"), yeah
[19:25:10] stormbytes: is that the syntax? I'm just 4 days in lol
[19:25:11] Jason: just saying that i don't see much of a difference between that and `def sayHi(name: 'abc')`
[19:25:12] centrx: Jason: The name= doesn't do anything in that
[19:25:26] stormbytes: and i've ben back and forth with ruby over quite some time.... ended up here for Rails this time around
[19:25:43] Jason: centrx: it seems like it does for me...
[19:26:13] Jason: centrx: `def sayHi(name="jason")` ... `sayHi()` # Hello, jason
[19:26:30] stormbytes: Jason same here, works as you say
[19:26:40] stormbytes: buack to rails
[19:27:03] Jason: i'm curious now, though. i'm a python guy, relatively new to rails
[19:27:07] Jason: ruby and rails*, even
[19:27:23] centrx: Jason: the two differences from kw args with that would be: when calling the method, you don't specify the argument name
[19:27:42] centrx: Jason: and you can't specify a required argument
[19:27:47] jhfisc: has joined #RubyOnRails
[19:27:58] centrx: Jason: You can do: def say_hi(name:); puts name; end to require the kw arg
[19:28:22] stormbytes: omg python... shoot me in the face lol
[19:28:46] stormbytes: node/js here
[19:29:00] stormbytes: but rails rocks superbly
[19:31:09] truenito: has joined #RubyOnRails
[19:31:55] mlangenberg: has joined #RubyOnRails
[19:32:30] Jason: centrx: i'm really sorry if i'm coming across as difficult, but i still don't think i understand
[19:32:55] Jason: centrx: so `def say_hi(name:)` ... `say_hi(name:"Jason")`
[19:33:08] Jason: how does that differ from `def say_hi(name)` ?
[19:33:27] Jason: oh, wait, after re-reading what you wrote I think I understand now
[19:33:47] jhfisc: has joined #RubyOnRails
[19:34:08] Jason: centrx: so basically the difference from the kw arg is I HAVE to have x(name: "Jason") vs just x("Jason")
[19:34:10] Jason: and there's no default arg
[19:35:14] workmad3: has joined #RubyOnRails
[19:38:25] drusepth: has joined #RubyOnRails
[19:38:45] jhfisc: has joined #RubyOnRails
[19:40:46] centrx: Jason: It's clearer when calling a method, if the arguments have names
[19:41:01] centrx: Jason: Often that's done with an options hash (see e.g. the Rails code base)
[19:41:27] drusepth: I'm trying to stream a file from S3 to my user. Using send_data(open(url)) still downloads and loads the file into memory before beginning the download. Is there a way I can call send_data (or similar) multiple times as I read a stream, instead of waiting until it's fully read? Something like https://gist.github.com/drusepth/f30724c7795b63738f3dc453f97fcc44
[19:42:22] cagomez: has joined #RubyOnRails
[19:42:32] DoubleMalt: has joined #RubyOnRails
[19:43:54] drusepth: (my goal is to stream files through my app to a user instead of serving them directly from s3, without timing out on downloading larger files before I open the download stream to a user)
[19:45:16] jhfisc: has joined #RubyOnRails
[19:47:57] Aherin: has joined #RubyOnRails
[19:49:34] Jason: centrx: i will read up about it, thanks!
[19:50:18] Jason: centrx: oh! i get it now. https://stackoverflow.com/questions/18407618/what-are-options-hashes
[19:50:22] jhfisc: has joined #RubyOnRails
[19:50:24] Jason: i understand what you mean now
[19:51:17] centrx: yeah keyword arguments work so much like hashes, but they are technically different
[19:51:58] Jason: so it's mainly useful for methods within classes
[19:52:04] Jason: that makes more sense
[19:53:30] gusrub: has joined #RubyOnRails
[19:53:51] cseder: has joined #RubyOnRails
[19:57:12] akshat: has joined #RubyOnRails
[19:57:58] cagomez: has joined #RubyOnRails
[20:01:11] quirkycoders: has joined #RubyOnRails
[20:02:29] jhfisc: has joined #RubyOnRails
[20:05:13] gusrub: has joined #RubyOnRails
[20:12:24] cagomez: has joined #RubyOnRails
[20:17:15] jhfisc: has joined #RubyOnRails
[20:24:21] havenwood_: has joined #RubyOnRails
[20:25:57] choke: has joined #RubyOnRails
[20:27:37] mostlybadfly: has joined #RubyOnRails
[20:31:02] jhfisc: has joined #RubyOnRails
[20:33:35] twilling: has joined #RubyOnRails
[20:37:25] truenito: has joined #RubyOnRails
[20:39:36] googleplex: has joined #RubyOnRails
[20:39:45] weaksauce: has joined #RubyOnRails
[20:41:04] jhfisc: has joined #RubyOnRails
[20:47:14] jhfisc: has joined #RubyOnRails
[20:48:21] aperkins81: has joined #RubyOnRails
[20:48:49] rakm: has joined #RubyOnRails
[20:52:14] jhfisc: has joined #RubyOnRails
[20:53:26] workmad3: has joined #RubyOnRails
[20:54:34] havenwood_: has joined #RubyOnRails
[20:56:28] graft: has joined #RubyOnRails
[20:57:42] graft: hi all, so i make an http request in my controller, right, and now i have a Net::HTTP::Response object back, and i want to stream the contents (i.e., response.body) directly to the client without having to read them into memory - what do i do?
[20:58:43] graft: presumably something like render json: response.body, but i fear that would first read the response and then send it
[20:59:05] fryguy: well the response is already in memory at that point
[20:59:58] graft: it doesn't read from the stream until you call response.body
[21:04:34] ur5us: has joined #RubyOnRails
[21:12:34] bronson: has joined #RubyOnRails
[21:24:19] cam27: Starting to seem like React JS is preffered over Angular and Backbone’s MVC style pattern
[21:24:42] cam27: Starting to in terms of I’m finding this out
[21:24:47] Guest48177: has joined #RubyOnRails
[21:24:53] arBmind: has joined #RubyOnRails
[21:28:33] DoubleMalt: has joined #RubyOnRails
[21:34:17] cagomez: has joined #RubyOnRails
[21:37:12] cpruitt: has joined #RubyOnRails
[21:43:42] cagomez: has joined #RubyOnRails
[21:55:50] gusrub: has joined #RubyOnRails
[22:14:02] optimus55: has joined #RubyOnRails
[22:15:26] optimus55: Hey, how is everyone sending transactional email these days? We use Mandrill/Mailchimp for ours but the email template editor & export to mandrill leaves a LOT to be desired. Is it common to just store the email html in the rails app instead?
[22:18:47] cagomez: has joined #RubyOnRails
[22:22:02] cagomez: has joined #RubyOnRails
[22:26:51] urkle: has joined #RubyOnRails
[22:28:35] wethu: has joined #RubyOnRails
[22:31:29] hahuang65: optimus55: yeah, as view templates
[22:37:43] hahuang65: anyone here work with an elasticsearch index that they need to refresh a lot?
[22:39:46] patarr: has joined #RubyOnRails
[22:44:58] duderono_: has joined #RubyOnRails
[22:51:14] jhfisc: has joined #RubyOnRails
[22:53:57] jhfisc: has joined #RubyOnRails
[23:00:35] SunWuKung: has joined #RubyOnRails
[23:07:16] aperkins81: hahuang64, although we dont use elasticsearch, we have a clockwork job that regularly refreshes materialized views (rails scenic gem) for time-consuming queries.. works a treat
[23:09:11] jhfisc: has joined #RubyOnRails
[23:10:06] dblessing: has joined #RubyOnRails
[23:12:58] br0d1n: has joined #RubyOnRails
[23:14:29] rubycoder37: I have a bunch of dates as an array in my Store model that I would like to display in my view, but I'm having trouble slicing/dividing them by the amount of Stores I have, the dates don't know anything about the stores (hence my problem to separate them), any ideas how I can solve this please? https://gist.github.com/anonymous/20cac8f443605050b820ad9829b225d4
[23:14:30] bronson: has joined #RubyOnRails
[23:17:32] hahuang65: aperkins81: thanks for that tip, but i'm trying to solve a different problem. we mainly have a staging server that needs to be kept up to date with our prod database, which means everytime we sync the pg db, we need to then reindex everything from there into ES.
[23:17:35] hahuang65: it's quite the pig of a problem
[23:20:05] aperkins81: hahuang65, ah sorry cant help there, beyond me.. https://wiki.postgresql.org/wiki/Reindex_concurrently
[23:21:18] jhfisc: has joined #RubyOnRails
[23:23:37] rubycoder37: any ideas about my problem?
[23:28:30] cagomez: has joined #RubyOnRails
[23:31:04] aperkins81: rubycoder37, user.target.start_date -> what is target?
[23:31:47] lexileo: has joined #RubyOnRails
[23:33:39] randomA: has joined #RubyOnRails
[23:33:58] randomA: what do you use on top of rails that looks nice. i was thinking of google's materialize
[23:34:04] randomA: but are there other options that you guys recommend
[23:34:47] mattwithoos: has joined #RubyOnRails
[23:35:02] googleplex: i usually put a bag over her head and hit the lights, ruby usually doesnt have a problem with it either
[23:35:42] mokiwis: has joined #RubyOnRails
[23:37:00] cagomez: has joined #RubyOnRails
[23:37:27] rubycoder37: aperkins81: target is something like an objective for the store's owner, so it has a value that is going to be distributed among the stores and also a date range, ideally, I would have preferred to have these as part of my Store model association, but I can't have that, here are my other models: https://gist.github.com/anonymous/551865a1c2b5ea473b084844b3c79765
[23:38:00] rubycoder37: aperkins81: so my problem is how to access these dates from the store model and divide/distribute them to each store
[23:38:17] aperkins81: maybe not the best approach to this but id a query in pgAdmin (or whatever SQL tool you have) starting with selecting your widest model users.. then left joining stores.. then left joining targets.. then grouping by users then selecting what you want with array_agg etc
[23:38:30] aperkins81: s/but id/but id build/
[23:38:53] randomA: hey can anyone answer my question
[23:39:03] randomA: what is an easy web framework kind of thing to put on top of ruby
[23:39:32] duderonomy: has joined #RubyOnRails
[23:39:51] nopolitica: has joined #RubyOnRails
[23:42:07] rubycoder37: aperkins81: yes, that's the issue, I'm having trouble getting th stores with the target dates, I'll give that a try, thanks
[23:42:16] xco: has joined #RubyOnRails
[23:42:18] optimus55: has joined #RubyOnRails
[23:42:50] xco: using Rails 5. trying to find the difference between how sessions and cookies work. if i try “cookies[:redirect_back_to] = request.original_url”
[23:42:58] xco: a cookie is set that i can see in my browser
[23:43:07] optimus55: has joined #RubyOnRails
[23:43:09] xco: if i use “session[:redirect_back_to] = request.original_url” nothing is set
[23:43:15] xco: any idea what’s going on?
[23:44:11] cagomez: has joined #RubyOnRails
[23:49:49] hahuang65: randomA: I don't understand the question. How about Rails?
[23:49:59] randomA: how can i build easy website on rails
[23:50:44] hahuang65: randomA: you didn't specify you wanted to build an easy website, nor did you define "easy" in your terms.
[23:50:50] aperkins81: randomA, bootstrap themes?
[23:50:53] hahuang65: randomA: IMO using Rails to build a site is easy enough
[23:51:17] jhfisc: has joined #RubyOnRails
[23:51:34] randomA: I got an Internal Server Error
[23:51:46] aperkins81: randomA, https://themes.getbootstrap.com/
[23:52:05] randomA: my DocumentRoot is already /var/www/html/mywebsite.com/public_html/myrubyapp/public
[23:52:08] aperkins81: not sure if there are free ones
[23:52:12] randomA: i still got internal server error