« Back to channel list

#RubyOnRails - 07 December 2015

« Back 1 day Forward 1 day »
[00:01:01] norc: It is just downright bizarre that turbolinks is plugged into Rails directly by defaut.
[00:01:21] rickmasta: has joined #RubyOnRails
[00:01:32] norc: I mean it is an absolute neat thing, but it requires you to actually know a ton about the DOM to not end up a scary land of dragons and caveats.
[00:01:54] Radar: It is not newbie friendly.
[00:02:06] rubyonrailed: has joined #RubyOnRails
[00:03:21] sevenseacat: has joined #RubyOnRails
[00:05:51] diegoviola: Radar: https://gist.github.com/diegoviola/265b1c1e5bbe76eb4c98
[00:05:56] diegoviola: Radar: does it look fine to you?
[00:06:00] diegoviola: the partials
[00:06:14] Radar: Why is the heading not inside the partial as well?
[00:06:35] diegoviola: yeah I'll move that in a sec
[00:08:49] diegoviola: excuse my ignorance but is there a reason why calling <%= render @foo %> will already iterate over the object and not when doing <%= render "partial", sedexes: @sedexes %>
[00:08:57] christiandsg: has joined #RubyOnRails
[00:08:58] diegoviola: sedexes is just passing the object to the partial and not iterating, right?
[00:11:47] K_r3aPeR: has joined #RubyOnRails
[00:12:16] shibabu: has joined #RubyOnRails
[00:19:37] hnanon: Radar: Can I DM you?
[00:19:40] Radar: hnanon: sure
[00:20:22] Oliphaunte: has joined #RubyOnRails
[00:20:39] kitsuneyo: has joined #RubyOnRails
[00:24:55] jetpackjoe: has joined #RubyOnRails
[00:35:20] bronson: has joined #RubyOnRails
[00:36:58] annlewis: has joined #RubyOnRails
[00:43:11] jacksparrow007: has joined #RubyOnRails
[00:45:33] Maletor: has joined #RubyOnRails
[00:46:14] banister: has joined #RubyOnRails
[00:51:43] lmdrx: has joined #RubyOnRails
[00:51:44] draig: has joined #RubyOnRails
[00:52:08] nickenchuggets: has joined #RubyOnRails
[00:53:16] diegok: has joined #RubyOnRails
[00:54:13] pyemkey: has joined #RubyOnRails
[00:55:05] nyaa: has joined #RubyOnRails
[00:56:08] owenjones: has joined #RubyOnRails
[00:57:26] christiandsg: has joined #RubyOnRails
[00:59:06] nickenchuggets: has joined #RubyOnRails
[00:59:07] nickenchuggets: has joined #RubyOnRails
[01:03:09] speaking1ode: has joined #RubyOnRails
[01:04:33] collink__: Radar: so...for some reason...when
[01:05:00] jessemcgilallen: has joined #RubyOnRails
[01:05:30] collink__: Radar: so...for some reason...when I try to run `rails s`, it's telling me I don't have bower-rails installed. i've had to run `bundle install` like 5 or 6 times to fix this...but it doesn't stick
[01:07:33] rickmasta: has joined #RubyOnRails
[01:08:41] emptyflask: has joined #RubyOnRails
[01:09:06] moty66: has joined #RubyOnRails
[01:10:01] jetpackjoe: has joined #RubyOnRails
[01:13:57] Radar: collink__: !gist the full error message please
[01:13:57] helpa: collink__: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[01:15:05] Radar: bbl lunching
[01:15:05] mheld: has joined #RubyOnRails
[01:15:08] collink__: Radar: I already nuked that terminal tab. will do it if comes back up
[01:16:08] joshkovach: has joined #RubyOnRails
[01:16:13] diegoviola: ugh, my indentation stinks here: https://gist.github.com/diegoviola/893453e6ee4ebd58cc43
[01:16:16] diegoviola: I want to make it fit in 80 columns
[01:16:30] diegoviola: don't want to add the options in another hash either
[01:16:57] diegoviola: render "user_experience"
[01:17:42] diegoviola: problem solved
[01:18:02] diegoviola: gist updated
[01:18:46] diegoviola: I get smarter by just looking at this channel it seems
[01:18:54] lmdrx: has joined #RubyOnRails
[01:19:11] SalexW: has joined #RubyOnRails
[01:19:13] Pyro_Killer: has joined #RubyOnRails
[01:19:33] nettoweb: has joined #RubyOnRails
[01:20:07] Pyro_Killer: Hello everyone, I am using RoR and devise, and I added some fields to the user database, now in controllers that are not devise I can access the old fields, like e-mail but not the new fields, anyone know how to fix that?
[01:20:20] xybre: diegoviola: rubber-duck-driven-development ;)
[01:20:57] duncannz: has joined #RubyOnRails
[01:21:25] collink__: with the asset pipeline, can you include scripts outside of assets/javascripts? Like if I wanted to keep an Angular app outside of assets/javascripts in like assets/angular-app, can I still reference it in assets/javascripts/application.js?
[01:21:48] Alejandra: has joined #RubyOnRails
[01:23:19] diegoviola: I don't like how I'm repeating myself with some of my partials/views
[01:23:28] xybre: collink__: should be able to use .. for that, if all else fails use a symlink.
[01:24:07] collink__: xybre: tried this: //= require ../angular-app/app.js
[01:24:40] collink__: xybre: but I get a Sprockets error saying it can't find the file :(
[01:25:20] droptone: Ok, so here's a random question: I have a database that I want to, on app execution, dump the contents of a specific table to a flat file for backup purposes. Normally, I dump contents of hashes and what not
[01:25:30] CarlosYoo: has joined #RubyOnRails
[01:25:31] droptone: to YAML files for this purpose, but now I want to dump the DB itself.
[01:25:32] Cache_Money: has joined #RubyOnRails
[01:25:35] drbayer: has joined #RubyOnRails
[01:25:55] droptone: I haven't attempted to recover the YAML-formatted dumped data, but becuase I'm using the YAML library to dump it, I assume it will be trivial.
[01:26:20] droptone: Is there a best practice for doing this? I suppose I could just build out a hash with the data, then dump the hash.
[01:27:54] CarlosYoo: has joined #RubyOnRails
[01:28:56] FailBit: >dumping to yaml
[01:29:14] FailBit: Pyro_Killer: spring, maybe?
[01:29:22] FailBit: schema changes are app-wide
[01:29:36] xybre: droptone: most DBs have export to .sql file
[01:29:38] raldu_: has left #RubyOnRails: ()
[01:30:05] raldu: has joined #RubyOnRails
[01:32:47] craysiii: has joined #RubyOnRails
[01:35:09] christiandsg: has joined #RubyOnRails
[01:35:52] centrx: has joined #RubyOnRails
[01:37:38] annlewis: has joined #RubyOnRails
[01:37:49] rubyonrailed: has joined #RubyOnRails
[01:39:13] mary5030: has joined #RubyOnRails
[01:40:29] crdpink2: has joined #RubyOnRails
[01:41:41] blackmesa: has joined #RubyOnRails
[01:42:12] duckeater: has joined #RubyOnRails
[01:42:24] FailBit: https://gist.github.com/liamwhite/6501f2281edac04127f6
[01:44:08] shibabu: has joined #RubyOnRails
[01:44:42] xybre: FailBit: refactor so much
[01:46:23] Maletor: has joined #RubyOnRails
[01:47:19] joshkovach: has joined #RubyOnRails
[01:47:35] duckeater: has joined #RubyOnRails
[01:47:54] nettoweb: has joined #RubyOnRails
[01:49:06] krz: has joined #RubyOnRails
[01:51:18] djbkd: has joined #RubyOnRails
[01:54:04] cashnguns: has joined #RubyOnRails
[01:54:31] maxx88: has joined #RubyOnRails
[01:55:29] superlou: has joined #RubyOnRails
[01:56:10] hnanon: What's popular for state selections these days?
[01:56:30] hnanon: Just US is ok.
[01:57:24] centrx: They don't change much
[01:57:25] hnanon: This seems unmaintained: https://github.com/yyyc514/better-states-select
[01:57:40] joshkovach: has joined #RubyOnRails
[01:58:59] versatiletech: has joined #RubyOnRails
[01:59:27] elton: has joined #RubyOnRails
[02:00:04] lmdrx: has joined #RubyOnRails
[02:02:57] chouhoulis: has joined #RubyOnRails
[02:04:20] Radar: hnanon: https://github.com/jim/carmen paired with a regular select box?
[02:06:16] lessless: has joined #RubyOnRails
[02:07:47] mary5030: has joined #RubyOnRails
[02:11:59] christia1: has joined #RubyOnRails
[02:13:56] collink__: I'm trying to use angular views through Rails' asset pipeline with angular-rails-templates. Anyone have much experience with that kind of setup?
[02:13:59] hnanon: Radar: I saw that. I think it might be overkill for my purposes, though.
[02:17:28] versatiletech: has joined #RubyOnRails
[02:19:08] Coldblackice: has joined #RubyOnRails
[02:20:03] framlinqp: has joined #RubyOnRails
[02:21:37] maxx88: has joined #RubyOnRails
[02:22:58] one_zero: has joined #RubyOnRails
[02:27:02] jgt1: has joined #RubyOnRails
[02:29:18] rickmasta: has joined #RubyOnRails
[02:29:32] CarlosYoo: has joined #RubyOnRails
[02:30:16] sevenseacat: has joined #RubyOnRails
[02:30:18] nyaa: has joined #RubyOnRails
[02:35:32] Oliphaunte: has joined #RubyOnRails
[02:37:30] bronson: has joined #RubyOnRails
[02:38:25] annlewis: has joined #RubyOnRails
[02:38:45] lmdrx: has joined #RubyOnRails
[02:43:05] blackmesa: has joined #RubyOnRails
[02:43:56] jacksparrow007: has joined #RubyOnRails
[02:47:25] Maletor: has joined #RubyOnRails
[02:50:52] owenjones: has joined #RubyOnRails
[02:54:00] kfrz: has joined #RubyOnRails
[02:54:05] Oliphaunte: has joined #RubyOnRails
[02:56:05] pyemkey: has joined #RubyOnRails
[02:59:20] owenjones: has joined #RubyOnRails
[03:04:08] CarlosYoo: has joined #RubyOnRails
[03:08:25] rickmasta: has joined #RubyOnRails
[03:08:48] moeabdol: has joined #RubyOnRails
[03:08:48] lightstalker1: has joined #RubyOnRails
[03:08:59] krzkrz: has joined #RubyOnRails
[03:15:26] creature: has joined #RubyOnRails
[03:15:27] creature: has joined #RubyOnRails
[03:16:37] rgrmatt: has joined #RubyOnRails
[03:21:46] Sawbones: has joined #RubyOnRails
[03:22:55] doublemalt_: has joined #RubyOnRails
[03:24:24] eddiegrey: has joined #RubyOnRails
[03:26:00] morenoh149: has joined #RubyOnRails
[03:26:15] morenoh149: what is the ror runtime? rack?
[03:26:32] hotpancakes: has joined #RubyOnRails
[03:27:29] krzkrzkrz: has joined #RubyOnRails
[03:30:59] ascarter: has joined #RubyOnRails
[03:32:48] Radar: define "runtime"
[03:32:52] jacksparrow007: has joined #RubyOnRails
[03:32:53] Radar: morenoh149:
[03:34:06] eddiegrey: first time on the channel...learning rails with the hartl tutorial now...loving it
[03:34:47] hello9: has joined #RubyOnRails
[03:35:24] hello9: is there a convenient way to encode a string as an integer maintaining uppercase/lowercase?
[03:35:24] sevenseacat: has joined #RubyOnRails
[03:35:31] Radar: hello9: !xy
[03:35:31] helpa: hello9: It seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[03:36:01] hello9: @radar yeah probably
[03:36:11] hello9: bottom line im trying to coerce a session into a hash
[03:36:26] hello9: because the keys are sometimes an integer sometimes a string
[03:37:29] Radar: you didn't show any code
[03:38:16] djbkd: has joined #RubyOnRails
[03:39:10] annlewis: has joined #RubyOnRails
[03:39:44] nyaa: has joined #RubyOnRails
[03:40:27] Cache_Money: has joined #RubyOnRails
[03:42:21] eddiegrey: has joined #RubyOnRails
[03:43:38] Jasaka: has joined #RubyOnRails
[03:44:36] shibabu: has joined #RubyOnRails
[03:46:06] blackmesa: has joined #RubyOnRails
[03:47:01] djbkd: has joined #RubyOnRails
[03:48:08] Maletor: has joined #RubyOnRails
[03:49:26] kfrz: has joined #RubyOnRails
[03:50:38] nyaa: has joined #RubyOnRails
[03:51:11] krzkrzkrz: has joined #RubyOnRails
[03:51:38] ewnd9_: has joined #RubyOnRails
[03:51:39] _Tariq: has joined #RubyOnRails
[03:53:54] mary5030: has joined #RubyOnRails
[04:00:51] _Tariq: has joined #RubyOnRails
[04:02:18] lele: has joined #RubyOnRails
[04:02:37] Cache_Money: Am I using the has_many through relationship correctly here? If so, what do I need to change in order to get the checked items to store? http://stackoverflow.com/questions/34101128/rails-4-has-many-through-form-with-nested-attributes-checkboxes-and-additional
[04:05:14] TheHackOps: has joined #RubyOnRails
[04:05:22] TheHackOps: Radar, Dont worry
[04:05:32] TheHackOps: I am just going to remove Ruby,RoR and try something else
[04:05:33] Radar: TheHackOps: Oh but I do worry.
[04:05:38] nyaa: has joined #RubyOnRails
[04:05:54] Radar: TheHackOps: You're pretty close to having a working app.
[04:06:00] helpa: http://i.imgur.com/m9m3wr9.gif
[04:06:02] Radar: TheHackOps: jhass's config.ru fix won't work
[04:06:12] Radar: TheHackOps: !gettingstarted will show you how to create a new app
[04:06:12] helpa: TheHackOps: http://guides.rubyonrails.org/getting_started.html - Getting started with Ruby on Rails guide written by Mike Gunderloy and Ryan Bigg
[04:06:31] Radar: TheHackOps: Then after you've run that "rails new" command, then you can edit the config/routes.rb file in that app as per the README on the resque web repo
[04:06:33] Radar: then it will work
[04:06:45] TheHackOps: Radar, I dont think you're all elitist btw
[04:06:49] TheHackOps: I volunteer in C++
[04:07:02] Radar: TheHackOps: thanks :)
[04:07:05] TheHackOps: Im used to it
[04:07:19] TheHackOps: So yea, sorry if I seem retarde
[04:07:20] xybre: TheHackOps: Have you looked at stuff like https://github.com/sasanrose/phpredmin ?
[04:07:49] hotpancakes: has joined #RubyOnRails
[04:08:17] TheHackOps: Radar, Ill try it and let you know
[04:08:18] rickmasta: has joined #RubyOnRails
[04:08:41] nyaa: has joined #RubyOnRails
[04:09:16] TheHackOps: Radar, To be fair the communities and people I deal with every day are not much different than RoR
[04:09:29] djbkd: has joined #RubyOnRails
[04:09:31] TheHackOps: Your communities problem is that everyone outside Ruby and RoR hates you with a passion
[04:09:44] sevenseacat: ACTION thinks someone should probably know better before insulting people then
[04:09:46] Radar: TheHackOps: why is that?
[04:09:59] TheHackOps: Radar, Mostly they dont like the syntax, eco system
[04:10:08] braincrash: has joined #RubyOnRails
[04:10:12] TheHackOps: They have a case of where the fuck is my brace
[04:10:38] TheHackOps: I am a Python guy as well
[04:10:40] TheHackOps: So i dont mind
[04:10:43] Radar: "Where are all the types?!" "What do you mean '0' is not false?!"
[04:11:01] TheHackOps: RoR and Ruby is one of the last things I dont know anything about
[04:11:31] TheHackOps: Ill give you a good example of snide remarks
[04:11:35] TheHackOps: From other places
[04:11:37] xybre: Everyone outside of a community hates that community with a passion :D
[04:11:50] TheHackOps: We had a kid in C++ asking what I thought was a legit question
[04:12:01] TheHackOps: How does std::shared_ptr<T> work
[04:12:09] TheHackOps: the only response he got was, stop trolling
[04:12:35] diegoviola: I have these views and partials but I feel I'm duplicating too much: https://gist.github.com/diegoviola/34b31d2a771a2c5e156d
[04:12:39] TheHackOps: Unless you're asking how the compiler does type analysis or something they dont want to know
[04:12:42] jbrhbr: has joined #RubyOnRails
[04:12:48] diegoviola: is there a better way
[04:13:32] Radar: diegoviola: seems fine to me
[04:14:16] TheHackOps: Radar, Right that makes sense
[04:14:30] TheHackOps: rails new scafolds a project like Rust cargo does
[04:14:34] TheHackOps: cargo new project_name
[04:14:38] xybre: TheHackOps: if you just need a Redis management tool also look at http://redisdesktop.com
[04:14:45] TheHackOps: No, not redis at all
[04:14:54] TheHackOps: I dont actually know what the job queue uses redit for
[04:14:59] TheHackOps: I assume in memory caching of jobs
[04:15:07] diegoviola: Radar: yeah it's fine, someone said I should use <%= render @foo %> instead and pass in the fields to the partial and build the table dynamically, not sure about that or if it's worth it
[04:15:21] Radar: yeah, it serialises the info about the jobs into Redis and then can deserialise it and run it when it needs to do that.
[04:15:30] Radar: diegoviola: I don't think it's worth it. Way too much magi.
[04:15:35] Radar: I prefer this explicit way of doing it.
[04:15:48] TheHackOps: Right I have a new project scafolded
[04:15:59] TheHackOps: So you reckon i can contin with their tutorial?
[04:16:22] diegoviola: Radar: yeah I also don't like much magic, I find that magic is easy to break and can get annoying after a while
[04:16:35] diegoviola: Radar: I'll just keep it this way unless there is a good reason to change
[04:16:50] Radar: TheHackOps: The instructions on resque-web should get you there.
[04:16:57] xybre: TheHackOps: Resque is just a job queueing system built on Redis
[04:17:01] TheHackOps: Radar, Explain one more thing please
[04:17:05] jgt1: has joined #RubyOnRails
[04:17:06] TheHackOps: xybre, Yea I get that
[04:17:15] TheHackOps: I have used many job queue systems
[04:17:26] TheHackOps: How do I run gem 'resque-web', require: 'resque_web'
[04:17:30] TheHackOps: Stupid question I know
[04:17:35] Radar: TheHackOps: That line goes in your new app's Gemfile.
[04:17:37] TheHackOps: I have a project scaffolded
[04:18:40] hotpancakes: has joined #RubyOnRails
[04:19:44] TheHackOps: Right that all made sense
[04:19:48] TheHackOps: I followed their stuf
[04:20:00] TheHackOps: Now, I need to run the app on a different port to nginx
[04:20:19] TheHackOps: Does RoR / Ruby come with a default web server
[04:20:21] bunniez: has joined #RubyOnRails
[04:20:23] TheHackOps: Or how does this work
[04:20:30] owenjones: has joined #RubyOnRails
[04:20:38] nyaa: has joined #RubyOnRails
[04:20:40] fryguy: TheHackOps: it does come with a default one, but you should only use it for development
[04:21:08] TheHackOps: fryguy, Yeah
[04:21:15] TheHackOps: I dont plan on using this portal on prod
[04:21:29] Radar: TheHackOps: run "rails server"
[04:21:36] bunniez: doing Hartl tutorial. I installed CarrierWave and ran command: rails generate uploader Picture???. it's been sitting there processing that command for a super long time. is that normal?
[04:22:09] Oliphaunte: has joined #RubyOnRails
[04:22:25] TheHackOps: Radar, Thanks
[04:22:29] TheHackOps: Cheers so much btw
[04:22:33] TheHackOps: I know i have been a pain in the ass
[04:22:39] TheHackOps: but you guys did help in the end get it working
[04:22:51] Radar: bunniez: How long are we talking?
[04:23:09] bunniez: Radar, 20 min
[04:23:22] Radar: bunniez: Yeah, that's too long. What OS?
[04:23:27] nyaa: has joined #RubyOnRails
[04:23:30] bunniez: Radar, cloud9
[04:23:36] bunniez: Radar, so linux i think
[04:23:41] Radar: I don't have any experience with that platform.
[04:23:54] Radar: Any particular reason why you didn't install Ruby / Rails locally?
[04:24:02] Oliphaunte: has joined #RubyOnRails
[04:24:11] diegoviola: so I'm almost done with the rails app I was hired to write, but the person who hired me still wants to rewrite the app in Node.js
[04:24:12] bunniez: Radar, I did what was recommended by the professor of this course
[04:24:34] Radar: diegoviola: "I'm a doctor, not a scientist, damn it!"
[04:24:39] diegoviola: I honestly hope I can convince the person to stay with this codebase because I don't see myself rewriting this
[04:25:01] Radar: diegoviola: he's been paying you as you go, right?
[04:25:08] Radar: Or is there going to be a shitfight at the end of all of this?
[04:25:48] chandlerbing: has joined #RubyOnRails
[04:26:06] diegoviola: Radar: I have a salary, I work remotely, but the person is still hoping I'll move there to work onsite, the pay isn't great though
[04:26:11] droptone: *SHITFIGHT IMMINENT*
[04:26:22] Radar: diegoviola: Ok, great. So ship the Rails app and then wash your hands of it.
[04:26:40] diegoviola: Radar: I'll meet them in a week again, I'll ask for better pay, or I'll propose to continue remote with current salary
[04:26:51] Radar: You signed up to develop a Rails app and that's what you did.
[04:27:00] droptone: #lifeadvice
[04:27:04] diegoviola: yeah, the app works and it's done
[04:27:13] diegoviola: I still have to write some specs though
[04:27:34] crdpink: has joined #RubyOnRails
[04:27:36] diegoviola: will focus on that tomorrow
[04:28:27] Oliphaunte: has joined #RubyOnRails
[04:28:34] TheHackOps: Radar, uninitialized constant Resque (NameError)
[04:28:41] Cache_Money: sevenseacat: you around? you convinced me that a HABTM wasn't the right approach to my problem a couple days ago but I'm having trouble implementing a has_many through relationship successfully. Would you mind taking a look? http://stackoverflow.com/questions/34101128/rails-4-has-many-through-form-with-nested-attributes-checkboxes-and-additional
[04:28:45] Radar: TheHackOps: Might need to add the resque gem to your Gemfile too
[04:28:51] Radar: TheHackOps: gem 'resque'
[04:28:51] diegoviola: thanks for the advice
[04:28:52] sevenseacat: Cache_Money: hello
[04:29:34] rubyonrailed: has joined #RubyOnRails
[04:29:52] TheHackOps: Radar, thanks
[04:30:07] Cache_Money: sevenseacat: hey! I can't figure out how to get my has_many through relationship working.
[04:30:26] sevenseacat: Cache_Money: so now you want a nested model form
[04:30:41] sevenseacat: where you can add/manage new AmazonProductKit records
[04:30:49] Cache_Money: sevenseacat: yeah
[04:31:12] TheHackOps: Radar, One more error I reckon
[04:31:20] Cache_Money: and since I want to capture a `quantity` attribute in the AmazonProductKit you said I shouldn't use the HABTM relationship
[04:31:25] TheHackOps: uninitialized constant MyApp (NameError)
[04:31:29] WizJin: has joined #RubyOnRails
[04:31:36] Radar: TheHackOps: Oh, that's from their config/routes.rb
[04:31:42] Radar: TheHackOps: Change MyApp::Application to Rails.application
[04:31:47] sevenseacat: I don't know how that relates to what I just said
[04:31:50] TheHackOps: in their config?
[04:32:15] Radar: TheHackOps: your config
[04:32:57] TheHackOps: WEBRick started
[04:33:08] Cache_Money: sevenseacat: sorry. Yes, i'd like a nested model form for AmazonProductKit records within my new Kit form
[04:33:21] sevenseacat: yes, thats what you should build. what problem are you having with doing that?
[04:33:54] nofxx: has joined #RubyOnRails
[04:33:55] nofxx: has joined #RubyOnRails
[04:34:09] sevenseacat: your SO question doesnt have anything to do with a nested model form
[04:34:23] htmldrum: has joined #RubyOnRails
[04:34:25] hotpancakes: has joined #RubyOnRails
[04:34:53] Cache_Money: sevenseacat: I don't understand what I'm doing wrong, it's either something to with the strong params within the Kit controller or the form
[04:35:07] sevenseacat: its nothing to do with that
[04:35:18] sevenseacat: lemme find a tutorial on building nested model forms
[04:35:26] dopie: https://gist.github.com/staycreativedesign/22e87008f83f2266412d
[04:35:27] sevenseacat: you dont have one, and you should have one
[04:35:32] dopie: Im getting a type mismatch
[04:35:38] dopie: i know its on vips params
[04:35:42] sevenseacat: https://github.com/nathanvda/cocoon/wiki/A-guide-to-doing-nested-model-forms
[04:35:44] _Tariq: has joined #RubyOnRails
[04:35:48] nyaa: has joined #RubyOnRails
[04:35:52] paradisaeidae: has joined #RubyOnRails
[04:35:57] Cache_Money: sevenseacat: thanks, i'll read through that now
[04:36:29] Radar: dopie: https://gist.github.com/staycreativedesign/22e87008f83f2266412d#file-gistfile1-txt-L12 this should be vip_ids
[04:37:01] Radar: dopie: Because otherwise it will try and assign the array to the vips= setter method defined by has_many :vips... and then the elements in the array you're passing to it aren't VIP objects. Hence your error.
[04:37:59] xcesariox: has joined #RubyOnRails
[04:38:27] nyaa: has joined #RubyOnRails
[04:38:28] CarlosYoo: has joined #RubyOnRails
[04:38:56] hotpancakes: has joined #RubyOnRails
[04:39:53] bronson: has joined #RubyOnRails
[04:39:55] SteenJobs: has joined #RubyOnRails
[04:39:55] annlewis: has joined #RubyOnRails
[04:40:48] nyaa: has joined #RubyOnRails
[04:43:38] hxegon: has joined #RubyOnRails
[04:44:11] hxegon: anyone know how to get multiline block results in erb? https://gist.github.com/anonymous/a2c97d11a3e4a659ebc3
[04:44:36] elton: has joined #RubyOnRails
[04:45:43] shibabu: has joined #RubyOnRails
[04:46:31] bronson: has joined #RubyOnRails
[04:46:52] diegoviola: I'm sort of obsessed at running git reset --hard HEAD; git clean -dfx
[04:47:20] diegoviola: before starting work
[04:47:53] quazimodo: diegoviola: how come?
[04:47:57] rickmasta: has joined #RubyOnRails
[04:49:08] blackmesa: has joined #RubyOnRails
[04:49:12] Maletor: has joined #RubyOnRails
[04:49:20] dopie: Radar, thank you for the explanation
[04:49:35] rgrmatt: has joined #RubyOnRails
[04:49:40] dopie: Almost got it right the first try :)
[04:50:10] diegoviola: quazimodo: not sure, I also tend to run sync from time to time
[04:50:36] quazimodo: diegoviola: I set up bash to show me if the repo's clean or dirty, partially staged etc
[04:50:43] diegoviola: quazimodo: cool
[04:50:45] quazimodo: it's super useful to me
[04:51:26] quazimodo: diegoviola: actually the script needs fixidng
[04:51:35] diegoviola: quazimodo: I tend to use git-add and git-commit carefully... so that I know what I commit exactly
[04:52:50] johnflux: has joined #RubyOnRails
[04:52:51] johnflux: has joined #RubyOnRails
[04:53:00] diegoviola: at the last place I worked they had a wrapper that would just git-add -A every time they ran their wrapper, terrible
[04:53:56] jetpackjoe: has joined #RubyOnRails
[04:54:45] elton: has joined #RubyOnRails
[04:56:29] pramodas23: has joined #RubyOnRails
[04:56:54] kies: has joined #RubyOnRails
[04:57:08] berserk_ren: has joined #RubyOnRails
[04:58:00] pyemkey: has joined #RubyOnRails
[04:58:09] nyaa: has joined #RubyOnRails
[05:00:25] diegoviola: quazimodo: cool, I think I saw some scripts that do that with PS1, etc.
[05:01:28] iateadonut: has joined #RubyOnRails
[05:05:38] nyaa: has joined #RubyOnRails
[05:09:30] hxegon: how do you remove a linebreak from erb block output?
[05:13:57] Radar: hxegon: -%>
[05:20:21] ascarter: has joined #RubyOnRails
[05:20:26] yogeshrt: has joined #RubyOnRails
[05:21:58] doublemalt_: has joined #RubyOnRails
[05:26:07] _3by8: has joined #RubyOnRails
[05:27:40] _3by8: I'm trying to create form elements that will be sent to the controller as a single array so that I can iterate through them instead of all of the params.
[05:27:47] _3by8: Possible?
[05:30:19] _3by8: Ah, wait, think I've got it... "cartridge_id[#{c.id}]"
[05:33:53] tildes: has joined #RubyOnRails
[05:34:50] Cache_Money: sevenseacat: the slim formatting was throwing me off at first but I think I'm on the right track. I need to hop off now but I should be able to figure it out tomrrow. Thanks for sharing that resouce.
[05:38:48] stannard: has joined #RubyOnRails
[05:39:48] berserk_ren: has joined #RubyOnRails
[05:40:43] annlewis: has joined #RubyOnRails
[05:46:32] _Tariq: has joined #RubyOnRails
[05:46:38] _Tariq: has left #RubyOnRails: ()
[05:46:57] tariqc: has joined #RubyOnRails
[05:49:58] Maletor: has joined #RubyOnRails
[05:51:30] shinenelson: has joined #RubyOnRails
[05:52:10] blackmesa: has joined #RubyOnRails
[05:54:07] Trynemjoel: has joined #RubyOnRails
[05:57:56] jetpackjoe: has joined #RubyOnRails
[05:58:45] CarlosYoo: has joined #RubyOnRails
[06:00:53] christiandsg: has joined #RubyOnRails
[06:04:02] collink: has joined #RubyOnRails
[06:05:17] jacksparrow007: has joined #RubyOnRails
[06:06:29] WizJin: has joined #RubyOnRails
[06:07:20] krzkrzkrz: has joined #RubyOnRails
[06:08:19] djbkd: has joined #RubyOnRails
[06:09:03] quazimodo: can't decide, tea, coffee or pseudoephedrine
[06:09:55] CarlosYoo: has joined #RubyOnRails
[06:10:57] christiandsg: has joined #RubyOnRails
[06:10:58] lxsameer: has joined #RubyOnRails
[06:10:58] lxsameer: has joined #RubyOnRails
[06:15:55] dionysus69: has joined #RubyOnRails
[06:18:48] bronson: has joined #RubyOnRails
[06:19:01] Megamos: has joined #RubyOnRails
[06:22:02] BoogyWookie: has joined #RubyOnRails
[06:23:11] CarlosYoo: has joined #RubyOnRails
[06:26:07] makenoise: has joined #RubyOnRails
[06:28:23] jessemcgilallen: has joined #RubyOnRails
[06:29:10] cac: has joined #RubyOnRails
[06:30:00] DavidDudson: has joined #RubyOnRails
[06:31:27] makenoise: has joined #RubyOnRails
[06:32:44] Bryan: has joined #RubyOnRails
[06:34:15] annlewis: has joined #RubyOnRails
[06:34:49] toy: has joined #RubyOnRails
[06:36:20] toy: hello am using pundit for my rails project .. i have multiple devise models in rails ..please help is it possible to maintain multiple devise models with pundit ?
[06:36:25] khodafez: has joined #RubyOnRails
[06:36:34] greenride: has joined #RubyOnRails
[06:37:14] tariqc: has joined #RubyOnRails
[06:37:16] greenride: has left #RubyOnRails: ()
[06:39:04] makenoise: has joined #RubyOnRails
[06:39:08] jetpackjoe: has joined #RubyOnRails
[06:39:34] jbrhbr: has joined #RubyOnRails
[06:40:57] trautwein: has joined #RubyOnRails
[06:43:36] CarlosYoo: has joined #RubyOnRails
[06:44:10] Mia: has joined #RubyOnRails
[06:44:10] Mia: has joined #RubyOnRails
[06:45:48] kegan_: has joined #RubyOnRails
[06:48:12] Megamos: has joined #RubyOnRails
[06:48:28] shibabu: has joined #RubyOnRails
[06:50:07] nyaa: has joined #RubyOnRails
[06:50:49] Maletor: has joined #RubyOnRails
[06:51:08] rgrmatt: has joined #RubyOnRails
[06:51:25] cornerma1: has joined #RubyOnRails
[06:53:26] Oliphaunte: has joined #RubyOnRails
[06:54:24] hackmathics: has joined #RubyOnRails
[06:54:45] nbdy: has joined #RubyOnRails
[06:55:11] blackmesa: has joined #RubyOnRails
[06:55:39] christiandsg: has joined #RubyOnRails
[06:56:09] krzkrzkrz: has joined #RubyOnRails
[06:56:43] tagrudev: has joined #RubyOnRails
[06:57:04] nyaa: has joined #RubyOnRails
[06:57:11] pyemkey: has joined #RubyOnRails
[06:57:18] owenjones: has joined #RubyOnRails
[06:59:11] greenride: has joined #RubyOnRails
[07:00:14] johnflux: has joined #RubyOnRails
[07:00:15] johnflux: has joined #RubyOnRails
[07:01:48] khodafez: has left #RubyOnRails: ()
[07:04:53] Wizek: has joined #RubyOnRails
[07:05:46] Cervajz: has joined #RubyOnRails
[07:06:47] solars: has joined #RubyOnRails
[07:08:47] tetraktys: has joined #RubyOnRails
[07:10:14] Megamos: has joined #RubyOnRails
[07:10:17] Cervajz_: has joined #RubyOnRails
[07:13:21] Cervajz: has joined #RubyOnRails
[07:13:22] Pazician: has joined #RubyOnRails
[07:13:22] Pazician: has joined #RubyOnRails
[07:17:17] Pazician: has joined #RubyOnRails
[07:17:48] Pazician: has joined #RubyOnRails
[07:19:05] christiandsg: has joined #RubyOnRails
[07:19:13] jessemcgilallen: has joined #RubyOnRails
[07:21:57] elton: has joined #RubyOnRails
[07:22:26] CarlosYoo: has joined #RubyOnRails
[07:23:59] WizJin: has joined #RubyOnRails
[07:28:15] Megamos: has joined #RubyOnRails
[07:28:56] Sawbones: has joined #RubyOnRails
[07:29:28] sebbarg: has joined #RubyOnRails
[07:30:27] comrad: has joined #RubyOnRails
[07:30:46] jetpackjoe: has joined #RubyOnRails
[07:34:33] yardenbar: has joined #RubyOnRails
[07:34:49] comrad: has joined #RubyOnRails
[07:36:32] sebbarg: has joined #RubyOnRails
[07:37:17] Fridtjof: has joined #RubyOnRails
[07:39:55] annlewis: has joined #RubyOnRails
[07:40:10] raunicolae: has joined #RubyOnRails
[07:40:57] raunicolae: has left #RubyOnRails: ()
[07:45:07] darutoko: has joined #RubyOnRails
[07:45:35] quazimodo: toy: of course
[07:45:50] quazimodo: you define policies based on the resource, and the action you want to take on that resource
[07:46:02] quazimodo: what part are you having difficulties with?
[07:47:30] jbrhbr: has joined #RubyOnRails
[07:47:39] ur5us: has joined #RubyOnRails
[07:48:17] Oliphaunte: has joined #RubyOnRails
[07:48:19] defsdoor: has joined #RubyOnRails
[07:48:33] Sawbones: has joined #RubyOnRails
[07:49:32] zpe: has joined #RubyOnRails
[07:51:41] Maletor: has joined #RubyOnRails
[07:53:20] sandstrom: has joined #RubyOnRails
[07:55:01] Macaveli: has joined #RubyOnRails
[07:58:12] blackmesa: has joined #RubyOnRails
[07:59:47] yfeldblum: has joined #RubyOnRails
[08:01:29] krzkrzkrz: has joined #RubyOnRails
[08:02:09] Bloomer: has joined #RubyOnRails
[08:02:48] Megamos: has joined #RubyOnRails
[08:03:35] jetpackjoe: has joined #RubyOnRails
[08:06:10] jacksparrow007: has joined #RubyOnRails
[08:07:43] lmdrx: has joined #RubyOnRails
[08:12:07] srinidhi: has joined #RubyOnRails
[08:12:14] maloik: has joined #RubyOnRails
[08:12:34] aganov: has joined #RubyOnRails
[08:14:36] jas02: has joined #RubyOnRails
[08:16:23] nyaa: has joined #RubyOnRails
[08:17:02] arBmind: has joined #RubyOnRails
[08:17:17] greenride: has left #RubyOnRails: ()
[08:17:47] artto: has joined #RubyOnRails
[08:17:50] blackhuey: has joined #RubyOnRails
[08:18:13] sandstrom: has joined #RubyOnRails
[08:21:35] snowy: has joined #RubyOnRails
[08:22:23] artto: has joined #RubyOnRails
[08:22:54] dhjondoh: has joined #RubyOnRails
[08:23:07] bronson: has joined #RubyOnRails
[08:23:47] Sawbones: has joined #RubyOnRails
[08:24:18] nyaa: has joined #RubyOnRails
[08:25:03] peterppp: has joined #RubyOnRails
[08:27:49] mikecmpbll: has joined #RubyOnRails
[08:28:00] dhjondoh: has joined #RubyOnRails
[08:28:37] adac: has joined #RubyOnRails
[08:29:46] quazimodo: has joined #RubyOnRails
[08:37:50] nettoweb: has joined #RubyOnRails
[08:39:01] marr: has joined #RubyOnRails
[08:39:33] brunto: has joined #RubyOnRails
[08:41:10] Symbiosisz: has joined #RubyOnRails
[08:41:52] arBmind: has joined #RubyOnRails
[08:42:21] afroboy: has joined #RubyOnRails
[08:43:58] dhjondoh: has joined #RubyOnRails
[08:44:16] Macaveli: has joined #RubyOnRails
[08:48:45] nettoweb: has joined #RubyOnRails
[08:48:47] jetpackjoe: has joined #RubyOnRails
[08:49:28] mikecmpbll: has joined #RubyOnRails
[08:49:47] Oliphaunte: has joined #RubyOnRails
[08:50:36] blackmesa: has joined #RubyOnRails
[08:52:01] shibabu: has joined #RubyOnRails
[08:52:19] Maletor: has joined #RubyOnRails
[08:53:29] singedEUNE: has joined #RubyOnRails
[08:53:30] singedEUNE: has joined #RubyOnRails
[08:53:56] krzkrzkrz: has joined #RubyOnRails
[08:54:44] quazimodo: has joined #RubyOnRails
[08:55:00] singedEUNE: hi, did some of you had a problem with CanCanCan not working with namespaced resources? It treats model Article and Admin::Article all the same ..
[08:55:32] Rumbles: has joined #RubyOnRails
[08:55:48] edwinvdgraaf: has joined #RubyOnRails
[08:56:19] jsrn_: has joined #RubyOnRails
[08:56:34] krzkrzkrz: has joined #RubyOnRails
[08:57:11] Radar: singedEUNE: yes. Then I used Pundit and all my worries just... went away
[08:57:20] arBmind: has joined #RubyOnRails
[08:58:09] mark4: has joined #RubyOnRails
[08:59:07] singedEUNE: Radar, tnx. did it require a lot of code refactoring to switch?
[08:59:08] tvw: has joined #RubyOnRails
[09:01:12] VaibhavRajput: has joined #RubyOnRails
[09:02:41] mikecmpbll: has joined #RubyOnRails
[09:02:54] MEATCHICKEN: has joined #RubyOnRails
[09:03:06] jgt1: has joined #RubyOnRails
[09:03:17] Bloomer: has joined #RubyOnRails
[09:03:42] singedEUNE: has joined #RubyOnRails
[09:04:45] feignt_: has joined #RubyOnRails
[09:04:58] artto: has joined #RubyOnRails
[09:05:13] VaibhavRajput: I am getting ArgumentError (argument out of range): on ActiveRecord time field. I have time which is greater than 24:00:00. I can't change this. I have tried this http://stackoverflow.com/questions/9131697/rails-active-record-argumenterror-argument-out-of-range-for-time-fields-g. I have overridden ActiveSupport::TimeZone.parse method in config/initializers/name.rb but this didn't work. Can you please help me to make it work?
[09:05:13] VaibhavRajput: I am using ruby 2.0.0 and rails 4.0.0
[09:05:36] Macaveli: has joined #RubyOnRails
[09:06:20] lacrosse: has joined #RubyOnRails
[09:14:53] MEATCHICKEN: has left #RubyOnRails: ()
[09:15:02] MEATCHICKEN: has joined #RubyOnRails
[09:15:09] MEATCHICKEN: VaibhavRajput
[09:15:23] MEATCHICKEN: Looks like you're doing something unconventional
[09:15:29] MEATCHICKEN: Why not just store your time as a string
[09:15:32] MEATCHICKEN: and convert back
[09:15:50] MEATCHICKEN: Time.now.to_s -> Time.parse(string)
[09:16:10] kitsuneyo: has joined #RubyOnRails
[09:16:21] VaibhavRajput: yes it is unconventional, unfortunatly I don't permission to change the db schema.
[09:16:43] VaibhavRajput: Is it possible to add some monkey patch?
[09:16:54] MEATCHICKEN: you're going to have to research rails code
[09:16:57] MEATCHICKEN: not going to be fun!
[09:17:12] MEATCHICKEN: tell whoever is in charge that it needs to be done since you cannot change the db schema
[09:17:37] dhjondoh: has joined #RubyOnRails
[09:17:37] zpe: has joined #RubyOnRails
[09:18:11] VaibhavRajput: my method overriding is not working? Do you have any idea.
[09:18:37] Cervajz: has joined #RubyOnRails
[09:18:53] blackmesa: has joined #RubyOnRails
[09:19:29] VaibhavRajput: https://gist.github.com/rajputvai/9889b96e1e939c10c476
[09:19:44] alphaatom: has joined #RubyOnRails
[09:25:13] bronson: has joined #RubyOnRails
[09:27:04] VaibhavRajput: meatchicken, ?
[09:27:46] Macaveli: has joined #RubyOnRails
[09:30:46] futilegames: has joined #RubyOnRails
[09:35:47] FooMunki: has joined #RubyOnRails
[09:38:15] renegadeandy: has joined #RubyOnRails
[09:41:46] annlewis: has joined #RubyOnRails
[09:41:52] quazimodo: has joined #RubyOnRails
[09:47:41] VaibhavRajput: has joined #RubyOnRails
[09:47:59] afroboy: has joined #RubyOnRails
[09:48:03] ivanyk: has joined #RubyOnRails
[09:48:11] Grundell: has joined #RubyOnRails
[09:49:54] toy: yeah thanx quazimodo i defined the method in the application controller
[09:49:55] pulgalip1: has joined #RubyOnRails
[09:50:01] toy: def pundit_user
[09:50:30] toy: how define polices for the controller inside the namespace
[09:52:35] adre: has joined #RubyOnRails
[09:53:08] Maletor: has joined #RubyOnRails
[09:55:40] kitsuneyo: has joined #RubyOnRails
[09:58:05] dionysus69: has joined #RubyOnRails
[09:59:03] waka: has joined #RubyOnRails
[09:59:14] kfrz: has joined #RubyOnRails
[10:00:45] fox_mulder_cp: relearn official blog guide for up experience, git'tizing it, after end of official manual add twitter botstrap interface and publish it on github, hehe
[10:01:16] cac: has joined #RubyOnRails
[10:01:43] fox_mulder_cp: may be add facebook/twitter/ms/google auth for coomments, or add discuss...
[10:01:51] norc: has joined #RubyOnRails
[10:01:55] norc: has joined #RubyOnRails
[10:01:55] norc: has joined #RubyOnRails
[10:02:04] armyriad: has joined #RubyOnRails
[10:03:15] dhjondoh: has joined #RubyOnRails
[10:03:34] rodfersou: has joined #RubyOnRails
[10:03:35] sevenseacat: has joined #RubyOnRails
[10:07:04] jacksparrow007: has joined #RubyOnRails
[10:07:12] Tempesta: has joined #RubyOnRails
[10:09:00] baweaver: has joined #RubyOnRails
[10:09:44] dhjondoh: has joined #RubyOnRails
[10:11:22] zpe: has joined #RubyOnRails
[10:13:58] CarlosYoo: has joined #RubyOnRails
[10:14:13] srinidhi: has joined #RubyOnRails
[10:16:58] dhjondoh: has joined #RubyOnRails
[10:17:38] skullcrasher: I have an activeResource with self.site and another model that inherits from this resource.
[10:17:55] skullcrasher: is the attribute self.site not inherited for other models?
[10:19:26] notnoyyyyy: has joined #RubyOnRails
[10:19:48] nickenchuggets: has joined #RubyOnRails
[10:19:48] nickenchuggets: has joined #RubyOnRails
[10:23:31] AntiSpamMeta: has joined #RubyOnRails
[10:24:26] cac: has joined #RubyOnRails
[10:24:26] user1138: has joined #RubyOnRails
[10:25:40] user1138: has joined #RubyOnRails
[10:26:20] _3by8: has joined #RubyOnRails
[10:27:35] zpe: has joined #RubyOnRails
[10:27:46] AntiSpamMeta: has joined #RubyOnRails
[10:27:50] _3by8: I have some params (https://gist.github.com/threebyeight/825679452bac47a1da50) I'm sending to a controller (https://gist.github.com/threebyeight/3477894163c0330a5ade) and I'm getting the error "undefined method `+' for nil:NilClass" appearing on line #24.
[10:28:24] sevenseacat: _3by8: so what's cartridge_hash[cartridge_id.to_i] ?
[10:29:07] DarkBushido: has joined #RubyOnRails
[10:29:12] sevenseacat: _3by8: this https://gist.github.com/threebyeight/3477894163c0330a5ade#file-orders_controller-rb-L18 should probably `Hash.new(0)` to default values to 0, not nil
[10:29:14] epochwolf: has joined #RubyOnRails
[10:30:05] AntiSpamMeta: has joined #RubyOnRails
[10:30:26] _3by8: On the new order page, you're presented a list of all of the toner cartridges you can order, based on the printers that you own and in some cases, some printers may share a toner cartridge so multiple order items with the same cartridge id are being created. I wanted to create a single hash with the values of the quantities of all toner cartridges to avoid that.
[10:30:41] sevenseacat: thats not at all what i asled
[10:30:55] _3by8: Sorry, let me reread your question...
[10:31:56] _3by8: It's supposed to point towards an integery quantity.
[10:32:40] VaibhavRajput: sevenseacat, Can you please help me.
[10:32:57] sevenseacat: VaibhavRajput: I haven't seen you ask a question
[10:33:09] _3by8: sevenseacat: after changing Hash.new to what you suggested, it's telling me this now: String can't be coerced into Fixnum. Again on line 24.
[10:33:14] VaibhavRajput: I asked you might have missed.
[10:33:21] VaibhavRajput: I am getting ArgumentError (argument out of range): on ActiveRecord time field. I have time which is greater than 24:00:00. I can't change this. I have tried this http://stackoverflow.com/questions/9131697/rails-active-record-argumenterror-argument-out-of-range-for-time-fields-g. I have overridden ActiveSupport::TimeZone.parse method in config/initializers/name.rb but this didn't work. Can you please help me to make it work?
[10:33:22] VaibhavRajput: I am using ruby 2.0.0 and rails 4.0.0
[10:33:28] sevenseacat: _3by8: because your params are strings.
[10:34:25] IceBear: has joined #RubyOnRails
[10:34:33] atomical: has joined #RubyOnRails
[10:36:41] _3by8: sevenseacat: perfect, thank you.
[10:37:09] AntiSpamMeta: has joined #RubyOnRails
[10:37:38] _3by8: sevenseacat: off the top of your head can you think of an easier way to do what I was trying to do with the cartridge_hash there? Or is that acceptable?
[10:37:44] Grag_Harker: has joined #RubyOnRails
[10:37:46] cschneid: has joined #RubyOnRails
[10:37:54] sevenseacat: I didnt read what you were trying to do, it was a wall of text i wasnt interested in
[10:40:17] artto: has joined #RubyOnRails
[10:41:16] AntiSpamMeta: has joined #RubyOnRails
[10:41:59] crdpink2: has joined #RubyOnRails
[10:42:04] dideler: has joined #RubyOnRails
[10:42:15] annlewis: has joined #RubyOnRails
[10:43:09] jkwood: has joined #RubyOnRails
[10:43:15] epochwolf: has joined #RubyOnRails
[10:43:52] nfk|laptop: has joined #RubyOnRails
[10:44:08] toy: How can i avoid multiple ifs in this code and write it more efficient way https://gist.github.com/jogiranjith/7565ef325963d84ff746
[10:44:36] Oliphaunte: has joined #RubyOnRails
[10:45:30] AntiSpamMeta: has joined #RubyOnRails
[10:45:48] Ikri: has joined #RubyOnRails
[10:47:34] dhjondoh: has joined #RubyOnRails
[10:49:03] nocontrol: has joined #RubyOnRails
[10:49:21] ldnunes: has joined #RubyOnRails
[10:50:20] atomical: has joined #RubyOnRails
[10:53:56] Maletor: has joined #RubyOnRails
[10:54:12] stamina: has joined #RubyOnRails
[10:54:40] DarkBushido: has joined #RubyOnRails
[10:55:34] shibabu: has joined #RubyOnRails
[10:56:17] alphaatom: has joined #RubyOnRails
[10:57:02] AntiSpamMeta: has joined #RubyOnRails
[10:57:38] _3by8: toy: I wish I could help you but I don't think there's a more efficient way to write that code.
[10:58:13] toy: okie thanks _3by8
[10:59:29] artto: has joined #RubyOnRails
[11:02:16] Detch: has joined #RubyOnRails
[11:03:50] yfeldblum: has joined #RubyOnRails
[11:04:40] DarkBushido: has joined #RubyOnRails
[11:05:18] dhjondoh: has joined #RubyOnRails
[11:06:40] adre: has joined #RubyOnRails
[11:08:44] CarlosYoo: has joined #RubyOnRails
[11:11:18] WhereIsMySpoon_: has joined #RubyOnRails
[11:13:06] atomical: has joined #RubyOnRails
[11:17:02] TheMonster: Hi, is it possible to get raw SQL queries needed to create the database tables somehow from the schema.rb file? I want to get a query that I can write in phpMyAdmin to form the same database that will be formed when I do rake db:schema:load
[11:19:48] svoop: has joined #RubyOnRails
[11:23:49] nickenchuggets: has joined #RubyOnRails
[11:23:49] nickenchuggets: has joined #RubyOnRails
[11:23:54] fox_mulder_cp: TheMonster: use mysqldump for dumping db:schema
[11:24:13] bronson: has joined #RubyOnRails
[11:25:38] kitsuneyo: has joined #RubyOnRails
[11:26:58] arup_r: has joined #RubyOnRails
[11:27:06] AntiSpamMeta: has joined #RubyOnRails
[11:27:41] jas02: has joined #RubyOnRails
[11:29:20] drbayer: has joined #RubyOnRails
[11:30:18] LateralOctober: has joined #RubyOnRails
[11:33:05] arup_r: codeclimate giving error for the months method https://gist.github.com/aruprakshit/daa8b0e05a430685138a error as Assignment Branch Condition size for months is too high. [23.28/20]. How to refactor this ? little hints pease
[11:33:59] stannard: has joined #RubyOnRails
[11:35:37] Peg-leg: has joined #RubyOnRails
[11:35:52] Grundell: has joined #RubyOnRails
[11:36:34] maesitos: has joined #RubyOnRails
[11:36:43] norc: Hi. Capistrano is failing to update my bundle somehow and I cannot figure out why: https://gist.github.com/anonymous/e70aa5b83c4aa470aec2
[11:37:04] norc: The updated Gemfile and Gemfile.lock are checked in at master on my git respository.
[11:39:32] norc: Or is that error message normal?
[11:39:41] TheMonster: fox_mulder_cp: Thanks a lot
[11:41:21] johnflux: has joined #RubyOnRails
[11:41:22] johnflux: has joined #RubyOnRails
[11:41:25] dhjondoh: has joined #RubyOnRails
[11:41:50] teclator: has joined #RubyOnRails
[11:42:28] blackmesa: has joined #RubyOnRails
[11:43:13] annlewis: has joined #RubyOnRails
[11:43:36] it_tard: has joined #RubyOnRails
[11:44:12] SanguineAnomaly: has joined #RubyOnRails
[11:47:39] ebryn: has joined #RubyOnRails
[11:49:39] norc: My problem now is this: I added the "responders" gem to my Gemfile and used some of the code. I ran a bundle installed, and used git-add, git-commit, git-push to push the changes to my repo
[11:50:10] norc: Locally everything works, but on my target I get uninitialized constant Responders::HtmlCacheResponder (NameError) errors.
[11:50:20] norc: Target bundle lists the gem as installed properly.
[11:50:48] norc: https://gist.github.com/anonymous/ecf6f4953c84916a42ba
[11:51:44] dkam: has joined #RubyOnRails
[11:52:25] SalexW: has joined #RubyOnRails
[11:52:31] dhjondoh: has joined #RubyOnRails
[11:53:29] robert45: has joined #RubyOnRails
[11:54:19] puria: has joined #RubyOnRails
[11:54:42] Maletor: has joined #RubyOnRails
[11:54:58] davonrails: has joined #RubyOnRails
[11:55:27] mhenry: has joined #RubyOnRails
[11:56:28] FooMunki: has joined #RubyOnRails
[11:56:40] hackmathics: has joined #RubyOnRails
[11:58:01] tetraktys: has joined #RubyOnRails
[11:58:20] dhjondoh: has joined #RubyOnRails
[12:01:07] feignt: has joined #RubyOnRails
[12:02:49] hackmathics: has joined #RubyOnRails
[12:04:01] edwinvdgraaf: has joined #RubyOnRails
[12:04:39] adac: has joined #RubyOnRails
[12:06:28] nyaa: has joined #RubyOnRails
[12:07:55] jacksparrow007: has joined #RubyOnRails
[12:10:21] Ropeney: has joined #RubyOnRails
[12:10:22] baweaver: has joined #RubyOnRails
[12:10:28] DoubleMalt: has joined #RubyOnRails
[12:14:28] cac: has joined #RubyOnRails
[12:14:58] alphaatom: has joined #RubyOnRails
[12:16:09] norc: https://gist.github.com/anonymous/0c039ecaab51f958d9cb -- What could be the reason Rails is still trying to load coffee script?
[12:16:18] norc: I have no .coffee assets left.
[12:17:55] ruid: has joined #RubyOnRails
[12:17:56] ruid: has joined #RubyOnRails
[12:18:02] sandstrom: has joined #RubyOnRails
[12:19:45] dhjondoh: has joined #RubyOnRails
[12:20:05] FailBit: it's in your gemfile?
[12:20:58] cac: has joined #RubyOnRails
[12:21:26] norc: FailBit: Nope. I removed it - that is why Im getting the problem for no apparent reason.
[12:22:00] norc: I also removed turbolinks, which is the only gem on my harddrive that brings coffee assets.
[12:22:51] norc: Oh well. rake assets:clobber did the trick.
[12:24:32] danneu: has joined #RubyOnRails
[12:27:02] pulgalipe: has joined #RubyOnRails
[12:28:11] puria: has joined #RubyOnRails
[12:31:16] jgt1: has joined #RubyOnRails
[12:32:39] krzkrzkrz: has joined #RubyOnRails
[12:33:55] sadaf2606: has joined #RubyOnRails
[12:34:29] toy: has joined #RubyOnRails
[12:38:49] kitsuneyo: has joined #RubyOnRails
[12:39:27] brunoalano: has joined #RubyOnRails
[12:39:34] Oliphaunte: has joined #RubyOnRails
[12:40:10] brunoalano: Someone knows a good gem for async event handling? (like a pub-sub service)
[12:41:03] alphaatom: has joined #RubyOnRails
[12:41:21] norc: brunoalano: redis?
[12:41:49] brunoalano: Or a good way to do a Trigger Observer (like, when User model complains some criteria, send a email to him or something else)
[12:43:57] annlewis: has joined #RubyOnRails
[12:44:35] blackmesa: has joined #RubyOnRails
[12:46:08] norc: brunoalano: resque maybe, or sidekiq
[12:46:58] kitsuneyo: has joined #RubyOnRails
[12:47:01] norc: Is there a reason you want this to happen async though?
[12:47:19] toy_: has joined #RubyOnRails
[12:51:38] puria: has joined #RubyOnRails
[12:55:29] Maletor: has joined #RubyOnRails
[12:55:47] brunoalano: has joined #RubyOnRails
[12:56:04] zpe: has joined #RubyOnRails
[12:57:15] adre: has joined #RubyOnRails
[12:57:34] rgrmatt: has joined #RubyOnRails
[12:58:11] shibabu: has joined #RubyOnRails
[12:58:41] dkam: has joined #RubyOnRails
[13:01:44] ewnd9_: has joined #RubyOnRails
[13:02:32] diegoviola: has joined #RubyOnRails
[13:02:35] kitsuneyo: has joined #RubyOnRails
[13:02:53] sandstrom: has joined #RubyOnRails
[13:03:07] speaking1ode: has joined #RubyOnRails
[13:08:17] pulgalipe: has joined #RubyOnRails
[13:09:45] Grag_Harker: has joined #RubyOnRails
[13:09:45] GragHarker: has joined #RubyOnRails
[13:13:29] FailBit: does dalli use a connection pool by default?
[13:14:52] bratsche: has joined #RubyOnRails
[13:17:15] diegoviola: I have a tracking field in my database that I store as a datetime, because it's a datetime, however, my client is arguing with me that I should store it as numbers, which is silly
[13:17:35] diegoviola: can I just call that field with #to_i to get the representation in numbers?
[13:17:40] diegoviola: and still use datetime
[13:18:18] diegoviola: or is there another way to get the datetime as numbers, without me having to store it as bignum or something
[13:20:32] FailBit: you should bombard your client with links to SO threads that show how people that use unix stamps instead of datetime are asking for trouble
[13:23:01] dkam: has joined #RubyOnRails
[13:24:45] d0nn1e: has joined #RubyOnRails
[13:25:46] Macaveli: has joined #RubyOnRails
[13:26:47] bronson: has joined #RubyOnRails
[13:26:52] diegoviola: there's probably a reason why he wants that?
[13:27:47] Rumbles: has joined #RubyOnRails
[13:28:43] mikecmpbll: has joined #RubyOnRails
[13:32:31] matthewd: diegoviola: The best way of learning the reason is probably to ask
[13:32:32] shanemcd: has joined #RubyOnRails
[13:33:16] defsdoor: diegoviola, date/times are stored as numbers in the database
[13:34:07] defsdoor: everything is numbers
[13:34:11] diegoviola: ok but is there a way for me to get the numbers as in 20151127082853 rather than in the datetime format?
[13:34:36] lacrymology: has joined #RubyOnRails
[13:34:55] defsdoor: thats just a different presentation format
[13:35:00] defsdoor: not stored format
[13:35:28] kitsuneyo: has joined #RubyOnRails
[13:36:07] diegoviola: I'm talking about presentation format, it doesn't look like it's a good idea to store in bignum
[13:36:27] mikecmpbll: not strictly rails question but any of you bright sparks able to shed any light on why this select2 dropdown inside a bootstrap popover isn't working? http://jsfiddle.net/mikecmpbll/u72ffs0u/
[13:36:38] dhjondoh: has joined #RubyOnRails
[13:36:50] mikecmpbll: (click the button)
[13:37:39] jkamenik: has joined #RubyOnRails
[13:37:55] matthewd: diegoviola: That would be a string, not a bignum... it's full of digits, but it's not an integer any more than a phone number is
[13:38:31] diegoviola: ugh no, I'm not storing numbers as string
[13:39:51] bbrowning: has joined #RubyOnRails
[13:40:02] nhhagen: has joined #RubyOnRails
[13:40:58] jsrn_: has joined #RubyOnRails
[13:41:22] diegoviola: in order to manipulate these numbers I'll have to #to_i, etc. not fun
[13:41:34] defsdoor: really not sure why you are even talking about this
[13:41:37] defsdoor: dates are dates
[13:41:45] defsdoor: store them as the native database type
[13:41:47] mikecmpbll: lol. was wondering the same myself.
[13:41:54] defsdoor: else everything else is paiful
[13:42:08] diegoviola: defsdoor: my client has been asking me to store it as numbers
[13:42:15] diegoviola: and it's annoying
[13:42:18] defsdoor: time to get a new client
[13:42:20] brendan-: has joined #RubyOnRails
[13:42:59] defsdoor: tell him the database supports dates and times natively and is optimised to allow them to be queried using date expressions
[13:43:19] defsdoor: using any other format does not make sense
[13:44:01] diegoviola: he will probably still argue with me
[13:44:04] diegoviola: I already told him that
[13:44:41] annlewis: has joined #RubyOnRails
[13:44:59] defsdoor: tell him he is the client and obviously right but changing to his suggested method will increase time and costs accordingly
[13:45:28] mikecmpbll: and say 'obviously' in a really sarcastic way
[13:46:00] blackmesa: has joined #RubyOnRails
[13:46:01] matthewd: diegoviola: You can't argue until you understand *why* your client wants you to do that
[13:47:02] defsdoor: mikecmpbll, my guess is that the popover is eating the events somehow
[13:47:12] mikecmpbll: defsdoor: :[
[13:47:26] mikecmpbll: yeah, seems something like that
[13:47:41] defsdoor: keyboard controls dont open it either
[13:48:00] diegoviola: matthewd: he's just saying the tracking should be numbers as they will be used as order key or something like that
[13:49:10] matthewd: That sounds like a separate field to me
[13:49:24] matthewd: (which might happen to be populated by a formatted date value)
[13:49:35] diegoviola: I don't know what he means by that, I suppose it's numbers to keep track of their correspondences
[13:49:58] adavia: has joined #RubyOnRails
[13:50:58] diegoviola: matthewd: well, we already have the tracking field for that which is datetime atm
[13:51:03] lacrymology: what's a good exception to throw if a parameter is not of the expected type?
[13:51:13] lacrymology: in a controller, of course
[13:51:42] defsdoor: diegoviola, so build your order key from that format of the date/time
[13:52:28] cac: has joined #RubyOnRails
[13:53:02] diegoviola: defsdoor: you mean the presentation, with #strftime or similar?
[13:53:20] diegoviola: datetime => numbers
[13:53:28] qejk: has joined #RubyOnRails
[13:53:41] defsdoor: diegoviola, I mean when you set the order key for a whatever build it from the datetime
[13:53:51] defsdoor: the two are not the same thing
[13:53:57] defsdoor: they just look similar
[13:54:05] hardtail: has joined #RubyOnRails
[13:54:16] tetraktys: has joined #RubyOnRails
[13:54:19] matthewd: diegoviola: It sounds like you need more understanding of the problem you're trying to solve
[13:54:35] Scient: how much are you paying people in this channel diegoviola?
[13:54:45] Scient: because it sure looks like people are doing your work for you :)
[13:55:28] matthewd: mikecmpbll: The `.html()` implies popover is showing a (raw HTML) copy of the popover-content, not the original one (which select2 has added its events to)
[13:56:06] matthewd: mikecmpbll: So you want to find some JS event that popover will call after it shows the thing, and select2-erize *that* one instead
[13:56:13] Maletor: has joined #RubyOnRails
[13:56:32] dkam: has joined #RubyOnRails
[13:57:09] mikecmpbll: matthewd: that makes sense, i'll check that out, thank!
[13:57:57] twilling: has joined #RubyOnRails
[13:57:59] dionysus69: has joined #RubyOnRails
[13:59:05] brunoalano: What's a good way to create a Campaign Builder like MailChimp or Mixpanel, where you choose your target users based on some criterias?
[14:00:09] goodcodeguy: has joined #RubyOnRails
[14:01:07] johnflux_: has joined #RubyOnRails
[14:01:08] johnflux_: has joined #RubyOnRails
[14:02:49] diegoviola: Scient: don't really want anyone to do my work for me, thanks
[14:03:04] mikecmpbll: matthewd: i think there's more to it than that, because even reapplying the select2 code after i've clicked the popover button, it doesn't work
[14:04:32] mag42c: has joined #RubyOnRails
[14:05:01] matthewd: mikecmpbll: You need to only apply it to the final popover.. it can't have already happened to the hidden content
[14:05:23] matthewd: mikecmpbll: `setTimeout(function() { $('select').select2(); }, 2000);` just worked for me
[14:05:52] worknick: has joined #RubyOnRails
[14:05:57] alphaatom: has joined #RubyOnRails
[14:06:16] mikecmpbll: that's queer. why does that work then?
[14:06:58] worknick: I am getting error undefined method `merge' for 1:Fixnum for <%= pac.check_box :user_id, current_user.id %>
[14:07:14] matthewd: mikecmpbll: Once you do the first select2 call, it mangles the HTML... the events aren't hooked up in the later copy, but nor is it the pristine <select> that you need
[14:07:45] mikecmpbll: matthewd: ah, okay. well this is going to be a pain :d
[14:08:45] jacksparrow007: has joined #RubyOnRails
[14:09:35] matthewd: worknick: Are you calling check_box while looking at the documentation for check_box_tag?
[14:10:15] worknick: matthewd: i did not searched for check box tag.
[14:10:27] kp666: has joined #RubyOnRails
[14:11:21] norc: I have a LoopPathway that consists of several Sections. Is it sensible to name the model LoopPathwaySection?
[14:12:02] defsdoor: norc, which model ?
[14:12:06] defsdoor: the section ?
[14:12:18] defsdoor: I'd call it a section
[14:12:32] defsdoor: unless you have name clashes elsewhere
[14:13:06] norc: If Rails autoloading wasn't so crazy, I would just nest it inside LoopPathway =/
[14:13:14] norc: i.e. LoopPathway::Section
[14:13:52] defsdoor: no sure you should represent your database hierarchy in your model class names
[14:14:13] defsdoor: that relationship is defined in the model with associations
[14:14:24] norc: defsdoor: I'm mapping an existing database with new views, so I have the luxury of designing my own naming scheme.
[14:14:24] ramortegui: has joined #RubyOnRails
[14:14:41] norc: Oh that you mean
[14:15:17] defsdoor: if you have parent and child you dont name you child ParentChild do you ?
[14:15:23] matthewd: norc: I'd call it either LoopSection or LoopPathwaySection, I think
[14:15:54] godzillaenlacasa: has joined #RubyOnRails
[14:16:06] matthewd: .. just because "section" feels very generic to me. But that depends how many models you have in total... if it's not many, then it might be fine on its own.
[14:16:21] sankaber: has joined #RubyOnRails
[14:16:23] many: has joined #RubyOnRails
[14:17:06] matthewd: worknick: I'm not sure what you mean. But your call doesn't match the parameters #check_box expects.
[14:17:32] norc: matthewd: That is a reasonable argumentation. Not sure about LoopSection - I mean I have LoopConnections (which are actually wired loops) and LoopPathways (which represent possible ways of connecting a loop from A to B). Each *pathway* consists of several sections.
[14:17:58] null__: has joined #RubyOnRails
[14:17:59] null__: has joined #RubyOnRails
[14:17:59] matthewd: norc: Yeah, in that case, the longer name seems better.
[14:18:12] drbayer: has joined #RubyOnRails
[14:18:21] norc: matthewd, defsdoor: Thanks for your input. :)
[14:18:25] drbayer_: has joined #RubyOnRails
[14:18:33] defsdoor: norc, naming is hard
[14:18:47] defsdoor: coding is easy
[14:18:52] alextheger: has joined #RubyOnRails
[14:18:59] drbayer: has joined #RubyOnRails
[14:19:34] tetraktys: has joined #RubyOnRails
[14:20:44] mag42c: has joined #RubyOnRails
[14:21:12] lacrymology: what's a good exception to throw if a parameter is not of the expected type? I was leaning towards UnpermittedParameters but it has a very specific constructor
[14:22:10] norc: lacrymology: TypeError?
[14:22:21] brainslug: has joined #RubyOnRails
[14:22:36] joelsmith: has joined #RubyOnRails
[14:22:56] lacrymology: norc: ArgumentError?
[14:23:22] norc: lacrymology: Sure probably even better.
[14:23:46] norc: lacrymology: Or just create your own exception class.
[14:24:45] lacrymology: Yeah, I think they're too generic, since I want to catch it in the ApplicationController with rescue_with, I don't want to catch something too broad
[14:24:51] arup_r: has joined #RubyOnRails
[14:24:57] lacrymology: I'd have expected rails to have something specific
[14:25:05] lacrymology: what if you want to save a bad value in the database?
[14:25:15] lacrymology: like you want to save a string in an integer field
[14:25:17] lacrymology: what happens then?
[14:25:51] norc: lacrymology: Either you have a validation catching it (this is the easiest and best way, since it nicely integrates into existing form helpers, flash), or you get an adapter specific exception.
[14:26:54] norc: lacrymology: So really, if this is about *models*, just use validations.
[14:27:38] cac: has joined #RubyOnRails
[14:28:17] norc: lacrymology: Or possibly you don't get an exception at all if the database can somehow cast it (which usually is not what you want).
[14:29:27] IFrank00: has joined #RubyOnRails
[14:30:35] jlpeters: has joined #RubyOnRails
[14:30:53] IFrank00: Hi I update my gem and now im getting this error with sidekiq and redis. this is my config and error. https://gist.github.com/Frank004/02ae91d169325aab0ae9
[14:31:58] kumavis: has joined #RubyOnRails
[14:32:46] IFrank00: got it working doble check the lines found my problem
[14:33:03] skullcrasher: can someone point to instructions, that tell how to get nested "apps/submodules" to work?
[14:34:01] norc: skullcrasher: http://guides.rubyonrails.org/autoloading_and_reloading_constants.html
[14:34:14] blackmesa: has joined #RubyOnRails
[14:34:22] lacrymology: norc: it's not, it's a paramter that should be a boolean (the strings "true" or "false", or true or false if the payload is JSON), and I want to throw an error if it's something different. I have things like respond rescue_from ActionController::UnpermittedParameters, with: :unprocessable_entity in m application controller, so I'd like to leverage that
[14:34:32] norc: lacrymology: Yes. Use a validation.
[14:34:34] Oliphaunte: has joined #RubyOnRails
[14:35:12] lacrymology: norc: but it's not a model field. It is saved in a filed in the model, but it becomes the current user's id if 'true', or nil if 'false'
[14:35:50] norc: lacrymology: Again. Use a validation
[14:36:20] lacrymology: norc: then I don't know what you're talking about. I thought validations were an ActiveRecord thing
[14:36:27] norc: lacrymology: They are an ActiveModel thing! :-)
[14:36:42] norc: lacrymology: http://api.rubyonrails.org/classes/ActiveModel/Validations.html
[14:37:03] lacrymology: norc: but this parameter doesn't go to the model
[14:37:27] norc: Pass it to the model then. That gives the Model the power to validate
[14:38:13] dionysus69: has joined #RubyOnRails
[14:38:52] lacrymology: I don't know how this would look. It needs not only to validate it but also to convert it into something different, a new field name and value
[14:38:56] mag42c: has joined #RubyOnRails
[14:38:58] norc: lacrymology: You could probably in fact just plug in an enum actually
[14:39:04] norc: and everything you want will work out of the box
[14:39:22] norc: lacrymology: Sure, you could do that in a callback.
[14:40:20] lacrymology: I'm honestly totally lost, I don't know how the code you're proposing would look like at all. I could show you my current code, which is working but ugly
[14:42:01] hxegon: has joined #RubyOnRails
[14:42:30] norc: lacrymology: Feel free to share, we won't judge.
[14:42:39] norc: Worst thing is you will get advice. :-)
[14:43:03] norc: Which can only help you improve.
[14:43:51] n1lo: has joined #RubyOnRails
[14:45:14] Phoop____: has joined #RubyOnRails
[14:45:15] annlewis: has joined #RubyOnRails
[14:45:24] cydrobolt: has joined #RubyOnRails
[14:45:25] cydrobolt: has joined #RubyOnRails
[14:46:14] kitsuneyo: has joined #RubyOnRails
[14:46:36] Papierkorb: has joined #RubyOnRails
[14:46:47] Guest78466: has left #RubyOnRails: ()
[14:47:05] lacrymology: norc: http://dpaste.com/2A3PZ17
[14:47:24] silverdust: has joined #RubyOnRails
[14:48:34] norc: lacrymology: The common way of doing something like this is by using enums in your models.
[14:49:35] drbayer: has joined #RubyOnRails
[14:49:56] norc: lacrymology: Also please don't modify params. Modify your model instance.
[14:49:58] lacrymology: norc: I don't see how the enum can be changed into a user id, though
[14:50:40] norc: lacrymology: You can use plain boolean fields.
[14:50:45] chancancode_: has joined #RubyOnRails
[14:50:59] lacrymology: I want to know WHO fixed this thing
[14:51:29] benlakey: has joined #RubyOnRails
[14:51:55] kitsuneyo: has joined #RubyOnRails
[14:52:16] roshanavand: has joined #RubyOnRails
[14:52:42] norc: lacrymology: http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/TableDefinition.html
[14:52:54] norc: :boolean is listed as an available column type.
[14:53:10] norc: All common adapters have some kind of mapping for it too.
[14:53:25] elektronaut: has joined #RubyOnRails
[14:54:07] Shidash: has joined #RubyOnRails
[14:55:32] cookiez: has joined #RubyOnRails
[14:56:00] sankaber: has joined #RubyOnRails
[14:56:07] norc: lacrymology: And at that point you can use validates_inclusion_of :field_name, in: [true, false].
[14:56:08] ebryn: has joined #RubyOnRails
[14:56:10] The_Phoenix: has joined #RubyOnRails
[14:56:20] norc: lacrymology: That enforces it from your model.
[14:56:30] rickmasta: has joined #RubyOnRails
[14:57:01] Maletor: has joined #RubyOnRails
[14:57:21] kitallis: has joined #RubyOnRails
[14:57:27] jkamenik1: has joined #RubyOnRails
[14:57:45] leslie: has joined #RubyOnRails
[14:57:46] leslie: has joined #RubyOnRails
[14:58:24] lacrymology: norc: you're losing me. How do I know who fixed an alert after the fact if I keep it as a boolean?
[14:58:47] notnoyyyyy: has joined #RubyOnRails
[14:58:51] norc: lacrymology: The validates_inclusion_of will set an error during update/save.
[14:59:01] norc: In your model.
[14:59:05] m3_del: has joined #RubyOnRails
[14:59:15] lacrymology: norc: you're not answering my question
[14:59:50] lacrymology: I understand how this validates that the values are "true" or "false". I don't understand how does this keep track of who fixed something
[14:59:56] FailBit: you need to audit that (ie, with paper trail) or add another column to track it, lacrymology
[15:00:00] stannard: has joined #RubyOnRails
[15:00:09] lacrymology: I honestly prefer my current method
[15:00:15] chouhoulis: has joined #RubyOnRails
[15:00:24] FailBit: "the user that set it" doesn't really make sense from the point of the model
[15:00:29] norc: lacrymology: My "method" is not a replacement for your auditing. It is a replacement for using a wrong column type.
[15:00:34] norc: With a really bad idea of validation.
[15:00:35] FailBit: you have to decide what that means and implement accordingly
[15:00:37] lacrymology: FailBit: but it does from the point of the controller
[15:00:49] FailBit: yes, exactly
[15:00:56] lacrymology: I don't want a column that says "this is fixed", I want a column that says "Foo fixed this"
[15:01:06] FailBit: then add a column
[15:01:10] lacrymology: I have the column
[15:01:14] IrishGringo: has joined #RubyOnRails
[15:01:14] lacrymology: I don't want a boolean
[15:01:17] FailBit: references user
[15:01:22] lacrymology: I want my current column, wihch is exactly that
[15:01:41] shibabu: has joined #RubyOnRails
[15:02:09] lacrymology: requirements: the controller must receive a boolean and save a user id to the model. That is pretty much non-negotiable.
[15:02:32] norc: lacrymology: Hide that logic inside an abstract model.
[15:02:41] norc: Call it AlertFix if you like.
[15:03:07] hxegon: has joined #RubyOnRails
[15:03:20] stannard: has joined #RubyOnRails
[15:04:04] FailBit: if it's not too much to ask I would actually use papertrail for something like that
[15:04:28] FailBit: but not necessary to implement, ofc
[15:05:08] akshat: has joined #RubyOnRails
[15:06:19] SteenJobs: has joined #RubyOnRails
[15:07:01] mcr-credil: has joined #RubyOnRails
[15:07:23] Potatomound: has joined #RubyOnRails
[15:07:37] norc: lacrymology: Ignore my last statement. But even if you want to do it yourself, keep second attribute or column. Validate it in your model, and if it passes validation, your controller can set the trail.
[15:10:42] banister: has joined #RubyOnRails
[15:14:17] FLeiXiuS: has joined #RubyOnRails
[15:14:17] FLeiXiuS: has joined #RubyOnRails
[15:14:40] Synthead: has joined #RubyOnRails
[15:16:47] PaulePanter: Hi. Do you have suggestions how to improve the following statement to make it shorter and get rid of the `if` statement?
[15:16:52] PaulePanter: bookings = bookings.where('bookings.id != ?', @booking.id) if @booking.try(:id
[15:17:20] PaulePanter: The goal is, If there is a booking present, it should not be counted.
[15:17:40] mikajo: has joined #RubyOnRails
[15:19:45] matthewd: PaulePanter: I don't think you can usefully avoid the conditional
[15:19:58] nickenchuggets: has joined #RubyOnRails
[15:19:58] nickenchuggets: has joined #RubyOnRails
[15:20:10] matthewd: PaulePanter: I mean, you could use IS NOT DISTINCT FROM to do so, but that doesn't seem like an improvement
[15:20:47] xhoy: has joined #RubyOnRails
[15:21:20] Oliphaunte: has joined #RubyOnRails
[15:22:53] i: has joined #RubyOnRails
[15:23:10] zpe: has joined #RubyOnRails
[15:23:19] Cervajz__: has joined #RubyOnRails
[15:23:47] Oliphaunte: has joined #RubyOnRails
[15:24:30] ElSif: has joined #RubyOnRails
[15:25:31] mary5030: has joined #RubyOnRails
[15:25:57] axl_: has joined #RubyOnRails
[15:26:25] mary5030: has joined #RubyOnRails
[15:28:57] eddiegrey: has joined #RubyOnRails
[15:30:38] drbayer: has joined #RubyOnRails
[15:31:18] futilegames: has joined #RubyOnRails
[15:31:23] hello9: has joined #RubyOnRails
[15:31:32] jkamenik: has joined #RubyOnRails
[15:31:53] hello9: if I want to store data across multiple actions, should I be using session or params?
[15:32:46] fryguy: hello9: it depends
[15:32:47] xybre: depends, if its only one or two, you could use params.
[15:32:59] PaulePanter: matthewd: Understood. Thank you for the verification.
[15:33:05] xybre: If you want it kept between browser closes or secure data use session
[15:33:43] hello9: xybre but how can I use params across like 4 or 5 different actions?
[15:33:48] hello9: it seems like they reset on each eaction
[15:34:03] fryguy: hello9: they do
[15:34:50] hello9: fryguy, so then how can I use params instead of session?
[15:35:08] fryguy: hello9: you add the params you want to whatever form is going to submit
[15:35:24] hello9: from the controller?
[15:35:34] fryguy: no, in the view
[15:36:20] cac: has joined #RubyOnRails
[15:37:29] hello9: fryguy you mean with like hiddne fields?
[15:37:33] fryguy: hello9: sure
[15:37:44] hello9: okay thanks
[15:37:56] fryguy: hello9: there's other options, like session
[15:38:02] fryguy: or using your database
[15:38:11] fryguy: or just normal cookies
[15:38:30] fryguy: or don't throw away the context and reload it each time by doing single-page-app ajax-style things
[15:40:45] alphaatom: has joined #RubyOnRails
[15:42:43] tejasmanohar: has joined #RubyOnRails
[15:44:20] moeabdol: has joined #RubyOnRails
[15:44:26] tenderlove: has joined #RubyOnRails
[15:45:21] tetraktys: has joined #RubyOnRails
[15:46:03] annlewis: has joined #RubyOnRails
[15:48:00] thecyclone: has joined #RubyOnRails
[15:48:48] drbayer: has joined #RubyOnRails
[15:49:02] Croves: has joined #RubyOnRails
[15:50:11] PlasmaStar: has joined #RubyOnRails
[15:50:18] Croves: So, if I want to set up a 'Facebook Login' in my RoR app, how I will handle the relationship betwen my tables?
[15:50:23] Croves: It's not very clear to me
[15:51:32] Croves: My table `articles` has a column `author_id`, which refer to the `id` column in my `authors` table.
[15:51:58] Croves: In the moment that I allow users to sign in with Facebook, what will change in my app/db flow?
[15:53:48] zpe: has joined #RubyOnRails
[15:54:33] fryguy: Croves: typically when you sign in with a 3rd party account you still create a record in your users table for them, and so nothing would change with the relationship you mentioned
[15:54:38] rails810: has joined #RubyOnRails
[15:56:03] tildes: has joined #RubyOnRails
[15:57:05] wldcordeiro: has joined #RubyOnRails
[15:57:11] stamina: has joined #RubyOnRails
[15:57:52] Maletor: has joined #RubyOnRails
[15:58:03] RegulationD: has joined #RubyOnRails
[16:00:06] wldcordeiro: has joined #RubyOnRails
[16:00:30] Potatomound: has joined #RubyOnRails
[16:01:13] jacksparrow007: has joined #RubyOnRails
[16:02:27] atomical_: has joined #RubyOnRails
[16:03:15] ql6wlld: has joined #RubyOnRails
[16:05:19] hxegon: has joined #RubyOnRails
[16:05:36] mrod50_: has joined #RubyOnRails
[16:05:39] IrishGringo: has joined #RubyOnRails
[16:06:47] snowy: has joined #RubyOnRails
[16:06:49] mrod50_: I was wondering if someone have a few spare minutes, I am folling an outdated tut on how to create an mpr stream app using rails and AWS
[16:07:09] mrod50_: but I hit a wall and now i am stuck as I am not able to generate controllers
[16:07:27] tubbo: mrod50_: what's the error you're getting?
[16:07:53] mrod50_: It's along error chain...
[16:08:45] baweaver: has joined #RubyOnRails
[16:08:45] mrod50_: here is the first few lines
[16:09:32] mrod50_: this is the tut I am using ...
[16:09:44] mrod50_: http://code.tutsplus.com/articles/create-a-simple-music-streaming-app-with-ruby-on-rails--net-18437
[16:11:09] krzkrzkrz: has joined #RubyOnRails
[16:11:10] mrod50_: tubbo here is the first error line; /home/osboxes/.rvm/gems/ruby-2.2.1/gems/aws-s3-0.6.3/lib/aws/s3/extensions.rb:223:in `class_eval': /home/osboxes/.rvm/gems/ruby-2.2.1/gems/aws-s3-0.6.3/lib/aws/s3/extensions.rb:223: `@@{' is not allowed as a class variable name
[16:11:46] ethe: has joined #RubyOnRails
[16:13:14] Grundell: has joined #RubyOnRails
[16:14:00] thecyclone: mrod50_: use Gist or pastie plz
[16:14:29] hello9: @fryguy any links for the spa style things you mentioned? :)
[16:16:51] Sylario: has joined #RubyOnRails
[16:17:31] Sylario: Is there some Rails gem where :javascript is a tag?
[16:17:44] wsewolod: has joined #RubyOnRails
[16:17:47] Sylario: Trying to understand the last pieace of code of the first answer : http://stackoverflow.com/questions/4491433/turn-omniauth-facebook-login-into-a-popup
[16:18:02] fryguy: sylario: that's haml
[16:18:56] Sylario: doesn't haml always start by DOM class/ID or = and -?
[16:18:59] Sylario: never saw :
[16:19:31] fryguy: sylario: it supports filters through :
[16:20:32] Sylario: Filter? like filtering a different syntax?
[16:20:35] tubbo: mrod50_: looks like you're using RVM. are you certain it's properly set up?
[16:21:27] thecyclone: tubbo: i think he should update gems
[16:21:30] syzygy_: has joined #RubyOnRails
[16:22:01] qurve: has joined #RubyOnRails
[16:22:27] tubbo: sylario: yeah, like you can do inline coffeescript, regular html (with :plain), markdown, and javascript
[16:22:33] tubbo: i think you can even configure more haml filters
[16:22:50] Sylario: Interesting, necer saw that syntax
[16:23:05] Sylario: i imported erb partials when i needed something special
[16:23:15] tubbo: heh...it's kind-of smelly imho
[16:23:27] Sylario: Well, i did not knew it existed
[16:23:39] tubbo: sylario: yeah but that's actually the use case it was meant to solve. pulling in partials can get expensive, so haml has some features that prevent you having to do that as often
[16:23:51] tubbo: for example, if you have a single line of HTML, you can just put that in your haml document.
[16:24:10] tubbo: because it's really expensive to read *another* file from disk just to render a single line of HTML
[16:24:22] Sylario: i have already put raw HTML in haml, it can work without filters
[16:24:46] Sylario: as long as you stay at the same indent level
[16:25:21] tubbo: right. the :plain filter (iirc) enables multi-line, indented html.
[16:26:03] Sylario: The js filter works great
[16:26:21] qurve: Using helpers instead of partials for simple HTML can also be helpful in my experience.
[16:26:28] hobodave: has joined #RubyOnRails
[16:26:44] qurve: I cleaned up a lot of wasteful partials and bad HAML after I learned now to use tag/content_tag/concat properly.
[16:28:59] kp666: has joined #RubyOnRails
[16:29:01] qurve: Has anyone ever worked with a rails app that has multiple distinct domains, but uses a self-managed SSO/OAuth setup to let visitors log into any of those sites?
[16:29:09] qurve: I've been using devise for ages on my projects for general account management, but I am approaching a new project where it would make more sense to have multiple websites with different domains share an SSO managed by the umbrella website.
[16:29:20] SanguineAnomaly: has joined #RubyOnRails
[16:29:31] qurve: I ran across the doorkeeper gem, but have never used it before.
[16:29:33] jbrhbr: has joined #RubyOnRails
[16:31:08] paulodiniz: has joined #RubyOnRails
[16:31:58] blackmesa: has joined #RubyOnRails
[16:33:06] arup_r: has joined #RubyOnRails
[16:34:31] joshsmith: has joined #RubyOnRails
[16:36:13] arup_r: has joined #RubyOnRails
[16:36:43] disgrntld: has joined #RubyOnRails
[16:37:36] claytonzaugg: has joined #RubyOnRails
[16:38:34] alphaatom: has joined #RubyOnRails
[16:39:48] Sylario: I use Doorkeeper + Omniauth on a multidomain app
[16:39:59] Sylario: It can work
[16:40:42] qurve: How much bubble-gum and duct tape is required?
[16:41:00] Sylario: qurve : not that much
[16:41:14] fryguy: I use doorkeeper in production
[16:41:24] qurve: In my head, I want all registration/login/oauth permissions to happen on my.site.com and then on www.site.com and www.site.org auth would happen through my.site.com
[16:41:31] fryguy: works well enough for our needs (not multi-domain though, I can't imagine that makes it that much more complicated)
[16:41:55] qurve: (Basically my setup is that I have both a for-profit company and a non-profit organization that share the same userbase, along with an api.site.com and an iOS/Android app)
[16:42:06] qurve: It seems like this is a good usecase for OAuth, I think.
[16:42:17] mary5030: has joined #RubyOnRails
[16:42:17] Sylario: qurve : you will have a redirection to a login screen on my.site.com, that will redirect to the consumer app after succesful auth
[16:42:28] qurve: That would be the desired outcome.
[16:42:32] w0rd-driven: has joined #RubyOnRails
[16:42:50] dopie: has joined #RubyOnRails
[16:42:56] qurve: Eg, a user visits site.com or site.org, when they try to log in they are redirected to my.site.com where they grant permission to those "apps"
[16:43:00] HalcyonicStorm: has joined #RubyOnRails
[16:43:19] qurve: It just happens that all of the "applications" in my OAuth ecosystem are managed by me.
[16:45:07] qurve: Glad to hear people have positive experienced with doorkeeper though, I'll make a proof of concept at some point.
[16:45:15] qurve: Thank you guys for the personal experiences.
[16:45:35] qurve: Is doorkeeper the clear leader in OAuth provider gems for rails the way devise is the clear leader in general user auth?
[16:45:38] [Butch]: has joined #RubyOnRails
[16:46:18] fryguy: qurve: probably
[16:46:20] shibabu: has joined #RubyOnRails
[16:46:50] qurve: I hate gem anxiousness, the constant nagging wonder of whether you hitched your cart to the wrong horse.
[16:46:52] annlewis: has joined #RubyOnRails
[16:48:25] Diabolik: does anyone have any experience with the spree_print_invoice gem?
[16:51:18] mary5030: has joined #RubyOnRails
[16:53:12] dici: has joined #RubyOnRails
[16:55:14] rodfersou: has joined #RubyOnRails
[16:57:17] maloik_: has joined #RubyOnRails
[16:58:01] owenjones: has joined #RubyOnRails
[16:58:35] Maletor: has joined #RubyOnRails
[16:58:41] HalcyonicStorm: has left #RubyOnRails: ()
[17:00:41] moeabdol: has joined #RubyOnRails
[17:01:57] arup_r: Why my Rspec not finding the ActiveAdmin controller Fax ? https://gist.github.com/aruprakshit/15c8c12e4c398fbdafc0
[17:02:18] hobodave_: has joined #RubyOnRails
[17:04:23] hardtail: has joined #RubyOnRails
[17:04:33] pantaleon: has joined #RubyOnRails
[17:04:54] jmarchello: has joined #RubyOnRails
[17:05:44] rubyonrailed: has joined #RubyOnRails
[17:06:09] arup_r: nvm, fixed it . I forgot to mention require 'rails_helper'
[17:06:10] nyaa: has joined #RubyOnRails
[17:06:20] arup_r: sorry require 'spec_helper'
[17:07:27] qurve: Sometimes the easiest way to solve a problem is to ask the question out loud :)
[17:07:55] qurve: If I had $1 for every time I solved my problem half way through describing it to someone else, I would have more than $1.
[17:08:39] jmarchello: Hello all, does someone have a moment to help me with RailsAdmin field configuration?
[17:08:51] moeabdol: has joined #RubyOnRails
[17:09:00] nyaa: has joined #RubyOnRails
[17:11:00] baweaver: has joined #RubyOnRails
[17:11:50] Grundell: has joined #RubyOnRails
[17:12:01] paulodiniz: has joined #RubyOnRails
[17:12:41] c355E3B: has joined #RubyOnRails
[17:13:37] tubbo: qurve: seems like if you're using something like doorkeeper as an oauth2 provider, using omniauth would be a common use case, "eating your own dogfood" and all that jazz.
[17:14:00] qurve: Yeah, I wasn't even sure how incepted I wanted to get on that.
[17:14:29] jacksparrow007: has joined #RubyOnRails
[17:14:30] qurve: If we're getting really crazy, my.site.com could allow people to register with facebook, then expose their site.com over my own oauth provider. Then www.site.com could use device to auth with my.site.com.
[17:15:04] jmarchello: has left #RubyOnRails: ()
[17:15:07] jmarchello: has joined #RubyOnRails
[17:15:14] nyaa: has joined #RubyOnRails
[17:15:19] jmarchello: has left #RubyOnRails: ()
[17:15:20] qurve: I did this one before WITHOUT using oauth and it was a damn nightmare of passing cookies and shit around.
[17:15:36] jmarchello: has joined #RubyOnRails
[17:15:41] qurve: I'm determined never to do it again, but I've only ever consumed oauth, never provided it.
[17:15:54] nyaa: has joined #RubyOnRails
[17:16:29] jmarchello: has left #RubyOnRails: ()
[17:17:04] safety_cut: has joined #RubyOnRails
[17:17:42] Grundell: has joined #RubyOnRails
[17:20:38] optimus55: has joined #RubyOnRails
[17:20:47] djbkd: has joined #RubyOnRails
[17:20:59] doodlehaus: has joined #RubyOnRails
[17:21:32] paulodiniz: has joined #RubyOnRails
[17:22:20] mostlybadfly: has joined #RubyOnRails
[17:24:34] arup_r: qurve: hehe. true very true
[17:25:42] optimus55: I had a question about fixtures that I can't seem to find the answer to. Suppose we're testing a User model. A developer is writing tests using `user = User.first` instead of `user = users(:user1)`. Does this pattern create excessive DB calls? How does ActiveSupport handle them differently? Are fixtures only used when seeding the test database and that's it?
[17:27:10] B1n4r10: has joined #RubyOnRails
[17:28:16] centrx: has joined #RubyOnRails
[17:28:25] Nox_: has joined #RubyOnRails
[17:28:34] bronson: has joined #RubyOnRails
[17:28:44] qurve: I'm not sure whether my opinion is the prevailing one or not, but I think fixtures are quite possibly the worst thing in rails.
[17:28:51] nibbo: has joined #RubyOnRails
[17:29:05] qurve: I've found them to become completely un-maintainable after even a moderate amount of development and complexity in an app.
[17:29:19] qurve: Other people can offer you other suggestions, but I use the fabrication gem.
[17:29:54] axl_: has joined #RubyOnRails
[17:29:55] qurve: I realize that doesn't answer your question, but it may prevent you from going down a stupid path that I found myself on a long time ago.
[17:30:52] nyaa: has joined #RubyOnRails
[17:31:13] tbuehlmann: qurve, agreed, I experienced the same
[17:32:07] Macaveli: has joined #RubyOnRails
[17:32:17] qurve: Literally the first thing I do when setting up testing in a rails app is git rm -r spec/fixtures and install fabrication
[17:32:21] optimus55: qurve: did you end up changing your schema a lot and that's why it became un-maintainable? The reason I ask is because I used fixtures with a different framework in the past which came with a 'fixture generator' - a command line tool that looks at the current schema, then generates matching yml structure, or updates existing yml files to match the schema. AFAIK rails doesn't have something like that so everything is a bit manual.
[17:33:00] qurve: optimus55: The problem with fixtures is dealing with schema changes, and dealing with minor changes to attributes during testing.
[17:33:30] qurve: Imagine you want to test a model with 5 attributes, and each attribute needs to be tested to deal with null, blank, invalid value, valid value.
[17:33:41] qurve: Now imagine any of those attributes have to be tested in conjunction.
[17:34:03] qurve: The number of fixtures you need to create, while also giving them uniquely identifiable names is impossible to manage.
[17:35:03] _Tariq: has joined #RubyOnRails
[17:35:07] Oliphaunte: has joined #RubyOnRails
[17:35:16] tbuehlmann: qurve, yup, exactly the case I experienced a lot. had to update models in a before block to set them up
[17:35:26] qurve: I find fabricators to be much more reliable, you define a base fabricator that creates a model with reasonable "baseline" data, meaning an average user.
[17:35:28] AntiSpamMeta: has joined #RubyOnRails
[17:35:32] qurve: Then you just override properties.
[17:35:32] ogpastaling: has joined #RubyOnRails
[17:35:43] paulodin_: has joined #RubyOnRails
[17:35:47] qurve: user_with_nil_email = Fabricate(:user, email: nil)
[17:36:01] arcanez: is it possible to tell if a model has an association defined? (I'm on rails 2.3.8)
[17:36:15] qurve: You know that every other property will have a default, proper value, allowing you to override just one attribute under test to a specific value.
[17:36:39] nofxx: has joined #RubyOnRails
[17:36:39] nofxx: has joined #RubyOnRails
[17:36:57] qurve: If you find yourself doing the same thing over and over again, like confirmed_user = Fabricate(:user, confirmed: true) you can create a new Fabricator that extends from :user but forces confirmed to be true, then you can just do Fabricate(:confirmed_user)
[17:37:11] qurve: Basically, you have all the power of fixtures, with infinitely more flexibility, at the cost of speed.
[17:37:20] qurve: Which is not to be discounted. Fixtures are unquestionably faster.
[17:37:36] qurve: But to me, the trade-off isn't even a question.
[17:37:40] tubbo: also helps you write tests that are less dependent on the DB
[17:37:41] qurve: Fixtures make me want to kill myself.
[17:37:51] optimus55: qurve: gotcha. I'm having a look at the fabricator gem. So what's the tradeoff? Does it increase the amount of time required to run the tests because of generating the objects? Does it cache and avoid making db calls?
[17:37:53] tubbo: qurve: 30 min test suites make me want to kill my boss.
[17:38:14] optimus55: ahh just saw your line on speed
[17:38:19] tubbo: guess you don't like to deploy as fast or continuously as I do. or, your tests are written so that they don't depend on factories when they don't need to
[17:38:23] tbuehlmann: arcanez, go to http://api.rubyonrails.org/v2.3.8/ and search for "reflect_on", there might be something
[17:38:27] matthewd: arcanez: Yes, look around 'reflection'. I thankfully don't remember API details for releases that old, though :)
[17:38:29] tubbo: because that was the biggest problem i had with implementing factories.
[17:38:32] paulodin_: has joined #RubyOnRails
[17:39:04] mag42c: has joined #RubyOnRails
[17:39:12] arcanez: check if reflect_on_association(:assoc).present? seems to do what I want, but not when something is included. that's too early
[17:39:16] qurve: tubbo: I mostly focus on using fabricators only when necessary, and running subsets of tests while working, with a full suite before opening a PR.
[17:39:31] qurve: Then the CI hits it to confirm.
[17:39:43] qurve: I have not yet bought into the automatic/continuous deployment fad.
[17:39:46] optimus55: tubbo: that's a major concern for me as I'm evaluating. I'd like to have tests as fast as possible for continuous delivery.
[17:39:49] qurve: I still tag and deploy manually.
[17:39:57] tubbo: qurve: yeah i tag & deploy manually too
[17:40:04] tubbo: qurve: but i deploy to staging/QA servers automatically
[17:40:13] qurve: Yeah, I've done that for sure.
[17:40:13] tubbo: different problems, different situations
[17:40:19] qurve: To me, test suite speeds are not really a limitation.
[17:40:35] flashpoint9: has joined #RubyOnRails
[17:40:36] qurve: And even my largest apps with the slowest tests are still running in < 5 minutes on a reasonable machine.
[17:40:43] tubbo: i've seen them be an actual limitation, it's not really an opinion-based matter. it's based on whether slow test suites affect your daily life or not.
[17:40:47] qurve: For some people that might be a huge limitation, for me it's not.
[17:41:04] tubbo: if you have a team of 15 who need to get something done in a few days, making everyone wait 45 mins for shit to build is problematic.
[17:41:05] adre: has joined #RubyOnRails
[17:41:22] xybre: fast tests pls
[17:41:30] tubbo: if you're a single person working on a single app, or you're a team of 1-5 or something, your problems != my problems
[17:41:30] qurve: Yeah, if I ever got to the point where a test suite was running for 45 minutes, there would be some real soul searching and re-evaluation.
[17:41:51] xybre: It's usually noobs with database calls
[17:42:18] paulodiniz: has joined #RubyOnRails
[17:42:52] arcanez: matthewd: yes, the age seems to be a large burden ;)
[17:42:53] optimus55: So that's one of my original concerns and if someone has a link or blog, please do share. How do you write proper tests that avoid database calls, using either fixtures or fabricators?
[17:43:01] qurve: I've done so much these days with service objects, that you can really reduce your need to deal with the database at all.
[17:43:14] qurve: optimus55: Abstraction layers, like service objects.
[17:43:15] adac: has joined #RubyOnRails
[17:43:22] optimus55: so does users(:user1) vs. User.first make a difference?
[17:43:27] tubbo: optimus55: know what methods to run that touch the database, and don't call them.
[17:43:29] mary5030: has joined #RubyOnRails
[17:43:30] qurve: Depending on how exactly you do it.
[17:43:34] mary5030_: has joined #RubyOnRails
[17:43:37] tubbo: optimus55: yes, because users(:user1) might not be User.first
[17:43:38] xybre: fixtures and fabricators are stored in the database. It's about how you structure your code.
[17:43:59] tubbo: not really. fabricators actually run a query to create the record when you call it. fixtures are pre-populated into the DB.
[17:44:08] tubbo: fabricators run validations when they're created. fixtures, already being in the DB, don't.
[17:44:10] optimus55: tubbo: yep. So I'm planning to point that out for sure. Just wondering what else is affected by that type of code..
[17:44:23] tubbo: fixtures can have invalid or dirty data, bceause it's just a big INSERT INTO before your tests run. fabricators can't.
[17:44:26] qurve: tubbo: That was actually one of my biggest reasons for ditching fixturees.
[17:44:33] qurve: The dirty-data problem burned me so many times.
[17:44:43] tubbo: qurve: your unit tests never ran valid? :P
[17:45:02] qurve: The time wasted dealing with fixture data dwarfed the extra time running fabricator-based tests :)
[17:45:30] tubbo: sounds like a problem with your unit tests
[17:45:49] nyaa: has joined #RubyOnRails
[17:47:05] bronson: has joined #RubyOnRails
[17:47:24] Maletor: has joined #RubyOnRails
[17:47:36] annlewis: has joined #RubyOnRails
[17:47:55] jbrhbr: has joined #RubyOnRails
[17:48:33] TDJACR: has joined #RubyOnRails
[17:49:53] Encapsulation: has joined #RubyOnRails
[17:51:30] adre: has joined #RubyOnRails
[17:52:00] paulodiniz: has joined #RubyOnRails
[17:52:16] Caius: has joined #RubyOnRails
[17:52:54] bap1313: has joined #RubyOnRails
[17:55:07] akshat: has joined #RubyOnRails
[17:55:12] markh: has joined #RubyOnRails
[17:56:34] claytonzaugg: has joined #RubyOnRails
[17:57:34] christiandsg: has joined #RubyOnRails
[17:57:59] pantaleon: has joined #RubyOnRails
[17:58:00] Moeh: has joined #RubyOnRails
[17:58:27] Lytol: has joined #RubyOnRails
[17:58:52] toastercup: has joined #RubyOnRails
[17:58:54] Moeh: Hello, I call this function with "get_tables_and_locations(query, [])" (http://pastie.org/10616582). Query is either a hash or an array. However the result I get is just the input query, not the array. What do I need to change in the function?
[17:59:00] snowy: has joined #RubyOnRails
[17:59:20] optimus55: qurve, tubbo: thanks for all the feedback guys, much appreciated. Gonna do some more reading and evaluating fabricator vs. fixtures maintenance. I've had some people also suggest using an anonymized snapshot of production data to generate fixtures for testing
[17:59:27] toastercup: Hey friends! Do you know how I can access the Rails/Rack Request context from a gem that's providing ViewHelpers?
[17:59:54] Moeh: In the console output I see that the result array is correct (while it is running). However the returned value is wrong.
[18:00:15] tubbo: toastercup: there's a method in every controller called `request` that you can use to read stuff like ip address, user agent, headers, etc.
[18:00:49] nyaa: has joined #RubyOnRails
[18:01:13] paulodiniz: has joined #RubyOnRails
[18:01:34] toastercup: Interesting. That's not working.. but I'll look into it :)
[18:01:38] lxsameer: has joined #RubyOnRails
[18:01:55] lxsameer: has joined #RubyOnRails
[18:02:03] colleenmcguckin: has joined #RubyOnRails
[18:02:16] jsrn_: has joined #RubyOnRails
[18:03:45] baweaver: has joined #RubyOnRails
[18:03:46] berserk_ren: has joined #RubyOnRails
[18:04:58] yardenbar: has joined #RubyOnRails
[18:05:23] allcentury: has joined #RubyOnRails
[18:07:10] nickenchuggets: has joined #RubyOnRails
[18:07:10] nickenchuggets: has joined #RubyOnRails
[18:07:40] matthewd: Moeh: What's the method supposed to be returning?
[18:08:11] Moeh: matthewd: The (filled) array that is passed as second parameter.
[18:08:21] paulodiniz: has joined #RubyOnRails
[18:08:28] matthewd: Moeh: Which line does that?
[18:08:35] snowy: has joined #RubyOnRails
[18:08:38] kegan_: has joined #RubyOnRails
[18:08:51] AzaToth: has joined #RubyOnRails
[18:09:00] baweaver: has joined #RubyOnRails
[18:09:01] Moeh: matthewd: I was hoping #4, however that does not seem to work
[18:09:25] matthewd: Moeh: Is query empty?
[18:09:30] sbarg: has joined #RubyOnRails
[18:10:21] Moeh: matthewd: Yes, so what I was trying to accomplish is that the function iterates over query (can be array or hash) and when it iterated over all element, then result should be returned.
[18:10:33] Moeh: *elements
[18:10:41] CornishPasty_: has joined #RubyOnRails
[18:11:10] jessemcgilallen: has joined #RubyOnRails
[18:13:02] sleungcy: has joined #RubyOnRails
[18:13:17] lacrymology: how can I remove some headers from a response?
[18:14:01] tubbo: lacrymology: what do you want to remove?
[18:14:47] jgt1: has joined #RubyOnRails
[18:14:49] lacrymology: tubbo: I'm using api-pagination which sets some headers, but I'm checking permissions with cancan afterwards, if authorization fails I'm getting the not authorized error, but the pagination headers are still there
[18:15:23] lacrymology: Link, Per-Page, Total
[18:15:27] nocontrol: has joined #RubyOnRails
[18:15:46] lacrymology: on the error handler
[18:15:49] nyaa: has joined #RubyOnRails
[18:15:50] lacrymology: IN the error handler
[18:17:02] matthewd: lacrymology: You should generally check permissions before you do things
[18:17:14] meoblast001: has joined #RubyOnRails
[18:17:34] lacrymology: matthewd: so you are suggesting to check permissions for 10k objects, instead of the 30 I'm returning after paginating?
[18:17:37] podman: has joined #RubyOnRails
[18:17:40] lacrymology: the pagination method sets the headers
[18:17:54] baweaver: has joined #RubyOnRails
[18:18:24] lacrymology: I get that this is a.. shortcoming of the library, but I'm not in the mood of rolling my own
[18:19:19] tubbo: pagination with headers? i've never seen that before.
[18:19:27] hardlin3r: has joined #RubyOnRails
[18:19:30] lacrymology: it's the standard
[18:19:41] lacrymology: of course NOBODY FOLLOWS THE STANDARD
[18:19:49] tubbo: is it? wow
[18:20:10] tubbo: lacrymology: i've just been using params, like /some/collection?page=2&per_page=50
[18:20:32] tubbo: lacrymology: that said, maybe this would be suitable as either an after_filter or some kind of controller middleware?
[18:20:38] tubbo: start with an after_filter first
[18:21:21] tubbo: at the very least you can nullify them, like response.headers['X-Per-Page'] = nil unless can? :update or whatever
[18:21:22] lacrymology: tubbo: no, headers in the response
[18:21:25] matthewd: lacrymology: Wait, so you're paginating a collection of 10k objects, which the user must step through 30 at a time, and depending on permissions, most pages may be empty?
[18:21:48] brunto: has joined #RubyOnRails
[18:22:50] lacrymology: matthewd: no, I'm fetching some objects from the database, which the user may or may not have access to. The request might be malign, my queries my be buggy, whatever
[18:23:04] tubbo: lacrymology: you can definitely change response headers.
[18:23:29] tubbo: i'm pretty sure you just do response.headers['Per-Page'] = nil to clear it out, and then at the very least the headers won't have any data associated with them
[18:23:46] tubbo: but i'm also fairly certain that they won't be passed as the HTTP headers if they have nil as their value...
[18:23:56] lacrymology: I'll check that
[18:23:58] Moeh: matthewd: Could you give me a hint?
[18:24:39] hahuang65: has joined #RubyOnRails
[18:24:53] IrishGringo: has joined #RubyOnRails
[18:25:03] matthewd: Moeh: I didn't realise I was being that enigmatic... you're not returning anything.
[18:25:57] Moeh: matthewd: Okay, where would I need to add the return?
[18:26:04] moeabdol: has joined #RubyOnRails
[18:26:53] djbkd: has joined #RubyOnRails
[18:27:29] tubbo: Moeh: instead of using each, use an Enumerable method that actually returns something (http://ruby-doc.org/core-2.2.3/Enumerable.html, there are a few to choose from depending on your use case)
[18:28:20] tubbo: for example...if you wanted to return an Array, you could use map() in place of each()
[18:30:12] LambdaSource: has joined #RubyOnRails
[18:30:48] nyaa: has joined #RubyOnRails
[18:31:22] sonofdirt: has joined #RubyOnRails
[18:32:12] srinidhi: has joined #RubyOnRails
[18:32:21] lemur: has joined #RubyOnRails
[18:33:41] cac: has joined #RubyOnRails
[18:34:12] annlewis: has joined #RubyOnRails
[18:34:32] mhenry: has left #RubyOnRails: ()
[18:35:14] paulodin_: has joined #RubyOnRails
[18:36:26] SteenJobs: has joined #RubyOnRails
[18:36:35] jas02: has joined #RubyOnRails
[18:40:27] Sawbones: has joined #RubyOnRails
[18:41:21] edwinvdgraaf: has joined #RubyOnRails
[18:41:37] rubyonrailed: has joined #RubyOnRails
[18:41:47] RegulationD: has joined #RubyOnRails
[18:42:48] Or1on: has joined #RubyOnRails
[18:42:48] Or1on: has joined #RubyOnRails
[18:43:08] bergs: has joined #RubyOnRails
[18:43:35] grail: has joined #RubyOnRails
[18:44:09] yardenbar: has joined #RubyOnRails
[18:44:51] adre: has joined #RubyOnRails
[18:45:49] nyaa: has joined #RubyOnRails
[18:45:57] _Tariq: has joined #RubyOnRails
[18:46:15] hobodave: has joined #RubyOnRails
[18:48:14] Oliphaunte: has joined #RubyOnRails
[18:49:53] jahbrewski: has joined #RubyOnRails
[18:49:58] Jasaka: has joined #RubyOnRails
[18:51:03] grail: is anyone here?
[18:52:17] draig: has joined #RubyOnRails
[18:54:29] versatiletech: has joined #RubyOnRails
[18:55:09] _Tariq: has joined #RubyOnRails
[18:56:13] grail: anyone have skills using devise gem?
[18:57:11] tubbo: grail: people are here, if they do not respond to your question, rephrase it.
[18:57:13] tubbo: grail: !ask
[18:57:13] helpa: grail: How to ask good questions and get great answers: http://www.mikeash.com/getting_answers.html
[18:57:24] drbayer: has joined #RubyOnRails
[18:57:25] fmcgeough: has joined #RubyOnRails
[18:57:29] shanemcd: has joined #RubyOnRails
[18:57:44] grail: ok ... here goes
[18:59:22] _Tariq: has joined #RubyOnRails
[18:59:28] grail: I have installed devise gem which is setup for User model. When I try to select the login link (users/sign_in) I receive an error as follows: "Missing partial devise/categories/_category"
[18:59:58] grail: but for all other pages it simply looks in app/views/categories which has the _category partial
[19:00:48] nyaa: has joined #RubyOnRails
[19:01:12] grail: i had also created a helper so the @categories variable is available as this item is in a sidebar
[19:02:02] fahrradflucht: has joined #RubyOnRails
[19:03:29] jmimi: has joined #RubyOnRails
[19:04:16] Sp3d_: has joined #RubyOnRails
[19:04:17] stannard: has joined #RubyOnRails
[19:05:49] paulodiniz: has joined #RubyOnRails
[19:06:21] Sp3d_: Hi. Is there a good way to tweak activerecord to do a find_or_initailize_by on nested attributes?
[19:07:01] jbrhbr: has joined #RubyOnRails
[19:07:47] Sp3d_: I want to User.update_attributes(user_params), where user_params could be a nested set of attributes. Objects will all have ids, but need to model to check if it exists in order to decide to update or create
[19:08:06] Sp3d_: need the*
[19:11:01] lapide_viridi: has joined #RubyOnRails
[19:11:29] Synthead: How can I do a partial match while joining another table? in (postgres) sql, I would do this: http://pastie.org/10616734
[19:11:36] SteenJobs: has joined #RubyOnRails
[19:13:23] blackmesa: has joined #RubyOnRails
[19:13:51] baweaver: has joined #RubyOnRails
[19:14:01] nhhagen: has joined #RubyOnRails
[19:15:47] dionysus69: has joined #RubyOnRails
[19:15:48] safety_cut: has joined #RubyOnRails
[19:15:49] nyaa: has joined #RubyOnRails
[19:17:28] shanemcd: has joined #RubyOnRails
[19:22:19] koneko: has joined #RubyOnRails
[19:24:09] djbkd_: has joined #RubyOnRails
[19:24:13] teclator: has joined #RubyOnRails
[19:24:17] Radar: GOOD MORNING
[19:24:42] Radar: Synthead: what have you tried
[19:25:06] Synthead: Radar: I'm not sure how to approach this, so I haven't tried much in AR yet.
[19:25:48] Synthead: Radar: I know AR likes to make a bunch of generated table aliases when it does joins
[19:25:54] fox_mulder_cp: Radar: 21:24 on GMT+2, evening here P)
[19:26:15] Radar: fox_mulder_cp: 6:25am GMT +10, morning here
[19:26:23] Synthead: Radar: If I put any of these aliases in a where cause explicitly it seems like it'd be very prone to failure
[19:26:38] Radar: Synthead: should be able to join based on the table name
[19:26:45] Radar: And by join, I mean join with a where
[19:26:51] fox_mulder_cp: i knows about rails used some posgrresql features, but can we use postgresql views, functions etc?
[19:26:58] Radar: Copy the SQL fragment into where(" "). Try it out.
[19:27:04] DoubleMalt: has joined #RubyOnRails
[19:27:30] Synthead: Radar: yeah, I would greatly prefer to use activerecord-isms than throwing the entire sql blurb into a "where", though
[19:27:42] Synthead: Radar: the "||" concatenation is PostgreSQL-specific, I think
[19:28:07] Radar: What if I told you throwing the fragment in the where was an activerecord ism?
[19:28:55] Synthead: Radar: I know it's supported, but I don't really want to write it that way if possible
[19:30:48] nyaa: has joined #RubyOnRails
[19:31:28] doodlehaus: has joined #RubyOnRails
[19:31:38] _Tariq: has joined #RubyOnRails
[19:31:40] grail: anyone help with why a call to users/sign_in (using devise) would want to render the sidebar details from the devise folder instead of where the partial exists?
[19:32:10] Radar: Synthead: Ok, good luck finding an alternative method.
[19:32:15] Synthead: Radar: thanks
[19:32:16] drbayer: has joined #RubyOnRails
[19:32:19] Radar: grail: !ncnh
[19:32:19] helpa: grail: 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.
[19:32:44] jessemcgilallen: has joined #RubyOnRails
[19:32:58] Oliphaunte: has joined #RubyOnRails
[19:33:11] grail: sorry .. new here and wasn't sure how much blurb was acceptable :)
[19:33:22] baweaver: has joined #RubyOnRails
[19:33:35] twilling: has joined #RubyOnRails
[19:33:41] Synthead: Radar: http://stackoverflow.com/questions/34141640/how-to-use-activerecord-to-do-partial-matches-with-joined-tables
[19:33:57] Radar: grail: !rules
[19:33:57] helpa: grail: https://gist.github.com/996779
[19:33:57] Synthead: Radar: in case you wanted to see if there was an answer later
[19:34:09] Radar: grail: Please familiarise yourself with the layout of this aircraft, remembering that the nearest exit may be behind you.
[19:34:12] Radar: Oops, wrong blurb.
[19:34:33] grail: call in sidebar.html.erb : <%= render template: 'categories/index.html.erb' %>
[19:34:40] Caius: has left #RubyOnRails: ()
[19:35:00] annlewis: has joined #RubyOnRails
[19:35:07] ap4y: has joined #RubyOnRails
[19:35:09] Radar: grail: why are you rendering a template?
[19:35:24] grail: categories/index.html.erb : <ul><%= render @categories %></ul>
[19:35:33] teclator: has joined #RubyOnRails
[19:35:52] grail: categories/_category: <li><%= link_to category.name, category %></li>
[19:35:59] Radar: grail: Sounds like <%= render template: 'categories/index.html.erb' %> should be <%= render 'categories/index' %>, with that being a partial
[19:36:08] rakm: has joined #RubyOnRails
[19:36:12] StaticVoid: has joined #RubyOnRails
[19:36:16] grail: call that kills everything: <%= link_to "Login", new_user_session_path %>
[19:36:22] Radar: grail: !gist
[19:36:22] helpa: grail: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[19:36:29] Radar: grail: It's probably trying to render it relative to the Devise path.
[19:36:31] droptone: Question: What's the preferred method for creating a preview of a blog post in Rails 4.2.x?
[19:36:37] Radar: grail: Gist all the code + the error please.
[19:36:45] Radar: droptone: most people these days use code
[19:36:47] droptone: I realize with a string, such as post.body, I can simply go post.body[0..15] or some such, but I want it to not cut off words.
[19:36:55] droptone: Radar: That's so polite, thank you.
[19:36:58] Radar: droptone: look up the truncate method
[19:37:08] Radar: droptone: Vague question == vague answer
[19:37:23] Radar: Always better to show examples of what you want rather than trying to explain it
[19:37:25] grail: i had to use template because index is not a partial
[19:37:37] grail: and is used elsewhere
[19:37:39] Radar: Great, now there's lightning + thunder outside. What an excellent start to my day.
[19:37:45] Cohedrin: has joined #RubyOnRails
[19:37:58] droptone: Naah, that wasn't that vauge, you answered the question properly on your second go.
[19:37:58] Radar: droptone: As an example of how a proper example is best: ask a group of people to draw a dragon. You'll get all kinds of dragons.
[19:38:09] droptone: Trancate will do, thank you.
[19:38:15] Radar: droptone: Because you showed me an example of post.body[0..15]
[19:38:30] Radar: grail: So make it a partial and reference it as a partial.
[19:38:35] Radar: droptone: Best not to argue.
[19:38:48] Radar: "Yes Radar, I will follow the channel rules" "Thanks! That's good to hear."
[19:39:22] grail: but my error says it is look here: Missing partial devise/categories/_category
[19:39:37] grail: so puting it as a partial in categories is not going to help
[19:39:59] Radar: grail: Still waiting on that Gist.
[19:40:19] Sawbones: has joined #RubyOnRails
[19:40:28] SteenJobs: has joined #RubyOnRails
[19:40:31] ur5us: has joined #RubyOnRails
[19:40:38] Sawbones: has joined #RubyOnRails
[19:40:44] yardenbar: has joined #RubyOnRails
[19:41:03] KensoDev: has joined #RubyOnRails
[19:41:20] dopie: https://gist.github.com/staycreativedesign/6ca46be6851396724fab
[19:41:26] grail: well i would if any of the gist links worked for me :(
[19:41:37] Radar: grail: Looks like it works for dopie
[19:41:38] dopie: I have a method called create_vips , which is present in both photos and events... which are private
[19:42:06] dopie: I can put this in application helper so I don't break the DRY principle
[19:42:16] dopie: but they cease from being private correct?
[19:42:43] grail: yes i see that, but the dns error is stopping me from getting there :(
[19:42:55] grail: DNS_PROBE_FINISHED_NXDOMAIN
[19:43:05] Radar: grail: pastie.org
[19:43:09] dopie: But I don't want the create_vips method to be accessible from other classes
[19:43:13] dopie: what would I do?
[19:43:16] Radar: dopie: put it in ApplicationController. Helpers are for views.
[19:44:32] Synthead: Radar: how do I toss that query into AR as you mentioned? I'm giving it a shot by giving it to .where(), but I'm not able to get it to work
[19:45:01] dopie: Radar, oops your right
[19:45:06] dopie: do I put private in it as well?
[19:45:35] roshanavand: has joined #RubyOnRails
[19:45:49] nyaa: has joined #RubyOnRails
[19:46:27] christiandsg: has joined #RubyOnRails
[19:46:42] sonofdirt: has joined #RubyOnRails
[19:49:52] slash_me: dopie: yes.. my rule of thumb for methods residing in controllers is: if there's a route to it, public; otherwise, private.
[19:50:21] dopie: slash_me, thanks :)
[19:50:37] colleenmcguckin: has joined #RubyOnRails
[19:50:48] drbayer: has joined #RubyOnRails
[19:50:49] safety_cut: has joined #RubyOnRails
[19:51:09] grail: Radar: here you go :- http://pastie.org/10616814
[19:51:45] syzygy_: has joined #RubyOnRails
[19:52:04] raunicolae: has joined #RubyOnRails
[19:52:12] grail: and error message is : Missing partial devise/categories/_category
[19:53:29] grail: on paste provided, the error line points to line 21
[19:53:43] shanemcd: has joined #RubyOnRails
[19:54:12] grail: and the 'Login' link is the one causing the error
[19:54:13] towski_: has joined #RubyOnRails
[19:55:23] raunicolae: has left #RubyOnRails: ()
[19:55:50] ascarter: has joined #RubyOnRails
[19:56:37] blackmesa: has joined #RubyOnRails
[19:56:54] KensoDev_: has joined #RubyOnRails
[19:57:00] ql6wlld: has joined #RubyOnRails
[19:57:50] joshsmith: has joined #RubyOnRails
[19:58:03] SanguineAnomaly: has joined #RubyOnRails
[19:58:32] fox_mulder_cp: grail: partial view nor found...
[19:59:19] grail: yes i get that, however I do not understand why it is looking in devise directory when it is called from categories?
[19:59:59] |PiP|: has joined #RubyOnRails
[20:00:14] nyaa: has joined #RubyOnRails
[20:00:48] nyaa: has joined #RubyOnRails
[20:00:58] Regulati_: has joined #RubyOnRails
[20:02:28] jeffrabovsky: has joined #RubyOnRails
[20:02:31] |PiP|: I have Location records that are a long/lat + a radius (stored on the record). How can I find whether a specific location falls within the bounds of another location (within it???s radius). i???m trying to use geokit
[20:03:22] berserk_ren: has joined #RubyOnRails
[20:03:28] cac: has joined #RubyOnRails
[20:03:38] Oliphaunte: has joined #RubyOnRails
[20:04:08] jmimi: grails: use <%= render partial: @categories %>
[20:05:59] yfeldblum: has joined #RubyOnRails
[20:06:02] DoubleMalt: has joined #RubyOnRails
[20:06:58] Oliphaunte: has joined #RubyOnRails
[20:07:35] DoubleMalt: has joined #RubyOnRails
[20:07:40] kadoppe: has joined #RubyOnRails
[20:07:57] grail: jmimi: nope, doesn't like that either
[20:08:12] grail: I have decided to just use an each in the sidebar directly
[20:08:27] jeffrabovsky: has left #RubyOnRails: ()
[20:08:28] grail: guess i will have to come up with using partials another day
[20:08:49] shanemcd: has joined #RubyOnRails
[20:09:05] tubbo: grail: the correct syntax is <%= render @categories %>
[20:09:10] lmdrx: has joined #RubyOnRails
[20:09:13] tubbo: so if that doesn't work, something else is up.
[20:09:41] tubbo: try passing `file:` to tell render what file to use as your partial
[20:09:45] grail: yes i think it is to do with how devise is rendering the login page but not sure why :(
[20:09:52] jmimi: grails: so currently use this <%= render partial: 'categories/_category', collection: @categories %>
[20:09:52] speaking1ode: has joined #RubyOnRails
[20:11:00] tubbo: https://gist.github.com/tubbo/d36ae9be9f7f89e74d0e is what we have in our controller
[20:11:27] dionysus69: has joined #RubyOnRails
[20:11:59] sonofdirt: has joined #RubyOnRails
[20:12:40] arBmind: has joined #RubyOnRails
[20:13:01] grail: jmimi: that seems to have done the trick :)
[20:13:44] fox_mulder_cp: people, what gem i can use with devise, but grants for a app functionality?
[20:13:46] grail: question: is that not the default behavious for when I just do - - <%= render @categories %>
[20:13:55] _Tariq: has joined #RubyOnRails
[20:14:23] sonofdirt: has joined #RubyOnRails
[20:14:57] Oliphaunte: has joined #RubyOnRails
[20:15:05] tubbo: grail: it seems to be looking for a partial file in the 'devise/' namespace
[20:15:14] tubbo: grail: so no, that's not the default behavior.
[20:15:27] grail: fair enough ... thanks all :)
[20:15:34] tubbo: fox_mulder_cp: can you please rephrase your question?
[20:15:45] jmimi: grails: for default behaviour, remove "_" from "_category" partial, then you can you <%= render @categories %>
[20:15:49] nyaa: has joined #RubyOnRails
[20:16:33] stannard: has joined #RubyOnRails
[20:17:02] speaking1ode: has joined #RubyOnRails
[20:17:24] fox_mulder_cp: tubbo: am, i need gem such as 'cancan', for authorized grants for user. admin can delete comments, user can mark as spam, anon can add..
[20:18:27] paulodiniz: has joined #RubyOnRails
[20:18:38] johnny5: has joined #RubyOnRails
[20:20:48] Oliphaunte: has joined #RubyOnRails
[20:21:17] gusrub: has joined #RubyOnRails
[20:21:20] adac: has joined #RubyOnRails
[20:21:49] sandstrom: has joined #RubyOnRails
[20:21:58] tubbo: fox_mulder_cp: lol...sounds like you found one? :P
[20:22:14] Oliphaun_: has joined #RubyOnRails
[20:22:33] Hates_: you probably want cancancan
[20:22:56] tubbo: fox_mulder_cp: check this out https://www.ruby-toolbox.com/categories/rails_authorization
[20:22:59] tubbo: all the choices
[20:23:03] morenoh149: has joined #RubyOnRails
[20:23:04] tubbo: i really hate cancan
[20:23:26] fox_mulder_cp: tubbo: yes, i find daied cancan, its reincarnation cancancan
[20:23:35] FailBit: any passenger users
[20:23:40] tubbo: FailBit: !used
[20:23:40] helpa: FailBit: Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
[20:23:41] FailBit: yall got cve'd
[20:23:44] FailBit: https://blog.phusion.nl/2015/12/07/cve-2015-7519/
[20:23:58] FailBit: tubbo: you know who I am dammit
[20:24:07] FailBit: I'm not gonna do that it's annoying
[20:24:09] tubbo: FailBit: "The app depends on a request header containing a dash (-)" oh so all of them ok thanks
[20:24:18] |PiP|: given a point A (with a radius) on a map, how can i do a query to get all other points (with radiuses) that intersect with point A. I don???t want to just compare points, but points with a radius. I can???t find a way to do this using something like geokit
[20:24:32] lacrymology: I have a model MessageBoard with a has_one relation, telemetry, and I want to sort message boards by telemetry.something, how can I do that?
[20:25:02] lacrymology: notice that it has also many telemetries, and that telemetry is the latest of these. I want to sort message boards by a specific field of their latest telemetry
[20:25:34] fox_mulder_cp: but i can't write my own 'usertype, url, cango' table, where list all links in my app
[20:25:48] djbkd: has joined #RubyOnRails
[20:26:10] fox_mulder_cp: and add true|false for access grants
[20:27:46] dman777_alter: has joined #RubyOnRails
[20:29:28] yardenbar: has joined #RubyOnRails
[20:30:38] tubbo: fox_mulder_cp: did you see my ruby-toolbox link?
[20:30:48] nyaa: has joined #RubyOnRails
[20:30:48] shanemcd: has joined #RubyOnRails
[20:30:57] dman777_alter: I'm having to use angular on the front end. I have to have a link to download a file.....on the rails side I am using send_file() in the controller. On the front end, I am using href but it's not hitting the rails server. Since I can't use link_to(), how can I make the href hit the rails server?
[20:31:01] fox_mulder_cp: tubbo: see it now. thanks
[20:31:29] tubbo: fox_mulder_cp: those are basically the choices you have if you want to use a gem for authorization. my favorite gem out of all those is Pundit, because it's really light and basically lets you define all your own logic in Policy objects.
[20:32:34] WhereIsMySpoon_: has left #RubyOnRails: ()
[20:32:50] fox_mulder_cp: tubbo: thanks, i don't want write my own bike from scratch. )
[20:33:05] tubbo: bikes on rails
[20:34:08] brunto: has joined #RubyOnRails
[20:34:23] fox_mulder_cp: tubbo: see example of codes for pundit, but can't know it... ((
[20:35:26] berserk_ren: has joined #RubyOnRails
[20:35:45] annlewis: has joined #RubyOnRails
[20:37:36] tubbo: fox_mulder_cp: "can't" means "won't" :) it took me a sec too but read the README and wiki, you'll get it.
[20:38:06] paulodiniz: has joined #RubyOnRails
[20:39:04] jetpackjoe: has joined #RubyOnRails
[20:39:25] fox_mulder_cp: tubbo: i read readme from github, but don't understand it, may be becouse have a ~20min's before midnight
[20:40:02] shibabu: has joined #RubyOnRails
[20:40:13] tubbo: i imagine you'll understand more when you read its documentation for more than 2 minutes.
[20:41:03] shanemcd: has joined #RubyOnRails
[20:41:05] arBmind: has joined #RubyOnRails
[20:42:46] nettoweb: has joined #RubyOnRails
[20:43:08] atomical: has joined #RubyOnRails
[20:45:09] Lytol: has joined #RubyOnRails
[20:45:45] jacksparrow007: has joined #RubyOnRails
[20:45:48] nyaa: has joined #RubyOnRails
[20:46:52] jetpackjoe: has joined #RubyOnRails
[20:49:38] lmdrx: has joined #RubyOnRails
[20:50:22] johnflux_: has joined #RubyOnRails
[20:50:22] johnflux_: has joined #RubyOnRails
[20:51:15] shanemcd: has joined #RubyOnRails
[20:51:23] berserk_ren: has joined #RubyOnRails
[20:51:40] SalexW: has joined #RubyOnRails
[20:51:42] axl__: has joined #RubyOnRails
[20:53:10] adac: has joined #RubyOnRails
[20:54:34] Pazician: has joined #RubyOnRails
[20:55:12] baweaver: has joined #RubyOnRails
[20:56:37] bronson: has joined #RubyOnRails
[20:56:41] sbarg: has joined #RubyOnRails
[20:57:05] Oliphaunte: has joined #RubyOnRails
[20:57:55] tweeeaks: has joined #RubyOnRails
[20:58:20] arBmind: has joined #RubyOnRails
[20:58:51] gusrub: has joined #RubyOnRails
[20:59:04] djbkd: has joined #RubyOnRails
[20:59:23] dman777_alter: on a non templating front end, can href be used to grab files from a rails server? or only webserver such as nginx?
[21:00:49] nyaa: has joined #RubyOnRails
[21:02:14] tubbo: dman777_alter: wat
[21:03:16] dman777_alter: tubbo: doesn't href for file downloads use only a webserver such as nginx?
[21:05:27] hahuang65: has joined #RubyOnRails
[21:05:36] Sawbones: has joined #RubyOnRails
[21:06:28] shibabu: has joined #RubyOnRails
[21:06:47] fox_mulder_cp: href = url. in urlmay be http, https, ftp, webdav... skype..
[21:07:04] tildes: has joined #RubyOnRails
[21:07:07] renegadeandy: has joined #RubyOnRails
[21:07:26] rubyonrailed: has joined #RubyOnRails
[21:07:38] tubbo: dman777_alter: web servers default to returning a static file, then it "falls back" to dynamically-generated content, e.g. your rails app.
[21:08:21] pantaleon: has joined #RubyOnRails
[21:08:33] tubbo: dman777_alter: so, for example, if i made a file on your server called /var/www/hello.html, and i requested http://your.box/hello.html, it wouldn't even hit the rails app...it would just render hello.html.
[21:09:19] tubbo: dman777_alter: that's also kind-of how rack-cache (or any HTTP cache, really) works. http says "i have this route and these headers", and the cache server can either find a match in the proper expiry zone, or it can't and it delegates back to the app to generate the content dynamically.
[21:09:45] unreal: has joined #RubyOnRails
[21:11:19] shanemcd: has joined #RubyOnRails
[21:12:38] alevy: has joined #RubyOnRails
[21:13:03] dman777_alter: tubbo: I have a download controller that uses send_file().... is it possible to make a href link hit it?
[21:13:30] dman777_alter: tubbo: instead of get ajax call?
[21:13:47] owenjones: has joined #RubyOnRails
[21:14:05] tubbo: dman777_alter: yes
[21:14:14] tubbo: anything is possibllllllllllllllllllllllllllllllllllllllllllllllllllllllle
[21:15:49] nyaa: has joined #RubyOnRails
[21:15:52] ascarter: has joined #RubyOnRails
[21:16:16] yardenbar: has joined #RubyOnRails
[21:16:17] _Tariq: has joined #RubyOnRails
[21:17:05] quazimodo: has joined #RubyOnRails
[21:17:39] hadees: has joined #RubyOnRails
[21:17:52] hadees: has left #RubyOnRails: ()
[21:19:40] fox_mulder_cp: heh. in my asp.net mvc web app for a personal finances i have a some methods, which dump sql content to xml and send in with proper xml file headers
[21:19:51] versatiletech: has joined #RubyOnRails
[21:20:21] fox_mulder_cp: and after press link browser says 'please, select folder and file name to save'
[21:20:53] arcanez: why won't active record let me set the :primary_key for a has_one through? the code in associations.rb 'def create_has_one_through_reflection' seems to make :primary_key an invalid key
[21:21:34] fox_mulder_cp: arcanez: u use integer default id or want use uuid as id?
[21:21:56] hardtail: has joined #RubyOnRails
[21:22:00] atomical_: has joined #RubyOnRails
[21:22:11] arcanez: fox_mulder_cp: well, the PK is <table_name>_id, but for this join to work, I want to use another _id column in the table
[21:23:09] roshanavand: has joined #RubyOnRails
[21:23:15] fox_mulder_cp: arcanez: redefine id in migrations, i see a tonn of examples in google today
[21:24:01] SteenJobs: has joined #RubyOnRails
[21:24:04] tubbo: arcanez: isn't the correct config option `foreign_key:`?
[21:24:25] tubbo: arcanez: as in, has_one :something, foreign_key: :foo_id?
[21:24:38] atomical: has joined #RubyOnRails
[21:24:51] waka: has joined #RubyOnRails
[21:26:11] djbkd_: has joined #RubyOnRails
[21:26:47] atomical_: has joined #RubyOnRails
[21:27:21] zpe: has joined #RubyOnRails
[21:27:47] akshat: has joined #RubyOnRails
[21:27:52] arcanez: doesn't foreign_key just specify the column to use for the other end?
[21:27:57] arcanez: it'll do pk = fk
[21:28:22] arcanez: and for this association, I want the pk to be different.
[21:30:26] edwinvdgraaf: has joined #RubyOnRails
[21:30:49] nyaa: has joined #RubyOnRails
[21:31:54] juddey: has joined #RubyOnRails
[21:32:00] claytonzaugg: has joined #RubyOnRails
[21:32:48] sleungcy: Hi, how come my controller doesn't url_decode the parameter params[:job_key]?
[21:32:51] sleungcy: https://gist.github.com/sleung-ttc/3d56c78a44919b90920e
[21:33:22] sleungcy: The request uri has %3D in the param, but the log doesn't have it decoded?
[21:34:02] pulgalip1: has joined #RubyOnRails
[21:35:22] twilling: has joined #RubyOnRails
[21:35:42] naftilos76: has joined #RubyOnRails
[21:35:44] IrishGringo: has joined #RubyOnRails
[21:36:23] rhizome: sleungcy: "Cannot render console..."
[21:36:30] annlewis: has joined #RubyOnRails
[21:39:06] B1n4r10: has joined #RubyOnRails
[21:40:28] paulodiniz: has joined #RubyOnRails
[21:41:33] helpa: has joined #RubyOnRails
[21:43:31] svoop: has joined #RubyOnRails
[21:44:52] ur5us: has joined #RubyOnRails
[21:45:08] lacuna: has joined #RubyOnRails
[21:45:08] lacuna: has joined #RubyOnRails
[21:45:24] twilling: has joined #RubyOnRails
[21:45:49] nyaa: has joined #RubyOnRails
[21:47:05] bronson: has joined #RubyOnRails
[21:48:12] christia1: has joined #RubyOnRails
[21:49:47] allcentury: has joined #RubyOnRails
[21:49:54] versatiletech: has joined #RubyOnRails
[21:52:42] sleungcy: has joined #RubyOnRails
[21:55:27] sankaber: has joined #RubyOnRails
[21:57:37] htmldrum: has joined #RubyOnRails
[22:00:49] nyaa: has joined #RubyOnRails
[22:01:50] matrixise: has joined #RubyOnRails
[22:02:10] B1n4r10: has joined #RubyOnRails
[22:03:23] christiandsg: has joined #RubyOnRails
[22:03:26] rubyonrailed: has joined #RubyOnRails
[22:04:42] safety_cut: has joined #RubyOnRails
[22:04:44] cnk: has joined #RubyOnRails
[22:05:51] twilling: has joined #RubyOnRails
[22:07:31] nettoweb: has joined #RubyOnRails
[22:08:51] i: has joined #RubyOnRails
[22:08:57] shanemcd: has joined #RubyOnRails
[22:11:38] lacrymology: has joined #RubyOnRails
[22:11:58] lacrymology: has joined #RubyOnRails
[22:12:54] tvw: has joined #RubyOnRails
[22:13:34] christia1: has joined #RubyOnRails
[22:14:52] sleungcy: has joined #RubyOnRails
[22:15:02] _Tariq: has joined #RubyOnRails
[22:15:48] nyaa: has joined #RubyOnRails
[22:16:18] lemur: has joined #RubyOnRails
[22:19:30] markh: has joined #RubyOnRails
[22:21:29] jbrhbr: has joined #RubyOnRails
[22:21:51] Rumbles: has joined #RubyOnRails
[22:21:53] mary5030: has joined #RubyOnRails
[22:23:09] jmrepetti: has joined #RubyOnRails
[22:23:47] juddey: has joined #RubyOnRails
[22:25:47] SteenJobs: has joined #RubyOnRails
[22:29:25] quazimodo: has joined #RubyOnRails
[22:29:29] quazimod1: has joined #RubyOnRails
[22:30:08] SteenJobs: has joined #RubyOnRails
[22:30:13] lacrymology: I have a model Foo that has_many :bars and also has_one :bar, { order_by(:created_at).first } (so the newest of myFoo.bars). I'd like to select Foos, ordered by one of the latest bar's fields
[22:30:14] sevenseacat: has joined #RubyOnRails
[22:30:50] nyaa: has joined #RubyOnRails
[22:30:59] syzygy_: has joined #RubyOnRails
[22:31:24] yfeldblum: has joined #RubyOnRails
[22:32:23] drbayer: has joined #RubyOnRails
[22:33:58] johnflux_: has joined #RubyOnRails
[22:33:59] johnflux_: has joined #RubyOnRails
[22:34:49] Coldblackice: has joined #RubyOnRails
[22:36:44] drbayer_: has joined #RubyOnRails
[22:37:17] annlewis: has joined #RubyOnRails
[22:38:29] SteenJobs: has joined #RubyOnRails
[22:39:49] teclator: has joined #RubyOnRails
[22:43:37] unreal_: has joined #RubyOnRails
[22:44:08] ewnd9_: has joined #RubyOnRails
[22:45:49] nyaa: has joined #RubyOnRails
[22:46:30] |PiP|: has joined #RubyOnRails
[22:46:37] jacksparrow007: has joined #RubyOnRails
[22:46:56] _Tariq: has joined #RubyOnRails
[22:47:26] _Tariq: has joined #RubyOnRails
[22:49:24] Cohedrin: hey all, trying to update to activemodel serializers .10 from .8, having a bit of trouble with the loss of the root key
[22:49:34] Cohedrin: is there a way to include it without using the json adapter?
[22:50:11] allcentury: has joined #RubyOnRails
[22:50:37] arooni: has joined #RubyOnRails
[22:52:30] ap4y: has joined #RubyOnRails
[22:53:30] lacrymology: is there an easy way for me to get the create table query for a model?
[22:54:16] helpa: Please do not use fake values, as they can be confusing or misleading. Sometimes both.
[22:54:31] KensoDev: has joined #RubyOnRails
[22:55:24] edwinvdg_: has joined #RubyOnRails
[22:55:38] Pazician: has joined #RubyOnRails
[22:57:55] NotTheFBI: has joined #RubyOnRails
[22:59:33] owenjones: has joined #RubyOnRails
[23:00:01] shanemcd: has joined #RubyOnRails
[23:00:50] nyaa: has joined #RubyOnRails
[23:04:11] annlewis: has joined #RubyOnRails
[23:05:14] twilling: has joined #RubyOnRails
[23:05:33] shanemcd: has joined #RubyOnRails
[23:06:04] jbrhbr: has joined #RubyOnRails
[23:06:26] cajone: has left #RubyOnRails: ()
[23:09:12] SalexW: has joined #RubyOnRails
[23:09:34] jmrepetti: has joined #RubyOnRails
[23:10:09] safety_cut: has joined #RubyOnRails
[23:10:18] atomical: has joined #RubyOnRails
[23:12:30] m3_del: has joined #RubyOnRails
[23:13:08] Ropeney: has joined #RubyOnRails
[23:13:54] atomical_: has joined #RubyOnRails
[23:14:59] shibabu: has joined #RubyOnRails
[23:15:13] FooMunki: has joined #RubyOnRails
[23:15:44] jmimi: has joined #RubyOnRails
[23:15:50] nyaa: has joined #RubyOnRails
[23:16:08] jessemcgilallen: has joined #RubyOnRails
[23:17:32] diegoviola: has joined #RubyOnRails
[23:18:22] lacuna: has joined #RubyOnRails
[23:21:19] Croves: has joined #RubyOnRails
[23:21:52] m3nd3s: has joined #RubyOnRails
[23:25:53] nettoweb: Hello guys, Im trying to setup two different apps (Ruby on rails) on Digital Ocean using Nginx+Unicorn, but ther server is showing me UNRESOLVED, some problem with port 80 I think.
[23:26:00] nhhagen: has joined #RubyOnRails
[23:26:02] nettoweb: Here is my conf: https://gist.github.com/osnysantos/e4ec8d5ecc3931c34b1f
[23:26:06] jbrhbr: has joined #RubyOnRails
[23:27:17] raldu: has joined #RubyOnRails
[23:27:39] MEATCHICKEN: has joined #RubyOnRails
[23:27:56] Radar: nettoweb: what is eferred
[23:27:58] djbkd_: has joined #RubyOnRails
[23:28:10] Radar: There is no reference to effered in nginx's documentation anywhere
[23:28:12] Cohedrin: https://gist.github.com/osnysantos/e4ec8d5ecc3931c34b1f#file-nginx-conf-L11
[23:28:33] ascarter: has joined #RubyOnRails
[23:29:04] nickjj: you're also missing a semi-colon on 12
[23:29:21] maesitos: has joined #RubyOnRails
[23:29:25] nettoweb: fixe but same problem
[23:29:33] MEATCHICKEN: A model attribute called date -> good or bad idea?
[23:29:40] nettoweb: This webpage is not available - ERR_CONNECTION_REFUSED
[23:29:41] MEATCHICKEN: Specifically - for an invoice's date
[23:30:06] Radar: nettoweb: Check nginx's logs.
[23:30:20] Radar: Likely you've misconfigured more than just that one line
[23:30:37] nettoweb: duplicate listen options for 0.0.0.0:80 in /etc/nginx/sites-enabled/default:39
[23:30:44] Radar: Well there you gol.
[23:30:49] nyaa: has joined #RubyOnRails
[23:30:51] nettoweb: I need to specify anything else?
[23:31:22] nettoweb: after listen 80 ... ?
[23:32:22] christiandsg: has joined #RubyOnRails
[23:33:12] jimmybomb: has joined #RubyOnRails
[23:33:44] jimmybomb: hey guys, im building a web api, is it okay for one api controller to use multiple services ?, eg ProductController has ProductService and CoffeeService and use them both? or is ths considered as a smell? (is it ok for controller to have some business logic?)
[23:34:12] ramfjord: has joined #RubyOnRails
[23:36:32] Cohedrin: is it ok? yeah its not going to kill your app. Should you do it? Probably not, especially if you're building it right now
[23:36:34] twilling: has joined #RubyOnRails
[23:36:43] Cohedrin: it would make your life a lot easier down the road if you didn't do that
[23:37:07] jimmybomb: is there a reason why ?
[23:37:42] Cohedrin: is there a reason why you shouldn't use 1 api controller to do multiple things?
[23:38:24] Cohedrin: what kind of "service" is this
[23:38:49] Cohedrin: for example, what happens when you send a post request to the product service, and what happens when you send a post request to the coffeservice
[23:39:01] Tempesta: has joined #RubyOnRails
[23:39:26] threeminutemonta: has joined #RubyOnRails
[23:40:02] jimmybomb: ok, hmm ill be more specific. the problem goes like this, lets say i have a cookingcontroller, and a cookingservice is inside the cooking controller, cookingservice has a function called cook() and cook() needs to cook potato and salad, to avoid code duplication i wanted to put potatoservice and saladservice inside cookingservice so i can use them in cook() but it seems like a smell.
[23:40:44] mary5030_: has joined #RubyOnRails
[23:40:59] Coldblackice: has joined #RubyOnRails
[23:41:05] Cohedrin: CookieService, what is this?
[23:41:17] Cohedrin: is this a module, a model...?
[23:41:22] maesitos: has joined #RubyOnRails
[23:41:26] jimmybomb: its like a module
[23:41:45] Spami: has joined #RubyOnRails
[23:42:02] jimmybomb: imagine you have a cookie document
[23:42:04] Cohedrin: ok: when I send a post request to cooking controller, it cooks my food?
[23:42:11] jimmybomb: cookie service is the one that do update create cookie documents
[23:42:56] jimmybomb: yeah ok so if you post api/cook, it is supposed to update cookdocument, potatodocument and create saladdocument
[23:43:16] Cohedrin: What are your models in this?
[23:43:18] exadeci: has joined #RubyOnRails
[23:43:28] helpa: Please do not use fake values, as they can be confusing or misleading. Sometimes both.
[23:44:07] jimmybomb: cook, potato and salad in this example
[23:44:22] jimmybomb: cookdoc, potatodoc and saladdoc*
[23:44:34] Cohedrin: what would make more sense
[23:45:19] Cohedrin: is to just have one recipie controller
[23:45:30] Cohedrin: then just extract the cooking logic to the model
[23:45:43] Cohedrin: then just find the model by id when you send the request
[23:45:47] Cohedrin: and call cook on the model
[23:45:49] nyaa: has joined #RubyOnRails
[23:47:12] jimmybomb: hmm, yeah the thing is our models are dumb atm
[23:47:14] jimmybomb: theyre just pocos
[23:47:29] bronson: has joined #RubyOnRails
[23:47:32] wildlander: has joined #RubyOnRails
[23:48:12] wildlander: has joined #RubyOnRails
[23:48:14] jimmybomb: and thats why we have services to do these things, but yeah i see what you're saying but alot of the stuff are already done that way :S
[23:48:20] rromanchuk: has joined #RubyOnRails
[23:49:17] jimmybomb: if i extract the business logic to the model, does that mean the model would have to contain some sort of dbconnection ? to save/create the docs to the db
[23:50:44] Radar: race conditionnnnnnnnnsssss
[23:51:02] rromanch_: has joined #RubyOnRails
[23:52:14] mary5030: has joined #RubyOnRails
[23:52:50] baweaver: has joined #RubyOnRails
[23:54:26] Cohedrin: I dont understand what that last question is
[23:54:44] Cohedrin: models inheriently can access the database in rails if thats what you're asking
[23:54:53] jscheel: has joined #RubyOnRails
[23:55:27] Radar: nobody understands anything
[23:55:38] sevenseacat: I have not had enough caffeine for this
[23:57:54] jgt2: has joined #RubyOnRails
[23:58:31] jimmybomb: yeah, sorry im not writing in rails but in .net instead >< its a generic api question but yeah i couldnt get any answer from c# channel. so, thanks alot for your answer
[23:58:44] D9: has joined #RubyOnRails
[23:59:05] Croves: has joined #RubyOnRails
[23:59:19] jetpackjoe: has joined #RubyOnRails