« Back to channel list

#RubyOnRails - 08 April 2017

« Back 1 day Forward 1 day »
[00:01:17] uksio: has joined #RubyOnRails
[00:13:06] GodFather: has joined #RubyOnRails
[00:30:30] michael_mbp: if I have Notepad has_many :pages and Page belongs_to :notepad, I want to be able to create the Notepad via when Page.create! or Page.new().save! is done
[00:31:39] michael_mbp: i.e. Notepad validates :pages, presence: true
[00:31:53] michael_mbp: the point here is that a Notepad cannot be created without at least 1 page.
[00:33:33] michael_mbp: Page.build( name: 'Section 1', notepad: Notepad.new()) ?
[00:35:10] hotpancakes: has joined #RubyOnRails
[00:37:58] fox_mulder_cp: has joined #RubyOnRails
[00:40:35] mrgreenfur: has joined #RubyOnRails
[00:44:46] dcluna: has joined #RubyOnRails
[00:52:48] hive-mind: has joined #RubyOnRails
[00:56:39] fugee: create_table "addresses", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 `id` int(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`) " do |t|
[01:00:20] byteflame: has joined #RubyOnRails
[01:06:50] hahuang61: has joined #RubyOnRails
[01:13:04] Guest96: has joined #RubyOnRails
[01:18:15] helpa: has joined #RubyOnRails
[01:21:49] hotpancakes: has joined #RubyOnRails
[01:25:26] r3vDev: has joined #RubyOnRails
[01:26:05] HoierM: has joined #RubyOnRails
[01:31:39] hotpanca_: has joined #RubyOnRails
[01:31:56] nya: has joined #RubyOnRails
[01:32:23] Puffball: has joined #RubyOnRails
[01:32:56] SteenJobs: has joined #RubyOnRails
[01:35:32] mrk____: has joined #RubyOnRails
[01:37:13] mrk____: hi I'm using acts_as_follower and when i do user.follow user2 I get an exception.
[01:37:15] mrk____: NoMethodError: undefined method `relation_delegate_class' for Follow:Module from /usr/local/rvm/gems/ruby-2.4.0/gems/activerecord-5.0.2/lib/active_record/relation/delegation.rb:107:in `relation_class_for'
[01:37:17] mrk____: any ideas?
[01:38:54] mrk____: acts_as_follower-c5ac7b9601c4/lib/acts_as_follower/follower.rb:33:in `follow'
[01:55:44] marcdel: has joined #RubyOnRails
[01:59:12] hndk: has joined #RubyOnRails
[02:00:10] hndk: has joined #RubyOnRails
[02:02:16] fernandomm: has joined #RubyOnRails
[02:04:40] libastral: has joined #RubyOnRails
[02:05:44] csk: has joined #RubyOnRails
[02:06:59] duderonomy: has joined #RubyOnRails
[02:09:50] irishfromua: has joined #RubyOnRails
[02:11:59] Technodrome: has joined #RubyOnRails
[02:17:22] irishfromua: has joined #RubyOnRails
[02:18:17] naprimer_2: has joined #RubyOnRails
[02:20:18] pickle_: has joined #RubyOnRails
[02:26:55] nya: has joined #RubyOnRails
[02:36:12] spicerack: has joined #RubyOnRails
[02:37:46] mazeinmaze_: has joined #RubyOnRails
[02:59:32] nahtnam: has joined #RubyOnRails
[03:00:01] spicerack: has joined #RubyOnRails
[03:03:48] spicerack: has joined #RubyOnRails
[03:04:57] byteflame: has joined #RubyOnRails
[03:07:39] hahuang61: has joined #RubyOnRails
[03:10:27] DoctorMonocular: has joined #RubyOnRails
[03:10:34] HoierM: has joined #RubyOnRails
[03:13:02] andrew9184: has joined #RubyOnRails
[03:16:57] patarr: has joined #RubyOnRails
[03:18:10] Saukk: has joined #RubyOnRails
[03:18:49] Pumukel: has joined #RubyOnRails
[03:19:58] sevenseacat: has joined #RubyOnRails
[03:25:09] harfangk: has joined #RubyOnRails
[03:36:59] xall: has joined #RubyOnRails
[03:50:26] marcdel: has joined #RubyOnRails
[03:51:44] marcdel_: has joined #RubyOnRails
[03:57:37] aajjbb: has joined #RubyOnRails
[04:25:50] duderono_: has joined #RubyOnRails
[04:27:24] peterpp: has joined #RubyOnRails
[04:27:42] njero: has joined #RubyOnRails
[04:37:35] r3vDev: has joined #RubyOnRails
[04:45:31] flopsec: has joined #RubyOnRails
[04:45:41] zel: has joined #RubyOnRails
[04:46:33] dcluna: has joined #RubyOnRails
[04:53:54] duderonomy: has joined #RubyOnRails
[04:58:28] Guest96: has joined #RubyOnRails
[05:02:53] xibalba: has joined #RubyOnRails
[05:03:00] Karpah: has joined #RubyOnRails
[05:05:11] byteflame: has joined #RubyOnRails
[05:05:36] syndikate: has joined #RubyOnRails
[05:06:00] irishfromua: has joined #RubyOnRails
[05:08:45] hahuang61: has joined #RubyOnRails
[05:09:56] jgt1: has joined #RubyOnRails
[05:11:05] chouhoulis: has joined #RubyOnRails
[05:17:45] patarr: has joined #RubyOnRails
[05:48:20] Guest96: has joined #RubyOnRails
[05:52:49] r3vDev: has joined #RubyOnRails
[05:54:40] AnoHito: has joined #RubyOnRails
[06:02:51] r3vDev: has joined #RubyOnRails
[06:15:40] csk: has joined #RubyOnRails
[06:16:33] xall: has joined #RubyOnRails
[06:18:16] cam27: has joined #RubyOnRails
[06:29:50] xibalba: has joined #RubyOnRails
[06:30:17] jsrn_: has joined #RubyOnRails
[06:34:26] jusa: has joined #RubyOnRails
[06:46:46] r3vDev: has joined #RubyOnRails
[06:51:00] xibalba: has joined #RubyOnRails
[06:51:50] AnoHito: has joined #RubyOnRails
[06:52:08] hive-mind: has joined #RubyOnRails
[06:55:58] User458764: has joined #RubyOnRails
[06:59:55] sevenseacat: has joined #RubyOnRails
[07:03:40] pLaTo0n: has joined #RubyOnRails
[07:05:21] byteflame: has joined #RubyOnRails
[07:05:58] bga57: has joined #RubyOnRails
[07:07:46] andrew9184: has joined #RubyOnRails
[07:09:33] hahuang61: has joined #RubyOnRails
[07:13:34] FastJack: has joined #RubyOnRails
[07:15:06] xibalba: has joined #RubyOnRails
[07:15:28] sevenseacat: has joined #RubyOnRails
[07:16:25] harfangk: has joined #RubyOnRails
[07:18:38] patarr: has joined #RubyOnRails
[07:23:34] xibalba: has joined #RubyOnRails
[07:32:36] mathzol: has joined #RubyOnRails
[07:32:36] AnoHito: has joined #RubyOnRails
[07:33:10] sevenseacat: has joined #RubyOnRails
[07:33:40] xibalba: has joined #RubyOnRails
[07:48:35] tctara: has joined #RubyOnRails
[07:50:16] Qchmqs: has joined #RubyOnRails
[07:50:44] cseder: has joined #RubyOnRails
[07:54:00] Jasaka: has joined #RubyOnRails
[07:56:13] dionysus69: has joined #RubyOnRails
[08:02:59] xibalba: has joined #RubyOnRails
[08:07:06] cschneid_: has joined #RubyOnRails
[08:09:42] xibalba: has joined #RubyOnRails
[08:11:03] lxsameer: has joined #RubyOnRails
[08:11:24] ahrs: has joined #RubyOnRails
[08:12:38] AzaToth: has joined #RubyOnRails
[08:19:57] snickers: has joined #RubyOnRails
[08:20:11] teddysmoker: has joined #RubyOnRails
[08:24:39] arBmind: has joined #RubyOnRails
[08:33:52] peterpp: if I have a nested resource route such as /brands/:id/products, in which method/controller do you usually deal with the request?
[08:34:26] peterpp: in method index of app/controllers/products_controller.rb?
[08:35:53] njero: yup. usually that's the case
[08:36:48] peterpp: say, you also need a route such as ... /sellers/:id/products, then what do you do?
[08:39:01] njero: I would prefer different controllers if this is use case. Not sure about the patterns though
[08:39:21] njero: like.. brand_products_controller.. blah...
[08:39:40] peterpp: this is what I did but I was wondering if there's a better way
[08:43:08] armyriad: has joined #RubyOnRails
[08:43:42] marr: has joined #RubyOnRails
[08:44:03] marcdel: has joined #RubyOnRails
[08:44:32] cerulean: has joined #RubyOnRails
[08:44:41] cerulean: peace on earth
[08:45:04] teddysmoker: With the current events, it doesn't seem so.. : (
[08:45:11] cerulean: anyone know anything about a guy named "dreamr" aka James O'Kelly who stole $100,000 from people with a (ruby?) dev bootcamp?
[08:45:11] jgt1: has joined #RubyOnRails
[08:45:23] cerulean: he used to chill here in this channel, 7 years ago
[08:46:30] cschneid_: has joined #RubyOnRails
[08:46:31] cerulean: https://www.inc.com/salvador-rodriguez/devschool-coding-bootcamps.html
[08:46:41] cerulean: well, if you're wondering why i asked
[08:46:41] Destru: has joined #RubyOnRails
[08:46:48] teddysmoker: Well, a quick google search also revealed this https://www.reddit.com/r/ruby/comments/246lf4/be_careful_dhh_thatrubylove_is_a_dangerous_man/
[08:46:56] cerulean: i have hung out him on a few occasions in LA and denver
[08:47:01] Destru: has joined #RubyOnRails
[08:47:09] teddysmoker: Seems he is wanted, or was wanted, for assault, mischef and some other things.
[08:47:21] cerulean: yes i found that out too
[08:47:31] cerulean: i was just wondering what happened to him
[08:47:40] cerulean: didnt realize something that crazy had gone down
[08:48:11] cerulean: he passively aggresively threatened me at his house in denver in front of his girlfriend for spilling joint ash on his couch on accident
[08:48:37] cerulean: always talking about dj and electronic music stuff, i knew he was never serious. i am a real producer for rap musicians and i have a dj website im working on in rails
[08:49:18] cerulean: it was weird how employers accepted his druggie behavior, even as a smoker myself. i didnt do it like on webcam all the time or something
[08:50:03] cerulean: always tellin me how the mexican cocaine is so good, while he's wanted on the most wanted list in oregon. i feel like an idiot
[08:50:22] cerulean: anyone on the internet can tell you an alias, doesn't mean it's their name and you should go meet them and try to be their friend
[08:50:41] cerulean: ruby itself is like the marijuana of programming and i just assumed anyone who talked about it could be trusted. nah
[08:51:05] teddysmoker: Well, this kinda reminds me of Carl Herold.
[08:51:25] cerulean: i love ruby too, but i don't think i love it in the same way as dreamr o'kelly
[08:51:41] teddysmoker: He was a rather great programmer, and had his own subreddit where he would teach people programming for free.
[08:52:13] teddysmoker: About two years ago he was arrested for child pornography, among other things, and then later committed suicide in prison.
[08:52:22] cerulean: i knew he was a bandido because he was running around the entire west, colorado, california, mexico, and didnt see his kids or ex-wife ever
[08:52:47] teddysmoker: The thing is that you have no way of knowing the dark side of somebody.
[08:52:48] cerulean: you just can't trust people just for being smart and liking drugs or something
[08:53:24] cerulean: he was able to present himself as cool at first, but it decended into weirdness
[08:53:33] Andr3as: the devschool page is still online..
[08:53:36] Andr3as: interesting
[08:53:42] cerulean: he's a huge troll-o
[08:53:49] cerulean: he'll keep it on online for 20 years
[08:53:53] cerulean: to piss people off
[08:54:00] cerulean: think a gangster who knows ruby
[08:54:06] cerulean: i'd respect it but i know basic
[08:54:10] cerulean: im from visual basic at first
[08:54:14] cerulean: long time ago
[08:54:32] cerulean: that's like trying to respect a meth chemist for know chemistry
[08:54:48] cerulean: Andr3as: what's the link?
[08:54:58] Andr3as: https://devschool.rocks/
[08:55:38] Andr3as: he wants 8grand for some courses... could've been a "we teach you how to trade to get rich in 2months" kinda site as well..
[08:56:13] teddysmoker: Andr3as: haha, I was a bit stunned by the prices as well.
[08:56:15] cerulean: ugh rockstar methodology
[08:56:25] cerulean: he abused his reputation
[08:56:31] cerulean: actually, the scam is deeper
[08:56:36] cerulean: view the Inc article i posted
[08:56:50] cerulean: it goes up to Microsoft denying that people he said worked there actually worked there
[08:56:59] cerulean: the FTC is after him as well
[08:57:09] cerulean: i've seen him in real life on two occasions
[08:57:14] cerulean: in Denver and LA
[08:57:17] teddysmoker: "reputation". I never heard of him, and I am sure neither 90% of the Ruby community.
[08:57:53] cerulean: he helped set me up for a job at ZepSolar, an abusive company that fired me for not wanting to drive 60 miles across the Golden Gate Bridge every day and pay 14 dollars day. while he worked from mexico and did cocaine
[08:58:15] cerulean: i was only one who could supply the patches the company needed for a very close integration coming with china Internet Explorer stuff
[08:58:23] Andr3as: hence the "trading hint".. you just make it expensive and have a great site... people will come
[08:58:23] njero: am i on the wrong planet? :0
[08:58:25] cerulean: they were pissed when they had to fire me and questioned the engineer that made the decision
[08:58:39] cerulean: Andr3as: no he lied about job placements
[08:58:44] cerulean: basically a financial crime
[08:58:57] cerulean: he was smart enough to scam the tech community, i feel terrible for even knowng him
[08:59:14] cerulean: ive always wanted to impart the skill of programming and never seen a decent way. he just saw a scam
[08:59:16] Andr3as: that story is long, cerulean and i just woke up :p - need more coffee
[08:59:36] cerulean: story time coffe break
[08:59:38] Andr3as: you still in CA?
[09:00:05] Andr3as: you wake up at 2am?
[09:00:13] mikecmpbll: has joined #RubyOnRails
[09:00:25] Andr3as: poor cerulean... ;)
[09:00:38] User458764: has joined #RubyOnRails
[09:02:02] r3vDev: has joined #RubyOnRails
[09:04:26] cerulean: no I'm in Colorado
[09:04:36] cerulean: Dreamr was the one that convinced me to go to California
[09:05:22] cerulean: he set up a ... the old version of gofundme i guess. for me and people actually donated and i got a bus ticket there. just for knowing and wanting to learn i guess coding. it was $200 over all, the biggest donator was Chris... something .... Epstein from the Compass project. He donated 80 dollars.
[09:05:34] byteflame: has joined #RubyOnRails
[09:05:39] cerulean: overall I guess it was good but it was also dangerous as fuck, spensive, hard to find jobs, and haters
[09:05:47] cerulean: sorry about language
[09:06:15] teddysmoker: How can people be manipulated so easily? It amazes me.
[09:06:27] cerulean: i trusted ruby basically
[09:06:36] cerulean: idk why i would think it was free of trolls
[09:06:43] cerulean: when you come here from the rest of the internet
[09:06:46] cerulean: the difference is stark
[09:06:54] cerulean: i think dreamr knew how to exploit that kind of shit as well
[09:07:15] cerulean: whatever the case, california being cool or not cool, maybe it was both. he did physically threaten me at his house in denver
[09:07:25] cerulean: i wanna dig up the rateyourex reviews on him but the site seems well dead
[09:07:44] cerulean: he always seemed to be paired up with some low-confidence girl who did whatever he said. it weirded me out like F8CK
[09:07:59] cerulean: abusive in a low-key but obvious way i guess
[09:08:49] cerulean: it's real creepy how detailed technically his scam is. how much current technology he mentions. like a real jerk
[09:09:49] teddysmoker: I don't see it as being creepy. He had some great knowledge in programming but also scamming, so he used those in his advantages to scam beginners.
[09:10:09] teddysmoker: In a way, this is why you should always go to bootcamps that have a couple of years of experience and are not run by one or two guys.
[09:10:24] hahuang61: has joined #RubyOnRails
[09:11:04] teddysmoker: Even General Assembly has better prices than that dude.
[09:11:05] cerulean: yeah ... to be honest i have 0 faith in any boot camp ever
[09:11:16] cerulean: support the idea
[09:11:30] cerulean: i dont trust big dev schools, but dont think they are scams
[09:11:46] cerulean: i just think college curriculum about the subject needs to be updated faster
[09:11:55] cerulean: the accreditation process is there for a reason
[09:12:16] cerulean: he just knew ruby, javascript and html. he wasn't some rockstar
[09:13:13] arefaslani: has joined #RubyOnRails
[09:16:06] blackmesa: has joined #RubyOnRails
[09:17:23] ayonkhan: has joined #RubyOnRails
[09:19:21] handicraftsman: has joined #RubyOnRails
[09:19:32] patarr: has joined #RubyOnRails
[09:21:52] darutoko: has joined #RubyOnRails
[09:25:20] cerulean: well the good news is at the bottom of the article, another dev school gave them free tuition
[09:32:55] Pumukel: has joined #RubyOnRails
[09:35:26] ahrs: has joined #RubyOnRails
[09:39:27] patarr: has joined #RubyOnRails
[09:42:39] xall: has joined #RubyOnRails
[09:45:04] Pumukel: has joined #RubyOnRails
[09:54:15] tvw: has joined #RubyOnRails
[09:55:13] Pumukel: has joined #RubyOnRails
[09:56:33] cseder: has joined #RubyOnRails
[10:05:20] byteflame: has joined #RubyOnRails
[10:05:28] cerulean: this comment by him is stupid on reddit
[10:05:29] cerulean: "xslt... now I know you are trolling. you can keep your dirty xml love to yourself. I have json thank you :)"
[10:05:42] cerulean: doesn't he know xslt can do things there is no equivelent for in json
[10:08:20] DrYockel: has joined #RubyOnRails
[10:13:01] srinidhi: has joined #RubyOnRails
[10:13:29] DrYockel: has joined #RubyOnRails
[10:15:43] arup_r: has joined #RubyOnRails
[10:29:47] jenrzzz: has joined #RubyOnRails
[10:33:36] Saukk: has joined #RubyOnRails
[10:42:07] Olipro: has joined #RubyOnRails
[10:44:58] srinidhi: has joined #RubyOnRails
[10:47:20] arefaslani: has joined #RubyOnRails
[10:56:35] jgt1: has joined #RubyOnRails
[10:57:25] arefasla_: has joined #RubyOnRails
[10:59:13] AnoHito: has joined #RubyOnRails
[11:03:23] arefaslani: has joined #RubyOnRails
[11:05:37] arefasla_: has joined #RubyOnRails
[11:06:12] arefasla_: has joined #RubyOnRails
[11:12:49] hahuang61: has joined #RubyOnRails
[11:26:54] DrYockel: has joined #RubyOnRails
[11:30:15] peterppp: has joined #RubyOnRails
[11:41:04] ayonkhan_: has joined #RubyOnRails
[11:52:17] Fernando-Basso: has joined #RubyOnRails
[11:55:50] AnoHito: has joined #RubyOnRails
[11:58:22] jvanbaarsen: has joined #RubyOnRails
[11:58:26] mathzol: has joined #RubyOnRails
[11:59:25] jvanbaarsen: has left #RubyOnRails: ()
[12:01:21] jvanbaarsen: has joined #RubyOnRails
[12:08:31] xall: has joined #RubyOnRails
[12:09:29] rocco88: has joined #RubyOnRails
[12:10:36] DrYockel1: has joined #RubyOnRails
[12:16:25] DrYockel1: has joined #RubyOnRails
[12:18:35] blackmesa: has joined #RubyOnRails
[12:21:47] DrYockel: has joined #RubyOnRails
[12:34:57] Qchmqs: has joined #RubyOnRails
[12:36:10] blackmesa: has joined #RubyOnRails
[12:38:18] peterppp: has joined #RubyOnRails
[12:42:35] loechel: has joined #RubyOnRails
[12:44:03] figuresofstick: has joined #RubyOnRails
[12:45:31] jake541: has joined #RubyOnRails
[12:47:10] jake541: I have <%= link_to 'Delete this application', oauth_application_path(@application), method: :delete, data: { confirm: "Are you sure to delete #{@application.name}" } if @application.owner == current_user %> in my view. With this I want to delete @application and it's associated records. In my Application.rb I have set everything with: dependent: :destroy. But it does not delete the associated records with it, why is this?
[12:47:27] jake541: When I try to do it via the console it does delete everything with Application.last.destroy
[12:48:16] jhass: well how does the controller action look like?
[12:48:49] jhass: also keep in mind that the if in the view is not a security measure, the controller should check again whether the user is allowed to do that
[12:49:37] platoon23: has joined #RubyOnRails
[12:49:51] GodFather: has joined #RubyOnRails
[12:51:39] jake541: Thats true @jhass
[12:51:52] jake541: My controller just does this: def destroy @application.destroy redirect_to oauth_applications_path, notice: 'Succesfully deleted application' end
[12:52:05] jake541: I will add the security measure in there instead of the view.
[12:52:51] jhass: something like current_user.applications.where(application_id: params[:id]).destroy usually is enough
[12:53:40] jake541: I don't think I have to do that tho. I mean @application.destroy should be enough right
[12:53:56] jake541: @application holds all the associated records with it as well.
[12:53:57] jhass: it'd do the check
[12:54:41] jake541: If I do Application.last.destroy in the console, it works fine. It destroys the application with the corresponding associations
[12:55:26] jhass: well how do you set @application ?
[12:56:09] jake541: @application = Application.find(params[:id])
[12:57:15] HoierM: has joined #RubyOnRails
[12:58:21] jhass: I guess it should work, but try my way which already would only owners to delete the application
[12:59:15] jake541: Sure, but the problem is not that the owner can't delete the application tho
[12:59:26] jhass: otoh you might want to generally fetch it through current_user.applications since really nobody than the owner should see anything about it
[12:59:29] jake541: That works fine, it's just the associated records are not getting destroyed with @application.
[13:00:00] jhass: maybe outdated code? did you you fully restart the server?
[13:00:22] jake541: No outdated code, and I did try restarting :(
[13:01:31] jhass: mmh, I guess I'd try setting up foreign key constraints in the DB and see where they break
[13:01:39] jhass: it should work
[13:01:46] jake541: I'm going to try to puts the associated records in the destroy function to see if they are actually there before it get's deleted.
[13:02:27] pulkit4tech: has joined #RubyOnRails
[13:03:02] jake541: I get undefined method when trying to print the associated records!
[13:03:25] jhass: maybe Application is reserved after all :P
[13:03:32] jhass: try renaming the model?
[13:03:46] jake541: It's not reserved, I checked for that
[13:05:29] jake541: God, this is strange
[13:05:32] jhass: idk do you have more than working copy of your project? :P
[13:07:10] jhass: like you're running the console and editing one but run the server in another
[13:07:16] jhass: don't laugh, I've seen this happening ;)
[13:07:46] jake541: Hehe, I have a few copies but I'm working in the right directory. Would have been fun tho :P
[13:08:54] jake541: I think it has to do something with how I set @application. Because all my associated records are undefined in the destroy method
[13:09:19] jhass: srsly, try using another name
[13:09:39] jake541: Wauw, watch this.
[13:10:17] jake541: If I try printing the associated records in the edit function in my controller, it does print them. So it's just def destroy that's doing strange.
[13:11:06] jhass: I'd start with pushing a binding.pry in there and doing ls @application
[13:11:10] jake541: Oke, U wanna have a BIG laugh?
[13:11:35] jake541: before_action :find_application, only: [DESTROY issn't here]
[13:12:28] jake541: But don't you think it's weird that it did delete @application even without defining it?
[13:12:28] jhass: so what's @application then when you weren't getting any NoMethodError's for destroy already?
[13:12:30] aajjbb: has joined #RubyOnRails
[13:13:18] jake541: I was getting NoMethodError's for the associated records, not for Application itself.. strange
[13:13:18] pickle_: has joined #RubyOnRails
[13:13:23] jhass: it is, so maybe do binding.pry and then $ @application
[13:13:30] jhass: something's gotta define it
[13:13:37] hahuang61: has joined #RubyOnRails
[13:13:53] jhass: told you it's a bad name :P
[13:14:05] User458764: has joined #RubyOnRails
[13:14:24] jake541: Is it still a bad name if I created the Model in a subfolder?
[13:14:40] jhass: namespacing it can be valid yeah
[13:15:06] jhass: but usually only makes sense when you can group other stuff with it
[13:15:16] jhass: otherwise I tend to prefer a prefix in the name
[13:16:02] jhass: but yeah I mean it's a bad name already from the fact that you can't use ApplicationController for it
[13:16:16] jhass: oh wait, didn't rails 5 introduce something like that for models?
[13:17:13] jhass: ah, https://github.com/rails/rails/pull/22567 ApplicationRecord
[13:19:43] jake541: True about the part that I can't use ApplicationController for it, luckily I don't have to but still.
[13:20:50] jhass: I mean in theory you even could and use BaseController or whatever instead but it's just messing with conventions for no gain
[13:22:49] Olipro: has joined #RubyOnRails
[13:26:47] jake541: @jhass You also mentioned 'if @application.owner == current_user' in a view issn't best practise. I'm just using this condition to validate that the corresponding user is able to see the link_to. This can be in the view right
[13:28:32] superlou: has joined #RubyOnRails
[13:29:09] mikecmpbll: has joined #RubyOnRails
[13:29:20] romeoh: has joined #RubyOnRails
[13:29:34] arefaslani: has joined #RubyOnRails
[13:30:28] Pumukel: has joined #RubyOnRails
[13:30:58] treefrob: has joined #RubyOnRails
[13:32:09] loechel: has joined #RubyOnRails
[13:35:05] arefasla_: has joined #RubyOnRails
[13:41:17] roshanavand: has joined #RubyOnRails
[13:42:45] Travis-42: has joined #RubyOnRails
[13:44:58] GodFather_: has joined #RubyOnRails
[13:48:32] tens0r: has joined #RubyOnRails
[13:49:54] erlend: has joined #RubyOnRails
[13:54:47] User458764: has joined #RubyOnRails
[13:55:21] User458764: has joined #RubyOnRails
[14:01:10] jhass: jake___: however it would be even better if your query only returns applications the user can see
[14:01:20] jhass: that is just do @applications = current_user.applications
[14:02:32] jake541: I have that as well, it's just that the owner of the application is able to invite other users
[14:02:47] jake541: those users can do the same as the owner, just not delete it.
[14:05:02] jhass: I think I'd add an owned_by? to Application so you can do if owned_by? current_user just so it looks a bit nicer
[14:06:07] jake541: That does look a bit nicer and cleaner, I agree. But to add a custom attribute for that? Not sure..
[14:06:14] jhass: and then an assocation to user like owned_applications so you can do current_user.owned_applications.find(params[:id]).destroy or so
[14:07:05] jhass: well there's a technical advantage, once you decide an application can have multiple owners there's one place to update the check ;)
[14:07:38] jake541: Agree there
[14:07:55] jhass: also "custom attribute" is the wrong mindset here IMO, it's just a method
[14:08:07] am55: has joined #RubyOnRails
[14:08:31] jhass: like I wouldn't call stuff like .persisted? that Rails already adds a "custom attribute" ;)
[14:10:18] jake541: Yea maybe, I know I add a few of persisted methods, I agree that best practise is not to have to use these kinds of methods.
[14:10:40] jake541: Sort of gives me the feeling that the underlaying code could be more efficient.
[14:15:45] DLSteve: has joined #RubyOnRails
[14:21:39] mrgreenfur: has joined #RubyOnRails
[14:24:53] blackmesa: has joined #RubyOnRails
[14:31:10] arefaslani: has joined #RubyOnRails
[14:31:15] cam27: has joined #RubyOnRails
[14:31:50] srinidhi: has joined #RubyOnRails
[14:37:47] DrYockel: has joined #RubyOnRails
[14:41:25] asahi: has joined #RubyOnRails
[14:45:20] arefaslani: has joined #RubyOnRails
[14:46:19] tens0r: has joined #RubyOnRails
[14:46:23] meoblast001: has joined #RubyOnRails
[14:48:59] fmcgeough: has joined #RubyOnRails
[14:49:06] arefasla_: has joined #RubyOnRails
[14:50:31] fmcgeough: has joined #RubyOnRails
[14:59:10] srinidhi: has joined #RubyOnRails
[14:59:47] asahi: can someone tell me what the % sign does before a name in an scss file? for example, %thredded-button
[15:01:30] asahi: nevermind. I found that they're placeholder selectors
[15:02:54] rogue_koder: has joined #RubyOnRails
[15:04:24] am55: has joined #RubyOnRails
[15:07:29] Technodrome: has joined #RubyOnRails
[15:11:06] srinidhi1: has joined #RubyOnRails
[15:14:32] hahuang61: has joined #RubyOnRails
[15:17:31] Qchmqs: how to properly deploy rails to linode ?
[15:17:46] Qchmqs: capistrano and ssh ?
[15:29:10] cagmz: has joined #RubyOnRails
[15:34:10] asahi: that's what I use, yes assuming you want to develop on your local machine
[15:37:51] Pumukel: has joined #RubyOnRails
[15:47:30] netzfisch: has joined #RubyOnRails
[15:50:52] akshat: has joined #RubyOnRails
[15:50:59] sunya7a: how do i run a js.erb view file through coffeescript engine? when i try to rename to coffee.erb my controller doesn't render it during a js request
[15:55:18] sunya7a: i am looking for what coffeebeans does I think ... is this behavior built in now or is there an updated gem...coffeebeans seems stale
[15:56:56] patientj: has joined #RubyOnRails
[16:01:09] pLaToOn: has joined #RubyOnRails
[16:02:27] matthewd: sunya7a: I don't know of any [other] way to do that
[16:02:34] matthewd: .. and would recommend against it, tbh
[16:03:05] sunya7a: matthewd: against using coffeescript for the response? is it just preference or technical reason?
[16:03:11] matthewd: Running the CS compiler on every request would be pointlessly expensive
[16:03:41] sunya7a: matthewd: ahh...i assumed it would be cached or pre-compiled in production
[16:03:57] matthewd: Use ERB to build straight JS for the part that actually needs to be dynamic, then have that call a (CS) asset-defined function for the real work
[16:04:18] matthewd: It can't be; the point of the erb is that the CS changes each time
[16:04:39] sunya7a: u r right...ty
[16:07:40] mrgreenfur: has joined #RubyOnRails
[16:11:06] peterpp: has joined #RubyOnRails
[16:15:25] saymoo: has joined #RubyOnRails
[16:15:41] SteenJobs: has joined #RubyOnRails
[16:17:03] pwnd_nsfw`: has joined #RubyOnRails
[16:17:11] rogue_koder: has joined #RubyOnRails
[16:22:18] FoolsGambit: has joined #RubyOnRails
[16:22:40] jusa: has joined #RubyOnRails
[16:40:17] Pumukel: has joined #RubyOnRails
[16:52:15] blackmesa: has joined #RubyOnRails
[16:53:49] User458764: has joined #RubyOnRails
[16:53:52] Saukk: has joined #RubyOnRails
[17:05:25] jusa: has joined #RubyOnRails
[17:12:59] marcdel: has joined #RubyOnRails
[17:15:10] dretnx: has joined #RubyOnRails
[17:15:34] hahuang61: has joined #RubyOnRails
[17:20:49] xall: has joined #RubyOnRails
[17:30:48] bawsky: has joined #RubyOnRails
[17:37:01] alfie: has joined #RubyOnRails
[17:38:18] fernandomm: has joined #RubyOnRails
[17:40:15] Dysp: has joined #RubyOnRails
[17:43:37] Dysp: Hi guys. I was wondering something. Why is .try(:method) not default in views when trying to access content on a model? Is there any use where .try would break stuff?
[17:43:39] Pumukel: has joined #RubyOnRails
[17:44:28] Dysp: Oh, and by 'guys' I refer to all genders ;)
[17:45:15] matthewd: Dysp: Most of the time you should know whether something responds to a method before you call it. Too much #try will silently swallow errors due to you getting a different sort of object than you were expecting.
[17:45:50] Dysp: Oh, so when you basically don't wan't a nil, but an exception. I see. Thank you for replying.
[17:49:14] User458764: has joined #RubyOnRails
[17:58:44] NoGodDamnIdea: has joined #RubyOnRails
[18:01:06] djbkd: has joined #RubyOnRails
[18:03:45] Guest96: has joined #RubyOnRails
[18:06:00] Fernando-Basso: has joined #RubyOnRails
[18:10:18] mrgreenfur: has joined #RubyOnRails
[18:10:24] pwnd_nsfw: has joined #RubyOnRails
[18:13:12] teddysmoker: has joined #RubyOnRails
[18:19:52] arefaslani: has joined #RubyOnRails
[18:34:04] Technodrome: has joined #RubyOnRails
[18:35:26] mazeinmaze_: has joined #RubyOnRails
[18:47:08] Pumukel: has joined #RubyOnRails
[18:52:31] spicerack: has joined #RubyOnRails
[18:54:54] sagax: has joined #RubyOnRails
[18:55:45] blackmesa: has joined #RubyOnRails
[19:05:06] defsdoor: has joined #RubyOnRails
[19:05:38] gusrub: has joined #RubyOnRails
[19:12:48] dionysus69: has joined #RubyOnRails
[19:12:56] mrgreenfur: has joined #RubyOnRails
[19:16:24] hahuang61: has joined #RubyOnRails
[19:21:22] peterpp: when building an api, does it make sense to consequently only accept and return dates/times in utc?
[19:24:51] Mia: has joined #RubyOnRails
[19:24:51] Mia: has joined #RubyOnRails
[19:28:40] arefaslani: has joined #RubyOnRails
[19:36:03] jusa: has joined #RubyOnRails
[19:40:15] greengriminal: has joined #RubyOnRails
[19:42:57] futilegames: has joined #RubyOnRails
[19:46:12] blackmesa: has joined #RubyOnRails
[19:48:55] Limix: has joined #RubyOnRails
[19:52:23] Guest96_: has joined #RubyOnRails
[19:58:35] NoGodDamnIdea: has joined #RubyOnRails
[19:58:52] pupsicle: has joined #RubyOnRails
[20:08:53] platoon23: has joined #RubyOnRails
[20:12:57] dionysus69: has joined #RubyOnRails
[20:21:58] ahrs: has joined #RubyOnRails
[20:29:12] Limix: has joined #RubyOnRails
[20:33:57] nacho_: has joined #RubyOnRails
[20:34:22] nacho_: Anybody eager to talk about sidekiq and rails 4.2?
[20:37:00] nacho_: has left #RubyOnRails: ()
[20:37:15] nacho_: has joined #RubyOnRails
[20:39:49] hfp_work: has joined #RubyOnRails
[20:50:27] Pumukel: has joined #RubyOnRails
[20:54:38] SteenJobs: has joined #RubyOnRails
[21:06:04] tvw: has joined #RubyOnRails
[21:15:58] FastJack_: has joined #RubyOnRails
[21:17:15] hahuang61: has joined #RubyOnRails
[21:18:29] rogue_koder: has joined #RubyOnRails
[21:19:11] pwnd_nsfw: has joined #RubyOnRails
[21:19:26] dionysus69: has joined #RubyOnRails
[21:20:30] _djbkd: has joined #RubyOnRails
[21:38:20] cseder: has joined #RubyOnRails
[21:39:49] tens0r: has joined #RubyOnRails
[21:49:27] sunya7a: i have a question regarding building a where query. I would like to pass both the column name and the value. I found this http://stackoverflow.com/questions/39734301/safely-pass-a-dynamic-column-name-into-an-activerecord-query-with-a-postgres-cas
[21:49:53] sunya7a: I'm wondering if there is a better solution and if the proposed one is good and safe to use
[21:54:25] Pumukel: has joined #RubyOnRails
[21:57:53] workmad3: has joined #RubyOnRails
[22:21:01] wopi: has joined #RubyOnRails
[22:21:52] FatMoose_: has joined #RubyOnRails
[22:30:22] FatMoose_: has left #RubyOnRails: ()
[22:30:25] FatMoose_: has joined #RubyOnRails
[22:32:31] FatMoose_: i'm having an issue with bundler, i'm trying to follow the steps for installing a rails app with passenger, but whenever i try to do anything with bundler i get this error
[22:32:47] FatMoose_: Your bundle only supports platforms ["x64-mingw32"] but your local platforms are ["ruby", "x86_64-linux"], and there's no compatible match between
[22:32:47] FatMoose_: those two lists.
[22:33:09] FatMoose_: if i remove the lock file i get the same error but ["x64-mingw32"] changes to []
[22:33:33] FatMoose_: i can't seem to find anybody else with this issue with google
[22:44:09] FatMoose_: ah, apparently you have to kill Gemfile.lock and clone your repo without it present
[22:44:12] FatMoose_: and then do bundle install
[22:44:59] tvw: has joined #RubyOnRails
[23:06:08] DoctorMonocular: has joined #RubyOnRails
[23:07:56] rickjames: has joined #RubyOnRails
[23:08:20] Technodrome: has joined #RubyOnRails
[23:09:03] rickjames: Anybody have any experience with the gem Mechanize?
[23:12:08] treefrob: has joined #RubyOnRails
[23:12:57] rickjames: anybody here?
[23:15:05] FCser: has joined #RubyOnRails
[23:18:17] hahuang61: has joined #RubyOnRails
[23:18:56] treefrob: has joined #RubyOnRails
[23:29:06] SteenJobs: has joined #RubyOnRails
[23:33:17] Gradox: has joined #RubyOnRails
[23:35:05] b3l914n: I'm here but alas I've just started my RoR journey, so I don't think I'll be of much help to you
[23:36:57] jgt1: has joined #RubyOnRails
[23:48:51] Technodrome: has joined #RubyOnRails