andhof-mt

Activity Graph

Page 1 of 3 | Next »

2016-05-12

[00:09:22] andhof-mt: has joined #RubyOnRails
[00:09:40] andhof-mt: Hey Radar, I just got removed from rubysherpas
[00:10:13] andhof-mt: Radar, yeah about the private repo. Whats going on?
[00:10:51] andhof-mt: So what do we do now for ruby sherpas?
[00:11:23] andhof-mt: so rails 4 in action will be private the rest will be public?
[00:11:40] andhof-mt: can't access it :/
[00:12:42] andhof-mt: :/ oh github
[00:15:03] andhof-mt: I can access it now. That's super shitty.
[00:15:06] andhof-mt: Is gitlab an option?
[00:15:38] andhof-mt: Good point radar.
[00:18:06] andhof-mt: @Radar, no type of user log on github?
[00:25:07] andhof-mt: Quit: Page closed

2016-04-24

[17:29:14] andhof-mt: has joined #RubyOnRails
[17:29:23] andhof-mt: Hey guys I have a BIG problem I was wondering if someone could help
[17:29:34] andhof-mt: I am working on a project, and I have a table called "heroes"
[17:29:49] andhof-mt: but I can't access it in anyway, e.x. Hero.all - because rails doesn't seem to understand what the singular of heroes is
[17:36:42] andhof-mt: Quit: http://www.kiwiirc.com/ - A hand crafted IRC client

2015-10-25

[03:48:40] andhof-mt: has joined #RubyOnRails
[03:49:17] andhof-mt: If I already have defined @tutorial = Tutorial.all in my controller, is there anyway to get the second tutorial? I tried @tutorial[2] but didn't work
[03:53:00] andhof-mt: yeah I tried that too, found the issue tho
[03:53:11] andhof-mt: Tutorial.all returns some type of object, so I had to @tutorial.find(2)
[03:54:57] andhof-mt: arup_r, I fixed it. Tutorial.all returns an object not a array so it wasn't working using variable_name[position] notation.
[03:57:15] andhof-mt: hmm that's weird. I'll give it another shot.
[07:28:01] andhof-mt: Quit: http://www.kiwiirc.com/ - A hand crafted IRC client

2015-10-24

[00:57:11] andhof-mt: Quit: http://www.kiwiirc.com/ - A hand crafted IRC client

2015-10-23

[22:28:46] andhof-mt: has joined #RubyOnRails
[22:28:56] andhof-mt: Hey I have a organization question
[22:29:09] andhof-mt: if I have a website with URL : website.com/courses/1
[22:29:22] andhof-mt: and I want to split courses into multiple parts, should it be: website.com/courses/1/lessons/2
[22:29:41] andhof-mt: or website.com/courses/1/2 or something totally different
[22:31:18] andhof-mt: hmm just trying to figure out what looks most proffesional. relaunching this site that is pretty big
[22:33:47] andhof-mt: smathy, so you would go with /courses/1/2
[22:37:28] andhof-mt: i dont care about rest ful just how good looking
[22:37:38] andhof-mt: cogsbox, you are good to go
[22:37:45] andhof-mt: rake db:migrate updates schema, not wipe db
[22:37:50] andhof-mt: unless you drop columns
[22:38:26] andhof-mt: cogsbox, if you did add_column command you are g2g. if you did drop_column you are not g2g.
[22:48:59] andhof-mt: how many of you are actually rails developers for work?
[22:49:44] andhof-mt: I've been trying to find a rails job in Seattle, but most companies here are java or c#. Any good RoR specific job sites?
[22:54:00] andhof-mt: wwr, github?
[23:31:45] andhof-mt: django has worse documentaiton
[23:39:04] andhof-mt: Rails has a much bigger community and better gems tho
[23:39:34] andhof-mt: Also, rails has #rubyonrails on freenode
[23:39:39] andhof-mt: check out #django and get back to us
[23:52:29] andhof-mt: #define 1 = 0

2015-07-06

