Page 1 of 3 | Next »
[17:13:26] BrianJ: https://gist.github.com/bjensen/32a72c801abf06f4edb9246b8f34dc47 any idea how I can in this simple make the 'attendances.is_team_activity': only_team_activities clause go away if only_team_activities is false ?
[08:34:26] BrianJ: So I upgraded my rails 5.2.1 to 5.2.2 running in api mode and all of sudden my cors initializer: Rails.application.config.middleware.insert_before 0, Rack::Cors initializer at https://gist.github.com/bjensen/90f8b6c6f206a07c4e4f323bdd65a78a is giving me errors a FrozenError can't modify frozen Array. Is there a different way to setup cors now?
[12:17:36] BrianJ: Is this the right channel to ask for help on factoryBot and associations ? There is no #factorybot channel.. :-/
[12:26:21] BrianJ: I have an issue with factoryBot, I have a stay belongs to student that belongs to schools..however no matter what I try i keep getting errors that the school doesnt exist, even if its created before hand. If you google factorybot and associations, this seams to be an ongoing problem..anyone here willing to lend a hand? Ill provide a pastie
[21:12:35] BrianJ: Hi guys. Can anyone point me to a resource for rails 5 about how to use a worker to do a job while the web request is waiting and then returns with a download url for example? not sure how ppl do this in 2018..
[21:34:44] BrianJ: loincloth: i was unsure wether people would use actioncable, ajax or whatever here in 2018..
[22:27:13] BrianJ: haha, alive and kicking on irc, nice to see. Not many around from that long time ago. I think it must have been atleast 6 years :-)
[22:32:16] BrianJ: Radar: So what are you up to now? I presume your no longer working with dr nic ..but are you still in australia?
[22:35:19] BrianJ: Radar: and currently we do the emailing the result now like you mentioned, but I wanted to do the other option, just not sure which way to go :-)
[22:36:22] BrianJ: Radar: and the reason I remember you skipping those parts is because I was handling them. Like different views for different customers etc ;-)
[22:40:20] BrianJ: Radar: yeah those are the easy cases..sometimes they have different controllers and you need to keep track of which has to be linked to and not..I use exhibits a lot :-)
[12:21:05] BrianJ: "email@example.com " I have an issue with this string.. You probably cant see it cause of client has removed it, but there seams to be a non breaking space..but I cant seam to get rid of it. I basicly just want to remove all charecters that arent part of the email
[08:56:46] BrianJ: I have a Student and a Councilor, they both have a has_one relationship with Profile. I am trying to order Student according to their councilor name. I am basicly trying to do: Student.includes(councilor: :profile).order("profiles.name").referenecs(councilor: :profile). This orders it after the student name, not councilor name...how can I fix this?
[19:52:16] BrianJ: Is there a go to sound library that developers use for something like an accept/reject sound?
[02:26:51] BrianJ: I'm trying to make a rest API call to a teamcity server and I'm getting #<Net::HTTPBadRequest:0x007fcd595c0138> Can anyone take a quick look at my code and let me know if I'm doing something obviously wrong? https://gist.github.com/BrianJakovich/afcb65cc636836d6a76a
[00:39:21] BrianJ: where it says "files to reference" does that mean I need to download them and put them in my assets dir https://github.com/jhollingworth/bootstrap-wysihtml5#files-to-reference
[14:21:41] BrianJ: Should i be rendering my images on my home page from my app/assets/images/ directory or from my CDN?
[03:27:33] BrianJ: I'm using paperclip and i have a user model that has a has many through relationship with my asset model which is used to upload images. I need to set a "profile" pic from the uploaded assets that are tied to the user.. What is the best way to do this?
[04:37:00] BrianJ: I'm using paperclip and i have a user model that has a has many through relationship with my asset model which is used to upload images. I need to set a "profile" pic from the uploaded assets that are tied to the user.. What is the best way to do this?
[04:43:08] BrianJ: t27duck: no, a user can upload as many pics as you want and I want them to be able to pick the one they want to be their profile pic. I hope that answers your question
[04:53:07] BrianJ: Ok so I added a profile_pic attribute to my user model, but how do I let my user pick the image?
[04:53:33] BrianJ: do I add a checkbox to each image and if its checked, thats what the profile pic is set to?
[18:48:36] BrianJ: Been working with this for a while, but not having much luck. I have a Dog model and a has many association with my asset model which uses paperclip for uploading images to AWS s3. My user has several images attached to it. I want my user to be able to choose the an image as the profile picture.
[18:53:51] BrianJ: ya i guess i was vague now that i think about it. The problem is that I can have a collection (drop down) of my assets that are connected to my dog, but i want to be able to show the image and the user to choose that
[18:58:59] BrianJ: hm. the only problem is im not sure how to tie that back. I show all of the images, but those are for an upload section.
[02:39:26] BrianJ: I have a static file that I have in s3. I'd like to let my users download it. What is the best way to do this?
[06:23:44] BrianJ: nvm I seem to still be having a problem when I add my :caption into the field http://pastie.org/8307577
[20:07:17] BrianJ: so i have several "dog" listings where I iterate over them using each.. I need to give them a specific order, what would the best way of doing this be?
[20:17:45] BrianJ: theres no real method to it. Each dog needs to be listed in a specific position on the page
[20:20:12] BrianJ: and the reordering is what is throwing me off… I could easily create a list off the bat, but when it needs to change, thats not very easy
[22:31:49] BrianJ: I created a method inside my "parents" controller called females. I then created a method called sort in the parents controller and added it to the parents collection with "post" when I go to update something using the post method I get a 404 saying localhost:300/parents/females is not found
[22:39:18] BrianJ: what I'm trying to do is use jquery ui to change ordering of my dog listings on my page
[22:39:49] BrianJ: when I move my dog up and down it works, but when i refresh it goes backt o original localtion
[22:42:39] BrianJ: workmad3: oic.. I thought thats what this does: $.post($(this).data('update-url'), $(this).sortable('serialize'))
[14:10:58] BrianJ: how would i go about adding a caption to a photo that gets uploaded via paperclip?
[14:13:24] BrianJ: ok I have an asset model (basically the same thing I think). So I would just need to add an attr_accessible :caption and make that a string?
[01:19:02] BrianJ: I added a new field to my model and then when I go to update an object of that model i get "cannot mass assign permissions _destroy"
[23:54:24] BrianJ: I'm using paperclip in my rails app and I have a model called asset that consitss of the image. I also have a join model to connect my model to my asset .. How would i add an extra attribute like "type" to my image that i upload with paperclip?
[06:40:04] BrianJ: In my edit page how do I show what assets have currently been uploaded using paperclip? http://pastie.org/8096213 this gives me just empy file upload fields
[22:00:10] BrianJ: How do i limit an .each to like 5 records returned? for instance @instance.each do |instance| and limit that to 5?
[22:08:58] BrianJ: nevermind, i removed the find(:all) and tried using take(5). Once i added the find back, it worked
[16:20:12] BrianJ: I have a datetime attribute and I want to display 8 weeks from that date.. how would I do this? Date.parse(@user.due_date.to_s + 56.days)
[01:08:27] BrianJ: having issues with a hash within a hash.. or atleast accessing it. Can anyone tell me what im doing wrong? http://pastie.org/8084386#3
[02:10:25] BrianJ: http://pastie.org/8073662 I'm using paperclip and when i click on my thumbnail image, it puts up the original sized image, but i cant close it
[03:33:01] BrianJ: jaymiejones86: I actually figured out the problem. The stylesheets weren't loading. My issue is fixed. I just needed to include fancybox in my application.css
[04:47:51] BrianJ: jaymiejones86: awesome, adding a span to the thumbnails worked… not sure why though.. http://pastie.org/6345717 mind explaining?
[00:42:18] BrianJ: How do I run this query from my rails app? I'd like to assign the return values to an @drinks variable http://pastie.org/6319657
[00:46:29] BrianJ: erlingur: I want to look for all of the drinks that have the ingredients that are listed in my cabinet
[00:55:16] BrianJ: rhizmoe: yes, but if i do Drink.joins(ingredients: :cabinet_ingredients).uniq I get results that don't completely match (only 1 ingredient is in the drink) and it doesnt take in account for the user
[21:01:06] BrianJ: Anyone know why in my has_one relationship my cabinet is gettting routed to cabinet.1?
[22:15:12] BrianJ: if I wanted to do a sql query for an attribute of a model would it be Object.where(:attribute)?
[01:33:57] BrianJ: in jquery '#book_author_tokens' means that its going to look at the book model and find the author_tokens attribute?
[03:53:59] BrianJ: Radar: I would, but I cant find much documentation on how to implement it… I'm having enough trouble just moving what Ryan Bates did with tokeninput to fit my app
[04:02:33] BrianJ: lol, jquery and js are a foriegn language to me right now. I was looking for something written in rails that I could look at and play with