« Back to channel list

#RubyOnRails - 04 September 2015

« Back 1 day Forward 1 day »
[00:00:04] benybuds: run bundle install stalls, then I have an error: Make sure that `gem install json -v '1.8.3'` succeeds before bundling.
[00:00:06] ariedler: has joined #RubyOnRails
[00:00:15] nya: has joined #RubyOnRails
[00:00:16] benybuds: so I type: gem install json -v '1.8.3
[00:00:22] ariedler: has joined #RubyOnRails
[00:00:45] Radar: benybuds: !gist what happens after that
[00:00:45] helpa: benybuds: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[00:00:49] Radar: I'm guessing it's kind of long.
[00:01:17] chipotle: i'm gonna pass out, sorry for being a problem
[00:01:20] Radar: I'm headed off to the doctors myself now to fix this finger of mine. Have fun all :)
[00:01:24] Radar: chipotle: You're not being a problem at all.
[00:01:48] benybuds: http://codebin.org/view/938d5210
[00:01:50] chipotle: i understand if you want to ban me. i probably won't be a good rubyist anyway
[00:01:56] chipotle: have a good day
[00:02:23] benybuds: Radar: http://codebin.org/view/938d5210
[00:02:27] Lyhue: has joined #RubyOnRails
[00:02:29] ariedler: has joined #RubyOnRails
[00:02:34] benybuds: have a good day.
[00:03:20] pwnd_nsfw: benybuds, have you googled anything yet?
[00:03:24] simkessy: has joined #RubyOnRails
[00:03:31] pwnd_nsfw: for the sake of sending you links you've seen already
[00:03:48] benybuds: Not for my version.
[00:03:53] pwnd_nsfw: http://stackoverflow.com/questions/20688671/failed-to-build-gem-native-extension-on-windows-7-the-system-cannot-find-the
[00:04:14] ChanServ: +o baweaver
[00:04:34] LambdaSource: has joined #RubyOnRails
[00:04:35] benybuds: I'm on ruby 1.9.3p484
[00:04:36] shinnya: has joined #RubyOnRails
[00:05:00] simkessy: Hey, anyone know how to get geolocation within a model method?
[00:05:15] ChanServ: -o baweaver
[00:05:18] craysiii: is there a reason you chose 1.9.3 instead of 2.x+?
[00:05:22] simkessy: I have geocoder installed and I'm trying request.location but it's not working
[00:05:39] benybuds: I just want to completely uninstall and re-install ruby and ror.
[00:05:59] Maletor: has joined #RubyOnRails
[00:06:04] craysiii: though i would suggest setting up a virtual machine and using a flavor of linux for ruby dev.
[00:06:44] robbyoconnor: has joined #RubyOnRails
[00:08:24] benybuds: I just want to make sure I have the correct walk-through for installing ROR: rarinstaller.org or rubyonrails.org/ (windows installer)
[00:09:07] smathy: benybuds, basically none of the experts here use Windows. I tell you this both to explain why no one's able to help you and as maybe a hint to use something other than Windows.
[00:09:29] baweaver: used to, won't again
[00:09:40] baweaver: didn't have a choice back then though.
[00:09:41] benybuds: oh, I seriously doubt that. usage statistics in the tech industry reveal that the majority of users are on Windows, even though linux is far better and convenient to install.
[00:09:58] craysiii: a majority of users are not majority of devs
[00:09:59] baweaver: look into those for Rails.
[00:09:59] benybuds: it's possible, though (even with 577 users here).
[00:10:21] smathy: benybuds, trust me, I know.
[00:10:22] benybuds: i'm talking about developers. Although all developers aren't rails developers, true.
[00:10:36] ducklobster: has joined #RubyOnRails
[00:10:39] simkessy: I'm on windows and use Vagrant it's the simplest way
[00:10:43] rhizome: i'm sure the majority of the tech industry either codes in java/c++ or only ever uses a browser
[00:10:48] smathy: benybuds, maybe you missed me say "here".
[00:10:54] smathy: As in, in this channel.
[00:11:01] baweaver: Most Rails devs tend to be on OSX with some smatterings of Linux about.
[00:11:01] smathy: (but also generally in the Rails community).
[00:11:05] benybuds: just looking for install hlp. It's # not ##, so I assume it's official.
[00:11:07] rhizome: php is also fairly windows-friendly as far as i remember
[00:11:13] benybuds: somebody's probably tried windows. ;p
[00:11:23] baweaver: benybuds: I have
[00:11:25] baweaver: never again
[00:11:25] craysiii: many people have TRIED, and many people have switched over.
[00:11:28] smathy: benybuds, yes, and they gave up and changed.
[00:11:29] rhizome: rails devs aren't anywhere near a majority of the tech industry :)
[00:11:29] craysiii: key word is try.
[00:11:56] benybuds: Probably dual-boot into ubuntu and run ROR there, but no guarantee. I'm not a full admin here.
[00:11:58] cnk: The last time I taught a RailsBridge, the windows installs were actually the easy ones
[00:12:01] x-light: benybuds: I dropped my windows install after 4 days went to ubuntu, never looked back.
[00:12:06] michael_mbp: has joined #RubyOnRails
[00:12:08] craysiii: why not virtual machine?
[00:12:11] baweaver: Vagrant / VM
[00:12:19] benybuds: okay guys. True linux way so old. Just looking at official docs
[00:12:24] cnk: the installer just worked - unlike all the ancient Macs people dragged in with no Xcode / gcc
[00:12:27] Grundell: has joined #RubyOnRails
[00:12:48] baweaver: true linux is old?
[00:12:55] craysiii: http://guides.railsgirls.com/install/ these worked fine for me on linux.
[00:12:59] cnk: I don't think it is a recipe for long term happiness, but getting started on Windows should be OK
[00:12:59] smathy: cnk, installing Rails itself is not the difficult part of developing on Windows.
[00:13:17] cnk: the minute you want some other library.... ugly
[00:13:17] baweaver: smathy: can't say I agree
[00:13:25] smathy: cnk, if you recommend it, then you volunteer to help him.
[00:13:31] baweaver: devkit isn't fun, and the js runtime is nasty
[00:14:13] baweaver: even installing rails is not fun on Windows, I remember.
[00:14:16] duncannz: has joined #RubyOnRails
[00:14:28] smathy: baweaver, nothing compared to installing v8, pg, and you may as well shoot yourself if you want image processing.
[00:14:51] Radar: benybuds: If you can, I'd really recommend dual booting into Ubuntu. Ruby dev is just much easier there.
[00:14:55] baweaver: Ah ImageMagick
[00:15:00] Radar: (Yes, I said I was going to the doctors. I need to wait first ;)
[00:15:06] craysiii: yes imagemagick, good luck lol
[00:15:14] baweaver: unclosed paren Radar, tsk tsk
[00:15:19] Radar: baweaver: or was it?
[00:15:25] smathy: baweaver, your sentiment is right though, it's a shit-fight from start to finish.
[00:15:36] michael_mbp: has joined #RubyOnRails
[00:16:11] Radar: I wish it wasn't the case on Windows. Maybe Windows 10 will be better?
[00:16:26] smathy: I'd just do a VM over dual booting. Vagrant or Docker are very simple.
[00:16:47] fgo: has joined #RubyOnRails
[00:17:49] maz-dev: has joined #RubyOnRails
[00:19:29] rhizome: windows will remain a pain in some way until it ships with a compiler that can be tooled against
[00:19:48] RegulationD: has joined #RubyOnRails
[00:21:23] smathy: Even then it would still be a pain for any project whose primary (production) target is GNU.
[00:22:38] EvilEpoch: has joined #RubyOnRails
[00:22:47] LambdaSource: has joined #RubyOnRails
[00:23:04] bruno-: has joined #RubyOnRails
[00:23:50] paulcsmith: has joined #RubyOnRails
[00:24:41] Ropeney: has joined #RubyOnRails
[00:25:04] theery: has joined #RubyOnRails
[00:25:41] theery: has joined #RubyOnRails
[00:26:15] tvw: has joined #RubyOnRails
[00:29:23] ledestin: has joined #RubyOnRails
[00:31:47] Axilla: has joined #RubyOnRails
[00:33:29] pwnd_nsfw: Having issues with imagemagick, I basically just went and used cloudinary.
[00:33:48] pwnd_nsfw: Great alternative to paperclip because you don't need s3.
[00:33:59] pwnd_nsfw: And all of the image transformations happen in THE CLOUDDDDDDDDD
[00:34:10] pwnd_nsfw: So, lets up on the server in that respect as well
[00:35:37] baweaver: has joined #RubyOnRails
[00:36:24] smathy: pwnd_nsfw, yeah, nice solution.
[00:37:56] pwnd_nsfw: Wayyyy less time to setup. Don't have to install anything except the gem, get your api key, couple lines of code, BAM
[00:38:03] pwnd_nsfw: Works nicely with activeadmin too
[00:38:03] Axilla: how do I test for validation errors in my controller in rspec?
[00:38:23] Axilla: first time using spec to test >< not a fan.
[00:38:27] sdwrage: has joined #RubyOnRails
[00:39:19] Axilla: doesn't tell me
[00:39:22] Axilla: shit douche
[00:39:25] pwnd_nsfw: axilla, or check that model.errors
[00:39:38] Axilla: i wouldn't have asked here if i wanted google search
[00:39:40] Axilla: i'm not mad.
[00:39:48] pwnd_nsfw: Sure, whatever
[00:39:50] Axilla: i've checked google wasn't finding what i needed.
[00:39:58] pwnd_nsfw: Ok, well I just told you the damn answer, get over yourself
[00:40:03] northfurr: has joined #RubyOnRails
[00:40:22] pwnd_nsfw: http://guides.rubyonrails.org/active_record_validations.html
[00:40:28] pwnd_nsfw: You can go and read that maybe
[00:40:34] Axilla: wtf are you talking about noob
[00:40:38] Axilla: i know wtf validations are
[00:41:20] pwnd_nsfw: > has issues checking validations in rspecs
[00:41:23] pwnd_nsfw: > calls you a noob
[00:41:34] allcentury: has joined #RubyOnRails
[00:41:52] Axilla: heaven forbid someone has never used rspec and chooses to use minitest over it ::roles eyes::
[00:42:01] Axilla: and Test::Unit
[00:42:05] bronson: has joined #RubyOnRails
[00:42:44] Axilla: rspec is fucking horrible.. if i wasn't getting paid for this i wouldn't use it.
[00:42:48] Sonicrida: has joined #RubyOnRails
[00:43:28] pwnd_nsfw: Actually, rspec is great. Saying that, I also understand the troubles of using a different method of doing somethign when you're using to doing it a different way.
[00:44:19] Axilla: sorry for being pissy i just hate when people say, "google search" when that's the first place i go.. i dont need anyone to tell me to google search.
[00:45:03] pwnd_nsfw: Welp, when you ask something incredibly trivial, even without any knowledge of rspec, it is hard to believe that you tried googling it.
[00:45:08] Aeyrix: axilla: We get hundreds of people in here every day
[00:45:13] Aeyrix: about half + haven't google searched
[00:45:13] pwnd_nsfw: I apologize for making the assumption
[00:45:29] Aeyrix: most of us are taking time out of our days utilising skills we're paid for, to help you, for free
[00:46:03] baweaver: That being said, it never hurts to be civil
[00:46:15] baweaver: and quite simply ask instead: "What have you tried so far?"
[00:46:28] theery: has joined #RubyOnRails
[00:46:29] yfeldblum: has joined #RubyOnRails
[00:46:34] baweaver: Then you get details on what they've tried and have something to build off of
[00:46:45] baweaver: go google it is next to worthless
[00:46:55] Aeyrix: It wasn't just "go google it"
[00:47:03] baweaver: speaking in general
[00:47:06] pwnd_nsfw: http://stackoverflow.com/questions/7537112/rails-3-1-rspec-testing-model-validations
[00:47:11] pwnd_nsfw: Was the first result
[00:47:25] pwnd_nsfw: shoulda matchers I think supports a more direct way though
[00:47:39] jesterfraud: has joined #RubyOnRails
[00:47:44] pwnd_nsfw: axilla, https://github.com/thoughtbot/shoulda-matchers
[00:47:46] Axilla: yes but you clearly missed the part where I said I want to test it in my controller.
[00:48:01] pwnd_nsfw: Yeah, then I told you to check model.errors
[00:48:09] pwnd_nsfw: But you were already blown up at that point.
[00:48:09] Axilla: i got that already brosef
[00:48:21] baweaver: Keep it civil.
[00:48:23] Axilla: no, i heard you and have been working on it.
[00:48:27] pwnd_nsfw: If your model specs pass, no real reason to test in controller
[00:48:56] Axilla: for coverage sake.
[00:50:48] baweaver: coverage is a number, honestly.
[00:51:23] baweaver: 100% does not guarantee a thing
[00:51:52] baweaver: the point is to not retest something you've already got tests covering, such as validations.
[00:52:14] Axilla: i figured out the problem though.. i had called the create with !
[00:52:15] Ropeney: https://github.com/colszowka/simplecov is a good baseline to test if you have speced enough
[00:52:18] pwnd_nsfw: Would that go against DRY even?
[00:52:20] Axilla: so of course it was always throwing the error..
[00:52:32] Axilla: i'm using simplecov
[00:52:45] baweaver: DRY itself is dangerous as well if taken to extremes.
[00:52:48] Axilla: i get my controller green i like to test each line, i get my models all green..
[00:52:55] rickmasta: has joined #RubyOnRails
[00:52:56] Ropeney: axilla: If you have written code thats failing, its generally easier just to gist the code and that could have been avoided
[00:53:11] Axilla: well, the code wasn't failing
[00:53:16] Axilla: the code was doing exactly what I told it to do.
[00:53:58] nya: has joined #RubyOnRails
[00:53:58] Ropeney: `axilla: so of course it was always throwing the error..`, just easier if you already have code to show it so we know where you'r at :)
[00:54:10] grotewold: has joined #RubyOnRails
[00:54:14] nya: has joined #RubyOnRails
[00:54:55] baweaver: 100% coverage, a precursor to discovery of the halting problem
[00:55:31] ngscheurich: has joined #RubyOnRails
[00:56:32] Axilla: i dont usually work at this time
[00:56:42] Axilla: i don't know any of your names so i'm assuming this is your time slot
[00:56:48] Axilla: but i'm not new here i know how the channel works ;)
[00:56:59] Axilla: a simple question turned into a fucking mountain.. no big deal
[00:57:00] Axilla: lets move on.
[00:57:42] paulcsmith: has joined #RubyOnRails
[00:58:53] rhizome: my name is Perd Hapley
[00:59:26] Aeyrix: axilla: I think about now is when the largest portion of the ops are online to circlejerk.
[00:59:32] Aeyrix: Source: Currently circlejerking with them.
[00:59:39] Creeves: has joined #RubyOnRails
[00:59:54] rhizome: use gloves
[01:00:00] Aeyrix: lol casual
[01:00:03] Axilla: rub rub rub
[01:00:21] Aeyrix: I use studded gloves. Inside out.
[01:00:35] TheCholb: has joined #RubyOnRails
[01:01:09] quazimodo: has joined #RubyOnRails
[01:01:41] Axilla: pulled a 13hr day.. 8hrs at the day job coding, then 5hrs on a freelance project ><
[01:01:46] Axilla: think i'm burned out, but the money was good :D
[01:02:21] Axilla: sorry for being a dick pwny_boy
[01:03:11] Aeyrix: Why are F-Types so expensive?
[01:03:18] Aeyrix: wrong channel
[01:04:03] Swappticon: has joined #RubyOnRails
[01:04:22] Creeves: buy one Aeyrix
[01:04:36] Aeyrix: If I had $200k to drop on an F-Type.
[01:04:39] Aeyrix: I wouldn't be renting.
[01:04:48] Creeves: and i wouldn't be buying an f-type
[01:04:51] Creeves: probably a tesla
[01:05:23] Ropeney: They definately look the part though
[01:05:34] Radar: Petrol powered cars are going the way of their fuel.
[01:05:46] Aeyrix: Not until we get superchargers all over VIC.
[01:05:57] Aeyrix: If I can't take my girlfriend out for a long drive in a Tesla I'm not interested.
[01:05:58] Creeves: i'd go for the self driving all electric option :D
[01:06:03] Creeves: if it exists yet
[01:07:11] Ropeney: Aeyrix: The holden volt looks to be good for that, bit less pricey though
[01:07:25] Aeyrix: Yeah but Holden is dead.
[01:07:29] Creeves: tesla so much prettier
[01:07:32] Aeyrix: Literally leaving Australia late next year.
[01:07:46] Aeyrix: Becoming, once again, a rebranded Vauxhall.
[01:07:47] Ropeney: Aeyrix: Volt is made in US
[01:07:56] Creeves: if i was buying a holden it would probably be a monaro
[01:07:57] Ropeney: well, i might be wrong
[01:07:58] Aeyrix: ... You have Holden over there? I thought it was Vaux
[01:08:10] Ropeney: Im aus lol
[01:08:19] Aeyrix: Chevrolet Volt
[01:08:27] GuyPP: has joined #RubyOnRails
[01:09:06] Aeyrix: Vauxhall Ampera
[01:09:07] Aeyrix: Same thing
[01:09:12] Ropeney: Aeyrix: But its all electric driven, the motor is just a generator if you run out of power - it never actually turns the wheels
[01:09:19] Aeyrix: I'm still after the Toyota 86 / Toyota Scion tbqh
[01:09:34] Creeves: my brother just got an 86
[01:10:02] Aeyrix: How much damage did it do, do you know?
[01:10:09] Aeyrix: Carsales says they hover around $25k.
[01:10:24] Creeves: he paid a little more as it was a GTS
[01:10:26] pwnd_nsfw: MR2 SW20, I can't wait.
[01:10:29] Aeyrix: I have a modified Fiesta atm.
[01:10:42] Creeves: i drive a golf
[01:11:13] northfurr: has joined #RubyOnRails
[01:11:48] Creeves: it's like the base version
[01:11:51] pwnd_nsfw: LinkedIn should probaly just go to my spam folder. I hardly think half of the emails I get from them are what they say. "So and so wants to add you" when so and so hasn't used their profile in months.
[01:11:57] Creeves: good for fuel consumption though
[01:12:00] Aeyrix: pwnd_nsfw: I disabled all of those.
[01:12:01] pwnd_nsfw: It's a small car, so 1.6L ain't terrible
[01:12:05] Creeves: and since i live 20 second walk to uni and work, i don't really use it
[01:12:20] Creeves: could go an R
[01:13:12] Creeves: PCI scanning vendors charge so much -.-
[01:14:12] jesterfraud: has joined #RubyOnRails
[01:15:34] husanu: has joined #RubyOnRails
[01:16:31] drale2k: has joined #RubyOnRails
[01:17:51] fgo: has joined #RubyOnRails
[01:19:01] charliesome: has joined #RubyOnRails
[01:21:23] baweaver: has joined #RubyOnRails
[01:23:48] bruno-: has joined #RubyOnRails
[01:24:16] DrHouse|M6500: has joined #RubyOnRails
[01:24:53] GuyPP: anyone have any experience with stored procedures on mssql?
[01:25:32] mary5030: has joined #RubyOnRails
[01:26:35] husanu: has joined #RubyOnRails
[01:26:48] one_zero: has joined #RubyOnRails
[01:29:34] rhizome: ACTION has an r32
[01:31:08] Stuffness: has joined #RubyOnRails
[01:32:00] trietle: has joined #RubyOnRails
[01:32:23] rhizome: GuyPP: probably depends on the adapter, but this one puts it up top: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter
[01:34:11] nzst: has joined #RubyOnRails
[01:35:24] mrchris: has joined #RubyOnRails
[01:35:33] TheCholbs: has joined #RubyOnRails
[01:36:46] AntiSpamMeta: has joined #RubyOnRails
[01:36:52] grotewold: has joined #RubyOnRails
[01:37:43] trietle: has left #RubyOnRails: ()
[01:37:51] annlewis: has joined #RubyOnRails
[01:38:51] AntiSpamMeta: has joined #RubyOnRails
[01:40:20] simkessy: if someone could take a look at this http://stackoverflow.com/questions/32388836/get-user-coordinates-within-model it would be appreciated
[01:40:47] northfurr: has joined #RubyOnRails
[01:41:17] Rubie: has joined #RubyOnRails
[01:41:59] Radar: simkessy: Replied.
[01:42:10] simkessy: looking at ur answer now, thanks
[01:42:41] Aeyrix: i don't see your answer
[01:43:11] Radar: Aeyrix: look harder
[01:43:19] siaW: has left #RubyOnRails: ()
[01:43:22] Radar: I can't believe I'm helping Batman
[01:43:24] Radar: you're one of my heroes
[01:43:40] Aeyrix: Radar: weird, there was a couple minutes of delay
[01:43:41] Aeyrix: it's there now
[01:43:53] Aeyrix: wew i was right
[01:43:54] Radar: http://stackoverflow.com/users/15245/ryan-bigg "top 0.19% overall"
[01:43:56] Radar: Feels good bro
[01:44:59] GuyPP: rhizome: looking for help with the method to bind data when calling stored procedures. How to bind multiple parameters from a form when executing the stored procedure
[01:45:12] arooni-mobile: has joined #RubyOnRails
[01:45:41] Aeyrix: top 80% or something
[01:47:49] pwnd_nsfw: Great job Radar
[01:47:51] SmOkE_RU: has joined #RubyOnRails
[01:48:00] pwnd_nsfw: I can only aspire to be as proficient
[01:48:20] northfurr: has joined #RubyOnRails
[01:49:10] GuyPP: ActiveRecord::Base.connection.execute("exec myproc '#{param}'") and then add an additional '#{param}' for each input i need to bind?
[01:49:31] lampshades: has joined #RubyOnRails
[01:50:15] brunoalano: has joined #RubyOnRails
[01:51:27] brunoalano: someone have a tip about how to structure two types of users? like, I've a management user that has roles (like: superadmin, admin), and I've a normal user. They use different sections of application
[01:52:12] brunoalano: So, I can create 2 models, like: User and Admin... Or create one model called Login, that HABTM roles... Or create a generic single model User
[01:52:24] rhizome: Aeyrix: SO is doing a failover right now
[01:52:26] brunoalano: What is the best pratice for that? (I'm creating a Saas)
[01:52:54] rhizome: brunoalano: are there any super/admins who aren't managers?
[01:53:17] brunoalano: rhizome: No, they all have access to a Dashboard (with different permissions only)
[01:53:44] rhizome: i'd just use regular roles and forget about the management one, or just have multiple roles
[01:53:47] Radar: if I had a dollar for every time someone asked how to implement an authorize system
[01:53:53] Radar: +1 for users / role setup
[01:54:13] Radar: https://www.manning.com/books/rails-4-in-action Chapters 7 & 8 cover what you want.
[01:54:24] brunoalano: But for example, for each User, I generate a subdomain for him (like: myname.app.com)
[01:54:40] brunoalano: But this doesn't make senses if a manager has a subdomain
[01:54:54] Radar: brunoalano: For that I would generate a different model, called "account" and then at least one user is assigned as the "owner" of that account.
[01:54:55] lampshades: has joined #RubyOnRails
[01:55:10] Radar: That kind of thing is covered in my OTHER book, Multitenancy with Rails :D
[01:55:18] Radar: plugs galore today
[01:55:43] brunoalano: Radar: I'm planning to buy the MWR book
[01:56:43] brunoalano: But, how will look the Account model for a Manager? So, if I've understood, Account has_one User (optional, will be nil for manager I think so)
[01:57:01] Radar: account has many users, with one of those users assigned as the "manager" of that account when the account is created
[01:57:05] JBrickley: has joined #RubyOnRails
[01:57:07] Radar: You create the account + initial user for the account at the same time.
[01:57:28] grotewold: has joined #RubyOnRails
[01:57:30] x-light: Radar: this is a nice segway into my question, which is, did you get the twist review app going? (planning on doing some more now I have the update)
[01:58:12] Radar: x-light: It's *mostly* going now, but I'm going to add the multitenancy features to it before I share it with people
[01:58:35] Radar: x-light: PM me your email address and I'll add you to it in its current form
[01:58:57] corioliss: has joined #RubyOnRails
[01:59:01] brunoalano: Radar: The Account will be the authentication class, right? But I'll look for the subdomain using the User model. So, only one user can authenticate with one Account
[01:59:36] Radar: brunoalano: no, you're mixing everything up
[01:59:46] Radar: brunoalano: account is the grouping for the organisation. The account has a subdomain.
[01:59:53] Radar: brunoalano: Users are representations of individual people
[01:59:57] Radar: an account has many users
[02:00:11] Radar: The association between account and users also tracks what roles those users have in those accounts
[02:00:14] GuyPP: Radar, do you have any experience calling stored procedures from mssql
[02:00:23] brunoalano: Radar: I've not explained very well. So, the Company has a subdomain, BUT, each User on that Company has a subsubdomain (user.company_subdomain.myapp.com)
[02:01:16] Radar: brunoalano: Oh, right.
[02:01:29] Radar: GuyPP: No. I tend to stay away from Microsoft stuff these days after The Incident(tm)
[02:01:39] brunoalano: Radar: Sorry dude for bad explanation (and the bad english)
[02:01:49] patrick_star: has joined #RubyOnRails
[02:02:23] EvilEpoch: has joined #RubyOnRails
[02:02:39] Radar: brunoalano: and what is the purpose of the user's own subdomain?
[02:02:44] charliesome: has joined #RubyOnRails
[02:02:51] GuyPP: Radar, does this seem right to you? ActiveRecord::Base.connection.execute("exec myproc '#{param}'") and then add an additional '#{param}' for each input i need to bind?
[02:02:53] brunoalano: Radar: It's a Cross Marketing application
[02:03:02] grotewold: has joined #RubyOnRails
[02:03:06] Radar: GuyPP: No idea.
[02:03:26] brunoalano: Radar: for example, the company will choose a base url, like: mitstudents.com
[02:03:42] brunoalano: Radar: When you became they student, will be like: brunoalano.mitstudents.com
[02:03:59] brunoalano: mitstudents.com will point to mit.myapp.com
[02:04:14] brunoalano: So, it's a little bit weird and complex structure
[02:04:26] brunoalano: Since each Company need a dashboard and API
[02:04:43] brunoalano: So, what I plan it's: https://mit.myapp.com/admin and https://mit.myapp.com/api
[02:04:51] Radar: with you so far.
[02:05:07] brunoalano: (Using multi-tenancy of course)
[02:05:30] brunoalano: The big problem that I need to render a view when call: mitstudents.com and other type of view when: brunoalano.mitstudents.com
[02:05:45] brunoalano: So, in total will be a 3 endpoints:
[02:06:40] brunoalano: company.app.com/{api, admin} | mycoolname.com (points to somewhere, I don't to what now) | user.mycoolname.com (points to somewhere too, wildcard subdomain)
[02:07:03] moeabdol: has joined #RubyOnRails
[02:09:08] Radar: Ok, but mitstudents.com is going to point to mit.app.com and that should render the account's own dashboard
[02:09:54] n1lo: has joined #RubyOnRails
[02:10:01] trietle: has joined #RubyOnRails
[02:11:53] brunoalano: Radar: This is the problem, the mitstudents.com need to render a page for the User creates a new page, and not the Dashboard
[02:12:20] Radar: brunoalano: Ok, so that should detect that the user isn't signed in and then redirect them to something like mitstudents.com/users/new?
[02:12:40] brunoalano: Radar: Can I give you a example?
[02:14:05] brunoalano: Radar: You want to became a MIT Student, so, you go to "mitstudents.com", and there will be a simple form to put your data (name, email, password...). After you fill that, you'll be redirected for your "personal page", that is: radar.mitstudents.com. On that page, you will view your profile, account settings and only that.
[02:14:28] Radar: brunoalano: Yup.
[02:14:29] brunoalano: Radar: Me, as Admin (with some roles), I'll see only the Dashboard in mit.myapp.com/admin
[02:14:39] Radar: brunoalano: Sounds good :)
[02:14:54] brunoalano: Radar: The purpose of API, it's that the "<username>.mitstudents.com" will be Angular.js front-end
[02:15:21] brunoalano: Radar: But I'm crazy for how to organize that, because, I can do 1 Rails Application to render all of these endpoints. I don't know if it's a good option
[02:15:46] Radar: brunoalano: One Rails app for all the endpoints definitely sounds doable.
[02:16:57] brunoalano: Radar: I think so, I was searching about using Middleman to render the: mitstudents.com and <username>.mitstudents.com
[02:17:02] Radar: brunoalano: DM'd you about MTWR btwe
[02:17:04] brunoalano: Radar: But I think it's not necessary now
[02:17:26] prestorium: has joined #RubyOnRails
[02:17:27] brunoalano: Radar: Sorry, I don't know the expression "DM'd"
[02:17:29] andessen: has joined #RubyOnRails
[02:17:36] Radar: brunoalano: Sent you a private message on IRC.
[02:18:58] fgo: has joined #RubyOnRails
[02:19:03] LambdaSource: has joined #RubyOnRails
[02:19:26] trietle: has left #RubyOnRails: ()
[02:19:36] michael_mbp: has joined #RubyOnRails
[02:20:05] SimpleBIT: has joined #RubyOnRails
[02:21:26] RegulationD: has joined #RubyOnRails
[02:21:56] grotewold: has joined #RubyOnRails
[02:23:08] SimpleBIT: Hello. I am transitioning to rails from django and I am stuck at a seemingly simple problem. Whenever I delete a record the browser makes two requests instead of one. I tried cleaning the assets but didn't solve anything. Routing via a proxy I can see that the first request is a POST and the second a GET.
[02:24:32] stardiviner: has joined #RubyOnRails
[02:24:50] Radar: SimpleBIT: Can you gist your logs please?
[02:26:56] dopie: has joined #RubyOnRails
[02:27:04] nettoweb: has joined #RubyOnRails
[02:27:07] Creeves2: has joined #RubyOnRails
[02:28:26] SimpleBIT: Actually now I see that there are three requests, two deletes (actually posts using the data-method delete) and one get. The second delete is not seen by the mitm proxy. https://gist.github.com/anonymous/1cd77baf802278587a32
[02:29:12] charliesome: has joined #RubyOnRails
[02:29:22] grotewold: has joined #RubyOnRails
[02:31:00] lindii_: how can i do something like @users = @users.profile.where(country_id: params[:country_id])
[02:31:15] Radar: SimpleBIT: Can you show us your destroy_producer action please/
[02:31:19] Radar: brb, going to grab some lunch
[02:32:06] n00bDev: has joined #RubyOnRails
[02:33:25] SimpleBIT: def destroy_producer
[02:33:25] SimpleBIT: @producer = Producer.find(params[:id])
[02:33:25] SimpleBIT: @producer.destroy
[02:33:27] SimpleBIT: redirect_to 'producers'
[02:34:13] zeitue: has joined #RubyOnRails
[02:35:03] drale2k: has joined #RubyOnRails
[02:35:44] DoctorMonocular: has joined #RubyOnRails
[02:36:32] n00bDev: im trying to debug a undefined method `each' for nil:NilClass error when i do a update action, any suggestions?
[02:36:45] northfurr: has joined #RubyOnRails
[02:36:47] krz: has joined #RubyOnRails
[02:37:14] n00bDev: the object is being instantiated in my show method which is confusing me..
[02:39:00] annlewis: has joined #RubyOnRails
[02:41:03] rhizome: selenium won't find elements that require scrolling down to see? phooey
[02:41:16] SimpleBIT: n00bdev: try using object.inspect
[02:41:30] rhizome: n00bdev: you have to instantiate the object in each action
[02:41:32] Lightsword: has joined #RubyOnRails
[02:42:00] alexhartley: has joined #RubyOnRails
[02:42:38] bronson: has joined #RubyOnRails
[02:43:41] n00bDev: simpleBIT: so i inspected it and its an array of objects
[02:44:23] n00bDev: im just displaying those objects using a for loop, i select one of them using a radio button and press update
[02:46:49] Radar: SimpleBIT: Why are you not doing redirect_to producers_path?
[02:47:31] nahtnam: has left #RubyOnRails: ()
[02:47:34] mary5030: has joined #RubyOnRails
[02:48:14] SimpleBIT: Radar: I am trying a little bit of everything since I am learning rails (it's still there because of a 'let me try if this also works' moment). I will now try with producers_path!
[02:48:23] havenwood: has joined #RubyOnRails
[02:51:02] SimpleBIT: Radar: it works. Many thanks. Now if I correctly understand the problem is that rails uses the same http method when using redirect_to, the second time it doesn't found the object and calls again with a GET to show the debug page.
[02:51:57] SimpleBIT: Radar: and for this reason there are three requests. Good to know.
[02:52:39] SmOkE_RU: has joined #RubyOnRails
[02:52:54] Radar: I think it's because it was trying to navigate to localhost:3000producers
[02:53:00] Lightsword: has joined #RubyOnRails
[02:53:04] Radar: And so something there triggered it to make another request, I don't know what.
[02:53:18] Radar: SimpleBIT: There should be two requests now, one for the DELETE destroy and one for the GET /producers
[02:54:11] Rubie: has joined #RubyOnRails
[02:54:28] andessen: has joined #RubyOnRails
[02:54:29] Mendenhall: has joined #RubyOnRails
[02:54:30] Jackalish: has joined #RubyOnRails
[02:55:02] Lightsword: has joined #RubyOnRails
[02:57:32] dan0034001: has joined #RubyOnRails
[02:57:52] lindii_: how can i do something like @users = @users.profile.where(country_id: params[:country_id])
[02:58:32] dan0034001: Can someone help me with a has_and_belongs_to_many relationship, I would like to order these with a position attribute.
[02:59:19] lindii_: i asked how
[02:59:41] dan0034001: @users = @users.joins(:profile).where("profiles.country_id = ?", params[:country_id])
[02:59:51] dan0034001: I was typing...^^
[03:00:15] lindii_: i tried @users = @users.joins(:profile).where(profile: { country: params[:country_id] })
[03:01:12] dan0034001: And did that work?
[03:01:19] dan0034001: I wouldnt think that would work...
[03:01:35] lindii_: dan0034001: your solution worked
[03:01:39] lindii_: whats wrong with mine
[03:01:52] dan0034001: Thats just not how joins works
[03:02:18] dan0034001: the query wouldnt know which table to look for country_id for...
[03:02:27] lindii_: yeah make sense
[03:02:40] lindii_: dan0034001: will check that out again. Thanks!
[03:03:02] Scriptonaut: has left #RubyOnRails: ()
[03:03:10] dan0034001: at least its working, thats how i would do a joins
[03:03:46] dan0034001: any idea you know how to order a has and belongs to many relationship?
[03:04:28] rhizome: capybara doesn't like stripe
[03:04:56] rhizome: dan0034001: you don't. convert it to a has_many :through
[03:05:09] dan0034001: if i do so, how do i order it?
[03:05:22] lindii_: i usually do what rhizome suggested
[03:05:44] rhizome: dan0034001: depends on your criteria
[03:05:54] dan0034001: think of it this way:
[03:06:04] dan0034001: I have a Menu model and Meal model
[03:06:26] dan0034001: Menus have many meals, meals can belong to multiple Menu's
[03:06:59] northfurr: has joined #RubyOnRails
[03:07:11] scottmatheina: has joined #RubyOnRails
[03:07:20] pixelhandler: has joined #RubyOnRails
[03:07:25] dan0034001: rhizome so in each menu i would like to order the meal items by a position attribute somewhere....
[03:07:53] rhizome: that would be on your join model, which you don't have in a HABTM, which is why you would convert it to a HMT
[03:07:55] lindii_: has_many :meals, :through => :menu_meals, :order => 'menu_meals.name'
[03:08:52] dan0034001: but its not my name
[03:09:23] rhizome: you can have a position attribute, or whatever.
[03:09:36] rhizome: regardless, it would be something you added to your join table
[03:09:37] dan0034001: rhizome i want to randomly order it by a position attribute on the join, so a meal can be first and last in different menus
[03:09:38] lindii_: that would be menu_meals.position then
[03:09:50] dan0034001: so i would put a position on the join table?
[03:10:35] dan0034001: if so, how do i do the ordering condition in the HMT
[03:10:47] rhizome: you can't use an HMT for this
[03:10:56] rhizome: woops, sorry. fuzzy
[03:11:15] dan0034001: if i do has many through
[03:11:16] bustrarm: has joined #RubyOnRails
[03:11:17] braincras: has joined #RubyOnRails
[03:11:51] rhizome: you would do something like @items = meal.menu_items.order(:position)
[03:12:26] gavit: has joined #RubyOnRails
[03:12:31] dan0034001: i see, so can i just do it by default in the model like you did before 'has_many :meals, :through => :menu_meals, :order => 'menu_meals.name''
[03:14:14] DoctorMonocular: has joined #RubyOnRails
[03:15:13] jesterfraud: has joined #RubyOnRails
[03:15:52] nya: has joined #RubyOnRails
[03:15:58] manfrin: has joined #RubyOnRails
[03:16:46] rhizome: something like that, yeah
[03:16:47] northfurr: has joined #RubyOnRails
[03:18:18] dan0034001: has_many :meals, :through => :menu_meals, :order => 'menu_meals.position'
[03:19:19] boom1992: has joined #RubyOnRails
[03:19:25] lindii_: dan0034001: yes
[03:19:41] dan0034001: do you use activeadmin rhizome?
[03:20:04] fgo: has joined #RubyOnRails
[03:21:20] benybuds: has joined #RubyOnRails
[03:21:29] lindii_: bootstrap 4 looks sweet
[03:22:24] TheNet: has joined #RubyOnRails
[03:22:54] benybuds: About the issue I mentioned earlier for ROR on Windows: I've re-installed Ruby and Gems and am working on Rails, revealing that the versions were incorrect (not latest recommended). Also, the admin mentioned that he had not installed via command prompt with administrator privleges. I re-installed these closely following the 'getting started' instructions on the ruby and gems websites.
[03:23:05] benybuds: Rails is installing. I'll see if the error recurs.
[03:23:34] baweaver: has joined #RubyOnRails
[03:25:20] dan0034001: rhizome, lindii_ Unknown key: :order. Valid keys are: :class_name, :class, :foreign_key, :validate, :autosave, :table_name, :before_add, :after_add, :before_remove, :after_remove, :extend, :primary_key, :dependent, :as, :through, :source, :source_type, :inverse_of, :counter_cache, :join_table, :foreign_type (ArgumentError)
[03:26:05] rhizome: earlier i wanted to say that that had been removed from has_many, looks like maybe i should have
[03:26:05] dan0034001: when i do: has_many :meals, :through => :menus_meals, :order => "menus_meals.position"
[03:26:26] dan0034001: any idea what i should do?
[03:26:38] dan0034001: i wanna use this gem: https://github.com/swanandp/acts_as_list
[03:26:42] Radar: dan0034001: http://stackoverflow.com/questions/18284606/deprecated-warning-for-rails-4-has-many-with-order
[03:26:42] grotewold: has joined #RubyOnRails
[03:26:48] dan0034001: as well but im not sure i can on a join table
[03:28:13] stoodfarback: has joined #RubyOnRails
[03:28:13] mostlybadfly_: has joined #RubyOnRails
[03:28:20] darrencauthon: has joined #RubyOnRails
[03:28:51] dan0034001: ActiveRecord::HasManyThroughAssociationNotFoundError: Could not find the association :menus_meals in model Menu
[03:29:03] dan0034001: has_many :meals, -> { order 'position desc' }, :through => :menus_meals
[03:29:26] Coldblackice: has joined #RubyOnRails
[03:29:46] Radar: :through => :menu_meals,
[03:29:50] Radar: menu is singular
[03:29:53] nya: has joined #RubyOnRails
[03:30:44] dan343434: has joined #RubyOnRails
[03:30:44] boom1992: has joined #RubyOnRails
[03:32:22] sfr^: has joined #RubyOnRails
[03:32:31] rromanch_: has joined #RubyOnRails
[03:32:51] universa1: has joined #RubyOnRails
[03:32:54] larissa: has joined #RubyOnRails
[03:32:55] aguynamedben: has joined #RubyOnRails
[03:32:55] Shidash: has joined #RubyOnRails
[03:35:18] nzst: has joined #RubyOnRails
[03:39:44] annlewis: has joined #RubyOnRails
[03:40:28] nya: has joined #RubyOnRails
[03:42:51] joshkovach: has joined #RubyOnRails
[03:43:53] rakm: has joined #RubyOnRails
[03:50:00] Rennex: has joined #RubyOnRails
[03:50:10] quazimodo: has joined #RubyOnRails
[03:52:40] DrHouse|M6500: has joined #RubyOnRails
[03:54:54] maz-dev: has joined #RubyOnRails
[03:55:40] kegan_: has joined #RubyOnRails
[03:56:14] atomical: has joined #RubyOnRails
[03:56:20] kegan_: what is a good way to validate a shipping address?
[03:56:47] pontiki: there are services you can use
[03:57:04] kegan_: is that typically the route vendors take or what
[03:57:24] mary5030: has joined #RubyOnRails
[03:57:24] kegan_: i mean...
[03:57:46] pontiki: if i had to ensure a shipping address was a valid one, i certainly wouldn't write my own
[03:58:35] pontiki: well, lets say i wouldn't *want* to...
[03:59:25] Lightsword: has joined #RubyOnRails
[03:59:26] lampshades: sorry for the newbie question,.. how do I generate a rails 5 app?
[04:00:03] pontiki: rails 5 isnt' released yet, lampshades
[04:00:07] baweaver: haven't you been asking after rails 5 already?
[04:00:22] lampshades: I mean, the beta
[04:00:26] pontiki: i'm assuming someone put that tip in there for a reason
[04:00:46] baweaver: they don't even really have an alpha yet last I knew
[04:01:01] pontiki: if you're game to be trying out the beta, then you should really understand and/or figure things out
[04:01:11] baweaver: and rest assured every news site / personal blog / reddit will say when it is
[04:01:27] lampshades: I should be,.. but I'm not lol. But hey, thats how you learn, right?
[04:03:03] lampshades: I guess I could put the github link the and specify the master branch in a Gemfile, and hopefully that will allow me to generate a rails 5 app
[04:03:16] Rubie: has joined #RubyOnRails
[04:03:25] baweaver: why are you fixated on that?
[04:03:42] lampshades: I want to run my tests againts againts rails 5
[04:03:48] baweaver: no reason to
[04:03:53] baweaver: it's not even close to done
[04:04:03] TheNet: has left #RubyOnRails: ("Leaving...")
[04:04:13] rhizome: yes, you can run -current, but you'll have to answer your own questions about anything that comes up
[04:04:44] baweaver: the point is unless you have substantial reason to do so you're wasting your time.
[04:04:45] lampshades: I understand that, but at the same time I can also submit an issue if something doesnt work right
[04:05:02] baweaver: if you want to get muted on github, sure.
[04:05:33] _djbkd: has joined #RubyOnRails
[04:06:11] lampshades: I thought the rails team a bunch of nice people
[04:06:28] baweaver: "This thing that isn't finished yet doesn't work" "We know *closes*"
[04:06:59] lampshades: I guess, Ill have to be mindful on what issues to submit then
[04:07:12] baweaver: Good luck, have fun.
[04:07:45] Pazician: has joined #RubyOnRails
[04:07:49] lampshades: Thanks baweaver, but on the other hand, I'll be careful. Thanks for the heads up
[04:10:19] charliesome: has joined #RubyOnRails
[04:12:37] tejasmanohar: has joined #RubyOnRails
[04:13:28] blnkammo: has joined #RubyOnRails
[04:13:36] loglaunch: has joined #RubyOnRails
[04:14:39] Rubie: has joined #RubyOnRails
[04:15:33] AntiSpamMeta: has joined #RubyOnRails
[04:16:27] fgo: has joined #RubyOnRails
[04:17:55] Radar: I thought the contributing guide might have something about that
[04:18:26] benybuds: After getting the ruby dev kit, everything's working fine. Great docs. They guided me through the errors and warnings well.
[04:18:46] benybuds: Radar: This is a solution to the issue I brought up around 5 hours ago. ;) Peace, guys.
[04:18:50] Radar: benybuds: great :)
[04:19:13] benybuds: Yeah dude, I shot you that link. I just got an old version that wasn't installed with admin access on cmd.
[04:19:30] benybuds: Windows *rolls eyes*. Hate it but don't hate it.
[04:19:55] benybuds: Next time someone uses this account it will be someone new, though. I hooked this guy up with pidgin so he could bother you. He's a really alright guy.
[04:20:58] DoctorMonocular: has joined #RubyOnRails
[04:21:35] Radar: nice :) thanks benybuds
[04:22:04] givanse: has joined #RubyOnRails
[04:23:13] RegulationD: has joined #RubyOnRails
[04:23:51] SmOkE_RU: has joined #RubyOnRails
[04:24:52] Uptime: has joined #RubyOnRails
[04:24:58] blnkammo: has joined #RubyOnRails
[04:24:58] benybuds: has left #RubyOnRails: ()
[04:27:37] SmOkE_RU: has joined #RubyOnRails
[04:31:12] towski_: has joined #RubyOnRails
[04:35:23] codenapper: has joined #RubyOnRails
[04:36:13] rickmasta: has joined #RubyOnRails
[04:37:02] IFrank00: has joined #RubyOnRails
[04:37:45] bePolite: has joined #RubyOnRails
[04:38:44] bePolite: has joined #RubyOnRails
[04:39:39] havenwood: has joined #RubyOnRails
[04:40:30] annlewis: has joined #RubyOnRails
[04:42:40] Aswebb_: has joined #RubyOnRails
[04:43:54] bronson: has joined #RubyOnRails
[04:53:26] Tinyyy: has joined #RubyOnRails
[04:57:49] greengriminal: has joined #RubyOnRails
[04:59:45] jesterfraud: has joined #RubyOnRails
[05:05:53] Spami: has joined #RubyOnRails
[05:05:57] srinidhi: has joined #RubyOnRails
[05:12:47] Arbolas: has joined #RubyOnRails
[05:14:10] dionysus69: has joined #RubyOnRails
[05:16:13] rubyonrails818: has joined #RubyOnRails
[05:19:51] ranchodev: has joined #RubyOnRails
[05:21:48] DoctorMonocular: has joined #RubyOnRails
[05:23:15] riotjones: has joined #RubyOnRails
[05:25:28] DoctorMo_: has joined #RubyOnRails
[05:25:36] bruno-: has joined #RubyOnRails
[05:29:04] Coldblackice: has joined #RubyOnRails
[05:29:39] darrencauthon: has joined #RubyOnRails
[05:31:05] aganov: has joined #RubyOnRails
[05:32:06] codenapper: has joined #RubyOnRails
[05:35:58] nzst: has joined #RubyOnRails
[05:37:36] husanu: has joined #RubyOnRails
[05:37:39] solars: has joined #RubyOnRails
[05:38:37] rickmasta: has joined #RubyOnRails
[05:41:16] annlewis: has joined #RubyOnRails
[05:41:42] naftilos76: has joined #RubyOnRails
[05:43:07] kimegede: has joined #RubyOnRails
[05:43:30] riotjones: has joined #RubyOnRails
[05:46:03] grotewold: has joined #RubyOnRails
[05:46:12] yfeldblum: has joined #RubyOnRails
[05:48:39] yfeldblum: has joined #RubyOnRails
[05:49:22] dan0034001: has joined #RubyOnRails
[05:51:22] iateadonut: has joined #RubyOnRails
[05:53:57] tagrudev: has joined #RubyOnRails
[05:55:22] greg: has joined #RubyOnRails
[05:56:00] greg: Can anyone help a newbie out?
[05:56:30] greg: Just installed rails, and i am having some problems with setting it up to work properly
[05:56:39] arup_r1: has joined #RubyOnRails
[05:56:43] charliesome: has joined #RubyOnRails
[05:57:13] rhizome: what are you seeing?
[05:57:29] greg: I am on windows 10 updated from 7
[05:57:30] webmstk: has joined #RubyOnRails
[05:57:38] greg: and the first thing i see is DL deprecated use fiddle
[05:57:58] rhizome: i'm not sure i know what that means
[05:58:00] arBmind: has joined #RubyOnRails
[05:58:31] greg: From what i read its just a warning so it doesn't really matter
[05:58:39] tvw: has joined #RubyOnRails
[05:59:00] greg: but then i want to open sublime text from my gitbash and it doesnt understand the command subl .
[05:59:43] theery: has joined #RubyOnRails
[05:59:49] greg: it says: sh.exe": subl: command not found
[05:59:59] rhizome: sounds like path issues
[06:00:31] greg: yeah i read about something like the bash_profile
[06:00:38] greg: but i can't sem to find that anywhere
[06:02:36] arooni-mobile: has joined #RubyOnRails
[06:07:20] Limix: has joined #RubyOnRails
[06:11:17] Ropeney: has joined #RubyOnRails
[06:11:29] evillution: has joined #RubyOnRails
[06:14:35] fgo: has joined #RubyOnRails
[06:15:41] greg: has left #RubyOnRails: ()
[06:17:09] baweaver: Well he won't find that on Windows, so...
[06:17:20] baweaver: too late, considering they left
[06:17:38] baweaver: The Fiddle bit is common with a Ruby 2.0 installer for Windows.
[06:17:48] baweaver: as a future reference if he shows back up.
[06:18:44] baweaver: though the best advice there is don't use Windows honestly.
[06:19:01] eGGsha: has joined #RubyOnRails
[06:19:25] baweaver: You end up spending more time fighting it than it'd take to set up a new Gentoo box, build everything from source, and build a small scale blog application
[06:21:02] comrad: has joined #RubyOnRails
[06:22:40] jas02: has joined #RubyOnRails
[06:23:52] Radar: Sometimes, Windows is all people know.
[06:24:03] Macaveli: has joined #RubyOnRails
[06:24:05] Radar: So you'd rather them learn a whole new language, framework AND operating system?
[06:24:40] RegulationD: has joined #RubyOnRails
[06:25:10] Radar: glhf with that
[06:25:36] baweaver: While you can get it to work, it's a bad time all around.
[06:26:02] baweaver: you'll spend more time futzing with stupid windows-only bugs than learning.
[06:26:35] simkessy: Hey, if I have a nested method and I'd like to access a parameter of the parent in the child method, how can I achieve that?
[06:26:47] bruno-: has joined #RubyOnRails
[06:27:01] baweaver: you can have nested methods in ruby?
[06:27:15] ecksit: has joined #RubyOnRails
[06:27:15] Radar: simkessy: example please
[06:27:26] etalord: has joined #RubyOnRails
[06:27:33] Radar: baweaver: I agree that it's way more streamlined on Mac / Linux than it is on Windows.
[06:27:37] baweaver: sounds pythony
[06:27:46] baweaver: yes, extra front load, definitely.
[06:28:19] simkessy: Def method1 (parent_arguement) def method2 return parent_arguement end end
[06:28:27] nya: has joined #RubyOnRails
[06:29:16] jholm: has joined #RubyOnRails
[06:29:34] baweaver: Now why would you _want_ to do that?
[06:29:51] moeabdol: has joined #RubyOnRails
[06:29:52] baweaver: or better yet what are you trying to do?
[06:30:45] quazimodo: has joined #RubyOnRails
[06:30:51] darrencauthon: has joined #RubyOnRails
[06:31:04] DoubleMalt: has joined #RubyOnRails
[06:31:14] evillution: has joined #RubyOnRails
[06:31:27] dionysus69: has joined #RubyOnRails
[06:32:08] baweaver: do note that in Ruby, nesting methods is either extremely rare or unheard of. Correct me if I'm wrong Radar
[06:32:28] Radar: simkessy: Quick responses plz
[06:32:39] Radar: It is late afternoon on Friday and my attention span is shot to shit
[06:33:10] simkessy: Method 1 is my search function, method2 is a check on my parameter for geolocation. Method2 uses an if statement: if geolocation not provided, return location (from the parents location arguement)
[06:33:22] simkessy: ill post a pastebin or something
[06:33:27] helpa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[06:33:47] simkessy: https://jsfiddle.net/j1n78upd/
[06:34:04] rhizome: you should just use the magic of if statements that ruby provides
[06:34:35] simkessy: https://gist.github.com/simkessy/b30acb675c24b7f7834f
[06:34:37] Radar: yeah that's really rare
[06:34:46] Radar: What you should be doing instead is defining those methods as lambdas and calling those.
[06:35:37] rhizome: you don't need any of those if checks because the methods will return argument errors before that
[06:35:37] baweaver: not even that
[06:36:13] baweaver: this'll take a bit
[06:36:22] rhizome: there's a lot going on
[06:36:37] charliesome: has joined #RubyOnRails
[06:36:43] simkessy: Ah sorry, did I post too much?
[06:36:57] baweaver: not really, more of just takes time to think the larger it is
[06:37:12] rhizome: simkessy: just out of curiosity, what is your usual language?
[06:37:49] rhizome: so you're thinking closures?
[06:37:49] simkessy: but I'm more of a hobbyist and farely new to rails/ruby
[06:38:24] rhizome: sure, no prob. just curious
[06:39:35] simkessy: yea I'm not thinking closures specifically, this pattern just kind of made sense to work and worked. I figured if I needed to I could through in more login in the checks as I needed them
[06:39:56] simkessy: *kind of made sense and worked*
[06:40:05] baweaver: refactoring / commenting it a bit.
[06:40:21] rhizome: that's a thing! it's just not particularly rubyish in this case
[06:41:37] baweaver: First observation is that the activity check should be in the activity method on self
[06:42:03] annlewis: has joined #RubyOnRails
[06:42:06] baweaver: geo check should be in venue or its own concern object
[06:42:15] baweaver: that way you can geocheck for a venue or other entity
[06:42:21] fgo: has joined #RubyOnRails
[06:42:32] rhizome: expression of concern
[06:42:55] nya: has joined #RubyOnRails
[06:43:36] husanu: has joined #RubyOnRails
[06:43:42] simkessy: yea that makes sense
[06:43:51] baweaver: same with date check
[06:43:57] baweaver: it's none of this objects concern
[06:44:31] Mendenhall: has joined #RubyOnRails
[06:45:37] simkessy: I figured, at least my train of thought was, since it all relates to "search" that that one method should be handling the checks
[06:46:21] baweaver: in ruby normally methods are below 10 lines of code.
[06:47:35] rhizome: ACTION sulks off to a corner
[06:48:54] sevenseacat: has joined #RubyOnRails
[06:49:12] x-light: has joined #RubyOnRails
[06:49:35] simkessy_: has joined #RubyOnRails
[06:49:44] xcesariox: has joined #RubyOnRails
[06:50:17] wldcordeiro__: has joined #RubyOnRails
[06:50:21] baweaver: see commend for vague psuedo of it
[06:50:54] baweaver: also, shameless plug, but helpful: http://baweaver.com/blog/2015/05/04/sublime-scoping-with-rails/
[06:51:00] baweaver: I cover conditional scoping
[06:51:16] baweaver: any class method you can return a filter or all
[06:51:33] baweaver: all will do nothing to the preceding chain
[06:51:35] simkessy: has joined #RubyOnRails
[06:51:44] baweaver: meaning if you have Model.where().where().all
[06:51:51] baweaver: those two wheres will still apply
[06:52:10] evillution: has joined #RubyOnRails
[06:52:14] redmaverick: has joined #RubyOnRails
[06:52:21] wldcordeiro__: has joined #RubyOnRails
[06:52:32] baweaver: also dates can be used in ranges
[06:52:46] baweaver: if you have two that is.
[06:52:49] simkessy: Sorry something happened and my messages wheren't going through anymore. I've missed anything after I asked about where to put "date_check"
[06:53:00] baweaver: check your gist
[06:53:05] baweaver: http://baweaver.com/blog/2015/05/04/sublime-scoping-with-rails/ - read this
[06:53:19] baweaver: that should help more with filtering down model results
[06:53:29] lampshades: nice blog post baweaver
[06:53:31] simkessy: reading through your changes
[06:53:44] baweaver: those are psuedo, so just vague musings really
[06:53:47] lampshades: I just love the new clean controller
[06:54:09] lampshades: it makes me tingle with joy lol
[06:54:25] mozzarella: has joined #RubyOnRails
[06:54:47] lampshades: anyways, Im going to head out. Happy Friday everybody
[06:54:56] baweaver: not quite there yet here.
[06:55:04] baweaver: 3 minutes :D
[06:55:15] simkessy: @baweaver, I see so basically take out all those nested functions and put the checks with the associated classes
[06:55:32] baweaver: that way if you ever want to do those things elsewhere...
[06:55:50] baweaver: it's called separation of concerns. Code that pertains to a location should be in a location class.
[06:56:07] paulca: has joined #RubyOnRails
[06:56:12] baweaver: if you notice that some code is present in a lot of places and relates to a lot of models generically, you make what's called a concern in Rails
[06:56:29] baweaver: which is basically saying I'm pulling this chunk of code out to be reused in all the classes I include it in
[06:57:01] baweaver: (though really you could just use modules and include them, but that's not the rails way. Need to read up more on it myself)
[06:57:19] baweaver: The real point in this is that you want to have your code very easy to move about and refactor later.
[06:57:32] baweaver: Testing helps make that point fast, as large methods are impossible to test properly.
[06:57:32] paulca: Hey. I am working on my very first app with ROR and had a few conders regarding models. The major issue I am facing is with the way the "models" are to be named. There seems to be a lot of singularity and plurality issues everywhere.
[06:57:38] artto: has joined #RubyOnRails
[06:57:58] quazimodo: I'm using Her to consume a rails based API
[06:57:59] atmosx: Paul__: not really
[06:57:59] quazimodo: only problem
[06:58:10] quazimodo: it's create action submits a collection of objects in an aarray!
[06:58:22] quazimodo: instead of user: { stuff } it submits users: [{stuff}]
[06:58:41] paulca: If, I need to make a model : "Issues", I run : rake generate model Issue ... followed by the parameters.
[06:58:49] simkessy: baweaver: that geolocation module you have, is that it's own file where would that go?
[06:59:08] baweaver: probably in concern or lib
[06:59:10] atmosx: Paul__: no, the model will be singular. 'Issue' then you'll have something like 'has_many :issues'
[06:59:21] baweaver: lib won't get autoloaded though so make sure to look up how to fix that one.
[06:59:24] paulca: @atomsx Alright ..
[06:59:27] atmosx: Paul__: also in your rails console and code you'll use user.issues.count etc.
[06:59:50] redmaverick: Weird issue. Suddenly the params are having backslashes. Wondering why.
[07:00:46] baweaver: redmaverick: us too
[07:00:52] baweaver: really hard to tell without seeing anything
[07:01:10] redmaverick: "{\n \"rating\": \"4\"\n}"=>nil
[07:01:23] simkessy: baweaver: alright, thanks a lot, I'll refactor this out in the morning and see how things go
[07:01:25] nya: has joined #RubyOnRails
[07:01:50] redmaverick: I don't remember making any significant changes..
[07:02:08] baweaver: and the code that generates this?
[07:02:45] redmaverick: the code is not generating this. I am sending a post request from chrome rest client api
[07:03:00] redmaverick: and I am catching it on the controller side
[07:03:01] paulca: Also, is there way to particulary mention foregin keys to relate tables or do I just mention has_many :modelnames in the .rb files ?
[07:03:22] baweaver: do you know what JSON is?
[07:03:50] atmosx: Paul__: what do you wanna do?
[07:03:52] redmaverick: "rating": "4"
[07:04:07] baweaver: redmaverick: !gist
[07:04:07] helpa: redmaverick: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[07:04:43] redmaverick: https://gist.github.com/anonymous/694cbcb348f4ae54ac32
[07:04:54] baweaver: redmaverick: Read up on JSON, then try this: {a: 1, b: 2}.to_json
[07:05:08] paulca: :atmosx I have to build something similar to a issue tracker. I wish to have a model Project which stores all the project data and then have a particular Issue model related with every project so that I can keep track of all the issues for a given project.
[07:05:33] atmosx: Paul__: okay, so every model has many issues
[07:05:41] atmosx: every Project has many issues, right?
[07:05:41] baweaver: Now what does JSON.parse do I wonder
[07:05:48] paulca: atmosx Yes!
[07:05:55] atmosx: baweaver: ...parses json?! :-P
[07:06:07] baweaver: don't spoil the fun :P
[07:06:49] finnnnnnnnnnn: has joined #RubyOnRails
[07:07:02] greenarrow: has joined #RubyOnRails
[07:07:06] Mendenhall: has joined #RubyOnRails
[07:07:07] Sylario: has joined #RubyOnRails
[07:07:21] atmosx: Paul__: Awesome, you need to to create a Project model first, something along the lines: rails g scaffold Project name:string <other options>
[07:07:44] Aswebb_: has joined #RubyOnRails
[07:08:13] paulca: atmosx Alright ! What is the use of scaffold here ?
[07:08:38] atmosx: Paul__: scaffold will create models, controllers and views for you :-)
[07:09:03] paulca: atmosx : great!
[07:09:43] atmosx: Paul__: https://www.railstutorial.org/book <-- great tutorial. Read it, explains everything you need to build your application in depth.
[07:10:28] paulca: atmosx : I've built an app already using this as a part of my tutorial :)
[07:10:38] atmosx: baweaver: Oh sorry, I thought you were seriously wondering :-P
[07:11:11] atmosx: ops wrong channel.
[07:11:26] nya: has joined #RubyOnRails
[07:11:38] paulca: atmosx : I want to know how I could use foregin keys here :P
[07:11:46] nya: has joined #RubyOnRails
[07:11:57] baweaver: atmosx: http://www.reactiongifs.us/wp-content/uploads/2013/11/clapping_joker_batman_dark_knight.gif
[07:12:16] DrHouse|M6500: has joined #RubyOnRails
[07:13:27] maz-dev: has joined #RubyOnRails
[07:14:49] alexhartley: has joined #RubyOnRails
[07:14:55] lxsameer: has joined #RubyOnRails
[07:16:06] darutoko: has joined #RubyOnRails
[07:22:19] lipoqil: has joined #RubyOnRails
[07:28:32] alexhartley: has joined #RubyOnRails
[07:28:42] rushed: has joined #RubyOnRails
[07:31:55] darrencauthon: has joined #RubyOnRails
[07:35:31] dat_: has joined #RubyOnRails
[07:35:34] lulzmachine: has joined #RubyOnRails
[07:35:57] dat_: I am a total newbie to rubyonrails. Which windows installer is suitable for a complete newbie?
[07:36:42] DoctorMonocular: has joined #RubyOnRails
[07:37:08] nzst: has joined #RubyOnRails
[07:38:23] sevenseacat: step 1: learn ruby, *then* rails
[07:38:58] sevenseacat: but the answer is probably http://rubyinstaller.org/
[07:40:11] jgt: has joined #RubyOnRails
[07:40:36] dat_: how about http://railsinstaller.org/en? Found it on google
[07:40:57] tbuehlmann: let's also note that people have problems developing ruby/rails on windows often times. that's why some prefer to develop in a virtual machine using linux (or linux per se)
[07:41:54] Sylario: dat_: using rails on windows is painfull, my station is on windows so i use a VM with Ubuntu and my laptop is on Ubuntu.
[07:42:32] sevenseacat: no, I said rubyinstaller.
[07:42:39] zpe: has joined #RubyOnRails
[07:42:48] annlewis: has joined #RubyOnRails
[07:43:09] jonko: has joined #RubyOnRails
[07:43:29] dat_: Sylario, why is it painful on windows? Ruby is scripting language, it should be platform-independent.
[07:43:49] codenapper: has joined #RubyOnRails
[07:44:01] Sylario: dat_: Database, ImageMagick, PDF generators etc...
[07:44:07] nyaa: has joined #RubyOnRails
[07:44:41] DoctorMonocular: has joined #RubyOnRails
[07:45:14] Sylario: Also using the command line is clunky because ruby command line was created with a *nix terminal in mind
[07:45:28] DEA7TH: has joined #RubyOnRails
[07:45:35] jholm: has joined #RubyOnRails
[07:46:23] marr: has joined #RubyOnRails
[07:47:12] DEA7TH_: has joined #RubyOnRails
[07:47:56] dat_: Do some gems fail to work on Windows?
[07:48:12] raafael911: has joined #RubyOnRails
[07:48:17] curses: has joined #RubyOnRails
[07:48:33] Sylario: Without needing external library i do not think so
[07:49:08] sevenseacat: yes, some gems fail to work - a lot of the gems that need native extensions
[07:49:10] czerasz: has joined #RubyOnRails
[07:49:32] sevenseacat: for example, when I was testing earlier this year, sqlite3 did not work with ruby 2.2 on windows
[07:49:36] sevenseacat: it may have been fixed since then
[07:49:41] huntercoleh: has joined #RubyOnRails
[07:49:43] lulzmachine: yes you will have a lot of problems on windows
[07:49:52] lulzmachine: I tried the other day
[07:49:58] lulzmachine: nokogiri needs a special version
[07:50:04] wldcordeiro__: has joined #RubyOnRails
[07:50:10] lulzmachine: bcrypt doesn't seem to work (needed for passwords)
[07:50:15] huntercoleh: hows it going folks? i am a noob to ruby and rails and have a question about a tutorial i am following.
[07:50:27] livathinos: has joined #RubyOnRails
[07:50:36] lulzmachine: coffeescript needs a special version
[07:50:44] lulzmachine: and startup times are loong dat_ . But it does work
[07:51:16] huntercoleh: https://mackenziechild.me/12-in-12/1/
[07:51:27] huntercoleh: where does this part go: 1 2 3 4 5 6 7 8 9 10 11 12 <% if user_signed_in? %>
[07:51:53] moeabdol: has joined #RubyOnRails
[07:51:55] Sylario: dat_: unless your CPU is from before 2004 a Linux vm should run smoothly on your station
[07:52:20] sevenseacat: but learning an entire new OS just to use a programming language isnt exactly feasible
[07:52:40] yfeldblum: has joined #RubyOnRails
[07:52:54] Sylario: sevenseacat: is it a good idea to lear ruby or python with no experience of the bash?
[07:52:54] lulzmachine: Sylario: looks like it goes in your application layout template. Haven't read thoroughly, but usually it's layouts/application.rb
[07:53:18] sevenseacat: Sylario: what does bash have to do with ruby?
[07:53:19] Sylario: lulzmachine: not me, huntercoleh ^^
[07:53:33] Sylario: sevenseacat: i mean being use to use a lot of command line
[07:53:34] lulzmachine: oh yeah sry :p
[07:53:43] huntercoleh: lulzmachine: are you talking to me?
[07:54:13] sevenseacat: learning how to use a command line is okay
[07:54:26] sevenseacat: but the learning curve for ruby and rails as a beginner is steep enough without adding a whole new OS to it
[07:54:30] zlogan: has joined #RubyOnRails
[07:55:22] lulzmachine: it's always good to know how to get around a command line. just the stuff needed for rails is not too much :p
[07:55:33] lulzmachine: if you want to run on windows, get the git-bash
[07:55:38] Sylario: sevenseacat: las time i tried to use rails on windows Cygwin was involved, not sure it is easier to learn than Linux
[07:55:45] Ergo: has joined #RubyOnRails
[07:55:59] sevenseacat: the tools are better now, cygwin is no longer involved.
[07:56:13] Cervajz: has joined #RubyOnRails
[07:56:14] sevenseacat: cygwin is a pain in the ass
[07:56:14] lulzmachine: or if you want to avoid it altogether, you can let IntelliJ do the command line stuff hidden away
[07:56:39] huntercoleh: config/application.rb (does that sound right?)
[07:56:50] raafael911: Morning guys. Do you know how rails identifies the fields of a model which are mandatory and therefore get an asterisk in labelled forms?
[07:57:22] lulzmachine: huntercoleh: no, it should be in the template. so app/views/layout/application.erb
[07:57:58] sevenseacat: raafael911: you didnt ask us, but rails does no such thing
[07:58:05] sinkensabe: has joined #RubyOnRails
[07:59:19] huntercoleh: lulzmachine: thanks i'll give it a go!
[08:02:13] krisquigley: has joined #RubyOnRails
[08:03:19] Cervajz_: has joined #RubyOnRails
[08:03:38] raafael911: Thank you, my fault. What I actually need to know if there is a function or something that returns a list of all attributes of a model which can not be null because of their migrations. Im working on an application from somebody else and I don't know if they always added validations for that case
[08:04:33] finnnnnnnnnnn: has joined #RubyOnRails
[08:04:42] charliesome: has joined #RubyOnRails
[08:04:44] lulzmachine: Think it's good to add validations in the model for that right? Otherwise you won't know if it's valid until you hit the database.
[08:05:05] lulzmachine: Or if you can read that metadata. But I don't know how~
[08:05:15] jsrn_: has joined #RubyOnRails
[08:06:51] lulzmachine: But if you just read what the database thinks is "not null" and doesn't have a default value, then that doesn't mean your app has the same requirements. It could be setting default-values in the app.
[08:07:13] raafael911: True, it makes sense to add them. The thing is that I am continuing the work of somebody else and I don't know if he added them anywhere. So I want to find out via rails console or something which attributes of a model are not nullable
[08:07:18] adre: has joined #RubyOnRails
[08:07:39] raafael911: I mean everywhere, not anywhere
[08:09:18] Pazician: has joined #RubyOnRails
[08:09:33] charliesome: has joined #RubyOnRails
[08:09:45] raafael911: lulzmachine: Of course, the database has the information. Tank you, sometimes the answer is so easy.
[08:12:01] lulzmachine: if you just want to know at design-time, then you should definitely get the "annotate" gem raafael911
[08:12:36] lulzmachine: it will read the table metadata and put as a comment in your model file. super convenient
[08:12:44] raafael911: lulzmachine: you mean this one: https://github.com/ctran/annotate_models ?
[08:13:25] raafael911: I didn't know this one. Thank you
[08:14:14] zlogan: has joined #RubyOnRails
[08:15:07] naftilos76: has joined #RubyOnRails
[08:16:38] charliesome: has joined #RubyOnRails
[08:17:52] Dreamer3: has joined #RubyOnRails
[08:18:48] arup_r1: Showing the notice or alert while doing Ajax call is pain on... So I took Jquery way, showing the messages inline..
[08:19:10] arup_r1: That's wasy
[08:20:00] x-light: has joined #RubyOnRails
[08:22:50] ebbflowgo: has joined #RubyOnRails
[08:24:07] dionysus69: has joined #RubyOnRails
[08:25:58] dideler: has joined #RubyOnRails
[08:26:15] RegulationD: has joined #RubyOnRails
[08:27:57] drale2k: has joined #RubyOnRails
[08:28:30] fgo: has joined #RubyOnRails
[08:29:12] patrick_star: has joined #RubyOnRails
[08:29:34] mary5030: has joined #RubyOnRails
[08:32:03] arBmind: has joined #RubyOnRails
[08:32:42] darrencauthon: has joined #RubyOnRails
[08:33:52] alexhart_: has joined #RubyOnRails
[08:35:37] alexhart_: has joined #RubyOnRails
[08:36:16] rakm: has joined #RubyOnRails
[08:38:35] jokke-: has joined #RubyOnRails
[08:39:45] jgt: has joined #RubyOnRails
[08:40:56] TheMoonMaster: has joined #RubyOnRails
[08:42:09] alex88: has joined #RubyOnRails
[08:42:29] habitullence: has joined #RubyOnRails
[08:43:35] annlewis: has joined #RubyOnRails
[08:44:25] jerin: has joined #RubyOnRails
[08:45:25] habitullence: has joined #RubyOnRails
[08:46:32] Ropeney: has joined #RubyOnRails
[08:47:58] nya: has joined #RubyOnRails
[08:48:53] Cervajz: has joined #RubyOnRails
[08:49:13] DEA7TH: has joined #RubyOnRails
[08:51:08] dat_: For a complete newbie, which website is a good place to start learning?
[08:51:26] lulzmachine: dat_: rails for zombies
[08:51:29] rushed: dat_: http://railsforzombies.org
[08:51:38] dat_: How about https://www.railstutorial.org/?
[08:52:12] dat_: ok. trying the zombies now
[08:52:31] lulzmachine: I did the rails tutorial a long time ago; it's also good :)
[08:52:33] DLSteve: has joined #RubyOnRails
[08:53:01] dat_: lulzmachine, which one simpler to not-not-smart people?
[08:53:03] lulzmachine: then when you've learned a bit, you can use the railsguides
[08:53:10] dat_: lulzmachine, which one simpler to not-so-smart people?
[08:53:16] lulzmachine: unsure. but rails for zombies I think
[08:53:25] lulzmachine: it's very hands-on
[08:54:03] dat_: lulzmachine, ok. trying it now
[08:54:32] sevenseacat: I'd recommend The Well Grounded Rubyist for learning Ruby, and Rails 4 in Action for learning Rails after that. disclaimer: I am an author of R4IA
[08:58:09] Ven: has joined #RubyOnRails
[09:00:31] johnflux: has joined #RubyOnRails
[09:03:24] huntercoleh: does anyone know what this means? undefined method `links' for nil:NilClass
[09:03:51] huntercoleh: im tryign to follow this tutorial https://mackenziechild.me/12-in-12/1/
[09:03:53] AzaToth: has joined #RubyOnRails
[09:04:24] lulzmachine: seems like current_user is Nil
[09:04:28] lulzmachine: and not an instance of User
[09:04:45] lulzmachine: which in human-talk means nobody is logged in (or your auth system is broken)
[09:06:45] webmstk: has joined #RubyOnRails
[09:09:23] Grundell: has joined #RubyOnRails
[09:09:46] jerin: aren't changes in models/*.rb integrated on db:migrate?
[09:10:20] rushed: jerin: model classes do not impact the database
[09:12:31] startupality: has joined #RubyOnRails
[09:13:04] jerin: rushed: how do you add the foreign key relations then, I google to find snippets which show use of has_* and belongs_to, but unable to test them.
[09:13:27] rushed: jerin: adding them to the database and adding them to the models are two seperate things
[09:13:55] rushed: jerin: models => add the has_ belongs_to, etc... database => add and run a migration
[09:13:57] maz-dev: has joined #RubyOnRails
[09:13:58] bruno-: has joined #RubyOnRails
[09:15:52] jerin: rushed: didn't get what you said there. I edited the model, what do I have to do next to integrate the changes in the db
[09:16:08] rushed: jerin: create and run a migration
[09:16:21] enigma: has joined #RubyOnRails
[09:19:18] srinidhi: has joined #RubyOnRails
[09:19:51] huntercoleh: hey, does anyone know of a software for that can take two files and compare the differences. I want to take my code and compare it to the tutorials code on github.
[09:20:16] rushed: huntercoleh: diff
[09:21:21] rushed: huntercoleh: diff!
[09:23:09] huntercoleh: is that the name of it? "diff" ?
[09:23:14] huntercoleh: is it for mac?
[09:24:19] Pazician: has joined #RubyOnRails
[09:26:08] Grundell: has joined #RubyOnRails
[09:26:43] gaussblurinc1: has joined #RubyOnRails
[09:27:53] gaussblurinc1: has joined #RubyOnRails
[09:28:46] ecksit: has joined #RubyOnRails
[09:30:11] Grundell: has joined #RubyOnRails
[09:31:49] fgo: has joined #RubyOnRails
[09:31:54] quazimodo: has joined #RubyOnRails
[09:32:21] arup_r: has joined #RubyOnRails
[09:32:29] DoubleMalt: has joined #RubyOnRails
[09:33:14] Pazician: has joined #RubyOnRails
[09:33:22] drale2k: has joined #RubyOnRails
[09:37:34] beauby: has joined #RubyOnRails
[09:37:44] nzst: has joined #RubyOnRails
[09:37:46] blackhuey: has joined #RubyOnRails
[09:38:23] jerin: has joined #RubyOnRails
[09:40:05] raafael911: huntercoleh: diff is a command line tool available for at least Mac and Linux (dunno windows).
[09:44:27] annlewis: has joined #RubyOnRails
[09:45:34] Grundell: has joined #RubyOnRails
[09:46:36] gaussblurinc1: has left #RubyOnRails: ()
[09:47:27] herbst: has joined #RubyOnRails
[09:47:40] herbst: (join #bitcoin
[09:47:48] herbst: ups sorry
[09:49:26] Rubie: has joined #RubyOnRails
[09:50:55] nya: has joined #RubyOnRails
[09:53:07] herbst: has joined #RubyOnRails
[09:58:06] DEA7TH: has joined #RubyOnRails
[09:59:44] voker57: has joined #RubyOnRails
[10:01:32] ebbflowgo: has joined #RubyOnRails
[10:05:27] moeabdol: has joined #RubyOnRails
[10:07:01] northfurr: has joined #RubyOnRails
[10:07:14] alexhartley: has joined #RubyOnRails
[10:11:12] denym_: hey there. Is there a shorter way of writing `self.name = self.name.downcase`
[10:11:23] nya: has joined #RubyOnRails
[10:12:23] tvw: has joined #RubyOnRails
[10:12:43] yaewa: has joined #RubyOnRails
[10:12:50] webmstk: has joined #RubyOnRails
[10:12:57] herbst: has joined #RubyOnRails
[10:12:57] herbst: has joined #RubyOnRails
[10:13:42] herbst: denym_: self.name.downcase!
[10:14:51] jerin: has joined #RubyOnRails
[10:15:35] zlogan: has joined #RubyOnRails
[10:15:54] mikecmpbll: has joined #RubyOnRails
[10:16:46] maz-dev: has joined #RubyOnRails
[10:18:32] alexhartley: has joined #RubyOnRails
[10:20:26] rickmasta: has joined #RubyOnRails
[10:20:59] Scripore: has joined #RubyOnRails
[10:21:42] frzn: has joined #RubyOnRails
[10:21:42] frzn: has joined #RubyOnRails
[10:25:21] ASDsadasd: has joined #RubyOnRails
[10:25:45] alexhartley: has joined #RubyOnRails
[10:25:55] Scripore: has joined #RubyOnRails
[10:27:46] RegulationD: has joined #RubyOnRails
[10:28:08] jholm: has joined #RubyOnRails
[10:31:11] JohnDotHR: has joined #RubyOnRails
[10:32:07] habitullence: has joined #RubyOnRails
[10:32:24] jeadre: has joined #RubyOnRails
[10:32:56] fgo: has joined #RubyOnRails
[10:34:09] drale2k: has joined #RubyOnRails
[10:34:13] darrencauthon: has joined #RubyOnRails
[10:35:06] jeadre: has joined #RubyOnRails
[10:35:42] dhjondoh: has joined #RubyOnRails
[10:35:56] stamina: has joined #RubyOnRails
[10:36:22] gerep: has joined #RubyOnRails
[10:36:48] gerep: Hi all. I need to reach this route https://gist.github.com/gerep/313f358545674556cd25#file-routes-rb-L8 Am I doing nested routes correctly in this case?
[10:37:29] gerep: This is my link_to code that didn't work: <%= link_to("Answer request", seller_inquiries_path(@seller, i)) %> It return the route: http://localhost:3000/sellers/1/inquiries.1
[10:38:09] rushed: gerep: [@seller, i]
[10:39:00] rushed: gerep: also, you might want to consider a nested resource for that
[10:39:10] gerep: rushed, like this? <%= link_to("Answer request", seller_inquiries_path([@seller, i])) %>
[10:39:26] gerep: rushed, a nested resource for the list?
[10:39:41] hiasinho: has joined #RubyOnRails
[10:40:07] rushed: gerep: you appear to be building your own version of nesting inquiries under sellers, which you could do with a nested resource
[10:40:08] hiasinho: has left #RubyOnRails: ("WeeChat 1.2")
[10:40:37] duncannz: has joined #RubyOnRails
[10:40:48] rushed: gerep: ie resources :inquiries inside your resources :sellers block
[10:40:49] gerep: rushed, ah! you mean: resources :sellers { resources: inquiries } ?
[10:41:20] gerep: rushed, yes, that's what you meant! :D Thanks, I'll do that
[10:42:33] zlogan: has joined #RubyOnRails
[10:42:45] Juanchito: has joined #RubyOnRails
[10:43:01] gerep: rushed, that's working :D thanks again!
[10:43:58] rodfersou: has joined #RubyOnRails
[10:44:12] Ven: has joined #RubyOnRails
[10:45:06] annlewis: has joined #RubyOnRails
[10:49:07] jerin: i understand the controller for /issues/new can be created by def new in IssueController.rb, how to create one for /issue/{:id}/edit
[10:52:52] nya: has joined #RubyOnRails
[10:53:09] DEA7TH: has joined #RubyOnRails
[10:53:14] darrencauthon: has joined #RubyOnRails
[10:53:35] tbuehlmann: jerin, you mean the action, right? you'd define the "new" _and_ "edit" actions in the IssuesController
[10:55:46] bruno-: has joined #RubyOnRails
[10:57:00] srinidhi: has joined #RubyOnRails
[10:57:50] dhjondoh: has joined #RubyOnRails
[10:58:30] Spami: has joined #RubyOnRails
[11:03:06] bronson: has joined #RubyOnRails
[11:04:11] hiasinho: has joined #RubyOnRails
[11:04:29] hiasinho: has left #RubyOnRails: ()
[11:04:42] JohnDotHR: has joined #RubyOnRails
[11:05:20] lulzmachine: gerep: you could check what routes you have in your app with "rake routes"
[11:06:13] gerep: lulzmachine, Sure but I didn't know how to access this route: https://gist.github.com/gerep/76672b95c6488f710bc3#file-gistfile1-txt-L2
[11:06:36] gerep: lulzmachine, I was trying with this: <%= link_to("Answer request", seller_inquiries_path(@seller, i)) %> but it wasn't working
[11:06:50] mikecmpbll: i notice on here http://capistranorb.com/documentation/getting-started/flow/ it says that "there are several hook tasks e.g. :started, :updated for you to hook up custom tasks into the flow using after() and before()." but on the before/after hook page http://capistranorb.com/documentation/getting-started/before-after/ it uses `before :starting` rather than `before :started`
[11:06:52] gerep: lulzmachine, it was returning this url: http://localhost:3000/sellers/1/inquiries.1
[11:06:59] mikecmpbll: is there any reason i should use started over starting?
[11:07:14] mikecmpbll: capistrano, btw.
[11:08:06] gerep: lulzmachine, I was expecting this: http://localhost:3000/sellers/1/list/1
[11:08:21] gerep: lulzmachine, since I informed the seller_id and inquiry_id
[11:09:00] pontiki: there's no "signature" match concept in routes, gerep. it only matches the first one
[11:09:35] gerep: pontiki, OK, thanks. So there is no way I could access that second route?
[11:09:49] pontiki: not the way you currently show it, no
[11:10:42] gerep: pontiki, can you tell me how it would work? rushed suggested nested routes, using a resource :inquiries inside my resource :sellers
[11:11:10] gerep: pontiki, the problem with that is that it will redirect to a inquiry view and I want it to redirect to a different view, sellers/list.html.erb
[11:12:03] pontiki: let me see your routes file
[11:12:36] gerep: pontiki, https://gist.github.com/gerep/76672b95c6488f710bc3
[11:12:53] pontiki: gerep: !guides also
[11:12:53] helpa: gerep: http://guides.rubyonrails.org/ - Ruby on Rails guides. Recommended reading.
[11:14:37] pontiki: the most common way i use to give something a named route is use the `:as` option
[11:14:38] dionysus70: has joined #RubyOnRails
[11:16:37] pontiki: a more rest-ful way would be to use `member` inside your resource for sellers
[11:18:04] gerep: pontiki, I'll read the docs about routes and get more knowledge of that
[11:18:10] gerep: pontiki, thanks a lot for you time :D
[11:19:05] pontiki: sure, cheers
[11:23:03] MartinElvar: has joined #RubyOnRails
[11:25:46] chills42: has joined #RubyOnRails
[11:26:14] zly: Quick question
[11:26:40] jgt: has joined #RubyOnRails
[11:26:47] zly: I need two before_filters, but one of them needs to check if something occurs
[11:27:09] zly: before_filter :authenticate_admin!, only: [:something], unless: -> { something_else }
[11:27:28] zly: before_filter :authenticate_admin!, only: [:something_different]
[11:27:43] zly: In this situation the second filter is canceling the first one
[11:27:48] zly: How can I solve that? Any ideas?
[11:27:55] nya: has joined #RubyOnRails
[11:28:44] finnnnnnnnnnn: has joined #RubyOnRails
[11:28:56] tbuehlmann: zly, you could handle that inside the method and not in the before_action callback definition
[11:29:38] pontiki: there's little point in using a callback for only a single method
[11:29:45] zly: Well, true. Didn't think of that :D
[11:29:50] ldnunes: has joined #RubyOnRails
[11:29:52] zly: Thanks :)
[11:29:58] ebbflowgo: has joined #RubyOnRails
[11:34:06] fgo: has joined #RubyOnRails
[11:34:26] quazimodo: has joined #RubyOnRails
[11:34:55] drale2k: has joined #RubyOnRails
[11:36:38] zerocold: has joined #RubyOnRails
[11:38:06] gerep: pontiki, hey! Reading the docs I think I found the solution. In my application I'll work with two different users, Buyer and Seller and both will have access to Inquiry and that's where my problem was, I had to check if an inquiry#show request was made by a Buyer or a Seller. What about Controller Namespaces? I think that will do it. I'll be able to separate the Inquiry by the user type right?
[11:38:16] johnflux: has joined #RubyOnRails
[11:38:47] sdwrage: has joined #RubyOnRails
[11:38:50] gerep: pontiki, So each user will have its own inquiries_controller.rb
[11:38:56] nzst: has joined #RubyOnRails
[11:39:03] gerep: pontiki, or I got all wrong? hahaha
[11:45:54] annlewis: has joined #RubyOnRails
[11:47:20] syath: has joined #RubyOnRails
[11:47:37] baash05: has joined #RubyOnRails
[11:47:58] baash05: Hey guys.. does this line make sense
[11:48:28] baash05: [1, 2,3,4].map{ |r| break if r > 2}.present? => false
[11:48:50] baash05: if there's a break in a map the whole thing returns nil?
[11:48:56] baash05: I was not expecting that.
[11:49:12] moeabdol: has joined #RubyOnRails
[11:50:43] alexhartley: has joined #RubyOnRails
[11:50:51] husanu: has joined #RubyOnRails
[11:51:18] tbuehlmann: baash05, do you have a use case for what you're trying to do?
[11:52:48] andessen: has joined #RubyOnRails
[11:52:57] baash05: I was walking an array and if there was something wrong then I was breaking.
[11:53:25] baash05: But I wanted to test if the whole thing worked, when I stumbled upon this strange thing
[11:53:33] baash05: a break in a map makes the map return nil
[11:54:03] baash05: That caught me by surprise.
[11:55:53] mrchris: has joined #RubyOnRails
[11:57:31] wldcordeiro__: has joined #RubyOnRails
[11:57:48] husanu: has joined #RubyOnRails
[11:59:57] curses: has joined #RubyOnRails
[12:00:17] drale2k: has joined #RubyOnRails
[12:00:50] baash05: Even reviewing the c code on doesn't make sense.. Unless a break raises an exception.
[12:00:50] nzst: has joined #RubyOnRails
[12:03:22] husanu: has joined #RubyOnRails
[12:03:53] wldcordeiro__: has joined #RubyOnRails
[12:04:58] wldcordeiro__: has joined #RubyOnRails
[12:06:34] carlosd: has joined #RubyOnRails
[12:07:43] erichu: has joined #RubyOnRails
[12:08:05] knock: has joined #RubyOnRails
[12:08:09] alex88: has joined #RubyOnRails
[12:08:31] meatherly: has joined #RubyOnRails
[12:10:13] poli: has joined #RubyOnRails
[12:13:26] baash05: Anyone know about this?
[12:13:34] Ven: has joined #RubyOnRails
[12:13:35] baash05: Why it does this?
[12:15:08] mostlybadfly: has joined #RubyOnRails
[12:15:53] baash05: why would a break in a map cause the whole map to return nil
[12:16:15] jholm: has joined #RubyOnRails
[12:16:18] Detch: has joined #RubyOnRails
[12:17:38] michael_mbp: has joined #RubyOnRails
[12:19:35] mrchris: has joined #RubyOnRails
[12:21:09] atomical: has joined #RubyOnRails
[12:21:13] nya: has joined #RubyOnRails
[12:22:25] mrchris: has joined #RubyOnRails
[12:23:03] bmurt: has joined #RubyOnRails
[12:25:59] shoelessone: has joined #RubyOnRails
[12:26:41] jkamenik: has joined #RubyOnRails
[12:27:02] joshkovach: has joined #RubyOnRails
[12:27:34] shoelessone: has joined #RubyOnRails
[12:27:45] rustymyers: has joined #RubyOnRails
[12:28:45] elaptics: baash05: doesn't sound that unexpected to me, you've aborted the map effectively
[12:28:52] elaptics: why should it return anything
[12:29:10] Cervajz: has joined #RubyOnRails
[12:29:23] RegulationD: has joined #RubyOnRails
[12:30:13] elaptics: if you feel the need to want to break out then you probably want something else
[12:30:20] Cervajz_: has joined #RubyOnRails
[12:33:23] nzst: what good is a partial map?
[12:33:36] nzst: also, what happens with map!
[12:34:23] elaptics: a map is a transform, to me breaking out of that doesn't make sense to just return some info
[12:34:36] husanu: has joined #RubyOnRails
[12:35:08] wethu: has joined #RubyOnRails
[12:35:15] fgo: has joined #RubyOnRails
[12:35:44] rickmasta: has joined #RubyOnRails
[12:39:42] arup_r: has joined #RubyOnRails
[12:40:15] DEA7TH: has joined #RubyOnRails
[12:40:44] jgt: trying to break out of a map if some value in the collection doesn't pass some validation is the wrong approach
[12:41:04] jamiely: has joined #RubyOnRails
[12:41:36] jgt: instead, map the collection, and then check all the members of the collection against some predicate
[12:41:55] nettoweb: has joined #RubyOnRails
[12:42:45] s2013: has joined #RubyOnRails
[12:42:58] jgt: something like [1,2,3].any? { |n| n > 2 }
[12:44:00] rails663: has joined #RubyOnRails
[12:44:57] rrawlins: has joined #RubyOnRails
[12:45:06] jgt: baash05: in your case: fail if [1,2,3].any? { |n| n > 2 }
[12:45:35] allcentury: has joined #RubyOnRails
[12:45:45] LambdaSource: has joined #RubyOnRails
[12:46:40] annlewis: has joined #RubyOnRails
[12:47:14] NBarnes: has joined #RubyOnRails
[12:47:14] fschuindt: has joined #RubyOnRails
[12:47:32] webmstk: has joined #RubyOnRails
[12:48:53] vipaca: has joined #RubyOnRails
[12:50:40] solars: has joined #RubyOnRails
[12:52:44] renews: has joined #RubyOnRails
[12:53:48] Palsson: has joined #RubyOnRails
[12:54:08] arup_r1: has joined #RubyOnRails
[12:54:35] DEA7TH: has joined #RubyOnRails
[12:54:45] ror15: has joined #RubyOnRails
[12:57:24] davispuh: has joined #RubyOnRails
[12:58:12] JohnDotHR: has joined #RubyOnRails
[12:58:36] JohnDotHR: Is it just me or is it really hard to learn Ruby? I've done TryRuby and I'm currently going through Railsforzombies
[12:58:37] victortyau: has joined #RubyOnRails
[12:58:43] JohnDotHR: and I'm unablet o pass any level without hints and similar
[12:59:01] JohnDotHR: And yes, it is my first language
[12:59:33] CanTonic: has joined #RubyOnRails
[13:00:17] sevenseacat: rails is not ruby
[13:00:22] sevenseacat: learn ruby first
[13:01:07] JohnDotHR: well I am.. basically
[13:01:12] JohnDotHR: as the railsforzombies program
[13:01:17] JohnDotHR: goes through ruby mostly
[13:01:19] sevenseacat: not if you're doing rails for zombies - that will teach you rails
[13:01:31] JohnDotHR: mhm.. so what would your suggestion be?
[13:01:32] sevenseacat: learn ruby first -this is why you're having trouble
[13:01:35] JohnDotHR: as I'm really struggling
[13:01:40] sevenseacat: do the ruby courses
[13:01:44] sevenseacat: ruby bits etc.
[13:01:49] JohnDotHR: alright, thanks
[13:02:12] mikecmpbll: or get the implant.
[13:02:43] DEA7TH: it is really hard to learn Rails with no prior programming experience. Just Ruby, on the other hand, is reasonable - actually it varies a lot between people.
[13:02:50] mikecmpbll: not that hard.
[13:03:01] mikecmpbll: oh no programming experience, nvm
[13:03:19] JohnDotHR: i mean, html/css wouldn't really count as programming
[13:03:20] Sylario: It depend if you already understand client-server programming and DB
[13:03:26] JohnDotHR: not really no
[13:03:33] JohnDotHR: i decided to go for ruby as the first language
[13:03:59] sevenseacat: which is fine
[13:04:10] sevenseacat: but dont try to learn a framework in the language before you learn the language itself :P
[13:04:21] JohnDotHR: yeah, true..
[13:04:30] mitchless: has joined #RubyOnRails
[13:04:31] JohnDotHR: it is sad that i still don't understand
[13:04:33] JohnDotHR: what the purpose is
[13:04:36] JohnDotHR: it feels pretty complex
[13:04:55] sevenseacat: the purpose of ruby? its a general purpose programming language
[13:05:03] sevenseacat: you use it to make the computer do things for you
[13:05:54] JohnDotHR: yeah, but that's the most basic explanation
[13:05:57] xcm: has joined #RubyOnRails
[13:06:06] mikecmpbll: it's a pretty basic concept.
[13:06:20] chabil: has joined #RubyOnRails
[13:06:38] helpa: http://youtu.be/kfVsfOSbJY0
[13:06:41] JohnDotHR: that's basically what every developer is going to say
[13:06:43] sevenseacat: what exactly you want the computer to do, is what can be complicated
[13:06:47] JohnDotHR: my friend is a lead android developer
[13:06:48] mitchless: has joined #RubyOnRails
[13:06:49] JohnDotHR: and he's like
[13:06:53] sevenseacat: because thats what programming *is*
[13:06:54] JohnDotHR: phew it's pretty basic
[13:06:56] JohnDotHR: ain't that hard to learn
[13:06:58] knock: has joined #RubyOnRails
[13:07:01] mikecmpbll: that's not what I said.
[13:07:09] mikecmpbll: i said understanding what ruby is/does is basic.
[13:07:11] exadeci: Is there a way to pass several env variables with the with block in capistrano deploy ?
[13:07:27] knock: Hello is anyone familiar with Action Mailer?
[13:07:34] mikecmpbll: exadeci: with the with block?
[13:08:29] curses: has joined #RubyOnRails
[13:08:31] JohnDotHR: it's quiet hard to memorize those uhm.. not sure how they are called. user.signed_in? name.length etc
[13:08:33] JohnDotHR: there's a ton of them
[13:08:44] mikecmpbll: methods. you don't need to memorise them
[13:09:02] sevenseacat: if you want to memorise the entire stdlib, it wont happen overnight
[13:09:05] sevenseacat: we have google for that
[13:09:12] n1lo: has joined #RubyOnRails
[13:09:23] JohnDotHR: that makes sence
[13:09:26] knock: I can't seem to send mail in rails
[13:09:31] mikecmpbll: and ri if you're so inclined.
[13:09:35] JohnDotHR: ruby bits appears to be too forward for me, i guess
[13:09:35] sevenseacat: knock: what problem are you having with it?
[13:10:11] knock: I set up the mailer in dev with gmail and make sure to activate sending mails, but I don't receive emails in my gmail account
[13:10:24] exadeci: mikecmpbll: you can do with rails_env: fetch(:rails_env) do ; execute :rake, "assets:precompile" ; end and I would like to add more env variables. My real issue is that :default_env set envs only during capistrano session and when capistrano restarts passenger it doesn't provide it the env
[13:10:25] sevenseacat: https://pine.fm/LearnToProgram/ is a good place to start with learning to program.
[13:10:26] knock: there are no errors, but i don't get mail
[13:10:28] Jardayn: has joined #RubyOnRails
[13:10:37] sevenseacat: knock: ok, so what do your logs say?
[13:11:30] knock: UserMailer.send_email(User.fourth) User Load (0.6ms) SELECT "users".* FROM "users" ORDER BY CONCAT(name,username) LIMIT 1 OFFSET 3 Rendered user_mailer/send_email.text.erb (0.1ms) UserMailer#send_email: processed outbound mail in 6.8ms => #<Mail::Message:78621520, Multipart: false, Headers: <To: watform@gmail.com>, <Subject: Welcome!>, <Mime-Version: 1.0>, <Content-Type: text/plain>>
[13:11:35] helpa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[13:11:47] johnflux_: has joined #RubyOnRails
[13:11:59] mikecmpbll: exadeci: i'm not sure I understand
[13:12:46] knock: Here it is: https://gist.github.com/anonymous/8fa0f85d778a388cfedf
[13:13:19] JohnDotHR: I'm either stupid
[13:13:27] JohnDotHR: or this makes no sense to me
[13:13:29] JohnDotHR: To get the string version of an object, we simply write .to_s after it:
[13:13:30] JohnDotHR: puts var1.to_s + var2
[13:13:30] JohnDotHR: Similarly, to_i gives the integer version of an object, and to_f gives the float version. Let's look at what these three methods do (and don't do) a little more closely:
[13:13:31] knock: There's no email in the spam folder, so it's not that
[13:13:33] JohnDotHR: and feels rather complicated
[13:13:41] exadeci: mikecmpbll: When capistrano does a `passenger-config restart-app` passenger can't find the env variables that I configured in capistrano
[13:13:44] sevenseacat: knock: you're missing the part where you deliver the email :P
[13:13:50] sevenseacat: that just generates one
[13:13:56] sevenseacat: then call deliver on it
[13:14:05] mikecmpbll: JohnDotHR: what doesn't make sense about it?
[13:14:15] mikecmpbll: JohnDotHR: and, the former, i think.
[13:14:27] sevenseacat: JohnDotHR: 'it doesnt make sense' is not something we can help with, without knowing what exactly you don't understand
[13:14:31] knock: I thought this was all that was needed for rails 4.1: UserMailer.send_email(User.fourth)
[13:14:46] sevenseacat: knock: without knowing what your send_email does, i dont think so.
[13:14:54] knock: I'm not using Active Job
[13:15:11] knock: oh, so I should append .deliver on it?
[13:15:16] sevenseacat: JohnDotHR: if var1 = 2, then var1.to_s == "2"
[13:15:20] JohnDotHR: @sevenseacat Well, I dont understand the basics, feeling kinda dumbs. Integers/variables.. strins
[13:15:26] knock: Ok let me try
[13:15:29] sevenseacat: JohnDotHR: check out learn to program.
[13:15:34] JohnDotHR: @sevenseacat Might be because English is not my first language, but still.
[13:15:37] sevenseacat: it starts from the very beginning.
[13:15:39] exadeci: mikecmpbll: https://gist.github.com/exadeci/e2582594c85df2e6eef6 maybe that's will be clearer
[13:15:50] JohnDotHR: @sevenseacat Well, that's what I'm looking at right now
[13:16:11] sdwrage: has joined #RubyOnRails
[13:16:21] sevenseacat: JohnDotHR: which part?
[13:16:34] sevenseacat: because it doesnt get into methods for some time
[13:16:59] JohnDotHR: @sevenseacat https://pine.fm/LearnToProgram/chap_04.html
[13:17:08] sevenseacat: JohnDotHR: start at chapter 1.
[13:18:44] niv: has joined #RubyOnRails
[13:19:10] qwertme: has joined #RubyOnRails
[13:19:25] niv: hi! quick question about this: https://gist.github.com/niv/e254aba3d1bd9de604c3 why have my custom routes in the :characters block a named id param :character_id, but the shallow ones outside not (:id)?
[13:20:52] knock: Ah okay, I think it might be working, because I get a new error code: Net::SMTPAuthenticationError: 534-5.7.14
[13:21:14] knock: In my gmail account it says: Sign-in attempt prevented
[13:21:36] knock: Someone just tried to sign in to your Google Account from an app that doesn't meet modern security standards.
[13:21:48] knock: Google stopped this sign-in attempt, but you should review your recently used devices
[13:22:18] JohnDotHR: @sevenseacat Alright, could you quickly explain the different between integer versions and string version?
[13:22:21] knock: The thing is, all of the examples use the gmail config I am using!
[13:22:40] JohnDotHR: oh nvm sevensea
[13:24:10] knock: But yeah sevenseacat, deliver is the things to normally make it work! :)
[13:24:27] mikecmpbll: exadeci: hm, i don't know why that's not working
[13:24:54] voker57: has joined #RubyOnRails
[13:25:07] Lyhue: has joined #RubyOnRails
[13:25:54] mikecmpbll: exadeci: are you sure the env isn't correct? i'd debug that to confirm
[13:25:58] mikecmpbll: maybe echo it in the task or w/e
[13:29:08] annlewis: has joined #RubyOnRails
[13:30:17] JohnDotHR: @sevenseacat Are you up for some dumb questions?
[13:30:54] JohnDotHR: @sevenseacat puts 'What's your name?' name = gets.chomp puts 'Your name is ' + name.length.to_s + ' long '
[13:31:08] JohnDotHR: @sevenseacat puts ' Hey ' + name + ' is a cool name '
[13:31:22] JohnDotHR: why wouldn't puts name 'is a cool name' work
[13:31:27] quazimodo: has joined #RubyOnRails
[13:31:42] sevenseacat: puts takes a single string to output
[13:31:55] sevenseacat: name is a string, and so is 'is a cool name', so you need to add them together into a single string
[13:32:16] mrchris: has joined #RubyOnRails
[13:33:40] sevenseacat: youve given an example right there - name + 'is a cool name'
[13:33:45] sevenseacat: + is for adding things together
[13:33:54] Criten: talking about the first line?
[13:33:59] Criten: with name = gets.chomp?
[13:34:14] knock: sevenseacat, great so I was able to send it from my yahoo mail account, though gmail is giving me security issues
[13:34:15] Criten: Yeah, do you actually have that all on one line?
[13:34:25] knock: but no worries i guess, i just made it work!
[13:34:30] JohnDotHR: well basically puts name ' is cool ' works but puts name ' is a cool name ' doesnt
[13:34:39] mikecmpbll: no, it doesn't.
[13:34:42] mikecmpbll: unless name is a method.
[13:34:44] sevenseacat: definitely doesnt.
[13:34:47] beauby: has joined #RubyOnRails
[13:36:11] fgo: has joined #RubyOnRails
[13:36:34] JohnDotHR: looks like i've messed up something, fixed now.
[13:36:36] JohnDotHR: sorry for bothering
[13:36:59] qejk: has joined #RubyOnRails
[13:37:46] mitchless: has joined #RubyOnRails
[13:37:57] jgt: has joined #RubyOnRails
[13:38:20] JohnDotHR: were you just as lost as me when you started or am i less-developed haha
[13:38:33] sevenseacat: i dont remember. it was a long time ago.
[13:41:41] atomical: has joined #RubyOnRails
[13:41:49] Ven_: has joined #RubyOnRails
[13:42:12] mikecmpbll: there weren't even computers when sevenseacat started.
[13:42:20] sevenseacat: lol I'm not that old :(
[13:44:25] newdan: has joined #RubyOnRails
[13:44:34] knock: has left #RubyOnRails: ()
[13:46:11] Scripore: has joined #RubyOnRails
[13:47:27] nettoweb: has joined #RubyOnRails
[13:48:09] JohnDotHR: how about this seven
[13:48:10] JohnDotHR: bottle = 99
[13:48:10] JohnDotHR: puts bottle.to_s + ' bottles of beer on the wall ' + bottle.to_s + '
[13:48:10] JohnDotHR: bottles of beer. You take one down and toss it around '
[13:48:10] JohnDotHR: + bottle - 1 + ' beers on the wall '
[13:48:24] sevenseacat: if you want to share code to the channel, put it in a gist - don't spam us all
[13:48:25] helpa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[13:48:57] JohnDotHR: https://gist.github.com/anonymous/a64c9d844d05d7ec5ea9
[13:49:07] sevenseacat: ok, what about it?
[13:49:27] JohnDotHR: gotta make it go lower by 1
[13:49:31] JohnDotHR: each time it repeats
[13:49:46] sevenseacat: ok, so what part do you need to make lower by 1?
[13:50:00] newdan: has left #RubyOnRails: ()
[13:50:08] darrencauthon: has joined #RubyOnRails
[13:50:13] JohnDotHR: or variable
[13:50:15] JohnDotHR: whatever it is
[13:50:17] sevenseacat: the variable, yes
[13:50:26] sevenseacat: so how would you decrease a number by 1
[13:51:32] sevenseacat: right, so how would you decrease the number stored in bottle by 1?
[13:51:55] JohnDotHR: bottle -1 obviously won't work
[13:52:28] sevenseacat: nope, that wont change the value of bottle
[13:52:37] JohnDotHR: is it by using if?
[13:52:38] sevenseacat: you need to assign a new value to bottle
[13:52:59] sevenseacat: well the first line assigns the value 99 to bottle
[13:53:32] sevenseacat: so then you can assign a new value - the decreased value
[13:53:55] JohnDotHR: bottle = bottle - 1?
[13:54:30] JohnDotHR: so how do I set that
[13:54:32] JohnDotHR: inside the puts
[13:54:33] sevenseacat: but there's also no loop in that code, so I'm not sure how it's supposed to 'go lower each time it repeats'
[13:54:42] sevenseacat: because its not repeating
[13:54:44] andessen: has joined #RubyOnRails
[13:54:53] JohnDotHR: should I go for while bottle > 0?
[13:55:02] sevenseacat: that would work
[13:55:49] jholm: has joined #RubyOnRails
[13:56:09] drale2k: has joined #RubyOnRails
[13:56:37] bejar37: has joined #RubyOnRails
[13:57:07] JohnDotHR: https://gist.github.com/anonymous/631c4c7443bb52244fc0
[13:57:08] JohnDotHR: seems to be working
[13:57:13] cina: I have an enum status: [:read, :unread] -- can I set the status in a fixture using its name (e.g. :read)? ATM I have to set it by giving the number to it (e.g. status: 0)
[13:57:52] vipaca: has joined #RubyOnRails
[13:58:47] sevenseacat: cina: if :read doesn't work, you'd probably have to do ModelName.statuses[:read]
[14:00:06] cina: sevenseacat: I can write that in a fixture yml file??
[14:00:09] nettoweb: has joined #RubyOnRails
[14:00:18] sevenseacat: in erb tags, probably
[14:01:32] cina: sevenseacat: yes it works! thank you!
[14:02:13] altivection: has joined #RubyOnRails
[14:03:58] jobewan: has joined #RubyOnRails
[14:05:16] JohnDotHR: is it possible to learn
[14:05:19] JohnDotHR: by copying other scripts?
[14:05:41] sevenseacat: if you take the time to learn how those scripts work, yes
[14:06:03] sevenseacat: not just what they do, but how they do it
[14:06:11] JohnDotHR: i'm going to copy a web crawler
[14:06:13] JohnDotHR: after rewriting it
[14:06:18] JohnDotHR: i'll do research on what each thing does
[14:09:36] JohnDotHR: seven, how complex would you say is this crawler?
[14:09:38] JohnDotHR: http://www.skorks.com/2009/07/how-to-write-a-web-crawler-in-ruby/
[14:09:38] qwertme: has joined #RubyOnRails
[14:09:54] griffindy: has joined #RubyOnRails
[14:10:05] paulcsmith: has joined #RubyOnRails
[14:11:02] sevenseacat: I don't know, but I wouldn't use a six year old tutorial.
[14:11:10] sonofdirt: has joined #RubyOnRails
[14:12:35] mrchris: has joined #RubyOnRails
[14:12:36] Ven_: has joined #RubyOnRails
[14:13:16] havenwood: has joined #RubyOnRails
[14:15:11] redmaverick: has joined #RubyOnRails
[14:16:16] RegulationD: has joined #RubyOnRails
[14:17:11] redmaverick: I deleted my model with rails destroy model Comment.
[14:17:45] redmaverick: I removes the migration file as well right
[14:18:24] redmaverick: I am not able to find the migration file. Can't do the rollback
[14:18:37] sevenseacat: you should have rolled it back before you deleted it.
[14:19:08] redmaverick: yeah.. so what can I do now
[14:19:53] meatherly: has joined #RubyOnRails
[14:19:55] redmaverick: so.. I should have it in the version control I guess.. the migration file
[14:20:00] redmaverick: not sure.. let me check
[14:20:49] pwnd_nsfw: Is the rollback supposed to remove the model from the database?
[14:21:43] redmaverick: If I specify the version number.. it should remove the table.. in the database..
[14:21:48] Cervajz: has joined #RubyOnRails
[14:21:55] redmaverick: on rollback.. then I should rails destroy the model
[14:21:56] pwnd_nsfw: You could just write a new migration to delete it?
[14:21:56] AaronRosen: has joined #RubyOnRails
[14:22:37] dopamean_: has joined #RubyOnRails
[14:23:27] AaronRosen: Hey all, I'm having trouble using ActiveRecord in multiple processes can anyone help me out with the correct way to do that? http://stackoverflow.com/questions/32378426/how-to-use-activerecord-transactions-within-parallel-multi-process-blocks
[14:25:40] naftilos76: has joined #RubyOnRails
[14:26:26] dionysus69: has joined #RubyOnRails
[14:26:47] mitchless: has joined #RubyOnRails
[14:26:58] sonofdirt: has joined #RubyOnRails
[14:27:07] sam_weerasinghe: has joined #RubyOnRails
[14:28:04] grotewold: has joined #RubyOnRails
[14:28:06] LambdaSource: has joined #RubyOnRails
[14:29:57] nettoweb: has joined #RubyOnRails
[14:30:20] badmadrad: has joined #RubyOnRails
[14:31:03] redmaverick: pwnd_nsfw: found the file in git
[14:31:28] redmaverick: going to rollback now at that version.. hopefully things should work
[14:32:02] kies: has joined #RubyOnRails
[14:32:18] Ropeney: has joined #RubyOnRails
[14:33:26] redmaverick: has left #RubyOnRails: ()
[14:34:44] dionysus69: has joined #RubyOnRails
[14:35:51] chills42: has joined #RubyOnRails
[14:36:03] cornerma1: has joined #RubyOnRails
[14:36:39] sonofdirt: has joined #RubyOnRails
[14:37:18] fgo: has joined #RubyOnRails
[14:38:44] shoelessone: has joined #RubyOnRails
[14:40:56] greenarrow: has joined #RubyOnRails
[14:41:58] tenderlove: has joined #RubyOnRails
[14:42:25] andessen: has joined #RubyOnRails
[14:42:59] jkamenik: has joined #RubyOnRails
[14:44:09] safetypin: has joined #RubyOnRails
[14:44:46] da3mian: has joined #RubyOnRails
[14:45:24] LambdaSource: has joined #RubyOnRails
[14:46:17] mary5030: has joined #RubyOnRails
[14:47:03] mary5030: has joined #RubyOnRails
[14:49:02] srinidhi: has joined #RubyOnRails
[14:49:03] Lyhue: has joined #RubyOnRails
[14:49:03] lindii_: has joined #RubyOnRails
[14:50:08] frzng: has joined #RubyOnRails
[14:51:07] mdst: has joined #RubyOnRails
[14:51:41] alqahtani: has joined #RubyOnRails
[14:52:42] kies: has joined #RubyOnRails
[14:53:01] shoelessone: has joined #RubyOnRails
[14:54:11] jgpawletko: has joined #RubyOnRails
[14:54:53] umgrosscol: has joined #RubyOnRails
[14:56:32] grotewold: has joined #RubyOnRails
[14:56:36] cina: I have a ActionController::TestCase for my create action, how do I assert_redirected_to the newly created record without knowing which record was created?
[14:56:52] drale2k: has joined #RubyOnRails
[14:58:27] grotewold: has joined #RubyOnRails
[14:59:06] smathy: has joined #RubyOnRails
[14:59:11] Ven_: has joined #RubyOnRails
[14:59:31] gremly: has joined #RubyOnRails
[15:00:23] tubbo: cina: there's a method in that class called `assigns`, you can pull an instance variable out of the controller by calling assigns(:my_ivar0
[15:00:26] AaronRos1n: has joined #RubyOnRails
[15:00:28] tubbo: assigns(:my_ivar) :)
[15:00:46] tubbo: so for example, in rspec you can do expect(assigns(:my_ivar)).to be_persisted
[15:00:49] grotewold: has joined #RubyOnRails
[15:00:59] pwnd_nsfw: https://i.imgur.com/M5wl14r.png
[15:03:21] tubbo: pwnd_nsfw: nice
[15:03:21] grotewold: has joined #RubyOnRails
[15:03:34] mikecmpbll: anyone know how i can disable filetype spoofing detection in paperclip, temporarily?
[15:03:59] mikecmpbll: need it for a script that's moving data between tenants, and there's stuff that was uploaded before paperclip 3 and the introduction of the spoofing detection which is failing.
[15:04:08] mikecmpbll: i don't care how hacky it is i just need to get around it atm.
[15:04:20] beauby: has joined #RubyOnRails
[15:04:38] bronson: has joined #RubyOnRails
[15:05:12] LambdaSource: has joined #RubyOnRails
[15:05:18] cschneid_: has joined #RubyOnRails
[15:07:55] s2013: has joined #RubyOnRails
[15:08:09] icaro: has joined #RubyOnRails
[15:08:44] LambdaSource: has joined #RubyOnRails
[15:09:35] s2013: letter opener isnt working for me https://gist.github.com/ss2k/c30841b7ff1ea4ff64ff it was working and somehow somewhere along the way it stopped working
[15:09:40] s2013: its rails 3
[15:10:51] Meow-J: has joined #RubyOnRails
[15:11:14] s2013: nevermind.. it was delayed jobs :\
[15:11:50] jas02: has joined #RubyOnRails
[15:12:56] jas02: has left #RubyOnRails: ()
[15:13:16] qwertme: has joined #RubyOnRails
[15:18:20] jeffleeismyhero: has joined #RubyOnRails
[15:19:39] prestorium: has joined #RubyOnRails
[15:20:45] artto: has joined #RubyOnRails
[15:21:36] projekt: has joined #RubyOnRails
[15:21:58] cr3: has joined #RubyOnRails
[15:21:59] projekt: Hi all. I want to build an API in rails to register users from js spa. How can I protect my api to allow only request from spa app ?
[15:22:14] czerasz: has joined #RubyOnRails
[15:22:49] projekt: I should download CSRF token on page load ?
[15:24:46] maz-dev: has joined #RubyOnRails
[15:26:07] jeffleeismyhero: I am using accepts_nested_attributes_for with a belongs_to association. In the controller, I am using ???@order.build_billing_address??? and ???@order.build_shipping_address??? to setup for field_for.
[15:26:49] jeffleeismyhero: This works great if data is submitted. However, these items (in whole) are optional. So if line_1 is blank, the address should just be rejected.
[15:27:45] jeffleeismyhero: That does not seem to work for belongs_to the way it does for has_many with accepts_nested_attributes_for
[15:27:53] rocknrollMarc: has joined #RubyOnRails
[15:28:55] SteenJobs: has joined #RubyOnRails
[15:32:16] riotjones: has joined #RubyOnRails
[15:32:42] alexhartley: has joined #RubyOnRails
[15:33:10] lorn: has joined #RubyOnRails
[15:33:47] Rubie: has joined #RubyOnRails
[15:36:23] Lyhue: has joined #RubyOnRails
[15:38:30] fgo: has joined #RubyOnRails
[15:38:34] tubbo: not sure what you mean
[15:38:43] qejk: has joined #RubyOnRails
[15:38:56] tubbo: if the Address record invalidates when line_1 is not present, it should not save to teh DB
[15:39:24] tubbo: i think you can check that by doing @order.billing_address.valid? or potentially @order.billing_address.present? if that's not available
[15:40:38] Swappticon: has joined #RubyOnRails
[15:42:12] nzst: cross-posted this on rails: if i have a range that looks like this http://hastebin.com/ovamozukol.css how can I enumerate by day?
[15:42:24] arooni-mobile: has joined #RubyOnRails
[15:42:29] nzst: "TypeError: can't iterate from ActiveSupport::TimeWithZone" but i'd like to
[15:43:17] Cache_Money: has joined #RubyOnRails
[15:44:09] prestorium: has joined #RubyOnRails
[15:46:00] xrlabs: has joined #RubyOnRails
[15:46:21] mices: has joined #RubyOnRails
[15:47:05] xrlabs: greetings! When I push the string "john" over post, and rails awaits an activeRecord object "author", what do i do?
[15:47:33] xrlabs: can i still use params.require(:article).permit(:title, :content, :author) ?
[15:48:14] mices: in the example here which rb file do they mean? are these lines all in the company.rb file?
[15:48:15] xrlabs: I thought the best way would be to set it between @article = Article.create and @article.save ?
[15:48:22] nzst: #ruby suggested this for me, i'm going to try it out http://stackoverflow.com/questions/19093487/ruby-create-range-of-dates
[15:48:44] mices: http://api.rubyonrails.org/classes/ActiveRecord/Inheritance.html
[15:49:09] cpruitt: has joined #RubyOnRails
[15:50:24] grotewold: has joined #RubyOnRails
[15:50:49] smathy: nzst, ( your_range.begin.to_date .. your_range.end.to_date ).each ...
[15:52:19] nzst: smathy: wow, that worked too, thanks :)
[15:52:21] smathy: mices, no, each will be in the corresponding `app/models/*.rb` file.
[15:52:25] smathy: nzst, you're welcome.
[15:52:44] grotewold: has joined #RubyOnRails
[15:53:27] FCser: Hmm so I'm using this Bootstrap Datetimepicker ( https://github.com/TrevorS/bootstrap3-datetimepicker-rails )- it works great... And it would be even greater if it saved the values when editing records. I can select and save a date. But if I go back to edit the record the date fields are empty. Do I need to manually check for the value and include it? Or is something else going on? Basic form field exa
[15:53:33] FCser: mple: http://pastie.org/10397200
[15:53:35] w0rd-driven: has joined #RubyOnRails
[15:54:41] safety_cut: has joined #RubyOnRails
[15:55:04] grotewold: has joined #RubyOnRails
[15:55:27] xrlabs: Ah, I got it. @author = Author.find(name: params['article']['author']) and then set it in the Article.new method
[15:55:38] yaniv: has joined #RubyOnRails
[15:56:13] yaniv: Hey, I've got a question about simpleform and I18n
[15:56:40] bruno-: has joined #RubyOnRails
[15:56:49] dustinm`: has joined #RubyOnRails
[15:56:52] yaniv: I manage to get all the labels to automatically get the values from the yml file, but I don't manage to do so for radio buttons labels.
[15:56:59] Sylario: yaniv: always ask, you'l see if someone answer
[15:57:23] Sylario: yaniv: ok, the value of radio button, where are they coming from, enum?
[15:57:31] grotewold: has joined #RubyOnRails
[15:57:38] Sylario: or better, source of the form please
[15:57:41] yaniv: they come from a collection of strings
[15:57:48] maz-dev: has joined #RubyOnRails
[15:57:50] towski_: has joined #RubyOnRails
[15:58:04] herbst: has joined #RubyOnRails
[15:58:12] yaniv: the form is built on a user model, so the form takes most of the values from the model yml i18n file
[15:58:27] yaniv: and hints and overrides are taken from the simple_form yml file
[15:59:03] yaniv: <%= simple_form_for @user, html: {:class => 'form-horizontal', autocomplete: "off" } do |f| %>
[15:59:09] krz: has joined #RubyOnRails
[15:59:23] yaniv: <%= f.fields_for :user_setting do |ff| %>
[15:59:23] yaniv: <%= ff.input :ampm_designator, as: :radio_buttons, html_options: {:class => 'uniform'} %>
[15:59:23] yaniv: <% end %>
[15:59:37] bePolite: has joined #RubyOnRails
[15:59:46] yaniv: ok, one sec
[15:59:51] mices: smathy: sorry about that, i know that was a terrifically stupid question, i got totally busy with other stuff and just returning to this topic now
[16:00:58] mices: smathy: so then an inhertance class is a class which is a subclass of another class instead of being a subclass of activerecord::base ?
[16:01:10] AaronRos1n: Hey all, could anyone help me out with using ActiveRecord transactions within a multi process block? http://stackoverflow.com/questions/32378426/how-to-use-activerecord-transactions-within-parallel-multi-process-blocks
[16:01:18] bePolite: has joined #RubyOnRails
[16:01:48] Sylario: yaniv: first your i18N yml files is not related to simple form. Simple form as well as formtastic and the default form builder can all use the yml as well as a the translate helper
[16:02:26] bePolite: has joined #RubyOnRails
[16:02:29] yaniv: https://gist.github.com/YanivRan/c06e143f8573167b4bec
[16:02:34] Sylario: second it seems your values comes from a relation model "UserSettings"
[16:03:04] smathy: mices, "an inheritance class" has no specific meaning.
[16:03:11] sonofdirt: has joined #RubyOnRails
[16:03:22] yaniv: yes, that's true, I also tried adding the field values there, but to no avail
[16:03:44] mices: why do they bother showing that the first class is a subclass of activerecord but the following lines not
[16:03:50] mices: that's what strikes me
[16:04:08] LambdaSource: has joined #RubyOnRails
[16:04:34] smathy: mices, did you read all the accompanying text?
[16:05:14] kies: has joined #RubyOnRails
[16:05:31] tenderlove: has joined #RubyOnRails
[16:05:35] Sylario: yaniv: what is the type of ampm_designator ?
[16:05:53] moei: has joined #RubyOnRails
[16:06:02] milesforrest: has joined #RubyOnRails
[16:06:15] digitalknk: has joined #RubyOnRails
[16:06:19] Uptime: has joined #RubyOnRails
[16:06:41] paulcsmith: has joined #RubyOnRails
[16:06:48] yaniv: I updated the gist to show what (example) I tried in the model translation file
[16:07:19] Cervajz: has joined #RubyOnRails
[16:07:42] Sylario: yaniv: Boolean are not yes or no, they are true or false
[16:08:15] mices: smathy: yes, so then, there's no need for Firm to be defined as a subclass of activerecord because it's a subclass of Company which is a subclass of activerecord and therefore inherits the methods of activerecord through Company so the whole Firm model requires no reference to activerecord:base ?
[16:08:42] yaniv: yes, I tried both yes and no (because that's what simple_form translates) and false and true in the model yml
[16:08:49] eggoez: has joined #RubyOnRails
[16:10:30] srinidhi: has joined #RubyOnRails
[16:10:41] tenderlove: has joined #RubyOnRails
[16:10:44] mikecmpbll: has joined #RubyOnRails
[16:11:09] habitullence: has joined #RubyOnRails
[16:11:10] andessen: has joined #RubyOnRails
[16:12:11] Sylario: yaniv: i never translated an attributes AND it's value, i am n,ot sure how to do it
[16:13:17] yaniv: Thanks for trying. It just doesn't seem to work no matter how I try to approach it. I guess I'll use the I18n.t, but wanted to keep it clean
[16:13:55] theery: has joined #RubyOnRails
[16:16:24] drale2k: has joined #RubyOnRails
[16:16:52] arup_r: has joined #RubyOnRails
[16:17:22] tenderlove: has joined #RubyOnRails
[16:17:24] artto: has joined #RubyOnRails
[16:17:59] mices: smathy: you mean this? http://www.martinfowler.com/eaaCatalog/singleTableInheritance.html now i have
[16:18:39] smathy: mices, doesn't hurt, but I really just meant the rest of the text on the RoR doc page.
[16:18:53] smathy: mices, and yes, re your previous comment - that's how inheritance (in general) works.
[16:19:32] smathy: mices, you understand that STI is not just regular inheritance though right?
[16:20:13] andessen: has joined #RubyOnRails
[16:20:17] mices: no i didn't know that
[16:20:45] smathy: mices, that's why I asked if you'd read all of the text on that page.
[16:20:50] smathy: mices, text like this: "If you don't have a type column defined in your table, single-table inheritance won't be triggered. In that case, it'll work just like normal subclasses with no special magic for differentiating between them or reloading the right type with find."
[16:23:11] jkamenik1: has joined #RubyOnRails
[16:23:42] yaniv: I updated the gist, basically now i send a collection to represent the values/labels for the radio buttons. Any idea how I can translate these automatically in the yml file?
[16:23:56] aaronds: has joined #RubyOnRails
[16:24:07] yaniv: https://gist.github.com/YanivRan/c06e143f8573167b4bec
[16:25:49] Maletor: has joined #RubyOnRails
[16:25:54] vipaca: has joined #RubyOnRails
[16:26:34] beauby: has joined #RubyOnRails
[16:26:46] sonofdirt: has joined #RubyOnRails
[16:28:08] grotewold: has joined #RubyOnRails
[16:28:57] Maletor: has joined #RubyOnRails
[16:30:00] NBarnes: has joined #RubyOnRails
[16:30:18] shoelessone: has joined #RubyOnRails
[16:33:03] SteenJobs: has joined #RubyOnRails
[16:34:35] mices: smathy: but i created all my tables through migrations already and all my tables are already subclasses of activerecord so i should change them to subclasses of User (in this case) instead?
[16:35:23] mices: i mean through generate scaffold
[16:35:56] ngscheurich: has joined #RubyOnRails
[16:36:01] andessen: has joined #RubyOnRails
[16:36:20] aaronds: has joined #RubyOnRails
[16:36:33] artto: has joined #RubyOnRails
[16:36:35] aaronds: Does anyone know how to ensure a record is saved with it's association record id, when the association is created at the same time? https://gist.github.com/aaronstillwell/ae4ff2b8c29c46e910b9
[16:39:38] fgo: has joined #RubyOnRails
[16:39:45] aaronds: or have I just misunderstood how this works...
[16:40:02] rromanch_: has joined #RubyOnRails
[16:40:05] mices: if Object.column_names gives me column names how do i get the whole table structure?
[16:40:45] paulcsmith: has joined #RubyOnRails
[16:43:22] mices: where in the rails api do i find column_names just as an example so i know how to use it
[16:45:25] slash_nick: mices: maybe try #columns_hash
[16:45:44] zpe: has joined #RubyOnRails
[16:47:18] The_Phoenix: has joined #RubyOnRails
[16:49:35] qwertme: has joined #RubyOnRails
[16:51:13] fschuindt: has joined #RubyOnRails
[16:51:15] smathy: mices, not sure what "in this case" means.
[16:51:32] smathy: mices, why do you think you need STI?
[16:53:53] mices: my column name
[16:54:01] pawnbox: has joined #RubyOnRails
[16:55:24] blackmesa: has joined #RubyOnRails
[16:55:26] mices: if the class is User and the table name is users which is right "belongs_to :user" or "belongs_to users" it seems user is right but we don't use capitalization for some reason
[16:55:48] mices: i mean belongs_to :users"
[16:55:53] mices: i mean "belongs_to :users"
[16:56:29] drale2k: has joined #RubyOnRails
[16:57:30] craysiii: has joined #RubyOnRails
[16:58:20] jevaz: has joined #RubyOnRails
[16:59:02] provokeme: has joined #RubyOnRails
[17:00:19] provokeme: has joined #RubyOnRails
[17:01:21] mices: the problem is in this book the author uses a "belongs_to :line_items" which is the actual table name not the object name and this seems to go against convention so either it's a typo or i'm confused
[17:01:45] smathy: Yeah, that's wrong.
[17:04:39] cr3: has left #RubyOnRails: ()
[17:05:14] smathy: mices, which book?
[17:07:14] petricore: has joined #RubyOnRails
[17:08:51] LambdaSource: has joined #RubyOnRails
[17:10:30] AaronRosen: has joined #RubyOnRails
[17:10:50] andessen: has joined #RubyOnRails
[17:11:50] nzst: has joined #RubyOnRails
[17:12:33] rakm: has joined #RubyOnRails
[17:13:19] beauby: has joined #RubyOnRails
[17:13:20] Limix: has joined #RubyOnRails
[17:17:28] ratmav: has joined #RubyOnRails
[17:18:05] Sonicrida: has joined #RubyOnRails
[17:20:00] NBarnes: Is The RESTful Cookbook a reasonable source for appropriate HTTP verb use?
[17:20:12] NBarnes: I'd hate to put faith into something that's out of step with usual practice
[17:20:28] NBarnes: (setting aside the fact that the usual practice of http verbs is 'uh, what?')
[17:20:37] Deck`: has joined #RubyOnRails
[17:22:04] Deck`: I am writing view spec for partial template. There is link_to invocation there. So I get error "No route matches action: index, controller: shared". What should I mock?
[17:23:52] podman: has joined #RubyOnRails
[17:24:41] mloy: has joined #RubyOnRails
[17:26:34] smathy: nbarnes, not sure what's in that cookbook, but for Rails REST I'd refer to this: http://guides.rubyonrails.org/routing.html#crud-verbs-and-actions
[17:26:50] NBarnes: Oh, good call.
[17:27:14] NBarnes: It is good to, when wrong, be wrong in good company.
[17:27:34] NBarnes: aka the 'heaven for the climate, but hell for the company' heuristic.
[17:27:57] lemig21: has joined #RubyOnRails
[17:28:08] smathy: nbarnes, well also, sometimes there are pragmatic reasons things are wrong, eg. PUT vs PATCH
[17:29:00] NBarnes: Also, I need to give some thought as to the happy medium between 'wrong according to community convention' and 'wrong according to local convention'
[17:29:15] mrchris: has joined #RubyOnRails
[17:29:34] yaymukund: has joined #RubyOnRails
[17:29:56] NBarnes: Like, hm... no DELETE, no PATCH, and the two PUTs are ones I put in a few months ago when I was more naive.
[17:30:02] NBarnes: This is distressing.
[17:30:10] s2013: i have this super weird issue.. i am using delayed job.. all my mailers work fine with delayed job, except one.. but if i just do UserMailer.mail_name.deliver instead of UserMailer.delay.mail_name it returns an error that undefined method mail_name
[17:30:21] s2013: i have no fucking clue and its driving me nuts
[17:30:34] rakm: has joined #RubyOnRails
[17:31:14] s2013: anyone ever had that issue?
[17:32:00] voker57: has joined #RubyOnRails
[17:34:03] based_pdev: has joined #RubyOnRails
[17:34:49] lemig21: has left #RubyOnRails: ()
[17:35:15] jyraff: has joined #RubyOnRails
[17:36:05] havenwood: has joined #RubyOnRails
[17:36:24] s2013: hmm if i run rake jobs:work then it seems tow ork.. wtf
[17:36:46] ProLoser: has joined #RubyOnRails
[17:37:05] jyraff: hello. I'm working on calendar app. Every "event" has start time and I need to notify user about it via email 15 minutes before start.
[17:37:23] jyraff: What's the best (or/and easiest) way to do it?
[17:38:29] allcentury: has joined #RubyOnRails
[17:38:49] craysiii: whenever gem
[17:38:57] AaronRosen: has joined #RubyOnRails
[17:39:10] shoelessone: has joined #RubyOnRails
[17:40:43] fgo: has joined #RubyOnRails
[17:40:45] jyraff: hmm...and how to implement it using cron or whenever gem?
[17:40:50] NBarnes: crob, via whenever gem, which helps manipulate cron jobs if you're not a cron job wizard
[17:40:50] smathy: s2013, maybe your mailer class hasn't been reloaded in the main environment? Or maybe spring?
[17:41:00] s2013: i restarted the app many times
[17:41:07] smathy: s2013, and spring?
[17:41:12] NBarnes: jraff; if you look into whenever, it'll be reasonably obvious. Timed execution of jobs is _exactly_ the point of cron and whenever.
[17:41:37] s2013: not using spring. rails 3
[17:41:50] Cervajz: has joined #RubyOnRails
[17:41:58] smathy: s2013, oh, no idea then - definitely sounds like some sort of cached class issue.
[17:42:22] s2013: odd. but its working now i think. oh well pushign to prod hoepfuly it works without much issue there
[17:42:22] smathy: s2013, throw a raise up in the main body of the class and restart again, just to be sure it's being (re)loaded.
[17:42:30] Pupeno: has joined #RubyOnRails
[17:43:35] jyraff: no. I can't figure out how to use whenever gem in my case.
[17:43:43] krz: has joined #RubyOnRails
[17:44:39] krisquigley: has joined #RubyOnRails
[17:44:54] SteenJobs: has joined #RubyOnRails
[17:44:56] havenn: has joined #RubyOnRails
[17:45:17] annlewis: has joined #RubyOnRails
[17:45:39] _djbkd: has joined #RubyOnRails
[17:45:57] RegulationD: has joined #RubyOnRails
[17:46:43] rhizome: write the cron job when the event is created
[17:47:53] rhizome: or run a rake task every 15 min. i hope people can't schedule things for 10:33am
[17:47:54] Scient: or have a task run every minute
[17:48:17] ivanskie: has joined #RubyOnRails
[17:49:05] RegulationD: has joined #RubyOnRails
[17:49:22] charliesome: has joined #RubyOnRails
[17:50:04] baweaver: has joined #RubyOnRails
[17:50:13] jyraff: ok, thanks!
[17:51:25] wldcordeiro: has joined #RubyOnRails
[17:52:07] paulcsmith_: has joined #RubyOnRails
[17:52:08] pawnbox_: has joined #RubyOnRails
[17:52:17] smathy: jyraff, actually cron's not really the best thing for doing a one-off notice like that. You're better off using Scheduled Jobs in sidekiq.
[17:55:32] siddart_: has joined #RubyOnRails
[17:55:46] craysiii: thats one thing id like to see added to whenever. programmatically added jobs
[17:56:05] rhizome: how does it work now?
[17:56:32] Scient: well it is a gem for programmatically adding jobs (to cron)
[17:56:32] craysiii: you define your jobs in a file
[17:56:46] Scient: so its doing exactly that
[17:56:49] smathy: Scient, you don't add them at runtime though.
[17:56:51] craysiii: during runtime?
[17:57:00] drale2k: has joined #RubyOnRails
[17:57:05] craysiii: i should have been more explicit
[17:57:06] Scient: I dont think that would be too awesome of an idea either though
[17:57:11] nya: has joined #RubyOnRails
[17:57:21] zendrix: has joined #RubyOnRails
[17:57:33] rhizome: it does appear not to be dynamic at all
[17:57:47] smathy: Well, all whenever's really doing is writing a crontab and reloading cron.
[17:58:01] nya: has joined #RubyOnRails
[17:58:20] smathy: It's not an additive thing, so basically you need the whole file each time because it wipes out the crontab and loads it from scratch.
[17:58:48] Scient: having a programmatic way to manage tasks means it has to keep state too then
[17:58:56] Scient: so its not a stateless "thing" anymore
[17:59:05] Scient: could be done though
[17:59:15] Scient: then again I don't see a common usage or high value in that really
[17:59:16] smathy: FWIW, it's fairly trivial to create an ActiveJob task that runs periodically and adds "itself" back at the end of its `perform` to run again.
[17:59:27] Scient: dynamically and often managing tasks in crontab is not what its really for imo
[17:59:44] xcm: has joined #RubyOnRails
[18:00:02] craysiii: so theres no library to schedule 1 off tasks?
[18:00:10] smathy: ...but for jyraff I'd definitely just use Foo.set(wait_until: the_time).perform_later(args)
[18:00:16] Scient: sidekiq can do that, no?
[18:00:20] Scient: and/or resque
[18:00:27] craysiii: im not familiar with either, im a noob
[18:00:33] smathy: craysiii, ActiveJob does it.
[18:01:55] craysiii: anyone have an idea on how i can implement version control on a wiki app im writing?
[18:02:21] pawnbox: has joined #RubyOnRails
[18:02:23] rhizome: lots of model versioning gems out there
[18:02:26] smathy: craysiii, use gollum? :)
[18:02:28] Scient: theres a gem for that (tm)
[18:02:38] craysiii: thyats what i was hoping for :)
[18:02:41] davispuh: has joined #RubyOnRails
[18:02:47] DoctorMonocular: has joined #RubyOnRails
[18:03:05] DoctorMonocular: has joined #RubyOnRails
[18:03:10] craysiii: ah im not looking for a whole wiki, just the version control i guess.
[18:03:27] smathy: craysiii, https://www.ruby-toolbox.com/categories/Active_Record_Versioning
[18:04:21] smathy: (but I'm still really recommending not to write your own wiki :)
[18:04:30] craysiii: its for bloc.io
[18:04:38] craysiii: a project assignment
[18:04:45] craysiii: im trying to go above and beyond the specs.
[18:05:08] mary5030: has joined #RubyOnRails
[18:05:14] |splat|: inside of my models/foo.rb i put "belongs_to :bar" and bar.rb "has_many :foo". why am i not seeing the bar_ir reference being created in schema.rb after i run db:migrate and db:reset?
[18:05:25] Palsson: has joined #RubyOnRails
[18:05:27] djbkd_: has joined #RubyOnRails
[18:05:42] alexhartley: has joined #RubyOnRails
[18:05:53] mary5030: has joined #RubyOnRails
[18:06:17] |splat|: do i still need to manually make the t.references :bar, null: false lines in the migrations? i thought they were created automagically?
[18:06:19] craysiii: splat if i understand correctly those only create the methods for the Model classes themselves and have no bearing on the schema
[18:06:37] craysiii: so yes create migration
[18:08:08] rhizome: no, adding code to your app does not change the schema of your db unless you're using mongo or similar
[18:08:21] SteenJobs: has joined #RubyOnRails
[18:08:30] Scripore: has joined #RubyOnRails
[18:09:50] |splat|: ok, i see now on http://edgeguides.rubyonrails.org/association_basics.html there is a t.belongs_to :bar, index: true line i can insert
[18:10:32] craysiii: rails g migration AddFooToBars foo:references or something similar will do it for you
[18:11:13] craysiii: and then you don't have to worry about rollback and remigration
[18:11:38] IrishGringo: has joined #RubyOnRails
[18:12:01] grotewold: has joined #RubyOnRails
[18:12:51] sonofdirt: has joined #RubyOnRails
[18:13:42] Jasaka: has joined #RubyOnRails
[18:14:21] grotewold: has joined #RubyOnRails
[18:16:34] paulcsmith_: has joined #RubyOnRails
[18:16:49] s2013: https://gist.github.com/ss2k/fb27cd21615d0cbea975 better way to write this?
[18:19:50] smathy: s2013, added as a comment.
[18:20:27] Scient: https://gist.github.com/tanelsuurhans/e5c8aa9bc77942336cf6
[18:20:43] manfrin: has joined #RubyOnRails
[18:21:14] Lightsword: has joined #RubyOnRails
[18:21:40] Senjai: has joined #RubyOnRails
[18:21:55] baweaver: has joined #RubyOnRails
[18:22:23] smathy: s2013, I just added another option to DRY up the date arithmetic (it also generates a BETWEEN (which might not capture the >=))
[18:22:30] nzst: How do I disable friendly id for a specific route?
[18:22:56] craysiii: more info nzst?
[18:23:13] tubbo: nzst: name the id something different, then you can do Foo.find_by(name: params[:name]) || Foo.find(params[:id])
[18:23:26] tubbo: err, Foo.find_by(slug: :)
[18:24:15] nzst: Well, here's the more info. I have friendly id setup on a model, events. So, events/:slug routes through friendly id. I want a new controller route called events/day but it uses my show method
[18:24:27] arBmind: has joined #RubyOnRails
[18:24:53] prestorium: has joined #RubyOnRails
[18:25:07] Lightsword: has joined #RubyOnRails
[18:25:18] tubbo: nzst: oh so you want '/events/day' to be a hard-coded route that goes somewhere?
[18:25:41] nzst: tubbo: yes, or a workaround route i guess would be find
[18:25:48] maz-dev: has joined #RubyOnRails
[18:26:12] workmad3: has joined #RubyOnRails
[18:26:15] nzst: it kind of sucks if someone names their event day, but guess it's an edge case.
[18:26:23] maz-dev: has joined #RubyOnRails
[18:26:39] tubbo: nzst: make it so they can't name it 'day', so that the slug will never be generated.
[18:26:46] sonofdirt: has joined #RubyOnRails
[18:27:04] tubbo: nzst: you just have to make that route hard-coded... `get '/events/day' => 'events#today'`
[18:27:15] tubbo: not sure if you can do that within a resources block...but i think you can
[18:27:36] craysiii: anyone know how to customize devise_error_messages ?
[18:27:37] tubbo: so resources(:events) { collection { get :day } }
[18:27:38] rhizome: or put the /events/day route above the /events/:id one
[18:27:56] tubbo: rhizome: yeah...does that happen when you use the rest resources dsl? i can't recall
[18:27:59] tubbo: been a while since i had to do that
[18:28:12] tubbo: oh yeah it must because that's how custom collection routes work :P
[18:28:28] rhizome: good point, i think the resources method might take priority
[18:29:17] rhizome: could put it above outside the block
[18:29:28] l1meon: has joined #RubyOnRails
[18:29:35] Palsson: has joined #RubyOnRails
[18:29:42] bronson: has joined #RubyOnRails
[18:29:51] Gribo: has joined #RubyOnRails
[18:30:43] craysiii: how often do you write tests before writing the actual code? i
[18:31:12] tubbo: eh, sometimes
[18:31:29] tubbo: most likely it's when i'm doing maintenence and i'm reproducing a common bug
[18:31:43] tubbo: but i'm definitely a code-first, test-later, make sure you have enough coverage kind of guy
[18:31:53] craysiii: thats how i feel
[18:32:27] craysiii: but i want to make sure im employable and just wondering how prevalent it is in the industry
[18:32:31] djbkd: has joined #RubyOnRails
[18:32:46] nzst: What's odd to me is that an ajax call doesn't hit friendly id, but a regular call does
[18:33:28] djbkd: has joined #RubyOnRails
[18:33:58] tubbo: craysiii: you're employable so long as people are still THIRSTY for rails dev
[18:34:05] tubbo: because that's how it is where i live
[18:34:17] craysiii: hopefully it remains in 9 months
[18:34:35] Encapsulation: has joined #RubyOnRails
[18:34:50] tubbo: things don't change *that* quickly.
[18:35:07] tubbo: like you're just starting to see "hey <X> company uses Go", or "<y> company uses Elixir"
[18:35:19] nzst: think of all the legacy rails apps!
[18:35:22] tubbo: it will be a few years before jobs in those languages are commonplace
[18:37:41] toretore: has joined #RubyOnRails
[18:38:25] Swappticon: has joined #RubyOnRails
[18:39:31] kies: has joined #RubyOnRails
[18:39:31] sonofdirt: has joined #RubyOnRails
[18:39:44] s2013: thanks smathy
[18:41:41] nickenchuggets: has joined #RubyOnRails
[18:41:48] fgo: has joined #RubyOnRails
[18:43:07] futilegames: has joined #RubyOnRails
[18:43:41] strcmp1: <y> company uses Elixir will never be a thing
[18:43:57] DEA7TH: has joined #RubyOnRails
[18:44:16] cesarstafe: has joined #RubyOnRails
[18:45:10] tubbo: strcmp1: why?
[18:45:35] cesarstafe: hi guys, I've a question .. how to get the path of a missing key in a locale file?
[18:45:36] strcmp1: cuz Elixir is a toy that will never go that far, IMO
[18:45:58] IrishGringo: has joined #RubyOnRails
[18:46:02] tubbo: strcmp1: ah ok, cool. just wanted to make sure your reasoning was as vapid as your comment.
[18:46:20] tubbo: i really have no information to agree or disagree on that point, i was giving an arbitrary example
[18:46:23] strcmp1: whats vapid?
[18:46:34] nzst: without substance
[18:46:35] annlewis: has joined #RubyOnRails
[18:46:45] strcmp1: yeah it is
[18:46:52] strcmp1: its just my personal opinion
[18:47:26] rhizome: just because it's your opinion doesn't mean it has to be vapid
[18:47:49] maz-dev: has joined #RubyOnRails
[18:47:54] cesarstafe: I mean, if I am in a view, and I have a simple_form that is getting fields from a nested object called with 'render :whatever, f: f' ... how can I realize which are the path to complete under simple_form.en.yml?
[18:47:55] meoblast001: has joined #RubyOnRails
[18:48:15] RobPom: has joined #RubyOnRails
[18:48:19] pawnbox: has joined #RubyOnRails
[18:48:24] strcmp1: my opinion isnt based on any numbers or stats though but i think its more likely other languages would outpace elixir (like Crystal, much more promising to me)
[18:48:39] jeffleeismyhero: Can grouped_collection_select be used if you want to group by another attribute in the same model?
[18:48:54] oflannab_: has joined #RubyOnRails
[18:49:29] djbkd: has joined #RubyOnRails
[18:50:10] chouhoulis: has joined #RubyOnRails
[18:50:15] tubbo: strcmp1: see i have the exact opposite opinion. what exactly about crystal makes it any different from ruby?
[18:50:24] nzst: I found this for the friendly ids issue with reserved words https://github.com/norman/friendly_id/blob/master/lib/friendly_id/initializer.rb#L19 ? what's a clean way to add to that list in a project instance?
[18:50:25] tubbo: syntactically, that is
[18:50:58] tubbo: looks like "ruby if it was just a DSL for compiled C" to me
[18:51:04] cesarstafe: or better to say, how can I discover the path of a locale key that translate to a field label in form?
[18:51:20] icaro: has joined #RubyOnRails
[18:51:39] jeffleeismyhero: The table has :id, :name, :adjustment_class. I want to create a select grouped by :adjustment_class
[18:51:47] strcmp1: tubbo, its syntax takes inspiration from ruby all over the place, but its not the same in all cases and as a language it is definitely distinctively different. it will have its own concurrency model, its statically typed, compiles to machine code, and so on. the guys behind it wanted it for high perf web services (kinda like Go)
[18:52:14] tubbo: strcmp1: makes sense. i was certainly interested when i heard about it and checked it out, but got scared away when i saw it was still alpha
[18:52:22] tubbo: figured that if the syntax is close enough to ruby, i can wait a while
[18:52:24] strcmp1: its come along way
[18:52:34] andessen: has joined #RubyOnRails
[18:52:44] tubbo: strcmp1: but just so you know, elixir actually is in use by a few different companies. one of them uses it to power their MMORPG
[18:52:51] tubbo: plataformatec obviously uses it because they made it
[18:52:53] strcmp1: it started to make decisions that break with "the ruby way" a few months ago, and havent stopped since then.
[18:53:25] tubbo: http://blog.plataformatec.com.br/2015/08/elixir-in-production-interview-jamie-winsor/
[18:53:33] strcmp1: sure i just dont see it as being less niche than erlang already is
[18:53:40] paulcsmith__: has joined #RubyOnRails
[18:53:43] tubbo: i think it will be slightly less niche because it's way easier to read
[18:53:53] tubbo: erlang is a big commitment, syntax alone
[18:54:01] tubbo: let alone the whole purely functional style of programming
[18:54:22] tubbo: but there are a lot of great features in there if you need something that's extremely fast and routes little bits of data around i suppose :D
[18:54:34] strcmp1: true its more friendly to people coming from dyn langs with a syntax like ruby
[18:54:37] tubbo: built-in channel concurrency that isn't wierd (*cough* Go)
[18:55:19] tubbo: strcmp1: so how far are we away from crystal on cars? :)
[18:55:25] Swappticon: has joined #RubyOnRails
[18:55:55] strcmp1: few people have written web frameworks already
[18:56:17] tubbo: i wouldn't, it's not even beta yet
[18:56:21] tubbo: waste of time
[18:56:30] tubbo: but when it is in beta
[18:56:33] tubbo: i am so registering that domain name
[18:56:38] strcmp1: it only gets more stable as time goes by tho
[18:56:44] rhizome: nzst: this may be a clue https://github.com/norman/friendly_id/blob/master/lib/friendly_id/reserved.rb
[18:56:49] strcmp1: a few months it was particularly bad for bugs
[18:56:59] tubbo: well yeah
[18:56:59] rhizome: maybe config.reserved_words << ...
[18:57:14] nzst: rhizome: ya, i haven't had luck with that :/
[18:57:28] tubbo: alpha software typically is
[18:57:57] rhizome: nzst: well you'd have to put it in the right place. an initializer with some puts debugging would help
[18:59:41] herbst: has joined #RubyOnRails
[18:59:51] rhizome: or just copy the stock initializer and change it however you want. pare it down after.
[19:00:07] nzst: rhizome: The friendly_id initializer is in a gem / engine. When I add it to my instance I get some behavior, but I'll keep at it
[19:00:25] rhizome: right. copy the text into a new initializer file
[19:00:50] nzst: rhizome: is there a way to reopen the configuration?
[19:00:59] nzst: rhizome: rather than duplicate it
[19:01:29] rhizome: yes, but first things first
[19:01:30] qwertme: has joined #RubyOnRails
[19:02:30] tubbo: nzst: did you `rails g friendly_id`? that will generate the initializer for you
[19:02:35] tubbo: and the migration or slugs :)
[19:03:16] nzst: tubbo: yes, it's in the gem produced from an engine. I'm working with an instance that gem produced
[19:04:09] michael_mbp: has joined #RubyOnRails
[19:05:37] futilegames_: has joined #RubyOnRails
[19:07:08] kies: has joined #RubyOnRails
[19:07:24] jimbeaudoin: has joined #RubyOnRails
[19:07:41] JohnDotHR: has joined #RubyOnRails
[19:09:52] blackmesa: has joined #RubyOnRails
[19:11:03] rhizome: gosh i still have to 'gem install rails'
[19:11:28] nzst: welp, if i add it to the reserved list, it still trys to send me to the show route
[19:11:54] rhizome: the search continues
[19:12:06] tubbo: rhizome: lol
[19:12:14] tubbo: what are you trying to do?
[19:12:41] grotewold: has joined #RubyOnRails
[19:12:48] rhizome: nothing. well, basically confirming that friendly id doesn't create an initializer initializer
[19:12:58] nzst: Create a new route like new or index, but called day
[19:14:43] nzst: I could easily make it a route like /day but i'd like it nested like /events/day . Events has friendly id enabled
[19:15:36] gambl0re: has joined #RubyOnRails
[19:15:39] Scripore: has joined #RubyOnRails
[19:16:44] nzst: eff it, it's too late on a friday afternoon for me to work around this, i'll ship it and call the route /events_by_day
[19:17:38] nzst: thanks for the help rhizome tubbo , gonna save this fight for another day
[19:18:00] rhizome: happening_today
[19:18:04] gerep: has joined #RubyOnRails
[19:19:10] havenn: How should one name a migration for a bunch of columns? AddThisAndThatAndKitchenSinkAndYadaYadaAndEtcToUsers or is there a nicer convention?
[19:19:14] craysiii: im really confused as to how i was using a devise account and 5 seconds later it says the account doesn't exist ._.
[19:19:23] craysiii: devise user*
[19:19:29] drale2k: has joined #RubyOnRails
[19:20:34] gerep: havenn, maybe you can think of a context for those fields: like: AddPaymentColumnsToUsers
[19:20:40] DoubleMalt: has joined #RubyOnRails
[19:20:50] oflannabhra: has joined #RubyOnRails
[19:22:30] havenn: gerep: Thank you, that's helpful. :)
[19:22:40] gerep: havenn, =)
[19:23:18] gambl0re: do companies use haml?
[19:23:33] havenn: gambl0re: Some do.
[19:23:43] w0rd-driven: has joined #RubyOnRails
[19:23:45] gambl0re: some like 10%
[19:23:47] gerep: gambl0re, the one that I work for does
[19:24:13] havenn: gambl0re: 33.33%, repeating of course
[19:24:19] gerep: gambl0re, I don't know, is that relevant?
[19:24:22] baweaver: has joined #RubyOnRails
[19:24:36] gambl0re: no. just asking
[19:24:56] rhizome: how long is a piece of string
[19:24:57] gerep: gambl0re, :D In my personal projects I use Slim
[19:25:34] gerep: gambl0re, I think its is cleaner
[19:25:42] tubbo: gambl0re: every company i've worked for except 1 has used haml
[19:25:48] krisquigley: has joined #RubyOnRails
[19:26:59] craysiii: https://gist.github.com/craysiii/98139dcddfc0a311849b for some reason when i click the update button, it is deleting my account instead. i haven't had this issue before
[19:27:04] bePolite: has joined #RubyOnRails
[19:27:44] gerep: craysiii, Your link is sending a :delete request
[19:27:56] craysiii: right but thats not the button im pressing
[19:28:01] gerep: craysiii, ah, sorry :D
[19:28:17] gthank: has joined #RubyOnRails
[19:28:46] bePolite: has joined #RubyOnRails
[19:28:51] rdavila: has joined #RubyOnRails
[19:29:02] tubbo: craysiii: get the button_to out of the form.
[19:29:11] craysiii: ya i was trying that now
[19:29:17] tubbo: craysiii: button_to is a <button type="submit"> which will submit the form
[19:29:37] craysiii: but the form is of type "put"
[19:29:42] craysiii: which is why im confused
[19:29:46] rhizome: no, button_to creates its own form
[19:29:47] RobPom: has left #RubyOnRails: ()
[19:29:49] yfeldblum: has joined #RubyOnRails
[19:30:06] RobPom: has joined #RubyOnRails
[19:30:11] craysiii: okay then why would clicking update submit the button_to form?
[19:30:42] blackmesa: has joined #RubyOnRails
[19:31:43] gerep: I'm building a nested object in my #new method and this is my form: https://gist.github.com/gerep/be5cf2b7ed7925e75d29 What is happening is that in my new view it is loading all the records from transaction_costs table, what am I doing wrong?
[19:32:13] rhizome: why shouldn't it load all of those records?
[19:32:37] l1meon: Hello, lets say that I have a table, when all players join the table, display a form for all. How can I achieve that?
[19:32:49] chrissonar: has joined #RubyOnRails
[19:32:57] gerep: rhizome, I thought because of my #new method building one object
[19:33:03] rhizome: l1meon: that isn't as clear a description as you think it is
[19:33:14] gerep: rhizome, So I'm doing it wrong in the controller or form? Or both?
[19:33:32] rhizome: ugh, you're going to make me look
[19:33:45] gerep: rhizome, hum....the =f.fields_for :transaction_costs do |transaction_cost| right?
[19:33:49] stamina: has joined #RubyOnRails
[19:34:15] rhizome: dunno. what do you mean by "load?"
[19:34:54] rhizome: what does the html say about where this problem is happening?
[19:35:16] riskish: has joined #RubyOnRails
[19:35:20] maz-dev: has joined #RubyOnRails
[19:35:40] gerep: rhizome, I thought fields_for was looping my :transaction_costs
[19:35:47] gerep: rhizome, but I'm wrong
[19:35:49] l1meon: rhizome: well, its a game, consist of 3 players. Each player enters a table(table/1), click on button("take a sit"). And wait untill other 2 players will take a sit. After all player "sit" display a form for each.
[19:36:06] rhizome: l1meon: so not a database table, then
[19:36:21] mices: how do i test receiving emails on my development machine where there's no real online mail server
[19:36:43] gerep: mices, it will show you in the terminal, if I'm not mistaken
[19:36:55] mices: what terminal
[19:37:02] gerep: mices, the one you run "rails s"
[19:37:07] l1meon: rhizome: the game data is stored in redis, after game finish is stored in postgres.
[19:37:47] mices: i see, ok, my mail servers on another machine on the lan so i'm gonna have to have it forward the mail to this machine
[19:37:50] rhizome: l1meon: short circuting all of this, what do you mean by "how can i achieve that?" what kind of help are you looking for?
[19:37:57] andessen: has joined #RubyOnRails
[19:38:28] oflannabhra: has joined #RubyOnRails
[19:39:22] l1meon: rhizome: how can I synchronize to display the form to all users at the same time. Is there a gem for that? Or is there another way?
[19:39:23] bruno-: has joined #RubyOnRails
[19:39:54] rhizome: l1meon: javascript
[19:40:03] l1meon: rhizome: I found this one: https://github.com/chrismccord/sync, but dont know if its good.
[19:40:34] gambl0re: has joined #RubyOnRails
[19:41:33] l1meon: rhizome: can you give me an example please?
[19:41:44] rhizome: example of what?
[19:41:48] gerep: rhizome, This command: @company.transaction_costs.build Is instantiating a new TransactioCost object. In my f.fields_for :transactions_cost I want to work only with that object, I don't need to show all the @company.transactions_costs objects
[19:42:26] l1meon: rhizome: example of javascript
[19:42:49] rhizome: i'm not going to write your code for you, sorry.
[19:42:56] fgo: has joined #RubyOnRails
[19:43:06] Pupeno: has joined #RubyOnRails
[19:43:07] gerep: That's my problem. The f.fields_for is loading all my @company.transaction_costs, which doesn't make sense in the #new action
[19:43:09] havenwood: has joined #RubyOnRails
[19:44:33] oflannabhra: has joined #RubyOnRails
[19:44:37] alexhartley: has joined #RubyOnRails
[19:45:31] Lyhue: has joined #RubyOnRails
[19:45:41] arup_r: gerep: Company has_many TransactionCost ?
[19:45:42] gerep: It looks like I'm doing this: f.fields_for @company.transaction_costs that's why I think it is weird
[19:45:48] gerep: arup_r, yes
[19:45:59] arup_r: yes.. what you said is correct..
[19:46:31] gerep: arup_r, but that's not what I'm doing. I'll create a gist
[19:47:13] w0rd-driven: has joined #RubyOnRails
[19:47:20] annlewis: has joined #RubyOnRails
[19:47:59] mices: does anyone use aptana
[19:48:29] arup_r: gerep: ok
[19:49:02] gerep: arup_r, this is my code now https://gist.github.com/gerep/7e497194c419874d29c5 The new form is showing all the TransactionCost for that Company
[19:49:27] cnk: has joined #RubyOnRails
[19:49:30] arup_r: What you want it to show ? how many or any specific ?
[19:49:59] craysiii: gerep why dont you assign that build to a seperate instance variable?
[19:50:15] gerep: arup_r, I want to show only the one that I build in the controller method, I don't need to list all of them
[19:50:18] craysiii: and then in fields_for reference that instead.
[19:50:22] gerep: craysiii, sorry, I don't get it
[19:50:28] gerep: craysiii, ah!!!
[19:50:32] gerep: craysiii, I'll try it
[19:50:36] baweaver: has joined #RubyOnRails
[19:50:43] craysiii: hope it works out, i haven't used fields_for before
[19:52:41] CanTonic: has joined #RubyOnRails
[19:54:33] gambl0re: which macbook pro or macbook air
[19:54:46] craysiii: air i guess
[19:54:54] gambl0re: also which size
[19:55:12] craysiii: bigger is better
[19:55:19] manfrin: has joined #RubyOnRails
[19:55:28] craysiii: less strain on the eyes :)
[19:56:00] gambl0re: do you have the t450s? i was thinking of getting but then i saw the price
[19:56:03] IrishGringo: has joined #RubyOnRails
[19:56:11] rhizome: yes, i got one about a month ago. it's great.
[19:56:14] gambl0re: thats a business laptop also...
[19:56:29] gambl0re: i dont know if i need a bulletproof laptop. im not going to iraq
[19:56:29] rhizome: what does "business laptop" mean?
[19:56:54] rhizome: i built mine up for about US$1050
[19:56:54] craysiii: the laptop i use is lenovo y510p, but its pretty overkill for ruby dev.
[19:56:55] baweaver: has joined #RubyOnRails
[19:57:00] tubbo: it's kinda like a business cat
[19:57:13] rhizome: added an SSD, never booted the factory drive
[19:57:23] Guest34: has joined #RubyOnRails
[19:58:17] Guest34: has left #RubyOnRails: ()
[19:58:23] arup_r: craysiii: why overkill ? I am planning to buy a new laptop.. then I shouldn't buy the lenovo one..
[19:58:25] rhizome: debian from a usb key, no problems, i was up and on wifi before i knew it
[19:58:36] manfrin_: has joined #RubyOnRails
[19:58:47] craysiii: overkill because mine had SLI 750m's
[19:59:37] craysiii: lenovo is good, i would go with thinkpad over the y series though
[20:00:00] gambl0re: i think i have thinkpad edge e420...
[20:00:02] weaksauce: has joined #RubyOnRails
[20:00:15] atomical: has joined #RubyOnRails
[20:00:27] craysiii: make sure to get at least an i5 :P
[20:00:28] gambl0re: lenovo builds pretty solid laptops...
[20:00:39] rhizome: dell just started shipping their ubuntu ultrabook again, about the same price
[20:00:42] gambl0re: they dont fall apart after a few years like others
[20:00:49] gambl0re: dell sucks...
[20:00:51] icaro: has joined #RubyOnRails
[20:01:09] rhizome: they seem pretty nice, but ok
[20:01:17] craysiii: yes solid builds indeed. too solid maybe. i kinda ruined my laptop trying to remove what is supposed to be a removable GPU
[20:01:32] Spami: has joined #RubyOnRails
[20:01:33] rhizome: use a guitar pick instead of a screwdriver
[20:01:36] based_pdev: i recently got a '13 mbp retina for 900 that i'm pretty happy with
[20:02:29] sbhatore: has joined #RubyOnRails
[20:02:32] craysiii: i would totally sport a mbp or mba if i had the intention of using OS X, but i would just install ubuntu right away...
[20:02:42] rhizome: upgradability pushed me away from apple
[20:02:56] gambl0re: isnt ubuntu/osx pretty much the same?
[20:02:57] tubbo: yeah, i'm on some of their last hardware that was easy to upgrade
[20:03:03] craysiii: no, not at all
[20:03:03] tubbo: unfortunately
[20:03:14] tubbo: gambl0re: they're both operating systems, that's about where the similarities end ;)
[20:03:29] gambl0re: they both run on unix kernel
[20:03:30] tubbo: ubuntu's UI clearly takes cues from apple, but is definitely its own thing
[20:03:35] gambl0re: or something like that
[20:03:43] tubbo: gambl0re: no, ubuntu runs on the linux kernel. mac os x runs on their own kernel, based on bsd4.2
[20:03:44] craysiii: i thought OS X was darwin, which is BSD derivative
[20:03:46] gerep: craysiii, it worked ;) thanks a lot for your suggestion!
[20:03:49] based_pdev: meh, who upgrades laptops
[20:03:54] tubbo: yeah, the darwin kernel
[20:03:56] craysiii: glad to have helped gerep :)
[20:03:57] based_pdev: just sell and get a new one
[20:04:04] tubbo: based_pdev: until that breaks
[20:04:16] tubbo: which will definitely happen, and much faster than you thin
[20:04:28] gerep: based_pdev, or until you live in a third world country where technology is really expensive!
[20:04:30] baweaver: FreeBSD specifically.
[20:04:35] gambl0re: how long have you had your lenovo laptop for
[20:04:59] craysiii: i can't remember honestly
[20:05:07] craysiii: i have trouble keep track of years like that
[20:05:14] gambl0re: i'v had mine for 4-5 years i think. i've travelled around the world with it to some dirty places and it sitll works pretty good
[20:05:14] gerep: I'm with my Dell for 4 years
[20:05:21] craysiii: so much so i can't english properly when thinking about it ;)
[20:05:59] gambl0re: but theres always that possibility of it not powering on one day which scares me
[20:06:16] DEA7TH: has joined #RubyOnRails
[20:07:01] bruno-: has joined #RubyOnRails
[20:07:22] arup_r: gambl0re: dirty place means ? ;)
[20:07:24] tubbo: baweaver: nope
[20:07:30] tubbo: baweaver: darwin is not freebsd
[20:07:35] tubbo: if it was, you could use docker :D
[20:07:48] baweaver: inherited from
[20:08:03] tubbo: baweaver: not even...OS X is to FreeBSD as Debian is to Slackware
[20:08:06] sivsushruth: has joined #RubyOnRails
[20:08:16] w0rd-driven: has joined #RubyOnRails
[20:08:19] tubbo: derived from the same source, but forked long ago. cousins, but no relation
[20:08:20] baweaver: anyone know where ruby-doc source is?
[20:08:25] tubbo: this is why apple can get away with closed-sourcing everything
[20:08:44] baweaver: terminating perlisms with extreme prejudice
[20:08:55] arup_r: gambl0re: :(
[20:09:03] RobPom: has left #RubyOnRails: ()
[20:09:31] baweaver: ruby/doc probably helps
[20:09:59] tubbo: baweaver: i *think* it's just RDoc...
[20:10:22] tubbo: wait that can't be right
[20:10:23] baweaver: http://ruby-doc.org/core-2.2.2/Process.html#method-c-wait for instance uses perlish variables as opposed to longhand.
[20:10:40] baweaver: thinking of going through and fixing those.
[20:10:55] tubbo: baweaver: what exactly is the longhand to '$?'
[20:11:02] tubbo: that is one of the few perl-isms i've not been able to track down
[20:11:06] baweaver: http://idiosyncratic-ruby.com/9-globalization.html
[20:11:11] tubbo: got rid of all my $0s and $1s :)
[20:11:12] baweaver: $CHILD_STATUS
[20:11:20] baweaver: that helps too
[20:11:36] baweaver: I tend to use named groups
[20:12:15] baweaver: /^.(?<tail>.+/.match('string') { |m| m[:tail] }
[20:12:25] baweaver: heh, typo but you get the point
[20:12:26] tubbo: interesting how $ARGV is a global but it's also a constant, ARGV.
[20:12:27] mblair_: has joined #RubyOnRails
[20:12:29] tercenya_: has joined #RubyOnRails
[20:12:40] baweaver: shenanigans methinks
[20:12:44] tubbo: baweaver: yeah that's what i do too. syntax for that sucks
[20:12:53] tubbo: i think it's because ARGV is used so much and Ruby discourages the use of globals at all times
[20:12:57] Spami_: has joined #RubyOnRails
[20:13:04] baweaver: because I can never count which was the last match
[20:13:08] tubbo: perhaps they aliased it to a constant so that people wouldn't have to use as many globals
[20:13:13] theery_: has joined #RubyOnRails
[20:13:15] code1o6: has joined #RubyOnRails
[20:13:41] grotewold: has joined #RubyOnRails
[20:14:09] baweaver: possible, who knows.
[20:14:23] marr123: has joined #RubyOnRails
[20:14:53] djbkd: has joined #RubyOnRails
[20:15:02] Plas: has joined #RubyOnRails
[20:15:08] workmad3: has joined #RubyOnRails
[20:15:11] pontiki_: has joined #RubyOnRails
[20:15:11] wwalker_: has joined #RubyOnRails
[20:15:15] tubbo: i know that's a big matz pet peeve
[20:15:26] Eq: has joined #RubyOnRails
[20:15:37] mclee_: has joined #RubyOnRails
[20:15:54] ejnahc_: has joined #RubyOnRails
[20:15:58] justin2: has joined #RubyOnRails
[20:16:07] jayne_: has joined #RubyOnRails
[20:16:09] MuffinPimp_: has joined #RubyOnRails
[20:16:21] buhman_: has joined #RubyOnRails
[20:16:25] hackeron: has joined #RubyOnRails
[20:16:27] jpterry: has joined #RubyOnRails
[20:16:28] cornerman: has joined #RubyOnRails
[20:16:28] patrick_star: has joined #RubyOnRails
[20:16:34] Synthead: has joined #RubyOnRails
[20:16:36] bbrowning: has joined #RubyOnRails
[20:16:38] cina: tubbo: thank you for your description regarding the #assign method! (I just saw your response, sorry about the delay)
[20:16:44] arathald: has joined #RubyOnRails
[20:16:50] tubbo: cina: lol no sweat, it's very useful
[20:16:51] charliesome: has joined #RubyOnRails
[20:17:18] Fire1o6: has joined #RubyOnRails
[20:17:22] Zackio: has joined #RubyOnRails
[20:18:09] smathy: ...a global constant :)
[20:18:45] smathy: ...an unfrozen global constant.
[20:18:51] tubbo: but i mean "globals" as in the syntax, "$global"
[20:18:53] smathy: (so basically a global variable)
[20:19:10] tubbo: yeah what's the difference between having an unfrozen global constant and a global var?
[20:19:16] tubbo: just the lack of warning when you try to change it?
[20:19:38] smathy: Not even, $ARGV is a read-only variable.
[20:20:27] smathy: ...well, you get an exception there rather than a warning :)
[20:21:33] cina: tubbo: +1, it is useful! I've just starting writing tests, after reading the Clean Code book. I am using simplecov on a small app and trying to reach > 90% coverage!
[20:21:57] maz-dev: has joined #RubyOnRails
[20:21:57] drale2k: has joined #RubyOnRails
[20:21:58] IceyEC: has joined #RubyOnRails
[20:22:00] tubbo: smathy: oh interesting. but ARGV isn't.
[20:22:02] tubbo: isn't*...
[20:22:45] smathy: Well, you can modify either in place (not frozen), but if you try to assign to $ARGV you get an exception, to ARGV you get the constant warning.
[20:23:17] cina: I have an action that raises a ActionController::BadRequest.new, is it possible to assert that in my test?
[20:23:20] smathy: ...and once you assign to ARGV they're not in sync any more.
[20:23:37] SteenJobs: has joined #RubyOnRails
[20:23:45] smathy: So yeah, of the two, $ARGV is safer to use.
[20:23:56] mices: gerep: that's not what i meant
[20:24:50] mices: i meant how am i gonna test an actionmailer class that will handle incoming mail when there's no mail server present to receive the mail
[20:25:06] baweaver: Huh, ruby source is using mixed spaces / tabs
[20:25:07] jaequery: has joined #RubyOnRails
[20:25:15] smathy: mices, http://guides.rubyonrails.org/testing.html#testing-your-mailers
[20:25:20] craysiii: thats not good.
[20:25:33] baweaver: Tell you what, I'll go hunting for Perlisms in the source docs this weekend and get some patches in.
[20:27:10] Palsson: has joined #RubyOnRails
[20:27:54] iateadonut: has left #RubyOnRails: ()
[20:29:47] sonofdirt: has joined #RubyOnRails
[20:30:11] baweaver: Asked Matz if that's of interest or wasted time, we'll see.
[20:31:32] kadoppe: has joined #RubyOnRails
[20:33:39] gambl0re: ActionController::ParameterMissing in RecipesController#new
[20:33:39] gambl0re: param is missing or the value is empty: recipe
[20:33:56] gambl0re: @recipe = params.require(:recipe).permit(:title, description)
[20:34:04] gambl0re: ^ line highlighted
[20:34:14] gambl0re: whats wrong?
[20:35:08] Jasaka: has joined #RubyOnRails
[20:35:49] arup_r: show the rails server log
[20:36:02] arup_r: there is the answer
[20:36:14] gerep: craysiii, update! It didn't work :( It tries do send transaction_cost as a parameter from Company :(
[20:36:47] gerep: craysiii, I need to use f.fields_for :transaction_costs but I don't know why it is listing all the @company.transaction_costs
[20:37:02] gambl0re: where do i see the log
[20:37:35] gerep: gambl0re, debug your code and check for the params
[20:37:55] gerep: gambl0re, and also, there is a missing : in description)
[20:38:48] arup_r: gambl0re: where you ran `rails s` or go to the tails -f log/development.log file
[20:39:27] t_mmyv: has joined #RubyOnRails
[20:39:54] gambl0re: i see...thnkas
[20:41:10] arup_r: sorry it is `tail -f ..`
[20:41:52] gerep: craysiii, Now I understand the problem. In my controller I'm doing this: @company = Company.find(param[company_id]) so it actually should load all its transactions_costs objects :(
[20:42:04] grotewold: has joined #RubyOnRails
[20:42:15] gerep: craysiii, It would work as expected if I did this: @company = Company.new
[20:42:43] gambl0re: does anybody here use simple_form gem?
[20:42:54] gambl0re: is there any advantages using it instead of form_for
[20:43:07] gambl0re: i dont see how it makes it easier
[20:43:09] gambl0re: to make forms
[20:43:10] gerep: gambl0re, it will simplify some process for you
[20:43:21] gerep: *processes
[20:43:35] gerep: You'll see that in the README
[20:44:03] fgo: has joined #RubyOnRails
[20:44:30] grotewold: has joined #RubyOnRails
[20:44:40] gambl0re: oh yes i see arum_p the log files. namastay!
[20:45:00] nettoweb: has joined #RubyOnRails
[20:46:52] grotewold: has joined #RubyOnRails
[20:47:29] arup_r: gambl0re: pranam! :D
[20:47:58] annlewis: has joined #RubyOnRails
[20:48:06] nkr: has left #RubyOnRails: ("Linkinus - http://linkinus.com")
[20:49:12] darrencauthon: has joined #RubyOnRails
[20:49:13] grotewold: has joined #RubyOnRails
[20:49:49] tvw: has joined #RubyOnRails
[20:49:51] someish: has joined #RubyOnRails
[20:49:52] arup_r: I am installing some gems.. then I will sleep..
[20:50:09] arup_r: bundle install taking too much time
[20:50:39] michael_mbp: has joined #RubyOnRails
[20:51:03] darrenca_: has joined #RubyOnRails
[20:51:53] jeffmess: has joined #RubyOnRails
[20:52:43] baweaver: has joined #RubyOnRails
[20:53:54] havenwood: has joined #RubyOnRails
[20:54:16] NBarnes: head :bad_request, responseText: 'Blank vendor name in VendorsForIsoController#edit'
[20:54:26] NBarnes: Isn't setting responseText in the returned HTTP?
[20:57:24] chipotle: has joined #RubyOnRails
[20:59:51] Detch: has joined #RubyOnRails
[21:00:43] craysiii: gerep can you post in gist your code
[21:00:51] gerep: craysiii, sure
[21:01:05] craysiii: sorry i was in a meeting
[21:01:14] herbst: has joined #RubyOnRails
[21:01:20] x-light: has joined #RubyOnRails
[21:01:45] based_: has joined #RubyOnRails
[21:02:03] gerep: craysiii, no problem at all! :D
[21:02:04] gerep: craysiii, https://gist.github.com/gerep/4000dff5065475b3e5cf
[21:02:12] gerep: craysiii, this is the code without your suggestion
[21:02:16] Limix: has joined #RubyOnRails
[21:02:25] SteenJobs: has joined #RubyOnRails
[21:02:33] smathy: gambl0re, why would you even be using params in the new action?
[21:02:37] gerep: craysiii, in this code the params are sent as expected, something like this: "company"=>{"transaction_costs_attributes"=>{"0"=>{"app_id"=>"5", "id"=>"1"}}}"
[21:03:08] gerep: craysiii, but when I use your suggestion and specify the @transaction_cost variable in the fields_for, it sends the parameter like this: "company"=>{"transaction_costs"=>{"0"=>{"app_id"=>"5", "id"=>"1"}}}"
[21:03:21] gerep: And that's where the problem is
[21:03:34] jeffmess: hey im looking to implement single sign on service and to authenticate across multiple microservices... can anyone recommend some resources to help me implement something along these lines in rails?
[21:03:36] craysiii: can i see the code you implemented upon my suggestion?
[21:03:56] Ven: has joined #RubyOnRails
[21:05:49] Cervajz: has joined #RubyOnRails
[21:05:56] gerep: craysiii, here: https://gist.github.com/gerep/4000dff5065475b3e5cf
[21:05:57] MartinElvar: has joined #RubyOnRails
[21:06:02] gerep: craysiii, added your suggestion
[21:06:25] gerep: craysiii, the problem with that is the way the params are generated
[21:06:52] macq: has joined #RubyOnRails
[21:07:12] lapide_viridi: has joined #RubyOnRails
[21:07:25] gerep: craysiii, rails will consider the transaction_cost as an attribute of company
[21:07:44] gerep: craysiii, and not a nested_attribute that belongs to TransactionCost
[21:07:45] craysiii: so the difference is the _attribute appended to transaction_costs?
[21:07:48] bstrarm: has joined #RubyOnRails
[21:08:02] gerep: craysiii, got that? D:
[21:09:24] n00bDev: has joined #RubyOnRails
[21:09:49] manfrin: has joined #RubyOnRails
[21:09:53] adamholt: has joined #RubyOnRails
[21:09:56] charliesome: has joined #RubyOnRails
[21:09:57] craysiii: https://gist.github.com/craysiii/2d06d2860eef973a8b73 try that
[21:09:59] s2013: has joined #RubyOnRails
[21:10:10] paulcsmith: has joined #RubyOnRails
[21:10:18] tskogberg: has joined #RubyOnRails
[21:10:25] graft_: has joined #RubyOnRails
[21:10:25] graft_: has joined #RubyOnRails
[21:11:08] gerep: craysiii, I will :D
[21:11:25] Mendenhall: has joined #RubyOnRails
[21:12:14] gambl0re: = sign in haml will produce an erb tag (<%= ... %>)
[21:12:34] gambl0re: - sign in haml will produce an erb tag that will not output(<% ... %>)
[21:13:30] cnk: probably. what do the docs say?
[21:13:32] smeade: has joined #RubyOnRails
[21:13:50] gambl0re: for those that know haml, is it true?
[21:13:59] gerep: craysiii, didn't work
[21:14:06] craysiii: did it give an error
[21:14:16] moeabdol: has joined #RubyOnRails
[21:14:19] gerep: craysiii, I had to make a change, in the fields_for @company.transaction_costs.build
[21:14:34] gerep: craysiii, No, it doesn't return any error, it only generates the wrong params
[21:15:25] gerep: craysiii, this: "company"=>{"transaction_cost"=>{"app_id"=>"5"}}
[21:15:42] x-light: gambl0re: haml doesn't produce erb taks...
[21:17:10] n00bDev: anyone that uses honeybadger here, does application backtrace start from bottom up?
[21:17:40] mozzarella: has joined #RubyOnRails
[21:17:46] djbkd: has joined #RubyOnRails
[21:18:25] Guest61316: has joined #RubyOnRails
[21:18:53] dnewkerk: has joined #RubyOnRails
[21:19:53] nettoweb: has joined #RubyOnRails
[21:22:07] yfeldblum: has joined #RubyOnRails
[21:22:46] GnuYawk: has joined #RubyOnRails
[21:23:13] Cervajz: has joined #RubyOnRails
[21:24:39] noodle: has joined #RubyOnRails
[21:25:01] Scripore: has joined #RubyOnRails
[21:25:17] based_: has joined #RubyOnRails
[21:25:58] jhack: has joined #RubyOnRails
[21:26:38] VeryBewitching: has joined #RubyOnRails
[21:26:54] krisquigley: has joined #RubyOnRails
[21:27:25] sonofdirt: has joined #RubyOnRails
[21:28:05] zcreative: has joined #RubyOnRails
[21:28:29] Cervajz_: has joined #RubyOnRails
[21:28:35] Radar: GOOD MORNING!
[21:28:48] Radar: n00bdev: I don't know how you keep getting around my /ignore..
[21:28:54] w0rd-driven: has joined #RubyOnRails
[21:30:39] michael_mbp: has joined #RubyOnRails
[21:30:46] zcreative: Would anybody know why in my request no sort of ORIGIN header is set?
[21:31:30] sonofdirt: has joined #RubyOnRails
[21:31:41] tfitts: I just moved my development box to cloud9 and now each time I make a change webrick takes FOREVER after getting the first request before it gives a page. I'm guessing I had a setting my previous environment that would make webrick actively look for changes so it wasn't so slow to reload upon getting a request. Anyone have any idea what it would be?
[21:32:07] manfrin: not precompiling assets?
[21:32:37] Radar: tfitts: probably webrick. Try using something else.
[21:34:03] Radar: Like Puma or Thin.
[21:34:20] Radar: ACTION is not going to be much help this morning because 1) was awake at 5 and 2) I have a flight in < 10 minutes
[21:34:28] gambl0re: did herkou stop providing free service?
[21:34:38] VeryBewitching: Radar: Travel safely.
[21:34:44] charliesome: has joined #RubyOnRails
[21:34:50] Radar: Should do. Flying is the safest form of transportation.
[21:34:52] Radar: gambl0re: Not yet :)
[21:34:55] craysiii: heroku has free service
[21:34:56] tfitts: Radar: would you suggest one over the other? I've used thin before but never puma
[21:35:09] Radar: tfitts: Really it just comes down to personal preferenc.e
[21:35:25] VeryBewitching: tfitts: Puma was easy to setup the first time I did it
[21:35:31] Radar: gambl0re: Heroku might start asking you to upgrade to their hobby plans if your dyno runs more than 18 hours a day.
[21:35:49] VeryBewitching: Which is fair imo.
[21:36:13] VeryBewitching: And the hobby plan is $7.00
[21:36:22] Radar: People who leave text tones on their iPhones: monsters, or bastards?
[21:36:32] Radar: i.e. every time they tap it makes that click sound
[21:36:38] Radar: I think "bastards" is more fitting.
[21:36:40] VeryBewitching: <-- Android personally
[21:38:06] huntercole: has joined #RubyOnRails
[21:38:20] nettoweb: has joined #RubyOnRails
[21:38:22] huntercole: hello. can anyone tell me why my rails server keeps crashing when i try to start it?
[21:38:29] huntercole: #rhttps://mackenziechild.me/12-in-12/1/
[21:38:31] huntercole: https://mackenziechild.me/12-in-12/1/
[21:38:54] weaksauce: huntercole not with a link to a tutorial
[21:38:59] huntercole: it crashes after: rails g devise User and rake db:migrate
[21:39:08] Radar: huntercole: !didntwork
[21:39:08] helpa: huntercole: What "didn't work"? Did your server not start? Did your computer explode? Did your webpage turn bright pink? Did your client not pay your bill on time? You may have to be more specific. A Gist (http://gist.github.com) of the code that doesn't work (and the error you are getting) will be helpful.
[21:39:12] weaksauce: gist the full stack trace huntercole
[21:39:21] Radar: huntercole: If we can't see what's happening it makes it really hard for us to help you.
[21:39:50] huntercole: sorry. i'm a total newb to ror. i learned some php years back. i am following this tutorial but keep getting errors.
[21:40:23] baweaver: has joined #RubyOnRails
[21:40:28] Radar: huntercole: Please follow all lighted signs and crew member instructions.
[21:40:41] Radar: huntercole: Right now we would like to see _how_ it is crashing. Show us the full output and we'll help you after that.
[21:41:18] paulcsmith: has joined #RubyOnRails
[21:41:50] huntercole: Hunters-MacBook-Pro:raddit hunter$ rails s => Booting WEBrick => Rails 4.2.3 application starting in development on http://localhost:3000 => Run `rails server -h` for more startup options => Ctrl-C to shutdown server Exiting /Users/hunter/.rvm/gems/ruby-2.2.1/gems/devise-3.3.0/lib/devise/rails/routes.rb:457:in `ensure in with_devise_exclusive_scope': undefined method `merge!' for #<ActionDispatch::Routing::Mapper::Scope:0x007
[21:42:07] Radar: huntercole: Gist it please.
[21:42:08] Jasaka: has joined #RubyOnRails
[21:42:15] x-light: Radar: safe flight, man :)
[21:42:17] Radar: huntercole: https://gist.github.com
[21:42:20] Radar: x-light: thank you :)
[21:42:21] drale2k: has joined #RubyOnRails
[21:42:29] huntercole: http://pastebin.com/qgJu9jKQ
[21:42:37] Radar: huntercole: y u no follow instructions?
[21:42:45] Radar: Yes, I know you're new but you've been told 3 times now to Gist :(
[21:42:54] adam|: huntercole: can you gist the routes.rb file
[21:43:07] adam|: huntercole: actually, nm. exception is in devise.
[21:43:23] baweaver: has left #RubyOnRails: ()
[21:43:25] baweaver: has joined #RubyOnRails
[21:43:36] huntercole: https://gist.github.com/a4aa6e719c4da8f141b8.git
[21:43:38] Radar: OR IS IT? dun dun dunnnnnn
[21:43:50] Pupeno: has joined #RubyOnRails
[21:43:55] Radar: huntercole: Gist config/routes.rb too please.
[21:44:51] sonofdirt: has joined #RubyOnRails
[21:44:54] huntercole: https://gist.github.com/aeeda8169eba7ba3a947.git (routes.rb)
[21:45:07] fgo: has joined #RubyOnRails
[21:45:18] DoctorMo_: has joined #RubyOnRails
[21:46:03] moeabdol: has joined #RubyOnRails
[21:46:56] huntercole: does that gist work for you?
[21:46:58] weaksauce: huntercole gist your model/user.rb
[21:47:39] adam|: huntercole: Share the URL in the browser bar, not the sidebar.
[21:47:44] adam|: huntercole: saves us from having to clone.
[21:47:57] weaksauce: adam| you can drop the .git and it will work but yeah
[21:48:09] adam|: weaksauce: did it? I was getting 404 without cloning.
[21:48:12] huntercole: https://gist.github.com/anonymous/7517796498d867c7db32 (user.rb)
[21:48:47] annlewis: has joined #RubyOnRails
[21:48:56] w0rd-driven: has joined #RubyOnRails
[21:49:05] weaksauce: adam| yeah it worked for me if i copied and pasted and dropped the .git
[21:49:15] adam|: weaksauce: lazy adam is lazy :)
[21:49:21] Radar: huntercole: no need to have the .git on the end
[21:49:27] Radar: huntercole: Just copy and paste the URL from your browser
[21:49:32] s2013: https://control.authsmtp.com/signin.php does htis work for anyone else?
[21:49:36] sonofdirt: has joined #RubyOnRails
[21:49:51] Radar: see you all later. Flying time now.
[21:49:56] s2013: where you going Radar
[21:49:58] VeryBewitching: s2013: The view renders, if that's what you mean
[21:50:07] s2013: hmm for some rason it keeps timing out for me
[21:50:16] adam|: huntercole: you stuck on 3.3 for any reason? I'd go up to 3.4
[21:50:19] s2013: we use them for our email servers.. and all our emails are timing out
[21:50:50] adam|: s2013: page loads.
[21:51:28] s2013: any reason why outgoing emails would be timing out? its probably the outgoing servers right
[21:51:36] adam|: what's the hostname for smtp?
[21:51:44] huntercole: adam| no reason. i'm not sure how to change that...? this is literally my first run with RoR.
[21:51:56] adam|: huntercole: gist Gemfile please.
[21:52:00] VeryBewitching: s2013: Look up your domain name, get the MX records
[21:52:11] VeryBewitching: s2013: Then try to do a manual handshake.
[21:52:18] s2013: was working fine until like the last 20 mins
[21:52:34] huntercole: https://gist.github.com/anonymous/0b6b56b8d60bd2665ec6
[21:52:37] VeryBewitching: s2013: But you can route to other networks, google, yahoo, etc.?
[21:52:40] weaksauce: huntercole can you put the entire project on gh?
[21:52:53] s2013: yeah.. the website loads too except the login page (for auth smtp)
[21:53:03] gambl0re: when i click the submit button when submitting a form does that immediately execute the create function?
[21:53:04] VeryBewitching: huntercole: Gem devise at the end of your Gemfile
[21:53:06] weaksauce: huntercole do a spring stop from the command line
[21:53:08] huntercole: i thought i was doing that by the instructions in the tutorial but i dont' see it in my github account. i need to really learn github but i was too anxious to jump into programming.
[21:53:12] adam|: huntercole: change '3.3.0' in devise to '3.4.0', bundle update, restart server, try again.
[21:53:15] s2013: we use google for the incoming email and authsmtp for our outgoing
[21:53:27] weaksauce: actually bundle exec spring stop
[21:53:49] adam|: s2013: it's not just you. I can't connect to their smtp server either.
[21:54:01] s2013: do you use them as well?
[21:54:07] huntercole: adam|: bingo! thanks!
[21:54:14] adam|: No - just manually telnetting to mail.authsmtp.com port 25.
[21:54:37] adam|: Actually, 2525 is open
[21:54:46] adam|: And responding. Maybe try that port instead.
[21:54:50] s2013: oh seems to have worked again
[21:54:56] s2013: all the emails started going out
[21:55:09] adam|: 587 is working too
[21:55:12] adam|: 25 is still dead.
[21:55:43] Ven: has joined #RubyOnRails
[21:55:44] s2013: we use 2525
[21:55:53] DoctorMonocular: has joined #RubyOnRails
[21:56:04] Scriptonaut: has joined #RubyOnRails
[21:56:19] s2013: ok seems to be working now
[21:56:23] gambl0re: https://gist.github.com/anonymous/926f6691ef729e6c45ad .....what is the path of @recipe inside the create method redirect_to
[21:56:30] gambl0re: help please...
[21:56:58] s2013: its a rails shortcut basically gambl0re
[21:57:01] Scriptonaut: hey guys, I have a this render line: render :partial => 'listings/listing_agent', :collection => listing.listing_people.internal.publicly_visible.not_primary, :as => :listing_person. When the collection is [], it's still trying to render it, does anybody know why it would do this?
[21:57:07] s2013: it goes to the recipe show page
[21:57:12] Scriptonaut: when you render a colleciton, and the collection is empty, doesn't it just not render anything?
[21:57:18] adam|: gambl0re: Auto generated by the polymorphic component I believe. likely recipe_path(@recipe) in long form.
[21:57:19] gambl0re: shortcut for what?
[21:57:38] VeryBewitching: gambl0re: It depends on your routes really.
[21:57:51] gambl0re: so its looking for the show route?
[21:57:53] adam|: Scriptonaut: any error message?
[21:58:06] gambl0re: where can i read about this?
[21:58:10] Scriptonaut: ya, the error messages are inside the partial saying, "Hey, our object is nil wth"
[21:58:10] gambl0re: anyone have a link? thanks
[21:58:17] Scriptonaut: not word for word, but that's the gist
[21:58:20] gambl0re: this shit is confusing me
[21:58:23] adam|: gambl0re: http://edgeguides.rubyonrails.org/routing.html
[21:58:24] VeryBewitching: http://guides.rubyonrails.org/routing.html
[21:58:29] adam|: or non-edge ^
[21:58:39] Scriptonaut: so it's rendering the partial, and passing it nil rather than an object
[21:58:51] Scriptonaut: instead of just not rendering at all since the collection is an empty array
[21:59:00] adam|: Scriptonaut: That's weird as heck. Rails ver?
[21:59:36] s2013: anyone else works in an office thats always really cold?
[21:59:52] Scriptonaut: which is why in 2 minutes I'm headin home to work there
[22:00:31] Scriptonaut: by far one of my favorite perks of being a developer is working from home
[22:00:36] gambl0re: i know about routes
[22:00:45] gambl0re: i just done understand where its gettings its path from
[22:00:46] s2013: yeah i work from home mostly
[22:00:59] s2013: well not "home" but i travel a lot
[22:00:59] Scriptonaut: adam|: thanks for giving it some thought, I'll mess around with it in a bit and come back if I remain stuck
[22:01:27] adam|: gambl0re: I believe it calls polymorphic_path, which then determines class name, object persisted, etc, calls to_param on object, generates route method to call.
[22:01:53] adam|: Scriptonaut: I'm suspicious about the `as`. I've never seen it render an empty collection with the partial and the empty array.
[22:02:10] adam|: Scriptonaut: what if you just sub [] instead of your collection. same result?
[22:02:19] s2013: yea Scriptonaut
[22:02:35] adam|: gambl0re: magic :( PolymorphicRoutes can be a blessing and a curse.
[22:03:31] adam|: Scriptonaut: without `as`? sounds like a bug or regression to me.
[22:03:37] Scriptonaut: oh, no it still has as
[22:03:46] Scriptonaut: I gotta split now though, I'll test that in a few, thnaks
[22:03:46] gambl0re: i'll read more about it. thnaks
[22:03:53] workmad3: has joined #RubyOnRails
[22:03:59] Scriptonaut: we both mispelled thanks at the same time in the same way
[22:04:13] theery: has joined #RubyOnRails
[22:05:37] Scripore: has joined #RubyOnRails
[22:06:07] weaksauce: gambl0re be explicit about the path if you don't want to rely on the magic
[22:06:32] gambl0re: ok if i understand correctly..
[22:06:40] gambl0re: redirect_to(post) = redirect_to(post_path)
[22:06:48] adam|: post_path(post)
[22:07:02] gambl0re: redirect_to(new_post) = redirect_to(new_post_path)
[22:07:21] adam|: new_post = posts_path method POST
[22:07:46] adam|: sorry, that's if we're dealing with @post which is a new record
[22:07:59] adam|: not new_post_path. There is a bit of ambiguity there.
[22:08:51] weaksauce: gambl0re what do you *want* it to redirect to?
[22:08:55] Rodya_: has joined #RubyOnRails
[22:09:21] weaksauce: the show page? the edit page? the index page of the posts? the root of the site?
[22:09:23] gambl0re: im just following this video
[22:09:31] gambl0re: and i want to understasnd what its doing
[22:09:41] gambl0re: redirect_to @recipe, notice: "reciped added"
[22:09:49] gambl0re: inside the create function
[22:10:08] gambl0re: it also has inside the create function, first line says @recipe = Recipe.new(recipe_params)
[22:10:15] adam|: It's calling polymorphic_url, which does a bunch of fancy stuff depending on condition and scenario.
[22:11:02] rakm: has joined #RubyOnRails
[22:11:12] adam|: In this instance, @recipe is persisted, and polymorphic_url knows to make it recipe_path(@recipie) as long form. It does this because of Rails conventions and the fact that @recipe is now persisted in the database with an ID.
[22:11:36] KensoDev: has joined #RubyOnRails
[22:11:55] smathy: gambl0re, in all cases `redirect_to(something)` is the same as `redirect_to(url_for(something))`
[22:12:08] adam|: If this was a form tag, the scenario is different, depending on if the @recipe is persisted.
[22:12:38] gambl0re: redirect_to (which, in fact, uses url_for) so you can write redirect_to(post) in your controllers;
[22:12:54] adam|: if post is a valid Post object, and persisted, yes.
[22:13:11] IrishGringo: has joined #RubyOnRails
[22:13:22] smathy: redirect_to(Post.new) works too adam|
[22:13:33] adam|: smathy: Yah? Never done it. Would long form it in that instance.
[22:14:37] smathy: redirect_to with a hash or record just calls url_for
[22:14:46] huntercole: where would this command go? before_filter :authenticate_user!, :except => [:index, :show]
[22:15:02] huntercole: "We can do that by adding a before_filter to our controller."
[22:15:09] adam|: huntercole: either the controller you want authentication in, or ApplicationController for global auth
[22:15:37] adam|: huntercole: goes inside the class definition. class PostsController < ApplicationController; (next line) before_filter :authenticate_user!
[22:15:56] adam|: huntercole: Dunno what tutorial you are following or Rails version, but new Rails is before_action - before_filter works but is deprecated. Just FYI.
[22:16:15] krisquigley: has joined #RubyOnRails
[22:16:44] huntercole: https://mackenziechild.me/12-in-12/1/ -- does anyone have a better one for learning some RoR?
[22:17:25] adam|: I think there was Rails Tutorials by Daniel Kohoe? or something to that effect.
[22:17:31] adam|: Railscasts are always good, tho a bit out of date.
[22:18:05] adam|: huntercole: are you following that tutorial? I see they use `before_action` in it..
[22:18:06] weaksauce: the rails tutorial does some odd things
[22:18:39] gambl0re: who is daniel kohoe
[22:18:43] gambl0re: i need to do more tutorilas
[22:19:26] huntercole: adam|: i've followed that tutorial and restarted 5-6 times now atleast and it seems like he leaves some info out.
[22:19:30] weaksauce: gambl0re did you get the book that radar put out?
[22:19:37] weaksauce: it's basically one long tutorial
[22:19:37] sinkensabe: has joined #RubyOnRails
[22:19:42] rromanchuk: has joined #RubyOnRails
[22:19:56] adam|: Oh - Rails Apps tutorials are paid now.
[22:20:10] helpa: Rails 4 in Action - http://manning.com/bigg2 - An excellent book combining Rails and TDD/BDD development. Written by Rebecca Skinner, Steve Klabnik, Ryan Bigg, Yehuda Katz
[22:20:32] gambl0re: are free tutorials out there?
[22:20:39] helpa: http://guides.rubyonrails.org/ - Ruby on Rails guides. Recommended reading.
[22:21:05] VeryBewitching: Then ya, books.
[22:21:15] gambl0re: ill check reddit...people always find good stuff and post it there
[22:21:20] Scripore: has joined #RubyOnRails
[22:21:21] weaksauce: gambl0re yes free tutorials are out there. but they vary in quality quite severely
[22:21:37] VeryBewitching: weaksauce: I always had to come back to the guides.
[22:21:45] smathy: gambl0re, seriously, you PM me and then bail to come back here?
[22:22:09] michael_mbp: has joined #RubyOnRails
[22:22:47] adam|: I forget how intimidating Rails can be
[22:23:05] jholm: has joined #RubyOnRails
[22:23:47] adam|: for newcomers.
[22:23:50] VeryBewitching: adam|: I think I would have benefited from a map of it's bootstrap early on
[22:24:16] VeryBewitching: But yes, it's quite a subject.
[22:24:23] VeryBewitching: Rewarding to learn though :D
[22:24:52] adam|: It's old hat now - but I can relate, as I consume as much as I can about Elixir and Phoenix to make heads and tails of OTP.
[22:25:17] poli: has joined #RubyOnRails
[22:25:29] adam|: I'm on-boarding some non-Ruby/Rails people a few weeks from now in preparation for the Rumble. Should be interesting...
[22:27:17] manfrin: has joined #RubyOnRails
[22:27:33] VeryBewitching: Good luck to you and your team
[22:28:01] w0rd-driven: has joined #RubyOnRails
[22:28:04] adam|: Much thanks.
[22:28:30] duncannz: has joined #RubyOnRails
[22:28:36] gambl0re: Polymorphic URL helpers are methods for smart resolution to a named route call when given an Active Record model instance. They are to be used in combination with ActionController::Resources.
[22:28:36] gambl0re: These methods are useful when you want to generate correct URL or path to a RESTful resource without having to know the exact type of the record in question.
[22:28:41] doublemalt_: has joined #RubyOnRails
[22:28:42] maz-dev: has joined #RubyOnRails
[22:28:56] gambl0re: interesting...
[22:29:18] baweaver: has joined #RubyOnRails
[22:29:19] ariedler: has joined #RubyOnRails
[22:30:05] johnflux_: has joined #RubyOnRails
[22:30:17] adam|: VeryBewitching: you in ON?
[22:30:53] adam|: VeryBewitching: Cool - a bit further than Niagara.
[22:30:56] gambl0re: iim in toronto!
[22:31:06] pawnbox: has joined #RubyOnRails
[22:31:06] VeryBewitching: adam|: Ah, wine country :D
[22:31:18] VeryBewitching: gambl0re: Nice.
[22:31:27] gambl0re: tell harper he sucks
[22:31:38] adam|: gambl0re: good city to be a dev, in, for sure.
[22:31:59] gambl0re: if you got the right skills i guess
[22:32:06] adam|: we have a growing grassroots dev community here - but you're too far to participate I think :P
[22:32:39] VeryBewitching: gambl0re: I take no responsibility for our PM :)
[22:32:46] jalnt: has joined #RubyOnRails
[22:33:03] gambl0re: just dont vote for him...
[22:33:04] Scriptonaut: has left #RubyOnRails: ()
[22:33:25] gambl0re: we rob ford and that was already bad enough
[22:34:46] gambl0re: im trying to follow this guy's tutorial and it seems like he doesnt even know wtf he's doing himself...he's just writing stuff without explaining nothing
[22:39:44] simkessy: Ottawa whats up!
[22:39:45] jenrzzz: has joined #RubyOnRails
[22:40:23] VeryBewitching: simkessy: You in Ottawa?
[22:40:36] jgt: has joined #RubyOnRails
[22:40:37] VeryBewitching: ACTION is in Bridlewood.
[22:42:26] simkessy: I don't know how to do that secret message thing you just did :P
[22:42:52] simkessy: But I'm in the Nepean area / merivale mall ish
[22:43:01] simkessy: we're practically neighbours
[22:43:07] drale2k: has joined #RubyOnRails
[22:43:32] w0rd-driven: has joined #RubyOnRails
[22:44:08] VeryBewitching: Old Richmond to Hunt Club, ya you're about 15 minutes away in light traffic.
[22:45:40] VeryBewitching: And it wasn't a secret message, it's /me
[22:45:49] VeryBewitching: ACTION demonstrates.
[22:45:53] simkessy: ACTION testing
[22:46:13] VeryBewitching: ACTION gets more coffee ;)
[22:46:14] fgo: has joined #RubyOnRails
[22:46:53] simkessy: Ahh gotcha, yea new to this irc thing
[22:47:17] simkessy: It's cool there's so many Candians here
[22:49:30] annlewis: has joined #RubyOnRails
[22:51:24] simkessy: It's a start :P
[22:51:53] adam|: :) I think there's 4 of us. REPRESENT!
[22:53:15] adam|: Those of you who are learning - see if there is an OpenHack or Ruby meetup in your area where someone would work with/mentor you.
[22:53:24] adam|: Helps to see someone build out a simple app in person, who can answer questions.
[22:56:31] ascarter: has joined #RubyOnRails
[22:57:18] gambl0re: yea im gonna start going to some of them....
[22:57:43] gambl0re: never been to one before...dont know what to expect
[22:59:32] adam|: I know ours are open and welcoming... but our community is smaller and it helps have community leaders who want to encourage collaboration and community growth
[23:00:12] adam|: Larger municipalities might be different. That said, if you are ever in Niagara, I'll buy you a craft beer and we can talk Ruby.
[23:00:21] MartinElvar: has joined #RubyOnRails
[23:00:24] simkessy: I know Shopify has some sort of programming related events once in a while and there might be something on meetups.com
[23:01:07] simkessy: Since Shopify is a big Ruby (Rails too?) user, going to their events could be really informative
[23:01:13] adam|: That's a good point.
[23:01:33] adam|: And as they are always hiring, worth exploring on the job training/paid internship too.
[23:02:01] gambl0re: are they normally free? and do they provide food/drinks?
[23:02:11] gambl0re: cause normally i get hungry
[23:02:40] adam|: Normally always free - most OpenHacks provide food (we provide pizza and pop norm). Our DevTricks events no food or drink provided.
[23:04:16] blackmes1: has joined #RubyOnRails
[23:06:30] rakm: is there a way to specify a db name when running rake db:reset ?
[23:06:55] adam|: You can provide an environment, which would use database name in database.yml
[23:07:15] rakm: I'm generating some mock data for the purpose of exporting into a json file and I want to run the rake task on a new database that I create before
[23:07:16] smathy: rakm, or just an <%= ENV['DB_NAME'] %> in your database.yml
[23:07:29] rakm: mm, I want to do it inline
[23:07:47] rakm: and not have interfere with the rest of the applicaiton
[23:08:27] rakm: something like `rake db:reset db:run_mock_generator db:export_to_json`
[23:08:36] adam|: I'd maybe use the sequel gem
[23:08:49] adam|: and make a task that does the reset, mock, and export.
[23:08:57] arBmind1: has joined #RubyOnRails
[23:09:00] adam|: You could use AR too, if you felt like it.
[23:09:34] w0rd-driven: has joined #RubyOnRails
[23:09:38] rakm: yeah, using factory girl (someone else already did the core work, i'm just trying to make it work)
[23:10:38] rakm: browsing S/O, it looks like I can specify a db configuration with ActiveRecord::Base.establish_connection
[23:11:03] rakm: and pass in appropriate config there, but I don't think that connection config will persist between rake tasks
[23:11:23] tenderlove: has joined #RubyOnRails
[23:11:33] bronson: has joined #RubyOnRails
[23:13:37] Pupeno: has joined #RubyOnRails
[23:14:04] sonofdirt: has joined #RubyOnRails
[23:19:13] DoctorMonocular: has joined #RubyOnRails
[23:22:03] ascarter: has joined #RubyOnRails
[23:24:18] ascarter: has joined #RubyOnRails
[23:24:47] p8m: has joined #RubyOnRails
[23:28:43] strcmp1: has joined #RubyOnRails
[23:29:27] SteenJobs: has joined #RubyOnRails
[23:40:07] sdwrage: has joined #RubyOnRails
[23:40:17] DoctorMonocular: has joined #RubyOnRails
[23:40:40] veg: has joined #RubyOnRails
[23:43:34] banister: has joined #RubyOnRails
[23:44:21] DoctorMonocular: has joined #RubyOnRails
[23:47:23] fgo: has joined #RubyOnRails
[23:50:15] annlewis: has joined #RubyOnRails
[23:52:33] workmad3: has joined #RubyOnRails
[23:55:51] baweaver: has joined #RubyOnRails
[23:56:02] p8m: has joined #RubyOnRails
[23:58:57] northfurr: has joined #RubyOnRails
[23:59:38] johnflux_: has joined #RubyOnRails