[00:53:56] andhof-mt: Ping timeout: 256 seconds
[02:52:21] andhof-mt: has joined #RubyOnRails
[02:53:04] andhof-mt: I made a helper function called parse_url which takes a url param. It's in my pages controller. I'm modifying a view inside the pages controller. How can I call parse_url from my view in ERB?
[02:53:15] andhof-mt: first attempt was <%= parse_youtube(@Lesson.video) %> which didn't work
[02:55:59] andhof-mt: sevenseacat, the helper method docs fixed it. Thank you
[05:50:27] andhof-mt: Ping timeout: 256 seconds

2015-07-05

[22:17:34] andhof-mt: has joined #RubyOnRails
[22:18:14] andhof-mt: hey, so I have a model named lesson and a model named tutorial
[22:18:18] andhof-mt: lesson belongs to a tutorial
[22:18:24] andhof-mt: how do i find a tutorial's lessons?
[22:35:12] andhof-mt: if I have a Tutorial, and that Tutorial has four lessons. I can ask for Tutorial.lessons. But how do I find the order of those tutorials or ask for only one at a time?

2015-06-30

[16:18:23] andhof-mt: has joined #RubyOnRails
[16:18:42] andhof-mt: It's been a while, how's the channel been?
[16:22:54] andhof-mt: So my app basically is a video viewing site for fan made views for a certain genre
[16:23:03] andhof-mt: I have several videos, 3-5 per letter
[16:23:46] andhof-mt: I have sorting "playlists" A,B,C,D,E... etc. Should I do that or do A-E, F-J, etc?
[16:40:35] andhof-mt: Quit: http://www.kiwiirc.com/ - A hand crafted IRC client

2015-06-06

[19:27:38] andhof-mt: has joined #RubyOnRails
[21:32:24] andhof-mt: Quit: Connection closed for inactivity

2015-05-29

[17:21:48] andhof-mt: has joined #RubyOnRails
[17:22:31] andhof-mt: Guys, I'm trying to increment a number in my model based on the highest number assigned previously
[17:22:37] andhof-mt: it's not working!
[17:22:38] andhof-mt: https://gist.github.com/andhof-mt/6665540abc835dc8c924
[17:22:59] andhof-mt: basically, each "tutorial" has many lessons. I want to number the lessons per tutorial. Would love help!
[17:24:05] andhof-mt: rhizome, sadly yes. Because it effects position of how they load
[17:24:19] andhof-mt: e.x. tutorial: Ruby on Rails -> ep1 -> ep2 -> ep3
[17:26:04] andhof-mt: could you explain that?
[17:26:33] andhof-mt: My migration was this basically: add_column :lessons, :number, :integer, :null => false, :default => 1
[17:26:38] andhof-mt: validating uniqueness with scope
[17:35:12] andhof-mt: rhizome, lessons does belong_to Tutorial and Tutorial has_many lessons
[17:35:25] andhof-mt: can't seem to find an example for it though
[17:47:02] andhof-mt: Ping timeout: 244 seconds
[20:01:20] andhof-mt: has joined #RubyOnRails
[20:01:27] andhof-mt: guys I am literally going nuts
[20:01:44] andhof-mt: for what reason could I not compare params[:id] in my create method to an integer
[20:02:27] andhof-mt: no error, just broken site
[20:02:58] andhof-mt: https://gist.github.com/andhof-mt/fe945ca8fe6ca6fae6b5
[20:03:13] andhof-mt: its such a simple algorithm, it breaks on this line
[20:03:18] andhof-mt: if lesson_params[:tutorial_id] == 1
[20:03:21] andhof-mt: is where it fails
[20:06:26] andhof-mt: so rails was TELLING me it was an int but wasn't comparing unless it had explicit cast
[20:06:28] andhof-mt: how does that work
[20:09:13] andhof-mt: bmuholland asset pipeline is on rails docs
[20:09:25] andhof-mt: it is confusing tho, some may recommend using the public folder instead
[20:09:28] andhof-mt: although its a 'bad practice'
[20:11:33] andhof-mt: can you reference it in application.js?
[20:14:40] andhof-mt: Yeah, asset pipeline has it's problems.
[20:14:48] andhof-mt: One of the worst implemented rails features IMO
[20:15:59] andhof-mt: bmuholland, check this out: http://webpack.github.io/
[20:16:08] andhof-mt: its an alternative to the asset pipeline on sprockets.
[20:16:10] andhof-mt: may or may not help
[20:20:05] andhof-mt: bmuholland, every line of code I have written this week has been a big fix for small problems
[22:09:25] andhof-mt: Ping timeout: 255 seconds

