« Back to channel list

#RubyOnRails - 04 October 2017

« Back 1 day Forward 1 day »
[00:00:11] ahrs: has joined #RubyOnRails
[00:00:53] jhfisc: has joined #RubyOnRails
[00:02:00] fragamus: has joined #RubyOnRails
[00:09:53] bruno-: has joined #RubyOnRails
[00:12:48] jhfisc: has joined #RubyOnRails
[00:14:33] soahccc: has joined #RubyOnRails
[00:18:50] jhfisc: has joined #RubyOnRails
[00:25:18] jhfisc: has joined #RubyOnRails
[00:31:13] jphase: has joined #RubyOnRails
[00:34:50] jhfisc: has joined #RubyOnRails
[00:47:21] harrycs: has joined #RubyOnRails
[00:49:54] jhfisc: has joined #RubyOnRails
[00:56:08] jhfisc: has joined #RubyOnRails
[01:00:32] conta: has joined #RubyOnRails
[01:01:21] irishfromua: has joined #RubyOnRails
[01:04:48] jhfisc: has joined #RubyOnRails
[01:10:34] jhfisc: has joined #RubyOnRails
[01:11:18] tcopeland: has joined #RubyOnRails
[01:14:58] bronson: has joined #RubyOnRails
[01:38:07] jhfisc: has joined #RubyOnRails
[01:39:05] cagomez: has joined #RubyOnRails
[01:42:58] jhfisc: has joined #RubyOnRails
[01:43:33] gamblor3: has joined #RubyOnRails
[01:44:27] theunraveler: has joined #RubyOnRails
[01:46:04] tcopeland: has joined #RubyOnRails
[01:50:52] jhfisc: has joined #RubyOnRails
[01:57:05] jhfisc: has joined #RubyOnRails
[02:00:00] jhfisc: has joined #RubyOnRails
[02:06:05] jhfisc: has joined #RubyOnRails
[02:06:48] orbyt_: has joined #RubyOnRails
[02:11:07] jhfisc: has joined #RubyOnRails
[02:20:02] jhfisc: has joined #RubyOnRails
[02:24:16] DTZUZO: has joined #RubyOnRails
[02:29:15] Ropeney: has joined #RubyOnRails
[02:33:13] jphase: has joined #RubyOnRails
[02:46:46] egray: has joined #RubyOnRails
[02:48:07] jhfisc: has joined #RubyOnRails
[02:54:08] jhfisc: has joined #RubyOnRails
[02:55:38] LambdaSource: has joined #RubyOnRails
[03:00:08] jhfisc: has joined #RubyOnRails
[03:03:09] DTZUZO: has joined #RubyOnRails
[03:07:55] jhfisc: has joined #RubyOnRails
[03:07:58] LambdaSource: has joined #RubyOnRails
[03:15:58] bronson: has joined #RubyOnRails
[03:20:06] jhfisc: has joined #RubyOnRails
[03:25:51] irishfromua: has joined #RubyOnRails
[03:27:38] irishfromua: has joined #RubyOnRails
[03:30:08] jhfisc: has joined #RubyOnRails
[03:30:31] fragamus: has joined #RubyOnRails
[03:34:27] hahuang65: has joined #RubyOnRails
[03:35:30] jhfisc: has joined #RubyOnRails
[03:36:37] orbyt_: has joined #RubyOnRails
[03:38:09] LambdaSource: has joined #RubyOnRails
[03:39:50] clamstar: has joined #RubyOnRails
[03:41:58] jhfisc: has joined #RubyOnRails
[03:51:38] LambdaSource: has joined #RubyOnRails
[03:52:02] jfelchner: has joined #RubyOnRails
[03:52:16] jhfisc: has joined #RubyOnRails
[03:59:47] hahuang65: has joined #RubyOnRails
[04:01:47] rfoust: has joined #RubyOnRails
[04:03:07] hahuang65: has joined #RubyOnRails
[04:11:12] LambdaSource: has joined #RubyOnRails
[04:17:58] Psy-Q: has joined #RubyOnRails
[04:22:28] uksio: has joined #RubyOnRails
[04:23:33] jhfisc: has joined #RubyOnRails
[04:30:09] jhfisc: has joined #RubyOnRails
[04:36:08] jhfisc: has joined #RubyOnRails
[04:42:13] jhfisc: has joined #RubyOnRails
[04:44:53] jphase: has joined #RubyOnRails
[04:48:43] jhfisc: has joined #RubyOnRails
[04:53:54] jhfisc: has joined #RubyOnRails
[04:55:46] bga57: has joined #RubyOnRails
[05:00:06] jhfisc: has joined #RubyOnRails
[05:06:47] jphase: has joined #RubyOnRails
[05:13:34] conta: has joined #RubyOnRails
[05:17:12] bronson: has joined #RubyOnRails
[05:19:54] jhfisc: has joined #RubyOnRails
[05:23:01] jhfisc: has joined #RubyOnRails
[05:25:40] wethu: has joined #RubyOnRails
[05:35:10] kitsuneyo: has joined #RubyOnRails
[05:50:06] jhfisc: has joined #RubyOnRails
[05:54:09] Ropeney: has joined #RubyOnRails
[05:58:00] dminuoso_: has joined #RubyOnRails
[06:00:09] jhfisc: has joined #RubyOnRails
[06:00:10] tanuki: has joined #RubyOnRails
[06:03:08] nfsnobody: has joined #RubyOnRails
[06:06:06] jhfisc: has joined #RubyOnRails
[06:08:42] paranoicsan: has joined #RubyOnRails
[06:12:52] fragamus: has joined #RubyOnRails
[06:14:52] m1lt0n: has joined #RubyOnRails
[06:15:28] srinidhi: has joined #RubyOnRails
[06:20:11] Chernobuk: has joined #RubyOnRails
[06:20:45] jhfisc: has joined #RubyOnRails
[06:23:34] fragamus: has joined #RubyOnRails
[06:29:28] blackmesa: has joined #RubyOnRails
[06:38:45] jphase: has joined #RubyOnRails
[06:52:06] jhfisc: has joined #RubyOnRails
[06:56:57] mtkd: has joined #RubyOnRails
[06:58:05] jhfisc: has joined #RubyOnRails
[06:59:03] roshanavand: has joined #RubyOnRails
[07:00:57] b0zz0: has joined #RubyOnRails
[07:03:05] jhfisc: has joined #RubyOnRails
[07:06:15] kitsuneyo: has joined #RubyOnRails
[07:09:02] jhfisc: has joined #RubyOnRails
[07:11:46] jhfisc: has joined #RubyOnRails
[07:18:05] bronson: has joined #RubyOnRails
[07:18:53] blackmesa: has joined #RubyOnRails
[07:23:20] jhfisc: has joined #RubyOnRails
[07:29:01] powrtoch: has joined #RubyOnRails
[07:39:06] srinidhi: has joined #RubyOnRails
[07:43:09] urkle: has joined #RubyOnRails
[07:50:04] shime: has joined #RubyOnRails
[07:53:56] Ergo: has joined #RubyOnRails
[07:55:46] one_zero: has joined #RubyOnRails
[08:06:41] urkle: has joined #RubyOnRails
[08:07:25] kitsuneyo: has joined #RubyOnRails
[08:12:14] jhfisc: has joined #RubyOnRails
[08:13:11] bruno-: has joined #RubyOnRails
[08:13:48] mikecmpbll: has joined #RubyOnRails
[08:19:46] conta: has joined #RubyOnRails
[08:24:06] jhfisc: has joined #RubyOnRails
[08:28:21] dionysus69: has joined #RubyOnRails
[08:30:59] Jameser: has joined #RubyOnRails
[08:36:01] jhfisc: has joined #RubyOnRails
[08:41:05] ur5us: has joined #RubyOnRails
[08:41:27] timdotrb: has joined #RubyOnRails
[08:42:42] timdotrb: Evening, all
[08:43:57] marr: has joined #RubyOnRails
[08:44:04] timdotrb: I have a has_many association that I’ve created on a new model and I’m using rails_admin. When I try to add a new object in rails_admin, the has_many multiselect isn’t there. Any idea why it wouldn’t be editable?
[08:47:50] timdotrb: Nvm, got it
[08:48:06] jhfisc: has joined #RubyOnRails
[08:52:57] jhfisc: has joined #RubyOnRails
[08:58:06] jhfisc: has joined #RubyOnRails
[09:04:06] jhfisc: has joined #RubyOnRails
[09:04:47] lxsameer: has joined #RubyOnRails
[09:10:06] jhfisc: has joined #RubyOnRails
[09:12:46] jhfisc: has joined #RubyOnRails
[09:18:54] bronson: has joined #RubyOnRails
[09:26:06] jhfisc: has joined #RubyOnRails
[09:33:57] jhfisc: has joined #RubyOnRails
[09:34:05] workmad3: has joined #RubyOnRails
[09:34:26] bruno-: has joined #RubyOnRails
[09:35:28] mtkd: has joined #RubyOnRails
[09:39:23] bruno-_: has joined #RubyOnRails
[09:40:05] jhfisc: has joined #RubyOnRails
[09:40:32] jphase: has joined #RubyOnRails
[09:42:54] roshanavand: has joined #RubyOnRails
[09:46:09] jhfisc: has joined #RubyOnRails
[09:58:29] jhfisc: has joined #RubyOnRails
[10:03:17] snickers: has joined #RubyOnRails
[10:04:11] ur5us: has joined #RubyOnRails
[10:08:45] gregf_: has joined #RubyOnRails
[10:13:36] blackmesa: has joined #RubyOnRails
[10:15:03] kapil___: has joined #RubyOnRails
[10:24:32] rikkipitt: has joined #RubyOnRails
[10:25:11] acosonic: has joined #RubyOnRails
[10:26:13] rikkipitt: hey folks, can anyone help with some naming please? I have a Vendor model and a Token model (i.e. Voucher). Tokens could be valid at many Vendor outlets, what should I name the association to make sense?
[10:26:55] rikkipitt: Token has_many :vendors, through: :???
[10:27:09] rikkipitt: Vendor has_many :tokens, through: :???
[10:28:19] rikkipitt: maybe the has_many should be an alias? e.g. has_many :redeemable_tokens, through: :vendor_tokens, source: ...
[10:30:28] kitsuneyo: has joined #RubyOnRails
[10:33:13] Maakuth: are you going to use that through-model for something?
[10:33:58] rikkipitt: Maakuth, not sure yet, probably not
[10:34:09] Maakuth: if it's just a matter of Token#vendors and Vendor#tokens, I'd stick with the default naming
[10:34:17] Maakuth: so vendors_tokens or tokens_vendors
[10:34:39] rikkipitt: yeah I suppose, keep it simple
[10:35:05] Maakuth: if you now invent some clever name, it's going to be a struggle to remember what was the name of that relationship
[10:35:23] Maakuth: while 90% of time when you need it, you are thinkin "its the vendors-tokens habtm relationship, but wtf was the name"
[10:35:24] rikkipitt: good point, thanks
[10:36:07] Maakuth: np, glad to be of help
[10:36:09] rikkipitt: yeah, especially as I'm really struggling to think of the "thing" in between, not sure there is a common name for it
[10:38:50] abhi__: has joined #RubyOnRails
[10:41:30] abhi__: i am unable to save array into rails model. whenever i create new entry using model.new it creates object which has array parameter, but when i save that object it automatically converts the object into integer
[10:42:05] abhi__: i am using this https://stackoverflow.com/questions/32409820/add-an-array-column-in-rails as reference. am i doing anything wrong
[10:44:56] rgr: has joined #RubyOnRails
[10:47:15] Maakuth: did you read that thread?
[10:48:06] Maakuth: saving array isn't supported for all the db backends
[10:49:13] abhi__: i am using postgresql
[10:49:35] abhi__: yes i read that thread
[10:52:02] Maakuth: i don't have experience of such, but I'd consider not doing it. most likely a one-to-many relationship should be more effective
[10:56:35] abhi__: that would be proper way to implement it, but as of now i am just looking for some solution that might make array work
[10:59:59] Maakuth: there's the serialization method in that thread, perhaps worth a shot
[11:03:25] abhi__: I am already using serialize in the model but it's not working. I can create an object which contains attribute of type array but when i save it the array turns into integer
[11:07:28] Maakuth: are you sure you create column of correct type in the migration?
[11:08:42] workmad3: abhi__: I'd suggest creating a gist of the code you've got... can't tell what's not quite right and help effectively without that
[11:08:44] cagomez: has joined #RubyOnRails
[11:10:57] apparition: has joined #RubyOnRails
[11:17:31] Cork: anyone know if it is possible to execute activerecord save inside a transaction without the transaction affecting that specific save?
[11:18:03] abhi__: here is the gist file with some details https://gist.github.com/abhinavbr/3d39458afa303f6aac3a728ca52347b5
[11:19:04] Maakuth: you have run that migration after mdofiying it, right?
[11:19:10] Maakuth: *modifying
[11:20:12] bronson: has joined #RubyOnRails
[11:20:38] abhi__: no, i ran the migration before modifying. is it wrong? I read it from here - https://stackoverflow.com/questions/8097750/array-attribute-for-ruby-model
[11:20:46] DrYockel: has joined #RubyOnRails
[11:21:34] Maakuth: well, the migration is only used when it's run
[11:22:11] Maakuth: when your rails app starts, it gets the schema from the database. and that schema is put there by the migration when it was ran
[11:23:05] Maakuth: if it's the last migration you've done, you can rake db:rollback, modify it and db:migrate again
[11:24:07] abhi__: so there is no use of modifying migration file after we have run migrate command?
[11:24:38] cagomez: has joined #RubyOnRails
[11:24:51] Maakuth: http://guides.rubyonrails.org/active_record_migrations.html i suggest you read this
[11:32:40] matthewd: Cork: That's not really how transactions work. What do you want to achieve?
[11:34:18] Cork: matthewd: i'm trying to figure out a less ugly way to run the call without storing a variable outside the transaction block and if caseing if it is true
[11:35:09] Cork: matthewd: what i'm trying to get working is selecti for update in a fairly compext nested model case
[11:35:29] abhi__: Maakuth: Thanks. I will surely read this today. It was a silly mistake, I will try to go through more documentation to better understand my rails concepts.
[11:36:11] Cork: matthewd: this entire code runs without a transaction right now, but for the select for update and lock to work i need to have it in a transaction
[11:36:16] Maakuth: abhi__, no problem, I find that often the silliest mistakes take longest to debug
[11:36:37] zeitchef: has joined #RubyOnRails
[11:36:41] Cork: matthewd: the problem is some of these calls break if they are in a transaction (run in the wrong order as they have after_commit)
[11:38:09] matthewd: Hmm. You could store a proc / list of procs to be run after the transaction completes -- you still have the check at the end etc, but at least get to keep the actual code where you want it
[11:38:54] matthewd: Alternatively, you could use a separate DB connection
[11:39:32] Cork: hmm can you enforce that on a model instance from the outside?
[11:39:41] matthewd: There's a risk there, though, that you'll trip over one of the locks your main connection is holding, and get stuck
[11:39:45] Cork: cause if you can then that would be a solution
[11:39:57] Cork: ya, dead locks are fun
[11:40:10] Cork: though they won't ever talk about the same table so it should be safe...
[11:40:41] matthewd: `Thread.new { Rails.application.executor.run { something.save! } }.join` should do it
[11:41:11] Cork: i'll have to try that XD thx!
[11:43:12] matthewd: Oh, I may mean .wrap instead of .run
[11:43:27] Cork: i'll find out :) thx for the idea
[11:43:45] matthewd: Someone should really document that API 😅
[11:45:05] srinidhi: has joined #RubyOnRails
[11:46:30] fmcgeough: has joined #RubyOnRails
[11:46:44] ldnunes: has joined #RubyOnRails
[11:56:27] bruno-: has joined #RubyOnRails
[11:57:46] jphase: has joined #RubyOnRails
[11:59:58] fmcgeough: has joined #RubyOnRails
[12:07:09] abhi__: has joined #RubyOnRails
[12:10:53] DrYockel1: has joined #RubyOnRails
[12:14:04] rgr_: has joined #RubyOnRails
[12:16:12] mcr-credil: has joined #RubyOnRails
[12:17:25] ma5ter: has joined #RubyOnRails
[12:22:43] frojnd: lupine: here?
[12:33:51] tcopeland: has joined #RubyOnRails
[12:35:40] aclark: has joined #RubyOnRails
[12:36:10] truenito: has joined #RubyOnRails
[12:44:37] ShalokShalom_: has joined #RubyOnRails
[12:58:58] mauro1254: has joined #RubyOnRails
[13:01:09] mauro1254: Hi folks! What is the best way to validate a belongs_to association and display the error?
[13:01:12] chouhoulis: has joined #RubyOnRails
[13:02:32] mauro1254: I read the following post: http://iada.nl/blog/article/rails-tip-display-association-validation-errors-fields but alias_method_chain doesn't exist anymore (rails 5.1)
[13:09:11] srinidhi: has joined #RubyOnRails
[13:10:38] matthewd: mauro1254: validates_associated ?
[13:11:05] matthewd: mauro1254: Otherwise, alias_method_chain was removed because you can achieve the same thing with Module#prepend
[13:11:36] mauro1254: matthewd : I have projects and categories, a Project belongs_to a Category
[13:12:41] workmad3: has joined #RubyOnRails
[13:13:07] mauro1254: matthewd : In the form I have category_id. If the category is missing then the category_id field must be wrapped in a div with field_with_errors class
[13:13:49] mauro1254: If you give a look at the link I provided you can see that it can be achieved by validating category_id and also category
[13:14:15] mauro1254: But... If category is missing, then you want get the error on the form
[13:21:11] bronson: has joined #RubyOnRails
[13:21:12] kitsuneyo: has joined #RubyOnRails
[13:21:22] cagmz: has joined #RubyOnRails
[13:23:01] cagmez__: has joined #RubyOnRails
[13:25:54] deevil: has joined #RubyOnRails
[13:35:15] jphase: has joined #RubyOnRails
[13:35:26] rfoust: has joined #RubyOnRails
[13:43:44] jottr: has joined #RubyOnRails
[13:48:40] mr_foto: has joined #RubyOnRails
[13:51:55] Chernobuk: has joined #RubyOnRails
[13:56:48] jottr: has joined #RubyOnRails
[13:59:42] ShalokShalom: has joined #RubyOnRails
[14:11:18] ResidentBiscuit: has joined #RubyOnRails
[14:11:46] ResidentBiscuit: has joined #RubyOnRails
[14:13:27] jhfisc: has joined #RubyOnRails
[14:17:17] tcopeland: has joined #RubyOnRails
[14:18:38] jhfisc: has joined #RubyOnRails
[14:22:44] kitsuneyo: has joined #RubyOnRails
[14:23:09] jhfisc: has joined #RubyOnRails
[14:24:24] dionysus69: has joined #RubyOnRails
[14:26:08] kus_ubuntui686: has joined #RubyOnRails
[14:30:19] dionysus69: has joined #RubyOnRails
[14:32:01] jottr_: has joined #RubyOnRails
[14:35:49] dionysus69: has joined #RubyOnRails
[14:41:18] jhfisc: has joined #RubyOnRails
[14:45:04] blackmesa: has joined #RubyOnRails
[14:46:20] zeitchef: Hi everyone! What's the best way to show a user the IP address and device (user agent) they most recently signed in with?
[14:48:06] jhfisc: has joined #RubyOnRails
[14:48:37] jottr_: has joined #RubyOnRails
[14:49:35] kitallis: has joined #RubyOnRails
[14:50:03] soahccc: has joined #RubyOnRails
[14:52:45] lupine: zeitchef: see `request.ip`
[14:52:54] lupine: you just save it when they sign in
[14:53:14] orbyt_: has joined #RubyOnRails
[14:53:26] maxmanders: has joined #RubyOnRails
[14:56:06] jhfisc: has joined #RubyOnRails
[14:58:45] clamstar: has joined #RubyOnRails
[14:59:14] chriscarpenter12: has joined #RubyOnRails
[15:01:26] deevil_: has joined #RubyOnRails
[15:02:05] jhfisc: has joined #RubyOnRails
[15:03:11] TheMoonMaster: has joined #RubyOnRails
[15:05:12] maxmanders: has joined #RubyOnRails
[15:07:14] Sirecote: has joined #RubyOnRails
[15:12:02] jhfisc: has joined #RubyOnRails
[15:15:28] jphase: has joined #RubyOnRails
[15:22:07] [Butch]: has joined #RubyOnRails
[15:22:10] bronson: has joined #RubyOnRails
[15:23:50] jhfisc: has joined #RubyOnRails
[15:23:53] kitsuneyo: has joined #RubyOnRails
[15:28:36] jhfisc: has joined #RubyOnRails
[15:30:44] cagomez: has joined #RubyOnRails
[15:33:25] AzaToth: has joined #RubyOnRails
[15:33:27] someuser: has joined #RubyOnRails
[15:38:33] kitsuneyo: has joined #RubyOnRails
[15:44:30] andrewray: has joined #RubyOnRails
[15:49:46] snickers: has joined #RubyOnRails
[15:51:01] dminuoso_: has joined #RubyOnRails
[15:51:18] dionysus70: has joined #RubyOnRails
[15:51:24] dminuoso_: How weird am I for establishing a convention to no longer use instance variables to pass variables to views, and always explicitly render views?
[15:51:54] dminuoso_: i.e. stuff like this: https://gist.github.com/anonymous/d3460900e8fe7407add54ef10b35df98
[15:52:14] dionysus70: what's the benefit?
[15:52:43] dminuoso_: dionysus70: Being explicit about the coupling and rendering?
[15:53:05] dminuoso_: This sheer magic where rails renders a view without you even defining an action is.. too magical.
[15:53:14] dminuoso_: And using instance variables for views is just ugh.
[15:54:45] dminuoso_: Rails has far too much "if you dont specify anything, it will magically do X, Y and Z just based on some inflections of.. names...
[15:54:55] dminuoso_: This is my way of protesting.
[15:55:16] Saukk: has joined #RubyOnRails
[15:56:56] kuwze: has joined #RubyOnRails
[15:57:04] kuwze: hey, I want a record type to store a list of integers. What should I do?
[15:58:05] dminuoso_: kuwze: What is your database?
[15:58:17] kuwze: dminuoso_: sqlite at the moment
[15:58:37] dminuoso_: kuwze: http://api.rubyonrails.org/classes/ActiveRecord/AttributeMethods/Serialization/ClassMethods.html
[15:58:58] kuwze: dminuoso_: thank you!
[15:59:10] marr: has joined #RubyOnRails
[15:59:33] jhfisc: has joined #RubyOnRails
[16:01:56] chriscarpenter12: In my controller if I extend from a base controller (namespaced) that itself extends from ApplicationController it doesn't load the Application layout. If I extend directly from ApplicationController the layout loads properly. Do you know why the layout doesn't load if I don't directly extend ApplicationController?
[16:02:53] orbyt_: has joined #RubyOnRails
[16:03:32] dminuoso_: kuwze: If you ever need native support, with PostgreSQL you can use the underlying JSON mechanism as displayed in here: http://guides.rubyonrails.org/active_record_postgresql.html
[16:03:36] dminuoso_: (This requires no serialization)
[16:03:55] dminuoso_: Well technically it will still be serialized, but it will be done database side and in a fashion that actually scales.
[16:04:29] dminuoso_: chriscarpenter12: Please gist your exact code for all those 3 controllers involved.
[16:04:40] chriscarpenter12: dminuoso_: Sure give me a sec
[16:05:04] kuwze: dminuoso_: thank you!
[16:05:22] centrx: has joined #RubyOnRails
[16:06:02] jhfisc: has joined #RubyOnRails
[16:08:27] chriscarpenter12: dminuoso_: https://gist.github.com/chriscarpenter12/b36bf26f9fd92f138af316b73e86dc0b
[16:14:03] jhfisc: has joined #RubyOnRails
[16:20:08] jhfisc: has joined #RubyOnRails
[16:23:33] one_zero: has joined #RubyOnRails
[16:26:44] jhfisc: has joined #RubyOnRails
[16:28:25] chriscarpenter12: This that should be doable, but idk
[16:32:56] gusrub: has joined #RubyOnRails
[16:35:30] srinidhi: has joined #RubyOnRails
[16:39:32] jhfisc: has joined #RubyOnRails
[16:43:16] jhfisc: has joined #RubyOnRails
[16:43:55] andrewray: has joined #RubyOnRails
[16:44:45] andrewray: has joined #RubyOnRails
[16:48:06] jhfisc: has joined #RubyOnRails
[16:48:57] mtkd: has joined #RubyOnRails
[16:49:06] netzfisch: has joined #RubyOnRails
[16:54:54] blackmesa: has joined #RubyOnRails
[16:55:33] jottr_: has joined #RubyOnRails
[16:59:10] jhfisc: has joined #RubyOnRails
[16:59:57] conta2: has joined #RubyOnRails
[17:03:57] kuwze: if I have tags for posts, is this the right way to set it up? https://gist.github.com/kuwze/e402aaf558a7b80f4939291a69127cca
[17:08:33] orbyt_: has joined #RubyOnRails
[17:10:13] jottr_: has joined #RubyOnRails
[17:10:34] bruno-: has joined #RubyOnRails
[17:15:58] cnk: has joined #RubyOnRails
[17:18:09] istrasci: has joined #RubyOnRails
[17:18:19] kies: has joined #RubyOnRails
[17:19:49] istrasci: Is there a way to unit test a Rails model for a database view?
[17:23:24] bronson: has joined #RubyOnRails
[17:24:07] jphase: has joined #RubyOnRails
[17:28:14] fschuindt: has joined #RubyOnRails
[17:33:43] cnk: Probably the same way you would unit test any other rails model
[17:34:30] cnk: you might have to do some manual work to fill the underlying tables - if you want to test against data from the db
[17:39:44] netzfisch: has joined #RubyOnRails
[17:43:15] srinidhi: has joined #RubyOnRails
[17:45:23] mikecmpbll: has joined #RubyOnRails
[17:47:55] rgr: has joined #RubyOnRails
[17:49:23] b0zz0: has joined #RubyOnRails
[17:57:09] gambl0re: has joined #RubyOnRails
[17:58:08] orbyt_: has joined #RubyOnRails
[17:58:53] jottr_: has joined #RubyOnRails
[18:03:07] chriscarpenter12: dminuoso_: Any thoughts on why this inheritance is causing the application layout no to load?
[18:08:12] mtkd: has joined #RubyOnRails
[18:10:49] b0zz0: has joined #RubyOnRails
[18:11:37] b0zz0: has joined #RubyOnRails
[18:12:23] b0zz0: has joined #RubyOnRails
[18:13:22] cagomez_: has joined #RubyOnRails
[18:38:05] b0zz0: has joined #RubyOnRails
[18:51:14] defsdoor: has joined #RubyOnRails
[18:51:39] sonOfRa: has joined #RubyOnRails
[19:02:25] tcopeland: kuwze: can multiple posts have the same tag? if so, you might want to have a “taggings” table in between “tags” and “posts”
[19:02:40] blackmesa: has joined #RubyOnRails
[19:06:21] netzfisch: has joined #RubyOnRails
[19:18:15] deevil: has joined #RubyOnRails
[19:19:04] unreal: has joined #RubyOnRails
[19:21:09] conta2: has joined #RubyOnRails
[19:24:20] bronson: has joined #RubyOnRails
[19:27:44] kitsuneyo: has joined #RubyOnRails
[19:30:08] xiljin: has joined #RubyOnRails
[19:32:15] xiljin: has joined #RubyOnRails
[19:33:18] chouhoulis: has joined #RubyOnRails
[19:36:50] xiljin: has joined #RubyOnRails
[19:39:40] cagmz: has joined #RubyOnRails
[19:41:15] Guest97372: has joined #RubyOnRails
[19:45:26] blackmesa1: has joined #RubyOnRails
[19:48:49] srinidhi: has joined #RubyOnRails
[19:58:41] orbyt_: has joined #RubyOnRails
[19:59:37] jhfisc: has joined #RubyOnRails
[20:00:29] aclark: has joined #RubyOnRails
[20:03:14] linetrace: has joined #RubyOnRails
[20:03:51] deevil: has joined #RubyOnRails
[20:04:25] linetrace: can render_to_string access instance variables?
[20:05:12] deevil: linetrace: I usually pass locals to it, but it should be able to access instance vars
[20:06:04] dviola: has joined #RubyOnRails
[20:06:06] jhfisc: has joined #RubyOnRails
[20:06:15] linetrace: deevil: thanks, I'm guessing it can read instance variables, but not write back to them
[20:07:01] linetrace: Using a breadcrumb gem that writes to an instance variable when you add a breadcrumb in view...
[20:07:19] linetrace: ...then calls a render method in the layout, works fine...
[20:07:35] deevil: linetrace: yeah, you can change them inside the partial, but they won’t change in the controller that called render_to_string
[20:08:04] linetrace: ...but when used with comfortable-mexican-sofa, which uses render_to_string to build the content and pass to layout, it doesn't work
[20:08:33] linetrace: deevil: thanks, that's what I thought
[20:08:58] linetrace: deevil: probably no reasonable way around that?
[20:10:57] deevil: linetrace: weird.. I usually do something like: render_to_string(partial: "partial_name", :locals => { foo: "bar", herp: "derp" }) and then just use locals in the partial
[20:13:26] deevil: linetrace: and then you can put “<% foo = @foo if ! @foo.nil? %>” at the top of your partial, if your gem is insisting on using instance vars
[20:15:15] linetrace: deevil: yeah, instance vars pass through to render_to_string fine, but it's just an interesting way that the breadcrumb gem works by storing state in an instance var so it's accessible from view & layout
[20:16:15] linetrace: deevil: thanks for confirming
[20:16:52] deevil: linetrace: no prob.
[20:22:20] jhfisc: has joined #RubyOnRails
[20:28:14] jhfisc: has joined #RubyOnRails
[20:30:48] gusrub: has joined #RubyOnRails
[20:31:49] linetrace: has left #RubyOnRails: ()
[20:36:05] jhfisc: has joined #RubyOnRails
[20:38:24] mtkd: has joined #RubyOnRails
[20:39:31] kt: has joined #RubyOnRails
[20:42:30] jhfisc: has joined #RubyOnRails
[20:46:54] zeitchef: has joined #RubyOnRails
[20:56:21] jhfisc: has joined #RubyOnRails
[20:56:29] dcope: what's the proper way to retrieve the url for an asset? i'm trying to load static assets and serve them through a rails api.
[21:02:23] jhfisc: has joined #RubyOnRails
[21:07:24] knight33: has joined #RubyOnRails
[21:14:20] fryguy: `asset_url`
[21:15:08] jhfisc: has joined #RubyOnRails
[21:15:51] cnk: has joined #RubyOnRails
[21:18:05] jhfisc: has joined #RubyOnRails
[21:24:06] jhfisc: has joined #RubyOnRails
[21:25:31] bronson: has joined #RubyOnRails
[21:29:18] jhfisc: has joined #RubyOnRails
[21:31:38] wethu: has joined #RubyOnRails
[21:32:11] jhfisc: has joined #RubyOnRails
[21:37:46] gusrub: has joined #RubyOnRails
[21:38:46] rfoust: has joined #RubyOnRails
[21:46:06] jhfisc: has joined #RubyOnRails
[21:50:17] jphase: has joined #RubyOnRails
[21:52:09] jhfisc: has joined #RubyOnRails
[21:57:40] jhfisc: has joined #RubyOnRails
[22:02:32] timdotrb: has joined #RubyOnRails
[22:02:40] timdotrb: Afternoon, all
[22:03:12] orbyt_: has joined #RubyOnRails
[22:04:49] timdotrb: I’m using Solr for searching with the sunspot_rails gem. The docs say objects are indexed as part of the save callback, but does anyone know if they are called on the update_attributes method?
[22:07:55] fox_mulder_cp: has joined #RubyOnRails
[22:08:17] cnk: timdotrb: I don't now for certain but update_attributes says it runs callbacks so I would expect reindexing
[22:09:07] timdotrb: cnk: hmm. That would make sense.. For some reason I am missing quite a bit of data from my index (I import and update data daily)
[22:11:58] jhfisc: has joined #RubyOnRails
[22:17:28] alfiemax: has joined #RubyOnRails
[22:18:01] jhfisc: has joined #RubyOnRails
[22:21:19] orbyt_: has joined #RubyOnRails
[22:34:25] jhfisc: has joined #RubyOnRails
[22:39:28] b0zz0: has joined #RubyOnRails
[22:40:10] cagomez_: I'm joining 2 tables. how do I specify conditions for each? I have `Model.join(:foo, :bar).where(foo: { a: true }, bar: { b: false})` but it says it's missing a FROM clause for table `b`
[22:40:13] b0zz0: has joined #RubyOnRails
[22:41:03] b0zz0: has joined #RubyOnRails
[22:41:48] b0zz0: has joined #RubyOnRails
[22:42:38] b0zz0: has joined #RubyOnRails
[22:43:23] b0zz0: has joined #RubyOnRails
[22:44:13] b0zz0: has joined #RubyOnRails
[22:45:03] b0zz0: has joined #RubyOnRails
[22:48:08] jhfisc: has joined #RubyOnRails
[22:53:14] jhfisc: has joined #RubyOnRails
[22:57:25] jphase: has joined #RubyOnRails
[23:02:06] jhfisc: has joined #RubyOnRails
[23:08:05] jhfisc: has joined #RubyOnRails
[23:14:06] jhfisc: has joined #RubyOnRails
[23:24:53] tfitts: has joined #RubyOnRails
[23:28:06] jhfisc: has joined #RubyOnRails
[23:32:54] jhfisc: has joined #RubyOnRails
[23:47:28] sevensidedmarble: has joined #RubyOnRails
[23:48:54] sevensidedmarble: Does anyone have any reccomendations for tutorials on ActionCable?
[23:49:47] bruno-: has joined #RubyOnRails
[23:53:21] sevensidedmarble: I've found a few that all bring up job too to actually render the messages sent with action cable and I'm unsure why they do so
[23:54:18] jphase: has joined #RubyOnRails