« Back to channel list

#RubyOnRails - 28 August 2015

« Back 1 day Forward 1 day »
[00:00:12] seank_: has joined #RubyOnRails
[00:00:13] Guest74293: has joined #RubyOnRails
[00:00:55] nya: has joined #RubyOnRails
[00:01:47] iateadonut: has joined #RubyOnRails
[00:03:49] Ropeney: has joined #RubyOnRails
[00:04:34] anabelle: has joined #RubyOnRails
[00:05:23] podman: has joined #RubyOnRails
[00:06:36] charliesome: has joined #RubyOnRails
[00:07:40] safety_cut: has joined #RubyOnRails
[00:07:57] Radar: first result
[00:07:58] Radar: my own blog post
[00:08:58] baweaver: I'm more amused by Super Radar in the comments
[00:09:09] joshkovach: has joined #RubyOnRails
[00:09:40] mary5030: has joined #RubyOnRails
[00:09:58] lipoqil: has joined #RubyOnRails
[00:11:24] jesterfraud: has joined #RubyOnRails
[00:15:08] Radar: Yes that is I
[00:15:40] Radar: I won a Ruby Hero award in 2011 and the next Railscamp some friends handed me a Superman suit and so I wore it all camp.
[00:16:09] baweaver: Well played friends, well played
[00:17:04] renews: has joined #RubyOnRails
[00:17:41] charliesome: has joined #RubyOnRails
[00:21:32] voltalio: has joined #RubyOnRails
[00:24:03] adamaig: has joined #RubyOnRails
[00:25:24] arooni-mobile: has joined #RubyOnRails
[00:26:29] adamaig: Hello, I am running rails 3.0.20, and I noticed in my logs the following: [26192]: Started HEAD "/splash", and then NoMethodError (undefined method `to_sym' for nil:NilClass):, and the stacktrace points to here: vendor/bundle/ruby/1.9.1/bundler/gems/rails-1f3508cef03d/actionpack/lib/action_controller/metal/instrumentation.rb:22:in `map'
[00:26:46] ecnalyr: has joined #RubyOnRails
[00:27:07] Radar: adam___: Can you reproduce the issue in a new app?
[00:27:10] jeadre: has joined #RubyOnRails
[00:29:22] adamaig: Radar: I haven't tried, but I suspect I would not be able to repro in an upgraded app because the code where the failure occurs has been rewritten in 3.1
[00:29:34] Radar: adam___: I don't think we can help you then.
[00:29:47] Radar: We can't see any code that reproduces the issue and that makes it really hard for us to point to where the issue is.
[00:29:50] Radar: Maybe hire a consultant?
[00:30:23] adamaig: Radar: what version of the app would be acceptable to test in, rails 3.2 HEAD?
[00:30:42] Radar: adam___: Anything that reproduces the issue.
[00:33:18] christiandsg: has joined #RubyOnRails
[00:37:16] joshkovach: has joined #RubyOnRails
[00:42:32] baweaver: has joined #RubyOnRails
[00:47:44] Swappticon: has joined #RubyOnRails
[00:51:42] craysiii: has joined #RubyOnRails
[00:51:44] Limix: has joined #RubyOnRails
[00:56:21] coffeejunk: has joined #RubyOnRails
[00:57:29] sevenseacat: has joined #RubyOnRails
[00:58:32] siemprefresco: has joined #RubyOnRails
[00:59:03] jeadre: has joined #RubyOnRails
[00:59:40] nya: has joined #RubyOnRails
[00:59:57] rrawlins: has joined #RubyOnRails
[01:00:59] seank_: has joined #RubyOnRails
[01:01:22] northfurr: has joined #RubyOnRails
[01:04:11] Rubie: has joined #RubyOnRails
[01:08:53] pontiki: i'm wondering what the first application code line of the stacktrace is
[01:08:58] joshkovach: has joined #RubyOnRails
[01:11:12] renews: has joined #RubyOnRails
[01:12:25] joshkovach: has joined #RubyOnRails
[01:13:37] Axy: has joined #RubyOnRails
[01:13:37] Axy: has joined #RubyOnRails
[01:16:06] iateadonut: i just pushed a new commit that had js in the assets folder, and on my server, the js file is not showing up (but it shows up fine on my localhost)
[01:17:22] tjbiddle: has joined #RubyOnRails
[01:17:51] pontiki: did you do the assets:precompile on the server?
[01:17:52] Aeyrix: jtthedev: good book tbh
[01:17:57] Aeyrix: there's a couple of the authors in here
[01:18:51] unreal: has joined #RubyOnRails
[01:19:14] Aeyrix: idk if any of them have been around to help you though
[01:19:24] Aeyrix: maybe vacation
[01:20:01] jeadre: has joined #RubyOnRails
[01:20:17] mary5030: has joined #RubyOnRails
[01:20:46] iateadonut: pontiki, yes, just tried, but it didn't change anything (and i didn't have to do that on my localhost)
[01:21:26] iateadonut: and the .erb is generating two different locations on localhost and server, one is '/assets/file' the other 'javscripts/file'
[01:21:47] Aeyrix: Are you precompiling?
[01:21:55] northfurr: has joined #RubyOnRails
[01:21:58] Aeyrix: sorry, someone asked that already
[01:22:15] Aeyrix: Are you running in production on the server?
[01:22:23] Aeyrix: You don't have to do it on localhost because it doesn't precompile assets.
[01:22:57] givanse_: has joined #RubyOnRails
[01:24:48] iateadonut: yeah, i just tried RAILS_ENV=production rake assets:precompile also
[01:24:59] iateadonut: restarted apache and reloaded the page. nothing
[01:26:31] dopamean_: has joined #RubyOnRails
[01:27:00] sevenseacat: Rails will generate links to /javascripts/ if it cannot find the asset you're referencing
[01:27:31] MrPunkin: has joined #RubyOnRails
[01:27:43] iateadonut: this is how i'm referencing the asset in my code: <%= javascript_include_tag "simple-slider.min.js" %>
[01:28:40] sevenseacat: remove the .js, you dont need it
[01:29:37] iateadonut: <%= stylesheet_link_tag "simple-slider.css" %>
[01:29:37] iateadonut: - the css as well?
[01:30:46] tsvenson: has joined #RubyOnRails
[01:30:53] iateadonut: still generates the same source.
[01:31:12] iateadonut: the same source that links to /javascripts and /stylesheets
[01:31:17] sevenseacat: ok, did you add simple-slider to the list of files that need to be precompiled?
[01:31:31] seank_: has joined #RubyOnRails
[01:31:46] northfurr: anyone know of or use a rails starter app with user login/auth/etc built in
[01:31:57] Aeyrix: Use Clearance.
[01:31:58] sevenseacat: open config/initializers/assets.rb and add your simple-slider js and css there
[01:32:03] Aeyrix: Or Devise.
[01:32:10] sevenseacat: into the precompile array
[01:32:12] jtthedev: Aeyrix, Looking forward to it. I read a couple of pages, but will start reading it tomorrow. If I start tonight, I won't go to sleep at the required time for my body to function properly tomorrow.
[01:32:21] jtthedev: But tomorrow the weekend starts and I can binge
[01:32:27] Aeyrix: jtthedev: Have you talked to sevenseacat at all?
[01:32:30] Aeyrix: and / or Radar
[01:32:32] sevenseacat: jtthedev: enjoy.
[01:32:33] Aeyrix: co-authors
[01:32:38] Aeyrix: I've been afk at a conference
[01:32:40] sevenseacat: if you have any questions, we're here to help.
[01:32:47] jtthedev: Yes, I have
[01:32:53] jtthedev: sevenseacat, thank you
[01:33:01] Radar: heh have jtthedev and sevenseacat talked :P
[01:33:14] Aeyrix: I've been busy fam. :v
[01:33:30] ngscheurich: has joined #RubyOnRails
[01:34:08] joshkovach: has joined #RubyOnRails
[01:34:28] havenwood: has joined #RubyOnRails
[01:35:04] Radar: It's ok we know you don't love us any more :'*(
[01:35:23] sevenseacat: Aeyrix: you're semi-dead to us.
[01:35:57] Radar: ACTION checks for vital signs on Aeyrix, sees only a faint heart-beat
[01:36:07] christiandsg: has joined #RubyOnRails
[01:36:07] Aeyrix: That's... actually not far from the truth.
[01:36:13] Aeyrix: At least, it was yesterday.
[01:36:19] Aeyrix: I forgot how to sleep lel
[01:36:21] Aeyrix: protip: don't do that
[01:39:50] drim: has joined #RubyOnRails
[01:40:08] drim: hey guys, how could I access to the parent application routes from a gem engine?
[01:40:10] tubbo: http://logs.ryanbigg.com/Aeyrix says something is wrong
[01:40:18] tubbo: so that's what i'm going to assume
[01:40:21] tubbo: Aeyrix hang in there man!
[01:40:36] tubbo: drim: `app.whatever_route_path` i think..
[01:40:59] drim: what's app?
[01:41:14] Radar: it's the app
[01:41:22] Radar: main_app is the right method
[01:41:30] drim: i tried but its saying its nil
[01:41:43] Radar: tubbo: http://logs.ryanbigg.com/p/Aeyrix
[01:41:46] Radar: drim: what's saying what's nil?
[01:41:51] drim: main_app
[01:42:01] Radar: drim: !didntwork
[01:42:01] helpa: drim: 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.
[01:42:04] helpa: Show rather than tell. Explaining your problem with code, stacktraces or errors is always preferred to explaining it with just text. Show us what's happening, rather than telling us.
[01:42:18] Radar: tubbo: You're missing the /p/
[01:42:21] drim: do I need to include something to make main_app available from a class?
[01:42:33] tubbo: Radar: i know but there's a link on the front page :D
[01:42:47] ariedler: has joined #RubyOnRails
[01:42:51] Radar: tubbo: TIL
[01:42:53] n1lo: has joined #RubyOnRails
[01:42:56] iateadonut: do i have to uncomment this line: //= require_tree .
[01:43:01] Radar: drim: !ncnh
[01:43:01] helpa: drim: If you don't provide any code, it becomes really difficult for us to help you. Providing code to reproduce the problem increases your chances of getting great, accurate help immensely.
[01:43:12] cynosures: has joined #RubyOnRails
[01:43:16] ariedler: reached the point in my job, that I care too much about quality :(
[01:44:25] tubbo: ah come on now
[01:44:27] tubbo: it's not so bad
[01:44:28] iateadonut: do quality on your own time!
[01:44:45] tubbo: just write some shitty code, then get really drunk and forget about it
[01:44:53] tubbo: The Microsoft Way (TM)
[01:44:56] Radar: ^ this is what I do every day and it seems to work
[01:45:07] corioliss: has joined #RubyOnRails
[01:45:23] j_mcnally: has joined #RubyOnRails
[01:45:59] ariedler: it gets really tiredsum and isolating when co-workers at cutting corners left and right to finish a job; then I have to go in after and clean it up... that is all
[01:46:52] ariedler: only if we could have the best of both worlds
[01:47:02] quazimodo: has joined #RubyOnRails
[01:47:04] jenrzzz: has joined #RubyOnRails
[01:48:03] lsone: has joined #RubyOnRails
[01:48:10] northfurr: has joined #RubyOnRails
[01:48:18] jtthedev: Is it good practice, to have forms rendered within a partial? are there any cons to doing the form part on the same page you're submitting from ?
[01:48:27] Radar: jtthedev: Do you have an example of this code?
[01:48:31] ariedler: Radar: tell me the mystical way :)
[01:48:41] jtthedev: sure.. hold on..
[01:48:45] Radar: ariedler: We have pull request reviews here which means that nobody can commit code to master without getting it signed off by someone else.
[01:48:51] Radar: ariedler: and we're really hard on code quality / organisation
[01:49:01] Radar: So two things, really: 1) code reviews and 2) strictness
[01:49:17] Radar: I'm guessing at your workplace, anyone can commit whatever they feel like
[01:49:47] ariedler: we do do code reviews, but the strictness is completely out the window now
[01:50:28] tubbo: you might need an authoritarian approach, with zero tolerance for bad quality code
[01:50:50] Radar: ariedler: So fix the strictness :)
[01:51:02] ariedler: Radar: been trying to, its a battle
[01:51:06] Radar: Rubocop can help with some of that. The rest requires a keen eye
[01:51:13] tubbo: ...and a culture that demands it
[01:51:19] tubbo: that's the hardest part to change
[01:51:27] tubbo: if your co-workers don't give a shit, it's hard to make them care
[01:51:41] ariedler: tubbo: yup, that is the hardest part to it all
[01:51:53] Radar: Get new coworkers :D
[01:51:57] ariedler: Radar: the architecture problems are the bigger problems :P
[01:52:08] tubbo: architecting is hard
[01:52:25] ariedler: tubbo: I totally agree
[01:52:36] ariedler: tubbo: it requires at least SOME planning...
[01:52:47] tubbo: yeah, and a lot of experience
[01:53:06] Motoservo: has joined #RubyOnRails
[01:54:20] stardiviner: has joined #RubyOnRails
[01:54:29] jtthedev: Radar, I am trying to figure out, which of the 2 is best practice... doing it 2 part with new.html.erb and then _partial.html.erb or having it both in one page.................. http://pastie.org/10380519 vs http://pastie.org/10380521
[01:54:53] Radar: jtthedev: I put the whole form into one partial and let it determine what the submit button should be.
[01:55:16] paulcsmith: has joined #RubyOnRails
[01:55:20] ariedler: tubbo: the worst sin I have witnessed recently, is modeling things after real things in the world; but they don't conform at all.
[01:55:25] Radar: https://github.com/rubysherpas/r4ia_examples/blob/master/ticketee/app/views/admin/projects/new.html.erb#L1-L5
[01:55:26] Radar: jtthedev: ^
[01:55:32] jtthedev: What do you mean by letting it determine what the submit button should be ?
[01:55:36] jtthedev: thanks, i'll check now
[01:56:02] tubbo: ariedler: well that's not really modeling something after a thing in the real world, is it?
[01:56:14] Aeyrix: I asked a few days ago but I think people were asleep so
[01:56:15] ariedler: tubbo: the names do match though :P
[01:56:24] Aeyrix: where do people draw the line between going Rails API + Angular
[01:56:25] Aeyrix: and just rails?
[01:56:41] sevenseacat: I have not found a good use for a SPA in any of the apps I've built.
[01:56:43] tubbo: well never with angular but :P
[01:56:43] Radar: ariedler: lol angular
[01:56:47] Radar: Aeyrix: ^
[01:56:50] Radar: React or ban
[01:56:55] Aeyrix: I just kind of picked angular tbh
[01:56:57] Aeyrix: React is fine too
[01:57:02] tubbo: i'm using rails-api for this one project
[01:57:02] ariedler: lol React :P :)
[01:57:06] Aeyrix: the reason i ask is for a control panel i'm building
[01:57:12] Aeyrix: which needs an api
[01:57:14] tubbo: because i want to talk to actual desktop clients for the most part
[01:57:15] Aeyrix: publicly accessible
[01:57:26] Aeyrix: so i should go js + api or?
[01:57:31] Aeyrix: I've never really done anything this way before
[01:57:35] Aeyrix: most of the time it's been monolithic
[01:57:41] Aeyrix: but i need to update my web app structure practices
[01:57:45] tubbo: meh, stick with what you know and what's fun :)
[01:57:52] Aeyrix: nah i have to do this 'right'
[01:57:53] tubbo: but the other stuff is definitely fun
[01:57:59] dented42: has joined #RubyOnRails
[01:58:04] lipoqil: has joined #RubyOnRails
[01:58:14] tubbo: i like ember a lot because of ember-cli
[01:58:15] Radar: bbl lunch and so on
[01:58:37] sevenseacat: unless I was literally building an actual single page application eg. pivotal tracker or trello, I'd probably just stick to normal Rails
[01:58:48] Aeyrix: So rails frontend + rails api?
[01:58:54] Aeyrix: two separate apps or just namespaced?
[01:58:54] sevenseacat: you have lunch, I'm making breakfast while I deploy.
[01:59:07] Aeyrix: rails frontend doesn't talk to rails api?
[01:59:07] tubbo: no you could just use the same controllers and respond to both json & html
[01:59:13] Maletor: has joined #RubyOnRails
[01:59:13] tubbo: just make it all in the same app
[01:59:26] Aeyrix: what about separation of naming for clarity reasons?
[01:59:29] Aeyrix: api.dongforce.com
[01:59:33] Aeyrix: controlpanel.dongforce.com
[01:59:36] Aeyrix: absolutely do not click that link
[01:59:39] Aeyrix: i think a friend owns it
[01:59:41] quazimodo: anyone seen a way to have unexposed classes in ruby modules in the wild?
[01:59:42] Aeyrix: it's probably goatse
[02:00:05] tubbo: really? the control panel domain isn't my.dongforce.com?
[02:00:22] Aeyrix: it could be my.whatever
[02:00:23] Aeyrix: my question was
[02:00:27] Aeyrix: how do you separate that
[02:00:33] Aeyrix: and use the same app to respond in json or html?
[02:00:34] quazimodo: i don't think the language spec has this, i'd really like to be able to do something like 'expose([InterfaceClass1, InterfaceClass2])' in a module so that other dev's dot try to use the objects in the guts of the module
[02:00:40] tubbo: wait so why do you want an api again?
[02:00:41] Aeyrix: sorry i'm typing like a retard right now, i'm doing like eight other things
[02:00:47] Aeyrix: tubbo: this is a "for devs" thing
[02:00:51] Aeyrix: and i want to interact with a mobile app too
[02:00:55] Aeyrix: (i'm building it, wew java)
[02:01:33] tubbo: i suppose if you're gonna interact with it using a mobile app, you probably want to build the api first and then use it against both the mobile app and then the control panel app
[02:01:44] renews: has joined #RubyOnRails
[02:01:46] tubbo: which you can build in whatever tech you want, rails would probably be a little overkill at that point
[02:01:53] tubbo: but the api would be good to build with rails
[02:02:22] Aeyrix: Then what about the "control panel" app?
[02:02:24] Aeyrix: same app as the API?
[02:02:42] tubbo: no, the control panel app would be its own app, made with ember.js or something
[02:02:53] Aeyrix: right so use js framework for control panel
[02:02:54] Aeyrix: rails for API
[02:02:55] tubbo: you could then host it on S3 and not have to pay for an additional server to house the admin app :)
[02:03:05] Aeyrix: the control panel is for servers
[02:03:10] Aeyrix: so i'm not worried about getting hw
[02:03:23] poli: has joined #RubyOnRails
[02:03:32] tubbo: it's all good, just saying those kind of apps have built-in scaling
[02:04:09] Aeyrix: now i have to work out how to use React tbh
[02:04:12] Aeyrix: I've avoided it until now
[02:04:31] tubbo: you could use ember.js instead :P
[02:04:43] rushed: has joined #RubyOnRails
[02:05:06] tubbo: comes with a free stable ORM layer
[02:05:22] tubbo: and a great command line build tool that lets you write in ES6
[02:05:49] joshkovach: has joined #RubyOnRails
[02:05:52] tubbo: angle bracket component-driven, data-down/actions-up, DOM diffing, what more could you want
[02:08:01] chouhoulis: has joined #RubyOnRails
[02:09:19] one_zero: has joined #RubyOnRails
[02:10:59] chouhoulis: has joined #RubyOnRails
[02:12:17] nettoweb: has joined #RubyOnRails
[02:12:31] Aeyrix: tubbo: I'd want to recognise most of those words
[02:12:32] Aeyrix: which I don't.
[02:14:34] maz-dev: has joined #RubyOnRails
[02:15:53] Swappticon: has joined #RubyOnRails
[02:19:54] michael_mbp: ah, thanks workmad3
[02:20:17] sprite--: has joined #RubyOnRails
[02:20:42] sprite--: What's the preferred gem for handling photo uploads [Heroku with storage on S3]? Paperclip or Carrierwave?
[02:23:58] slash_nick: has joined #RubyOnRails
[02:27:53] jtdowney: has joined #RubyOnRails
[02:27:53] jtdowney: has joined #RubyOnRails
[02:28:58] rushed: has joined #RubyOnRails
[02:29:40] gmci: has joined #RubyOnRails
[02:32:46] iamse7en: has joined #RubyOnRails
[02:33:14] sung: has joined #RubyOnRails
[02:33:15] sung: has joined #RubyOnRails
[02:33:31] Helheim: has joined #RubyOnRails
[02:34:06] allcentury: has joined #RubyOnRails
[02:35:26] j_mcnally: Hey all, how are all you fine rubyists tonight?
[02:37:22] Mendenhall: has joined #RubyOnRails
[02:37:30] MrPunkin: has joined #RubyOnRails
[02:37:42] mordocai: has joined #RubyOnRails
[02:38:55] christiandsg: has joined #RubyOnRails
[02:38:58] moneylotion: has joined #RubyOnRails
[02:39:50] larissa: has joined #RubyOnRails
[02:40:30] ciree: has joined #RubyOnRails
[02:41:06] sparr: has joined #RubyOnRails
[02:42:13] sevenseacat: not bad, not bad
[02:42:45] chrisarcand: has joined #RubyOnRails
[02:43:31] VeryBewitching: sprite--: S3 + Paperclip on Heroku wasn't terrible to setup.
[02:44:11] pontiki: i'm getting tired of ruby and rails
[02:44:35] rushed: pontiki: it may be tired of you as well
[02:44:43] VeryBewitching: pontiki: Why do you say that?
[02:44:44] pontiki: has left #RubyOnRails: (""Poets have been mysteriously silent on the subject of cheese" -- G.K.Chesterson")
[02:47:49] tjbiddle: Hey all - trying to replicate the schema of an existing MySQL database into ActiveRecord. Setting up foreign keys with foreigner - I noticed my schema dump has lines like "CONSTRAINT `storeCategoriesLocalizedData_ibfk_1` FOREIGN KEY (`categoryId`) REFERENCES `storeCategories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE" And foreigner only has an option for "name", which I'm assuming is the name of the actual foreign key? Just could use some
[02:47:50] tjbiddle: elaboration
[02:57:02] reverse_light: has left #RubyOnRails: ()
[02:57:28] rogue_koder: has joined #RubyOnRails
[02:59:19] jeadre: has joined #RubyOnRails
[03:00:54] rrawlins: has joined #RubyOnRails
[03:01:13] kshah: has joined #RubyOnRails
[03:01:26] bronson: has joined #RubyOnRails
[03:01:35] choke: has joined #RubyOnRails
[03:02:21] kshah: strangeness, I???m using AR w/o Rails. I can query my model with ???MyModel.first??? but any selector methods MyModel.where({foo: ???bar???}) will fail on NoMethodError
[03:02:57] kshah: I don???t know where those models get mixed into Base or even where they are defined so I don???t know what to include
[03:04:13] Allegiant: has joined #RubyOnRails
[03:04:48] _djbkd: has joined #RubyOnRails
[03:07:19] oscarb92: has joined #RubyOnRails
[03:07:36] kshah: nvm, I see it. I???m shocked to see I still have 2.3.4 installed here, working outside of bundled directory
[03:08:12] charliesome: has joined #RubyOnRails
[03:09:10] Exuma: has joined #RubyOnRails
[03:09:31] dnewkerk: has joined #RubyOnRails
[03:09:34] oscarb92: hello. I'm new to rails and I'm using cocoon gem to add dynamic fields to a nested model, but I'm not sure what to do in the controllers to save the new objects. I know you have to run the model.nested_model.build method in order to save a new instance, but I'm not sure how to apply it in this case.
[03:11:48] braincrash: has joined #RubyOnRails
[03:12:42] bin_005: has joined #RubyOnRails
[03:16:33] drale2k: has joined #RubyOnRails
[03:17:23] sevenseacat: this is awesome. https://github.com/pawurb/termit
[03:17:56] dnewkerk: hey oscarb92 - decided to try cocoon?
[03:18:10] VeryBewitching: sevenseacat: wow, ya, that really is :D
[03:19:13] dnewkerk: oscarb92: you shoudn???t need to do anything special, that???s handled by accepts_nested_attributes_for??? what???s happening?
[03:20:12] oscarb92: dnewkerk: heyyy... yes
[03:21:00] oscarb92: dnewkerk: well, when I add the new inputs and send the form it does not save them to the db
[03:21:29] jeadre: has joined #RubyOnRails
[03:21:38] dnewkerk: oscarb92: ok - and the params are showing up in the log?
[03:21:42] sevenseacat: code, logs, etc.
[03:22:15] oscarb92: dnewkerk: nope :/
[03:22:47] dnewkerk: oscarb92: this is my final product with cocoon btw - https://www.youtube.com/watch?v=Ims9lZ7TA30
[03:23:04] dnewkerk: oscarb92: I don???t suppose you could do a quick deploy to heroku or something so I can try it? :P
[03:24:32] oscarb92: dnewkerk: it looks great, youre using ajax, though. Awesome :D
[03:24:41] dnewkerk: yeah that???s the hard part
[03:25:35] oscarb92: dnewkerk: hmm well I'm using a SQL server db. Maybe I could use the migrations to make a sqlite db instance
[03:26:14] sevenseacat: oscarb92: code, logs, etc.
[03:26:50] dnewkerk: oscarb92: do you have a console open showing your development log? e.g. tail -f log/development.log
[03:27:22] Allegiant: has joined #RubyOnRails
[03:27:26] badmadrad: has joined #RubyOnRails
[03:28:00] oscarb92: dnewkerk: yes, well, the one I'm running the server with
[03:28:18] corioliss: has joined #RubyOnRails
[03:28:30] oscarb92: dnewkerk: oh wait, that's another log, isn't it?
[03:28:49] alxndr: has joined #RubyOnRails
[03:28:50] danlucraft: has joined #RubyOnRails
[03:29:12] jholm_: has joined #RubyOnRails
[03:29:59] robotbrain: has joined #RubyOnRails
[03:30:22] dnewkerk: oscarb92: one thing I like to do is load the page, then go to the log window, CMD+K to clear it, then press Submit on my form - then nothing mixed in there besides the request in question. Then you can skim though or use CMD+F to search for things like ???unpermitted???
[03:30:24] G: has joined #RubyOnRails
[03:31:08] chancancode: has joined #RubyOnRails
[03:31:09] newton: has joined #RubyOnRails
[03:31:16] BLuEGoD: has joined #RubyOnRails
[03:31:27] larissa: has joined #RubyOnRails
[03:31:38] cschneid: has joined #RubyOnRails
[03:31:57] jeadre: has joined #RubyOnRails
[03:32:00] mcr-credil: has joined #RubyOnRails
[03:32:16] Shidash: has joined #RubyOnRails
[03:32:22] LateralOctober: has joined #RubyOnRails
[03:32:23] universa1: has joined #RubyOnRails
[03:32:23] sfr^: has joined #RubyOnRails
[03:32:25] cball: has joined #RubyOnRails
[03:32:41] exadeci: has joined #RubyOnRails
[03:33:20] craysiii: has joined #RubyOnRails
[03:34:00] aguynamedben: has joined #RubyOnRails
[03:37:11] oscarb92: dnewkerk: well, I don't see anything like that. Another thing, I'm actually in an edit/update form, let's say I want to add basic info in the new/create form, and then add that detail in the edit/update
[03:37:31] oscarb92: dnewkerk: could it be something related to that?
[03:38:55] dnewkerk: oscarb92: can I see your controller that???s handling the form submission? also did this break when you switched to cocoon somehow, or different issue?
[03:39:02] Klumben: has joined #RubyOnRails
[03:40:08] erich: has joined #RubyOnRails
[03:42:28] oscarb92: dnewkerk: ok... let me add it to the gist. No, I haven't changed it and It works for updating the fields that already exist and deleting
[03:43:06] oscarb92: dnewkerk: https://gist.github.com/OscarBastardo/e8de9fc902f0a3f26a43 it's there
[03:43:22] Sanguine1nomaly: has joined #RubyOnRails
[03:46:14] lipoqil: has joined #RubyOnRails
[03:49:22] dnewkerk: oscarb92: not sure if it???s the issue, but your update action looks a little funky??? delete line 37 (redundant, update already saves). Also I usually use update not update_attributes (think I read update_attributes was deprecated)
[03:50:15] baweaver: has joined #RubyOnRails
[03:53:59] qejk: has joined #RubyOnRails
[03:54:39] chipotle: has joined #RubyOnRails
[03:56:18] Lightsword: has joined #RubyOnRails
[03:57:16] dnewkerk: oscarb92: I think I see an issue??? <%= render 'experiencia_laborals_fields', el: el %> ???. change to <%= render 'experiencia_laborals_fields', f: el %> ??? and in _experiencia_laborals_fields.html.erb change all el.input to f.input
[03:57:33] oscarb92: dnewkerk: oh yes, I added the save to try something out
[03:58:10] oscarb92: dnewkerk: oh right. That I fixed it earlier
[03:58:15] oscarb92: let me update that code
[03:59:27] oscarb92: dnewkerk: I was having trouble with that early but I fixed it
[03:59:41] jtthedev: is there any tool or gem that will give generate required params of a controller based on fields in your model ? eg http://pastie.org/10380618 <---- something to generate this code.. or is there a way to write this that's more eficient / shorter?
[03:59:50] dnewkerk: oscarb92: wasn???t sure before, are you seeing the development log? I???d like to see the params hash the controller receives
[04:01:09] Radar: jtthedev: no because it is better to have it picked custom. For instance, in Admin::UsersController you might want to accept an "admin" field, but in UsersController you don't want to accept it.
[04:01:17] Radar: jtthedev: See Chapter 7 in Rails 4 in Action for that example.
[04:01:52] jtthedev: thank you sir.
[04:02:51] dnewkerk: jtthedev: if you want a quick list to format or copy paste from, try YourModel.column_names (or write a method that uses that to output something you want)
[04:04:26] dnewkerk: jtthedev: I like putting strong params in a stack, one per line personally (alphabetized)??? makes it easier for me to read and see exactly what I have there
[04:04:37] baweaver: jtthedev: That's exactly what you use editor macros and snippets for
[04:04:51] baweaver: good editors can execute code to generate things.
[04:04:56] fighella: has joined #RubyOnRails
[04:04:59] jeadre: has joined #RubyOnRails
[04:05:27] jtthedev: i use rubymine ide
[04:05:36] oscarb92: dnewkerk: https://gist.github.com/OscarBastardo/e8de9fc902f0a3f26a43 Parameters file
[04:05:41] jtthedev: i'll look into whether or not it has that feature
[04:05:46] baweaver: Vim and Emacs definitely can, but they aren't exactly newbie friendly
[04:05:52] baweaver: not sure if Rubymine allows it.
[04:06:04] baweaver: then again I'm about the worst person to ask on IDE features :P
[04:07:04] baweaver: I'm one of the odd birds who likes to build my editor from the ground up, mainly because IDEs just get in my way too much.
[04:07:20] oscarb92: dnewkerk: those last attributes are 2 experiencias_laborales already in the database
[04:07:32] jtthedev: i've been using vim for 15 years plus. i'm a linux engineer and dba.. but even with the nerdtree plugin, having ruby mine is a lot more effecient than vim for coding
[04:07:58] jtthedev: at least that's my opinion
[04:08:00] jeadre: has joined #RubyOnRails
[04:08:10] baweaver: fair, depends on how you customize it
[04:08:13] baweaver: Janus helps a lot
[04:08:28] baweaver: mainly I like being able to use the commands feature to port my own scripts for code generation
[04:08:51] baweaver: controllers tend to look a lot alike, same with their documentation and other features.
[04:09:03] dnewkerk: oscarb92: as we did yesterday, can you also show me the params from the browser inspector network tab after submission?
[04:09:05] jtthedev: you use linux ? or you're an apply guy ?
[04:09:51] baweaver: Development I tend to use a Mac. Any server I tend to use BSD
[04:10:39] jtthedev: makes sense to use bsd if you're an osx guy
[04:10:53] jtthedev: osx is bsd derived, at least the kernel is
[04:11:00] baweaver: makes sense to use osx if you're a bsd guy :{
[04:11:11] Aeyrix: Makes sense to use OS X.
[04:11:15] Aeyrix: Makes sense to use BSD.
[04:11:30] Aeyrix: Makes sense to use Linux if you need compatibility with edge cases. :^)
[04:11:45] baweaver: grew up building OpenBSD servers before I'd even touched a Mac, firewalls with PF, CHJails, fun stuff
[04:11:54] jtthedev: i'm a gentoo guy for my boxes.. servers are debian
[04:12:03] Aeyrix: Debian + OS X here.
[04:12:32] baweaver: Debian tends to be my preferred Linux distro, CentOS is all types of touchy.
[04:12:41] Aeyrix: s/touchy/shite/
[04:12:54] baweaver: I was being nice :P
[04:13:01] jtthedev: dabbled in redhat in the late 90's... hated rpms.. as a result... hate centos
[04:13:17] baweaver: and by extension Fedora, where they tend to beta test
[04:13:35] nya: has joined #RubyOnRails
[04:13:59] jtthedev: never touched fedora...
[04:14:12] baweaver: probably for the best.
[04:14:23] baweaver: If you don't like anything in RHEL land
[04:14:24] Aeyrix: Using fedora made me move to Arch
[04:14:43] Aeyrix: now I can't take it seriously because fedoras are the international symbol for bronies and obnoxious atheists
[04:14:56] baweaver: I thought it was Reddit
[04:15:01] baweaver: intersection is high anyways.
[04:15:02] Aeyrix: Fedora 15 (M'Lady)
[04:15:34] baweaver: Shame, fedoras can work quite well with a good suit
[04:15:37] jtthedev: fell in love with gentoo in it's early stages... have been a cult follower ever since... it's not one of the popular distros, but love the portage system
[04:16:28] baweaver: OpenBSD was my first foray into Unix, my mentor suggested I build a box and get something live on the web with Apache.
[04:17:05] baweaver: This being somewhere around 2000, so probably before NginX (I'd have to look)
[04:17:17] Aeyrix: lol gentoo
[04:17:18] drale2k: has joined #RubyOnRails
[04:17:39] jtthedev: but for servers, debian is the way to go for me. even i discovered rails existense, it's all i've used for my databases. After i built my first app, I tried deployment on gentoo, centos, debian, opensuse.
[04:17:46] baweaver: Slackware, back when I was a super 1337 hacker with Backtrack
[04:17:50] jtthedev: i wish gentoo had been the winner. but debian > *
[04:18:08] jtthedev: slackware was top of the food chain in it's days
[04:18:19] baweaver: Novell.....
[04:18:25] Aeyrix: novell lol
[04:18:46] baweaver: Bane of school systems everywhere with anyone who knew directory traversal
[04:20:25] baweaver: I seem to recall there was a link between Novell and SuSE, didn't Novell buy them or something?
[04:20:50] baweaver: that explains a lot
[04:21:19] melonstorm: has joined #RubyOnRails
[04:21:23] baweaver: BSD won out for me because PF was so much better than IP Tables and I was trying to make firewalls to learn
[04:21:34] jtthedev: yeah, that's why opensuse was forked from suse i think
[04:21:58] nya: has joined #RubyOnRails
[04:22:46] jtthedev: never been a fan of software based firewalls. they do what they should do internally. but i would never let a box sit on the net publicly and rely on it's firewall
[04:22:57] jtthedev: ACTION pets his asa 5525
[04:23:13] baweaver: Heh, so definitely old school admin then
[04:23:26] allcentury: has joined #RubyOnRails
[04:23:42] lvrbrtsn: has joined #RubyOnRails
[04:23:45] baweaver: Aeyrix is security, I'm Infrastructure automation / DevOps so there are those of us out there
[04:23:50] baweaver: or rather on this channel
[04:24:17] oscarb92: has joined #RubyOnRails
[04:24:21] jtthedev: nice and welcomed
[04:24:34] baweaver: Just ask Aeyrix about Big Data some time.
[04:24:49] nya: has joined #RubyOnRails
[04:25:13] lemur: has joined #RubyOnRails
[04:25:18] lvrbrtsn: how is everyone?
[04:25:27] sevenseacat: lvrbrtsn: good afternoon
[04:25:32] jtthedev: not too bad
[04:25:40] Aeyrix: >big data
[04:25:45] lvrbrtsn: sevenseacat: Hello again!
[04:26:49] oscarb92: https://gist.github.com/OscarBastardo/e8de9fc902f0a3f26a43
[04:27:21] sevenseacat: oscarb92: and whats your problem?
[04:27:30] baweaver: context helps
[04:27:38] naftilos76: has joined #RubyOnRails
[04:27:39] baweaver: as much as we love code
[04:27:41] dnewkerk: oscarb92: when you submitted had you added a new field?
[04:28:13] oscarb92: dnewkerk: yes, I was trying something out with JS
[04:28:30] oscarb92: already deleted it, it didn't work
[04:29:09] dnewkerk: oscarb92: so you clicked your Add button, filled in the field(s) that appeared, and pressed submit, correct?
[04:30:08] oscarb92: dnewkerk: the POST file in the gist have the parameters the form sends
[04:30:22] oscarb92: dnewkerk: yes... but they don't appear in the submit
[04:30:31] oscarb92: dnewkerk: yes... but they don't appear in the params*
[04:31:05] bronson: has joined #RubyOnRails
[04:33:14] dnewkerk: oscarb92: something fishy going on haha??? my suggestion is to take a step back, go to your ~/code/test-apps folder (or make one) and do rails new nested_field_test ??? make something very simple and scale up from there. After I make a simple test app like that to address the exact bug I???m facing, I usually figure it out
[04:34:05] dnewkerk: oscarb92: also when you do this, just use scaffolds to quickly make your resources to play with
[04:34:09] yfeldblum: has joined #RubyOnRails
[04:34:22] sevenseacat: oscarb92: so what exactly is your problem?
[04:34:40] dnewkerk: (also ensures you???re not bringing in bugs or typos from your existing models and controllers)
[04:35:41] sevenseacat: I feel like I've asked this question a hundred times in the past two days
[04:35:56] jblack: has joined #RubyOnRails
[04:36:10] krz: has joined #RubyOnRails
[04:36:51] jblack: Hi all. What's the latest crack for responsive websites with rails?
[04:36:57] nya: has joined #RubyOnRails
[04:37:06] dnewkerk: sevenseacat: he???s been trying to get javascript-assisted nested form fields working (ala the classic railscast nested model forms, though using one of the premade gems for the task, cocoon)
[04:37:40] jblack: is it still jquery? bootstrap? both? something new?
[04:37:56] dnewkerk: jblack: not sure about crack??? most people like using Bootstrap, Foundation, or similar
[04:37:59] oscarb92: sevenseacat: I'm adding dynamic fields to my edit view, but when I fill them and send them to the update method, those nested attributes are not being saved into the database
[04:38:24] sevenseacat: oscarb92: so where's the logs of this request being made
[04:38:24] oscarb92: sevenseacat: they don't even appear in the params
[04:38:31] sevenseacat: yes they do appear in the params
[04:38:42] sevenseacat: your own gist shows that
[04:39:03] oscarb92: sevenseacat: those are the ones already saved in the database
[04:39:35] oscarb92: but when I add new fields with the cocoon gem (javascript) they are not sent over the request
[04:39:48] sevenseacat: okay, so what html is being generated when you press the 'add' button
[04:40:00] nya: has joined #RubyOnRails
[04:40:46] oscarb92: dnewkerk: I'm not very experienced with tests (I know, bad practice) u.u
[04:41:11] oscarb92: sevenseacat: you want to see a sample of the html?
[04:41:27] sevenseacat: thats what I asked, yes. the html that gets generated when you add a new record to the form
[04:41:45] christiandsg: has joined #RubyOnRails
[04:41:48] dnewkerk: oscarb92: please click Add, then with inspector click to the generated html (it will not be in view source)???. copy/paste that to your gist
[04:42:10] Stuffness: has joined #RubyOnRails
[04:42:13] mary5030: has joined #RubyOnRails
[04:43:07] oscarb92: sevenseacat, dnewkerk: here https://gist.github.com/OscarBastardo/e8de9fc902f0a3f26a43 sample.html
[04:44:14] sevenseacat: ok, looks fine
[04:44:43] sevenseacat: and this is just a normal form submission, no js interception or anything like that?
[04:45:37] ght: So gentlemen, what's the word on Rails 5?
[04:45:42] oscarb92: sevenseacat: yes, plain submission. Not ajax or anything like that
[04:46:08] dnewkerk: oscarb92: looks correct to me??? those inputs are within your <form> so they definitely should be submitted when you press save
[04:46:16] oscarb92: a little bit of info: im using rails 4.1.8
[04:47:31] sevenseacat: ght: funny, I was just listening to a podcast about that this morning
[04:47:57] oscarb92: dnewkerk: well, not quite. the form closes wayy up in the html, because I have fields in different columns (bootstrap) and it closes when the 1st column ends
[04:48:18] dnewkerk: oscarb92: that???s probably the problem - forms have to contain the inputs they are going to submit
[04:48:25] oscarb92: sevenseacat, dnewkerk: oh damn... well, I do use javascript to submit, now that I recall...
[04:48:41] d2dchat: has joined #RubyOnRails
[04:48:43] sevenseacat: oscarb92: that could definitely be a problem
[04:49:00] dnewkerk: oscarb92: you can close your form anywhere, it doesn???t care which div it???s in
[04:49:20] dnewkerk: only close it after you???ve rendered all the inputs that belong to it
[04:49:25] oscarb92: sevenseacat, dnewkerk: i had this issue that the submit button wouldnt work because of that, but if I used jquery to submit on the click of that button it works
[04:49:32] oscarb92: and thats how I do it
[04:49:51] sevenseacat: dnewkerk: browsers will probably be a bit clever and auto-close forms if the html inside gets invalid
[04:50:16] oscarb92: sevenseacat: yea that's what I read
[04:50:38] annlewis: has joined #RubyOnRails
[04:51:15] oscarb92: anyhow, I used that workaround because I couldn't figure out how to close it at the very end using rails form_helper
[04:51:24] dnewkerk: sevenseacat: hmm good to know??? well just saying, it???s not invalid to say <form> ???. div div div whatever, many columns with inputs </form> ??? supposing all the html in between the open and close of the form is valid
[04:51:53] nahtnam: I have a very messy controller: https://gist.github.com/nahtnam/a5637141bd35a288ec5f What is worse is that I just realized that the Steam API returnes different arrays based on different users (which is stupid IMO). So, sometimes fields are missing and my controller throws an error because it cant find it. Is there any way I can make my code more resilient
[04:51:53] nahtnam: against the api?
[04:51:57] fedexo: has joined #RubyOnRails
[04:51:58] nya: has joined #RubyOnRails
[04:52:28] sevenseacat: dnewkerk: thats the thing - in this case its not
[04:52:31] dnewkerk: oscarb92: I have a sidebar with my submit button??? it???s in fact a totally separate partial from _form.html.erb ??? I close my form after rendering the button in the sidebar
[04:53:01] rakm: has joined #RubyOnRails
[04:54:27] nya: has joined #RubyOnRails
[04:57:22] sevenseacat: I'm glad to hear that, but it's not a good idea to presume that everyone assisting you is a gentleman.
[04:57:35] helpa: We're not all guys here - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
[04:58:02] oscarb92: sevenseacat: Oh, you're right. I'm sorry.
[04:58:12] sevenseacat: is okay. just something to be mindful of.
[04:58:35] oscarb92: sevenseacat: are you a lady, then? (friendly question)
[04:58:45] sevenseacat: I am indeed, and I'm not the only one here.
[04:58:52] Aeyrix: "lads and ladies" is my go-to
[04:59:13] riotjones: has joined #RubyOnRails
[04:59:18] mary5030: has joined #RubyOnRails
[04:59:35] EvilEpoch: has joined #RubyOnRails
[04:59:44] jblack: I've fiddled with rails off and on over the years. I'd like to invest some real time into getting a solid grasp of rails. I'm not quite sure of the right path to proficiency. Is there a book that would work well, or a set of tutorials?
[04:59:44] EvilEpoch: Warm Greetings to all, I am The EvilEpoch.
[05:00:03] jblack: The last time I screwed around, I used rails and bootstrap, and kinda got somewhere useful with that.
[05:00:22] dnewkerk: jblack: www.railstutorial.org
[05:00:33] EvilEpoch: The EvilEpoch suggests just writing an app you want to write and learn as you go.
[05:00:34] oscarb92: hello, EvilEpoch
[05:00:45] EvilEpoch: Greetings to oscarb92 from The EvilEpoch.
[05:01:02] mary5030_: has joined #RubyOnRails
[05:01:08] Aeyrix: !r4ia jblack
[05:01:08] 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
[05:01:13] oscarb92: the EvilEpoch has a point
[05:01:15] sevenseacat: I like to recommend Rails 4 in Action, which takes you from installing Rails to building a complete project in it (using bootstrap for styling). dlsclamer: i am an author of the book.
[05:01:26] jblack: I see there's a arils+angular+bootstrap book on amazon that's dated about 2 months into the future.
[05:01:30] Aeyrix: Disclaimer: I'm a blind fanboy of the book.
[05:01:37] sevenseacat: Aeyrix: you havent even read it.
[05:01:42] Aeyrix: Yeah I ahve.
[05:01:45] Aeyrix: I bought it months ago.
[05:01:47] sevenseacat: oh? oh okay then.
[05:01:51] rrawlins: has joined #RubyOnRails
[05:01:53] sevenseacat: we accept your blind fanboyism.
[05:02:07] sevenseacat: please proceed to pimp the book at every possible opportunity.
[05:02:13] Aeyrix: I do already. :P
[05:02:14] oscarb92: people, do you think it is redundant to have mvc frameworks on both the front and the backend?
[05:02:20] dnewkerk: jblack: stick with just learning one thing at a time ;)??? don???t try adding angular on top at the same time
[05:02:45] Aeyrix: sevenseacat: Are you gearing up for "The Book Formerly Known as Rails 5 in Action"? ;)
[05:02:48] sevenseacat: definitely one thing at a time
[05:02:52] sevenseacat: Aeyrix: hahahahahahahahahahahahaha
[05:02:53] jblack: Rails 4 in action doens't seem to be available yet.
[05:03:24] sevenseacat: jblack: it's available from manning as an early access edition, but it's fully content complete. it was supposed to go to the press two weeks ago. i dont know what the holdup is.
[05:03:28] tjbiddle: has joined #RubyOnRails
[05:03:34] Aeyrix: >publisher
[05:03:46] dnewkerk: they want to try to release rails 5 first
[05:03:53] codenapper: has joined #RubyOnRails
[05:04:05] dnewkerk: i kid i kid
[05:04:14] jblack: ahh, here we go... pdf+epub+kindle. That's perfect
[05:04:14] Aeyrix: You're almost right tbh
[05:04:50] sevenseacat: bonus with R4IA is that you can harrass Radar and I because we're two of the four co-authors, so know the content pretty darn well.
[05:04:56] x-light: ACTION dives into rails 4 in action to refresh on file uploads.
[05:05:10] x-light: see? another satisfied customer.
[05:05:13] jblack: That is a selling point. :)
[05:05:19] Aeyrix: sevenseacat: Are you going to work on R5 book?
[05:05:25] Aeyrix: "Rails 5, Stopping All Stations"
[05:05:32] jenrzzz: has joined #RubyOnRails
[05:05:41] dnewkerk: oscarb92: I???ve gotten pretty heavily into backbone (took it a bit too far in my current app)??? but I scaled back and still have tons of use for it in my ???regular javascript???
[05:05:42] sevenseacat: well, no guarantees. not for manning though.
[05:05:56] Aeyrix: sevenseacat: I meant in general, I know they own the "Rails x in Action" now
[05:06:17] Aeyrix: If you do I put forward "Rails 5, Stopping All Stations" :^)
[05:06:26] Radar: I'd love to write an intro to Rails book not published by Manning but contractual obligations mean that I can't for the next 3 years.
[05:06:30] dnewkerk: oscarb92: I???ve been loving this js pattern lately http://brandonhilkert.com/blog/organizing-javascript-in-rails-application-with-turbolinks/
[05:06:35] Radar: Personally I think Manning has gotten their pound of flesh from me anyway
[05:06:35] jblack: MEAP is the most lucrative purchase location for you?
[05:06:35] dnewkerk: plus backbone
[05:06:54] Aeyrix: Radar: Didn't you have
[05:07:06] Radar: Aeyrix: No
[05:07:11] sevenseacat: jblack: there's no lucrative purchase location really. but if you buy the meap, you can read it right now
[05:07:23] Aeyrix: Write it under the alias of Byan Rigg.
[05:07:30] Radar: Bryan Rigg*
[05:07:35] Aeyrix: Perfect tbqh
[05:07:41] Aeyrix: Nobody will guess.
[05:07:46] oscarb92: well, my colleagues that work with front end usually use angular + some restful api... or a django/rails app with a lightweight front (bootstrap, jquery)
[05:08:05] VeryBewitching: Radar: Only if it's about "Rails" ?
[05:08:11] Radar: VeryBewitching: Yes.
[05:08:18] Aeyrix: Radar: Write about "Tracks"
[05:08:19] VeryBewitching: Radar: Write a book about Rack applications
[05:08:21] Aeyrix: A framework suspiciously similar
[05:08:25] Radar: VeryBewitching: Rack applications suck.
[05:08:36] VeryBewitching: Radar: You can't not use Rails as an example.
[05:08:42] Radar: VeryBewitching: I'm writing MTWR now and I quite enjoy that it's sold half as much as R4IA but made twice the money.
[05:08:43] VeryBewitching: But it's not about Rails
[05:08:45] Ropeney: wtb a book on middleware
[05:08:56] oscarb92: dnewkerk: I found that article yesterday and added it to my browser bookmarks... gotta check it out, definitely
[05:08:58] Radar: Ropeney: There isn't a book's worth of content to write about middleware.
[05:08:59] Aeyrix: Radar: What's the general gist of that book?
[05:09:03] sevenseacat: Radar: be all like 'fuck rails' and write a book on lotus instead.
[05:09:06] Radar: VeryBewitching: !mtwr
[05:09:06] helpa: VeryBewitching: Multitenancy With Rails - https://leanpub.com/multi-tenancy-rails - An excellent book that teaches you about building a Multitenanted Rails application. Written by Ryan Bigg.
[05:09:14] Aeyrix: Lotus Notes?
[05:09:19] Radar: Aeyrix: the MTWR book?
[05:09:21] VeryBewitching: Ah, interesting.
[05:09:39] sevenseacat: http://lotusrb.org/
[05:09:50] Ropeney: i have your MTWR, slightly modified running in a production system :D
[05:09:54] jblack: Why on earth would they make me lie about my phone number. :P
[05:10:02] Radar: Aeyrix: Take an existing app and turn it into a multi-tenanted app with accounts that are subscribed for a monthly fee.
[05:10:08] Radar: Ropeney: Oh yay it works :D
[05:10:11] dnewkerk: oscarb92: that???s definitely fine too (if you and your team knows them??? Rails makes a sweet API too), though Rails gets you pretty far without. Mix in some turbolinks, pjax, etc and get a relatively speedly front end UX
[05:10:29] Ropeney: radar: i did some modification, but seems handling perfect
[05:10:37] Radar: Ropeney: Schemas or foreign key scoping?
[05:10:37] EvilEpoch: has joined #RubyOnRails
[05:10:51] Ropeney: Radar: foreign_key, planm on too many users
[05:11:04] jblack: Ok, that's another 39 bucks for manning, and another 99 cents for you two. :)
[05:11:08] Ropeney: Radar: too many accounts*
[05:11:27] Radar: Ropeney: Nice :)
[05:11:31] Radar: jblack: Preeety much.
[05:11:37] sevenseacat: jblack: not too far from the truth tbh. thanking you kindly :)
[05:11:43] Ropeney: Radar: I gotta look this weekend how to send flash across subdomains though.
[05:11:48] sevenseacat: I hope you get a lot out of it!
[05:11:50] Radar: jblack: see pie charts about 3/4 down: http://ryanbigg.com/2015/08/my-self-publishing-success-story/
[05:12:12] dnewkerk: oscarb92: have a look at this, I???ve found these recently and learning a lot about how to make Rails act more like the client side UX people are after??? https://github.com/smidwap/todomvc_on_rails and https://github.com/nateberkopec/todomvc-turbolinks
[05:12:34] tjbiddle: has joined #RubyOnRails
[05:14:06] EvilEpoch: has joined #RubyOnRails
[05:15:52] jblack: why are you using manning instead of leanpub?
[05:15:52] rvanlieshout: has joined #RubyOnRails
[05:16:03] x-light: dnewkerk: thats useful, thanks (I know it wasn't aimed at me :)
[05:16:07] Aeyrix: jblack: Contractual obligations.
[05:16:37] Radar: I need to finish MTWR and Deep Dive Rails before I can start on any more new books.
[05:16:56] Ropeney: i thought MTWR was done?
[05:16:57] sevenseacat: Radar: *cough debugging ruby
[05:17:05] Aeyrix: One day I'll be knowledgeable enough about something to write a book
[05:17:11] Aeyrix: the things i'm knowledgeable about aren't really book material
[05:17:17] oscarb92: dnewkerk: Interesting. I'll get some more experience with rails and then try out some of those approaches
[05:17:20] Radar: sevenseacat: Yeah, that one.
[05:17:26] Radar: Ropeney: MTWR v1 is done, MTWR v2 is in the works.
[05:18:04] drale2k: has joined #RubyOnRails
[05:18:10] EvilEpoch: has joined #RubyOnRails
[05:18:18] choke: has joined #RubyOnRails
[05:18:28] Ropeney: Radar: much difference?
[05:18:36] dnewkerk: oscarb92: I???ve been steadily converting some loooong typical jQuery mush coffescript files into much more organized and self contained coffeescript classes using that technique??? working with backbone actually helped me a ton in understanding how to scope my javascript to a specific view element. In backbone views you only touch the element the view is responsible for in the DOM, use events to decouple components, etc
[05:18:36] jblack: I'm very happy with the quality of the first five pages. I wish you four were getting more than a third of the pie for the vast majority of the work
[05:18:37] dnewkerk: lots of good patterns to adopt even if you don???t use backbone or other fancy JS tools
[05:18:43] Ropeney: stupid questio n really, but is main principle same?
[05:18:47] Radar: Ropeney: Removing Subscribem engine + custom login engine, using a real app + Devise. Adding a chapter about Stripe.
[05:18:48] EvilEpoch: Greetings to Radar from The EvilEpoch.
[05:18:54] charliesome: has joined #RubyOnRails
[05:19:03] Radar: Ropeney: The MT parts of the book are going to stay the same unless something revolutionary changes in that area. I don't think there will be anythingf.
[05:19:10] Radar: Greetings to the EvilEpoch from Radar.
[05:19:15] Mendenhall: has joined #RubyOnRails
[05:19:21] EvilEpoch: The EvilEpoch is most pleased.
[05:19:29] Ropeney: Radar: I thought the removing the account system to an engine was the best idea :(
[05:19:44] Radar: Ropeney: The other 99% of readers disagree with you :P
[05:19:48] Radar: Ropeney: Why do you think it was a good idea?
[05:20:31] Ropeney: Radar: Its so portable now, plugins to any project i find. Any modification will improve/fix any project i use it in. I can secure that part of the project more easier to certain committers etc
[05:20:53] Radar: Ropeney: Most people who read the book are only applying the concepts to a single application.
[05:20:54] dnewkerk: oscarb92 and x-light here???s the blog post that goes along with that turbolinks 3 version of todomvc http://www.nateberkopec.com/2015/05/27/100-ms-to-glass-with-rails-and-turbolinks.html
[05:20:58] dhjondoh: has joined #RubyOnRails
[05:21:12] oscarb92: dnewkerk: I understand. I have tried angular a little bit, but it has been enough to consider my indiscriminate use of jQuery
[05:21:23] Ropeney: Radar: is that because people don't look too far ahead? idk, i just loved the idea of accounts being seperate to the program
[05:21:27] Aeyrix: >turbolinks
[05:21:29] Radar: Ropeney: Not too sure
[05:21:47] kegan_: can you make a remote post request via link_to ?
[05:22:00] jeadre: has joined #RubyOnRails
[05:23:10] Limix: has joined #RubyOnRails
[05:23:10] oscarb92: dnewkerk: oh, I have some reading material now, haha. Thanks.
[05:23:34] oscarb92: bye people. As usual thank you for your help.
[05:23:46] dnewkerk: oscarb92: no problem glad to help
[05:23:49] dnewkerk: well ladies and gentlemen, time to sleep :) Have a great day/night!
[05:23:51] VeryBewitching: Radar: Having said "...only applying the concepts...", are you suggesting the book is more about potential than a pragmatic look?
[05:24:05] Radar: VeryBewitching: Most definitely.
[05:24:21] VeryBewitching: Radar: Then I think I would buy it at some point.
[05:24:53] ecnalyr: has joined #RubyOnRails
[05:24:58] Radar: VeryBewitching: Would you buy if there was a coupon code?
[05:25:08] Ropeney: Radar: But i do think theres enough content about middleware, rack, routes etc to make a whole book
[05:25:20] VeryBewitching: Radar: I will buy it when I finish the 33 other books I have sitting on the shelf in my queue :D
[05:25:26] Radar: VeryBewitching: :)
[05:25:39] Radar: Ropeney: A book purely about Rack would be great.
[05:26:05] Radar: If anyone does want $10 off MTWR, here's a coupon code for that: https://leanpub.com/multi-tenancy-rails/c/10off
[05:26:29] Radar: Ropeney: The last chapter of Rails 4 in Action goes through Rack apps.
[05:26:33] baweaver: Ropeney: you might ping zenspider or tenderlove on that one, they tend to do a lot of work there.
[05:26:51] Radar: Ropeney: Give it a read and let me know if there's anything else that should've been covered there.
[05:27:13] Ropeney: Radar: Will have to get to reading that, i baught it a couple months ago but have gotten a few other books between then that took interest :P
[05:27:28] VeryBewitching: I think better documentation for making use of middleware in an engine you're building would be a handy edition to the guides.
[05:27:32] Ropeney: Big data, elasticsearch are keywords capturing interest atm
[05:27:37] Ropeney: baweaver: They have a book?
[05:27:49] baweaver: No, but they'd be useful to anyone trying to
[05:28:11] baweaver: you could win over tenderlove with a few well placed puns
[05:28:27] baweaver: and zenspider with scotch
[05:29:25] annlewis: has joined #RubyOnRails
[05:29:30] Ropeney: I need to write something that returns some data without loading a controller, and i think studying the middleware will get me to their; id rather not be doing something in nginx
[05:29:56] charliesome: has joined #RubyOnRails
[05:30:38] VeryBewitching: Ropeney: I'm sure you could intercept it.
[05:30:56] Ropeney: VeryBewitching: without playing in nginx?
[05:31:37] VeryBewitching: Ropeney: You must be able to, inserting middleware before Rails gets a crack at the request.
[05:31:42] jtthedev: are there any tools or gems that will generate an ERD of your model relationships ?
[05:31:55] sevenseacat: jtthedev: sure, check out rails-erd or railroady
[05:31:58] JoshGlzBrk: has joined #RubyOnRails
[05:31:58] VeryBewitching: Ropeney: I don't have code to do it, but I'm sure I could figure it out given time.
[05:32:10] jtthedev: sevenseacat, thank you
[05:32:23] ur5us: has joined #RubyOnRails
[05:32:26] Ropeney: VeryBewitching: Yeah given some time, but id rather not hack something in but understand it completely
[05:32:42] zpe: has joined #RubyOnRails
[05:33:08] VeryBewitching: Ropeney: Yup, not enough keystrokes in a day. :)
[05:33:13] Radar: Ropeney: Chapter 15 will tell you how to return data without using a controller :)
[05:34:21] lipoqil: has joined #RubyOnRails
[05:34:50] Ropeney: Radar: Already, ill put it ontop of my list once I'm done with "The well Grounded rubyist"
[05:35:50] baweaver: Mazes for Programmers was refreshingly entertaining
[05:36:05] baweaver: Looking into 'Learning Math with Python' for amusements sakes
[05:36:15] baweaver: want to see if I can use it to get people into math later
[05:36:33] annlewis: has joined #RubyOnRails
[05:37:25] quazimodo: has joined #RubyOnRails
[05:37:28] jas02: has joined #RubyOnRails
[05:38:01] srinidhi: has joined #RubyOnRails
[05:38:32] Ropeney: VeryBewitching: If only the days could be spent completely on sideprojects :P
[05:39:09] VeryBewitching: Ropeney: That depends on how you arrange your workloads.
[05:40:18] Ropeney: VeryBewitching: Yeah but i work for a company, my sideprojects aren't included in my "work hours"
[05:40:32] tagrudev: has joined #RubyOnRails
[05:40:34] VeryBewitching: Ropeney: I incorporated a small business that files no taxes, makes no income and has no sales or clients. All of the spare time I spend working on a side project is R&D tax credit in Canada.
[05:41:00] Radar: ACTION moves to Canada
[05:41:03] Ropeney: VeryBewitching: We have a very similar thing in Australia
[05:41:08] riotjones: has joined #RubyOnRails
[05:41:09] Radar: ACTION stays in AU
[05:41:09] Aeyrix: Radar: We haven't even had beers yet
[05:41:11] Aeyrix: you can't do that
[05:41:14] annlewis: has joined #RubyOnRails
[05:41:23] Radar: True story: I am going to Canada in 3 weeks time.
[05:41:30] Aeyrix: Vacation?
[05:41:32] VeryBewitching: Whereabouts Radar?
[05:41:36] Radar: Even Radar takes vacation.
[05:41:42] Radar: VeryBewitching: Montreal + QC
[05:41:51] VeryBewitching: Montreal is in Quebec :D
[05:42:02] Radar: QC == Quebec City.
[05:42:06] Radar: in my head
[05:42:13] VeryBewitching: QC is the province abbrv
[05:42:30] VeryBewitching: You'll be 2 hours from me.
[05:42:40] Radar: Where are you?
[05:42:43] Aeyrix: at radar?
[05:42:45] Aeyrix: or just in general?
[05:42:51] baweaver: If you end up in SF, drop by and I'll buy you a round
[05:42:54] VeryBewitching: Aeyrix: In general, as he flies over
[05:43:03] Radar: I thought Shopify bought up all the Rails devs in that area?
[05:43:20] Aeyrix: Yeah my mate in Ottowa works for Shopify.
[05:43:24] Aeyrix: Go / Rails.
[05:43:27] VeryBewitching: Radar: Strictly speaking, I don't write Rails software for a living
[05:44:02] tjbiddle: has joined #RubyOnRails
[05:44:28] VeryBewitching: But yes, most Rails developers I've met in Ottawa work with Shopify
[05:44:30] christiandsg: has joined #RubyOnRails
[05:44:49] Radar: I interviewed there once. Great interview process. Decided I didn't want to be cold(er) so I stayed in AU.
[05:44:50] adamaig: has joined #RubyOnRails
[05:44:58] baweaver: Our SysAdmin is Canadian :D
[05:45:04] baweaver: Calgary iirc
[05:45:17] VeryBewitching: In Ottawa, it's 45 C in the summer, -35 C in the winter
[05:45:23] VeryBewitching: Best of both extremes.
[05:45:32] baweaver: you use the word best
[05:45:36] baweaver: interesting choice
[05:45:39] Ropeney: VeryBewitching: Never going to Ottawa
[05:45:46] Aeyrix: Yeah neither of those sound ideal.
[05:45:51] annlewis: has joined #RubyOnRails
[05:45:53] Aeyrix: How about 20??C year-round?
[05:45:55] Aeyrix: Yes please.
[05:46:06] VeryBewitching: Aeyrix: I'm far too accustomed to the seasons changing
[05:46:08] baweaver: you all and your metric
[05:46:17] Ropeney: Aeyrix: 23C all round okay? thats the office temperature :D
[05:46:19] rvanlieshout: 20 year round. no
[05:46:24] rvanlieshout: that would be boring
[05:46:29] VeryBewitching: Time for more tea.
[05:46:30] Aeyrix: Ropeney: Ya
[05:46:30] baweaver: Aeyrix: That's SF
[05:46:41] Aeyrix: baweaver: Obnoxious house pricing is also SF.
[05:46:53] baweaver: ACTION will not deny that for a second
[05:47:39] Aeyrix: That reminds me
[05:47:40] Aeyrix: lease ups oon
[05:47:43] Aeyrix: gotta look for a new crib
[05:48:16] rrawlins: has joined #RubyOnRails
[05:48:27] EvilEpoch: has joined #RubyOnRails
[05:48:56] Aeyrix: staying where i am
[05:49:01] Aeyrix: proximity to my girlfriend :)
[05:49:25] sevenseacat: the thing bout girlfriends is that theyre movable objects
[05:49:43] sevenseacat: well, not objects, but that ruins the metaphor
[05:49:46] jesterfraud: sevenseacat, you'd hope so in case they meet an unstoppable force
[05:49:57] baweaver: Was about to say
[05:49:59] sevenseacat: Aeyrix: be that unstoppable force.
[05:49:59] jesterfraud: OH: "Out of scope, out of scope, in scope but not doing it anyway"
[05:50:00] baweaver: out of character there
[05:50:25] annlewis: has joined #RubyOnRails
[05:50:28] baweaver: I need to remember that one
[05:50:57] jesterfraud: shouldn't that be pedantry? ;)
[05:51:08] maz-dev: has joined #RubyOnRails
[05:51:40] baweaver: A group of pedants is known as an 'actually...'
[05:51:48] Radar: well actually*
[05:52:23] baweaver: ACTION checked if he mispelled that
[05:52:35] baweaver: irony abounds
[05:52:39] jesterfraud: well, actually*
[05:52:41] corioliss: has joined #RubyOnRails
[05:52:44] drale2k: has joined #RubyOnRails
[05:53:13] atomic: has joined #RubyOnRails
[05:53:15] mary5030: has joined #RubyOnRails
[05:53:27] baweaver: misspelled misspelled for the win
[05:53:36] KnownSyntax: has joined #RubyOnRails
[05:53:36] KnownSyntax: has joined #RubyOnRails
[05:54:05] Aeyrix: <sevenseacat> the thing bout girlfriends is that theyre movable objects
[05:54:07] Aeyrix: Not mine. :(
[05:54:10] Aeyrix: She doesn't live with me atm.
[05:54:31] baweaver: Aeyrix: https://www.youtube.com/watch?v=4m1EFMoRFvY
[05:54:40] Aeyrix: At work fam
[05:54:42] Aeyrix: can't watch
[05:54:58] baweaver: TL;DW: If you like it you shoulda put a ring on it joke
[05:55:01] annlewis: has joined #RubyOnRails
[05:55:04] Aeyrix: Perhaps one day.
[05:56:48] Aeyrix: And by perhaps I mean most probably.
[05:56:56] Aeyrix: I'll be sure to let the channel know if / when it happens.
[05:57:02] jesterfraud: Aeyrix, you going to have to fight for good internet again?
[05:57:24] jesterfraud: * passable internet
[05:57:29] Aeyrix: i make sure now
[05:57:33] Aeyrix: that i can churn to whatever address
[05:57:37] Aeyrix: because fuck that tbqh
[05:57:54] EvilEpoch: has joined #RubyOnRails
[05:59:40] annlewis_: has joined #RubyOnRails
[06:01:59] rushed: has joined #RubyOnRails
[06:02:25] krz: has joined #RubyOnRails
[06:02:27] DoubleMalt: has joined #RubyOnRails
[06:03:03] atomic: has left #RubyOnRails: ()
[06:03:08] Creeves: has joined #RubyOnRails
[06:04:15] annlewis: has joined #RubyOnRails
[06:06:22] kimegede: has joined #RubyOnRails
[06:08:51] annlewis: has joined #RubyOnRails
[06:08:57] jblack: Radar: Do you like suggestions on grammar and, if so, through which medium?
[06:10:13] sandstrom: has joined #RubyOnRails
[06:10:29] Radar: jblack: https://github.com/rubysherpas/r4ia, but the book is going to print Very Soon Now(tm) and we're likely not going to update it past this point.
[06:10:48] mdel: has joined #RubyOnRails
[06:13:27] annlewis: has joined #RubyOnRails
[06:18:02] annlewis_: has joined #RubyOnRails
[06:19:57] nya: has joined #RubyOnRails
[06:20:12] jblack: You're using the github issue tracker?
[06:20:35] jblack: Very resourceful.
[06:20:44] tvw: has joined #RubyOnRails
[06:21:00] rails663: has joined #RubyOnRails
[06:21:29] sevenseacat: grammar issues in R4IA? I'll take the blame for those, but unfortunately it's too late to make any changes to the content - any minute now I'm expecting news that the book has gone to the printers
[06:21:35] jblack: I was going to suggest striking "Well," from the text as its an interjection without value.
[06:21:44] sevenseacat: (though I've been saying 'any minute now' since Monday)
[06:21:58] nya: has joined #RubyOnRails
[06:22:04] jblack: Its the written equivilant of "uh". =)
[06:22:13] allcentury: has joined #RubyOnRails
[06:22:15] sevenseacat: I probably put the errors in, but we'll blame Manning's proofreaders and editors for not correcting them :)
[06:22:24] sevenseacat: after all, they're the professionals
[06:22:28] Macaveli: has joined #RubyOnRails
[06:23:29] Rubie: has joined #RubyOnRails
[06:23:34] jblack: It's not invalid, so they would pass on it if they're both greedy and lazy. =)
[06:23:50] sevenseacat: spoilers: probably both
[06:28:36] Macaveli: has joined #RubyOnRails
[06:28:42] lipoqil: has joined #RubyOnRails
[06:28:52] comrad: has joined #RubyOnRails
[06:29:41] jblack: The technical content is pretty good. =)
[06:29:58] eGGsha: has joined #RubyOnRails
[06:35:33] mytrile: has joined #RubyOnRails
[06:36:35] mytrile: Hey guys, do you know how to use specific encoding with CSV::Row.new while trying to stream csv like this - http://smsohan.com/blog/2013/05/09/genereating-and-streaming-potentially-large-csv-files-using-ruby-on-rails/
[06:40:50] dvdchr: has joined #RubyOnRails
[06:41:38] huck5: has joined #RubyOnRails
[06:44:28] huck5: I'm working from an example that renders a _header partial. In the context it is/contains the navigation bar. The partial is rendered within the application.html.erb file, inside a HTML <header> tag. Within the _header partial there is another <header> tag. Is there a reason for this; is it advisable?
[06:44:29] x-light: has joined #RubyOnRails
[06:45:09] rushed: huck5: sounds like an oversight
[06:45:29] huck5: rushed: That's what I thought. It's not really advisable to render multiple <header> tags, is it?
[06:46:36] rushed: huck5: it's just a tag, you can use as many as you want
[06:46:54] rushed: huck5: <head> (above <body>) is the special one
[06:46:58] sevenseacat: the tag just means its the header section of whatever its in
[06:47:16] huck5: OK, thanks!
[06:47:21] sevenseacat: theres no 'you must only have one on a page' or anything rule
[06:47:59] huck5: Gotcha. Thanks rushed, sevenseacat
[06:49:03] zpe: has joined #RubyOnRails
[06:49:42] michael_mbp: has joined #RubyOnRails
[06:50:17] Radar: It's time to partake in that great Australian tradition known as beer o'clock.
[06:50:21] Radar: Have fun, kids.
[06:50:36] Detch: has joined #RubyOnRails
[06:51:05] jesterfraud: has joined #RubyOnRails
[06:51:21] zpe: has joined #RubyOnRails
[06:51:36] xhosae: has joined #RubyOnRails
[06:53:00] bgh13: has joined #RubyOnRails
[06:54:42] solars: has joined #RubyOnRails
[06:55:07] Macaveli: has joined #RubyOnRails
[06:56:47] finnnnnnnnnnn: has joined #RubyOnRails
[06:56:53] EvilEpoch: has joined #RubyOnRails
[06:57:12] Pupeno: has joined #RubyOnRails
[06:59:02] stardiviner: has joined #RubyOnRails
[06:59:43] Pupeno: has joined #RubyOnRails
[06:59:58] sinkensabe: has joined #RubyOnRails
[07:00:21] nyaa: has joined #RubyOnRails
[07:00:28] juanpaucar: has joined #RubyOnRails
[07:01:09] drale2k: has joined #RubyOnRails
[07:02:35] juanpaucar: has joined #RubyOnRails
[07:02:54] Macaveli: has joined #RubyOnRails
[07:04:38] x-light: has joined #RubyOnRails
[07:04:52] juanpaucar: has joined #RubyOnRails
[07:07:10] juanpauc_: has joined #RubyOnRails
[07:08:16] deryl: has joined #RubyOnRails
[07:08:51] chouhoul_: has joined #RubyOnRails
[07:09:30] juanpaucar: has joined #RubyOnRails
[07:09:43] alphaatom: has joined #RubyOnRails
[07:11:53] juanpauc_: has joined #RubyOnRails
[07:13:20] ecnalyr: has joined #RubyOnRails
[07:14:18] juanpaucar: has joined #RubyOnRails
[07:14:52] kimegede: has joined #RubyOnRails
[07:15:23] jholm: has joined #RubyOnRails
[07:16:52] juanpauc_: has joined #RubyOnRails
[07:18:18] darutoko: has joined #RubyOnRails
[07:18:58] finnnnnnnnnnn: has joined #RubyOnRails
[07:19:00] sandstrom: has joined #RubyOnRails
[07:19:30] juanpaucar: has joined #RubyOnRails
[07:20:33] elepedus: has joined #RubyOnRails
[07:22:03] juanpaucar: has joined #RubyOnRails
[07:22:51] ur5us: has joined #RubyOnRails
[07:23:00] jeadre: has joined #RubyOnRails
[07:24:35] juanpaucar: has joined #RubyOnRails
[07:27:01] juanpauc_: has joined #RubyOnRails
[07:29:56] juanpaucar: has joined #RubyOnRails
[07:31:30] hmnhf: has joined #RubyOnRails
[07:32:08] juanpauc_: has joined #RubyOnRails
[07:33:06] livathinos: has joined #RubyOnRails
[07:33:12] adamaig: has joined #RubyOnRails
[07:34:51] juanpaucar: has joined #RubyOnRails
[07:35:44] allcentury: has joined #RubyOnRails
[07:36:03] finnnnnnnnnnn: has joined #RubyOnRails
[07:37:15] juanpaucar: has joined #RubyOnRails
[07:38:31] drale2k: has joined #RubyOnRails
[07:38:33] EvilEpoch: has joined #RubyOnRails
[07:39:08] artto: has joined #RubyOnRails
[07:39:23] maz-dev: has joined #RubyOnRails
[07:39:47] juanpauc_: has joined #RubyOnRails
[07:42:23] juanpaucar: has joined #RubyOnRails
[07:43:56] Pupeno: has joined #RubyOnRails
[07:44:04] chipotle: has joined #RubyOnRails
[07:44:19] finnnnnnnnnnn: has joined #RubyOnRails
[07:44:57] juanpauc_: has joined #RubyOnRails
[07:47:20] christiandsg: has joined #RubyOnRails
[07:47:21] juanpaucar: has joined #RubyOnRails
[07:47:56] dionysus69: has joined #RubyOnRails
[07:49:11] sevenseacat: good afternoon dionysus69 - did you end up getting that bottle image thingy from last night sorted?
[07:49:28] dionysus69: I wanted to tell you ye :D
[07:49:42] dionysus69: do you know what the problem turned out to be?
[07:49:50] juanpaucar: has joined #RubyOnRails
[07:49:52] dionysus69: "heroku restart"
[07:50:29] dionysus69: :D dont get angry at me :D :D
[07:52:04] dionysus69: at least I will know from now on :P i deleted heroku db too and migrated like 3 times and still didnt work so I discovered online that there was such a thing to restart heroku server :D
[07:52:14] aganov: has joined #RubyOnRails
[07:52:25] juanpauc_: has joined #RubyOnRails
[07:54:52] juanpaucar: has joined #RubyOnRails
[07:57:21] juanpaucar: has joined #RubyOnRails
[07:57:34] Sdwrage_: has joined #RubyOnRails
[08:00:04] juanpauc_: has joined #RubyOnRails
[08:02:17] juanpaucar: has joined #RubyOnRails
[08:02:20] DEA7TH: has joined #RubyOnRails
[08:02:47] kimegede: has joined #RubyOnRails
[08:03:05] krisquigley: has joined #RubyOnRails
[08:03:22] Sheperson: has joined #RubyOnRails
[08:05:05] juanpauc_: has joined #RubyOnRails
[08:06:01] jeadre: has joined #RubyOnRails
[08:07:27] juanpaucar: has joined #RubyOnRails
[08:08:10] charliesome: has joined #RubyOnRails
[08:08:57] Sheperson: I am testing a service I have written
[08:09:00] jsrn_: has joined #RubyOnRails
[08:09:13] Sheperson: And I wonder, which one of these is better
[08:10:00] juanpauc_: has joined #RubyOnRails
[08:11:27] jgt: has joined #RubyOnRails
[08:11:33] rvanlieshout: the orange one
[08:12:34] juanpaucar: has joined #RubyOnRails
[08:12:49] Pumukel: has joined #RubyOnRails
[08:13:12] krz: has joined #RubyOnRails
[08:13:45] Sheperson: https://gist.github.com/sheperson/e99e3d126de8375ee36b
[08:13:55] Sheperson: rvanlieshout: :-P
[08:15:07] juanpaucar: has joined #RubyOnRails
[08:16:12] michael_mbp: has joined #RubyOnRails
[08:16:15] Sheperson: any thoughts?
[08:17:31] DEA7TH_: has joined #RubyOnRails
[08:17:50] juanpauc_: has joined #RubyOnRails
[08:18:49] rushed: sheperson: first
[08:19:28] annlewis: has joined #RubyOnRails
[08:19:28] rushed: sheperson: also, be careful using floating point math with money
[08:19:45] Sheperson: but if I change the factory I have to calculate the expected amount again, and change the spec
[08:20:16] Sheperson: isn???t it better to use the more flexible approach?
[08:20:17] juanpaucar: has joined #RubyOnRails
[08:21:18] rvanlieshout: the last assumes it's actually set
[08:21:37] rvanlieshout: what if order.amount = 1000 using some weirdness sets it to 10
[08:21:38] sevenseacat: first one. the second I presume is just reimplementing the logic
[08:21:39] yfeldblum: has joined #RubyOnRails
[08:21:52] sevenseacat: not testing the actual return value
[08:21:57] rushed: sheperson: no, it's a test not a feature, also you'll usually want to use an explict rounding method when working with money
[08:22:00] lipoqil: has joined #RubyOnRails
[08:22:14] sevenseacat: for unit tests, your methods are black boxes - values go in, value comes out
[08:22:23] rushed: sheperson: and be careful dividing by integers :P
[08:22:34] rvanlieshout: you might want to use BigDeciaml
[08:22:40] rvanlieshout: BigDecimal even
[08:22:41] rushed: sheperson: seriously maybe skip the test optimization and read a bit about working with money :)
[08:22:58] bronson: has joined #RubyOnRails
[08:23:00] juanpaucar: has joined #RubyOnRails
[08:23:29] Sheperson: rushed: any hints for that one?
[08:23:39] rushed: sheperson: I just gave you like four~
[08:23:59] Sheperson: any hints on the last hint
[08:25:21] mugurel: has joined #RubyOnRails
[08:25:24] juanpaucar: has joined #RubyOnRails
[08:27:30] bruno-: has joined #RubyOnRails
[08:27:58] juanpaucar: has joined #RubyOnRails
[08:28:12] mugurel: hello guys
[08:28:12] njero: has joined #RubyOnRails
[08:29:55] allcentury: has joined #RubyOnRails
[08:30:38] juanpauc_: has joined #RubyOnRails
[08:30:38] yfeldblum: has joined #RubyOnRails
[08:33:05] juanpaucar: has joined #RubyOnRails
[08:33:43] Sheperson: rushed: any recommendations for reading about working with money?
[08:35:29] blnkammo: has joined #RubyOnRails
[08:35:30] naftilos76: Is there a way to uninstall all gems assosiated with a rails app (inside the gemfile) ? With bundle or gem?
[08:35:39] juanpauc_: has joined #RubyOnRails
[08:37:37] rushed: sheperson: I already gave you the big ones... avoid floating point, careful with division, be explict about rounding... there are several ways to do it (integers, decimals, etc) read about them, pick one you like, be consistant... there are gems to help if you care for that as well
[08:38:16] juanpaucar: has joined #RubyOnRails
[08:39:02] rushed: sheperson: also, why are you calculating your own tax? is this homework or something?
[08:39:24] Sheperson: not a home work
[08:39:33] Sheperson: a real project
[08:40:09] rushed: sheperson: seems like something that would be handled by a payment processor or some part of a system where someone had already considered how to handle money~
[08:40:29] Sheperson: I am that someone
[08:40:39] Sheperson: but the fact is, it is not very complicated
[08:40:51] juanpaucar: has joined #RubyOnRails
[08:40:57] rushed: sheperson: nothing is ever very complicated, until it is~
[08:41:20] Sheperson: all I need to do is calculate the tax based on user???s country (EU)
[08:42:27] codenapper: has joined #RubyOnRails
[08:42:37] sevenseacat: anything tax related is ridiculously complicated.
[08:42:52] codenapper: has joined #RubyOnRails
[08:43:26] juanpauc_: has joined #RubyOnRails
[08:43:30] supergeek: has joined #RubyOnRails
[08:44:09] nya: has joined #RubyOnRails
[08:45:57] blackmesa: has joined #RubyOnRails
[08:46:02] juanpaucar: has joined #RubyOnRails
[08:48:24] juanpauc_: has joined #RubyOnRails
[08:50:26] atmosx: money wise, DHH in his book uses decimal though, you think i'ts just for the sake of simplicity?
[08:51:04] juanpaucar: has joined #RubyOnRails
[08:51:27] rushed: atmosx: consistant use of decimals is one of several accepted approaches
[08:51:37] nya: has joined #RubyOnRails
[08:52:21] bin_005: has joined #RubyOnRails
[08:53:32] juanpaucar: has joined #RubyOnRails
[08:54:13] Sheperson: atmosx: which book?
[08:54:28] gerardc: has joined #RubyOnRails
[08:56:03] atmosx: sheperson: https://pragprog.com/book/rails4/agile-web-development-with-rails-4
[08:56:06] juanpauc_: has joined #RubyOnRails
[08:56:32] yfeldblum: has joined #RubyOnRails
[08:58:39] juanpaucar: has joined #RubyOnRails
[09:00:33] startupality: has joined #RubyOnRails
[09:01:15] juanpauc_: has joined #RubyOnRails
[09:02:20] krz: has joined #RubyOnRails
[09:02:57] arup_r: has joined #RubyOnRails
[09:03:46] jholm: has joined #RubyOnRails
[09:03:49] juanpaucar: has joined #RubyOnRails
[09:03:59] voker57: has joined #RubyOnRails
[09:05:49] arup_r: I am trying to create some opengraph meta tag using content_tag, but it is displaying the text inside the <body>. it should be inside the <head> and not to display as the content of the HTML.. What wrong am I doing? https://gist.github.com/aruprakshit/8cde1f914faa2b4ee19e
[09:06:04] blippitybloop: has joined #RubyOnRails
[09:06:33] juanpauc_: has joined #RubyOnRails
[09:08:28] arup_r: I fixed it https://gist.github.com/aruprakshit/8cde1f914faa2b4ee19e .. need to use #tag method
[09:08:40] maz-dev: has joined #RubyOnRails
[09:09:01] juanpaucar: has joined #RubyOnRails
[09:09:43] njero: has joined #RubyOnRails
[09:11:14] bruno-: has joined #RubyOnRails
[09:11:42] juanpauc_: has joined #RubyOnRails
[09:11:45] marr: has joined #RubyOnRails
[09:12:15] alex88: has joined #RubyOnRails
[09:13:27] charliesome: has joined #RubyOnRails
[09:13:30] yashinbasement: has joined #RubyOnRails
[09:14:10] juanpaucar: has joined #RubyOnRails
[09:14:26] rrawlins: has joined #RubyOnRails
[09:16:48] juanpauc_: has joined #RubyOnRails
[09:16:52] atzorvas: has joined #RubyOnRails
[09:17:29] krz: has joined #RubyOnRails
[09:20:06] Ergo: has joined #RubyOnRails
[09:21:02] baash05: has joined #RubyOnRails
[09:21:34] baash05: has joined #RubyOnRails
[09:21:41] annlewis: has joined #RubyOnRails
[09:21:57] adamaig: has joined #RubyOnRails
[09:22:04] baash05: has joined #RubyOnRails
[09:22:38] baash05: has joined #RubyOnRails
[09:23:09] baash05: has joined #RubyOnRails
[09:23:39] baash05: has joined #RubyOnRails
[09:24:18] baash05: has joined #RubyOnRails
[09:24:48] baash05: has joined #RubyOnRails
[09:25:08] annlewis: has joined #RubyOnRails
[09:25:23] baash05: has joined #RubyOnRails
[09:25:28] Macaveli: has joined #RubyOnRails
[09:25:53] baash05: has joined #RubyOnRails
[09:26:25] baash05: has joined #RubyOnRails
[09:26:44] Macaveli_: has joined #RubyOnRails
[09:26:59] baash05: has joined #RubyOnRails
[09:27:33] baash05: has joined #RubyOnRails
[09:28:01] baash05: has joined #RubyOnRails
[09:28:20] arup_r: has joined #RubyOnRails
[09:28:36] baash05: has joined #RubyOnRails
[09:29:07] baash05: has joined #RubyOnRails
[09:29:40] baash05: has joined #RubyOnRails
[09:29:44] chrissonar: has joined #RubyOnRails
[09:29:48] annlewis_: has joined #RubyOnRails
[09:30:06] suchness: has joined #RubyOnRails
[09:30:06] inoter: has joined #RubyOnRails
[09:30:10] baash05: has joined #RubyOnRails
[09:30:45] baash05: has joined #RubyOnRails
[09:31:15] baash05: has joined #RubyOnRails
[09:31:49] baash05: has joined #RubyOnRails
[09:32:23] baash05: has joined #RubyOnRails
[09:32:53] baash05: has joined #RubyOnRails
[09:32:56] jas02: has joined #RubyOnRails
[09:33:24] baash05: has joined #RubyOnRails
[09:33:59] baash05: has joined #RubyOnRails
[09:34:21] nfk: has joined #RubyOnRails
[09:34:30] baash05: has joined #RubyOnRails
[09:34:35] blnkammo_: has joined #RubyOnRails
[09:35:04] baash05: has joined #RubyOnRails
[09:35:11] atzorvas: how to add a default reference via migration?
[09:35:38] baash05: has joined #RubyOnRails
[09:36:04] baash05: has joined #RubyOnRails
[09:36:15] pierre_f: has joined #RubyOnRails
[09:36:40] baash05: has joined #RubyOnRails
[09:37:08] baash05: has joined #RubyOnRails
[09:37:20] pierre_f: has joined #RubyOnRails
[09:37:39] blackmesa: has joined #RubyOnRails
[09:37:45] baash05: has joined #RubyOnRails
[09:38:15] baash05: has joined #RubyOnRails
[09:38:40] maz-dev: has joined #RubyOnRails
[09:38:50] baash05: has joined #RubyOnRails
[09:38:55] sinaef: has joined #RubyOnRails
[09:39:06] annlewis: has joined #RubyOnRails
[09:39:20] baash05: has joined #RubyOnRails
[09:39:23] pierre_f: has joined #RubyOnRails
[09:39:35] atmosx: atzorvas: rails g migration AddSomeRef user:references
[09:39:53] baash05: has joined #RubyOnRails
[09:40:28] baash05: has joined #RubyOnRails
[09:41:03] baash05: has joined #RubyOnRails
[09:41:29] charliesome: has joined #RubyOnRails
[09:41:38] baash05: has joined #RubyOnRails
[09:41:58] atzorvas: atmosx: I have the ref, I want to default the ref to a value. default_column_value :users, :role, Role.find_by(name: 'registered') didn't worked
[09:42:08] baash05: has joined #RubyOnRails
[09:42:28] DoctorMonocular: has joined #RubyOnRails
[09:42:35] rushed: atzorvas: default values have to be something the database can understand, not ruby code
[09:42:43] baash05: has joined #RubyOnRails
[09:43:01] atzorvas: rushed: all references are integer type. so an int could work. so role.id :)
[09:43:19] baash05: has joined #RubyOnRails
[09:43:50] atzorvas: I tried to create a migration where I populated my default roles, and added default_column_value to the #id of registered role, but it failed
[09:43:54] baash05: has joined #RubyOnRails
[09:43:55] charliesome: has joined #RubyOnRails
[09:44:13] atmosx: erb code works in fixtures, never tested to see if it works on migrations <%= Role.find... %>
[09:44:27] baash05: has joined #RubyOnRails
[09:45:00] baash05: has joined #RubyOnRails
[09:45:00] rushed: atzorvas: are you sure that's a good fit for a db default?
[09:45:11] rushed: atmosx: migrations are already ruby
[09:45:35] baash05: has joined #RubyOnRails
[09:45:42] gaussblurinc1: has joined #RubyOnRails
[09:45:58] atmosx: rushed: ops, true.
[09:46:04] rushed: atzorvas: you might consider moving that default to the user model (or whever you're handling membership in roles) (also you might take a look at cancancan or rollify)
[09:46:05] baash05: has joined #RubyOnRails
[09:46:41] baash05: has joined #RubyOnRails
[09:46:51] livathinos: has joined #RubyOnRails
[09:47:17] baash05: has joined #RubyOnRails
[09:47:50] baash05: has joined #RubyOnRails
[09:48:13] annlewis: has joined #RubyOnRails
[09:48:27] baash05: has joined #RubyOnRails
[09:48:31] rushed: atzorvas: also, it might be a typo, but your original example didn't include the ".id" :)
[09:48:59] baash05: has joined #RubyOnRails
[09:49:13] rushed: atzorvas: you might find this helpful as well if you need models in your migrations: http://railsguides.net/change-data-in-migrations-like-a-boss/
[09:49:29] atzorvas: rushed: thx I'll report back in a while
[09:49:35] baash05: has joined #RubyOnRails
[09:49:49] charliesome: has joined #RubyOnRails
[09:50:06] atzorvas: maybe I'll go with boolean flags in user model because I only need admin/"standard" for now (as advised in rails antipatterns) But i'llsure check cancancan/rollify!
[09:50:09] baash05: has joined #RubyOnRails
[09:50:42] baash05: has joined #RubyOnRails
[09:50:43] elepedus: has joined #RubyOnRails
[09:51:13] blackhuey: has joined #RubyOnRails
[09:51:16] baash05: has joined #RubyOnRails
[09:51:33] arup_r: has joined #RubyOnRails
[09:51:47] baash05: has joined #RubyOnRails
[09:51:57] christiandsg: has joined #RubyOnRails
[09:52:21] baash05: has joined #RubyOnRails
[09:52:42] DEA7TH_: has joined #RubyOnRails
[09:52:56] baash05: has joined #RubyOnRails
[09:53:31] baash05: has joined #RubyOnRails
[09:54:06] baash05: has joined #RubyOnRails
[09:54:36] baash05: has joined #RubyOnRails
[09:55:13] baash05: has joined #RubyOnRails
[09:55:44] baash05: has joined #RubyOnRails
[09:56:15] baash05: has joined #RubyOnRails
[09:56:50] baash05: has joined #RubyOnRails
[09:57:24] bin_005: has joined #RubyOnRails
[09:57:26] baash05: has joined #RubyOnRails
[09:57:58] baash05: has joined #RubyOnRails
[09:58:24] baash05: has joined #RubyOnRails
[09:58:59] baash05: has joined #RubyOnRails
[09:59:38] baash05: has joined #RubyOnRails
[09:59:41] atzorvas: baash05: wtf
[10:00:10] baash05: has joined #RubyOnRails
[10:00:43] baash05: has joined #RubyOnRails
[10:01:17] baash05: has joined #RubyOnRails
[10:02:02] baash05: has joined #RubyOnRails
[10:02:22] baash05: has joined #RubyOnRails
[10:02:52] baash05: has joined #RubyOnRails
[10:03:27] baash05: has joined #RubyOnRails
[10:03:53] jas02: has joined #RubyOnRails
[10:03:57] baash05: has joined #RubyOnRails
[10:04:32] baash05: has joined #RubyOnRails
[10:05:04] baash05: has joined #RubyOnRails
[10:05:46] baash05: has joined #RubyOnRails
[10:06:07] jgt: has joined #RubyOnRails
[10:06:10] baash05: has joined #RubyOnRails
[10:06:10] quazimodo: anyone here using requirejs-rails in production?
[10:06:46] baash05: has joined #RubyOnRails
[10:07:16] baash05: has joined #RubyOnRails
[10:07:46] baash05: has joined #RubyOnRails
[10:08:53] baash05: has joined #RubyOnRails
[10:09:28] baash05: has joined #RubyOnRails
[10:09:58] baash05: has joined #RubyOnRails
[10:10:07] lipoqil: has joined #RubyOnRails
[10:11:08] baash05: has joined #RubyOnRails
[10:11:43] baash05: has joined #RubyOnRails
[10:12:18] baash05: has joined #RubyOnRails
[10:12:53] baash05: has joined #RubyOnRails
[10:13:28] baash05: has joined #RubyOnRails
[10:14:03] baash05: has joined #RubyOnRails
[10:14:33] baash05: has joined #RubyOnRails
[10:15:08] baash05: has joined #RubyOnRails
[10:15:44] baash05: has joined #RubyOnRails
[10:16:12] baash05: has joined #RubyOnRails
[10:16:42] Macaveli: has joined #RubyOnRails
[10:16:44] baash05: has joined #RubyOnRails
[10:17:01] brotspinne: has joined #RubyOnRails
[10:17:26] baash05: has joined #RubyOnRails
[10:17:57] baash05: has joined #RubyOnRails
[10:18:33] baash05: has joined #RubyOnRails
[10:19:08] baash05: has joined #RubyOnRails
[10:19:38] baash05: has joined #RubyOnRails
[10:20:16] baash05: has joined #RubyOnRails
[10:20:41] rickmasta: has joined #RubyOnRails
[10:20:49] baash05: has joined #RubyOnRails
[10:21:51] mrbubbles: has joined #RubyOnRails
[10:25:08] ngw: has joined #RubyOnRails
[10:29:48] jgt: has joined #RubyOnRails
[10:29:49] gerardc: has joined #RubyOnRails
[10:29:49] kimegede: has joined #RubyOnRails
[10:29:49] riotjones: has joined #RubyOnRails
[10:29:49] naftilos76: has joined #RubyOnRails
[10:29:49] Sanguine1nomaly: has joined #RubyOnRails
[10:29:49] aguynamedben: has joined #RubyOnRails
[10:29:49] exadeci: has joined #RubyOnRails
[10:29:49] cball: has joined #RubyOnRails
[10:29:49] sfr^: has joined #RubyOnRails
[10:29:49] universa1: has joined #RubyOnRails
[10:29:49] LateralOctober: has joined #RubyOnRails
[10:29:49] Shidash: has joined #RubyOnRails
[10:29:49] mcr-credil: has joined #RubyOnRails
[10:29:49] braincrash: has joined #RubyOnRails
[10:29:49] busterarm: has joined #RubyOnRails
[10:29:49] armyriad: has joined #RubyOnRails
[10:29:49] PlasmaStar: has joined #RubyOnRails
[10:29:49] george2: has joined #RubyOnRails
[10:29:49] fryguy: has joined #RubyOnRails
[10:29:49] weaksauce: has joined #RubyOnRails
[10:29:49] LBRapid: has joined #RubyOnRails
[10:29:49] FooBarWidget_: has joined #RubyOnRails
[10:29:49] chridal: has joined #RubyOnRails
[10:29:49] _axx: has joined #RubyOnRails
[10:29:49] chuy: has joined #RubyOnRails
[10:29:49] Ratler: has joined #RubyOnRails
[10:29:49] gavit: has joined #RubyOnRails
[10:29:49] Nowaker: has joined #RubyOnRails
[10:29:49] asdfoo: has joined #RubyOnRails
[10:29:50] leifcr: has joined #RubyOnRails
[10:29:50] hive-mind: has joined #RubyOnRails
[10:29:50] marienz: has joined #RubyOnRails
[10:29:50] ArTiSTiX_: has joined #RubyOnRails
[10:29:50] masscrx: has joined #RubyOnRails
[10:29:50] aep: has joined #RubyOnRails
[10:29:50] ernesto_jimenez: has joined #RubyOnRails
[10:30:06] 16WAANP8U: has joined #RubyOnRails
[10:30:06] krz: has joined #RubyOnRails
[10:30:06] yfeldblum: has joined #RubyOnRails
[10:30:07] jeadre: has joined #RubyOnRails
[10:30:07] Pupeno: has joined #RubyOnRails
[10:30:07] rushed: has joined #RubyOnRails
[10:30:07] corioliss: has joined #RubyOnRails
[10:30:07] Klumben: has joined #RubyOnRails
[10:30:07] cschneid: has joined #RubyOnRails
[10:30:07] larissa: has joined #RubyOnRails
[10:30:07] BLuEGoD: has joined #RubyOnRails
[10:30:07] chancancode: has joined #RubyOnRails
[10:30:07] robotbrain: has joined #RubyOnRails
[10:30:07] chrisarcand: has joined #RubyOnRails
[10:30:07] drim: has joined #RubyOnRails
[10:30:07] sevenseacat: has joined #RubyOnRails
[10:30:07] Guest74353: has joined #RubyOnRails
[10:30:07] markelite: has joined #RubyOnRails
[10:30:07] Seich: has joined #RubyOnRails
[10:30:07] crdpink: has joined #RubyOnRails
[10:30:07] QKO: has joined #RubyOnRails
[10:30:07] lupine: has joined #RubyOnRails
[10:30:07] terrellt: has joined #RubyOnRails
[10:30:07] urkle: has joined #RubyOnRails
[10:30:07] fluxsource: has joined #RubyOnRails
[10:30:07] iooner: has joined #RubyOnRails
[10:30:07] skarn: has joined #RubyOnRails
[10:30:07] Dwarf: has joined #RubyOnRails
[10:30:07] epochwolf: has joined #RubyOnRails
[10:30:07] DarkBushido: has joined #RubyOnRails
[10:30:07] asi_: has joined #RubyOnRails
[10:30:07] Zarthus: has joined #RubyOnRails
[10:30:07] elton: has joined #RubyOnRails
[10:30:07] creature: has joined #RubyOnRails
[10:30:07] werd-driven: has joined #RubyOnRails
[10:30:07] amortimer: has joined #RubyOnRails
[10:30:07] segy: has joined #RubyOnRails
[10:30:07] Papierkorb: has joined #RubyOnRails
[10:30:07] Mession: has joined #RubyOnRails
[10:30:08] frigidcode: has joined #RubyOnRails
[10:30:08] phikes: has joined #RubyOnRails
[10:30:08] skakri: has joined #RubyOnRails
[10:30:08] Kilo`byte: has joined #RubyOnRails
[10:30:08] royvandermeij: has joined #RubyOnRails
[10:30:08] Gabriel403: has joined #RubyOnRails
[10:30:08] tdguy: has joined #RubyOnRails
[10:30:08] Megatomte: has joined #RubyOnRails
[10:31:00] PlasmaStar: has joined #RubyOnRails
[10:31:15] armyriad: has joined #RubyOnRails
[10:32:02] hive-mind: has joined #RubyOnRails
[10:32:26] braincrash: has joined #RubyOnRails
[10:32:33] krz: has joined #RubyOnRails
[10:32:38] crdpink: has joined #RubyOnRails
[10:33:03] 16WAANP8U: has joined #RubyOnRails
[10:33:03] yfeldblum: has joined #RubyOnRails
[10:33:03] jeadre: has joined #RubyOnRails
[10:33:03] Pupeno: has joined #RubyOnRails
[10:33:03] rushed: has joined #RubyOnRails
[10:33:03] corioliss: has joined #RubyOnRails
[10:33:03] Klumben: has joined #RubyOnRails
[10:33:03] cschneid: has joined #RubyOnRails
[10:33:03] larissa: has joined #RubyOnRails
[10:33:03] BLuEGoD: has joined #RubyOnRails
[10:33:03] chancancode: has joined #RubyOnRails
[10:33:03] robotbrain: has joined #RubyOnRails
[10:33:03] chrisarcand: has joined #RubyOnRails
[10:33:03] drim: has joined #RubyOnRails
[10:33:04] sevenseacat: has joined #RubyOnRails
[10:33:04] Guest74353: has joined #RubyOnRails
[10:33:04] markelite: has joined #RubyOnRails
[10:33:04] Seich: has joined #RubyOnRails
[10:33:04] QKO: has joined #RubyOnRails
[10:33:04] lupine: has joined #RubyOnRails
[10:33:04] terrellt: has joined #RubyOnRails
[10:33:04] urkle: has joined #RubyOnRails
[10:33:04] fluxsource: has joined #RubyOnRails
[10:33:04] iooner: has joined #RubyOnRails
[10:33:04] skarn: has joined #RubyOnRails
[10:33:04] Dwarf: has joined #RubyOnRails
[10:33:04] epochwolf: has joined #RubyOnRails
[10:33:04] DarkBushido: has joined #RubyOnRails
[10:33:04] asi_: has joined #RubyOnRails
[10:33:04] elton: has joined #RubyOnRails
[10:33:04] creature: has joined #RubyOnRails
[10:33:04] werd-driven: has joined #RubyOnRails
[10:33:04] amortimer: has joined #RubyOnRails
[10:33:04] segy: has joined #RubyOnRails
[10:33:04] Papierkorb: has joined #RubyOnRails
[10:33:04] Mession: has joined #RubyOnRails
[10:33:04] frigidcode: has joined #RubyOnRails
[10:33:04] phikes: has joined #RubyOnRails
[10:33:04] skakri: has joined #RubyOnRails
[10:33:04] Kilo`byte: has joined #RubyOnRails
[10:33:04] royvandermeij: has joined #RubyOnRails
[10:33:04] Gabriel403: has joined #RubyOnRails
[10:33:04] tdguy: has joined #RubyOnRails
[10:33:04] Megatomte: has joined #RubyOnRails
[10:33:10] Zarthus: has joined #RubyOnRails
[10:34:48] fluxsource: has joined #RubyOnRails
[10:35:09] urkle: has joined #RubyOnRails
[10:40:30] Macaveli_: has joined #RubyOnRails
[10:40:36] drale2k: has joined #RubyOnRails
[10:49:10] annlewis: has joined #RubyOnRails
[10:50:12] ecnalyr: has joined #RubyOnRails
[10:52:19] jholm: has joined #RubyOnRails
[10:53:59] nettoweb: has joined #RubyOnRails
[10:55:03] rodfersou: has joined #RubyOnRails
[10:55:15] qejk: has joined #RubyOnRails
[11:00:47] elepedus: has joined #RubyOnRails
[11:02:05] Gribo: has joined #RubyOnRails
[11:03:10] rodfersou: has joined #RubyOnRails
[11:03:54] rodfersou: has joined #RubyOnRails
[11:04:41] slava_: has joined #RubyOnRails
[11:06:16] dionysus69: does anyone use heroku along with amazon cloud service for static assets and file uploads?
[11:06:32] dionysus69: seems like heroku is discarding uploads on every new push
[11:07:50] annlewis: has joined #RubyOnRails
[11:08:04] Mia: has joined #RubyOnRails
[11:09:05] allcentury: has joined #RubyOnRails
[11:10:42] adamaig: has joined #RubyOnRails
[11:11:37] vasilakisFiL: has joined #RubyOnRails
[11:11:44] darrencauthon: has joined #RubyOnRails
[11:12:19] vasilakisFiL: can I define a method like that? def foobar[]; end
[11:12:20] nya: has joined #RubyOnRails
[11:12:28] rvanlieshout: vasilakisfil: !try
[11:12:28] helpa: vasilakisfil: Why don't you try it and find out for yourself?
[11:12:38] vasilakisFiL: yeah I did and I got an error
[11:12:42] slava_: has joined #RubyOnRails
[11:12:57] Pazician: has joined #RubyOnRails
[11:12:58] jholm: has joined #RubyOnRails
[11:13:05] vasilakisFiL: is there something else I need to do in order to squeeze the [] in the method name?
[11:13:24] Pazician: has joined #RubyOnRails
[11:13:46] tylernol: has joined #RubyOnRails
[11:16:13] rvanlieshout: vasilakisfil: a def [] != def foo[]
[11:16:29] rvanlieshout: if you want def foobar[] you need to have foobar return something with def []
[11:17:29] frzn: has joined #RubyOnRails
[11:19:58] johnflux: has joined #RubyOnRails
[11:21:50] mostlybadfly: has joined #RubyOnRails
[11:25:10] banister: has joined #RubyOnRails
[11:26:46] HalcyonicStorm: has joined #RubyOnRails
[11:28:35] chrissonar: has joined #RubyOnRails
[11:30:29] abracadaniel: has joined #RubyOnRails
[11:30:41] rrawlins: has joined #RubyOnRails
[11:31:25] broman: has joined #RubyOnRails
[11:31:52] broman: can somebody help me? i need to know how to generate a json file to be used by fullcalendar... how can i "mount" that json?
[11:32:02] Macaveli: has joined #RubyOnRails
[11:35:02] jhass: broman: I don't think your question is clear, try to elaborate
[11:35:30] jondot: has joined #RubyOnRails
[11:35:37] broman: jhass, i want to make a request do my rails app, and i want that request returns me a json
[11:35:52] jhass: cool, so just make a route that does that
[11:36:00] jhass: render json: whatever
[11:36:59] jgt: has joined #RubyOnRails
[11:37:04] jhass: broman: http://guides.rubyonrails.org/action_controller_overview.html#rendering-xml-and-json-data
[11:37:08] Linuus: has joined #RubyOnRails
[11:37:29] quazimodo: has joined #RubyOnRails
[11:37:39] broman: jhass, thanks.. i will read that :)
[11:39:23] syath: has joined #RubyOnRails
[11:39:26] mrbubbles: has anyone integrated stripe into an app before? just have a quick question re: recurring payments
[11:40:09] mrbubbles: say I???ve got 30 customers, each with a different bill date and billing amount. am I best off ditching the stripe recurring payment system (which I understand is plan based) and just billing each customer on their bill date using a cron script?
[11:41:03] MartinElvar: has joined #RubyOnRails
[11:41:32] banister: has joined #RubyOnRails
[11:41:49] rustymyers: has joined #RubyOnRails
[11:41:55] Detch: has joined #RubyOnRails
[11:42:33] rushed: has joined #RubyOnRails
[11:43:24] DoctorMonocular: has joined #RubyOnRails
[11:43:42] maz-dev: has joined #RubyOnRails
[11:45:28] darrenca_: has joined #RubyOnRails
[11:49:17] krisquigley: has joined #RubyOnRails
[11:52:47] roxtrongo: has joined #RubyOnRails
[11:53:00] christiandsg: has joined #RubyOnRails
[11:53:04] acti0nman: has joined #RubyOnRails
[11:54:47] charliesome: has joined #RubyOnRails
[11:55:21] tsujp: has joined #RubyOnRails
[11:55:34] tsujp: does anyone know why RVM environment variables cannot be read by rails?
[11:55:39] tsujp: http://stackoverflow.com/questions/32268596/rails-4-2-4-with-rvm-1-26-11-environment-variable-not-set-unable-to-read
[11:56:01] CassioAlmeidas: has joined #RubyOnRails
[11:56:14] ur5us: has joined #RubyOnRails
[11:58:14] lipoqil: has joined #RubyOnRails
[11:58:44] Macaveli: has joined #RubyOnRails
[12:01:20] HalcyonicStorm: has joined #RubyOnRails
[12:03:21] leslie: has joined #RubyOnRails
[12:03:46] leslie: has joined #RubyOnRails
[12:06:12] st34lth: has joined #RubyOnRails
[12:07:01] sevenseacat: has joined #RubyOnRails
[12:07:53] st34lth: rails server loads app fine but passenger complains, anyone has clue as to why? Message from application: uninitialized constant MyApp::Application::YAML (NameError)
[12:08:02] Pumukel: has joined #RubyOnRails
[12:08:51] drale2k: has joined #RubyOnRails
[12:09:12] nya: has joined #RubyOnRails
[12:09:25] chinmay_dd: has joined #RubyOnRails
[12:10:25] chinmay_dd: has left #RubyOnRails: ()
[12:10:27] chouhoulis: has joined #RubyOnRails
[12:11:12] CassioAlmeidas: I have a class Student, students have mother and father, mother and father have the rg, date of birth, name fields.I want the student class has two objects in forms such as "Parents", pre-defined description with "Mother" other as "Father".
[12:11:26] adamaig: has joined #RubyOnRails
[12:12:20] chouhoulis: has joined #RubyOnRails
[12:13:38] sevenseacat: CassioAlmeidas: so what is your "parents" model?
[12:15:07] jamiely: has joined #RubyOnRails
[12:16:22] mrbubbles: CassioAlmeidas: You could have a base model of ???Parent??? which ???Mother??? and ???Father??? inherit from (if they share mostly the same properties but some different)
[12:16:33] shilon: has joined #RubyOnRails
[12:16:46] mrbubbles: Or you could use STI and define them as type Mother or Father
[12:16:48] mrbubbles: lots of options
[12:16:55] sevenseacat: i would do neither of those tbh
[12:17:09] sevenseacat: given they said 'mother' or 'father' is just a description
[12:17:42] sevenseacat: but we dont know what they already have, and theyre likely gone
[12:18:04] mrbubbles: I misread it
[12:18:51] mrbubbles: oh so two Parent models, but then they want a Student model to have a mother (of type parent) and a father (of type parent)?
[12:20:02] sevenseacat: i would presume the description would be changeable, because not all students have a mother and a father
[12:20:09] sevenseacat: but that is how i would model it
[12:20:45] CassioAlmeidas: exactly, father and mother is only a description (a field in the model), the model is "Parent"
[12:20:57] sevenseacat: so you have this already?
[12:21:39] emba: has joined #RubyOnRails
[12:21:49] arup_r: Hi..can you see me ?
[12:22:03] arup_r: thanks.. coming with my question :)
[12:22:21] krisquigley: has joined #RubyOnRails
[12:22:24] jkamenik: has joined #RubyOnRails
[12:23:20] arup_r: I am using carrierwave gem .. And I am trying to do something with Opengraph meta tag. The problem is I am not able to create the full image path using carrierwave url helper like *_url. How to get the actual url ?
[12:23:26] arup_r: https://gist.github.com/aruprakshit/4ca5400065394c4767ee
[12:23:45] ur5us_: has joined #RubyOnRails
[12:24:26] sevenseacat: you'll likely have to construct it yourself
[12:25:18] sevenseacat: as a quick google search would have turned up.
[12:25:21] arup_r: ok.. I thought carrierwave has it.. I don't know
[12:25:43] sevenseacat: carrierwave doesnt store fully-quaified URLs, no. that makes no sense.
[12:25:54] sevenseacat: if you changed the server hostname, all the links would be broken.
[12:26:19] arup_r: Yes... got it
[12:26:25] arup_r: Let me google..
[12:26:45] CassioAlmeidas: Yes, but I am unable to post the code now, but it's something more like this:
[12:26:46] arup_r: Any Rails helper to give the host url...?
[12:26:47] CassioAlmeidas: ?????? has_many: parents
[12:26:47] CassioAlmeidas: ???????? belongs_to: student
[12:26:47] CassioAlmeidas: ???????? # Attributes: description, name, birth
[12:26:59] arup_r: CassioAlmeidas: !gist
[12:27:00] sevenseacat: CassioAlmeidas: !gist your code, don't spam the channel.
[12:27:00] helpa: CassioAlmeidas: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[12:27:00] mrbubbles: CassioAlmeidas: please use a pastebin
[12:27:16] arup_r: hehehe.. first time
[12:27:57] ur5us: has joined #RubyOnRails
[12:28:20] emba: has left #RubyOnRails: ()
[12:28:27] sevenseacat: ok, so when you render your student form, you need to make sure the student has two associated parent objects
[12:28:27] emba: has joined #RubyOnRails
[12:29:00] sevenseacat: you can build those using the association methods - http://guides.rubyonrails.org/association_basics.html#has-many-association-reference
[12:30:35] CassioAlmeidas: what I am not able to do is pre-set two objects, one with description "mother" and another describing "father" for display in the form
[12:30:52] northfurr: has joined #RubyOnRails
[12:31:48] clouder|grr: has joined #RubyOnRails
[12:32:53] CassioAlmeidas: in fact I can even do this in the controller, do not know how to display the form
[12:33:44] mrbubbles: Oh you mean you want a form with mother and then a dropdown to select who the mother is? Same for father?
[12:33:56] mrbubbles: This is fun :D
[12:34:31] sevenseacat: CassioAlmeidas: I'm having trouble understanding what part you're having problems with
[12:34:37] sevenseacat: is it just the form rendering?
[12:34:43] emba: has left #RubyOnRails: ()
[12:34:57] sevenseacat: what do you want your form to look like, and what code do you currently have for it?
[12:35:01] emba: has joined #RubyOnRails
[12:35:36] jkamenik: has joined #RubyOnRails
[12:36:08] CassioAlmeidas: no, no dropdown, just a nested form
[12:37:22] mrbubbles: Oh so you want them to fill in a single form for student but as part of that form there are fields for Mother and Father and when you click submit it creates the student model AND the associated parent models
[12:37:27] drale2k: has joined #RubyOnRails
[12:37:27] Pazician: has joined #RubyOnRails
[12:38:00] mrbubbles: Errr, first word? How many syllables :)
[12:38:11] i: has joined #RubyOnRails
[12:38:15] mary5030: has joined #RubyOnRails
[12:38:59] dstarh: has joined #RubyOnRails
[12:39:04] mary5030: has joined #RubyOnRails
[12:40:29] atomical: has joined #RubyOnRails
[12:40:56] Xiti: has joined #RubyOnRails
[12:42:15] jholm: has joined #RubyOnRails
[12:42:31] st34lth: in the guide "In production, Rails precompiles these files to public/assets by default. " but in production my public/assets/ folder is empty
[12:42:42] st34lth: I don't see any errors in console
[12:42:48] st34lth: what am I missing?
[12:43:07] Pazician: has joined #RubyOnRails
[12:43:26] CassioAlmeidas: mrbubbles: exactly
[12:44:19] CassioAlmeidas: mrbubbles: what better way to do this? with inheritance is better?
[12:44:40] mrbubbles: Well no, if you???ve got model associations it???s fine
[12:44:54] sevenseacat: st34lth: did you precompile your assets?
[12:45:02] darrencauthon: has joined #RubyOnRails
[12:45:06] st34lth: nope never did sevenseacat
[12:45:12] sevenseacat: then thats why the folder is empty
[12:45:16] charliesome: has joined #RubyOnRails
[12:45:18] jgt: has joined #RubyOnRails
[12:45:25] suchness: has left #RubyOnRails: ()
[12:45:36] st34lth: will I have to keep precompiling after the first deploy?
[12:45:37] suchness: has joined #RubyOnRails
[12:45:45] suchness: st34lth: Are you compiling them at any time?
[12:45:46] sevenseacat: you should precompile on every deploy.
[12:46:34] Kallis: has joined #RubyOnRails
[12:46:38] st34lth: is there a way to set rails to do this every single time? sounds sort of very manual from other framerworks?
[12:46:48] suchness: st34lth: No
[12:46:57] sevenseacat: however you're deployingshould have a hook to do it.
[12:47:11] sevenseacat: what are you using for deployment?
[12:47:22] suchness: st34lth: You need to eaither do it before you deploy and commit them into the repo, or have a deploy hook take care of it (preferable)
[12:47:26] st34lth: git, I'll put it in the post hooks
[12:47:36] arup_r: sevenseacat: I used http://stackoverflow.com/a/5484829/2767755 and it worked
[12:47:41] sevenseacat: thats a new one
[12:47:45] sevenseacat: arup_r: the powers of google!
[12:48:14] sevenseacat: st34lth: then you'd already have a pile of hooks to do things like migrate, symlink files, etc. add another one for precompilation :)
[12:50:04] st34lth: sevenseacat: came into rails thinking it's like magic. so everytime I face something like, i ask myself, WWRakeJD
[12:53:07] st34lth: another quick question, in rails s YAML preloads but in passenger it tells me it's undefined constant, the work around is to stick require 'yaml' in config.rb and application.rb am I missing something?
[12:53:53] helpa: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[12:55:43] tsvenson: has left #RubyOnRails: ("Ex-Chat")
[12:55:57] joshkovach: has joined #RubyOnRails
[12:57:16] mrbubbles: CassioAlmeidas: sevenseacat will correct me if I???m wrong ;) but I imagine the easiest way would be to just have the form submit to a controller action, then in that controller action create the two parent models using the relevent parameters and then create the student object using the remainign parameters, setting the mother and father associations to the objects you???ve just created
[12:58:00] sevenseacat: I'm still waiting to see the form, or at least confirmation that that is indeed where the problem is.
[12:58:10] sevenseacat: not wasting any more breath until that.
[12:58:20] banister: has joined #RubyOnRails
[13:03:06] Macaveli: has joined #RubyOnRails
[13:03:47] livathinos: has joined #RubyOnRails
[13:04:06] riotjones: has joined #RubyOnRails
[13:04:11] mugurel: hey guys, i just started using rails, can you point me to a good free resource to learn more about testing?
[13:04:26] mugurel: i can google it, but maybe you guys know something good and up to date
[13:04:54] helpa: We're not all guys here - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
[13:05:02] sevenseacat: I can give you good resources, but they won't be free.
[13:06:36] Macaveli: has joined #RubyOnRails
[13:07:22] mugurel: sorry, i was used to using guys as referring to both sexes, http://www.collinsdictionary.com/dictionary/english/guys, sorry if that offended you
[13:07:56] sevenseacat: if only every bit of slang and word in common usage was in a traditional dictionary
[13:08:16] SteenJobs: has joined #RubyOnRails
[13:08:24] sevenseacat: then we could stop having these ridiculous conversations
[13:08:46] sevenseacat: or maybe people could just read the message
[13:09:10] annlewis: has joined #RubyOnRails
[13:09:55] livathinos: has joined #RubyOnRails
[13:10:50] mrbubbles: mugurel: were you referring us to ???guys??? in the sense of ???(British) a person in shabby or ludicrously odd clothes??? :-/
[13:10:53] mrbubbles: I???m actually quite offended
[13:11:21] jhack32: has joined #RubyOnRails
[13:11:49] sevenseacat: mrbubbles: thank you.
[13:12:36] mugurel: ill let you folks do you thing and look for resources myself
[13:13:52] arrowcircle: has joined #RubyOnRails
[13:13:55] annlewis: has joined #RubyOnRails
[13:14:33] arrowcircle: hi! my question is not about rails, but could you please advice me any solutions for visits tracking of resources in rails app?
[13:15:22] sevenseacat: just using an external tool like google analytics would probably be easiest. if you want something internal to your app, a gem like impressionist (https://github.com/charlotte-ruby/impressionist) might help
[13:15:28] thedeveloper589: has joined #RubyOnRails
[13:16:17] thedeveloper589: has left #RubyOnRails: ()
[13:17:15] michael_mbp: has joined #RubyOnRails
[13:17:28] kegan_: has joined #RubyOnRails
[13:17:41] fmcgeough: has joined #RubyOnRails
[13:18:21] thedeveloper589: has joined #RubyOnRails
[13:18:44] annlewis_: has joined #RubyOnRails
[13:21:10] allcentury: has joined #RubyOnRails
[13:21:45] michael_mbp: has joined #RubyOnRails
[13:23:04] annlewis: has joined #RubyOnRails
[13:24:15] ldnunes: has joined #RubyOnRails
[13:24:33] banister: has left #RubyOnRails: ()
[13:24:45] banisterfiend: has joined #RubyOnRails
[13:25:10] beauby: has joined #RubyOnRails
[13:25:13] sinkensabe: has joined #RubyOnRails
[13:25:23] Linuus: has joined #RubyOnRails
[13:26:08] banisterfiend: hi, i have a url helper and i want to be able to do this: hello_url(format: :courses) but have it construct a url with the query paramters ?format=courses however, for some reason it always just constructs a url like this instead: hello.courses i assume it's cos the 'format' key is treated specially. Is there anyway i can cleanly do what i want? i.e have the query param as ?format=courses ?
[13:26:11] Sdwrage_: has joined #RubyOnRails
[13:26:14] thedeveloper589: has joined #RubyOnRails
[13:28:21] i: has joined #RubyOnRails
[13:28:23] n1lo: has joined #RubyOnRails
[13:28:29] sevenseacat: banisterfiend: youre right in that format is a reserved param for the actual request format
[13:28:45] sevenseacat: I don't know of any way to overwrite that
[13:29:21] roxtrongo: has joined #RubyOnRails
[13:29:35] banisterfiend: sevenseacat in a legacy rails app i'm looking at, they've somehow managed to make it so format: is not reserved and just operates like a normal query param, but i can't figure out how they're doing it
[13:30:04] ur5us_: has joined #RubyOnRails
[13:30:29] sevenseacat: ah hah you can disable the optional format parameter
[13:30:34] greengriminal: has joined #RubyOnRails
[13:30:41] sevenseacat: check for format: false in the routes?
[13:31:23] victortyau: has joined #RubyOnRails
[13:31:27] Macaveli_: has joined #RubyOnRails
[13:31:42] sevenseacat: might be in a scope wrapped around the entire routes block
[13:31:56] arrowcircle: @sevenseacat, Thanks!
[13:32:05] voker57: has joined #RubyOnRails
[13:33:20] fast_scooter: has joined #RubyOnRails
[13:33:36] ur5us: has joined #RubyOnRails
[13:33:45] hashrocket: has joined #RubyOnRails
[13:36:48] banisterfiend: sevenseacat thanks
[13:36:55] nettoweb: has joined #RubyOnRails
[13:37:36] Linuus: has joined #RubyOnRails
[13:38:25] centrx: has joined #RubyOnRails
[13:38:44] centrx: has joined #RubyOnRails
[13:40:26] voltalio: has joined #RubyOnRails
[13:41:43] jhack32: has joined #RubyOnRails
[13:41:58] kies: has joined #RubyOnRails
[13:43:44] devdazed: has joined #RubyOnRails
[13:43:48] jhass: banisterfiend: looks like you can trick with "format" => "foo" instead of format: "foo"
[13:44:11] DoctorMonocular: has joined #RubyOnRails
[13:46:13] havenwood: has joined #RubyOnRails
[13:46:27] lipoqil: has joined #RubyOnRails
[13:47:02] banisterfiend: jhass for realzies? i thought i tried that...weird, thx!
[13:47:10] JoshL: has joined #RubyOnRails
[13:47:47] jhass: at least in my rails 4.2 console here it seems to work
[13:48:06] paulcsmith: has joined #RubyOnRails
[13:49:12] DEA7TH_: has joined #RubyOnRails
[13:50:02] atomic: has joined #RubyOnRails
[13:51:13] mrbubbles: sevenseacat: do you know much about cron jobs? i???ve got a cron job that runs a rake task every minute on my server to import some csvs. the server keeps grinding, and when I login I can see that the cron jobs are stacking up (i.e. not terminating). I can also not log into the webapp until I restart the box (even if I restart unicorn AND restart nginx) which seems strange to me
[13:51:37] sevenseacat: mrbubbles: do you have an infinite loop in your task or something?
[13:51:51] sevenseacat: doesnt seem like a problem specific to cron, sounds like something in the task
[13:52:05] Limix: has joined #RubyOnRails
[13:52:11] mrbubbles: so I???m not quire sure whether the import script is not completing because the rails app is crashing, or if the app is crashing becasuse the task is spinning out and using all teh mrmory
[13:52:13] mrbubbles: I think probably the latter
[13:52:14] mrbubbles: yep exactly
[13:52:28] sevenseacat: and the cron tasks are run outside your web server, so thats why unicorn/nginx have no effect
[13:52:56] dionysus69: has joined #RubyOnRails
[13:53:50] mrbubbles: yep i get that, but i find it weird that I can???t conneect to the app (it???s an api) until I restart the box
[13:53:52] HalcyonicStorm: has joined #RubyOnRails
[13:54:04] mrbubbles: I thoguht that restartng nginx and unicorn would resolve any crashing that the mrmory error had caused
[13:54:51] d2dchat: has joined #RubyOnRails
[13:54:56] sankaber: has joined #RubyOnRails
[13:55:01] drale2k: has joined #RubyOnRails
[13:55:07] sevenseacat: not when the rake tasks are still sitting over in a corner still using all the memory
[13:55:21] codenapper: mrbubbles, maybe your database also crashed (if it's on the same server)?
[13:56:08] mrbubbles: sevenseacat: yep thoguth of that. so my process was 1) terminate all rake tasks 2) restart unicorn 3) restart nginx. still can???t connect
[13:56:14] mrbubbles: but then 4) reboot box, works fine
[13:56:21] alex88: has joined #RubyOnRails
[13:56:24] sevenseacat: how are you terminating anything if you're not connected?
[13:56:26] mrbubbles: codenapper: I I can connect to the DB through my dahsboard
[13:56:31] mrbubbles: I can ssh into thebox
[13:56:38] sevenseacat: then what can't you connect to?
[13:56:46] mrbubbles: sorry the front end (ember) just can???t seem to connect to the API
[13:56:51] sevenseacat: with what error?
[13:57:20] mrbubbles: it gives me an error about XMLHttpRequest cannot load xxx No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin is therefore not allowed access. The response had HTTP status code 502.
[13:57:57] voltalio: has joined #RubyOnRails
[13:58:00] christiandsg: has joined #RubyOnRails
[13:58:23] mrbubbles: But I have rack-cors etc setup and it works once I restart the server, so I assumed that it was just tripping that error as it couldn???t reach the API
[13:58:37] poli: has joined #RubyOnRails
[13:59:35] codenapper: mrbubbles, did you try curl-ing your API from your machine and/or the server itself?
[14:00:13] adamaig: has joined #RubyOnRails
[14:00:56] darrencauthon: has joined #RubyOnRails
[14:03:34] mrbubbles: codenapper: I???ll try that now
[14:03:49] annlewis: has joined #RubyOnRails
[14:03:52] mrbubbles: re: the api issue, I think the first issue is that it seems to be running the task three times every minute
[14:03:53] mrbubbles: https://gist.github.com/joeczucha/6fd4175b3e706eaf2ecf
[14:04:43] mrbubbles: I???m assumng that???s not right? or does that just mean that the first job launches the second, second the third
[14:06:59] dionysus70: has joined #RubyOnRails
[14:07:00] AzaToth: has joined #RubyOnRails
[14:07:53] codenapper: mrbubbles, seems to be just one "real" process, but i'm not sure either http://superuser.com/questions/136487/in-unix-what-are-the-ss-sl-and-ssl-proccess-types-i-see-with-ps-aux
[14:08:49] mrbubbles: I hadn???t spooted that, good spot thanks :)
[14:09:35] ngscheurich: has joined #RubyOnRails
[14:10:25] lipoqil: has joined #RubyOnRails
[14:10:47] based_p: has joined #RubyOnRails
[14:13:29] cball: has joined #RubyOnRails
[14:14:19] bashyou: has joined #RubyOnRails
[14:17:15] gregf__: has joined #RubyOnRails
[14:17:47] kimegede: has joined #RubyOnRails
[14:17:53] Linuus: has joined #RubyOnRails
[14:19:19] xye: has joined #RubyOnRails
[14:23:36] ecnalyr: has joined #RubyOnRails
[14:23:42] Linuus: has joined #RubyOnRails
[14:24:14] rrawlins: has joined #RubyOnRails
[14:25:37] juanpaucar: has joined #RubyOnRails
[14:25:43] bronson: has joined #RubyOnRails
[14:26:35] livathinos: has joined #RubyOnRails
[14:27:19] Pupeno: has joined #RubyOnRails
[14:28:07] adavia: has joined #RubyOnRails
[14:30:01] HalcyonicStorm: has joined #RubyOnRails
[14:30:04] Xiti: has joined #RubyOnRails
[14:30:13] usgs-cam: has joined #RubyOnRails
[14:30:26] blackmesa: has joined #RubyOnRails
[14:30:34] jholm: has joined #RubyOnRails
[14:31:51] workmad3: has joined #RubyOnRails
[14:34:58] rails663: has joined #RubyOnRails
[14:36:17] dopamean_: has joined #RubyOnRails
[14:36:22] Linuus: has joined #RubyOnRails
[14:37:03] roxtrongo: has joined #RubyOnRails
[14:38:10] sarink: has joined #RubyOnRails
[14:38:26] nertzy: has joined #RubyOnRails
[14:40:27] sininen: has joined #RubyOnRails
[14:41:44] acti0nman: has joined #RubyOnRails
[14:41:45] emba: has joined #RubyOnRails
[14:43:07] sonofdirt: has joined #RubyOnRails
[14:43:27] El3ktra: has joined #RubyOnRails
[14:43:35] srinidhi: has joined #RubyOnRails
[14:44:59] DoctorMonocular: has joined #RubyOnRails
[14:46:28] atomic: has joined #RubyOnRails
[14:46:46] atomic: has left #RubyOnRails: ()
[14:46:51] Creeves: has joined #RubyOnRails
[14:47:49] momomomomo: has joined #RubyOnRails
[14:52:02] Rubie: has joined #RubyOnRails
[14:52:38] gregf_: has joined #RubyOnRails
[14:52:43] tonios57: has joined #RubyOnRails
[14:55:12] aamax: has joined #RubyOnRails
[14:56:06] Spami: has joined #RubyOnRails
[14:57:01] i4pcbr: has joined #RubyOnRails
[14:57:36] Legitkrillin: has joined #RubyOnRails
[15:00:30] Swappticon: has joined #RubyOnRails
[15:03:03] herpless: has joined #RubyOnRails
[15:03:05] drale2k: has joined #RubyOnRails
[15:03:47] chouhoulis: has joined #RubyOnRails
[15:04:51] riotjones: has joined #RubyOnRails
[15:05:21] mustmodify: has joined #RubyOnRails
[15:05:42] maz-dev_: has joined #RubyOnRails
[15:06:02] shilon: has joined #RubyOnRails
[15:06:07] mustmodify: has left #RubyOnRails: ()
[15:06:42] j_mcnally: has joined #RubyOnRails
[15:06:54] andywww: has joined #RubyOnRails
[15:07:56] andywww: has left #RubyOnRails: ()
[15:08:28] aamax: I know I can sort an AR association by a field so it's returned as an ordered list. But I want to sort in a non-standard way. I have a gist that explains. would someone take a look and give me some advice please? https://gist.github.com/anonymous/b94693c1407b403cacb0
[15:09:02] davidheward: has joined #RubyOnRails
[15:09:04] DCameronMauch: has joined #RubyOnRails
[15:09:26] andywww: has joined #RubyOnRails
[15:16:25] redondo: has joined #RubyOnRails
[15:16:32] Seryaph: has joined #RubyOnRails
[15:17:59] rogue_koder: has joined #RubyOnRails
[15:18:22] iamse7en: has joined #RubyOnRails
[15:19:43] umgrosscol: has joined #RubyOnRails
[15:25:18] jholm: has joined #RubyOnRails
[15:26:59] chouhoulis: has joined #RubyOnRails
[15:29:12] aamax: ok. nm. I just did a hard coded fix. not elegant but functional. thx neway
[15:29:37] chouhoulis: has joined #RubyOnRails
[15:29:49] j3r0: has joined #RubyOnRails
[15:31:21] avoy: has joined #RubyOnRails
[15:32:29] jeadre: has joined #RubyOnRails
[15:37:12] IvanLing_: has joined #RubyOnRails
[15:37:22] jeadre: has joined #RubyOnRails
[15:41:02] [Butch]: has joined #RubyOnRails
[15:41:03] meatherly: has joined #RubyOnRails
[15:42:06] fabiosn: has joined #RubyOnRails
[15:42:21] EvilEpoch: has joined #RubyOnRails
[15:43:38] patrick_star: has joined #RubyOnRails
[15:45:45] DoctorMonocular: has joined #RubyOnRails
[15:46:25] petricore: has joined #RubyOnRails
[15:47:03] fabiosn: Hi, everyone. Is this the right channel to ask questions?
[15:48:00] The_Phoenix: has joined #RubyOnRails
[15:48:00] centrx: fabiosn, Correct
[15:49:01] dopamean1: has joined #RubyOnRails
[15:49:16] adamaig: has joined #RubyOnRails
[15:49:39] atomical: has joined #RubyOnRails
[15:49:48] Lightsword: has joined #RubyOnRails
[15:51:43] sandstrom: has joined #RubyOnRails
[15:51:56] fabiosn: So, I have this model, called Todo. It's a self-referential model, since I need todos to have "sub_todos". I plan on putting a form right bellow each todo on a view, and this form will be used to create sub_todos to said todo
[15:52:28] fabiosn: The thing is, I don't know how to right the form so that it sets the new todo's "parent_todo_id" attribute
[15:53:01] fabiosn: I asked it on SO: http://stackoverflow.com/questions/32271949/rails-form-for-creating-child-records-of-self-referential-models
[15:53:43] jxpx777: has joined #RubyOnRails
[15:53:49] fabiosn: how to write*
[15:54:05] centrx: fabiosn, You may be looking for "nested attributes". That's what's the "nested forms" answer is referring to
[15:54:25] centrx: but yeah that may not work for the self-referential
[15:54:41] centrx: How many layers of sub-todos can there be?
[15:54:55] centrx: Is there always one super-todo and one or more sub-todos?
[15:55:18] safety_cut: has joined #RubyOnRails
[15:55:20] fabiosn: I haven't set a limit. Todos may or may not have sub_todos
[15:56:03] towski_: has joined #RubyOnRails
[15:56:44] fabiosn: I'll probably limit the layers at some point, but this app is just for research
[15:57:21] Travis-42: has joined #RubyOnRails
[15:58:01] centrx: fabiosn, So why can't the form simply have a DDL that sets the parent_todo_id attribute?
[15:58:05] Travis-42: In rails 4.2, is the default ???action_dispatch.cookies_serializer??? supposed to be :json if not specified? I have an application that was upgraded to rails 4.2 without ever explicitly setting cookies_serializer a while back, but setting to :json now it errors on existing cookies (only :hybrid or :marshall work)
[15:58:15] centrx: fabiosn, Is the probem when the todo and the sub-todo are being created in the same submission?
[15:58:24] emba_: has joined #RubyOnRails
[15:58:31] atmosx: Devise creates email and password field for users?
[15:58:33] lipoqil: has joined #RubyOnRails
[15:58:53] jholm: has joined #RubyOnRails
[15:58:54] fabiosn: I'm sorry, what's a DDL?
[15:59:14] atmosx: and also creates a session handler from what I see, so basically to use devise properly you should leave email/password fields out of the model?
[15:59:31] centrx: fabiosn, drop-down list
[15:59:37] centrx: fabiosn, HTML select
[16:00:16] safety_cut: has joined #RubyOnRails
[16:00:35] fabiosn: that would be one way to do it, but would require the user to set it. Is it possible to set it in the params without the need for user input?
[16:00:38] centrx: Travis-42, Maybe the conflict is the existing cookies aren't json?
[16:01:28] centrx: fabiosn, On a single form, the sub-todos are always connected to a parent todo in the same form? Is the parent todo newly created?
[16:01:44] centrx: fabiosn, nested attributes does make it easy if there is only one layer
[16:02:34] centrx: fabiosn, If creating more than one layer of children/sub-todos is allowed, there must be some way that is represented in the form?
[16:02:58] centrx: fabiosn, So you might have some code in the controller for saving that relationship
[16:04:33] ellisTAA: has joined #RubyOnRails
[16:04:45] HalcyonicStorm: has joined #RubyOnRails
[16:04:52] p8m: has joined #RubyOnRails
[16:04:56] fabiosn: I'm a bit lost. Let's say a have a todo partial, and it shows the todo's content and a form for creating a sub todo
[16:05:19] Travis-42: centrx: I experimented by resetting cookies and it wasn???t the issue. I think maybe my misunderstanding was assuming that the ???default??? was json, rather than the default was an ???explicitly set??? json value
[16:05:19] ellisTAA: i have a skills table and a users table, a user has_many skills, but is it correct to say that a skill has_many users?
[16:05:41] drale2k: has joined #RubyOnRails
[16:05:42] fabiosn: That would be enough for the functionality I want. But how can I reference the parent's id?
[16:06:19] theery: has joined #RubyOnRails
[16:06:28] centrx: EllisTAA, Sure that's fine, many-to-many relationship, and sometimes you'll want to find all the users that have a particular skill, by skill (skill has many users)
[16:06:49] centrx: fabiosn, How is the parent ID represented in the form?
[16:06:56] ellisTAA: centrx: ???that???s fine??? makes me think there???s a better way?
[16:07:53] workmad3: EllisTAA: it's more that it's a question of how the objects/concepts are going to work in your app, which is a judgement call on your part, not something we've got context for
[16:08:09] workmad3: EllisTAA: so the best that can be said is "that doesn't seem crazy on a cursory examination"
[16:08:47] centrx: EllisTAA, many-to-many you would use 'has_many :through' or 'has_and_belongs_to_many'
[16:09:56] fabiosn: centrx: the only way I know how to represent it is using nested resources, something like "form_for [@project, @backlog]" (from a scrum app I'm writting)
[16:10:13] zendrix: has joined #RubyOnRails
[16:10:18] Scriptonaut: has joined #RubyOnRails
[16:10:27] fabiosn: centrx: would "form_for [@todo, @todo]" work?
[16:13:04] centrx: fabiosn, @todo is the parent todo though right?
[16:13:10] polpak: has joined #RubyOnRails
[16:13:37] ellisTAA: anyone know how much space i???m saving if i use an integer instead of a string?
[16:13:38] centrx: fabiosn, I'm not really clear on how the sub-todo relationship is specified in the view
[16:14:19] bricker: has joined #RubyOnRails
[16:14:20] fabiosn: centrx: I'm sorry, I meant [todo, sub_todo]
[16:15:45] maz-dev: has joined #RubyOnRails
[16:15:49] centrx: EllisTAA, Why?
[16:16:29] centrx: fabiosn, I'm not sure, I think that wouldn't make sense because that is used to specify the route used on submission, but sub_todo is really the same thing as todo, the same route
[16:16:30] Scriptonaut: hey guys, I have an index action, and inside of it I had a render layout: false. I made an ajax call to the index, and it rendered the view just fine without a layout and returned it to my success callback and the markup was there. I decided not only did I not want a layout, all I wanted was a rendered collection. So I changed my index action to: render tasks (a collection). However, now in my success callback, th
[16:16:43] hive-mind: has joined #RubyOnRails
[16:17:02] Travis-42: switching my cookies_serializer to :json seems to result in a bunch of rspec/capybara spec failures. Is there any obvious reason that might happen?
[16:17:07] ellisTAA: centrx: users can add skills, so instead of letting them add a string every time, i???m storing their skill by referencing a skill type using a skill_type_id, and i???m wondering how much space this will save me over time
[16:17:38] Scriptonaut: for anyone curious, here is the controller action and the javascript: https://gist.github.com/robins35/14c7db92b5fc8652b4aa
[16:17:42] renanoronfle: has joined #RubyOnRails
[16:19:21] centrx: EllisTAA, In the database, an ordinary integer is always 4 bytes, while a string can be longer due to how long the string is
[16:19:28] huck5: has joined #RubyOnRails
[16:19:39] centrx: EllisTAA, But that's also good practice from a database design standpoint, avoids data corruption, aside from the potential space/performance gain
[16:20:02] cschneid_: has joined #RubyOnRails
[16:20:32] ellisTAA: centrx: ok cool.
[16:21:02] iamse7en: has joined #RubyOnRails
[16:23:20] EXCHGR: has joined #RubyOnRails
[16:23:49] fabiosn: centrx: is it possible to send parent_todo_id as a hidden field and use it in the create action?
[16:24:05] centrx: fabiosn, Yes definitely
[16:24:36] michaeldeol: has joined #RubyOnRails
[16:25:09] DoctorMonocular: has joined #RubyOnRails
[16:25:41] DoctorMonocular: has joined #RubyOnRails
[16:28:00] fabiosn: centrx: using Todo.create(todo_params) does not work ):
[16:28:29] fabiosn: todo_params is "params.require(:todo).permit(:content, :parent_todo_id)
[16:28:34] fabiosn: centrx: any ideas ?
[16:28:55] mloy: has joined #RubyOnRails
[16:29:14] artto: has joined #RubyOnRails
[16:29:31] Guest57022: has joined #RubyOnRails
[16:30:43] centrx: fabiosn, Why doesn't it work?
[16:33:22] DonOtreply: has joined #RubyOnRails
[16:33:56] fabiosn: centrx: here are the controller and form http://codepad.org/h7DILEwT
[16:34:10] fabiosn: centrx: can you take a look at them?
[16:34:19] disgrntld: has joined #RubyOnRails
[16:34:23] ellisTAA: has joined #RubyOnRails
[16:34:36] maz-dev: has joined #RubyOnRails
[16:34:52] HalcyonicStorm: has joined #RubyOnRails
[16:35:00] Lightsword: has joined #RubyOnRails
[16:35:27] Maletor: has joined #RubyOnRails
[16:37:20] centrx: fabiosn, Where is the sub_todo.id coming from?
[16:37:36] centrx: fabiosn, maybe that's blank?
[16:40:50] mostlybadfly: hello all, trying to have my ajax trigger a success flash notice, but not too sure to to set this up in js.erb anyone that can help?
[16:41:08] mostlybadfly: i tried appending to the (#notice) id but not really doing anything
[16:42:25] fabiosn: centrx: it comes from a local variable, and I'm sure it's not nil, because inspecting the form element show the input field with the correct value
[16:42:37] fabiosn: centrx: This action works: http://codepad.org/UG79v8ak
[16:43:16] centrx: fabiosn, Look in the log file for the "Parameters" that are being sent to the controller
[16:43:31] smathy: mostlybadfly, !code
[16:43:31] helpa: mostlybadfly: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[16:43:34] fabiosn: centrx: Why does Todo.create(todo_params) ignore the parent id?
[16:43:58] p8m: has joined #RubyOnRails
[16:44:50] smathy: fabiosn, because it's not inside the `todo` hash.
[16:44:56] xsoapx: has joined #RubyOnRails
[16:45:24] mostlybadfly: sure thing, thanks
[16:45:42] smathy: fabiosn, params.require(:todo).permit(:content, :parent_todo_id) means to allow params[:todo][:content] and params[:todo][:parent_todo_id] - but because you're using hidden_field_tag then you'll have params[:parent_todo_id] instead.
[16:46:12] shinnya: has joined #RubyOnRails
[16:46:20] umgrosscol: has joined #RubyOnRails
[16:46:26] northfurr: has joined #RubyOnRails
[16:47:01] MrNagoo: has joined #RubyOnRails
[16:47:09] MrNagoo: sup guys and girls
[16:47:22] zendrix: has joined #RubyOnRails
[16:49:04] annlewis: has joined #RubyOnRails
[16:50:12] fabiosn: smathy: so, should I use params.require(:todo).permit(:content, params[:parent_todo_id])?
[16:52:11] smathy: fabiosn, I would change the view, so the attribute is properly nested.
[16:52:47] p8m: has joined #RubyOnRails
[16:52:52] fabiosn: smathy: I'm not sure what you mean
[16:53:16] mustmodify: has joined #RubyOnRails
[16:53:18] voltalio: has joined #RubyOnRails
[16:53:36] HalcyonicStorm: has joined #RubyOnRails
[16:53:51] mustmodify: any thoughts on why Employee.where(transportation_needed: nil).count = 34 but Employee.where('transportation_needed = ?', nil).count is 0?
[16:54:19] Meow-J: has joined #RubyOnRails
[16:54:39] jhack: has joined #RubyOnRails
[16:54:39] mustmodify: has left #RubyOnRails: ()
[16:54:55] bootstrappm: has joined #RubyOnRails
[16:55:18] bootstrappm: I'm trying to use Mustache for the scaffold generator in Rails, anybody done this before?
[16:56:40] wldcordeiro: has joined #RubyOnRails
[16:57:43] Criten: Hey guys! Any suggestions for speeding up rendering with a large json view with active model serializers?
[16:57:47] bronson: has joined #RubyOnRails
[16:57:56] Criten: 25ms AR time, 750ms view rendering
[16:57:56] bootstrappm: I installed the gem via the Gemfile / bundler then use the '-e mustache' flag but it says mustache [not found]
[16:58:05] p8m: has joined #RubyOnRails
[16:59:29] blackmesa: has joined #RubyOnRails
[17:00:18] ivanskie: has joined #RubyOnRails
[17:00:18] northfurr: has joined #RubyOnRails
[17:02:23] choke: has joined #RubyOnRails
[17:02:52] SofCherenkov: has joined #RubyOnRails
[17:03:50] towski_: has joined #RubyOnRails
[17:06:48] drale2k: has joined #RubyOnRails
[17:08:06] ellisTAA: can you not edit the params that you receive if they are strong params?
[17:09:14] hightower4: has joined #RubyOnRails
[17:10:28] nickenchuggets: has joined #RubyOnRails
[17:10:39] greengriminal: has joined #RubyOnRails
[17:10:54] jxpx777: has joined #RubyOnRails
[17:11:38] nya: has joined #RubyOnRails
[17:12:35] Sylario: EllisTAA: ?
[17:12:55] banjara: has joined #RubyOnRails
[17:13:49] adamaig: has joined #RubyOnRails
[17:15:05] banjara: has joined #RubyOnRails
[17:16:17] mary5030: has joined #RubyOnRails
[17:16:23] ellisTAA: Sylario: im trying to alter the params i get before i use them to create my objeect https://gist.github.com/ellismarte/32ddd6a5adaeb84830ce#file-meetup-rb-L17
[17:16:46] podman: has joined #RubyOnRails
[17:16:47] ellisTAA: but for some reason when i save using meetup_params the value isn???t altered
[17:17:24] craysiii: has joined #RubyOnRails
[17:17:37] bronson: has joined #RubyOnRails
[17:17:53] bootstrappm: how do you set another template engine for a generator?
[17:17:58] tsujp: has joined #RubyOnRails
[17:18:28] beauby: has joined #RubyOnRails
[17:18:59] Sylario: EllisTAA: why do you seek the id you already have?
[17:19:02] ellisTAA: bootstrappm: http://guides.rubyonrails.org/configuring.html#configuring-generators
[17:19:15] Sylario: EllisTAA: try to output meetup params, city id is probably a hash
[17:19:19] Mendenhall: has joined #RubyOnRails
[17:19:22] bootstrappm: EllisTAA: already went there, template_engine :mustache doesn't work
[17:19:27] bootstrappm: any other suggestions EllisTAA?
[17:19:28] smathy: fabiosn, well, in your view, look at the difference between how you're creating the content field vs the parent_todo_id field.
[17:19:31] ellisTAA: Sylario: i know it seems that way, i should have told u, the user is actually giving me a string ???san farncisco ca??? and im looking it up
[17:19:49] ellisTAA: bootstrappm: sorry idk
[17:20:17] emba: has joined #RubyOnRails
[17:20:52] fabiosn: smathy: is there any alternative? I don't want to get the id from users, so I need to set it automatically
[17:20:59] Sylario: EllisTAA: 1) do you have a strong params message in the traces, 2) try to output meetup_params[:city_id] before updating
[17:21:46] Anubix: has joined #RubyOnRails
[17:21:46] ellisTAA: Sylario: i did that, for some reason it isn???t changing it
[17:21:57] mloy: has joined #RubyOnRails
[17:22:09] Sylario: EllisTAA: did what?
[17:22:23] rakm: has joined #RubyOnRails
[17:22:33] ellisTAA: ouput meetup_params[:city_id]
[17:22:41] smathy: fabiosn, well, when you do `sub_todo.sub_todos.build` then the resulting record will already have its `parent_todo_id` set to the `sub_todo.id`, so you should just use the normal `hidden_field` form_for helper.
[17:22:53] smathy: fabiosn, just like you did for :content - but a hidden field instead of a text field.
[17:23:02] cnk: has joined #RubyOnRails
[17:23:20] jyraff: has joined #RubyOnRails
[17:23:33] workmad3: EllisTAA: every time you call 'meetup_params' it generates a new hash from 'params' for you
[17:23:38] fabiosn: smathy: thanks :)
[17:23:53] ellisTAA: workmad3: ty
[17:24:41] Dreamer3: has joined #RubyOnRails
[17:25:28] safety_cut: has joined #RubyOnRails
[17:25:31] ellisTAA: workmad3: so what i did was create a new variable with the value of meetup_params, then i altered the new variable, is this bad practice?
[17:27:23] jtthedev`: has joined #RubyOnRails
[17:27:46] jtthedev`: is there an easy way or quick way to change the name of your app ?
[17:28:24] a1fa: @issues = customer.issue.where.(status_id: Status.find_by(name: "New").id)
[17:28:32] a1fa: customer has_many: issue
[17:28:35] a1fa: why is this not cool?
[17:28:46] workmad3: EllisTAA: personally, I wouldn't allow submitting the city name through 'params[:meetup][:city_id]'... I'd probably get it sent through as just params[:city_name] and then do 'require(:meetup).permit(:name, :description, :address).merge(city: City.find_city(params[:city_name]))' or something to that effect
[17:29:00] fast_scooter: has joined #RubyOnRails
[17:29:30] Anubix: Hello what syntax is prefered in RoR4 ? dependent: :destroy or :dependent => :destroy ?
[17:30:09] greengriminal: has joined #RubyOnRails
[17:30:33] workmad3: EllisTAA: but assigning a temp variable and modifying that is ok too, just not something I'd typically aim for :)
[17:31:43] jyraff: Hello. Is it possible to convert using RABL datetime attribute to timestamp?
[17:32:02] ellisTAA: workmad3: thanks for sharing. i didnt know u could use merge so ill try that
[17:33:23] romdi: has joined #RubyOnRails
[17:35:05] _djbkd: has joined #RubyOnRails
[17:35:12] jxpx777: has joined #RubyOnRails
[17:35:48] emba: has joined #RubyOnRails
[17:37:37] meoblast001: has joined #RubyOnRails
[17:42:06] Lightsword: has joined #RubyOnRails
[17:42:14] dudo: has joined #RubyOnRails
[17:42:41] ivanskie: has joined #RubyOnRails
[17:45:27] Mia: has joined #RubyOnRails
[17:46:33] baweaver: has joined #RubyOnRails
[17:46:47] lipoqil: has joined #RubyOnRails
[17:49:30] senyi: has joined #RubyOnRails
[17:49:32] smathy: a1fa, as usual, your typos make it impossible to help you, make a gist and copy/paste actual code.
[17:50:47] mloy: Just wanted to say this channel helps me stay motivated and productive, thanks all :)
[17:50:52] baweaver: has joined #RubyOnRails
[17:50:58] krisquigley: has joined #RubyOnRails
[17:51:25] Mia: has joined #RubyOnRails
[17:51:25] Mia: has joined #RubyOnRails
[17:52:40] alex88: has joined #RubyOnRails
[17:54:37] lampd1: has joined #RubyOnRails
[17:55:30] smathy: mloy, nice one!
[17:55:44] strcmp1: has joined #RubyOnRails
[17:55:52] KensoDev: has joined #RubyOnRails
[17:56:01] ellisTAA: has joined #RubyOnRails
[17:56:08] kidoz: has joined #RubyOnRails
[17:56:49] jaequery: has joined #RubyOnRails
[17:59:37] christiandsg: has joined #RubyOnRails
[18:00:24] huck5: I want to create an Order model that has_many Item models. The Item model is already in existence. When running `rails g scaffold Order` do I need to add an `item_id` column? Or can I simply add `has_many :items` to the Order model?
[18:01:32] dnewkerk: has joined #RubyOnRails
[18:02:03] smathy: jyraff, node(:created_at) { |r| r.created_at.whatever_you_mean_by_timestamp }
[18:03:03] smathy: (probably just `r.created_at.to_i`
[18:03:30] i: has joined #RubyOnRails
[18:03:40] smathy: huck5, you need the foreign key on the other table, the items table.
[18:04:17] smathy: (or a join table if it's a many-many - which this might be, depending on what Item is)
[18:04:22] northfurr: has joined #RubyOnRails
[18:04:38] Guest81513: has left #RubyOnRails: ()
[18:04:46] huck5: Hm... Right, that makes sense.
[18:04:49] huck5: Thanks smathy
[18:05:00] dopie: has joined #RubyOnRails
[18:05:29] huck5: I think what I need is an OrderRow table - which contains Item and Quantity. Then an Order has_many OrderRows..
[18:06:15] smathy: huck5, yeah, that's often called LineItem
[18:06:55] arooni-mobile: has joined #RubyOnRails
[18:07:04] huck5: I'm just trying to setup a relationship where an Item doesn't belong_to anything, i.e. there is only one occurrence of each unique item, as opposed to a new Item being created for each ItemRow.
[18:07:05] jyraff: smathy, thanks! it works
[18:07:09] huck5: LineItem*
[18:07:13] smathy: jyraff, you're welcome.
[18:07:20] DCameronMauch: has joined #RubyOnRails
[18:07:37] smathy: huck5, right, so LineItem will belong_to :order AND belong_to :item
[18:07:51] drale2k: has joined #RubyOnRails
[18:07:57] maz-dev: has joined #RubyOnRails
[18:07:58] huck5: Gotcha, perfect. Thanks for clarifying that! (I know it's not really a Rails question)
[18:08:03] smathy: huck5, so then Order has_many :line_items and has_many :items, through: :line_items
[18:08:38] smathy: huck5, same in return from Item to :line_items and :orders, through: :line_items (if you need those associations, often you don't).
[18:09:08] mloy: I'm looking at an example in how to render partials using javascript in the controller, and I'm wondering: where are paths like add_tester_path defined? Such as in:
[18:09:09] mloy: <%= link_to "Add tester", add_tester_path, remote: true %>
[18:09:10] mloy: <div id="tester"></div>
[18:09:25] smathy: mloy, please use gist in future instead of pasting multiple lines of code into the chat.
[18:09:33] mloy: smathy, will do
[18:09:42] mloy: I meant to just paste one line
[18:10:07] smathy: mloy, the path helpers are defined deep in the bowels of Rails's routing code.
[18:10:32] HalcyonicStorm: has joined #RubyOnRails
[18:10:52] mloy: smathy, thanks, figured that was the case. I just realized my path was being generated and I just misspelled it :/
[18:13:16] safety_cut: has joined #RubyOnRails
[18:13:38] huck5: Another question, smathy: When generating models for the Order, I don't really need to specify any attributes to accomplish this type of relationship, do I? The relationship will be defined within the Order model?
[18:13:53] huck5: When generating the Order model*
[18:14:25] n00bDev: has joined #RubyOnRails
[18:14:31] huck5: Sorry. I also meant "I will define the relationship within the Order and associated models"
[18:14:53] smathy: huck5, all associations are a function of the foreign key which resides in the table on the belongs_to side of the association.
[18:15:56] huck5: Perfect. Thanks again!
[18:16:00] smathy: (well, except has_and_belongs_to_many which doesn't have a belongs_to but the join table still contains the foreign keys, nothing in the tables on the has_* sides of the association)
[18:16:30] Kallis: has joined #RubyOnRails
[18:17:07] qejk: has joined #RubyOnRails
[18:21:24] nobitanobi: has joined #RubyOnRails
[18:22:00] jeadre: has joined #RubyOnRails
[18:23:03] nobitanobi: I have a User model and I am currently doing this User.order(params[:order]) - Should I be concerned if params[:order] is something like: 'created_at DESC; DROP table users'? Or in other words, how does Rails deals with SQL injection?
[18:25:42] lsone: has joined #RubyOnRails
[18:25:54] northfurr: has joined #RubyOnRails
[18:28:47] jtthedev`: is it good practice to expose your ID / PK to the front of an app for any reason? Just got into a bit of a spat with one of our data modelers over this.. we have a table called routes... he created the table, gave me ID, name, description, etc, created_At.. whatever... i'm telling him I need a route_number field.. he tells me to use the ID.. i tell him that I normally keep my ID columns unexposed, i
[18:28:53] jtthedev`: t just doesnt vibe well with me for some reason..
[18:29:03] jtthedev`: he's telling me it's the way to go because the route number will be the pk, so just id in the front end
[18:29:07] jtthedev`: your thoughts ?
[18:29:19] sinkensabe: has joined #RubyOnRails
[18:29:22] bricker: nobitanobi: Rails is pretty good about sanitization but injection attacks are always a threat. Whitelist the allowed attributes that can be passed in.
[18:31:26] bkxd: has joined #RubyOnRails
[18:32:14] Mia: has joined #RubyOnRails
[18:32:45] chipotle: has joined #RubyOnRails
[18:33:15] s2013: has joined #RubyOnRails
[18:33:48] maz-dev: has joined #RubyOnRails
[18:34:11] Swappticon: has joined #RubyOnRails
[18:34:31] nobitanobi: ok brickerthanks!
[18:34:36] nobitanobi: *bricker thanks
[18:34:47] s2013: hmm i cant seem to do ascii inside f.label it shows up as the actual code
[18:35:10] s2013: = f.label 'label', 'Company &reg;'
[18:36:50] shilon: has joined #RubyOnRails
[18:38:12] ellisTAA: has joined #RubyOnRails
[18:38:57] zendrix: has joined #RubyOnRails
[18:39:51] blackmesa: has joined #RubyOnRails
[18:40:34] nobitanobi: has joined #RubyOnRails
[18:41:53] Lightsword: has joined #RubyOnRails
[18:43:52] j_mcnally: has joined #RubyOnRails
[18:44:03] Rubie: has joined #RubyOnRails
[18:44:33] baweaver: has joined #RubyOnRails
[18:45:50] d5sx43: has joined #RubyOnRails
[18:46:16] s2013: anyone knwos?
[18:46:36] huck5: If you gist the code example it's easier to understand what you are asking...
[18:48:17] s2013: i gave example of my code.. basically that line shows as &reg; instead of the R symbol
[18:48:24] s2013: = f.label 'label', 'Company &reg;' <-- this line
[18:48:52] jhack_: has joined #RubyOnRails
[18:49:09] s2013: nvm got it
[18:49:14] s2013: needed to add html_safe after it
[18:49:20] huck5: s2013, excellent!
[18:49:22] jhack_: has left #RubyOnRails: ()
[18:49:40] jhack: has joined #RubyOnRails
[18:49:55] gthank: has joined #RubyOnRails
[18:49:57] jhack: has joined #RubyOnRails
[18:50:53] d5sx43: has joined #RubyOnRails
[18:53:01] safety_cut: has joined #RubyOnRails
[18:54:05] jholm: has joined #RubyOnRails
[18:54:53] arup_r: has joined #RubyOnRails
[18:55:35] redondo: has joined #RubyOnRails
[18:55:46] AdamColon: has joined #RubyOnRails
[18:56:36] DLSteve: has joined #RubyOnRails
[19:03:49] christiandsg: has joined #RubyOnRails
[19:04:25] toretore: has joined #RubyOnRails
[19:04:39] DEA7TH_: has joined #RubyOnRails
[19:06:02] juanpaucar: has joined #RubyOnRails
[19:08:57] drale2k: has joined #RubyOnRails
[19:09:34] DEA7TH_: has joined #RubyOnRails
[19:09:52] quazimodo: has joined #RubyOnRails
[19:10:19] bin_005: has joined #RubyOnRails
[19:13:21] zendrix: has joined #RubyOnRails
[19:13:32] alex88: has joined #RubyOnRails
[19:15:10] andessen: has joined #RubyOnRails
[19:15:19] bronson: has joined #RubyOnRails
[19:15:19] s2013: has joined #RubyOnRails
[19:16:34] andessen: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[19:16:36] andessen: has joined #RubyOnRails
[19:16:44] allcentury: has joined #RubyOnRails
[19:17:39] Pumukel: has joined #RubyOnRails
[19:20:18] voltalio: has joined #RubyOnRails
[19:21:12] ellisTAA_: has joined #RubyOnRails
[19:22:20] jhack: has left #RubyOnRails: ()
[19:23:08] jhack: has joined #RubyOnRails
[19:23:18] Limix: has joined #RubyOnRails
[19:23:19] lagweezle: Is there a 'recommended' OAuth gem to use for OAuth v1?
[19:24:06] mloy: How would I go about using form data from a view to be used as a Ruby variable?
[19:24:19] FailBit: has joined #RubyOnRails
[19:24:26] FailBit: https://i.imgur.com/UWy6cYe.png
[19:24:29] lagweezle: I'm also having issues making sense of the gem named 'oauth'. Is it part of MRI? External? Based on rubygems.org info, it is 'dead' (last release 0.4.7 in 2012, and no homepage)...
[19:24:43] FailBit: lagweezle: use oauth2
[19:24:54] lagweezle: FailBit: The service I'm interacting with needs v1 :(
[19:25:29] FailBit: jfyi most gems are not part of MRI, but will work with MRI
[19:25:31] cnk: well then oauth not being updated may be a feature
[19:25:56] lagweezle: Yeah, that's ... one of the things I'm trying to reconcile, cnk. :/
[19:26:28] roxtrongo: has joined #RubyOnRails
[19:27:23] TheWhiteOx: has joined #RubyOnRails
[19:27:59] arup_r: mloy: didn't get you
[19:30:11] mloy: arup_r, hmm, yeah let me rephrase. I want to generate some HTML in an eRuby file that's dependent on user input from a form. Basically, I want them to be able to set how long the rows are in a table. I know I'll have to update the page via AJAX, but I was wondering how to go about setting the Ruby variable to the form input. As I typed that out, I came up with an idea... brb testing it.
[19:31:58] Avon: has joined #RubyOnRails
[19:32:34] ledestin: has joined #RubyOnRails
[19:33:18] greengriminal: has joined #RubyOnRails
[19:33:25] smathy: jtthedev`, the less you reveal about your internal structure the better.
[19:33:47] huck5: I'm trying to create a model Foo, that has multiple Parents (each of which is a Foo model). Foo has_many :foos. But does Foo also belong_to :foo ?
[19:34:21] FailBit: Foo belongs_to_and_has_many :parents
[19:34:28] mloy: So I have calendars that are being used as the forms for creating my event models. Since I have the calendars being generated by the users, should the calendars be models themselves? I feel I'm in so over my head right now.
[19:34:35] craysiii: FailBit thats a thing?
[19:34:45] huck5: Thanks FailBit. I can just add the belongs_to_has_many clause to the Foo model?
[19:34:46] smathy: jtthedev, although I'll add that in many cases, the information exposed by revealing an ID isn't particularly critical, however I would not - for example - expose the ID of my users, accounts, etc.
[19:34:53] lipoqil: has joined #RubyOnRails
[19:35:03] ur5us: has joined #RubyOnRails
[19:35:10] FailBit: ctually it's
[19:35:13] FailBit: has_and_belongs_to_many
[19:35:15] FailBit: I always mix taht up
[19:35:31] smathy: huck5, yes it will.
[19:35:54] huck5: FailBit, also, do I need to create an attribute in Foo called Parent? Or can I have (in Foo) has_and_belongs_to_many :foos ?
[19:36:13] patrick_star: Where it's better to put ror projects: /home/deployer/www/project_folder or /var/www/project_folder?
[19:36:41] DEA7TH: has joined #RubyOnRails
[19:36:51] FailBit: I misunderstood then
[19:37:01] arup_r: mloy: you confused me :)
[19:37:05] FailBit: that sounds like a painful hierarchy
[19:37:07] smathy: huck5, can a parent have more than one child?
[19:37:25] emba: has joined #RubyOnRails
[19:37:28] huck5: smathy, theoretically yes*
[19:37:38] smathy: huck5, ok, so tell us what these really are - they're not actually Foo's
[19:37:42] mloy: arup_r, haha. One second, sketching an idea before I forget it, then I'll try to phrase my question in sane terms
[19:38:00] huck5: smathy, but the relationship is more intended to look "up" rather than "down". I want to be able to look at a Foo and see who the parents are. I'm not that concerned about looking at a Foo and seeing the children
[19:38:27] huck5: I suppose I can create a Parent table, with auto-gen PK, that just references a Foo? Then I can simply do the has_many :parents in foo?
[19:38:35] smathy: huck5, ok, but you still need to know if it's many:one or many:many.
[19:38:40] Maletor: has joined #RubyOnRails
[19:38:45] huck5: smathy, it would be n:n
[19:39:00] smathy: huck5, ok, so now, what is this thing? Not a Foo but what?
[19:39:06] huck5: It's a Strain
[19:39:19] smathy: Like a biological strain?
[19:39:35] huck5: Yes, sorry for lack of clarification. A biological strain that is a derivative of parental cross-breeding.
[19:40:08] craysiii: sounds bioinformatical
[19:40:32] smathy: Ok, so you can only do a self referential association using has many through, because otherwise the habtm table would need two fields both called strain_id - which it obviously can't have.
[19:41:03] smathy: huck5, so, your join model might be called something like: Derivative
[19:41:41] huck5: then have a Child table and a Parent table, each with a FK to the Strain?
[19:41:58] smathy: No, just a single join table, derivatives.
[19:42:00] huck5: Er, no. I apologize. I think I missed your point.
[19:42:05] smathy: huck5, so that table will have fields something like: parent_strain_id and child_strain_id.
[19:42:31] smathy: huck5, the Derivative model will then have something like: belongs_to :child_strain_id, class_name: "Strain"
[19:42:49] huck5: Perfect smathy, thank you! That was my next question.
[19:43:07] dideler: has joined #RubyOnRails
[19:43:12] huck5: Thanks for the lesson in inheritance!
[19:43:29] smathy: huck5, then in your Strain model you'd have something like: has_many :parent_derivatives, class_name: "Derivative"; has_many :parents, through: :parent_derivatives, class_name: "Strain"
[19:43:57] huck5: That's fantastic. Thanks for the clear example!
[19:44:18] bootstrappm: using Paperclip for file attachments, how do I generate the filename that will be saved?
[19:44:37] smathy: huck5, you will probably need to have a :source attribute in the :through one.
[19:45:00] smathy: huck5, you're welcome.
[19:45:21] smathy: I'm sure you can see how to do the corresponding `children` if you need that afterall.
[19:45:53] huck5: Yep, I think I can apply similar steps for children if necessary
[19:45:54] quazimodo: has joined #RubyOnRails
[19:46:02] huck5: Could you maybe elaborate on what the :source attribute does?
[19:46:33] mices: has joined #RubyOnRails
[19:47:13] smathy: huck5, the main trick with has_many :through is that when you come to create a new child and parent, you will actually create your form for the Derivative, and use fields_for for both the parent and child. Ie. you actually need to create the Derivative table and add the child and parent to that, then save that all as one (which will save all three records).
[19:47:23] mices: if i'm on freebsd virtual machine under windows should i edit in windows or bsd?
[19:47:35] FailBit: mices: your preference
[19:47:47] FailBit: however beware of line endings
[19:47:52] mices: i've always used npp on windows
[19:47:59] FailBit: then you should be fine
[19:48:02] smathy: huck5, hmm, actually, come to think of it, if you have no other information in the join table then you can do it from parent or child.
[19:48:07] mices: but i dont mean with rails
[19:48:16] huck5: smathy, ah. So the Strain creation process will be a little trickier, code-wise.
[19:48:27] FailBit: mices: just note that windows editors prefer CRLF, and *nix editors prefer LF
[19:48:38] huck5: smathy, that's fine though! Thanks again for all your help.
[19:48:44] FailBit: if you don't have something in your .gitattributes
[19:48:48] mices: i haven't done any rails dev yet now i wanna choose my editor
[19:48:52] smathy: huck5, well, not an individual Strain, but it will be trickier creating a Strain and its parent in one step - should you want to do that.
[19:48:55] FailBit: saving a file might count as changing every line
[19:49:02] FailBit: so make sure to set your .gitattributes
[19:49:02] smathy: huck5, you're very welcome.
[19:50:15] workmad3: has joined #RubyOnRails
[19:50:19] nfk: has joined #RubyOnRails
[19:50:36] sargas: has joined #RubyOnRails
[19:51:48] huck5: smathy, sorry - one more clarification if you don't mind! Should the :source attribute be required in the :through has_many relationship, what would I put as the value of :source? Would it be the Derivative class, or the Strain class?
[19:51:54] krisquigley: has joined #RubyOnRails
[19:52:55] nogic: has joined #RubyOnRails
[19:54:21] yfeldblum: has joined #RubyOnRails
[19:54:29] baweaver: has joined #RubyOnRails
[19:55:15] Rubie: has joined #RubyOnRails
[19:57:46] sinaef: has joined #RubyOnRails
[19:59:12] dionysus69: has joined #RubyOnRails
[20:01:58] sargas: has joined #RubyOnRails
[20:02:03] Ergo: has joined #RubyOnRails
[20:02:29] lipoqil: has joined #RubyOnRails
[20:03:24] Dzejmskrokan: has joined #RubyOnRails
[20:04:01] Lightsword: has joined #RubyOnRails
[20:04:17] smathy: huck5, http://devdocs.io/rails/activerecord/associations/classmethods#method-i-has_many
[20:04:23] yaymukund: has joined #RubyOnRails
[20:04:24] huck5: thanks again smathy
[20:04:41] emba: has joined #RubyOnRails
[20:05:02] FailBit: what a pain in the butt to parse search queries
[20:05:06] FailBit: need a friggin' compiler
[20:06:27] huck5: I'm trying to create a new Derivative object in a rails sandbox console, and I keep running into an error. Think you could peep this gist https://gist.github.com/Huck5/85100f90fa4d942a8631#file-sandbox-L13 and point out my mistakes?
[20:07:09] greengriminal: has joined #RubyOnRails
[20:08:05] FailBit: setting an ID intead of an object?
[20:08:14] jxpx777: has joined #RubyOnRails
[20:08:27] smathy: FailBit, or, y'know, a search engine/indexer.
[20:08:45] Sdwrage__: has joined #RubyOnRails
[20:08:54] huck5: I've also tried setting `der.child_strain_id = one` (where 'one' is the strain object)
[20:09:18] smathy: huck5, sorry, that was my error. Drop the _id from both of your belongs_to s
[20:09:18] FailBit: huck5: but why _id
[20:09:24] FailBit: just set der.child_strain = one
[20:09:27] huck5: smathy: Oh ok =D thanks!
[20:09:45] huck5: Silly question - after altering my has_many relationships in my models, I need to re-run db:migrate, correct?
[20:09:47] bricker: huck5: it looks like you defined your association as child_strain_id
[20:09:52] FailBit: smathy: yeah, but elastic doesn't have any sort of access control
[20:09:58] FailBit: so don't want to feed it to elastic
[20:10:05] drale2k: has joined #RubyOnRails
[20:10:20] bricker: huck5: you don't re-run migrations, you have to make a new one.
[20:10:58] huck5: bricker, right. Sorry, that was obvious.
[20:11:14] smathy: ...or just :down the one you ran, like: rake db:migrate:down VERSION=20150828..etc
[20:11:21] smathy: Then edit it, then re-run it.
[20:11:36] bricker: and then notify all of the other developers that they have to do the same thing
[20:11:42] huck5: But I do need to create a new migration for the model's relationship to take effect?
[20:11:46] safety_cut: has joined #RubyOnRails
[20:12:00] jeadre: has joined #RubyOnRails
[20:12:01] smathy: FailBit, you do access control at the index level. Ie. make a different index for different user profiles and then send your query to the right index.
[20:12:11] smathy: huck5, no.
[20:12:20] huck5: Sorry. I'm just a little confused as to how the model-relationships tie in with the database migrations. Thanks for clarification!
[20:12:21] smathy: huck5, and actually, there's nothing wrong with your schema.
[20:12:22] bricker: and hope that the down migration is backwards-compatible, which if you're changing a column name, it's not
[20:12:33] smathy: huck5, it's just your belongs_to associations that I told you to name incorrectly.
[20:12:50] FailBit: smathy: I also want to be able to support more complex queries that I don't think elastic can reasonably handle
[20:12:54] smathy: huck5, migrations are purely for changing your DB schema.
[20:12:55] VeryBewitching: has joined #RubyOnRails
[20:12:58] FailBit: and the ability to switch on a default field and custom fields
[20:13:02] smathy: ...and yours is correct right now.
[20:13:10] bricker: FailBit: Elastic supports the most complex queries you could possibly conjure
[20:13:17] FailBit: bricker: yes
[20:13:18] bricker: FailBit: compared to what? SQL?
[20:13:28] FailBit: bricker: eh no
[20:13:31] FailBit: let me explain
[20:13:43] FailBit: say you want to search for "solo, (red || blue)"
[20:13:53] smathy: FailBit, yeah, if you're supporting more complex than ES or Solr then you have no place complaining that it's a pain to parse queries - you will obviously need to build a full parser.
[20:14:54] huck5: smathy, yep. Removing `_id` from my belongs_to relationships fixed it up. Thanks!
[20:15:07] FailBit: smathy: you would need to compile that example query I gave to something like bool:{must:{term:{tag_names:'solo}}}, should:[{term:{tag_names:'red'}},{term:{tag_names:'blue'}}]}
[20:15:24] FailBit: (provided that you wanted to be able to search by tag_names as the default field)
[20:15:31] smathy: huck5, sorry about that.
[20:15:34] smathy: Brain fart.
[20:16:00] huck5: No apology necessary! The error helped me understand what's going on a little better.
[20:16:05] xet7_: has joined #RubyOnRails
[20:16:33] FailBit: I misstated what I meant
[20:16:48] FailBit: I meant that elastic doesn't have the ability to parse the kind of searches that I wanted to be able to give it
[20:16:53] bricker: FailBit: are you trying to create your own query language?
[20:16:57] FailBit: so yes I need a custom search compiler
[20:17:04] FailBit: bricker: no
[20:17:36] xet7_: has left #RubyOnRails: ()
[20:17:37] bricker: FailBit: I guarantee whatever kind of query you want to make, Elastic can handle it. I must be misunderstanding what you want.
[20:17:47] FailBit: elastic can handle it
[20:17:50] FailBit: just not as a query string
[20:18:15] bricker: FailBit: oh, you want to parse a string and turn it into query params for elastic
[20:18:16] iamse7en: has joined #RubyOnRails
[20:18:35] FailBit: "solo, (red || blue)" -> bool:{must:{term:{tag_names:'solo}}}, should:[{term:{tag_names:'red'}},{term:{tag_names:'blue'}}]}
[20:18:44] TheWhiteOx: has joined #RubyOnRails
[20:18:45] jgt: has joined #RubyOnRails
[20:18:59] FailBit: actually that needs another layer of bool
[20:19:07] FailBit: to put a :must conj both of those
[20:19:11] FailBit: since , is logical AND
[20:19:22] FailBit: ACTION feeds it to his search parser
[20:19:23] smathy: So sure, if you're creating your own syntax then you'll need to build your own syntax parser.
[20:19:24] bricker: FailBit: well, Elastic has a query string parser, but not with that syntax
[20:19:41] smathy: Me, I just point my humans at the Solr/ES/Lucene syntax help, and they write their queries properly.
[20:19:50] andessen: has joined #RubyOnRails
[20:20:16] FailBit: {"bool":{"must":[{"term":{"tag_names":"solo"}},{"bool":{"should":[{"term":{"tag_names":"red"}},{"term":{"tag_names":"blue"}}]}}]}}
[20:20:17] FailBit: there we go
[20:20:52] FailBit: parsed output from SearchParser.new('solo, (red || blue)', :tag_names).parsed
[20:21:10] chrissonar: has joined #RubyOnRails
[20:21:32] chrissonar: has joined #RubyOnRails
[20:21:44] annlewis: has joined #RubyOnRails
[20:22:09] chrissonar: has joined #RubyOnRails
[20:22:29] joshkovach: has joined #RubyOnRails
[20:22:51] bronson: has joined #RubyOnRails
[20:22:52] sonofdirt: has joined #RubyOnRails
[20:23:00] chrissonar: has joined #RubyOnRails
[20:24:43] huck5: Is it possible to change the order in which migrations are created?
[20:24:47] huck5: er, sorry, ran*
[20:25:08] chrissonar: has joined #RubyOnRails
[20:25:12] mary5030: has joined #RubyOnRails
[20:26:12] roxtrongo: has joined #RubyOnRails
[20:26:25] adamaig: has joined #RubyOnRails
[20:26:37] huck5: Never mind. Silly question, I figured out my problem
[20:28:11] sloggerkhan: I'm experiencing weird browser behavior. I've got a table on my page styled with bootstrap, but on page load the styles don't apply and it looks flat and basic (no rows, padding etc.), but I click into its parent with inspector, as a random (irrelevant) space, click it, and suddenly it picks up on the CSS and re-renders correctly...
[20:29:28] atomical: has joined #RubyOnRails
[20:29:31] bluish: has joined #RubyOnRails
[20:31:02] FailBit: has left #RubyOnRails: ("WeeChat 0.4.2")
[20:31:54] smathy: SloggerKhan, what about if you just refresh the page?
[20:32:42] sloggerkhan: It seems to be javascript related. I think I found a fix, but the reason for the behavior is not obvious to me.
[20:33:10] huck5: SloggerKhan, I would venture a guess at multiple stylesheet/javascript inclusions?
[20:33:17] smathy: SloggerKhan, almost certainly turbolinks.
[20:33:54] sloggerkhan: It actually seems like CSS isn't recomputed if child content is replaced in a certain way.
[20:34:58] smathy: Oh, I missed that your clicking was just in-page.
[20:35:08] x-light: has joined #RubyOnRails
[20:35:09] smathy: Forget what I said about turbolinks.
[20:40:10] mrbubbles: has joined #RubyOnRails
[20:40:18] sloggerkhan: I'm not sure I can write out the example cleanly, but basically I replaced a element with with another one that had the same styles, structure, but slightly different content, and immediately is rendered as though styles weren't applied. However, triggering even just a ignored whitespace change on the parent element would cause the styles to be applied. My theory is that the CSS is scoped by the parent element, and somehow that's making it no
[20:40:43] sloggerkhan: *as requiring
[20:41:00] krisquigley: has joined #RubyOnRails
[20:41:32] n00bDev: has joined #RubyOnRails
[20:42:19] jholm: has joined #RubyOnRails
[20:42:40] andessen: has joined #RubyOnRails
[20:42:43] n00bDev: can someone point to me a good resource on how to define routes for a subclass?
[20:43:09] smathy: n00bdev, an STI subclass?
[20:43:27] n00bDev: if i have a model called ParentModel::ChildModel < ParentModel
[20:43:33] n00bDev: is STI the proper term for that?
[20:44:07] voltalio: has joined #RubyOnRails
[20:44:17] wviana: has joined #RubyOnRails
[20:45:30] Limix: has joined #RubyOnRails
[20:45:31] arooni-mobile: has joined #RubyOnRails
[20:46:25] huck5: I'm trying to create a relationship where an Effect has both a Level and a Feeling. A Strain then has_many Effects. The database creates fine locally, when I `db:drop db:create db:migrate`. But when I try `heroku run rake db:migrate` i get this error https://gist.github.com/Huck5/34c7b45e2152d23a5c57#file-rails_sandbox-L14
[20:47:04] huck5: I'm sure I must be setting up my relationships wrong in my models. I just can't see where
[20:47:25] sargas: has joined #RubyOnRails
[20:47:53] n00bDev: yeah i guess so yes
[20:48:36] strcmp1: huck5, there is no strains table, and no Strain model in your gist
[20:48:55] huck5: strcmp1, my apologies. One moment please.
[20:49:08] DEA7TH: has joined #RubyOnRails
[20:49:34] D9: has joined #RubyOnRails
[20:50:01] northfurr: has joined #RubyOnRails
[20:50:33] huck5: https://gist.github.com/Huck5/34c7b45e2152d23a5c57#file-rails_sandbox-L14
[20:50:35] strcmp1: huck5, anyway you want to say has_many :strains, has_many :effects, through: :strains on each model you're joining in Strain.
[20:50:46] huck5: Thank you strcmp1
[20:52:27] smathy: n00bdev, it depends, it's not STI just because it's a subclass, or just because the ChildModel is within the ParentModel namespace. It's STI if the ChildModel uses the ParentModel's DB table.
[20:52:53] smathy: n00bdev, anyway, maybe you could gist what your actual models are called, and what routes you're trying/failing to generate properly?
[20:53:43] strcmp1: by default it is a STI subclass
[20:53:58] strcmp1: you would have to explicitly use set_table_name on the subclass for that to be different
[20:54:28] rhizome: which would be weird
[20:54:36] n00bDev: i just have no idea how to set the routes
[20:55:01] n00bDev: unfortunately one of the STI class names has the exact same name of a another unrelated model
[20:55:13] rhizome: that's a paddlin'
[20:55:22] rhizome: also, routes go to controllers, not models
[20:55:33] n00bDev: right i understand
[20:55:43] sandstrom: has joined #RubyOnRails
[20:55:53] cball: has joined #RubyOnRails
[20:55:55] n00bDev: ill jsut say the model names for sake
[20:56:16] danman_: has joined #RubyOnRails
[20:56:22] smathy: strcmp1, kind of, without an inheritance_column then it's really just a subclass that pulls from the same table.
[20:57:14] strcmp1: yeah there's some column that stores the class name, i cant remember what its called.
[20:57:30] strcmp1: but that just means the subclass can become any row.
[20:57:38] danman: has joined #RubyOnRails
[20:58:09] corioliss: has joined #RubyOnRails
[20:58:17] huck5: strcmp1, I'm trying to apply your suggestion, and I'm a little confused. Could you give me an example, based on my gist, of a model that I would need to add "has_many :strains, has_many :effects, through: :strains" to?
[20:58:38] strcmp1: huck5, all of them but Strain and Effect.
[20:58:46] huck5: strcmp1, great, thank you!
[20:59:03] n00bDev: is there a way to do it like rails admin does?
[20:59:23] n00bDev: plan~subscription and plan~purchase is what im trying to achieve
[20:59:24] Sdwrage__: has joined #RubyOnRails
[20:59:38] D9: has joined #RubyOnRails
[21:00:48] D9: has joined #RubyOnRails
[21:00:56] strcmp1: huck5, on Effect you would still have has_many :strains, and has_many :other_join, through: :strains. obv dont self reference 'effects' on effect.
[21:01:33] rickmasta: has joined #RubyOnRails
[21:01:59] wviana: how can I force this to return "" when try fails ? https://gist.github.com/wviana/e8909fa79f44468be4bd
[21:02:05] Rubie: has joined #RubyOnRails
[21:02:25] paulcsmith: has joined #RubyOnRails
[21:02:48] bricker: wviana: .try(:sigla) || ""
[21:02:50] strcmp1: huck5, are you building a weed database?
[21:03:10] wviana: bricker: thank you very much
[21:03:24] strcmp1: braincrash wviana you shouldnt have to do that
[21:03:25] huck5: It may appear so, yes. It's for a veteran I know, who uses medicinal marijuana.
[21:03:30] strcmp1: because nil.to_s => ""
[21:03:56] strcmp1: huck5, cool
[21:04:00] strcmp1: there's also leafly
[21:04:02] shilon: has joined #RubyOnRails
[21:04:06] strcmp1: i think its leading in that field
[21:04:20] cielbleuph: has joined #RubyOnRails
[21:04:39] wviana: strcmp1: so why I'm getting that a tag with loja_path(l) value inside it ?
[21:04:55] huck5: strcmp1, like many things I'm sure there is already a better version out there. This is really more of an excuse to exercise my RoR, while creating an application that has a concrete purpose/vision.
[21:04:58] christiandsg: has joined #RubyOnRails
[21:05:02] victortyau: has joined #RubyOnRails
[21:05:16] strcmp1: cool huck5
[21:05:33] andessen: has joined #RubyOnRails
[21:05:38] strcmp1: wviana, loja_path(l) will always be in the link, there's nothing special cased about it
[21:05:50] strcmp1: your special casing the 'title' attr
[21:06:07] bricker: huck5: aww I was hoping you were making a Zombie Tracker
[21:06:48] huck5: bricker, Not sure where I'd begin with that one. How would one identify a Zombie?
[21:07:27] bricker: huck5: by the strain of the disease they were infected with, and the effect it had on them!
[21:07:37] huck5: bricker: I see the connection now!
[21:07:53] huck5: Either way... I still can't get heroku to create my database -.-'
[21:08:24] huck5: Which likely means it's time for a break. I'm sure I'll be back with more questions in a few hours. As always, thanks for the help all!
[21:11:12] drale2k: has joined #RubyOnRails
[21:12:55] vickleton: has joined #RubyOnRails
[21:14:31] DEA7TH: has joined #RubyOnRails
[21:14:35] smathy: strcmp1, that type column, and actually storing the class name of the subclass *is* what STI is.
[21:15:14] jyraff: has joined #RubyOnRails
[21:16:18] strcmp1: smathy, yeah its a vital part if you dont want a subclass to become any row, but i dont think its required actually.
[21:16:44] arooni-mobile: has joined #RubyOnRails
[21:16:50] strcmp1: smathy, anyway you said a subclass of another AR::Base subclass does not mean STI when in reality it almost always would
[21:17:36] smathy: strcmp1, not at all, there are many Rails patterns that use a subclass for other reasons, like to add different validations when using the model in different situations.
[21:17:50] bin_005: has joined #RubyOnRails
[21:18:13] strcmp1: i havent come across that before, and that's still an STI subclass.
[21:18:18] smathy: strcmp1, and actually, those always suffer from problems like the route helpers not working - unless you do something special - which was why I was asking.
[21:18:23] erich: has joined #RubyOnRails
[21:18:33] iamse7en: can you send params with actionmailer? e.g. in email, send a link to e.g. resource#show which requires params[:id]
[21:18:34] smathy: strcmp1, it's not at all an STI class - it won't store its class name in the DB.
[21:18:48] SofCherenkov: has joined #RubyOnRails
[21:18:59] VeryBewitching: iamse7en: Your route helpers should be available.
[21:19:14] strcmp1: smathy, correct it wont but i dont call that a requirement. you can still say TheSubclass.find(10) and get a TheSubclass instance with row data found at id `10`.
[21:19:59] TheWhiteOx: has joined #RubyOnRails
[21:19:59] Sdwrage__: has joined #RubyOnRails
[21:20:05] smathy: strcmp1, that's not what STI is, that's just what plain old subclassing is.
[21:20:21] strcmp1: yeah, i dont agree with that
[21:20:26] smathy: strcmp1, read: http://api.rubyonrails.org/classes/ActiveRecord/Inheritance.html or https://en.wikipedia.org/wiki/Single_Table_Inheritance
[21:20:26] strcmp1: and its not arguing over
[21:20:45] DylanJ: has joined #RubyOnRails
[21:20:52] VeryBewitching: iamse7en: http://edgeguides.rubyonrails.org/action_mailer_basics.html#generating-urls-in-action-mailer-views
[21:20:53] strcmp1: not worth*
[21:21:01] smathy: strcmp1, "by storing the name of the class in a column that by default is named ???type???" and "a field in the database identifies what class in the hierarchy the object belongs to"
[21:21:02] seank_: has joined #RubyOnRails
[21:21:03] maz-dev: has joined #RubyOnRails
[21:21:21] bin_005: has joined #RubyOnRails
[21:21:30] iamse7en: thanks VeryBewitching
[21:21:42] strcmp1: yeah, but by my definition, the type column isn't required. any subclass who can assume the identity of a row in a table is a STI subclass, to me. it just means a subclass can become ANY row, instead of specific rows.
[21:22:41] n00bDev: anyone point to a resource for routing sti?
[21:22:49] annlewis: has joined #RubyOnRails
[21:22:53] n00bDev: like a decent one?
[21:22:58] smathy: strcmp1, problem there is that the other features of STI won't work - but sure, you redefine it however you please. Maybe you could write your own wiki.
[21:23:11] strcmp1: smathy, what other features?
[21:23:50] smathy: strcmp1, eg. associations from other models automatically objects of the correct class.
[21:23:58] smathy: *returning
[21:24:04] strcmp1: anyway i dont have time to discuss anything with someone who wants to be rude, and tbh, a smart ass. my argument holds true, without the type column it is still a STI subclass who can assume the identity of any row, instead of a specific row.
[21:24:28] strcmp1: if you just dont want to be wrong (seems this way), then ok youre right, and the rigid definition on wikipedia is the only definition, and it is not open to redefinition or discussion :P
[21:24:29] smathy: strcmp1, eg. routes automatically creating the correct route when using polymorphic_path
[21:24:58] VeryBewitching: n00bdev: I would try constraints first, as a good schema for complex routing may be simplified with it. http://guides.rubyonrails.org/routing.html#specifying-constraints
[21:25:11] cornerma1: has joined #RubyOnRails
[21:25:16] AkashicLegend: has joined #RubyOnRails
[21:25:25] AkashicLegend: which is easier for web development
[21:25:26] JoshGlzBrk: has joined #RubyOnRails
[21:25:32] AkashicLegend: : ruby on rails or django. I already know some python but 0 ruby
[21:25:34] rhizome: the type column is there to distinguish between multiple subclasses, which is the reason to use STI, otherwise you might as well just leave inheritance out entirely.
[21:25:41] strcmp1: smathy, i can still make that work (associations) but not worth discussing it tbh.
[21:25:54] rhizome: AkashicLegend: whatever you know already, or whatever appeals to you
[21:26:04] bruno-: has joined #RubyOnRails
[21:26:12] smathy: strcmp1, bullshit. If the class isn't stored in the DB then you have no way of knowing what class the original object was.
[21:26:16] VeryBewitching: n00bdev: http://guides.rubyonrails.org/routing.html#request-based-constraints might be handy too.
[21:26:27] AkashicLegend: yeah but let's say I want to build an interactive in as little time as possible
[21:26:29] AkashicLegend: which is the best for that
[21:26:48] AkashicLegend: from what I've read rails is faster to get things done on
[21:26:53] strcmp1: rhizome, i agree. the only time i seen a subclass of another AR::Base subclass was when STI is being used, but smathy offered a counter example of using a subclass to define context-specific validations that the parent doesnt have. its an interesting idea, but i never seen it in real life before.
[21:27:05] Scriptonaut: has left #RubyOnRails: ()
[21:27:07] nettoweb: has joined #RubyOnRails
[21:27:09] VeryBewitching: AkashicLegend: You can get a lot done with Rails and it's generators quickly, but at some point you still have to write some code.
[21:27:12] n00bDev: im suprised
[21:27:14] strcmp1: smathy, that doesn't have to matter.
[21:27:18] n00bDev: the docs dont go over something liek this?
[21:27:21] SunWuKung: has joined #RubyOnRails
[21:27:39] VeryBewitching: n00bdev: It will require something custom, it's not an easy subject.
[21:27:54] strcmp1: smathy, in your idea of how it works, a row is always bound to a specific subclass, but it doesn't have to be that way. a subclass could become any row, and have behavior specific to that class.
[21:27:56] rhizome: strcmp1: i'd have to experiment to see if LSP breaks down in that case
[21:28:15] n00bDev: damn it and my head engineer is never available for help T_T
[21:28:16] jxpx777: has joined #RubyOnRails
[21:28:35] rhizome: at any rate, you can query the superclass in an STI setup
[21:28:37] VeryBewitching: n00bdev: It only takes a couple of hours of playing to learn how to setup such routes.
[21:29:08] rhizome: n00bdev: again, sti is unrelated to routing
[21:29:23] VeryBewitching: n00bdev: rhizome is correct.
[21:29:36] nettoweb: has joined #RubyOnRails
[21:29:50] VeryBewitching: I don't even use "resources" anymore unless it's something very small and straight-up CRUD. I specify each route by hand.
[21:29:54] johnflux: I want to add a select box to select an image, and a "Insert" button, which when pressed adds the html page into textarea using javascript
[21:30:02] johnflux: should I do this a <form> ?
[21:30:17] smathy: strcmp1, it's not my idea of how it works, it's the Rails docs, wikipedia's, Martin Fowler's, and many other people who created the STI pattern in the first place. You could either learn something new here, or keep arguing - and you've chosen the latter.
[21:30:41] bricker: johnflux: not necessary if you're not submitting any data to the server
[21:30:47] strcmp1: smathy, alright, well my definition is different. i view it differently. i explained my position, and i won't agree with you.
[21:30:53] strcmp1: so we might as well move on.
[21:31:00] smathy: strcmp1, the "Single Table Inheritance" concept already has a definition, and you're simply mistaken about it - which is fine, but don't try to make out that *I'm* the one making up their own definitions here.
[21:31:15] strcmp1: i have said all along that my definition is different
[21:31:23] strcmp1: its one of the first things i said
[21:31:43] strcmp1: dont worry smathy, all of your thoughts are just repeats of someone elses thoughts :P
[21:34:23] workmad3: has joined #RubyOnRails
[21:35:06] slash_nick: hooray! friday!
[21:35:22] strcmp1: smathy, as for associations, they work fine as long as the foreign key is eferenced as "parent_id". you can use foreign_key: :parent_id for that
[21:36:41] BlueShoesYes_: has joined #RubyOnRails
[21:37:01] johnflux: What replaces button_to_function ?
[21:37:12] wldcordeiro__: has joined #RubyOnRails
[21:37:12] johnflux: what should I use to add a button that just runs some js?
[21:37:52] waseem_: johnflux: Use jQuery to attach click event to that button.
[21:38:08] johnflux: waseem_: to what button?
[21:38:13] northfurr: has joined #RubyOnRails
[21:38:33] waseem_: johnflux: A button that is rendered with html.
[21:38:52] waseem_: johnflux: Which when clicked executes that function.
[21:40:11] VeryBewitching: johnflux: Do you coauthor Konversation?
[21:42:18] BlueShoesYes_: Hey guys. I know a small amount of ruby (very small). Would RailsForZombies be a good place to start learning Rails?
[21:42:31] JoshL: has joined #RubyOnRails
[21:43:51] VeryBewitching: BlueShoesYes_: !twgr
[21:43:51] helpa: BlueShoesYes_: Learn Ruby by reading this book - http://manning.com/black3 - The Well-Grounded Rubyist by David A. Black
[21:44:03] VeryBewitching: BlueShoesYes_: !r4ia
[21:44:03] helpa: BlueShoesYes_: 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
[21:44:28] VeryBewitching: I would suggest learning Ruby fairly well before Rails.
[21:44:59] BlueShoesYes_: VeryBewitching: Gotcha. Thanks! I appreciate the advice. PS thats a super cool feature of this chat hah.
[21:45:33] VeryBewitching: BlueShoesYes_: https://github.com/radar/railsbot
[21:45:42] AkashicLegend: Nobody has time to learn ruby well
[21:45:46] AkashicLegend: when they're doing a startup
[21:46:08] AkashicLegend: it looks like ruby is good for automatically generating code
[21:46:12] VeryBewitching: AkashicLegend: I entirely disagree.
[21:47:42] AkashicLegend: I won't defer to your experience without an explanation.
[21:48:03] centrx: has joined #RubyOnRails
[21:48:42] VeryBewitching: AkashicLegend: I'm the kind who believes that you shouldn't build something for production unless you understand the tools you're using.
[21:49:15] AkashicLegend: So you're against the concept of a garage band.
[21:49:24] smathy: AkashicLegend, it's also not my experience, my experience is that good startups employ people who already know ruby well (if that's what they're using).
[21:49:25] Papierkorb: ^ At least don't blame the tools, but yourself, if things go down the drain :)
[21:49:26] AkashicLegend: Of randomly assembled parts.
[21:49:51] VeryBewitching: AkashicLegend: A garage band doesn't get as many gigs as the band with 4 platinum albums :D
[21:50:19] smathy: AkashicLegend, of course, good startups are the minority of startups - so perhaps your statement holds, but crap startups are unimportant to me.
[21:50:36] AkashicLegend: I already know too much worthless crap in other programming languages.
[21:51:01] AkashicLegend: Time is the most value and limited resource in our lives. Taking the time to learn more if statements, loops, or bs is a waste of life imo.
[21:51:14] AkashicLegend: Better to just try and glue everything together and see what sticks.
[21:51:15] VeryBewitching: AkashicLegend: When I started learning Ruby, I had to quickly abandon conventions from other languages. Ruby is it's own type with it's own philosophies.
[21:51:23] smathy: BlueShoesYes_, the ruby docs themselves have some pointers to great resources, Learn to Program, koans, etc: https://www.ruby-lang.org/en/documentation/
[21:51:57] BlueShoesYes_: smathy: sweet thanks!
[21:52:23] robbyoconnor: has joined #RubyOnRails
[21:53:45] smathy: AkashicLegend, not sure how much you think there is to learn in flow control statements, they're pretty much the same as everywhere else. The things to learn in ruby are the language features like blocks, the object structure, and the rich stdlib, iterators, etc.
[21:54:59] AkashicLegend: I think I saw what I needed
[21:55:03] AkashicLegend: ruby in 20 minutes
[21:55:24] VeryBewitching: smathy: Many people aren't willing to be artisans.
[21:55:39] VeryBewitching: smoke break, bbiab
[21:56:00] smathy: AkashicLegend, and like basically all knowledge, learning ruby more deeply is a short term cost for a long term gain. I guarantee that I can code full apps without security or performance problems quicker than someone who hasn't invested that time.
[21:56:08] theery: has joined #RubyOnRails
[21:56:38] leonL: has joined #RubyOnRails
[21:56:49] AkashicLegend: smathy, I don't necessarily disagreew with you. But I think it depends on your goals.
[21:57:25] smathy: AkashicLegend, obviously it does. If your goals are to create a throw-away prototype then you barely need to know rails, let alone ruby.
[21:57:28] AkashicLegend: If you plan on coding ruby for a living, you're probably better off learning all the details. If you just want to get a deme/site up and running as soon as possible
[21:57:36] AkashicLegend: maybe you don't need all that knowledge
[21:57:58] smathy: AkashicLegend, but I'd assumed our goals were similar - creating an app for a (I assume) successful startup.
[21:58:03] AkashicLegend: I don't need to be a carpenter to put together a piece of furniture from ikea.
[21:58:14] baweaver: has joined #RubyOnRails
[21:58:23] johnflux: I have: <%= select_tag('image', options_from_collection_for_select(@images, 'id', 'attached_file_file_name' ),include_blank: 'Select image...') %>
[21:58:35] Papierkorb: but it would be a better end product if you were AkashicLegend
[21:58:42] smathy: Demo - sure, but doing nothing but demos isn't a real business/startup.
[21:58:43] johnflux: and this works. But instead of "id" i want attached_file.url
[21:58:47] safety_cut: has joined #RubyOnRails
[21:59:03] johnflux: but how can I pass attached_file.url to this when it's expecting a string?
[21:59:17] smathy: AkashicLegend, right, and if you try to create a furniture business by putting together Ikea furniture and reselling it then you're likely to fail.
[21:59:27] slash_nick: AkashicLegend: yeah, but if you want resilient furniture you don't go to ikea. anything you build that "takes off" is going to need to be of higher quality (or become of higher quality quickly)
[21:59:34] Sdwrage__: has joined #RubyOnRails
[21:59:39] smathy: AkashicLegend, if you want to use Ikea furniture to put together a quick demo of your idea - sure.
[21:59:57] smathy: ...but you'll basically need to throw that away by the time you're running an actual business.
[22:00:50] smathy: johnflux, make a method for that on Image - just like you did for `attached_file_file_name`
[22:02:08] Sylario_: has joined #RubyOnRails
[22:02:50] mib_mib: has joined #RubyOnRails
[22:03:52] johnflux: smathy: ooooo
[22:04:00] johnflux: smathy: nice it works , thank you :)
[22:05:01] mib_mib: hi - i'm using papertrail with a custom model, when i run it in rails console, it works fine, i.e. tracks the version - however, when I run it as a rake task and try to save, i get NameError: uninitialized constant 'SpecialVersions'
[22:05:24] mib_mib: is there some difference of how models are loaded when running rails console vs a rake task?
[22:05:44] mib_mib: i added this to application.rb: config.autoload_paths += %W(#{Rails.root}/models/papertrail_versions)
[22:07:06] mib_mib: this is a simple model that inherits from PaperTrail::Version
[22:08:15] n00bDev: how do i access variables of a parent class from a STI?
[22:08:43] Papierkorb: n00bdev: just access them by their name/accessor
[22:08:43] AkashicLegend: hmm maybe .net has more of what I need
[22:08:49] AkashicLegend: microsoft understands my natural laziness.
[22:09:40] centrx: AkashicLegend, You can use Rails without learning all the details of Ruby?
[22:09:57] smathy: johnflux, you're welcome.
[22:10:18] smathy: AkashicLegend, nothing understands laziness better than PHP.
[22:10:40] AkashicLegend: I did some php years ago. I don't know I didn't really like it.
[22:10:48] AkashicLegend: I had a basic website and some database set up.
[22:11:00] smathy: AkashicLegend, oh, so now you want to be lazy ANY like the language/framework.
[22:11:23] AkashicLegend: is that too much to ask for?
[22:11:26] centrx: I thought Ruby enabled laziness and was likeable
[22:11:28] smathy: Actually, yes.
[22:11:30] WhereIsMySpoon: has joined #RubyOnRails
[22:12:09] WhereIsMySpoon: Hi - I've just noticed that my rails app is taking up 3.377G (gigabytes yes) of RAM...this is a bit wtf to me, is there some way to take a deeper look at what in particular is causing this?
[22:12:09] baweaver: are we talking laziness in the programmatic sense or the programmer sense? :P
[22:12:18] drale2k: has joined #RubyOnRails
[22:12:22] baweaver: web server?
[22:12:39] baweaver: probably tune down the worker / thread count if it's Puma / Unicorn / etc
[22:12:49] baweaver: not a problem
[22:13:17] baweaver: yeah, look into your unicorn config and tune it down a bit
[22:13:18] WhereIsMySpoon: baweaver: is there a way to see what the thread count is?
[22:13:37] baweaver: looking for a reference
[22:13:46] baweaver: unless anyone else has one open
[22:13:54] Papierkorb: WhereIsMySpoon: well, you could just use htop or top and count them :)
[22:13:57] baweaver: https://github.com/gitlabhq/gitlabhq/blob/master/config/unicorn.rb.example
[22:14:21] baweaver: ps aux | grep unicorn # would work for a shorter
[22:14:32] n00bDev: Papierknob: im getting a uninitialized constant ActionView::CompiledTemplates::INTERVALS
[22:14:39] Papierkorb: ps aux | grep unicorn | wc -l # For more lazy people
[22:14:47] baweaver: in top, hit Shift + o to change sort
[22:14:50] WhereIsMySpoon: ps aux grep unicorn gives nothing
[22:14:58] baweaver: did you pipe it?
[22:15:04] baweaver: making sure.
[22:15:16] baweaver: top works then
[22:15:18] smathy: WhereIsMySpoon, can I ask first - are you actually running out of RAM?
[22:15:29] WhereIsMySpoon: smathy: the server was getting rather starved yes
[22:15:37] WhereIsMySpoon: 29203 myuser 20 0 6509.3m 3.377g 0.0 28.8 67:10.88 S `- ruby
[22:15:43] WhereIsMySpoon: this is the top entry for ruby
[22:15:52] fluxsource: I've got a webapp, and I want to run periodic, forked tasks on a periodic basis (ie, not in response to a request). Would Resque be a suitable solution?
[22:15:55] fluxsource: if not, what is?
[22:15:57] WhereIsMySpoon: i dont know if that helps
[22:16:32] baweaver: enough. Tune down the worker count to your CPU core count as a first step
[22:16:37] baweaver: looking for threads reference
[22:16:59] slash_nick: fluxsource: there's some cool stuff in the concurrent-ruby library... https://github.com/ruby-concurrency/concurrent-ruby
[22:17:12] Papierkorb: fluxsource: I'm using the whenever gem for that
[22:17:23] smathy: ACTION still uses cron
[22:17:25] fluxsource: slash_nick: thanks, I'll take a look
[22:17:35] baweaver: "For most instances we recommend using: CPU cores + 1 = unicorn workers. So for a machine with 2 cores, 3 unicorn workers is ideal."
[22:17:36] slash_nick: fluxsource: http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/TimerTask.html
[22:17:48] safety_cut: has joined #RubyOnRails
[22:17:48] fluxsource: Papierkorb: doesn't whenever spin up a new rails instance each time?
[22:17:50] bricker: fluxsource: cron + rake tasks
[22:18:06] bricker: fluxsource: resque isn't built to run periodic/recurring tasks
[22:18:11] baweaver: WhereIsMySpoon: are you hitting swap at all?
[22:18:25] slash_nick: we use cron + rsync.. for some stuff. i think we use sidetiq for scheduled tasks (hey, fluxsource sidetiq is another)
[22:18:31] WhereIsMySpoon: baweaver: a bit
[22:18:46] fluxsource: thanks guys, plenty of reading to do :)
[22:19:10] Papierkorb: fluxsource: I set it up to trigger a sidekiq job
[22:19:18] baweaver: What type of server are you running?
[22:19:25] WhereIsMySpoon: baweaver: linux
[22:19:26] baweaver: probably debian or centos
[22:19:44] Swappticon: has joined #RubyOnRails
[22:19:50] baweaver: what's the system load looking like?
[22:20:02] fluxsource: I only mentioned Resque as I was reading an article about using resque-sheduler
[22:20:14] WhereIsMySpoon: baweaver: you mean cpu load?
[22:20:15] fluxsource: thanks for the suggestions, I'll do some reading :)
[22:20:42] baweaver: http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages for reference
[22:20:43] WhereIsMySpoon: baweaver: the cpu load is absolutely fine
[22:20:52] baweaver: so just pegging out the ram then
[22:20:59] WhereIsMySpoon: and it makes no sense why
[22:21:03] WhereIsMySpoon: its not a heavy app
[22:21:37] DLSteve: has joined #RubyOnRails
[22:22:14] baweaver: https://github.com/kzk/unicorn-worker-killer - that might help, though looking about a bit more.
[22:22:39] baweaver: ideally you want something to watch for unicorns that have gotten too fat
[22:22:50] Kallis: has joined #RubyOnRails
[22:23:14] baweaver: for something more powerful there are things like God, Bluepill, and Monit.
[22:23:26] sarink: has joined #RubyOnRails
[22:23:36] annlewis: has joined #RubyOnRails
[22:23:53] smathy: slash_nick, scheduled != recurring though.
[22:23:55] baweaver: Puma might be a bit more efficient
[22:24:12] baweaver: though I'd have to read into that more myself to say that with absolute certainty.
[22:24:18] WhereIsMySpoon: i might not be using unicorn
[22:24:35] WhereIsMySpoon: how do i tell what webserver im running
[22:24:44] baweaver: gemfile helps
[22:24:53] Papierkorb: look at the process list
[22:25:25] baweaver: Unicorn, Puma, Raptor, Mongrel, etc. (I forget them all)
[22:25:32] baweaver: Did Raptor ever come out?
[22:25:39] fluxsource: WhereIsMySpoon: try "killall <possible server name>" until it stops
[22:25:54] WhereIsMySpoon: i see passenger entries in ps aux
[22:26:00] WhereIsMySpoon: but passenger isnt uncommented in my gemfile
[22:26:36] juanpaucar: has joined #RubyOnRails
[22:27:19] doublemalt_: has joined #RubyOnRails
[22:27:33] maz-dev: has joined #RubyOnRails
[22:28:18] WhereIsMySpoon: baweaver: im running webrick
[22:28:21] baweaver: Raptor is Passenger, huh. Well, my reading list is offset a bit.
[22:28:30] WhereIsMySpoon: baweaver: just did a curl -I
[22:28:35] jholm: has joined #RubyOnRails
[22:28:35] baweaver: See about running Puma then
[22:28:41] WhereIsMySpoon: Server: WEBrick/1.3.1 (Ruby/2.2.2/2015-04-13)
[22:28:42] baweaver: tends to be the standard
[22:28:52] baweaver: someone correct me if that's horribly wrong
[22:29:13] WhereIsMySpoon: is there some way to see why tihs app is using 3-4G?
[22:29:21] WhereIsMySpoon: to investigate it whilst its running somehow
[22:29:22] baweaver: http://puma.io/
[22:30:00] baweaver: http://blog.skylight.io/hunting-for-leaks-in-ruby/
[22:30:08] baweaver: that looks to have some interesting information
[22:30:39] baweaver: https://blog.engineyard.com/2009/thats-not-a-memory-leak-its-bloat/ - a bit old but could be handy
[22:32:57] jenrzzz: has joined #RubyOnRails
[22:35:44] seank_: has joined #RubyOnRails
[22:35:47] sinaef: has joined #RubyOnRails
[22:41:05] lipoqil: has joined #RubyOnRails
[22:41:47] AkashicLegend: well maybe learning ruby will be worth it
[22:42:03] AkashicLegend: I just remembered this other program I like to use was coded in ruby and supports ruby scripts
[22:42:21] AkashicLegend: even though you don't need to use ruby to use it
[22:42:35] baweaver: First langauge?
[22:43:52] mloy: WhereIsMySpoon, if you want to see all related processes type 'lsof -i :3000' but replace 3000 with the port your webserver is using
[22:44:00] mloy: in terminal
[22:44:25] iago_: has joined #RubyOnRails
[22:46:07] DonOtreply: has joined #RubyOnRails
[22:51:00] porfa: has joined #RubyOnRails
[22:51:09] Lightsword: has joined #RubyOnRails
[22:52:12] ebbflowgo: has joined #RubyOnRails
[22:52:22] atomical: has joined #RubyOnRails
[22:52:41] christiandsg: has joined #RubyOnRails
[22:56:22] nahtnam: I have a very messy controller: https://gist.github.com/nahtnam/a5637141bd35a288ec5f What is worse is that I just realized that the Steam API returnes different arrays based on different users (which is stupid IMO). So, sometimes fields are missing and my controller throws an error because it cant find it. Is there any way I can make my code more resilient
[22:56:22] nahtnam: against the api?
[22:56:47] manfrin: has joined #RubyOnRails
[22:59:31] rhizome: nahtnam: at the very least use a service class for that
[23:00:15] sankaber: has joined #RubyOnRails
[23:02:13] rhizome: unnecessary temp variable in find_by_username
[23:02:54] northfurr: has joined #RubyOnRails
[23:03:05] baweaver: has joined #RubyOnRails
[23:03:21] bbrowning_away: has joined #RubyOnRails
[23:03:47] jxpx777: has joined #RubyOnRails
[23:04:11] dmz: has joined #RubyOnRails
[23:04:41] WhereIsMySpoon: has joined #RubyOnRails
[23:06:52] j_mcnally: has joined #RubyOnRails
[23:13:22] drale2k: has joined #RubyOnRails
[23:16:18] rhizome: not much into participation i guess
[23:16:52] lagweezle: What's the appropriate way to generate a polymorphic model base class with the rails generator?
[23:18:18] lagweezle: ... or do I just add as a property 'type:string'?
[23:19:31] rhizome: i don't think the generator has that feature. just add the stuff manually. http://stackoverflow.com/questions/5534579/how-to-generate-migration-to-make-references-polymorphic
[23:20:16] michael_mbp: has joined #RubyOnRails
[23:20:17] rhizome: that rijks answer seems gross to me
[23:21:34] lagweezle: I'm after generating the table for the polymorphic object, not the thing that references the polymorphic object. At least, not there, yet...
[23:21:43] lagweezle: Figure I'll take this one step at a time.
[23:24:30] annlewis: has joined #RubyOnRails
[23:26:21] j_mcnally: has joined #RubyOnRails
[23:27:31] SunWuKung: has joined #RubyOnRails
[23:29:28] Mendenhall: has joined #RubyOnRails
[23:29:34] jgt: has joined #RubyOnRails
[23:30:03] i: has joined #RubyOnRails
[23:30:26] greengriminal: has joined #RubyOnRails
[23:32:35] Limix: has joined #RubyOnRails
[23:33:25] _djbkd: has joined #RubyOnRails
[23:35:56] jondot: has joined #RubyOnRails
[23:36:24] northfurr: has joined #RubyOnRails
[23:36:30] seank_: has joined #RubyOnRails
[23:36:41] dopie: has joined #RubyOnRails
[23:38:32] havenwood: has joined #RubyOnRails
[23:38:44] dopamean_: has joined #RubyOnRails
[23:39:30] ktchup: has joined #RubyOnRails
[23:39:48] nya: has joined #RubyOnRails
[23:41:00] Sdwrage__: has joined #RubyOnRails
[23:41:22] lipoqil_: has joined #RubyOnRails
[23:43:14] kies^: has joined #RubyOnRails
[23:43:49] Travis-42: has joined #RubyOnRails
[23:44:50] Travis-42: I???m trying to perform a query like Vote.where(votable: votable_array) where votable_array includes different votable_types. Is there a way to do this without manually grouping the votable_array and building the where clause?
[23:47:03] centrx: Travis-42, huh?
[23:47:32] j_mcnally: has joined #RubyOnRails
[23:47:45] centrx: Vote.where(votable: votable_array.map(&:votable_type).uniq) ?
[23:48:11] wildlander: has joined #RubyOnRails
[23:50:17] Travis-42: has joined #RubyOnRails
[23:50:56] Travis-42: Vote.where(votable: votable_array.map(&:votable_type).uniq) wouldn???t work,, that would be trying to pass a list of votable_type???s to ???votable???
[23:51:18] centrx: I'm not sure what you're asking
[23:51:42] voltalio: has joined #RubyOnRails
[23:52:27] smathy: Travis-42, you're asking if Rails will automagically make SQL like: ...WHERE ( votable_type = 'x' AND votable_id = 1 ) OR ( votable_type = 'y' AND votable_id = 1 ) OR ( ....etc. ) ?
[23:52:28] Travis-42: It needs to generate a query like SELECT * FROM votes WHERE (votable_type = ???Article??? AND votable_id IN [1,2,3]) OR (votable_type = ???Blog??? AND votable_id IN [4,5,6])
[23:52:44] smathy: So no, it won't,
[23:52:46] Travis-42: it does it if all the the types are the same
[23:53:10] nya: has joined #RubyOnRails
[23:53:15] wildlander: has joined #RubyOnRails
[23:53:51] greengriminal: has joined #RubyOnRails
[23:54:56] junkmale: has joined #RubyOnRails
[23:55:34] christiandsg: has joined #RubyOnRails
[23:55:45] ktchup: has joined #RubyOnRails
[23:59:59] hnanon: has joined #RubyOnRails