2015-05-22

[17:22:31] andhof-mt: has joined #RubyOnRails
[17:22:47] andhof-mt: Hey, I'm trying to grab a user's user object via his username rather than id. Any ideas how to do this?
[17:23:26] andhof-mt: on devise btw.
[17:33:10] andhof-mt: yeah I added a param for find_by_username
[17:36:21] andhof-mt: My User model in devise has both email and admin fields. (admin is a boolean). If I find the user via user1 = User.find_by_username(xxx) I can do user1.email and it works fine
[17:36:27] andhof-mt: buy user1.boolean returns nothing
[17:36:39] andhof-mt: sorry, user1.admin returns nothing. returns error
[17:37:48] andhof-mt: DoctorMonocular, in the database it shows correctly. And in console it works. In console I can do user.admin not in app tho
[17:39:08] andhof-mt: undefined method `admin for #<User:0x007f649170bb90>
[17:39:41] andhof-mt: Is Admin: <%= @current_profile.admin %>
[17:39:41] andhof-mt: Yeah its weird to me too, esp. cuz this is super basic usually. my whole code is 1 line
[17:40:57] andhof-mt: It's just two lines.
[17:41:00] andhof-mt: Controller: @current_profile = User.find_by_username(params[:id])
[17:41:16] andhof-mt: View: Is Admin: <%= @current_profile.admin %>
[17:41:34] andhof-mt: according to console, yes.
[17:45:24] andhof-mt: Reloaded the server a third time and now it works... Is it possible that would get cached somehow?
[17:59:42] andhof-mt: If I have three tables: Topics, Tutorials, Episodes
[18:00:04] andhof-mt: Is there anyway for me to create a relationship accross tables? So a topic HAS A tutorial which HAS A episode?
[18:04:12] andhof-mt: waseem, from a software engineering standpoint. If I had three tables, topic -> subtopic -> tutorial -> episodes would it be optimal to built episodes first or topic first?
[18:05:19] andhof-mt: each topic can have many subtopics, each subtopic can have many tutorials, each tutorial can have many episodes
[18:07:26] andhof-mt: waseem, no, all episodes belong to a tutorial which belongs to a subtopic which belongs to a topic
[18:08:01] andhof-mt: alright, I'll give it a shot.
[18:20:31] andhof-mt: what does index:true mean on a migration?
[18:20:42] andhof-mt: t.belongs_to :customer, index:true it's not described in the docs
[18:24:45] andhof-mt: anyone know what index:true refers to on migrations with relations?
[18:29:25] andhof-mt: any benefit to it, catcher?
[18:32:14] andhof-mt: Ah, gotcha.
[18:32:57] andhof-mt: One final question catcher, if I make my "tutorials" belong to both a user and a "subtopic" is there anyhting I should watch out for?
[18:38:45] andhof-mt: catcher, could you do me a hugggeee favor and check this out before I run it: https://gist.github.com/andhof-mt/1ee1a6be990cc2a373c9 so I don't break anything stupid?
[18:39:02] andhof-mt: We can be besties if you do!
[18:41:06] andhof-mt: Ah, gotcha. Ryann Biggs is usually on here alot hes who i've gone to for help
[18:43:54] andhof-mt: catcher, if I set up my topic as just: topic = name, desc. subtopic = belongs_to topic, name, text do I need to add "has_many" to topic or is that a given?
[18:48:31] andhof-mt: cnk, https://gist.github.com/andhof-mt/82a517a61a62f58d3ed8
[18:48:59] andhof-mt: ah, that's good to know.
[18:50:40] andhof-mt: basically , I want users to be able to navigate like this
[18:50:49] andhof-mt: topic -> subtopic -> tutorial -> lesson
[18:50:57] andhof-mt: or vise versa
[18:52:40] andhof-mt: does that give increased performance?
[18:53:16] andhof-mt: that's awesome!
[18:55:33] andhof-mt: cnk, does this look better: https://gist.github.com/andhof-mt/82a517a61a62f58d3ed8
[18:56:56] andhof-mt: how would I do has_many otherwise?
[18:57:43] andhof-mt: oh that makes sense, sounds much more flexible
[18:58:30] andhof-mt: cnk, I read that but it showed me this picture: http://guides.rubyonrails.org/images/has_many.png that's why I did it
[18:59:38] andhof-mt: yeah just noticed
[19:01:06] andhof-mt: two ways I think a lesson could work: 1) a lesson is part of a "tutorial", 2) a lesson is standalone
[19:01:11] andhof-mt: not sure how to handle that
[19:01:32] andhof-mt: don't think a lesson and tutorial could have different authors
[19:02:33] andhof-mt: How would I handle the standalone edge case, where an author on my site uploads a "lesson" but does not put it in a tutorial?
[19:04:01] andhof-mt: skyjumper, I'm building a website to go along with my coding tutorials. https://gist.github.com/andhof-mt/82a517a61a62f58d3ed8
[19:04:40] andhof-mt: I have a really popular set of Arduino and GameDev / General coding tuts... previously hosted on wordpresss. 2 million visiters or so per year
[19:06:47] andhof-mt: I have been hoping to build a business off of my tutorials
[19:07:13] andhof-mt: My best month is $700 on adsense, average was $250 til december. Migrating to a rails app would give me alot more flexibility in how I tech
[19:07:38] andhof-mt: That's the easy part.
[19:24:03] andhof-mt: Is there anyway to make rails generate my models and controllers with my migration?
[19:24:21] andhof-mt: So create_table :tutorials -> tutorials.rb and tutorials_controller.rb
[19:26:41] andhof-mt: ah, gotcha. I'll rollback and do that. good idea
[19:28:35] andhof-mt: Should I rails g scaffold or just rails g model?
[19:28:39] andhof-mt: What's a better practice
[20:10:47] andhof-mt: so I created both a "Topic" and a "Tutorial". My "Topic" has many "Tutorials", my "Tutorial" belongs to a topic
[20:11:10] andhof-mt: in the console I created a Topic named "Test Topic" and a tutorial "Test Tutorial" how do I relate the two
[20:12:35] andhof-mt: CheckYourSix, they are in the models. I want to test in the console by making "Test Topic" have_a "Test Tutorial"
[21:09:04] andhof-mt: Remote host closed the connection

2015-03-15

[00:16:07] andhof-mt: Hey guys, sorry I've been gone so long
[00:16:11] andhof-mt: been working on a big project

2015-02-26

[17:00:52] andhof-mt: hey guys I started a programming channel focused on Rails development. Could anyone give me some feedback: https://www.youtube.com/user/devfactor

2015-02-24

[16:54:13] andhof-mt: hey, so I have a User model and a post model
[16:54:26] andhof-mt: user has an integer attached :score, how can I increment it when they make a new post?
[16:54:43] andhof-mt: no error tho :(
[16:55:20] andhof-mt: how do I increment an int column on a user through a controller basically
[16:56:00] andhof-mt: its literally just an int that starts at 0 and I want to increment it whenever someone makes a post
[16:56:14] andhof-mt: yes its postcount
[16:57:08] andhof-mt: Awe well thanks :) How did you run into em?
[16:58:05] andhof-mt: I'm trying to get more subscribers, so feel free to share them. I've been doing 1 or so per day

2015-02-18

[04:12:18] andhof-mt: Anyone know how to get a hold of Ryan from RailsCasts?
[04:13:30] andhof-mt: j_mcnally, hes still alive right?
[04:18:45] andhof-mt: rake assets:precompile?

2015-02-17

[02:29:29] andhof-mt: you guys know any good channels for design?
[02:30:59] andhof-mt: dopie, I was thinking more along the lines of web design
[02:31:04] andhof-mt: good UX and colors and such
[02:37:37] andhof-mt: dopie, do you consider yourself good with ux?
[02:41:16] andhof-mt: IMO Radar for Rails 5 In action just sell it on KDP or LeanPub
[02:43:17] andhof-mt: Thats true.
[02:44:49] andhof-mt: Radar, DHH says mobile will be big with Rails 5 and I'd like to see some books using Rails 5 to build Hybrid apps
[02:57:47] andhof-mt: does DHH ever come in this channel?
[02:59:39] andhof-mt: Probably too busy driving racecars to hang with us petty folk
[03:02:09] andhof-mt: well DHH is some type of super millionaire now
[03:02:24] andhof-mt: has all these $xxx,xxx,xxx cars he posts pics of on twitter
[03:06:30] andhof-mt: odigity, rails, 37signals, 4 bestselling books?
[03:07:35] andhof-mt: http://www.carbuzz.com/news/2014/10/7/One-of-a-Kind-Koenigsegg-Agera-HH-Spotted-7722999/
[03:07:52] andhof-mt: I don't know where he makes most of the money, not from rails I'm sure
[03:10:08] andhof-mt: DHH just tweeted to me on twitter!
[03:11:15] andhof-mt: welp, my life is a success now.
[03:14:39] andhof-mt: Nah, just Darth Radar
[03:35:47] andhof-mt: whats the best rails gem for gravatars?
[03:48:56] andhof-mt: I like alchohol mixed with caffiene
[03:51:37] andhof-mt: I don't see why you would ban alcohol with caffeine in it. Instead, everyone will just buy their alcohol and caffeine separately and mix them.
[03:54:34] andhof-mt: what qualifies you as a core contributor?
[03:57:27] andhof-mt: gaming is counter-productive!
[04:00:48] andhof-mt: Yeah, thats why I switched to Linux. I actually code much faster with the terminal at my fingertips
[04:55:24] andhof-mt: is there anyway to make a loop that is along the lines of "every 30 seconds... do"
[05:16:44] andhof-mt: so i have an api which generates quotes ... example.com/resources/random
[05:16:53] andhof-mt: how can I (inside of my controller) call that and get it as plain text
[05:18:50] andhof-mt: or html or whatever
[05:18:52] andhof-mt: just a quote
[05:24:12] andhof-mt: is there anyway I can just store the result of the api as text in te controller such as: myText = (myurl).getText
[05:25:49] andhof-mt: https://twitter.com/andhofmt
[05:25:52] andhof-mt: I think I did something wrong
[05:59:49] andhof-mt: welp, I have a twitter quote generating bot now.
[05:59:54] andhof-mt: Should I deploy on my main account, or a for fun account
[06:05:17] andhof-mt: omniauth and twitter gem
[06:24:00] andhof-mt: lol dopie is this your IRC?
[06:35:04] andhof-mt: okay guys, I finished my twitter bot: https://twitter.com/RoboMotivator
[06:35:51] andhof-mt: just need to work on the quality of quotes he is scaping, and auto mate the posts on a time frame
[06:47:47] andhof-mt: sivsuhruth, yes I am. I'm going on my 5th year of comp sci at UW
[06:48:10] andhof-mt: well, 4 years and 2/3 quarters. close to year 5.
[06:49:00] andhof-mt: no, but I would like to. Me and some friends took first place at the last google sponsored hackathon here
[06:49:37] andhof-mt: have you done it?
[06:49:54] andhof-mt: mentor or student?
[06:51:05] andhof-mt: why so feirce?
[06:51:36] andhof-mt: can you apply as a student yet?
[06:53:37] andhof-mt: may look into it, thanks :)
[06:53:51] andhof-mt: gotta run, its 11:00 and work tomorrow
[06:54:06] andhof-mt: I'm on here daily hit me up if u want sivsush

2015-02-15

[21:50:51] andhof-mt: -> devise, -> auto_html, -> rails_12factor
[21:52:46] andhof-mt: sivsushruth, closer to what I was looking for.
[21:53:49] andhof-mt: also, does it really matter what server I use for deploying on heroku?
[21:54:00] andhof-mt: all of my apps so far have used webrick, except one on unicron
[21:55:50] andhof-mt: gotcha, so its single threaded than?
[21:56:09] andhof-mt: I'll look into other solutions than.