« Back to channel list

#RubyOnRails - 17 November 2015

« Back 1 day Forward 1 day »
[00:00:05] Pazician: has joined #RubyOnRails
[00:00:44] Megamos: has joined #RubyOnRails
[00:02:20] rgrmatt: has joined #RubyOnRails
[00:03:07] diegoviola: workmad3: worked perfectly, thanks
[00:03:23] arthurix_: has joined #RubyOnRails
[00:05:15] njero: has joined #RubyOnRails
[00:05:34] moei: has joined #RubyOnRails
[00:05:45] notnoyyyyy: has joined #RubyOnRails
[00:06:07] neanderslob: has joined #RubyOnRails
[00:06:52] messine: has joined #RubyOnRails
[00:08:20] Janno: has joined #RubyOnRails
[00:10:13] nya: has joined #RubyOnRails
[00:15:20] maxz: has joined #RubyOnRails
[00:17:50] kies: has joined #RubyOnRails
[00:20:08] Megamos: has joined #RubyOnRails
[00:20:40] roxtrongo: has joined #RubyOnRails
[00:20:55] AnoHito: has joined #RubyOnRails
[00:21:17] mghaig: has joined #RubyOnRails
[00:22:45] yfeldblum: has joined #RubyOnRails
[00:24:15] flashpoint9: has joined #RubyOnRails
[00:26:09] doodlehaus: has joined #RubyOnRails
[00:28:02] bartj3: has joined #RubyOnRails
[00:29:04] K_r3aPeR: has joined #RubyOnRails
[00:30:33] annlewis: has joined #RubyOnRails
[00:33:39] rgrmatt: has joined #RubyOnRails
[00:34:02] juddey: has joined #RubyOnRails
[00:36:00] trosborn: has joined #RubyOnRails
[00:37:00] doodlehaus: has joined #RubyOnRails
[00:38:16] Scriptonaut: has left #RubyOnRails: ()
[00:39:52] bambanx: has joined #RubyOnRails
[00:40:35] borgizzleyo: has joined #RubyOnRails
[00:41:40] Pazician: has joined #RubyOnRails
[00:42:40] FailBit: is apidock being ddosed?
[00:43:28] borgizzle: has joined #RubyOnRails
[00:43:32] Radar: Not any more. Aeyrix just turned it off.
[00:43:41] Aeyrix: Sorry, I was testing some stuff.
[00:43:43] Aeyrix: It's back up now.
[00:44:31] Aeyrix: Reminder to everyone that Puma is objectively the best server.
[00:44:51] rhizome: easy to turn off? :P
[00:45:26] FailBit: >not using unicorn
[00:46:01] trosborn: has joined #RubyOnRails
[00:46:04] njero: hey.. all ears for best server :)
[00:46:20] FailBit: obvs passenger phusion enterprise is best server
[00:46:22] FailBit: because monies
[00:46:25] Radar: Puma or Unicorn
[00:46:33] Radar: I can't choose between the two
[00:46:38] Radar: Passenger Enterprise is lolz
[00:46:44] FailBit: puma if you like threads
[00:46:48] FailBit: unicorn if you like processes
[00:47:06] njero: FailBit: how would i know which to like?
[00:47:13] FailBit: depends on how much ram you got
[00:47:33] njero: FailBit: if ram is low then?
[00:47:34] FailBit: and note that puma running on MRI will have to deal with the GVL
[00:47:39] FailBit: n_e_o: puma
[00:47:43] FailBit: if RAM is not an issue, unicorn
[00:48:03] njero: FailBit: and performance?
[00:48:14] FailBit: varies depending on worklolad
[00:48:15] mghaig: has joined #RubyOnRails
[00:48:30] FailBit: for common cases there is no substantial difference between the two
[00:48:36] njero: FailBit: k
[00:49:08] Aeyrix: 11:46 AM <FailBit> obvs passenger phusion enterprise is best server
[00:49:12] Aeyrix: >Passenger Phusion
[00:49:14] Aeyrix: FailBit please
[00:49:44] njero: FailBit: Radar Aeyrix I'm thinking of aws for hosting.. is that ok? or any better ones
[00:50:00] Radar: n_e_o: I've never tried it myself.
[00:50:09] njero: Radar: hm
[00:50:21] Radar: n_e_o: I host all my stuff on a Digital Ocean box.
[00:50:51] njero: Radar: isn't it costlier?
[00:50:53] Aeyrix: I host all my stuff myself.
[00:50:54] Aeyrix: n_e_o: no
[00:51:00] Aeyrix: AWS is by far and away the most expensive.
[00:51:04] njero: Aeyrix: k
[00:51:06] Aeyrix: It's about 3x the price.
[00:51:29] jhn: has joined #RubyOnRails
[00:52:50] njero: Aeyrix: I'm part of a startup.. Was thinking of some base configuration and then scale as needed. Aws gives that provision.. Also around 65k mail per month for year..
[00:53:34] Aeyrix: I use Mandrill for mail.
[00:53:39] Aeyrix: I like separating my concerns.
[00:54:05] njero: Aeyrix: I'm blind about concerns :(
[00:54:22] Aeyrix: n_e_o: You'll regret it.
[00:54:44] njero: Aeyrix: oops.. gonna check rt now :)
[00:55:35] triangles: has joined #RubyOnRails
[00:55:45] teedash: has joined #RubyOnRails
[00:55:50] CodingWolf: has joined #RubyOnRails
[00:56:10] njero: Aeyrix: nothing in rails guide :(
[00:56:16] njero: Aeyrix: what is that for?
[00:56:46] teedash: hey, anybody care to share their thoughts on shoppe vs. spree?
[00:56:56] teedash: I was leaning more towards spree
[00:57:33] Aeyrix: n_e_o: Mandrill is a mail service.
[00:57:34] rgrmatt: has joined #RubyOnRails
[00:57:39] Aeyrix: https://mandrillapp.com/
[00:57:54] njero: Aeyrix: k.. but concern?
[00:58:04] Ropeney: has joined #RubyOnRails
[00:59:09] njero: Aeyrix: i didn't get u.. is concern related with rails or mails?
[00:59:32] Aeyrix: Concern is a development or project management concept.
[00:59:38] Aeyrix: A concern is like a piece of your puzzle.
[00:59:51] RegulationD: has joined #RubyOnRails
[01:00:20] njero: Aeyrix: what it has to do with a rails app?
[01:00:33] rgtk: has joined #RubyOnRails
[01:00:46] Aeyrix: n_e_o: https://en.wikipedia.org/wiki/Separation_of_concerns
[01:01:29] njero: :( .. Theoretical computer science
[01:02:06] Aeyrix: If you don't understand the concept of concern separation I genuinely worry for your startup.
[01:02:16] Palsson: has joined #RubyOnRails
[01:02:19] bambanx: guys using bootstrap and masonry , i have this problem, http://www.bdtesting.pw/ when i hit refresh the page it first show the images in a single column , after that load nice as masonry grid, looks like bootstrap is loading firs
[01:02:26] rgtk: has joined #RubyOnRails
[01:02:34] bambanx: my js files http://pastebin.com/DDPkZ1mk
[01:02:36] njero: Aeyrix: dude.. (
[01:03:03] njero: i told yall.. help is definitely a bot :P
[01:03:14] owenjones: has joined #RubyOnRails
[01:03:17] Aeyrix: !botsnack
[01:03:17] helpa: Nom nom. Thanks, Aeyrix!
[01:03:41] one_zero: has joined #RubyOnRails
[01:04:08] FailBit: <n_e_o> FailBit: Radar Aeyrix I'm thinking of aws for hosting.. is that ok? or any better ones
[01:04:10] FailBit: don't do that
[01:04:16] FailBit: you'll blow so much money
[01:04:20] rgtk: has joined #RubyOnRails
[01:04:33] FailBit: literally get a dedi from DO and save yourself some bucks
[01:05:02] njero: FailBit: let me check.. thanks :)
[01:05:08] Aeyrix: dedi from do
[01:05:14] Aeyrix: failbit high how are you
[01:05:15] gusrub: has joined #RubyOnRails
[01:05:22] FailBit: I just ate some brownies, Aeyrix
[01:05:25] FailBit: they were great
[01:05:28] FailBit: no, really
[01:05:32] FailBit: I'm actually stoned
[01:05:57] bambanx: stoned means drug?
[01:06:16] rgtk: has joined #RubyOnRails
[01:06:37] dideler: has joined #RubyOnRails
[01:06:45] njero: FailBit: Aeyrix do is digital ocean rt?
[01:06:56] ewnd9: has joined #RubyOnRails
[01:07:04] Aeyrix: DO is okay. They're cheap.
[01:07:15] Aeyrix: $5 and no unexpected billing increases if you don't set it up properly.
[01:07:43] njero: is all listing dedicated servers? I could n't find any category for dedicated
[01:08:02] bambanx: guys any help, not sure how fix load order http://www.bdtesting.pw/
[01:08:11] rgtk: has joined #RubyOnRails
[01:08:27] FailBit: bambanx: ?
[01:08:38] Aeyrix: bambanx: Loading that has no problems for me, to be honest.
[01:08:40] Aeyrix: It worked fine.
[01:08:52] njero: FailBit: then where is dedi :(
[01:08:57] bambanx: the page load
[01:09:04] bambanx: but hit refresh
[01:09:06] Aeyrix: n_e_o: Amazon isn't dedicated either.
[01:09:10] Aeyrix: bambanx: Nothing changed.
[01:09:15] bambanx: see the images first show in one column
[01:09:19] bambanx: then arrange
[01:09:39] Aeyrix: It takes half a second but that's because your JS has to load and execute.
[01:09:54] FailBit: if you are freaking out
[01:10:00] Aeyrix: You can't really fix that without instead recreating the masonry plugin with CSS attributes.
[01:10:02] rgtk: has joined #RubyOnRails
[01:10:08] njero: Aeyrix: yeah
[01:10:11] FailBit: make your blocks inline-block so they lay out horizontally before the JS executes
[01:10:28] Aeyrix: That will cause problems, however
[01:10:33] Aeyrix: with rows
[01:10:34] bambanx: is not a more elegant aproach?
[01:10:39] Aeyrix: unless i was just a moron when i did it
[01:10:42] Aeyrix: someone confirm?
[01:10:49] FailBit: masonry is finicky
[01:10:50] bambanx: i though maybe put a loading progress
[01:11:15] Aeyrix: Nah I didn't use masonry
[01:11:18] Aeyrix: I used flex-box.
[01:11:27] Aeyrix: Flex and display:inline-block
[01:11:55] rgtk: has joined #RubyOnRails
[01:12:08] doodlehaus: has joined #RubyOnRails
[01:12:22] Aeyrix: But I had issues with content using variable heights.
[01:13:19] yfeldblum: has joined #RubyOnRails
[01:13:47] rgtk: has joined #RubyOnRails
[01:14:19] baweaver: has joined #RubyOnRails
[01:15:09] yoongkang: has joined #RubyOnRails
[01:15:17] towski_: I can't figure out what cancan is doing
[01:15:28] workmaster2n: has joined #RubyOnRails
[01:15:30] nya: has joined #RubyOnRails
[01:15:36] towski_: I'm hitting the #update method in my controller
[01:15:42] rgtk: has joined #RubyOnRails
[01:15:47] towski_: and the authorize_resource is doing :show
[01:15:58] towski_: checking the :show permissions
[01:16:25] bambanx: cancan sound like a dog name :D
[01:16:46] FailBit: it sounds like a song name
[01:16:55] FailBit: that's because it _is_ one.
[01:17:25] bambanx: guys loading spin may help?
[01:17:31] Aeyrix: It's also a dance.
[01:17:38] rgtk: has joined #RubyOnRails
[01:18:05] flip_digits: has joined #RubyOnRails
[01:18:14] towski_: I suppose bemusement is better than being trolled
[01:18:24] Aeyrix: bambanx: I'm out for lunch right now. When I get back let me try something.
[01:18:29] pwnd_nsfw: has joined #RubyOnRails
[01:18:29] towski_: i don't like cancan
[01:18:38] VeryBewitching: Can someone explain why the component_spec_failing.rb in this Gist fails where component_spec_passing.rb passes?
[01:18:39] bambanx: okey man thanks Aeyrix
[01:18:40] Aeyrix: Then don't use it.
[01:18:48] VeryBewitching: https://gist.github.com/bewitchingme/9619c1ff750b05c01a78
[01:19:30] rgtk_: has joined #RubyOnRails
[01:19:39] Ropeney: has joined #RubyOnRails
[01:20:40] Ropeney: anyone had elasticsearch complain no analyzers are found when creating indexes?
[01:20:46] bambanx: any nice easy gem for preloading images guys?
[01:21:16] stannard: has joined #RubyOnRails
[01:21:22] rgtk: has joined #RubyOnRails
[01:22:00] test_user384: has left #RubyOnRails: ()
[01:23:19] rgtk: has joined #RubyOnRails
[01:24:35] Aeyrix: I really wish I had a physical keypad on my phone.
[01:24:47] Aeyrix: My hands are just too big for phone touchscreens.
[01:25:00] acovrig: has joined #RubyOnRails
[01:25:04] bambanx: me too Aeyrix
[01:25:11] rgtk: has joined #RubyOnRails
[01:26:01] bambanx: i was researching for one hand keyboard, founded this http://twiddler.tekgear.com/
[01:26:04] FailBit: Ropeney: you need to give me a bunch of information
[01:26:18] FailBit: let's start with elastic version and your mappings
[01:26:46] HalcyonicStorm: has joined #RubyOnRails
[01:26:50] FailBit: Aeyrix: that's why <3 swype keyboards
[01:27:07] rgtk: has joined #RubyOnRails
[01:27:13] acovrig: how do I customize CSS for devise? I want the change the background-color just for the login page, nothing else; I tried creating a {devise,users,registrations,sessions}.css in the assets/stylesheets folder but it doesn???t seem to use it???
[01:28:30] cashnguns: has joined #RubyOnRails
[01:28:35] FailBit: acovrig: generate devise views, load it in view, bam done
[01:28:41] Ropeney: FailBit: Im hoping its more generic, cause i've tried 3 versions: 0.9.3, 0.9.13, 1.1.4, 1.7.2. I'm using spree_elasticsearch gem that was working yesterday and no code changes then suddenly i turn on laptop today all not working. The error is nested: MapperParsingException[Analyzer [nGram_analyzer] not found for field [name]] and it is the same with any other analyzer.
[01:28:44] acovrig: rails g devise:views creates the .htm.erb files, but shouldn???t CSS go in the head? so I???m thinking I shouldn???t put a style_tag in the sessions/new.html.erb
[01:29:02] rgtk: has joined #RubyOnRails
[01:29:04] FailBit: Ropeney: (holy shit that elastic is old) what's your mapping
[01:29:09] acovrig: FailBit: wouldn???t that put CSS in the body, after the CSS in application.css specifying a different color?
[01:29:10] FailBit: I need your mapping definition
[01:29:34] FailBit: acovrig: make clearer your intentions
[01:29:37] Ropeney: FailBit: https://github.com/javereec/spree_elasticsearch/blob/master/app/models/spree/product_decorator.rb
[01:29:48] Ropeney: FailBit: its all i really have on it
[01:29:49] FailBit: do you want to have it styled as part of application.css, or as part of the page?
[01:30:50] acovrig: FailBit: I want to specify a background-color in my application.css for site-wide, then specify a different background-color for the sessions/new.html.erb
[01:30:51] rgtk: has joined #RubyOnRails
[01:30:51] FailBit: Ropeney: try changing nGram to ngram
[01:30:58] rgrmatt: has joined #RubyOnRails
[01:31:03] Aeyrix: I have it failbit, but even then
[01:31:28] annlewis: has joined #RubyOnRails
[01:31:33] FailBit: acovrig: *shrug* use inline css or include the css in the page
[01:31:43] FailBit: I mean if it won't kill you?
[01:31:57] acovrig: OK, I was thnking it was bad practice to put a <style> tag in the <body> of a page
[01:32:00] robbyoconnor: has joined #RubyOnRails
[01:32:07] bambanx: guys u know a nice gem for nice loading images?
[01:32:12] bambanx: like a preloader
[01:32:18] Ropeney: FailBit: Same error, if i delete it i get whitespace_analyzer not found. It's like elasticsearch has lost all its analyzers somehow
[01:32:30] FailBit: try whitespace instead of whitespace_analyzer
[01:32:45] rgtk_: has joined #RubyOnRails
[01:33:04] FailBit: change dateOptionalTime to just date
[01:34:40] rgtk: has joined #RubyOnRails
[01:34:51] FailBit: note: if you had caught me a few days later you might have a lot more luck with me
[01:34:58] FailBit: because I was about to take a journey into elastic
[01:35:32] FailBit: and elastic's "fuck you I return when I want" kind of latency that is no good for webapps
[01:35:37] Ropeney: FailBit: so if i remove ngram, change all to whitespace and change to date it works... :\
[01:36:19] FailBit: I mean goddamn guys. there's a reason algolia is so fucking popular, it's because elastic is slooow
[01:36:31] pwnd_nsfw: has joined #RubyOnRails
[01:36:31] rgtk: has joined #RubyOnRails
[01:36:40] FailBit: by-the-millisecond ngrams? not a damn chance
[01:37:17] Ropeney: FailBit: you find elasticsearch slow?
[01:37:27] atomical: has joined #RubyOnRails
[01:37:48] FailBit: 45ms for a search request that probably takes 5 in raw lucene is slow
[01:38:22] FailBit: that said, I still like elastic more than solr
[01:38:32] rgtk_: has joined #RubyOnRails
[01:38:32] Ropeney: can't say ive had the issue, but im only talking about 600,000 records
[01:38:37] FailBit: I'm talking 4 million
[01:40:22] FailBit: plus, when you talk about searching
[01:40:23] rgtk: has joined #RubyOnRails
[01:40:25] Ropeney: and its not that your running out of ram?
[01:40:25] FailBit: it's not about document count
[01:40:28] FailBit: it's about term count
[01:40:32] FailBit: lol running out of RAM
[01:40:35] FailBit: we have 128GB
[01:40:39] Ropeney: its java :P
[01:40:48] FailBit: of which 16% is used
[01:40:57] FailBit: JVM heap max is 30.5GB max to make use of pointer compression
[01:41:09] FailBit: it never even goes near that
[01:41:12] Ropeney: just dont wanna make wrong assumptions if you didn't try that stuff
[01:41:12] iateadonut: has joined #RubyOnRails
[01:42:20] rgrmatt: has joined #RubyOnRails
[01:42:32] rgtk: has joined #RubyOnRails
[01:42:33] FailBit: what I need from elastic is database-like response times
[01:42:59] FailBit: I also know that lucene is way faster than elastic at deep pagination, because elastic's deep pagination is designed for distributed systems
[01:43:06] FailBit: well, fuck distributed systems, that's too much overhead.
[01:43:17] Ropeney: FailBit: everything i've been doing has seemed faster then database but might be diff use cases
[01:44:15] FailBit: measure the difference between a primary key find in elasticsearch and <X database>
[01:44:20] FailBit: elasticsearch min: 20ms
[01:44:23] FailBit: database min: 0.3ms
[01:44:24] rgtk: has joined #RubyOnRails
[01:45:11] FailBit: this is because they were designed to do different things
[01:45:18] FailBit: databases, not for searching pls
[01:45:21] FailBit: elastic, not for database pls
[01:45:22] Ropeney: I'm no where near getting that slow
[01:46:17] rgtk: has joined #RubyOnRails
[01:46:24] jessemcgilallen: has joined #RubyOnRails
[01:48:10] sarink: has joined #RubyOnRails
[01:48:11] rgtk: has joined #RubyOnRails
[01:49:40] rromanch_: has joined #RubyOnRails
[01:50:07] rgtk: has joined #RubyOnRails
[01:51:57] FailBit: www.openbsd.org/papers/hackfest2015-pledge/mgp00005.jpg found this in the ES startup code
[01:52:00] rgtk: has joined #RubyOnRails
[01:53:53] rgtk: has joined #RubyOnRails
[01:55:50] rgtk: has joined #RubyOnRails
[01:57:04] nertzy2: has joined #RubyOnRails
[01:57:42] rgtk: has joined #RubyOnRails
[01:57:42] EminenceHC: has joined #RubyOnRails
[01:59:35] rgtk_: has joined #RubyOnRails
[02:01:28] rgtk: has joined #RubyOnRails
[02:03:19] rakm: has joined #RubyOnRails
[02:03:31] rgtk_: has joined #RubyOnRails
[02:03:52] FailBit: I am disappointed in ES's lack of internal documentation
[02:05:15] rgtk: has joined #RubyOnRails
[02:05:25] c355E3B: has joined #RubyOnRails
[02:06:10] Ropeney: FailBit: Im dissapointed that my code is working on 2 other computers but not this one :(
[02:07:12] rgtk: has joined #RubyOnRails
[02:07:35] diegoviola: I have models with an association like this: https://gist.github.com/diegoviola/6190cb9d38e038f37aa6 -- how do I prevent duplicate data from being saved?
[02:07:50] baweaver: has joined #RubyOnRails
[02:07:59] diegoviola: I don't want to add validates_uniqueness_of all over the models
[02:08:38] Ropeney: diegoviola: why not?
[02:08:44] FailBit: add one to the order model
[02:09:02] rgtk: has joined #RubyOnRails
[02:09:11] bambanx: removing a gem from gemfile then bundle install, is enough for remove a gem?
[02:09:37] baweaver: an index error is a bad response diegoviola, you want that in there for better messages
[02:09:53] njero: has joined #RubyOnRails
[02:11:00] rgtk: has joined #RubyOnRails
[02:12:50] rgtk: has joined #RubyOnRails
[02:14:39] darrencauthon: has joined #RubyOnRails
[02:14:47] rgtk: has joined #RubyOnRails
[02:15:50] rgrmatt: has joined #RubyOnRails
[02:16:11] diegoviola: FailBit: I tried validates_uniqueness_of :buyer and I still get duplicates for some reason
[02:16:40] baweaver: you need a DB index
[02:16:42] rgtk: has joined #RubyOnRails
[02:16:45] baweaver: those are prone to race conditions
[02:17:14] FailBit: you should also add a uniqueness validation in the database
[02:17:24] FailBit: if you must not have duplicates
[02:18:35] rgtk: has joined #RubyOnRails
[02:18:42] guillaume-rb: has joined #RubyOnRails
[02:19:04] bruno-: has joined #RubyOnRails
[02:20:20] Claudio_: has joined #RubyOnRails
[02:20:29] rgtk: has joined #RubyOnRails
[02:20:53] messine: has joined #RubyOnRails
[02:22:04] guillaume-rb: has joined #RubyOnRails
[02:22:23] rgtk_: has joined #RubyOnRails
[02:22:58] rickmasta: has joined #RubyOnRails
[02:23:37] Tref: has joined #RubyOnRails
[02:24:04] ewnd9: has joined #RubyOnRails
[02:24:18] rgtk: has joined #RubyOnRails
[02:24:29] rgrmatt: has joined #RubyOnRails
[02:25:06] diegoviola: is there a one liner I can use for those methods? https://gist.github.com/diegoviola/dafb5a92026e19d8ae14
[02:26:12] rgtk: has joined #RubyOnRails
[02:28:00] rgtk: has joined #RubyOnRails
[02:29:10] FailBit: you're wasting your time...
[02:29:22] FailBit: use item.name, etc
[02:29:40] FailBit: . is easier to hit on my keyboard than _, yours?
[02:29:57] rgtk: has joined #RubyOnRails
[02:30:32] diegoviola: FailBit: thing is, I'm doing @orders.each do |order| and then order.item.name
[02:30:46] diegoviola: FailBit: I get all from @orders
[02:30:47] FailBit: preload items
[02:31:04] FailBit: @orders = Order.where(...).includes(:item)
[02:31:12] FailBit: then you will only have 2 queries
[02:31:18] FailBit: instead of n
[02:31:51] rgtk: has joined #RubyOnRails
[02:31:52] duncannz: has joined #RubyOnRails
[02:32:04] annlewis: has joined #RubyOnRails
[02:32:24] darrenca_: has joined #RubyOnRails
[02:32:34] njero: FailBit: how can i disable one of model attribute assignment from controller
[02:32:45] duncannz: has joined #RubyOnRails
[02:33:12] njero: FailBit: what?
[02:33:43] rgtk_: has joined #RubyOnRails
[02:33:48] FailBit: what do you mean
[02:34:15] diegoviola: FailBit: the thing is, I need *all* the orders
[02:34:24] Ropeney: n_e_o: don't add it to strict params?
[02:34:26] diegoviola: not sure why you are suggesting .where
[02:34:29] njero: I'm wondering if i can disable model.attribute=x
[02:34:36] FailBit: then use .all
[02:34:43] FailBit: the preload will still work
[02:34:50] njero: Ropeney: not like that..Just to know..
[02:35:04] FailBit: n_e_o: not for AR models
[02:35:11] njero: FailBit: Ropeney k
[02:35:16] FailBit: I mean you _can_ but it will break AR
[02:35:38] rgtk: has joined #RubyOnRails
[02:35:40] diegoviola: FailBit: preload?
[02:35:41] njero: FailBit: hm.. then no use
[02:35:53] FailBit: class YourModel < ActiveRecord::Base
[02:35:55] FailBit: private :attribute=
[02:36:03] FailBit: glhf when AR explodes
[02:36:33] FailBit: diegoviola: Order.all.includes(:item)
[02:36:55] FailBit: I cannot stress enough how flawed using .all is
[02:37:15] diegoviola: FailBit: and on the view how do I get item.price without having to go through order first?
[02:37:33] rgtk: has joined #RubyOnRails
[02:37:39] diegoviola: order.item.price
[02:38:08] FailBit: I want to kick something
[02:38:18] FailBit: really I know how Radar feels every day
[02:38:36] njero: FailBit: :P
[02:39:25] FailBit: I cannot even this channel
[02:39:28] rgtk_: has joined #RubyOnRails
[02:39:50] njero: FailBit: Radar do u guys really go mad with our qstn ? :P
[02:39:51] Radar: I haven't been able to even this channel for 10 years
[02:39:55] Radar: n_e_o: Sometimes.
[02:39:59] Radar: Not your fault.
[02:40:23] FailBit: well I have an ego complex and that doesn't help
[02:40:42] FailBit: everything I do is perfection and by that standard everyone else is a fucking moron
[02:41:18] rgtk: has joined #RubyOnRails
[02:41:51] njero: I wish i could also think like that.. But not yet :O(
[02:42:19] koprom: has joined #RubyOnRails
[02:42:26] Ropeney: n_e_o: you wish to think everyone else is a moron?
[02:42:37] darrencauthon: has joined #RubyOnRails
[02:42:41] njero: Ropeney: lol.. kidding
[02:42:59] alex88: has joined #RubyOnRails
[02:43:16] rgtk: has joined #RubyOnRails
[02:44:12] diegoviola: can someone actually help me with my question? anyone?
[02:44:25] roxtrongo: has joined #RubyOnRails
[02:45:06] rgtk: has joined #RubyOnRails
[02:46:02] rgrmatt: has joined #RubyOnRails
[02:47:04] rgtk_: has joined #RubyOnRails
[02:47:17] Ropeney: diegoviola: Really think you'd benefit reading a tutorial
[02:47:22] owenjones: has joined #RubyOnRails
[02:47:44] diegoviola: can you suggest a good one?
[02:48:06] Ropeney: diegoviola: https://www.railstutorial.org/book
[02:48:54] rgtk: has joined #RubyOnRails
[02:50:18] Aeyrix: Have you not bought rails 4 in action yet?
[02:50:41] ohmpieng: has joined #RubyOnRails
[02:50:51] rgtk: has joined #RubyOnRails
[02:51:29] Radar: Have you heard of our lord and saviour
[02:52:41] rgtk: has joined #RubyOnRails
[02:54:36] rgtk: has joined #RubyOnRails
[02:55:30] FailBit: praise Radar, hallelujah
[02:55:37] helpa: What would Radar do?
[02:56:21] baweaver: has joined #RubyOnRails
[02:56:30] rgtk: has joined #RubyOnRails
[02:57:21] fedexo: has joined #RubyOnRails
[02:57:37] pwnd_nsfw: has joined #RubyOnRails
[02:58:21] Fire-Dragon-DoL: has joined #RubyOnRails
[02:58:25] rgtk: has joined #RubyOnRails
[03:00:20] rgtk: has joined #RubyOnRails
[03:00:23] Aeyrix: Write a book probably.
[03:00:29] northfurr: has joined #RubyOnRails
[03:01:03] Radar: The former, never the latter
[03:01:06] Radar: except that one time
[03:01:15] FailBit: at band camp?
[03:01:19] Radar: At Ruby On Ales.
[03:01:21] Radar: Hilarious story.
[03:01:49] Radar: I told my wife that a couple of months before I attended Ruby on Ales, a close friend of mine was shot and killed in Bend.
[03:02:03] Aeyrix: >Someone shot and killed
[03:02:05] Aeyrix: >hilarious
[03:02:07] Radar: That weekend, I go to a cabin in the woods and we stand around the fire. A joint gets pulled out and passed around.
[03:02:09] rgtk: has joined #RubyOnRails
[03:02:14] Radar: I arrive back at the hotel at 4am.
[03:02:21] Radar: About 4 hours later than I intended.
[03:02:37] Radar: Angry messages from my wife like "where are you?" "why didn't you tell me you'd be late?"
[03:02:44] Radar: Oh, and then I had a flight leaving at 6am
[03:03:13] Radar: So on no sleep and a little high, I get a cab and get my ass to the airport and then have to do wifey damage control
[03:03:40] kp666: has joined #RubyOnRails
[03:04:05] rgtk: has joined #RubyOnRails
[03:04:40] kp666: has joined #RubyOnRails
[03:05:57] rgtk: has joined #RubyOnRails
[03:06:47] northfurr: has joined #RubyOnRails
[03:07:51] rgtk: has joined #RubyOnRails
[03:08:09] roxtrongo: has joined #RubyOnRails
[03:08:41] VeryBewitching: Could someone explain why I get an ArgumentError in the failing spec in this Gist? This has been bugging me all night: https://gist.github.com/bewitchingme/9619c1ff750b05c01a78#file-component_spec_failing-rb-L4-L5
[03:09:24] dnewkerk: has joined #RubyOnRails
[03:09:49] rgtk: has joined #RubyOnRails
[03:11:11] darrencauthon: has joined #RubyOnRails
[03:11:37] mghaig: has joined #RubyOnRails
[03:11:40] rgtk: has joined #RubyOnRails
[03:11:52] Radar: VeryBewitching: because you're passing a block, not a 1-argument-list of an empty hash
[03:12:13] Radar: Component.gazbee_match({})
[03:12:15] Radar: That is probably what you want.
[03:12:37] VeryBewitching: Radar: Oh, that makes sense, thanks.
[03:12:44] Radar: yay Ruby syntax :D
[03:13:24] darrencauthon: has joined #RubyOnRails
[03:13:34] rgtk: has joined #RubyOnRails
[03:14:09] VeryBewitching: And yes, that works as expected.
[03:15:28] rgtk: has joined #RubyOnRails
[03:16:28] Radar: That'll be $200 thanks
[03:16:34] iateadonut: has joined #RubyOnRails
[03:16:46] VeryBewitching: Hey, I bought a copy of MTWR, smile ;)
[03:16:47] mrchris: has joined #RubyOnRails
[03:17:04] mrchris: jhass, when was the last time you used feedtosis?
[03:17:07] Tref: has joined #RubyOnRails
[03:17:23] rgtk: has joined #RubyOnRails
[03:18:45] Radar: VeryBewitching: was that just you then?
[03:19:08] TheNet: has joined #RubyOnRails
[03:19:18] rgtk: has joined #RubyOnRails
[03:19:53] bruno-: has joined #RubyOnRails
[03:20:18] HalcyonicStorm: has joined #RubyOnRails
[03:20:28] codelahoma: has joined #RubyOnRails
[03:21:13] rgtk: has joined #RubyOnRails
[03:22:30] noodle: has joined #RubyOnRails
[03:22:31] jahbrewski: has joined #RubyOnRails
[03:23:06] darrencauthon: has joined #RubyOnRails
[03:23:07] rgtk: has joined #RubyOnRails
[03:24:17] Brandt: has joined #RubyOnRails
[03:24:33] acti0nman: has joined #RubyOnRails
[03:24:48] darrenca_: has joined #RubyOnRails
[03:25:01] rgtk: has joined #RubyOnRails
[03:26:45] gambl0re: has joined #RubyOnRails
[03:26:50] rgtk: has joined #RubyOnRails
[03:26:57] jhass: __chris: almost 4 years ago
[03:27:29] jhass: so no, I have no idea if my fork is still relevant
[03:27:48] mrchris: jhass, I'm about to test it with Rails 4 :D I might pick up where you left off if its not working
[03:28:20] mrchris: That being said, thanks for getting working with 3
[03:28:46] rgtk: has joined #RubyOnRails
[03:28:50] jhass: it's sad that there still is nothing better yet
[03:29:17] SteenJobs: has joined #RubyOnRails
[03:29:50] VeryBewitching: Radar: Maybe? I sent an edit too. :D
[03:30:18] jhass: __chris: mmh, stringer uses feedjira (and feedbag), did you look into these?
[03:30:40] rgtk: has joined #RubyOnRails
[03:30:56] jhass: feedjira looks like a maintained feedzirra fork
[03:31:52] mrchris: jhass, ill check into them. whats desirable of Feedtosis is its ability to track existing items
[03:32:23] Radar: VeryBewitching: Someone bought it like minutes before you made that comment.
[03:32:49] AnoHito_: has joined #RubyOnRails
[03:32:51] VeryBewitching: No, it was a while back on my part.
[03:32:53] annlewis: has joined #RubyOnRails
[03:32:54] Radar: And they paid full price too. very generous.
[03:33:13] Radar: VeryBewitching: PM me whatever name you want to be mentioned in the intor
[03:33:34] iateadonut: has joined #RubyOnRails
[03:33:48] jwaldrip___: has joined #RubyOnRails
[03:34:15] cschneid: has joined #RubyOnRails
[03:34:48] Coldblackice: has joined #RubyOnRails
[03:35:06] Axsuul: has joined #RubyOnRails
[03:35:26] Paradox: has joined #RubyOnRails
[03:36:07] sankaber: has joined #RubyOnRails
[03:37:05] EminenceHC: has joined #RubyOnRails
[03:38:19] nya: has joined #RubyOnRails
[03:40:51] Brandt: has joined #RubyOnRails
[03:42:50] IrishGringo: has joined #RubyOnRails
[03:43:27] Aeyrix: wait if we send in an errata we get added into the book?
[03:43:44] Uptime: has joined #RubyOnRails
[03:44:20] Radar: Will that finally get you to read it?
[03:44:36] Aeyrix: How much is it again?
[03:44:38] helpa: Multitenancy With Rails - https://leanpub.com/multi-tenancy-rails-2 - An excellent book that teaches you about building a Multitenanted Rails application. Written by Ryan Bigg.
[03:45:01] noodle: has joined #RubyOnRails
[03:45:15] Aeyrix: I'll buy it when I get paid probably.
[03:45:39] maxz: has joined #RubyOnRails
[03:45:46] Brandt: has joined #RubyOnRails
[03:46:18] nya: has joined #RubyOnRails
[03:47:30] northfurr: has joined #RubyOnRails
[03:49:07] nya: has joined #RubyOnRails
[03:49:34] diegoviola: Radar: do you accept BTC?
[03:49:56] Radar: diegoviola: Only amounts > 1BTC due to administrative costs.
[03:50:16] Radar: I like my real money :)
[03:51:09] Aeyrix: Radar: You should give an ebook version
[03:51:15] Aeyrix: imaginary version of the book for an imaginary currency :^)
[03:51:23] Radar: It is ebook only
[03:51:25] Radar: What are you smoking
[03:51:35] Aeyrix: I wasn't aware there wasn't a paper copy.
[03:52:13] VeryBewitching: Aeyrix: Save a tree
[03:52:18] Fire-Dragon-DoL: I already bought the second version of the book :P
[03:52:23] Aeyrix: Save a tree
[03:52:26] Aeyrix: pay in fake currency
[03:52:47] ohmpieng: has joined #RubyOnRails
[03:53:24] surrealanalysis: has joined #RubyOnRails
[03:53:38] diegoviola: Aeyrix: there's nothing fake about bitcoin
[03:53:41] Radar: Sure, let me print a paper copy of a technical book so that it can be outdated the moment it arrives in your hands
[03:53:44] Radar: cough Rails 3 in Action
[03:53:45] Aeyrix: diegoviola: wat
[03:53:47] Aeyrix: it's literally
[03:53:47] Radar: cough Rails 4 in Action
[03:53:49] Aeyrix: a pretend currency
[03:53:53] Radar: Aeyrix: diegoviola: #ruby-offtopic
[03:53:55] Aeyrix: it's like fisher price bake
[03:54:15] Radar: I am upset that I'm coding React form validations today and I'm looking for someone take it out on. Please don't talk about Bitcoin in here.
[03:54:40] Aeyrix: Mate bitcoin is the future
[03:54:41] dikaio: has joined #RubyOnRails
[03:54:52] Aeyrix: Also why are you coding those?
[03:54:55] Aeyrix: They sound awful and pointless.
[03:55:29] Radar: Because we already had an angular equivalent and people are frothing at the mouth demanding that they be added back
[03:55:31] diegoviola: Aeyrix: #ruby-offtopic
[03:55:35] Radar: Even though it's significantly more time and arguably nobody cares about it.
[03:56:02] Radar: Whatever. They're the ones paying for it.
[03:56:20] roxtrongo: has joined #RubyOnRails
[03:56:22] Aeyrix: Radar: Just add HTML5 form validations and pretend that's it.
[03:56:24] Aeyrix: diegoviola: nah
[03:56:33] Aeyrix: diegoviola: I don't enter the ruby channels anymore
[03:56:34] tubbo: Radar: data down actions up baby
[03:56:49] Radar: Fucking hell. Stop with the bullshit linux answers you internet people. It's crap.
[03:56:51] Radar: "Just do X"
[03:56:54] helpa: If you're going to tell someone to "Just google it" or "RTFM", tell them what terms to use on Google exactly, or link them to the place in the documentation.
[03:57:05] baweaver: has joined #RubyOnRails
[03:57:06] Aeyrix: Are you !rule13'ing the wider Internet?
[03:57:09] fedexo: has joined #RubyOnRails
[03:57:21] VeryBewitching: Talk about comprehensive.
[03:57:29] Radar: "Just do X" <- Such a bullshit response to anything.
[03:57:42] Radar: You're assuming a bunch of knowledge and it's really ridiculously unhelpful.
[03:57:51] Radar: Not to mention that it makes the person who's receiving it feel dumb for not knowing already.
[03:57:57] Radar: You want to be helpful? Link to these things.
[03:58:00] Radar: tubbo: Hi. Speaking to you.
[03:58:00] tubbo: Radar: just like rewrite the whole thing in fart.js
[03:58:23] tubbo: that isn't what i do
[03:58:27] Aeyrix: absolute madman
[03:59:36] tubbo: i feel for you though, constantly reinventing the wheel with JS is annoying
[04:00:08] Cache_Money: has joined #RubyOnRails
[04:01:15] leonardoajim: has joined #RubyOnRails
[04:01:18] nya: has joined #RubyOnRails
[04:01:35] leonardoajim: has joined #RubyOnRails
[04:01:42] Radar: HTML 5 validations won't work because I have two forms, a shipping and a billing form. Billing form is disabled by default. If someone does not fill out a field in that, the submit button will not submit the form and the error message won't appear because the billing form is hidden.
[04:01:56] Radar: It's an "unfocusable" (or whatever Chrome called it) element
[04:02:35] safety_cut: has joined #RubyOnRails
[04:02:41] Aeyrix: Radar: ignore validation until you need it?
[04:02:47] Radar: Aeyrix: Need it _now_
[04:02:49] Aeyrix: there's an attribute for it, i forget
[04:02:53] Radar: novalidatER?
[04:02:57] Radar: Ugh, typo. novalidate
[04:03:05] waka: has joined #RubyOnRails
[04:03:10] Aeyrix: just use that until you need to validate those bits
[04:03:13] Radar: I'll still need to display the Rails server side validations in these React components somehow.
[04:03:28] Aeyrix: didn't you solve that by outputting .errors.full_messages ?
[04:03:58] safety_c_: has joined #RubyOnRails
[04:04:16] nya: has joined #RubyOnRails
[04:04:52] Radar: Nope, because these errors need to be inline.
[04:05:02] stannard: has joined #RubyOnRails
[04:05:03] Radar: I'm currently using .errors.messages
[04:05:29] Radar: https://monosnap.com/file/MKwnnsoLbX0JgJYPsT02rKahZluiAR
[04:05:41] Radar: What's crap about that is that I'll need to pass the field name translations through to I18n.js as well.
[04:05:45] tubbo: Radar: you might be able to make use of i18n
[04:05:48] tubbo: you beat me
[04:06:03] tubbo: but that's good...you kinda want to use i18n.js, it has all of the rails validation messages built in
[04:06:11] thundercloud: has joined #RubyOnRails
[04:06:13] tubbo: well, i18n does..
[04:06:28] diegoviola: what's with all the js these days?
[04:06:40] rickmasta: has joined #RubyOnRails
[04:06:48] Radar: diegoviola: A ploy by programmers to ensure their long-term employment.
[04:08:04] tubbo: it's developed quite a lot
[04:08:32] dnewkerk: has joined #RubyOnRails
[04:08:35] tubbo: remember JS before ajax? i told people i could program in javascript and they said "hah! learn a real programming language you idiot!"
[04:08:46] nonmadden: has joined #RubyOnRails
[04:08:50] tubbo: now it's like totally a real programming language or something
[04:09:49] Aeyrix: bitcoin.js
[04:09:54] Aeyrix: The world's least efficient miner.
[04:10:06] Aeyrix: Then again, V8 is *fast*.
[04:10:07] diegoviola: Aeyrix: bitcoin might go, the blockchain will stay
[04:10:13] annlewis: has joined #RubyOnRails
[04:10:17] Aeyrix: Is that a spiritual mantra?
[04:10:26] tubbo: that is definitely true, blockchains are a cool technology
[04:10:27] Aeyrix: That sounds like it came straight out of a Buddhist book.
[04:10:47] Aeyrix: They are, but *the* blockchain will not stay.
[04:10:51] Aeyrix: The technology itself sure.
[04:11:18] tubbo: "the blockchain" as a concept, i think is what was meant
[04:11:33] Aeyrix: 2incorrect4me
[04:12:45] braincrash: has joined #RubyOnRails
[04:15:13] waltz: any recommendations for plugin examples?
[04:16:17] nya: has joined #RubyOnRails
[04:16:53] xcesariox: has joined #RubyOnRails
[04:17:21] waltz: i'd like to write a rails plugin, just for yucks
[04:17:24] waltz: see how it works
[04:17:43] waltz: something that can be used in AR models, like `acts_as_list`
[04:17:55] waltz: (which i've looked at)
[04:18:17] waltz: but i was looking for some existing code to look at as an example
[04:18:30] waltz: i'm not sure what the state of the art is in rails 4
[04:19:03] Radar: waltz: !engines
[04:19:03] helpa: waltz: http://guides.rubyonrails.org/engines.html - Engines Guide - Written by Ryan Bigg
[04:19:10] Radar: Here's a handy guide I wrote for Rails.
[04:19:22] Radar: Here is an engine I wrote for Rails https://github.com/rubysherpas/forem
[04:19:36] Radar: here is a project I helped maintain for about 2 years https://github.com/solidusio/solidus
[04:19:58] waltz: Radar: interesting, i'll take a look at that guide
[04:20:46] waltz: what's the difference between plugins and engines?
[04:20:48] Ropeney: Radar: do you still maintain solidus?
[04:20:56] pydave6367: has joined #RubyOnRails
[04:21:51] waltz: i was under the impression that engines were very large almost-apps
[04:22:10] Radar: Ropeney: "helped"
[04:22:25] Ropeney: Radar: keyword missed :(
[04:22:34] Radar: Ropeney: Keyword highlighted and noticed :P
[04:22:59] Radar: https://github.com/solidusio/solidus/graphs/contributors
[04:23:01] Ropeney: I wonder what will happen with spree now they're not going to maintain it anymore
[04:23:34] VeryBewitching: waltz: An engine doesn't have to be very large, some engines are reasonably tiny really. Another good example of an engine is devise.
[04:23:38] Radar: http://take.ms/Wxw1Z this is when I left Spree.
[04:23:48] Radar: Ropeney: It got forked into Solidus and now it's being maintained by a very good collective of people
[04:23:51] Radar: Exactly as it should've been.
[04:24:23] waltz: VeryBewitching: good to know! i'll check out the devise source too
[04:24:53] Radar: waltz: A plugin might be something like https://github.com/radar/by_star
[04:25:03] Radar: Which adds a small feature to Rails, without having its own controllers/models/views
[04:25:15] VeryBewitching: waltz: Look at the wiki for https://github.com/hassox/warden prior to reading about Devise, it'll put things into context.
[04:29:15] riskish: has joined #RubyOnRails
[04:29:58] user083: has joined #RubyOnRails
[04:30:05] jhn: has joined #RubyOnRails
[04:30:46] user083: How can i set a timeout for a processing function?
[04:31:20] jhass: you probably don't want to. Elaborate a bit on what you're doing and why you want to time out it
[04:31:38] youngbaks: has joined #RubyOnRails
[04:32:44] user083: I am trying to extract the text from an image and if the text takes to long to extract i want to ignore it.
[04:33:05] Ropeney: Radar: But spree was very well maintained untill recently?
[04:33:18] Radar: Ropeney: Until about July 2014, I would say
[04:33:24] Radar: Then it kinda fell off after that
[04:33:38] Radar: Then Spree Commerce got bought by First Data as I suspect as an acquihire
[04:33:49] jhass: user083: so you call an external process or...?
[04:33:50] Radar: And then Spree Commerce itself announced that it no longer cares about supporting Spree as an OSS project
[04:33:57] Ropeney: :( i had this thought, a fair bit of the code seemed very good then there were bits where it was "i cant be bothered iwth this anymore"
[04:34:26] Radar: https://spreecommerce.com/blog/future-of-spree-oss
[04:34:43] Radar: A few months before that, the Solidus team got together and forked it
[04:35:02] Radar: TBH I don't know what Spree Commerce (the company) would even do now that they're not supporting Spree. Probably gone back to being a standard consultancy.
[04:35:02] user083: jhass: I will be using this library for the extraction https://github.com/meh/ruby-tesseract-ocr
[04:35:25] Ropeney: that really sucks
[04:35:33] Ropeney: it should be on their github page :\
[04:35:50] user083: And some of the images are very large and i do not want it to crash my server when i give it a huge image.
[04:37:41] user083: Have any ideas on alternatives to a function timeout?
[04:38:10] Ropeney: wonder how hard it'll be to unplug spree and plug in solidus
[04:38:26] user083: or would it be better to set a limit on the size of images which are processed.
[04:38:28] jhass: user083: doesn't look like there's a sane way to timeout it, who knows what happens if you kill it externally while running in a thread for example, I wouldn't be surprised if it leaks resources then
[04:38:44] jhass: user083: can't you do some prechecks on the image size?
[04:39:01] jhass: hah, beat me to it even
[04:39:03] user083: jhass: I can
[04:39:17] rakm: has joined #RubyOnRails
[04:39:27] jhass: I'd try that first, will most likely give you less of a headache
[04:39:48] user083: thank you then
[04:41:55] mbuf: has joined #RubyOnRails
[04:42:35] shibabu: has joined #RubyOnRails
[04:42:37] darrencauthon: has joined #RubyOnRails
[04:42:48] mbuf: I want a Rails application running in /home/ubuntu/app to log to /var/log/app/production.log. How can I achieve this?
[04:42:59] TheNet: has joined #RubyOnRails
[04:43:10] mbuf: I currently use logstash-logger
[04:43:52] workmad3: has joined #RubyOnRails
[04:44:44] jhass: a cheap way would be to symlink /home/ubuntu/app/log to /var/log/app and set permissions accordingly
[04:45:39] Radar: Ropeney: https://github.com/spree/spree/pull/6881
[04:46:02] mbuf: jhass, okay
[04:46:17] Radar: Ropeney: Please +1 as you see fit.
[04:48:46] arooni: has joined #RubyOnRails
[04:48:51] TheNet_: has joined #RubyOnRails
[04:49:27] K_r3aPeR_: has joined #RubyOnRails
[04:50:35] infernus: has joined #RubyOnRails
[04:50:56] threeminutemonta: has left #RubyOnRails: ("Ex-Chat")
[04:51:58] triangles2: has joined #RubyOnRails
[04:52:59] RandyT: has joined #RubyOnRails
[04:53:19] yfeldblum: has joined #RubyOnRails
[04:53:20] LiquidIn1ect: has joined #RubyOnRails
[04:53:57] machuga_: has joined #RubyOnRails
[04:53:57] machuga_: has joined #RubyOnRails
[04:54:13] hahuang61: has joined #RubyOnRails
[04:54:15] lloyd_: has joined #RubyOnRails
[04:54:19] Y_Ichiro_: has joined #RubyOnRails
[04:54:19] Y_Ichiro_: has joined #RubyOnRails
[04:54:22] `scootaloo: has joined #RubyOnRails
[04:55:20] boombadaroomba: has joined #RubyOnRails
[04:55:20] baweaver: has joined #RubyOnRails
[04:55:35] crdpink: has joined #RubyOnRails
[04:56:01] suffice: has joined #RubyOnRails
[04:56:35] K0nserv-_: has joined #RubyOnRails
[04:56:41] insu_: has joined #RubyOnRails
[04:56:44] ngr_: has joined #RubyOnRails
[04:56:48] n88_: has joined #RubyOnRails
[04:56:50] lagweezl1: has joined #RubyOnRails
[04:56:58] queequeg2: has joined #RubyOnRails
[04:57:04] RTG`: has joined #RubyOnRails
[04:57:32] nizmow: has joined #RubyOnRails
[04:57:54] Puffball: has joined #RubyOnRails
[04:58:12] Sadama: has joined #RubyOnRails
[04:58:28] nonmadden: has joined #RubyOnRails
[04:58:31] llakey_: has joined #RubyOnRails
[04:58:37] kiez0rd: has joined #RubyOnRails
[04:58:51] Lorn_: has joined #RubyOnRails
[04:59:44] sevenseacat: has joined #RubyOnRails
[04:59:45] nygrenh_: has joined #RubyOnRails
[05:00:13] DanKnox^: has joined #RubyOnRails
[05:00:13] Ratler: has joined #RubyOnRails
[05:00:13] Ratler: has joined #RubyOnRails
[05:00:14] nullwarp: has joined #RubyOnRails
[05:00:27] mclee: has joined #RubyOnRails
[05:00:42] ^Denis: has joined #RubyOnRails
[05:00:42] rakm: has joined #RubyOnRails
[05:00:44] sfr^: has joined #RubyOnRails
[05:00:47] universa1: has joined #RubyOnRails
[05:00:55] Uptime: has joined #RubyOnRails
[05:00:56] Bloomer: has joined #RubyOnRails
[05:01:04] oddalot: has joined #RubyOnRails
[05:01:27] svkurowsl: has joined #RubyOnRails
[05:01:32] pwnd_nsfw: has joined #RubyOnRails
[05:01:38] humd1ng3r: has joined #RubyOnRails
[05:01:46] aep: has joined #RubyOnRails
[05:02:05] braincrash: has joined #RubyOnRails
[05:02:06] RegulationD: has joined #RubyOnRails
[05:02:15] targaf: has joined #RubyOnRails
[05:02:18] redondos: has joined #RubyOnRails
[05:02:25] levifig: has joined #RubyOnRails
[05:02:35] Didac: has joined #RubyOnRails
[05:02:35] stannard: has joined #RubyOnRails
[05:02:46] aep: has joined #RubyOnRails
[05:02:46] duncannz: has joined #RubyOnRails
[05:02:57] GJdan: has joined #RubyOnRails
[05:03:18] darkxploit: has joined #RubyOnRails
[05:03:21] towler: has joined #RubyOnRails
[05:03:32] diego1: has joined #RubyOnRails
[05:03:38] diego1: has joined #RubyOnRails
[05:04:22] kies: has joined #RubyOnRails
[05:04:28] aguynamedben: has joined #RubyOnRails
[05:07:10] pawnbox: has joined #RubyOnRails
[05:09:24] diego1: has joined #RubyOnRails
[05:09:50] diego1: has joined #RubyOnRails
[05:10:21] tpendragon: has joined #RubyOnRails
[05:11:36] _3by8: has joined #RubyOnRails
[05:11:56] Cache_Money: has joined #RubyOnRails
[05:12:11] ruurd_: has joined #RubyOnRails
[05:14:14] ChanServ: -q *!*@gateway/web/freenode/ip.
[05:14:19] _3by8: What's the right way to associate two separate models? Let's say I have a Printer model and a Cartridge model. Obviously in real life, the printer would "have many" cartridges but since a cartridge also technically "has many" printers, shouldn't I make a third table for it?
[05:14:40] Radar: ACTION tries to remember why _3by8 was muted.
[05:14:57] _3by8: Read the logs from last night.
[05:15:12] Radar: Just saw.
[05:15:16] Radar: What was all that about?
[05:15:17] ruurd__: has joined #RubyOnRails
[05:15:19] _3by8: sevenseacat: was offended that I called him/her a hacker.
[05:15:39] sevenseacat: then you called me autistic.
[05:15:46] _3by8: No, I asked if you were autistic.
[05:15:50] Radar: ACTION tuts
[05:16:22] Radar: _3by8: Does one cartridge fit more than one printer?
[05:16:29] _3by8: Radar: yes.
[05:16:33] Aeyrix: has joined #RubyOnRails
[05:16:37] Radar: Sounds like you want a join table.
[05:16:39] Radar: !associations
[05:16:39] helpa: http://guides.rubyonrails.org/association_basics.html - Active Record Association Basics by Mike Gunderloy
[05:16:45] moeabdol1: has joined #RubyOnRails
[05:16:52] proboszc1: has joined #RubyOnRails
[05:16:54] _3by8: Radar: I was going to say JOIN but I wasn't sure, thanks.
[05:17:21] portiad: has joined #RubyOnRails
[05:17:35] alxndr_: has joined #RubyOnRails
[05:18:21] Killerkeksdose: has joined #RubyOnRails
[05:18:42] uranther_: has joined #RubyOnRails
[05:19:46] hahuang65: has joined #RubyOnRails
[05:20:00] RTG`: has joined #RubyOnRails
[05:20:04] annlewis: has joined #RubyOnRails
[05:20:10] golgaroth_: has joined #RubyOnRails
[05:20:19] duncannz: has joined #RubyOnRails
[05:20:24] mjc__: has joined #RubyOnRails
[05:20:25] moloch: has joined #RubyOnRails
[05:20:38] gs: has joined #RubyOnRails
[05:20:52] pkrnj: has joined #RubyOnRails
[05:21:15] duncannz: has joined #RubyOnRails
[05:21:20] constantinexvi_: has joined #RubyOnRails
[05:21:26] artmann_: has joined #RubyOnRails
[05:21:31] feignt_: has joined #RubyOnRails
[05:22:15] shinenelson: has joined #RubyOnRails
[05:23:05] K_r3aPeR_: has joined #RubyOnRails
[05:23:06] Depili: has joined #RubyOnRails
[05:23:17] arthurnn_: has joined #RubyOnRails
[05:23:27] mbuf: is it possible to log Rails database migration alone to a separate log file?
[05:24:11] JoshL_: has joined #RubyOnRails
[05:24:20] redondos_: has joined #RubyOnRails
[05:24:29] camilasann: has joined #RubyOnRails
[05:25:27] joaomdmoura_: has joined #RubyOnRails
[05:25:36] njero: has joined #RubyOnRails
[05:25:51] _3by8: Any suggestions on what a good join table name would be for joining printers and printer cartridges?
[05:25:51] nickenchuggets: has joined #RubyOnRails
[05:27:38] lbotos: has joined #RubyOnRails
[05:28:28] tuelz: has joined #RubyOnRails
[05:28:31] ewilliam: has joined #RubyOnRails
[05:28:47] waka: has joined #RubyOnRails
[05:29:09] djellemah: has joined #RubyOnRails
[05:29:21] adavia_: has joined #RubyOnRails
[05:29:26] lacrosse: has joined #RubyOnRails
[05:30:08] Radar: mbuf: !xy
[05:30:08] helpa: mbuf: 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
[05:30:23] toydestroyer: has joined #RubyOnRails
[05:30:23] waldi_: has joined #RubyOnRails
[05:30:23] GarethAdams: has joined #RubyOnRails
[05:30:31] jord: has joined #RubyOnRails
[05:30:37] Radar: _3by8: see Section 3.3.2 of that guide I just linked you to.
[05:30:38] njero: mbuf: !xy
[05:30:40] vayan: has joined #RubyOnRails
[05:30:44] Radar: n_e_o: !unworthy
[05:30:44] helpa: n_e_o: You are not worthy of this bot!
[05:30:48] jlpeters: has joined #RubyOnRails
[05:30:52] GarethAdams: has joined #RubyOnRails
[05:31:03] Hosh: has joined #RubyOnRails
[05:31:06] Radar: helpa: BETRAYAL
[05:31:20] mbuf: Radar, that is a specific question;
[05:31:27] mbuf: Radar, I can't break it down any further
[05:31:33] johnflux: has joined #RubyOnRails
[05:31:34] rgtk: has joined #RubyOnRails
[05:31:37] njero: hw u do this?
[05:31:42] Radar: mbuf: Why do you want migrations to log to a particular file?
[05:31:45] dede__: has joined #RubyOnRails
[05:31:51] Radar: n_e_o: I wrote the bot so I have access to it. I've added other people.
[05:31:58] Radar: n_e_o: If you help out in here long enough you get access to.
[05:32:11] njero: awesome.. I'll be around :)
[05:32:23] mbuf: Radar, so that I can see the migration changes separately
[05:32:30] mbuf: Radar, and not mix them with the application logs
[05:32:42] Radar: mbuf: Why does this matter?
[05:32:47] Radar: (we're up to 2 of the 5 whys)
[05:32:57] chrissonar: has joined #RubyOnRails
[05:33:01] mbuf: Radar, separation of concerns
[05:33:10] thundercloud: has joined #RubyOnRails
[05:33:20] Radar: mbuf: why?
[05:33:35] Radar: What data is in the migration that you care about?
[05:33:38] mission712: has joined #RubyOnRails
[05:34:10] mbuf: Radar, the migrations themselves
[05:34:23] Radar: Are you being deliberately unhelpful?
[05:34:42] mbuf: Radar, no, that is what I want! if that is not possible, then it is fine
[05:34:43] Radar: (Would a dishonest person answer that question honestly? Probably not.)
[05:34:55] Radar: mbuf: It's possible with much consternation but it's not easily doable.
[05:35:04] mbuf: Radar, thank you
[05:38:25] Aeyrix: !unworthy
[05:38:26] helpa: You are not worthy of this bot!
[05:39:08] Phoop: has joined #RubyOnRails
[05:39:43] rafaelfranca: has joined #RubyOnRails
[05:39:58] Hates_: has joined #RubyOnRails
[05:40:50] dnewkerk_: has joined #RubyOnRails
[05:46:40] TheNet_: maybe modify the rake task to switch out the log files? sounds like an awful idea though
[05:48:06] Brandt: has joined #RubyOnRails
[05:48:36] Radar: Hence me asking why a couple of times.
[05:51:07] bhaveshletter: has joined #RubyOnRails
[05:51:19] violarium: has joined #RubyOnRails
[05:58:46] blackhuey: has joined #RubyOnRails
[06:01:18] rhizome: has joined #RubyOnRails
[06:08:49] kriskhaira: has joined #RubyOnRails
[06:09:02] djbkd: has joined #RubyOnRails
[06:09:32] kriskhaira: Hi. When you guys run your full test suite and have a hosted CI solution integrated, do you just test it on the CI server or on your local machine?
[06:09:38] kriskhaira: Just interested to know what your workflow is like.
[06:09:42] shapeshifter: has joined #RubyOnRails
[06:10:20] nonmadden: has joined #RubyOnRails
[06:11:33] creyes: has joined #RubyOnRails
[06:11:52] htmldrum: has joined #RubyOnRails
[06:12:37] creyes: Hi everyone! can someone eli5 the interaction between Rolify and CanCanCan? Is it just that Rolify defines the roles in the User model and CanCanCan uses those roles to control access?
[06:15:55] raunicolae: has joined #RubyOnRails
[06:17:02] nareshthakur: has joined #RubyOnRails
[06:19:01] zmyrgel2: has left #RubyOnRails: ()
[06:20:22] simmibadhan: has joined #RubyOnRails
[06:20:50] annlewis: has joined #RubyOnRails
[06:20:58] krz: has joined #RubyOnRails
[06:21:35] lxsameer: has joined #RubyOnRails
[06:21:44] yfeldblum: has joined #RubyOnRails
[06:21:46] dhjondoh: has joined #RubyOnRails
[06:21:55] trosborn: has joined #RubyOnRails
[06:21:56] shapeshifter: has joined #RubyOnRails
[06:23:13] Radar: kriskhaira: A few small tests regarding the feature on my local machine, then I let CI have it
[06:23:26] Radar: kriskhaira: CI is also more beefier than my machine and it will run the tests much faster than my machine would]
[06:23:43] sbarg: has joined #RubyOnRails
[06:23:56] pawnbox: has joined #RubyOnRails
[06:24:36] bruno-: has joined #RubyOnRails
[06:25:18] arBmind: has joined #RubyOnRails
[06:28:00] gambl0re: is it difficult to create a rails api for my front to communicate with?
[06:28:42] quazimodo: has joined #RubyOnRails
[06:28:42] pydave6367: has joined #RubyOnRails
[06:32:28] aganov: has joined #RubyOnRails
[06:32:29] dmarr: gambl0re: not too bad
[06:32:54] dmarr: https://github.com/rails-api/rails-api
[06:33:40] dmarr: use that in addition to something like https://github.com/rails-api/active_model_serializers/blob/master/docs/general/getting_started.md and you will be off to a good start
[06:34:23] dmarr: I started something here around that concept https://github.com/marr/wikicat
[06:34:25] bmalum: has joined #RubyOnRails
[06:35:07] Jasaka: has joined #RubyOnRails
[06:37:20] RandyT: has joined #RubyOnRails
[06:37:40] sar1nk: has joined #RubyOnRails
[06:38:34] njero: has joined #RubyOnRails
[06:40:58] pawnbox: has joined #RubyOnRails
[06:41:34] darutoko: has joined #RubyOnRails
[06:41:45] dionysus69: has joined #RubyOnRails
[06:41:57] dtordable: has joined #RubyOnRails
[06:43:16] shibabu: has joined #RubyOnRails
[06:44:49] sarink: has joined #RubyOnRails
[06:45:48] yogeshrt: has joined #RubyOnRails
[06:46:56] ImmoveableOne: has joined #RubyOnRails
[06:49:48] w0rd-driven: has joined #RubyOnRails
[06:54:15] juddey: has joined #RubyOnRails
[06:57:01] rvanlieshout: has joined #RubyOnRails
[06:58:54] MartinElvar: has joined #RubyOnRails
[06:59:00] pawnbox: has joined #RubyOnRails
[06:59:18] nareshthakur: has joined #RubyOnRails
[07:03:00] Joucke: has joined #RubyOnRails
[07:04:01] Joucke: getting started with rails testing, now I understand controller tests are to disappear. how should I test my controllers? what's best practice?
[07:05:24] cheeti: has joined #RubyOnRails
[07:06:19] Radar: Joucke: What do you mean by "disappear"?
[07:06:46] cheeti: hi, i want to copy public upload files to another application is this possible?
[07:06:59] Radar: cheeti: "cp" is the command you're looking for.
[07:07:00] Joucke: as in rails 5, that 'standard' controller tests are not the way to go
[07:07:08] Radar: Joucke: [citation needed]
[07:08:06] Tref: has joined #RubyOnRails
[07:08:07] Joucke: Radar: https://github.com/rails/rails/issues/18950#issuecomment-77924771
[07:08:39] cheeti: Radar hi i used carrierwave gem to upload a file i want to tore same file in another application when user uploaded a file
[07:09:06] Joucke: yet, I'm writing in rails 4, so should I just write these? Or handle everything as integration tests? I just don't know how to start writing tests ;)
[07:09:31] Radar: cheeti: I know how to do that but the explanation is going to take me too long.
[07:09:40] Radar: cheeti: TL;DR: create a method that hits up an API endpoint on the other app and sends through the other file to it.
[07:09:46] Radar: Joucke: I'm waiting for my trainternet to load that issue thread before I reply
[07:10:24] cheeti: Radar please suggest any url for that
[07:10:32] Joucke: David Heinemeier Hansson says "The change may well be that we???re dropping controller tests entirely in favor of integration tests, now that the latter is faster on rails/master than the former was on 4.2." on github
[07:11:13] Radar: cheeti: I don't have one. Consultants would advise better than I can :)
[07:11:47] DoubleMalt: has joined #RubyOnRails
[07:12:08] Radar: Joucke: In that thread I only see certain controller test methods being deprecated. Not controller tests as a whole.
[07:12:31] Radar: Joucke: I see DHH's comment there, but I don't understand what he means by it.
[07:12:45] Radar: Joucke: I have a book that covers how to write tests
[07:12:45] Radar: Joucke: !r4ia
[07:12:45] helpa: Joucke: Rails 4 in Action - http://manning.com/bigg2 - An excellent book combining Rails and TDD/BDD development. Written by Rebecca Skinner, Steve Klabnik, Ryan Bigg, Yehuda Katz
[07:12:47] Joucke: Radar: yeah, but if The Creator suggests they might drop controller tests entirely...
[07:13:02] helpa: Rails 4 Test Prescriptions - a great introduction to testing in Ruby and Rails, including both minitest and rspec. https://pragprog.com/book/nrtest2/rails-4-test-prescriptions
[07:13:04] Radar: DHH is the same guy who thinks that turbolinks is a good idea ;)
[07:13:12] sevenseacat: fucking spring.
[07:13:46] Joucke: okay, and why are these both bad?
[07:14:09] Radar: Turbolinks can cause issues with some JavaScript code and requires you to write code "the Turbolinks waY"
[07:14:23] Radar: Spring obfuscates the loading process of your application and can cause issues if you don't know how it works.
[07:14:58] mbuf: has left #RubyOnRails: ("Ex-Chat")
[07:16:18] Joucke: turbolinks only causes issues with javascript that's dependant on pages not changing without notifying, right?
[07:16:24] Joucke: or are there more issues?
[07:17:37] shapeshifter: has joined #RubyOnRails
[07:18:37] Radar: Yes, that sounds about right.
[07:19:04] arBmind: has joined #RubyOnRails
[07:19:45] d5sx43: has joined #RubyOnRails
[07:21:36] annlewis: has joined #RubyOnRails
[07:21:45] Joucke: so you have to reactivate all scripts on page refresh
[07:21:53] sinkensabe: has joined #RubyOnRails
[07:22:16] Joucke: or use proper event handlers ;)
[07:22:59] Joucke: and isn't rails all about writing code "the rails way" anyway? so what's the problem with turbolinks being the same?
[07:23:29] Joucke: not trying to be annoying here, just wondering
[07:23:51] nareshthakur: has joined #RubyOnRails
[07:24:59] yardenbar: has joined #RubyOnRails
[07:25:19] artmann_: has left #RubyOnRails: ()
[07:25:21] artmann_: has joined #RubyOnRails
[07:25:24] artmann_: has left #RubyOnRails: ()
[07:25:58] bruno-: has joined #RubyOnRails
[07:26:21] Pazician: has joined #RubyOnRails
[07:27:55] dtordable: has joined #RubyOnRails
[07:29:12] tuelz: has joined #RubyOnRails
[07:30:39] MaDErroR123: has joined #RubyOnRails
[07:31:33] pawnbox: has joined #RubyOnRails
[07:32:26] rgtk: has joined #RubyOnRails
[07:33:30] orolo: has joined #RubyOnRails
[07:34:06] lubekpl: has joined #RubyOnRails
[07:38:19] dtordable: has joined #RubyOnRails
[07:38:49] nareshthakur: has joined #RubyOnRails
[07:39:00] yogeshrt: has joined #RubyOnRails
[07:39:53] lapide_viridi: has joined #RubyOnRails
[07:40:30] benlieb: has joined #RubyOnRails
[07:42:33] juddey: has joined #RubyOnRails
[07:44:52] shibabu: has joined #RubyOnRails
[07:45:10] solars: has joined #RubyOnRails
[07:47:28] srinidhi: has joined #RubyOnRails
[07:48:45] dtordable: has joined #RubyOnRails
[07:49:11] aaronr: has joined #RubyOnRails
[07:52:23] nonmadden: has joined #RubyOnRails
[07:55:26] Brandt: has joined #RubyOnRails
[07:56:13] nikomondo: has joined #RubyOnRails
[07:57:31] jahbrewski: has joined #RubyOnRails
[07:57:38] pawnbox: has joined #RubyOnRails
[07:57:52] pydave6367: has joined #RubyOnRails
[08:00:00] kriskhaira: Radar: Thanks for answering my question re running tests on CI servers. Looks like that's the best practice based on articles I've read as well.
[08:00:43] defsdoor: has joined #RubyOnRails
[08:01:27] orikremer: has joined #RubyOnRails
[08:02:52] nareshth_: has joined #RubyOnRails
[08:05:46] A124: has joined #RubyOnRails
[08:08:43] pawnbox: has joined #RubyOnRails
[08:08:49] RandyT: has joined #RubyOnRails
[08:10:38] quazimodo: has joined #RubyOnRails
[08:11:01] K_r3aPeR_: has joined #RubyOnRails
[08:15:26] artto: has joined #RubyOnRails
[08:18:23] htmldrum: has joined #RubyOnRails
[08:20:59] MaDErroR123: has joined #RubyOnRails
[08:22:32] annlewis: has joined #RubyOnRails
[08:23:12] MartinElvar: has joined #RubyOnRails
[08:23:52] nickenchuggets: has joined #RubyOnRails
[08:23:52] nickenchuggets: has joined #RubyOnRails
[08:26:38] bruno-: has joined #RubyOnRails
[08:31:15] comrad: has joined #RubyOnRails
[08:33:54] pawnbox: has joined #RubyOnRails
[08:34:10] nareshthakur: has joined #RubyOnRails
[08:34:46] adac: has joined #RubyOnRails
[08:35:06] kp666: has joined #RubyOnRails
[08:36:34] norc: has joined #RubyOnRails
[08:39:19] _3by8: What's the going rate for an e-commerce website?
[08:40:36] nareshth_: has joined #RubyOnRails
[08:40:45] zpe: has joined #RubyOnRails
[08:43:54] orolo: has joined #RubyOnRails
[08:46:52] marr: has joined #RubyOnRails
[08:49:42] Pumukel: has joined #RubyOnRails
[08:50:14] xcesariox: has joined #RubyOnRails
[08:51:24] arBmind: has joined #RubyOnRails
[08:56:11] rgtk: has joined #RubyOnRails
[08:57:21] Pazician: has joined #RubyOnRails
[08:59:02] Pazician_: has joined #RubyOnRails
[09:01:16] kimegede: has joined #RubyOnRails
[09:01:26] Pro|_: Any idas why StringIO encoding is not UTF-8 at params_parser.rb
[09:01:35] goldbug: has joined #RubyOnRails
[09:02:12] Pro|_: = request.body is not utf8
[09:03:26] Pazician: has joined #RubyOnRails
[09:04:21] Pazician: has joined #RubyOnRails
[09:06:12] jsrn_: has joined #RubyOnRails
[09:06:42] MaDErroR123: has joined #RubyOnRails
[09:07:45] pawnbox_: has joined #RubyOnRails
[09:09:39] Mia: has joined #RubyOnRails
[09:09:39] Mia: has joined #RubyOnRails
[09:10:28] vigintas: has joined #RubyOnRails
[09:10:38] teclator: has joined #RubyOnRails
[09:12:38] Pazician_: has joined #RubyOnRails
[09:13:52] mark2: has joined #RubyOnRails
[09:14:38] vigintas: has joined #RubyOnRails
[09:18:57] Spami: has joined #RubyOnRails
[09:20:52] pawnbox: has joined #RubyOnRails
[09:23:07] annlewis: has joined #RubyOnRails
[09:23:34] Peg-leg: has joined #RubyOnRails
[09:25:22] platzhirsch: has joined #RubyOnRails
[09:26:59] norc: Meh, multitail does not seem to understand the asci escape codes from my log/development.log :(
[09:27:05] norc: *ansci escape codes
[09:28:13] bruno-: has joined #RubyOnRails
[09:29:32] kriskhaira: Hi. I have a model in my project called Currency. I'm also using the currencies gem and it has a class called ISO4217::Currency. How do I prevent these two from clashing without having to rename my model and still be able to use ISO4217::Currency's classes?
[09:29:42] kriskhaira: *ISO4217::Currency's methods
[09:29:55] tuelz: has joined #RubyOnRails
[09:30:24] norc: >> class Foo; end; module Bar; class Foo; end; end
[09:30:36] norc: kriskhaira: These two don't collide.
[09:31:31] norc: kriskhaira: So based on your description there should not be any collision. Can you show how you load that gem in your Gemfile?
[09:31:49] kriskhaira: The problem is the currencies gem also has a file with this: class Currency < ISO4217::Currency
[09:32:32] norc: kriskhaira: Wrap your own code inside a module or rename.
[09:33:00] kriskhaira: What if my Currency is a model, but the gem's is a module class?
[09:33:45] kitsuneyo: has joined #RubyOnRails
[09:34:08] Ergo: has joined #RubyOnRails
[09:34:32] norc: kriskhaira: Is there a chance you only need to require a part of that gem?
[09:35:02] tym: has joined #RubyOnRails
[09:35:13] kriskhaira: norc: I'm not actually using the gem directly. I'm using the hexorx/countries gem which depends on it. But I also have a Currency model.
[09:35:53] norc: kriskhaira: Rename your own model or put it inside a namespace.
[09:37:44] norc: kriskhaira: Note that this will probably remove some of the rails auto guess features, forcing you specify class names in has_many or belongs_to relationships.
[09:38:20] kriskhaira: norc: I see. That would mean placing my model file in a path like models/foo/currency.rb, right? How would table names be like, then?
[09:38:31] artto: has joined #RubyOnRails
[09:39:12] norc: kriskhaira: You don't have to put it into a nested folder if you don't want to (I would only do that if you were using a module to group things together)
[09:39:16] annlewis: has joined #RubyOnRails
[09:39:16] nfk|laptop: has joined #RubyOnRails
[09:39:47] norc: kriskhaira: Just put your model class inside a module. Table names are unaffected because the module name has no influence on this.
[09:40:02] kriskhaira: norc: Ok. I'll try that
[09:41:34] norc: kriskhaira: Just remember that you have to specify class_name on has_many/belongs_to referencing that model.
[09:41:45] _lazarevsky_: has joined #RubyOnRails
[09:41:51] _lazarevsky_: anyone here used s3 before?
[09:41:55] _lazarevsky_: s3.get_bucket(bucket: 'bucket-name')
[09:41:56] kriskhaira: norc: Ok. Thanks. Will give this a try.
[09:42:04] _lazarevsky_: ArgumentError: bucket_name may not be blank
[09:42:09] _lazarevsky_: what the actual fcuk
[09:42:18] universa1: _lazarevsky_: bucket != bucket_name
[09:42:37] _lazarevsky_: oh.. I copied this example from aws's tut page
[09:42:52] norc: _lazarevsky_: This is precisely why reading API docs >>> reading tutorials.
[09:43:06] norc: Tutorials teach you to copy paste. API docs teach you about the API.
[09:43:39] rattatmatt: has joined #RubyOnRails
[09:43:45] htmldrum: has joined #RubyOnRails
[09:43:55] goldbug: Doing >>> reading (:
[09:44:03] universa1: error messages > all ;)
[09:47:06] goldbug: I certainly spend more of my time reading error messages than API docs. Wonder if there's a reason. . . q:
[09:47:50] l4u-: has joined #RubyOnRails
[09:48:07] norc: goldbug: I dont know. I prefer figuring out how to use a library correctly, than to get to know every error message. :D
[09:48:50] shibabu: has joined #RubyOnRails
[09:48:56] nettoweb: has joined #RubyOnRails
[09:49:20] AzaToth: has joined #RubyOnRails
[09:52:47] jetpackjoe: has joined #RubyOnRails
[09:55:31] cesario: has joined #RubyOnRails
[09:56:50] kitsuneyo: has joined #RubyOnRails
[09:57:04] pawnbox: has joined #RubyOnRails
[09:57:51] ibouvousaime: has joined #RubyOnRails
[09:59:20] bruce_lee: has joined #RubyOnRails
[10:02:57] rodfersou: has joined #RubyOnRails
[10:03:51] platzhirsch: has joined #RubyOnRails
[10:04:53] pawnbox: has joined #RubyOnRails
[10:05:48] nareshthakur: has joined #RubyOnRails
[10:06:27] sameerynho: has joined #RubyOnRails
[10:06:49] quazimodo: has joined #RubyOnRails
[10:08:03] kriskhaira: norc: Putting it under a namespace Foo::Currency worked. I also had to move it into its folder app/models/foo/currency.rb
[10:08:59] norc: kriskhaira: Mm okay. Wasn't sure about that last part.
[10:10:39] tetraktys: has joined #RubyOnRails
[10:11:22] kriskhaira: norc: Yeah, the model wouldn't load otherwise. That's fine for me though???I prefer to have the file path reflect the namespace.
[10:16:06] norc: kriskhaira: Well, seems like Rails autoload does require it indeed.
[10:16:15] goldbug: has joined #RubyOnRails
[10:16:34] norc: But I suppose its a feature
[10:18:52] desmondhume: has joined #RubyOnRails
[10:20:36] infernus: has joined #RubyOnRails
[10:22:33] kitsuneyo: has joined #RubyOnRails
[10:23:40] kitsuneyo: hey, i set up my routes.rb to create URLs like location/usa, location/usa/florida, location/usa/florida/orlando etc. i'm kind of worried this isn't the correct way to do it though, even though it works. gist is here: https://gist.github.com/kitsuneyo/085bff6ce76ac489bba8 any thoughts?
[10:25:17] universa1: why are you worried?
[10:25:30] kitsuneyo: because it seems too easy a solution, and i came up with it myself
[10:25:45] kitsuneyo: that can't be good ;)
[10:25:55] universa1: does it do what you expect it to do?
[10:26:09] universa1: ok, sounds like a good solution to me then.
[10:26:12] kitsuneyo: does it look right to you universa1?
[10:26:40] platzhirsch: has left #RubyOnRails: ()
[10:27:20] kitsuneyo: i thought i would have to nest those routes or something
[10:28:25] bruno-: has joined #RubyOnRails
[10:28:29] GarethAdams_: has joined #RubyOnRails
[10:28:59] norc: kitsuneyo: If you prefer I can give you a large, bizarre and unmaintainable hack instead.
[10:29:21] desmondh_: has joined #RubyOnRails
[10:30:28] Cervajz: has joined #RubyOnRails
[10:30:40] tuelz: has joined #RubyOnRails
[10:30:53] kitsuneyo: norc, i guess you're saying these routes are fine... i will stop worrying now and mark this challenge solved :)
[10:32:00] simmibadhan: has joined #RubyOnRails
[10:32:17] Cervajz_: has joined #RubyOnRails
[10:32:38] ldnunes: has joined #RubyOnRails
[10:33:20] trosborn: has joined #RubyOnRails
[10:35:50] MartinElvar: has joined #RubyOnRails
[10:36:32] SylarRuby: has joined #RubyOnRails
[10:37:46] sameerynho: has joined #RubyOnRails
[10:38:45] norc: What is the most portable way to get access to a global temporary directory across multiple processes?
[10:39:12] universa1: what is the actual problem?
[10:39:55] norc: universa1: Im using capistrano for deployment, and I would like to set up a restart task for my unicorn webserver.
[10:40:01] annlewis: has joined #RubyOnRails
[10:40:17] norc: So right now Im storing the pidfiles for my unicorn process in the rails directory.
[10:40:24] norc: Wait for it.
[10:40:50] norc: I just want a simple restart task to be executed after capistrano is done.
[10:41:09] norc: So I cant figure out how to find the PID at that point anymore.
[10:41:19] iateadonut: has joined #RubyOnRails
[10:41:26] nareshthakur: has joined #RubyOnRails
[10:41:41] universa1: norc: capistrano had a shared directory, the last time i used. which was symlinked into the current deploy dir
[10:41:46] SylarRuby: has joined #RubyOnRails
[10:41:56] TPBallbag: has joined #RubyOnRails
[10:41:58] norc: universa1: Perfect that works.
[10:41:59] pawnbox_: has joined #RubyOnRails
[10:42:11] norc: Thanks for not letting me present you a classic XY problem.
[10:42:14] universa1: norc: check the capistrano docs, that should be in there.
[10:42:20] norc: Yeah, on it already. :)
[10:42:26] n1ck7: has joined #RubyOnRails
[10:43:08] nareshth_: has joined #RubyOnRails
[10:44:38] nfk|laptop: has joined #RubyOnRails
[10:44:48] norc: universa1: Silly. The template deploy file even has it all set up in a comment, with log, tmp/pits and the rest. :)
[10:44:50] nareshth_: has joined #RubyOnRails
[10:44:53] norc: Brilliant.
[10:49:59] roxtrongo: has joined #RubyOnRails
[10:53:19] xcesariox: has joined #RubyOnRails
[10:56:35] GarethAdams: has joined #RubyOnRails
[10:57:02] DoubleMalt: has joined #RubyOnRails
[11:00:51] neanderslob: has joined #RubyOnRails
[11:00:55] sadaf2605: has joined #RubyOnRails
[11:02:26] MartinElvar: has joined #RubyOnRails
[11:05:58] rgtk: has joined #RubyOnRails
[11:06:22] artto: has joined #RubyOnRails
[11:08:10] kitsuneyo: i really want to use this select2/jQuery plugin called placecomplete, which use Google Maps API, in my app... there's no gem for it, is it pretty easy to use something like this in rails? https://github.com/stephjang/placecomplete
[11:09:22] kitsuneyo: or is there already a decent rails equivalent?
[11:09:23] universa1: kitsuneyo: put the js and css file into vendor/assets ... adopt some paths if necessary
[11:09:35] kitsuneyo: it should be that easy huh
[11:10:04] kitsuneyo: i guess it didn't work for me so far because it uses select2, and i'm using select2-rails which is slightly different
[11:10:25] kitsuneyo: but i guess i'll persevere and make it work, thanks universa1
[11:10:26] universa1: kitsuneyo: select2-rails is different how? it should just be the "packaged" version of select2.
[11:11:05] universa1: ohh you need to add some require stuff to application.js / css -- that i forgot.
[11:11:12] kitsuneyo: i think it's called in a different way... i could be wrong though
[11:11:14] yogeshrt: has joined #RubyOnRails
[11:11:15] nareshthakur: has joined #RubyOnRails
[11:11:21] bruno-: has joined #RubyOnRails
[11:11:44] build22: has joined #RubyOnRails
[11:11:45] lxsameer_: has joined #RubyOnRails
[11:13:44] _lazarevsky_: I know this is quite a stretch but has any one of you worked with decrypting stuff?
[11:13:58] _lazarevsky_: in particular with OpenSSL::Cipher
[11:14:08] _lazarevsky_: I don't know the first thing about it I'm afraid
[11:15:06] nareshth_: has joined #RubyOnRails
[11:16:13] agoldboi: has joined #RubyOnRails
[11:20:27] nareshthakur: has joined #RubyOnRails
[11:23:39] cswelin: has joined #RubyOnRails
[11:31:29] tuelz: has joined #RubyOnRails
[11:32:22] goldbug: has joined #RubyOnRails
[11:33:36] yoongkang: has joined #RubyOnRails
[11:34:04] yogeshrt: has joined #RubyOnRails
[11:34:42] artto: has joined #RubyOnRails
[11:34:43] tvw: has joined #RubyOnRails
[11:35:08] n1ck7: has joined #RubyOnRails
[11:36:39] damireh: has joined #RubyOnRails
[11:37:09] jbrinkmusic: has joined #RubyOnRails
[11:37:16] R0ok_: has joined #RubyOnRails
[11:37:50] jbrinkmusic: I have a "message" model that belongs_to a "user" (devise) model that has a custom "company" column... I want to get all messages that belong to users in a certain company... what is the best way to do this?
[11:38:04] damireh: has joined #RubyOnRails
[11:39:12] arup_r: has joined #RubyOnRails
[11:39:14] orikremer: has joined #RubyOnRails
[11:39:17] jbrinkmusic: is it a simple Message.all.where(????) or do I need to modify my database?
[11:39:26] arup_r: Hi All...
[11:40:46] roxtrongo: has joined #RubyOnRails
[11:40:48] annlewis: has joined #RubyOnRails
[11:41:15] Pazician: has joined #RubyOnRails
[11:41:47] arup_r1: has joined #RubyOnRails
[11:48:22] stamina: has joined #RubyOnRails
[11:51:28] shibabu: has joined #RubyOnRails
[11:52:15] arBmind: has joined #RubyOnRails
[11:54:00] damireh: has joined #RubyOnRails
[11:54:02] tetraktys: has joined #RubyOnRails
[11:56:43] arup_r: hey kitsuneyo
[11:56:59] Brandt: has joined #RubyOnRails
[11:57:31] kitsuneyo: jbrinkmusic, @messages = Message.where(stuff)
[11:59:08] jbrinkmusic: kitsuneyo: what should the "stuff" be in the case that message belongs_to user that has a "company" column?
[11:59:30] jbrinkmusic: Message only has a reference to "user_id"
[11:59:50] kitsuneyo: jbrinkmusic, on which controller/action are you showing these messages??
[12:00:03] jbrinkmusic: kitsuneyo: MessagesController
[12:00:31] kitsuneyo: which action?
[12:01:12] kitsuneyo: so the url is like user/:id/messages?
[12:02:02] jbrinkmusic: kitsuneyo: no, it's appurl.tld/messages
[12:02:03] kitsuneyo: or companies/:id/messages ?
[12:02:36] nareshth_: has joined #RubyOnRails
[12:02:41] kitsuneyo: jbrinkmusic, in that case where is your user_id coming from, if not the route?
[12:04:41] kitsuneyo: i mean company_id
[12:04:50] kitsuneyo: you want to show the messages that belong to a company, but you aren't supplying the company_id
[12:05:15] jbrinkmusic: kitsuneyo: on the index action it currently doesn't care... I want to change it so it cares... user_id comes from current_user when a new message is created
[12:06:05] kitsuneyo: so for current_user's company_id, you want to show all messages belonging to users with the same company_id?
[12:06:10] jbrinkmusic: the schema doesn't have a company_id column for message, only for user
[12:06:28] jbrinkmusic: kitsuneyo: precisely
[12:07:10] kitsuneyo: i guess you just need to collect all users with the same company_id, then collect their messages
[12:07:48] nareshthakur: has joined #RubyOnRails
[12:07:57] boombadaroomba: does anyone have experience with nested attributes in react-rails?
[12:10:08] desmondhume: has joined #RubyOnRails
[12:10:24] yogeshrt: has joined #RubyOnRails
[12:11:14] jbrinkmusic: kitsuneyo: I can do User.where(company: "X") and Message.where(user_id: y) but how do I combine these?
[12:11:24] Ropeney: has joined #RubyOnRails
[12:12:35] jbrinkmusic: kitsuneyo: can I do something like Message.where(user_id: User.where(company: "X").id) ?
[12:13:43] nareshth_: has joined #RubyOnRails
[12:14:01] emilkarl: has joined #RubyOnRails
[12:14:26] MaDErroR123: has joined #RubyOnRails
[12:15:44] emilkarl: I would like to send a couple of mehods and chain them on Time from a string??? like time_string = ???now.beginning_of_week??? and then to Time.send(time_string). Is that possible to do? My example does not work.
[12:16:22] Scripore: has joined #RubyOnRails
[12:18:45] darrencauthon: has joined #RubyOnRails
[12:19:35] exadeci: has joined #RubyOnRails
[12:20:50] arup_r: emilkarl: rather send as Array a = [:now, :begin,..] and then .. a.inject(Time) { |res, e| res.send(e) }
[12:21:06] jahbrewski: has joined #RubyOnRails
[12:21:19] emilkarl: This seems to work??? sorry for the code. time_string.split('.').inject('Time', &:send)
[12:21:28] emilkarl: but without ??? around Time
[12:21:44] pawnbox: has joined #RubyOnRails
[12:21:54] arup_r: emilkarl: see mine :D
[12:22:20] Detch: has joined #RubyOnRails
[12:23:44] darrencauthon: has joined #RubyOnRails
[12:24:15] armyriad: has joined #RubyOnRails
[12:24:45] Tref: has joined #RubyOnRails
[12:25:19] nareshthakur: has joined #RubyOnRails
[12:26:06] armyriad: has joined #RubyOnRails
[12:31:21] kitsuneyo: has joined #RubyOnRails
[12:32:17] pawnbox: has joined #RubyOnRails
[12:32:20] kitsuneyo: jbrinkmusic, i don't know, it sounds like you should reorganise how you're displaying these messages. i mean, i assume you would want to sort them in the view my user anyway
[12:33:03] orikremer: has joined #RubyOnRails
[12:33:07] kitsuneyo: so why not just get all the users you need, like @users = User.where(company_id: current_user.company_id) (or whatever)
[12:33:38] kitsuneyo: then use views/partials to display all of their messages
[12:33:57] kitsuneyo: *by user, not my user
[12:35:24] auxbuss: has joined #RubyOnRails
[12:35:33] njero: has joined #RubyOnRails
[12:36:03] desmondh_: has joined #RubyOnRails
[12:37:44] dhjondoh: has joined #RubyOnRails
[12:38:07] HalcyonicStorm: has joined #RubyOnRails
[12:39:55] nareshth_: has joined #RubyOnRails
[12:41:34] annlewis: has joined #RubyOnRails
[12:41:35] emilkarl: How about this one. If I got ???3.months.ago??? as a string, is there an easy way to parse it into a Date?
[12:41:43] Scripore: has joined #RubyOnRails
[12:42:37] Sigfrid: has joined #RubyOnRails
[12:42:59] clonesig: has joined #RubyOnRails
[12:43:35] Scripore: has joined #RubyOnRails
[12:45:56] sevenseacat: has joined #RubyOnRails
[12:46:30] darrencauthon: has joined #RubyOnRails
[12:49:00] suchness: has left #RubyOnRails: ()
[12:49:02] suchness: has joined #RubyOnRails
[12:49:35] pawnbox: has joined #RubyOnRails
[12:51:55] njero: hey.. I'm trying to build a notification system. There will be general notification which should be supplied to entire users, selective notifications(selected subset of users) and finally personal notifications. I'm thinking whether i should put all in a table and let user to fetch by inclusiveness his user id in one column which is query that can select list of users or generate a notification table with notification for each user(duplicating general and
[12:51:55] njero: selective notifications)
[12:52:10] Papierkorb: emilkarl: the user types in periods? What's the use-case?
[12:52:23] emilkarl: Im setting up a config
[12:52:37] emilkarl: so I can add date intervals that I want to be quite flexible
[12:52:49] emilkarl: so I have a DateInterval model from a from and until setting
[12:53:07] Papierkorb: emilkarl: if it is trusted input (!), you could use Kernel#eval. Not a fan though of storing rb code in yamls ..
[12:53:08] emilkarl: i would in admin be able to just insert strings in from and until that will be parsed
[12:53:22] dhjondoh: has joined #RubyOnRails
[12:53:29] TPBallbag: has joined #RubyOnRails
[12:54:12] emilkarl: Papierkorb: k cool, neither am i. but that is the solution Ive come up with that is flexible enough. Any ideas on antother solution
[12:54:23] dhjondoh: has joined #RubyOnRails
[12:54:28] leonardoajim: has joined #RubyOnRails
[12:54:30] TPBallbag: has joined #RubyOnRails
[12:54:49] Papierkorb: emilkarl: make it more declarative. Like min_age: { days: 5 }
[12:55:21] emilkarl: but i want to be able to use a lot of different settings
[12:55:32] emilkarl: like 3.months.ago.beginning_of_month
[12:55:40] Papierkorb: emilkarl: else, there is always the regex or String#split with inject{ send }, but that's much less flexible than eval, and in that case, you might as well have readable configurations IMO ;)
[12:56:56] violarium: has joined #RubyOnRails
[12:57:34] Papierkorb: Next issue you'll want to solve I guess will be doing calculations. 3.months + 5.days -and then you can either implement a small parser with math functions and stuff, or, use ruby, which already does exactly that.
[12:58:40] nareshthakur: has joined #RubyOnRails
[12:58:41] HalcyonicStorm: has left #RubyOnRails: ()
[12:58:47] GarethAdams: Papierkorb: and then he'll want dates which are parameterised based on other dates that have been set in the config, etc etc ;)
[12:59:06] norc: Im wondering, is there actually some RFC or ISO that specifies date arithmetic?
[12:59:18] rgrmatt: has joined #RubyOnRails
[12:59:18] bmalum: has joined #RubyOnRails
[13:00:18] flip_digits: has joined #RubyOnRails
[13:02:02] norc: I mean what does 3.months.ago actually end up considering leap years, different days each month, leap years, leap seconds...
[13:02:07] emilkarl: it would probably be 3 settings. an int for lets say 3, a string for type (days, weeks, month, years) and a string for end, (beginning_of/end_of)
[13:02:39] emilkarl: and using ago on from and from_now on until?
[13:02:48] annlewis: has joined #RubyOnRails
[13:02:52] rickmasta: has joined #RubyOnRails
[13:03:24] kitsuneyo: n_e_o, sounds hellish to build, isn't there a gem?
[13:03:25] norc: Papierkorb: The preferred way is to run erb over yaml documents for such things.
[13:04:02] Papierkorb: norc: that information probably needs to be evaluated on-demand, else 3.days.ago will quickly become some weeks or more :)
[13:04:06] nareshth_: has joined #RubyOnRails
[13:05:06] Doddlin: has joined #RubyOnRails
[13:05:41] pawnbox: has joined #RubyOnRails
[13:06:24] jkamenik: has joined #RubyOnRails
[13:06:34] norc: Papierkorb: { days: 5, method: ago }.tap { |a| a[:days].send(a[:method].to_sym) }
[13:06:36] norc: Not an issue.
[13:06:45] rgtk: has joined #RubyOnRails
[13:06:49] norc: errr. missing the days method, but you get the idea.
[13:07:03] Papierkorb: norc: that's what I (more or less) suggested to the asker, yes
[13:07:04] damireh: has joined #RubyOnRails
[13:07:08] norc: Ah alright nevermind then. :)
[13:08:40] nareshthakur: has joined #RubyOnRails
[13:08:48] emilkarl: I think that is better than eval.
[13:09:09] norc: Usually when people think they need eval, they don't. :-)
[13:09:45] emilkarl: depends on how much more code I need I guess and I am in a hurry. but eval was not what I was looking for. This is much better
[13:09:58] doodlehaus: has joined #RubyOnRails
[13:10:00] Scripore: has joined #RubyOnRails
[13:10:21] Papierkorb: norc, emilkarl: btw the .to_sym call in the example code above is not necessary
[13:10:28] norc: emilkarl: Note that you should still verify input before you blindly .send methods based on input.
[13:10:54] krz: has joined #RubyOnRails
[13:11:42] norc: Papierkorb: Oh. When was that added?
[13:12:01] nareshth_: has joined #RubyOnRails
[13:12:08] Papierkorb: norc: no idea, never needed that though
[13:12:19] nhhagen: has joined #RubyOnRails
[13:12:21] norc: Ah, was added in Ruby 2.1 - missed that. :)
[13:14:24] someish: has joined #RubyOnRails
[13:16:12] nareshthakur: has joined #RubyOnRails
[13:16:26] Papierkorb: Has someone here experience with WebSockets on mobile devices? Is it worth using, or does it break so often that you might as well use (long) polling?
[13:16:48] Papierkorb: breaking = connection dropping due to mobile conneciton
[13:16:54] njero: kitsuneyo: nothing to my knowledge :(
[13:17:13] tuelz: has joined #RubyOnRails
[13:17:50] Pazician: has joined #RubyOnRails
[13:17:55] goldbug: has joined #RubyOnRails
[13:20:08] pawnbox: has joined #RubyOnRails
[13:20:22] antgel: has joined #RubyOnRails
[13:20:47] kitsuneyo: n_e_o guess you gotta pioneer it then :)
[13:23:32] nareshth_: has joined #RubyOnRails
[13:23:57] CodingWolf: has joined #RubyOnRails
[13:26:50] nareshthakur: has joined #RubyOnRails
[13:28:33] toydestroyer: has joined #RubyOnRails
[13:32:34] nareshth_: has joined #RubyOnRails
[13:34:36] emilkarl: hmm changed my test db to postgres. Now the fixtures fails to load
[13:34:38] sadaf2606: has joined #RubyOnRails
[13:35:02] emilkarl: I have a Block that references Color, and it need colors to be loaded first
[13:35:11] emilkarl: it wasnt a problem with sqlite
[13:35:33] yogeshrt: has joined #RubyOnRails
[13:35:44] nareshthakur: has joined #RubyOnRails
[13:35:49] mag42c: has joined #RubyOnRails
[13:35:56] rvanlieshout: emilkarl: doubt that the db adapter is to blame
[13:37:28] anagha: has joined #RubyOnRails
[13:37:42] gavit: I am trying to make a customInput for simple_form. The idea is to display a text_area and the user should enter an array of coordinates(x,y). Each coordinate on a new line. For now I just copied https://github.com/plataformatec/simple_form/blob/master/lib/simple_form/inputs/text_input.rb but now I want to merge the coordinates to give back to the model
[13:37:48] emilkarl: but just changing adapter makes the test fail, strange
[13:38:12] anagha: has left #RubyOnRails: ()
[13:38:18] nareshth_: has joined #RubyOnRails
[13:38:40] rvanlieshout: gavit: how is the input any different then a normal textarea?
[13:38:42] anagha: has joined #RubyOnRails
[13:38:49] rvanlieshout: emilkarl: !debug
[13:38:49] helpa: emilkarl: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[13:39:04] emilkarl: working on it
[13:39:48] kitsuneyo: has joined #RubyOnRails
[13:39:48] gavit: rvanlieshout: I want to add validation that there is a <number>,<number> on every line and that there is at least one line
[13:40:01] rvanlieshout: gavit: so add that validation to the model?
[13:41:16] gavit: rvanlieshout: also the textarea gives back a string, I want to give back a RGeo::Feature::Polygon
[13:41:18] nareshthakur: has joined #RubyOnRails
[13:41:37] dtordable: has joined #RubyOnRails
[13:41:40] rvanlieshout: 'gives back' = ?
[13:41:54] rvanlieshout: the browser converts the data into a string indeed, but any input besides file will be like that
[13:42:15] thorgi: has joined #RubyOnRails
[13:42:21] gavit: rvanlieshout: you get the following as parameter: "polygon"=>"2, 3\r\n3, 4"
[13:42:38] gavit: rvanlieshout: aah, I see your point
[13:42:47] gavit: rvanlieshout: thanks
[13:43:24] Axy: has joined #RubyOnRails
[13:43:25] Axy: has joined #RubyOnRails
[13:43:58] nareshth_: has joined #RubyOnRails
[13:44:18] njero: rvanlieshout: any comments on notifications that i posted earlier?
[13:44:36] rvanlieshout: didn't see that one n_e_o
[13:44:40] braincrash: has joined #RubyOnRails
[13:44:43] njero: can i repost?
[13:44:49] njero: hey.. I'm trying to build a notification system. There will be general notification which should be supplied to entire users, selective notifications(selected subset of users) and finally personal notifications. I'm thinking whether i should put all in a table and let user to fetch by inclusiveness his user id in one column which is query that can select list of users or generate a notification table with notification for each user(duplicating general and
[13:44:49] njero: selective notifications)
[13:45:47] rvanlieshout: how would a subset of users be defined?
[13:46:04] njero: rvanlieshout: using some query which return user list
[13:46:37] njero: say by using User.find_by_sql(notification.query)
[13:47:01] njero: rvanlieshout: that's smells bad :(
[13:47:12] rvanlieshout: what would notification.query be?
[13:47:44] mutuma: has joined #RubyOnRails
[13:48:00] atomical: has joined #RubyOnRails
[13:48:00] medright: has joined #RubyOnRails
[13:48:01] njero: select id from users where column=a.. etc
[13:48:20] rvanlieshout: and what would you want that statement to return?
[13:48:30] rvanlieshout: User.find_by_sql(notification.query)
[13:48:33] rvanlieshout: a single user that... ?
[13:48:36] njero: rvanlieshout: nope.
[13:48:46] rvanlieshout: then it shouldn't start with User. :)
[13:49:02] njero: rvanlieshout:
[13:49:28] njero: not like that.. to check if current user is part of that query result and get notification
[13:49:32] AimlessRAven: has joined #RubyOnRails
[13:49:40] AimlessRAven: has left #RubyOnRails: ()
[13:49:43] rvanlieshout: 'that query' already is a wrong approach
[13:49:49] njero: rvanlieshout: ya. got it..
[13:50:06] njero: that will try returning first user rt?
[13:50:06] thorgi: hi all - what's the best way of custom-associating ActiveRecord with another bespoke class, e.g. AR class Project has an 'owner' attribute (string), but that needs to be dynamically associated with a User object, except User is not AR and doesn't come from DB, it's an existing class that queries LDAP+Kerberos etc
[13:50:11] rvanlieshout: @user.notifications should just return an arel for notifications either for that user, it's subset or generic
[13:50:28] sankaber: has joined #RubyOnRails
[13:50:43] njero: rvanlieshout: how can i accomplish that?
[13:50:46] rvanlieshout: thorgi: create a def owner on your user method that returns the created object
[13:50:53] rvanlieshout: n_e_o: has_many :notifications with some conditions
[13:51:06] rvanlieshout: user_id = ? or user_id is null or <i don't know how you've defined subset>
[13:51:37] n1ck7: has joined #RubyOnRails
[13:51:45] maxz: has joined #RubyOnRails
[13:51:52] johnflux: has joined #RubyOnRails
[13:51:53] johnflux: has joined #RubyOnRails
[13:52:40] nareshthakur: has joined #RubyOnRails
[13:53:05] njero: rvanlieshout: but for condition, should i have similar query column? bcz this selection criteria for each notification will be different. It can be based on User attributes or based on info from other tables too..
[13:53:18] rvanlieshout: n_e_o: explain the conditions
[13:53:24] rvanlieshout: and not 'something like', but how they exactly are
[13:54:28] thorgi: rvanlieshout: in Project model? I do need the owner string value from Project model / DB, which I use to look up LDAP+KRB, but then I'd like to replace the AR::Relation value of owner from the string, with a full non-AR object, that seems to work in a way, except Rails appears to be calling .to_s on my non-AR object, yielding a string in the end as well, instead of assigning full object
[13:54:36] Lavan0074: has joined #RubyOnRails
[13:54:51] njero: rvanlieshout: i don't know. Because one can be a broadcast for all user with some message. Some can be users subscribed to some event in ar like that.
[13:54:53] thorgi: tried write_attribute() as well, same effect, unless I'm not supposed to change the ::Relation
[13:55:32] rvanlieshout: thorgi: why would you need to replace any relation?
[13:55:39] rvanlieshout: thorgi: owner is then 'just' a property of project
[13:55:49] rvanlieshout: n_e_o: then it's not going to be fixed.. create specs first
[13:56:18] youngbaks: has joined #RubyOnRails
[13:56:19] shibabu: has joined #RubyOnRails
[13:56:46] thorgi: rvanlieshout: I'm looking to have that property value as a full non-AR object, so I can show more of its properties in view (those properties don't come from DB though, but from an LDAP query)
[13:56:54] njero: rvanlieshout: so an approach with query for set of users won't work?
[13:57:30] thorgi: rvanlieshout: maybe I'm trying to hard to associate it at model end, and should do it in controller (e.g. @project.owner == @user.uid, then ...)
[13:57:38] njero: rvanlieshout: then i better go for the latter where notification entry is created for each user :(
[13:59:35] njero: rvanlieshout: how abt this? for complete user broadcast i'll put some boolean column and for else i generate separate entries?
[14:00:09] thorgi: actually, I think just another instance var in Project model, populated with a handle to the non-AR User object, will allow that project to always carry a reference (once populated of course)
[14:00:39] thorgi: and I'll keep owner attribute untouched, since it's a DB column as well, so would complicate save method
[14:01:42] Lavan0074: where to set the postgres password in a rails app?
[14:02:48] agoldboi: has left #RubyOnRails: ()
[14:03:35] annlewis: has joined #RubyOnRails
[14:03:54] rvanlieshout: thorgi: exactly, so that's just something that def owner should return?
[14:04:17] rvanlieshout: thorgi: you can have it transparent if you change both def owner= and def owner
[14:06:21] mrchris: has joined #RubyOnRails
[14:07:05] medright: has joined #RubyOnRails
[14:09:23] daivyk: has joined #RubyOnRails
[14:11:34] wilsonc91: has joined #RubyOnRails
[14:12:17] rvanlieshout: thorgi: whatis a 'full non-AR object' and how is it different from something that is returned on def owner?
[14:12:32] rvanlieshout: n_e_o: what? no
[14:12:43] rvanlieshout: any line that explicitly talks about a query at this stage is wrong
[14:13:12] atomical: has joined #RubyOnRails
[14:13:20] Brandt: has joined #RubyOnRails
[14:13:21] mary5030: has joined #RubyOnRails
[14:14:17] roxtrongo: has joined #RubyOnRails
[14:14:27] thorgi: rvanlieshout: just a plain old Ruby object, not subclassing ActiveRecord... I've got this now in Project model 'def owner; IPA::IPAUser.find(nil, uid: read_attribute(:owner)).first; end'
[14:14:56] nettoweb: has joined #RubyOnRails
[14:15:08] thorgi: rvanlieshout: but in the final @project instance of this Project model, owner attribute still returns just String, instead of the IPAUser object, basically it seems to be calling .to_s on it somewhere silently along the way
[14:16:10] thorgi: rvanlieshout: that said, I think I should probably not be replacing an attribute of Project model that is associated with database, and instead have another private attribute
[14:16:49] emilkarl: norc: is it possible to chain more in your way?
[14:17:05] youngbaks: has joined #RubyOnRails
[14:17:11] emilkarl: { days: 5, type: :months, method: :ago }.tap { |a| a[:days].send(a[:type]).send(a[:method) }
[14:17:16] emilkarl: cant get it to work.
[14:17:20] rvanlieshout: thorgi: what does your @project.method(:owner).source_location returns?
[14:17:49] rvanlieshout: cause replacing def owner is the right way imo
[14:17:55] yorickpeterse: has joined #RubyOnRails
[14:18:04] norc: emilkarl: That would be a syntax error as Ruby probably told you.
[14:18:19] yorickpeterse: Does ActiveRecord have a method similar to find_by_sql that returns an ActiveRecord::Relation from a SQL string, instead of directly querying the DB and returning an Array?
[14:18:40] yorickpeterse: where "a SQL string" is basically a valid SQL query on its own
[14:18:47] yorickpeterse: (not just a WHERE fragment or something like that)
[14:18:56] thorgi: rvanlieshout: wouldn't that lead to problems with save, in that the owner attribute no longer carries a string when it tried to commit to database (although my replacement object does respond correctly to to_s)?
[14:19:36] emilkarl: norc: naa. I just get the hash back.
[14:20:02] GarethAdams: emilkarl: the line you pasted had a syntax error ;)
[14:20:16] GarethAdams: emilkarl: tap returns whatever the original object is
[14:20:39] rvanlieshout: thorgi: save doesn't use that
[14:20:45] norc: emilkarl: ^^
[14:20:50] norc: emilkarl: And that is the entire point of tap. ;-)
[14:20:58] norc: Also its useful for one liners. :-)
[14:21:33] emilkarl: ok so let me pastie a little snippet.
[14:21:52] Kingdutch: Using Rails 5, if I "render json: ..", how can I change the content_type that produces for all methods in a controller? I read the layouts and rendering guide which says I can specify it on render but that seems tedious and error prone (content returned should always be application/vnd.api+json)
[14:21:59] tetraktys: has joined #RubyOnRails
[14:22:10] emilkarl: is there a ruby snippet generator that can parse the code?
[14:22:14] emilkarl: like jsfiddle
[14:22:33] norc: emilkarl: https://eval.in/
[14:22:43] thorgi: rvanlieshout: okay, the source location gives me this [".../app/models/project.rb", 11]
[14:22:50] GarethAdams: emilkarl: not one that has Rails methods like .months.ago, AFAIK
[14:23:38] emilkarl: erm I need rails
[14:23:40] thorgi: rvanlieshout: also, this correctly populates the class' name into owner attribute "def owner; IPA::IPAUser.find(nil, uid: read_attribute(:owner)).first.class; end"
[14:23:51] thorgi: rvanlieshout: owner values ends up as 'IPA::IPAUser'
[14:24:08] norc: emilkarl: Just use your rails console to try out stuff like that.
[14:24:09] emilkarl: ok check this out GarethAdams norc http://pastie.org/10562807
[14:24:25] TPBallbag: has joined #RubyOnRails
[14:24:32] norc: emilkarl: Yeah looks fine
[14:24:36] thorgi: rvanlieshout: but object assignment does a .to_s() somewhere, cause instead of full object I end up with just UID of the user (which is returned by IPA::IPAUser instances' to_s)
[14:24:45] emilkarl: it skips the type->months???
[14:24:46] emilkarl: Calling #ago or #until on a number (e.g. 5.ago) is deprecated and will be removed in the future
[14:24:50] norc: emilkarl: You might want to use .try() (or the upcoming &.) syntax by the way.
[14:24:53] emilkarl: which is strange
[14:24:56] TPBallbag: has joined #RubyOnRails
[14:25:27] GarethAdams: emilkarl: works for me!
[14:25:40] pawnbox: has joined #RubyOnRails
[14:26:00] orikremer: has joined #RubyOnRails
[14:26:20] emilkarl: In what rails v? Mine is 4.1.10
[14:26:20] rvanlieshout: thorgi: !debug
[14:26:20] helpa: thorgi: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[14:27:00] ramortegui: has joined #RubyOnRails
[14:27:02] yorickpeterse: has left #RubyOnRails: ("The NSA took my baby")
[14:27:13] clonesig: has joined #RubyOnRails
[14:27:31] emilkarl: this is what I get GarethAdams http://pastie.org/10562817
[14:28:10] rvanlieshout: emilkarl: don't call ago on a number?
[14:28:36] thorgi: rvanlieshout: will try to wrap it into a gist, thanks for persisting
[14:28:57] GarethAdams: emilkarl: what is `config[:number].send(config[:type]).class` for you?
[14:29:00] emilkarl: well it should call ???months??? before ???ago??? rvanlieshout
[14:29:20] GarethAdams: emilkarl: it should be ActiveSupport::Duration
[14:30:13] GarethAdams: emilkarl: what version of Rails is this?
[14:31:10] arup_r: has joined #RubyOnRails
[14:31:35] GarethAdams: emilkarl: does `5.method(:months).source_location` look like something in activesupport?
[14:32:04] kitsuneyo: has joined #RubyOnRails
[14:33:09] emilkarl: this returns the same deprecation. 5.send('days').send('ago')
[14:33:16] GarethAdams: I mean that method directly returns an ActiveSupport::Duration
[14:33:32] GarethAdams: I can't see how that's turning into a Fixnum for you
[14:33:48] kitsuneyo: has joined #RubyOnRails
[14:33:53] emilkarl: [14] pry(main)> 5.method(:months).source_location
[14:33:54] emilkarl: => [???~/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/activesupport-4.1.10/lib/active_support/core_ext/integer/time.rb", 35]
[14:35:46] doodlehaus: has joined #RubyOnRails
[14:36:36] cored: has joined #RubyOnRails
[14:36:46] GarethAdams: emilkarl: how about `ActiveSupport::Duration.new(150.days, [[:months, 5]]).class`
[14:37:15] GarethAdams: emilkarl: you've got some other gem that's breaking ActiveSupport then
[14:37:17] emilkarl: that is from ???rails c"
[14:37:27] darrencauthon: has joined #RubyOnRails
[14:37:27] gavit: when making a custom validator, where do I place my class file? the folder model doesnt seem approriate
[14:37:31] GarethAdams: ActiveSupport::Duration.new should *not* return a Fixnum
[14:38:03] emilkarl: I have ChronicDuration gem installed.
[14:38:12] emilkarl: that might be messing with something
[14:38:18] cored: I'm having a weird issue with warden. When I follow some links in my app after authentication successfully happens the session just get deleted and I need to re-authenticate.
[14:39:02] Brandt: has left #RubyOnRails: ()
[14:39:36] emilkarl: GarethAdams: would it be possible to track which gem could mess with ActiveSupport???it doesnt seem to be Chronic.
[14:40:32] drewdfw: has joined #RubyOnRails
[14:40:57] emilkarl: http://www.bnjs.co/2015/01/14/rails-date-class-durations-and-ruby-basicobject/
[14:40:59] shtirlic: has joined #RubyOnRails
[14:41:06] mrchris: has joined #RubyOnRails
[14:41:09] mrchris: Good morning
[14:41:35] Brandt: has joined #RubyOnRails
[14:41:55] mrchris: What is the best solution for logging added and removed has_many :through associations?
[14:41:56] Brandt: has left #RubyOnRails: ()
[14:42:21] MaDErroR123: has joined #RubyOnRails
[14:42:30] MartinElvar: has joined #RubyOnRails
[14:42:31] emilkarl: GarethAdams: it actually is a AS::Duration so that should not be the problem??? a.is_a? ActiveSupport::Duration
[14:42:35] mrchris: I've come up with a way to do it but it feels convoluted
[14:42:37] Brandt: has joined #RubyOnRails
[14:43:00] emilkarl: I guess the answer could be in the blog post somewhere.
[14:43:14] brandtam: has joined #RubyOnRails
[14:43:22] MartinElvar: has joined #RubyOnRails
[14:46:20] nya: has joined #RubyOnRails
[14:47:48] n1lo: has joined #RubyOnRails
[14:48:49] pawnbox: has joined #RubyOnRails
[14:49:02] evanessence: has joined #RubyOnRails
[14:49:42] emilkarl: GarethAdams: check this output??? it really seems strange. It seems to work on C even tho it throws the warning. But if it would not register the months? http://pastie.org/10562863
[14:50:15] evanessence: has left #RubyOnRails: ()
[14:50:44] tuelz: has joined #RubyOnRails
[14:51:11] polishdub: has joined #RubyOnRails
[14:51:48] urbanmonk: has joined #RubyOnRails
[14:51:54] evoman: has joined #RubyOnRails
[14:52:00] roxtrongo: has joined #RubyOnRails
[14:52:37] medright: has joined #RubyOnRails
[14:52:42] greg: has joined #RubyOnRails
[14:52:43] annlewis: has joined #RubyOnRails
[14:53:20] MartinEl_: has joined #RubyOnRails
[14:54:05] tubbo: __chris: what do you mean "added and removed"?
[14:54:14] IrishGringo: has joined #RubyOnRails
[14:54:21] tubbo: like actually associating two records together?
[14:54:30] flori_: has joined #RubyOnRails
[14:55:40] dopie: has joined #RubyOnRails
[14:55:46] mrchris: Hi tubbo. No, lets say i remove one association and add another at the same time. The IDs would look something like Before: (has_many foo) [1] After: [4]. I want to log the removal and addition of the new associations
[14:55:55] MartinEl_: has joined #RubyOnRails
[14:56:04] mrchris: but since its a has_many through it does not respond to changed?
[14:56:45] mrchris: my solution so far is to add attr_accessors like @_added_foos and @_removed_foos.
[14:56:51] mrchris: Let me whip up a gist
[14:57:02] tubbo: yeah i'd like to see it
[14:58:07] atomical_: has joined #RubyOnRails
[14:58:41] ngr_: has left #RubyOnRails: ()
[14:58:58] ngr: has joined #RubyOnRails
[14:59:00] jkamenik1: has joined #RubyOnRails
[14:59:35] TPBallbag: has joined #RubyOnRails
[15:05:44] nettoweb: has joined #RubyOnRails
[15:07:01] MaDErroR123: has joined #RubyOnRails
[15:07:39] rgtk: has joined #RubyOnRails
[15:10:00] RegulationD: has joined #RubyOnRails
[15:10:15] emilkarl: has joined #RubyOnRails
[15:11:02] jhn: has joined #RubyOnRails
[15:11:37] gavit: I have a view with a textarea where the user can enter coordinates. My controller permits this polygon, but when saving I get an error becuase I did not manipulate the textarea to become a polygon. I now have a method that can manipulate the string into a polygon, where do I call this method?
[15:12:06] emilkarl: Why would 5.send(???months???) not be a ActiveSupport::Duration when 5.months is?
[15:12:33] mrchris: tubbo, http://pastie.org/private/j1p0yupzkyz8fw50g3nebg
[15:13:42] Mia: has joined #RubyOnRails
[15:13:42] Mia: has joined #RubyOnRails
[15:14:03] pawnbox: has joined #RubyOnRails
[15:14:24] CornishPasty: has joined #RubyOnRails
[15:14:49] desmondhume: has joined #RubyOnRails
[15:15:10] speakingcode: has joined #RubyOnRails
[15:15:35] mrchris: sorry tubbo i tried to clean some things up but didn't quite get the method names right. Here is a better pass http://pastie.org/private/dyct71nh506uxhu9uypjw
[15:16:16] adavia_: has joined #RubyOnRails
[15:16:43] drupald: has joined #RubyOnRails
[15:16:44] medright: has joined #RubyOnRails
[15:17:40] pawnbox: has joined #RubyOnRails
[15:19:27] lipoqil: has joined #RubyOnRails
[15:19:49] shinnya: has joined #RubyOnRails
[15:20:15] flori_: has joined #RubyOnRails
[15:20:46] workmaster2n: has joined #RubyOnRails
[15:21:08] creature: has joined #RubyOnRails
[15:22:43] MaDErroR123: has joined #RubyOnRails
[15:23:44] febuiles: has joined #RubyOnRails
[15:24:18] ngr: I am using Ransack to filter a complex data model but it fails with an SQL error ("no suchs column: activities_performances_2") and it also generates redundant JOIN statements ("activities", "activities_performances", "activities_performances_joins"). I am not sure if this problem is related to Ransack or to ActiveRecord. I'd much appreciate any hints on this subject. Please see https://gist.github.com/ngrash/486532f629b7349a9c6f for a short listing of my models
[15:24:23] pawnbox: has joined #RubyOnRails
[15:25:09] phinal: has joined #RubyOnRails
[15:25:26] auralis: has joined #RubyOnRails
[15:25:41] ngr: I also included the failing test case (q: { verticals_id_eq: 1, activity_finish_date_gteq: '2015-11-17', activity_finish_date_lteq: '2015-11-17'). interestingly, when I don't filter for verticals_id_eq it works.
[15:25:44] TPBallbag: has joined #RubyOnRails
[15:26:33] pawnbox: has joined #RubyOnRails
[15:28:35] emilkarl: Can anyone reproduce this with Rails 4.1.14 and Ruby 2.1.3? https://github.com/rails/rails/issues/14963
[15:29:08] RegulationD: has joined #RubyOnRails
[15:29:45] desmondhume: has joined #RubyOnRails
[15:30:32] wilsonc91: has joined #RubyOnRails
[15:30:35] treehug88: has joined #RubyOnRails
[15:30:36] medright: has joined #RubyOnRails
[15:31:46] arup_r: has joined #RubyOnRails
[15:32:45] darrencauthon: has joined #RubyOnRails
[15:33:45] redondos_: has joined #RubyOnRails
[15:33:57] gavit: params[:polygon]="value" <- is this a hash?
[15:34:08] tubbo: gavit: what is 'this' :P
[15:34:20] tubbo: the value, the params, the key of the params, the method you're calling
[15:36:02] desmondhume: has joined #RubyOnRails
[15:36:29] atomical: has joined #RubyOnRails
[15:37:44] nurbson: has joined #RubyOnRails
[15:37:56] rgtk: has joined #RubyOnRails
[15:38:13] TPBallbag: has joined #RubyOnRails
[15:38:41] lacrymology: has joined #RubyOnRails
[15:38:46] tildes: has joined #RubyOnRails
[15:39:35] Fire-Dragon-DoL: has joined #RubyOnRails
[15:41:59] uri: has joined #RubyOnRails
[15:42:17] gavit: tubbo: well I thought I ws eplacing params[polygon => 'some value'] to params[polygon => 'value']
[15:42:29] arthurix: has joined #RubyOnRails
[15:43:48] mrchris: tubbo, any thoughts on that paste?
[15:44:00] lacrymology: hi, I've got a doubt about what's the correct pattern to create handlers of nested resources
[15:44:28] lacrymology: I've got message_boards which have schedules at message_boards/:message_board_id/schedules
[15:44:35] tubbo: __chris: the issue is that there are a few ways to add associations to your model, so i could bypass this counter/logger by doing foo.bars.create
[15:45:08] lacrymology: I'd like to create at POST /message_boards/:message_board_id/schedules, but I don't think I should be passing the message_board_id AGAIN in the creation params
[15:45:15] lacrymology: so, what should I do?
[15:45:28] smathy: has joined #RubyOnRails
[15:45:44] gavit: tubbo: am I wrong?
[15:45:47] mrchris: tubbo, good point. Thats why I'm wondering what the correct procedure for this would be
[15:45:48] lacrymology: params[:schedule][:message_board_id] = params[:message_board_id]; Schedule.new(params)?
[15:46:15] beingjohnm: the answer to this (http://stackoverflow.com/questions/11127934/rendering-partial-in-js-erb-file) seems to imply I can render a partial and append it to my web page. I'm struggling wrapping my head around that as the rendering is done server side prior to the javascript loading. When trying to implement that I'm just seeing the render string printed out rather than rendering the partial.
[15:46:16] tubbo: lacrymology: why not mb = MessageBoard.find(params[:message_board_id]; mb.schedules.create(params[:schedule])
[15:46:28] lacrymology: tubbo: why not
[15:46:30] tubbo: gavit: yeah, whatever that is up there it isn't ruby
[15:46:43] tubbo: lacrymology: what?
[15:47:10] tubbo: lacrymology: the correct pattern is to first query for the parent object to exist, then you create or build the association off that instance of the parent
[15:47:28] pontiki: has joined #RubyOnRails
[15:47:34] lacrymology: tubbo: I meant "good idea"
[15:48:07] tubbo: __chris: well if you can find an ActiveSupport::Notification published when those models are added or something, that might be better.
[15:48:17] tubbo: subscribe to that notification and do your work from there
[15:48:24] Doddlin: has joined #RubyOnRails
[15:48:30] mrchris: thanks tubbo i will look into that
[15:49:41] desmondh_: has joined #RubyOnRails
[15:51:40] n1ck7: has joined #RubyOnRails
[15:51:43] smathy: beingjohnm, by the time the server has finished (processing the ERB) the result is JS that is sent back to the browser, and then executed by the browser.
[15:53:21] yogeshrt: has joined #RubyOnRails
[15:53:32] annlewis: has joined #RubyOnRails
[15:54:09] kitsuneyo: has joined #RubyOnRails
[15:55:07] gavit: tubbo: https://gist.github.com/gavit/eafb11d865dbcf1f711d
[15:55:41] darkxploit: has joined #RubyOnRails
[15:57:33] tuelz: has joined #RubyOnRails
[15:57:40] gavit: tubbo: I get the following error: When assigning attributes, you must pass a hash as an argument.
[15:57:46] emilkarl: has joined #RubyOnRails
[15:58:25] nettoweb: has joined #RubyOnRails
[15:58:49] red_horned_rihno: has joined #RubyOnRails
[15:58:50] safety_cut: has joined #RubyOnRails
[15:58:56] tubbo: gavit: you probably want your strong params method to return the hash that came from the form
[15:59:14] beingjohnm: smathy: right, so you cannot render a partial from javascript?
[15:59:15] tubbo: so that params[:polygon] assignment won't fly
[15:59:59] tubbo: gavit: i think you should pass the raw polygon params (whatever you get) into the LandSurvey, then create the polygon object on the fly from that data
[16:00:50] tubbo: gavit: so the param would come in like "699489.6863, 643183.5818\r\n699515.1460, 643181.5570\r\n699517.6410, 643204.7799"
[16:01:01] shibabu: has joined #RubyOnRails
[16:01:47] flashpoint9: has joined #RubyOnRails
[16:02:31] tubbo: gavit: this is probably what i'd do https://gist.github.com/tubbo/b650aa578f6ea594293d
[16:02:33] hive-mind: has joined #RubyOnRails
[16:03:30] desmondhume: has joined #RubyOnRails
[16:03:51] PlasmaStar: has joined #RubyOnRails
[16:04:18] momomomomo: has joined #RubyOnRails
[16:05:33] GeorgesLeYeti: has joined #RubyOnRails
[16:05:37] vnk: has joined #RubyOnRails
[16:06:10] GeorgesLeYeti: I have question about action cable. Is it possible to send (from navigator to server) binary data
[16:06:36] fedexo: has joined #RubyOnRails
[16:06:55] beingjohnm: smathy: what I am trying to accomplish is that I'm creating a new record via ajax and then want to render an edit form for that record without reloading the page.
[16:07:00] tubbo: GeorgesLeYeti: pretty sure you can send whatever data you want
[16:07:20] GeorgesLeYeti: I want to make a streaming audio app. Where user can record himself and send using getUserMedia
[16:07:27] acti0nman: has joined #RubyOnRails
[16:08:19] goodcodeguy: has joined #RubyOnRails
[16:08:26] monoprotic: has joined #RubyOnRails
[16:08:26] monoprotic: has joined #RubyOnRails
[16:08:37] teclator: has joined #RubyOnRails
[16:08:56] tubbo: GeorgesLeYeti: you shouldn't need actioncable for that, just a flash fallback or something. i think you can record audio with the web APIs now.
[16:09:12] maxz: has joined #RubyOnRails
[16:09:15] jerin: has joined #RubyOnRails
[16:09:27] uranther: has joined #RubyOnRails
[16:10:10] WizJin: has joined #RubyOnRails
[16:10:17] gavit: https://gist.github.com/tubbo/b650aa578f6ea594293d#file-land_survey-rb-L9 coordinates no longer exists :P
[16:10:28] GeorgesLeYeti: tubbo, it's a little bit more complicate than just recording.
[16:10:33] gavit: tubbo: but I think I understand what you are trying to say
[16:10:37] smathy: beingjohnm, not sure what "render a partial *from* javascript" means, obviously you can't call a ruby method directly in JS, nor can you call a server-side method directly in JS, you can make an AJAX request from JS though.
[16:10:39] podman: has joined #RubyOnRails
[16:10:50] tubbo: gavit: i tried to indicate with the above validator that it should be a property on your model.
[16:11:35] GeorgesLeYeti: I just wanna make a live speach to text processor.
[16:11:37] smathy: beingjohnm, right so achieving what you want is simple, just respond with the (escaped) rendered edit partial in an $('something').append() or .html() call (to add to, or replace) a known element on the page.
[16:11:38] tubbo: GeorgesLeYeti: i did this before in php a while back, we had to use flash and FMS (actually Red5 b/c we didn't want to pay). you can pretty much record mp3 audio in the browser and upload that file to a service nowadays. what else are you trying to accomplish with this app
[16:11:58] gavit: tubbo: so I no longer need a field for :polygon in my view?
[16:12:00] tubbo: GeorgesLeYeti: speech to text? hmm...actually i feel like there are APIs in JS that exist for that
[16:12:11] gavit: tubbo: and I need to add a field for coordinates
[16:12:18] nhhagen: has joined #RubyOnRails
[16:12:38] GeorgesLeYeti: tubbo, No i have my own speach to text service on another server.
[16:13:02] tubbo: gavit: having the polygon in your view...that's up to you, but i would definitely recommend adding a field for coordinates. this is more of a philosophical stance on how to define model classes, i always like to preserve the user input, because "the customer is always right" ;)
[16:14:15] beingjohnm: smathy: so, what I think you're saying is that I need to render the partial somewhere prior to the page loading and then edit it in js and the append the revised partial back to the page?
[16:14:16] kitsuneyo: has joined #RubyOnRails
[16:14:33] gavit: tubbo: I added a polygon in my view cause thats what those coordinates are. Doesn't matter either way I suppose
[16:14:43] Cervajz: has joined #RubyOnRails
[16:16:00] gavit: tubbo: by adding a def my_method does my_method turn into a property? How do I do a 'set', the get is 'easy'
[16:16:03] kitsuneyo: is it possible to turn a path like "city_path(country_slug: location.country_slug, state_slug: location.state_slug, city_slug: location.city_slug)" into something like "city_path(@location)"? ... i.e., @location passes the correct params automatically?
[16:16:22] chadhs: has joined #RubyOnRails
[16:18:15] qejk: has joined #RubyOnRails
[16:18:24] Scriptonaut: has joined #RubyOnRails
[16:18:28] matthewd: kitsuneyo: You could define your own city_path helper
[16:18:28] desmondhume: has joined #RubyOnRails
[16:18:47] kitsuneyo: yeah i guess that is a good idea
[16:19:22] kitsuneyo: i just wonder why, since the routes already know to take those params from the object, i can't just pass city_path(@location) and have it work automatically
[16:19:26] arup_r: has joined #RubyOnRails
[16:19:33] TPBallbag: has joined #RubyOnRails
[16:19:39] kitsuneyo: but a helper is a good idea, thanks matthewd
[16:19:45] matthewd: > the routes already know
[16:19:51] auralis: has left #RubyOnRails: ()
[16:20:15] safety_c_: has joined #RubyOnRails
[16:20:26] kitsuneyo: well yeah my route is defined like " get 'locations/:country_slug/:state_slug/:city_slug', to: 'locations#city', as: :city"
[16:21:46] kitsuneyo: so the city_path should already know what it needs to take
[16:21:47] gavit: tubbo: I'm deciding to keep my polygon in my database because I want to be able to see if different polygons are overlapping, similar etc, with coordinates I believe I'll have to recreate the polygons and compare which will probably take longer than with postgis
[16:21:50] Doddlin: I have a binding.pry right after doing a .where-search in my controller. my @product-object is populated but when I do @product.id it says it is an undefined method :S
[16:21:53] adac: has joined #RubyOnRails
[16:22:08] matthewd: kitsuneyo: I'm not sure it's reasonable to assume the path parameters are all attributes of a given object
[16:22:14] Doddlin: still it has all the info regarding the product inside @product :S
[16:22:15] smathy: beingjohnm, what I'm saying is that you'll have a js.erb with something like: $('#some_container').html( "<%= j render 'your_partial' %>" );
[16:22:31] kitsuneyo: very true matthewd
[16:22:31] smathy: beingjohnm, then you'll call the actual for that view from your ajax.
[16:22:41] perfectdreaming: has joined #RubyOnRails
[16:23:16] matthewd: Doddlin: `where` returns a relation... are you looking for `find_by`?
[16:23:27] Fire-Dragon-DoL: has joined #RubyOnRails
[16:23:31] Doddlin: matthewd, ahaa! Nice catch, probably :D
[16:23:55] beingjohnm: smathy: oooohhhhh....
[16:24:18] beingjohnm: that is what I was missing from everything I was reading
[16:24:56] dstarh: has joined #RubyOnRails
[16:26:01] xcesariox: has joined #RubyOnRails
[16:26:36] gavit: PG::NotNullViolation: ERROR: null value in column "polygon" violates not-null constraint DETAIL: Failing row contains (8, qa, null, 2015-11-17 16:24:38.014777, 2015-11-17 16:24:38.014777). : INSERT INTO "land_surveys" ("name", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" <- how come my error only specifies 3 columns, is this because of the postgis?
[16:28:15] simkessy: has joined #RubyOnRails
[16:28:51] yardenbar: has joined #RubyOnRails
[16:29:25] disgrntld: has joined #RubyOnRails
[16:30:43] lagweezl1: has joined #RubyOnRails
[16:30:47] desmondhume: has joined #RubyOnRails
[16:31:08] ProtoJazz: has joined #RubyOnRails
[16:31:27] adre: has joined #RubyOnRails
[16:31:43] gavit: This is frustrating, it seems to work in console, but not with the webbrowser: https://gist.github.com/gavit/b9c48eae984d181270a5
[16:33:54] RORapprentice: has joined #RubyOnRails
[16:34:26] RORapprentice: Hello! any idea of how to get similar behaviour for Dir.home as presented in https://richonrails.com/articles/basic-file-and-directory-operations-in-ruby for ruby 1.8.7?
[16:35:24] smathy: gavit, show the code that's NOT working.
[16:36:59] tuelz: RORapprentice: depends on where you need that to work, probably
[16:37:18] tuelz: I doubt every single distro ever follows unix users home dir convention
[16:37:19] smathy: RORapprentice, you just want the current user's home dir?
[16:38:10] tuelz: ENV['user']
[16:38:13] arthurix_: has joined #RubyOnRails
[16:38:18] tuelz: on unix will return the user
[16:39:02] tuelz: sorry ENV['USER']
[16:39:05] tuelz: case sensative
[16:39:16] matthewd: RORapprentice: File.expand_path('~')
[16:39:35] tuelz: matthewd: that's much simpler than my hack at it :p
[16:39:53] matthewd: RORapprentice: I'll just assume that "pleeeeease don't use 1.8" is implied ;)
[16:39:53] Cache_Money: has joined #RubyOnRails
[16:39:54] RORapprentice: thank you guys, trying matthewd advice
[16:40:28] RORapprentice: matthewd: it is implied, upgrading an existing production server, first need some urgent patches
[16:41:07] gavit: smathy: https://gist.github.com/gavit/eafb11d865dbcf1f711d#file-land_surveys_controller-rb-L27
[16:41:08] tuelz: of course, everyone always needs urgent work done until they don't realize they are vulnerable and leak all their data and wind up in court XD
[16:41:35] smathy: tuelz, FWIW, it'd be ENV["HOME"] not USER
[16:42:24] tuelz: smathy: another more elegant solution. I was going to just /User/#{user} which I forget if that's even unix or just OSX
[16:42:26] smathy: matthewd, that's a neat solution, I didn't realize expand_path expanded ~
[16:42:50] smathy: tuelz, oh right, it won't guarantee the right answer on any OS actually :)
[16:43:32] tuelz: is HOME pretty universal I wonder?
[16:43:36] tuelz: for unix, anyways
[16:43:48] RORapprentice: matthewd: worked, thank you so much for your quick responses matthewd tuelz smathy
[16:43:49] red_horned_rihno: has joined #RubyOnRails
[16:44:04] tuelz: RORapprentice: thanks for your specific well defined question
[16:44:06] smathy: tuelz, yes.
[16:44:14] rromanch_: has joined #RubyOnRails
[16:44:24] tuelz: cool, I knew it was in linux
[16:44:51] smathy: gavit, I'm surprised that's working for :name then.
[16:45:06] smathy: gavit, the final statement of a method/function is the return value of that function.
[16:45:36] smathy: gavit, ie. `land_survey_params`s return value is just the return value of LandSurvey.polygon
[16:45:39] gavit: smathy: just ealized that
[16:47:11] voker57: has joined #RubyOnRails
[16:47:57] momomomomo: has joined #RubyOnRails
[16:48:20] youngbaks: has joined #RubyOnRails
[16:49:48] Rodya_: has joined #RubyOnRails
[16:51:54] TPBallbag: has joined #RubyOnRails
[16:52:36] yoongkang: has joined #RubyOnRails
[16:53:02] ascarter: has joined #RubyOnRails
[16:54:16] annlewis: has joined #RubyOnRails
[16:57:40] defsdoor: has joined #RubyOnRails
[16:59:04] riotjones: has joined #RubyOnRails
[17:00:07] nhhagen: has joined #RubyOnRails
[17:01:51] wildlander: has joined #RubyOnRails
[17:02:15] arthurix: has joined #RubyOnRails
[17:03:12] shibabu: has joined #RubyOnRails
[17:03:43] rakm: has joined #RubyOnRails
[17:04:24] adre: has joined #RubyOnRails
[17:08:53] [Butch]: has joined #RubyOnRails
[17:09:36] crankharder: has joined #RubyOnRails
[17:09:57] momomomomo: has joined #RubyOnRails
[17:11:02] crankharder: trying to define a bunch of /foo /bar /whatever routes on root that all point to the same controller using a resource & collection{} -- that is, instead of defining a bunch of get/match rules. is there a way to do that?
[17:11:39] crankharder: not sure because the moment you use resource(s) then all the routes are no longer on root
[17:12:28] towski_: has joined #RubyOnRails
[17:13:10] bleda: has joined #RubyOnRails
[17:14:03] urbanmonk: has joined #RubyOnRails
[17:14:04] tuelz: doubt it. Doesn't seem to even make sense in a RESTful architecture you're doing operations on a resource....root is a location, not a resource
[17:14:15] Ergo: has joined #RubyOnRails
[17:14:42] chipotle: has joined #RubyOnRails
[17:15:12] nickenchuggets: has joined #RubyOnRails
[17:15:32] tuelz: like if you're /create - what are you doing? Creating? Creating, what?
[17:16:22] crankharder: they're mostly just static pages I want path helpers for
[17:16:36] crankharder: but, who knows, might have controller actions setting instance vars etc
[17:16:47] crankharder: and as of right now they're all GETs
[17:16:54] matthewd: crankharder: Why do you want to use resource?
[17:16:58] tuelz: ahh, yeah I *think* you'll just have to define the routes. The route helpers are intended to help build RESTful resources
[17:18:12] Zarathu: has joined #RubyOnRails
[17:18:46] Zarathu: has left #RubyOnRails: ()
[17:19:43] maxz: has joined #RubyOnRails
[17:21:23] shibabu: has joined #RubyOnRails
[17:21:25] qejk: has joined #RubyOnRails
[17:22:03] gavit: smathy: ActiveModel::ForbiddenAttributesError :'(
[17:23:36] gavit: now to figure out which one is not specified
[17:24:35] bmalum: has joined #RubyOnRails
[17:24:36] darrencauthon: has joined #RubyOnRails
[17:24:46] RubyOnRails275: has joined #RubyOnRails
[17:25:15] Axsuul: has joined #RubyOnRails
[17:25:41] nareshthakur: has joined #RubyOnRails
[17:26:32] youngbaks: has joined #RubyOnRails
[17:27:03] gavit: smathy: if I modify it after the .permit rails gives the error :'(
[17:28:22] dtordable: has joined #RubyOnRails
[17:28:49] brandtam: has joined #RubyOnRails
[17:29:05] waka: has joined #RubyOnRails
[17:29:10] sha1sum: has joined #RubyOnRails
[17:29:31] TPBallbag: has joined #RubyOnRails
[17:30:23] hnanon: has joined #RubyOnRails
[17:31:37] hnanon: What's a good way to import two sets of 13,000 records and compare them?
[17:31:55] tubbo: hnanon: compare them how?
[17:32:21] hnanon: Basically checking to see if records in one set exist in the other.
[17:32:52] hnanon: I'm mainly talking about from an infrastructure standpoint,
[17:33:06] smathy: gavit, well that's raised when forbidden attributes are used for mass assignment.
[17:33:07] hnanon: Like should I use ActiveJob?
[17:33:21] tubbo: hnanon: so how are you going to import the data?
[17:33:22] hnanon: Is sqlite good enough for that task?
[17:33:45] hnanon: tubbo: I have an import method currently that consumes a csv file.
[17:34:39] qejk: has joined #RubyOnRails
[17:35:33] tubbo: hnanon: didn't you already ask this a few days ago? pretty sure someone told you to do that importing work in a background job, if you didn't see it.
[17:35:47] tubbo: maybe it wasn't you, might have been someone else :)
[17:35:51] hnanon: Wasn't me.
[17:36:15] hnanon: What about the actual comparison?
[17:36:23] rodfersou: has joined #RubyOnRails
[17:37:01] suchness: hnanon: "Comparison" is a broad term with a broad answer.
[17:37:17] matthewd: hnanon: At that scale, I imagine pretty much anything would work
[17:37:20] memnon34: has joined #RubyOnRails
[17:37:51] suchness: hnanon: Also, what you decide to do with the data after the comparison...
[17:37:51] rakm: has joined #RubyOnRails
[17:38:03] hahuang65: has joined #RubyOnRails
[17:38:03] hnanon: matthewd: What do you mean? Is that considered a small number of records?
[17:38:08] suchness: hnanon: But as matthewd 13,000 record is trivial.
[17:38:37] smathy: hnanon, you can use something like https://github.com/halostatue/diff-lcs for comparing/diffing/etc.
[17:39:35] smathy: ACTION especially likes the `traverse_sequences` approach using callbacks to handle "gaps" in each sequence
[17:40:04] hnanon: smathy: Look like it might be over my head, at the moment.
[17:40:47] smathy: hnanon, ok, then just do the slow way and put a loop within a loop.
[17:40:58] smathy: (and by slow I mean cripplingly slow)
[17:41:39] hnanon: smathy: I'm just trying to get everything to work first. From my initial observations, it is very slow and it seems to time-out.
[17:42:17] Rodya_: has joined #RubyOnRails
[17:42:39] kitsuneyo: has joined #RubyOnRails
[17:43:13] tubbo: hnanon: i think the comparison would be fastest to do within a SQL database, like postgres. if it's CSV you can just COPY FROM FORMAT=CSV or whatever that command is directly into a table (or temporary table), then you can run queries on those tables to see which rows are the sfame
[17:43:41] tubbo: 13,000 records is really not that much. it's not nothing, but it also won't cost that much to just do it in Ruby either
[17:45:15] troyready: has joined #RubyOnRails
[17:45:24] qejk: has joined #RubyOnRails
[17:45:36] TPBallbag: has joined #RubyOnRails
[17:47:00] hnanon: tubbo: I see. Since I need to eventually change some values within some of the records I figure ActiveRecord would come in handy...I don't know SQL as I should.
[17:47:06] gavit: smathy: its not a forbidden argument is it? https://gist.github.com/gavit/eafb11d865dbcf1f711d#file-land_surveys_controller-rb-L26 gives a Null, L25 gives a forbidden attribute
[17:47:09] Fire-Dragon-DoL: has joined #RubyOnRails
[17:47:19] juddey: has joined #RubyOnRails
[17:47:34] ciree: anyone at ruby conf?
[17:48:34] tubbo: hnanon: well since it's only 13,000 records here, like matthewd was saying, you could just do it all in Ruby...sorta like `initial_records.select { |r1| records.any? { |r2| r1 == r2 } }`
[17:49:19] qejk: has joined #RubyOnRails
[17:49:50] matthewd: gavit: I'm not sure you should be doing that mangling inside the land_survey_params method
[17:50:35] matthewd: I guess I'm ultimately uncomfortable with any attempt to stuff a non-"primitive" type back into params, instead of building a fresh hash
[17:51:03] gavit: matthewd: How do you propose I store the polygon?
[17:51:30] gavit: matthewd: with postgis polygon is actually a primitive type of my db
[17:51:43] gavit: or geometry rather
[17:51:46] tubbo: gavit: y u no activerecord_postgis_adapter :)
[17:51:59] urbanmonk: has joined #RubyOnRails
[17:52:00] gavit: tubbo: I have postgisadapter
[17:52:36] gavit: tubbo: just cant figure out how to store the polygon through a view
[17:52:45] gavit: in console everything works fine :P
[17:53:01] mrtomme: has joined #RubyOnRails
[17:53:52] tubbo: gavit: not sure why you have all that custom code to build the polygon then...
[17:54:03] tubbo: i thought it would just output the Polygon object that you want
[17:54:17] gavit: tubbo: I get a polygon object
[17:54:21] tubbo: granted i've only used it to store GEOGRAPHY points, haven't used the polygon stuff much
[17:54:25] gavit: tubbo: it's the view that I need
[17:54:34] tubbo: i feel like it's just a matter of formatting the params properly so that the class takes them in and creates the object for you
[17:54:42] gavit: tubbo: got an example on how you did it with your polygon points?
[17:54:56] gavit: s/polygon/
[17:55:05] annlewis: has joined #RubyOnRails
[17:56:39] gavit: tubbo: https://gist.github.com/gavit/eafb11d865dbcf1f711d#file-console-L9
[17:56:52] rakm_: has joined #RubyOnRails
[17:57:04] Axy: has joined #RubyOnRails
[17:57:05] Axy: has joined #RubyOnRails
[17:57:20] doodleha_: has joined #RubyOnRails
[17:57:34] nonmadden: has joined #RubyOnRails
[17:58:36] sha1sum: Anybody have experience with Dragonfly? Trying to figure out how to (on save) convert to a jpeg that's under a certain byte size. E.g. if it's a jpg, just leave it as a jpg but make sure it's less than 1M, then for png and others, convert to jpg first then make sure it's less than 1M
[17:59:33] Killerkeksdose_: has joined #RubyOnRails
[17:59:52] riotjones: has joined #RubyOnRails
[18:00:20] orolo: has joined #RubyOnRails
[18:00:49] patrick: has joined #RubyOnRails
[18:00:55] nettoweb: has joined #RubyOnRails
[18:00:55] gavit: sha1sum: and your problem with this is?you cant figure out if its 1mb? you cant convert it to jpg? you cant convert it to png?
[18:01:04] matthewd: gavit: It's not a primitive type that arbitrary code expects to find in params
[18:01:15] rhizome: has joined #RubyOnRails
[18:01:38] teclator: has joined #RubyOnRails
[18:01:43] matthewd: I'm not saying you shouldn't pass it to the model.. I'm saying you shouldn't put it into the global `params` hash just in order to do so
[18:02:09] sha1sum: gavit: I've figured out how to convert it to a jpeg, but I can't figure out how to resize to a max filesize instead of resizing based on pixel size
[18:02:24] portiad: has joined #RubyOnRails
[18:02:29] queequeg1: has joined #RubyOnRails
[18:03:01] kitsuneyo: has joined #RubyOnRails
[18:04:10] smathy: gavit, the require and permit methods do not change the receiver.
[18:04:59] gavit: sha1sum: converting a jpeg wont tell you how big the file will become
[18:05:13] djellemah: has joined #RubyOnRails
[18:05:14] braincrash: has joined #RubyOnRails
[18:05:31] gavit: smathy: maybe I should see how the receiver receives its params
[18:06:10] smathy: gavit, no idea what you're talking about there. Did you not understand my comment?
[18:06:47] matthewd: smathy: Oh, good point!
[18:06:47] sha1sum: gavit: yeah basically I want to ensure that it's a jpeg first, which I can do, but *then*, if it's over 1MB still, I want to have it resized to a max file size of 1MB. Hopefully I'm making sense :)
[18:06:51] beneggett: has joined #RubyOnRails
[18:07:04] matthewd: ACTION totally knew that, of course :|
[18:07:44] smathy: Of course ;)
[18:08:26] JoshL_: has left #RubyOnRails: ()
[18:08:47] JoshL: has joined #RubyOnRails
[18:10:27] lemur: has joined #RubyOnRails
[18:10:52] colleenmcguckin: has joined #RubyOnRails
[18:13:01] hnanon: Anyone know if there's an IRC room SQL and if it's active?
[18:13:38] tubbo: hnanon: for SQL in general, or a particular database?
[18:13:48] tubbo: hnanon: the folks in #postgresql are quite helpful
[18:13:57] hnanon: Good question.
[18:14:10] tubbo: gavit: nothing i can show, it was for a company.
[18:14:19] hnanon: #postgresql is what I was looking for. Thanks.
[18:16:00] Cache_Money: has joined #RubyOnRails
[18:17:17] maxz: has joined #RubyOnRails
[18:17:21] B1n4r10: has joined #RubyOnRails
[18:17:39] rgtk: has joined #RubyOnRails
[18:18:41] B1n4r10: has joined #RubyOnRails
[18:18:45] gavit: tubbo: solved it as follows: https://gist.github.com/gavit/eafb11d865dbcf1f711d#file-land_surveys_controller-rb-L7
[18:18:52] gavit: tubbo: does that look better?
[18:19:24] gavit: sorry: https://gist.github.com/gavit/eafb11d865dbcf1f711d#file-land_surveys_controller-rb-L7
[18:20:41] tubbo: gavit: is make_polygon actually a method on LandSurvey?
[18:20:55] smathy: OMG, you help people and they ignore you.
[18:21:31] gavit: tubbo: I made it yes
[18:22:25] gavit: smathy: its because of your comment that I solved it like this
[18:22:27] tubbo: gavit: ok
[18:22:51] tubbo: this still all seems like stuff activerecord-postgis-adapter should handle for you, but (shrug)
[18:23:11] gavit: tubbo: https://gist.github.com/gavit/eafb11d865dbcf1f711d#file-land_survey-rb-L2
[18:23:12] tubbo: i'm not saying don't do it, but it seems smelly. so make sure you keep your eye on it :)
[18:23:18] artto: has joined #RubyOnRails
[18:23:48] tubbo: gavit: yeah, that's LandSurvey.polygon, not LandSurvey.make_polygon, which is why i asked.
[18:23:51] gavit: tubbo: you mean the self.polygon method?
[18:24:05] gavit: tubbo: sorry, didnt rename it but thats basically the method
[18:24:25] tubbo: gavit: yup, understood. these things happen :)
[18:24:55] smathy: gavit, doesn't change that you ignored me.
[18:24:55] maxz: has joined #RubyOnRails
[18:25:13] gavit: tubbo: also, I dont think activerecord-postgis-adapter does anything on the frontend (view/controller)
[18:25:34] tubbo: gavit: to give you an idea on my own experience with AR postgis adapter, i've built little toy apps that save off coordinates and such to locations, but haven't dived into analyzing them. at some point, i'm gonna need to define a polygon to represent a radius over locations, which is actually what one of my past jobs had already implemented...again i don't work there so i can't show it to you.
[18:25:56] tubbo: gavit: no, but i believe it gives you a way to format your params so that they just automatically get saved as a point
[18:26:25] tubbo: gavit: for example, pretty sure passing `coordinates: [-60, 72.2]` will create a point, if coordinates is a t.point :coordinates, geography: true
[18:26:26] gavit: smathy: I didnt ignore you :( you said the require and permit methods dont change the recever, so I started thinking who the receiver is (create method) and solved it there
[18:26:34] tubbo: you probably don't need geography: true but that's what i did
[18:26:52] smathy: gavit, I don't think "ignore" means what you think it means.
[18:27:37] gavit: ACTION hugs smathy 
[18:27:58] gavit: tubbo: I'll check into that
[18:28:00] gr3yR0n1n: has joined #RubyOnRails
[18:28:16] umgrosscol: has joined #RubyOnRails
[18:29:26] tubbo: dunno if an ignore actually happened, he just took your comment differently than you meant it and finished the task in the same way.
[18:30:19] gr3yR0n1n: hello all. do any of you guys use automated software for static code analysis? if so, what are some suggestions? i'm looking at brakeman currently.
[18:30:34] Papierkorb: gr3yR0n1n: rubocop
[18:31:05] gr3yR0n1n: thank you, i'll give it a look. anything specific you prefer about it?
[18:31:42] Papierkorb: It .. just works. Is easy configurable. And can, optionally, autofix some issues. or autobreak your code sometimes.
[18:31:46] lemur: has joined #RubyOnRails
[18:32:01] gavit: tubbo: I see you're right about the Point being made from a formatted string: https://github.com/rgeo/activerecord-postgis-adapter/blob/master/test/basic_test.rb#L16
[18:32:06] gr3yR0n1n: very good. thx Paierkorb
[18:32:22] gr3yR0n1n: Papierkorb*
[18:34:02] youngbaks: has joined #RubyOnRails
[18:34:16] tubbo: gavit: yeah...like i said...wasn't *positive* that ar-postgis-adapter did it, but figured it's worth a check
[18:34:27] tubbo: though i am confident about the POINT thing
[18:39:28] B1n4r10: has joined #RubyOnRails
[18:41:00] smathy: Aww, hugs :)
[18:41:19] LambdaSource: has joined #RubyOnRails
[18:42:10] tuelz: has joined #RubyOnRails
[18:42:44] justinweiss: has joined #RubyOnRails
[18:43:00] Rodya_: has joined #RubyOnRails
[18:43:21] a1fa: uhm. devise sign_out @user signs off current_user ;)
[18:43:49] jhn: has joined #RubyOnRails
[18:43:54] goodcodeguy: has joined #RubyOnRails
[18:45:06] youngbaks: has joined #RubyOnRails
[18:46:43] jahbrewski: has joined #RubyOnRails
[18:47:01] smathy: a1fa, looking at the code it sets @current_user to nil, definitely a bug where that's not the same as the user you pass in.
[18:49:12] tubbo: a1fa: it signs out whoever is signed in.
[18:49:13] tubbo: pretty sure
[18:49:51] RegulationD: has joined #RubyOnRails
[18:51:44] kies: has joined #RubyOnRails
[18:52:58] boombadaroomba: anyone have any experience with nested attributes using react-rails?
[18:53:18] momomomomo: has joined #RubyOnRails
[18:53:30] xardion: has joined #RubyOnRails
[18:53:32] podman: has joined #RubyOnRails
[18:54:05] chadhs: has joined #RubyOnRails
[18:55:05] gavit: tubbo: there is even a LINESTRING, but I can't find the documentation on where this is described
[18:55:21] Tref: has joined #RubyOnRails
[18:55:22] ibouvousaime: has joined #RubyOnRails
[18:55:39] smathy: tubbo, actually it signs out whomever you pass in (or all if no arg), AND unsets @current_user (regardless of who it signed out): https://goo.gl/L4fq4x
[18:55:43] annlewis: has joined #RubyOnRails
[18:56:26] asianMike: has joined #RubyOnRails
[18:57:02] asianMike: has joined #RubyOnRails
[18:57:11] a1fa: tubbo: according to the doc, its supposed to sign out specific user
[18:57:33] a1fa: http://www.rubydoc.info/github/plataformatec/devise/master/Devise/Controllers/SignInOut#sign_out-instance_method
[18:57:43] portiad: has joined #RubyOnRails
[18:58:22] a1fa: so i am thinking about setting locked_at to current-X-1s seconds
[18:59:34] TPBallbag: has joined #RubyOnRails
[19:00:02] a1fa: https://github.com/plataformatec/devise/blob/master/lib/devise/controllers/sign_in_out.rb#L56
[19:00:25] mikajo: has joined #RubyOnRails
[19:00:37] wilsonc91: has joined #RubyOnRails
[19:00:51] riotjones: has joined #RubyOnRails
[19:01:21] dagen: has joined #RubyOnRails
[19:02:39] mwlang: has joined #RubyOnRails
[19:02:52] gavit: tubbo: it's a RGeo thing. not a adapter thing :)
[19:03:41] juddey: has joined #RubyOnRails
[19:04:52] mwlang: does anyone have a hack or know of a gem I can add to my Rails 4.1 project to capture exactly what comes in on the wire to a log file much like the VCR gem does in test specs? We have an API server that someone???s connecting to and to all appearances appears to be sending the right thing, but Rails isn???t parsing the params correctly. So I want to just simply write to file exactly what comes in and then set up a test spec to play tha
[19:05:34] sniperhaxor: What would you guys suggest I use to make the blog that I'm creating really stylish and impressive to recruiters and HR departements (as being a ruby/js dev)?
[19:05:41] youngbaks: has joined #RubyOnRails
[19:05:43] rails111111: has joined #RubyOnRails
[19:06:01] jetpackjoe: has joined #RubyOnRails
[19:07:54] momomomomo: sniperhaxor: eh, for a blog I wouldn't use Rails, but I've used Jekyll
[19:07:56] a1fa: smathy: any other suggestions on how to log off users?
[19:09:41] moeabdol: has joined #RubyOnRails
[19:09:57] a1fa: session.delete
[19:10:06] matthewd: Doesn't clearing @current_user just mean it'll get re-evaluated with warden (https://github.com/plataformatec/devise/blob/e33d285e4ae2130fe9acd00ef60782ae8bee6ad9/lib/devise/controllers/helpers.rb#L124) *in case* you were signing yourself out?
[19:10:11] rails4747: has joined #RubyOnRails
[19:10:51] Railsy: has joined #RubyOnRails
[19:11:05] sniperhaxor: momomomomo: I'm struggling to be a working rails developer without a project to work on. Creating my own blog just felt like something I had to do.
[19:11:08] matthewd: Oh, no, because before it does that it burns the warden session with fire. Maybe I need to read more than one line at once.
[19:11:26] lemur: has joined #RubyOnRails
[19:11:59] momomomomo: sniperhaxor: Sure, but use a tool that's a good fit for the job to be done - make the blog with something you're comfortable with, then populate the content with things that demonstrate your knowledge
[19:12:36] momomomomo: Jekyll: https://github.com/jekyll/jekyll is just one such tool, you could use anything
[19:12:40] sarink: has joined #RubyOnRails
[19:13:26] artto: has joined #RubyOnRails
[19:13:42] Cervajz_: has joined #RubyOnRails
[19:13:46] matthewd: sniperhaxor: Content? ;)
[19:14:29] sniperhaxor: yeah, i don't have any content for rails projects
[19:14:40] sniperhaxor: I need ideas to work on
[19:15:31] stannard: has joined #RubyOnRails
[19:15:44] Railsy: So I have a blog app with a comment form under it and you can save a comment and the the page refreshes to show the comments below the blog. What I'm trying to figure out is how to edit that comment in line without leaving to page to go to the edit apge
[19:16:07] jetpackjoe: has joined #RubyOnRails
[19:17:40] jetpackjoe: has joined #RubyOnRails
[19:17:42] momomomomo: railsy: for this you'll be looking at javascript
[19:18:03] Railsy: momomomomo: ok so some ajax?
[19:18:24] smathy: a1fa, I can't help you, I don't use devise, sorry.
[19:18:42] Railsy: smathy: You don't use devise?!?! haha
[19:18:47] momomomomo: railsy: http://railscasts.com/episodes/136-jquery-ajax-revised?view=asciicast
[19:19:15] colleenmcguckin: has joined #RubyOnRails
[19:19:27] smathy: mwlang, you might find some rack middleware that does that.
[19:20:11] Railsy: momomomomo: Awesome thank you, I knew I could do it with ajax was just hoping there was an easy way using rails render and passing parameters. Thank you Ill do it the javascript way
[19:20:19] Pazician: has joined #RubyOnRails
[19:21:16] smathy: railsy, Ikr, hilarious!
[19:21:50] benlieb: has joined #RubyOnRails
[19:21:56] stannard_: has joined #RubyOnRails
[19:23:15] cdnsteve: has joined #RubyOnRails
[19:23:28] ewnd9: has joined #RubyOnRails
[19:23:55] Phoop: has joined #RubyOnRails
[19:24:36] Cache_Money: I have a domain (e.g. example.com) and I want to have multiple RoR apps living on different subdomains (e.g. sports.example.com, education.example.com, etc.). I'm struggling to figure out how to configure user authentication since the same person could be a user on sports.example.com and education.example.com.
[19:25:06] Cache_Money: Any ideas on how I should structure my app and/or user auth?
[19:25:11] SteenJobs: has joined #RubyOnRails
[19:25:31] ibouvousaime: has joined #RubyOnRails
[19:26:39] ur5us: has joined #RubyOnRails
[19:26:58] rafaelfranca: has joined #RubyOnRails
[19:27:40] cdnsteve: Cache_Money: how are they authenticating now?
[19:27:56] FailBit: you could have a central OAuth facility
[19:28:14] FailBit: ie on the main domain, and then have each subdomain ask the main for credentials from OAuth
[19:28:28] raunicolae: has joined #RubyOnRails
[19:28:58] cdnsteve: @Cache_Money see this: http://stackoverflow.com/questions/18492576/share-cookie-between-subdomain-and-domain
[19:30:40] workmaster2n: has joined #RubyOnRails
[19:31:35] mag42c_: has joined #RubyOnRails
[19:32:13] kzsh: has joined #RubyOnRails
[19:32:19] momomomomo: has joined #RubyOnRails
[19:35:35] Hates_: has joined #RubyOnRails
[19:35:44] i: has joined #RubyOnRails
[19:37:55] RegulationD: has joined #RubyOnRails
[19:39:29] colleenmcguckin: has joined #RubyOnRails
[19:41:00] yoongkang: has joined #RubyOnRails
[19:41:08] dopie: has joined #RubyOnRails
[19:41:34] rhizome: subdomains sure are the flavor of the month, is this a curriculum thing?
[19:42:28] mag42c: has joined #RubyOnRails
[19:43:42] Rodya_: has joined #RubyOnRails
[19:44:25] memnon34: has joined #RubyOnRails
[19:45:06] tubbo: sniperhaxor: the point of doing your blog in rails is a proof of concept to show people you know what you're doing. so why are you asking for a gem that just does it all for you? ;)
[19:45:10] workmaster2n: has joined #RubyOnRails
[19:45:26] Tref: has joined #RubyOnRails
[19:45:29] sniperhaxor: I'm asking for styling on my already made blog
[19:45:35] jrhorn: has joined #RubyOnRails
[19:45:38] sniperhaxor: momomomomo was suggesting I use some gem
[19:45:40] tubbo: sniperhaxor: ohhh i see
[19:45:50] tubbo: sniperhaxor: you ever work with bootstrap or zurb foundation?
[19:45:59] sniperhaxor: Yeah, I'm checking out bootstrap right now
[19:46:15] sniperhaxor: I'm having a hard time realizing how to install it in my project. It's a lot more than what I thought it was.
[19:46:18] Pazician: has joined #RubyOnRails
[19:46:22] sniperhaxor: I thought i was only preset CSS/JS
[19:46:42] raunicolae: has left #RubyOnRails: ("Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is")
[19:47:18] sniperhaxor: but it seems like it comes with a bunch of stuff to compile to get it into a css/js minified file
[19:47:20] IFrank00: has joined #RubyOnRails
[19:47:21] tubbo: sniperhaxor: it pretty much is, but "presets" are a bad way to think about it. kinda like how rails isn't "presets" for building a web app, it's a framework, bootstrap is quite similar.
[19:47:38] lemur: has joined #RubyOnRails
[19:48:11] sniperhaxor: Yeah, I need to better familiarize myself with it
[19:48:46] rhizome: you're going to have to change your code, if that's what you're trying to avoid or something
[19:49:58] IFrank00: Hi a quiquick question. Im trying to render a different _nav.thml.erb for one controller what is the correct way of calling that partial on the controller to override the partial from the application nav
[19:50:26] tubbo: IFrank00: render 'nav'
[19:50:50] darrencauthon: has joined #RubyOnRails
[19:50:51] tubbo: if you have app/views/application/_nav.html.haml, then app/views/some_controller/_nav.html.haml will "override" that
[19:51:02] IFrank00: tubbo I try render 'nav' add the top of my controller
[19:51:07] IFrank00: I get this error
[19:51:15] IFrank00: let me post the code
[19:53:18] apotry: has joined #RubyOnRails
[19:54:01] mikecmpbll: has joined #RubyOnRails
[19:54:05] DoubleMalt: has joined #RubyOnRails
[19:54:18] annlewis: has joined #RubyOnRails
[19:54:34] momomomomo: has joined #RubyOnRails
[19:55:15] perfectdreaming: has left #RubyOnRails: ()
[19:55:42] IFrank00: tubbo, https://gist.github.com/Frank004/6bc589d95f64f628f7a5
[19:55:52] perfectdreaming: has joined #RubyOnRails
[19:57:08] tubbo: IFrank00: you did not specify the code that was causing the problem
[19:57:18] tubbo: oh here it is
[19:57:21] tubbo: wtf is this https://gist.github.com/Frank004/6bc589d95f64f628f7a5#file-task_trans_report-rb-L4
[19:57:36] tubbo: IFrank00: you've been here way too long to be making mistakes like that
[19:57:43] smathy: sniperhaxor, there are rails gems to do all the "getting the files into your asset pipeline" stuff for you.
[19:57:59] arBmind1: has joined #RubyOnRails
[19:58:03] sniperhaxor: I'm reading up on it
[19:58:41] smathy: ACTION was afraid that's what "add the top of my controller" meant :)
[19:59:16] IFrank00: tubbo, https://gist.github.com/Frank004/6bc589d95f64f628f7a5 updated
[19:59:49] smathy: IFrank00, what does that error mean to you?: undefined method `render' for TaskTransReportController:Class ?
[20:00:36] IFrank00: tubbo and smithy thank you for your time
[20:02:55] riotjones: has joined #RubyOnRails
[20:03:59] perfectdreaming: has left #RubyOnRails: ()
[20:04:16] perfectdreaming: has joined #RubyOnRails
[20:04:17] flashpoint9: has joined #RubyOnRails
[20:04:28] cgfbee: has joined #RubyOnRails
[20:04:54] TheNet: has joined #RubyOnRails
[20:07:54] Cache_Money: cdnsteve: sorry, I got pulled into a meeting. Right now I just have 1 RoR app (sports focused) but I want to move it to sports.example.com and add another app (education.example.com).
[20:08:27] Tref: has joined #RubyOnRails
[20:08:29] darrencauthon: has joined #RubyOnRails
[20:09:59] njero: has joined #RubyOnRails
[20:10:36] simplyianm: has joined #RubyOnRails
[20:10:52] perfectdreaming: I'm new to #RubyOnRails. What projects is everyone working on?
[20:11:15] momomomomo_: has joined #RubyOnRails
[20:11:42] t4nkD: has joined #RubyOnRails
[20:11:43] wilsonc91: has joined #RubyOnRails
[20:12:20] rhizome: perfectdreaming: ask a better question
[20:12:52] rhizome: there are over 600 ppl here
[20:13:47] NBarnes: has joined #RubyOnRails
[20:14:05] ascarter: has joined #RubyOnRails
[20:14:30] NBarnes: Why would <record>.save hang the rail process, when run from console? I have code (https://gist.github.com/nbarnes/8ea3aefbd3a6cbd7846f)
[20:14:43] NBarnes: And if I just run the code, the owner_id doesn't get persisted for some reason.
[20:15:05] NBarnes: But if I try @business.save from the console, after breaking out with binding.pry, the rails server process hangs.
[20:15:13] NBarnes: I have to kill it from the terminal using the pid.
[20:15:27] perfectdreaming: rhizome: not used to irc, how do people chat and get to know each other?
[20:15:46] juddey: has joined #RubyOnRails
[20:16:38] rhizome: i've been here for several years and "know" approximately nobody
[20:16:59] FailBit: nbarnes: it starts a transaction in the database
[20:17:09] FailBit: so if the database won't commit the transaction, then rails might hang
[20:17:14] Megamos: has joined #RubyOnRails
[20:17:23] NBarnes: Yes, I can see that it starts trying to save the record and never completes.
[20:17:38] FailBit: you could also have callback hell
[20:17:41] manfrin: has joined #RubyOnRails
[20:17:47] NBarnes: Why would it never complete the transaction with the database when run from the binding.pry console but not when executed in the normal sequence?
[20:17:48] rhizome: is owner_id referring to an association?
[20:18:00] rhizome: also you should be writing tests
[20:18:03] FailBit: (callbacks that call each other, or save the record, or enter an infinite loop)
[20:18:29] FailBit: also, question
[20:18:35] FailBit: why would you ever allow someone to assign owner_id
[20:18:42] IFrank00: tubbo, found the problem I was using the layout/nav on my render. what I did was move the share content to a application folder and add my regular navbar and then the controller nag will render if is present on the controller view folder
[20:18:56] tubbo: perfectdreaming: this channel has more to do with asking questions only a human can answer about the framework. that said, you are totally free to begin discussions about other stuff like what projects people are working on or possibly code design that you have to share.
[20:19:27] tubbo: IFrank00: ok. you moved the call to render into an actual action though right>
[20:19:34] tubbo: i mean of course you did, otherwise it would have given you an error
[20:19:35] NBarnes: I shouldn't, but I'm in a stack of problems and trying to unspool the bugs to reach that part.
[20:19:42] perfectdreaming: tubbo: thankyou, good to know
[20:20:12] tubbo: perfectdreaming: what are YOU working on? :)
[20:20:29] IFrank00: tubbo, I over look what I was trying to do
[20:21:13] perfectdreaming: tubbo: a:-) video course site, full html5 video is done
[20:21:14] NBarnes: FailBit; per the Form Helpers documentation; 'If you are using select (or similar helpers such as collection_select, select_tag) to set a belongs_to association you must pass the name of the foreign key (in the example above city_id), not the name of association itself. '
[20:21:28] pawnbox: has joined #RubyOnRails
[20:21:55] perfectdreaming: tubbo: gotta get the back and forth of the different videos working within a course, and then aws
[20:22:02] FailBit: nbarnes: well, yes
[20:22:18] FailBit: but the general UX rule is that you don't expose object relations that way
[20:22:45] FailBit: I mean, belongs_to necessarily maps the has-a relation of its parent object, and the usual way to work with that is nested attributes
[20:22:47] BradenBraden: has joined #RubyOnRails
[20:22:58] perfectdreaming: tubbo: what are you working on?
[20:22:59] vnk: has joined #RubyOnRails
[20:23:02] FailBit: that said, it's not _wrong_ to do it otherwise
[20:23:07] FailBit: so it's not your biggest problem
[20:23:41] BradenBraden: is it possible to do something like a before_filter in a helper? i want to prevent certain helper functions getting called if RAILS_ENV = dev.
[20:24:20] FailBit: BradenBraden: um, what exactly?
[20:24:22] tubbo: perfectdreaming: cool. right now i'm trying to launch a site for my job so i can't really do much of my own projects, but i've been hacking on this new version of this website: http://beta.brother.ly
[20:24:35] jrhorn: has joined #RubyOnRails
[20:24:38] tubbo: it's for a monthly-ish party that streams live on youtube, similar to boilerroom.tv
[20:24:51] FailBit: tubbo: X-Runtime: "0.251865"
[20:25:01] tubbo: BradenBraden: you can always `return unless Rails.env.development?` at the top of the helpers you wish to not run
[20:25:12] vnk: hey guys, how do you see job market for ruby on rails developers goes in next 5 years or so? what are your predictions. I just started learning ror.
[20:25:21] tubbo: or simply do `= my_helper_method unless Rails.env.development?` in your view, which i find the most explicit.
[20:25:24] IFrank00: tubbo, https://gist.github.com/Frank004/6bc589d95f64f628f7a5 check it out see this good practices?
[20:25:29] tubbo: FailBit: huh?
[20:25:38] FailBit: the page generated in 250ms
[20:25:41] cryptocronus: has joined #RubyOnRails
[20:25:59] tubbo: FailBit: there's like no caching, and it's on heroku free. i'm surprised it wasn't asleep.
[20:26:06] tubbo: haven't been able to get into caching yet
[20:26:09] rhizome: vnk: predicting is impossible, history tells us you should go with what you like.
[20:26:15] tubbo: still working on admin stuff
[20:26:24] rhizome: ACTIVEADMIN
[20:26:27] BradenBraden: tubbo, so cant just do it for the entire helper module. i have a lot of mixpanel tracking calls in a mixpanel helper and i dont want to trigger them when in dev at all, but also think putting that into every method is a bit over the top.
[20:26:47] IFrank00: tubbo, now I can add whatever nav to each controller or fallback to the default
[20:26:48] tubbo: nahhh rhizome this is the first beta test of my new admin 'framework' ;)
[20:26:51] perfectdreaming: tubbo: Nice. I would recommend adding a placeholder to the search above saying "Search artists..."
[20:26:57] vnk: rhizome: true. one more quesiton, anyone know where I could search for some ror remote internships?
[20:27:09] Mia: has joined #RubyOnRails
[20:27:29] rhizome: afaik, "remote internship" is a rare thing
[20:27:39] youngbaks: has joined #RubyOnRails
[20:27:39] tubbo: perfectdreaming: that is...actually an issue with pg_search :) the party names and performances are *supposed* to be indexed in multisearch but i can't seem to get the tokenization right so they display.
[20:28:07] tubbo: BradenBraden: nope, there are no callbacks in helper modules, they are just ruby modules.
[20:28:17] IFrank00: tubbo, very nice project I like it simple and clear
[20:28:27] BradenBraden: tubbo, i see. alrighty then. thanks
[20:28:35] perfectdreaming: tubbo: that sucks...
[20:28:52] SteenJobs: has joined #RubyOnRails
[20:29:59] MartinElvar: has joined #RubyOnRails
[20:30:33] tubbo: i guess i just gotta figure out what's up with pg_search
[20:30:48] tubbo: IFrank00: thanks! the source will be up eventually, it's not quite ready for the world yet.
[20:30:49] rhizome: oooo weee, what's up with that, what's up with that
[20:31:03] perfectdreaming: vnk: I can understand your anxiety over the job market, but you should also consider your speed to write an application
[20:31:29] FailBit: rails, despite being one of the slowest web frameworks, has said a lot about ease of development
[20:31:29] tubbo: rhizome: `meseeks` would be a great name for a search framework...
[20:31:43] lxsameer: has joined #RubyOnRails
[20:31:44] lxsameer: has joined #RubyOnRails
[20:31:47] tubbo: FailBit: if you care about speed, y u ruby den??
[20:31:55] rhizome: is that a jar jar joke
[20:32:05] tubbo: rhizome: no, mister meseeks is a guy from rick & morty
[20:32:12] IFrank00: tubbo, im working on a side project for tabulation (Manage Scoring Systems) for events
[20:32:12] FailBit: because that's the codebase that I came to, and plus elasticsearch is my problem now, not rails
[20:32:16] tubbo: he's that blue dude who kept copying himself because jerry couldn't play golf
[20:32:19] rhizome: ah, i've been meaning to get to that show
[20:32:46] rhizome: it's hard out here for a cordcutter
[20:33:06] tubbo: rhizome: i thought that's what you were referencing... https://www.youtube.com/watch?v=l3RS2rFll_8
[20:33:07] FailBit: tubbo: rails doesn't have to be that slow, my app is down to 50ms for the average page render and 99th percentile is 300ms
[20:33:16] tubbo: rhizome: lies, i haven't had cable in like 3 years
[20:33:32] uri: has joined #RubyOnRails
[20:33:47] tubbo: FailBit: true, but how long did it take you to get to that point? what if i told you there are other frameworks with most of the same features as rails, but run in like 100x the speed
[20:34:04] FailBit: tubbo: about 2 weeks once I really cared
[20:34:24] NBarnes: If strong params requires 'owner_id' instead of 'owner', why isn't it passing on the value of 'owner' as it exists in the params?
[20:34:25] FailBit: when we were using mongodb, I didn't give so much of a shit about app performance because I was too busy whining about the database
[20:34:30] yoongkang: has joined #RubyOnRails
[20:34:35] perfectdreaming: the speed gap between php and ruby will go even farther with php7
[20:34:44] rhizome: tubbo: https://www.youtube.com/watch?v=u9EKgGsv4V4
[20:34:59] MEATCHICKEN: has joined #RubyOnRails
[20:35:10] MEATCHICKEN: Why do I get duplicate records when doing joins
[20:35:13] NBarnes: yeah, but you're writing php
[20:35:33] tubbo: FailBit: been playing with phoenix a little bit. i think once the elixir ecosystem matures, we'll see a huge migration
[20:35:37] perfectdreaming: and all the 'joys' it entails
[20:35:38] tubbo: for the apps that really need it
[20:35:47] FailBit: well I've started with go
[20:35:49] tubbo: that is going to take about 10 years
[20:35:57] tubbo: since that's how long it took for rails to mature
[20:36:09] tubbo: ok so maybe 8 :)
[20:36:17] FailBit: golang is already "300us? das too slow"
[20:36:21] tubbo: rhizome: word
[20:36:33] tubbo: FailBit: have fun reimplementing slice() ;)
[20:36:39] tubbo: every time
[20:36:56] tubbo: go is awesome...for some things...it is NOT a general purpose langauge.
[20:36:57] MEATCHICKEN: tubbo, by that time - maybe ruby will be fast enough
[20:36:59] tubbo: language*
[20:37:05] Megamos: has joined #RubyOnRails
[20:37:16] tubbo: meatchicken: ruby will always be "fast enough" in my opinion, at least to get prototypes out there and in the market
[20:37:33] tubbo: but once you need to really re-platform in some way, there are now tools to do it that aren't as shitty as the ones before
[20:37:54] tubbo: i mean a few years ago, it was like "you want to make your rails app faster? time to reimplement it in Java!"
[20:38:00] perfectdreaming: is go static typed? I noticed Rust has both static and dynamic types?
[20:38:00] tubbo: which is kinda eww for a lot of people
[20:38:05] FailBit: tubbo: but
[20:38:12] FailBit: Real Programmers can write Java in any language
[20:38:19] noobeh: has joined #RubyOnRails
[20:38:22] tubbo: hardee har har
[20:38:40] FailBit: I mean imagine if you had a module ModuleFactoryFactoryBuilder
[20:38:42] tubbo: if by Java you mean "OOP" then yes
[20:38:55] arBmind: has joined #RubyOnRails
[20:39:04] NBarnes: Basically, there are answers to the problem 'My rails app isn't fast enough'. Either optomize the app inside of Rails, or rewrite in a faster platform. Either is just a matter of throwing dev time at the problem, the real question is 'Which is the faster-to-implement approach?'
[20:39:23] FailBit: nbarnes: it depends
[20:39:30] tubbo: i attended a talk at philly's barcamp last week explaining an architecture developed in C# .NET, but felt like if it was implemented in Ruby it would have been a lot more clear.
[20:39:50] FailBit: if your app is already performing well but could be faster, then you can optimize the codebase to squeeze more performance out of it at minimal cost
[20:40:02] FailBit: if your app is strugglign under scale, maybe it's time for a new platform
[20:40:07] tubbo: nbarnes: also you have to worry about which one is the most destructive. suppose you rewrite the rails app in elixir, but you forget a few little nuances that cause major crashes?
[20:40:11] rhizome: or just spin up more AWS!
[20:40:16] FailBit: or just become github
[20:40:39] tubbo: FailBit: you mean never upgrade rails? :)
[20:40:47] FailBit: yes exactly
[20:41:05] noobsu: has joined #RubyOnRails
[20:41:06] tubbo: all those apps are irrelevant to this discussion
[20:41:18] tubbo: if any of us were running apps like that we wouldn't have time to be talking to n00bs in here ;)
[20:41:19] NBarnes: Yeah, I'm generally in the 'optomize your Rails app' camp. Not least because it avoids the temptation to chase the newest-and-best to reimplement in (I'm looking at you here, Elixier)
[20:41:43] rhizome: there are good arguments either way
[20:41:48] tubbo: ideally, optimization and upgrading should be all you need to do. suppose you can't upgrade, and you can't optimize?
[20:42:01] FailBit: nbarnes: but also because usually, optimizing comes down to pretty simple things
[20:42:06] tubbo: or at least, upgrading would take about as long as reimplementing the app
[20:42:06] NBarnes: That, too.
[20:42:35] tubbo: it's not about the code today, it's about the dev who has to clean up your mess 10 years from now.
[20:42:52] FailBit: I have been continually cleaning up dead code everywhere I see it
[20:43:01] FailBit: I add new, well documented or self documenting code
[20:43:05] NBarnes: Also, as a mature ecosystem, Rails has pretty good tooling for helping to squeeze the performance you need out of your Rails app. Unless you're, like, as big as Twitter. But basically nobody is that big and has scaling problems of the same magnitude.
[20:43:16] slash_nick: tubbo: or 10 days from now, the dev who misunderstands your intent and builds an arm coming out of your app's forehead
[20:43:35] FailBit: nbarnes: the generally accepted solution is "throw more hardware at it"
[20:43:42] slash_nick: and 10 years from now... i pity the fools
[20:43:46] perfectdreaming: or you write 'self-documenting' tests
[20:43:48] FailBit: ruby is expensive, in terms of appserver cost
[20:43:53] NBarnes: FailBit; this is probably the single best 'make your app run faster' solution.
[20:43:55] tubbo: nbarnes: i think mailchimp wrote up a blog post about this...the TLDR of the post was that once you're at THAT kind of scale, your language doesn't matter anymore.
[20:43:59] tubbo: they're all shit.
[20:44:11] slash_nick: you can still optimize and architect around some of ruby/rails' limitations... without adding hardware!
[20:44:13] tubbo: what matters is how repeatable your infrastructure is, how disciplined your ops people are, etc.
[20:44:32] NBarnes: hardware always cheaper than dev time.
[20:44:49] FailBit: I always wonder why I get involved in these discussions
[20:44:52] FailBit: I am supposed to be doing things
[20:45:07] slash_nick: nbarnes: i agree... but you can add a server and give a 10% increase... i can do something better and git a 15% improvement on top of your extra server
[20:45:10] NBarnes: If your scaling problem is solvable by throwing hardware at it, that's the obvious and correct solution.
[20:45:20] slash_nick: "do something better"... improve something
[20:45:22] tubbo: i'm basically trying to keep myself available in case shit breaks :P
[20:45:49] NBarnes: slash_nick, yes, but at what cost? Throwing more hardware is easy in the era we live in of platform as a service. Your time is profoundly expensive, by way of contrast.
[20:46:07] matthewd: If you wake up and discover you've become twitter, you're probably going to need to rewrite some things for a more roflscale architecture
[20:46:18] lacrymology: can I make validates_inclusion_of return the list of valid values? like "must be one of 'foo', 'bar', 'baz'" instead of a cryptic "is not in the list"?
[20:46:18] Cache_Money: has joined #RubyOnRails
[20:46:27] NBarnes: If I wake up and discover that I've become twitter, I'm cashing out and letting some other sucker worry about the problem.
[20:46:28] FailBit: lacrymology: use a message
[20:46:51] tubbo: nbarnes: vertical scaling is just bandaging the problem
[20:46:52] matthewd: But IMO, often it's the "rewrite for scale" that's important -- not necessarily any technology change that gets made at the same time "because X burned us"
[20:46:54] lacrymology: FailBit: how do I set it
[20:47:01] FailBit: http://guides.rubyonrails.org/active_record_validations.html#message
[20:47:21] FailBit: validates(_blah_blah) *things, message: 'Must be reading the docs'
[20:47:26] tubbo: matthewd: hold on a sec, that guy who made the worst bug tracking software ever told me never to rewrite anything on his blog ;)
[20:47:32] tubbo: so i'm gonna follow his advice
[20:47:33] NBarnes: tubbo; throw dev time at it has the potential to be a similar bandage. Throwing hardware at it avoids the potential for expanded tech debt, for example.
[20:47:39] slash_nick: nbarnes: i agree completely... but consider when you know you're load is going to inrease (onboarding massive new client)... if i have to choose between adding 10 new servers (recurring cost) versus making an improvement and adding 5 new servers... i'm going to choose the one with the shorter cost over the lifetime of the product
[20:48:12] NBarnes: slash_nick; if you trust your estimation of that particular circumstance that much, then you have my blessing to proceed. ;)
[20:48:14] tubbo: nbarnes: depends on what the problem is. if the problem is that rails has no caching set up and page loads are taking too long for large collections of data, adding more hardware doesn't solve that problem. proper caching would.
[20:49:03] NBarnes: tubbo; true enough. That'd be an example of a case where throwing hardware at the problem is known to not work and using dev time to fix it would be the right answer.
[20:49:09] matthewd: tubbo: something something foggy thinking? :)
[20:49:20] NBarnes: I'm proposing a heurisitc, I think, something to use when you're not actually sure what the right approach is.
[20:49:47] stannard: has joined #RubyOnRails
[20:49:52] sniperhaxor: Alright, I got this rails error while trying to include bootstrap in my rails app
[20:49:53] sniperhaxor: https://gist.github.com/anonymous/c6b6c0df8c746d622ba7
[20:50:42] portiad: has joined #RubyOnRails
[20:50:56] baweaver: has joined #RubyOnRails
[20:52:40] stannard: has joined #RubyOnRails
[20:53:12] shapeshifter: I have a question. This class https://github.com/spree/spree/blob/master/core/app/models/spree/taxon.rb says 'acts_as_nested_set' and https://github.com/rails/acts_as_nested_set/blob/master/lib/active_record/acts/nested_set.rb defines a method direct_children. How come when I get a "undefined method" error when trying to access Spree::Taxonomy.first.taxons.first.direct_children on the rails conso
[20:53:18] shapeshifter: le? Spree::Taxonomy.first.taxons.first.root? for example returns "true", so it seems like *some* functionality of acts_as_nested_set is there...
[20:53:24] Megamos: has joined #RubyOnRails
[20:53:52] Megamos: has joined #RubyOnRails
[20:54:11] NBarnes: I'm still having trouble making association work in forms. I pass the id of the selected owner in with the params when creating a business, and strong params requires that I declare it as 'owner_id' in strong params, but then owner_id doens't get pushed into the new business model.
[20:54:15] NBarnes: Baffled I am.
[20:54:31] slash_nick: nbarnes: gist?
[20:54:51] colleenmcguckin: has joined #RubyOnRails
[20:55:03] annlewis: has joined #RubyOnRails
[20:55:39] perfectdreaming: nbarnes: I know of two ways to hack around that, but please show a gist first
[20:55:43] corioliss: has joined #RubyOnRails
[20:55:56] tuelz: has joined #RubyOnRails
[20:55:58] NBarnes: https://gist.github.com/nbarnes/9c383b6afaba815a7178
[20:56:41] NBarnes: That produces a business model with no owner set.
[20:57:11] perfectdreaming: is the owner_id an association to a user object?
[20:57:22] NBarnes: It's the id of a Person object.
[20:57:52] MEATCHICKEN: Quick question - if I need to access a belongs_to object attribute
[20:57:58] MEATCHICKEN: I should :includes that relationship correct?
[20:58:38] perfectdreaming: have you set up associations in both the migrations and the models?
[20:59:14] perfectdreaming: meatchicken: no
[20:59:26] MEATCHICKEN: perfectdreaming, Why not?
[20:59:32] MEATCHICKEN: It fixes an n+1 issue
[20:59:43] MEATCHICKEN: if I'm iterating through objects
[20:59:48] NBarnes: @perfectdreaming; yes.
[21:00:07] NBarnes: The foreign key columns in the migrations and the associations in the models.
[21:00:36] ascarter: has joined #RubyOnRails
[21:00:58] rhizome: nbarnes: still only the controller?
[21:01:04] perfectdreaming: meatchicken: you don't need to if I understand you correctly: wheel_3.car should give you the one from many relationship
[21:02:14] MEATCHICKEN: perfectdreaming, More like - @wheels = Wheel.all.each {|wheel| wheel.car.manufacturer }
[21:02:30] NBarnes: Ok, so I've hacked it such that I pull the owner_id out of the params, look up the Person based on that ID, and shove that into the Business model manually.
[21:02:41] NBarnes: But I feel like I _ought_ to be using Rails magic.
[21:02:42] jerin: has joined #RubyOnRails
[21:02:42] MEATCHICKEN: If I am iterating through wheels - I'd have to perform an sql query for the car for every wheel - yeah?
[21:02:43] colleenmcguckin: has joined #RubyOnRails
[21:03:00] kadoppe: has joined #RubyOnRails
[21:03:31] arBmind: has joined #RubyOnRails
[21:03:42] riotjones: has joined #RubyOnRails
[21:03:45] SteenJobs: has joined #RubyOnRails
[21:04:13] perfectdreaming: meatchicken: i'm not familiar with how activerecord optimizes it's queries, but yes, that's a simple implementation for sql
[21:04:19] perfectdreaming: nbarnes: give me a moment
[21:04:48] NBarnes: https://gist.github.com/nbarnes/c46894465df5246ee6a5 works
[21:05:24] NBarnes: But the owner / owner_id juggle in the params and in business_params is weird and I don't know that I'm doing it right.
[21:06:43] slash_nick: is weird... nbarnes is this not a case where you'd use nested attributes?
[21:07:00] perfectdreaming: nbarnes: okay, I think I know what your problem is now
[21:07:01] stannard: has joined #RubyOnRails
[21:07:44] perfectdreaming: nbarnes: first find the person object Person.find(params[:owner_id])
[21:08:58] NBarnes: slash_nick; I don't think so. Nested atttributes is for creating multiple models from a single form. Like, if I wanted to make a Business at the same time as I made a Person, all from one form.
[21:09:17] NBarnes: I want to associated a Person with a business at the time I create the Business, but only from the list of People already in the system.
[21:09:42] perfectdreaming: nbarnes: person.business.create(params[business_params])
[21:10:18] rhizome: nbarnes: nested attributes are for assigning owners, too
[21:10:40] perfectdreaming: that's one way to do it
[21:10:44] perfectdreaming: not the cleanest
[21:11:03] NBarnes: perfectdreaming; I think the way you're describing is basically the way I ended up doing it.
[21:11:05] hello9: has joined #RubyOnRails
[21:11:30] Lovich: has joined #RubyOnRails
[21:11:48] annlewis: has joined #RubyOnRails
[21:11:56] Lovich: has left #RubyOnRails: ()
[21:11:58] hello9: hello, what is the best DRY way to include 1 (or "maybe" 2) method(s) in a few different lib files. Making an entire module for 1 (or 2) methods seems like overkill
[21:12:28] colleenmcguckin: has joined #RubyOnRails
[21:12:49] Coldblackice: has joined #RubyOnRails
[21:16:04] baweaver: has joined #RubyOnRails
[21:16:21] perfectdreaming: nbarnes: in your current example, or what you have done since then?
[21:16:31] NBarnes: https://gist.github.com/nbarnes/c46894465df5246ee6a5
[21:16:39] NBarnes: is what I currently have.
[21:16:51] NBarnes: Which I interpret to be basically what you described. Am I misperceiving?
[21:17:54] perfectdreaming: well, one thing that could be messing you up is that owner_id, is the name of the class owner or person, you should change it to person_id so rails knows what it is
[21:17:58] ascarter: has joined #RubyOnRails
[21:19:29] perfectdreaming: that is, what you call the variable in the create action, rails should autocreate a relationship already in the db
[21:20:17] NBarnes: I can see how that'd created confusion in Rails' brain.
[21:20:26] NBarnes: I'll play with that and see if helps.
[21:21:37] VeryBewitching: has joined #RubyOnRails
[21:21:51] rom: has joined #RubyOnRails
[21:22:29] centrx: has joined #RubyOnRails
[21:23:32] rhizome: hello9: what is overkill about it?
[21:23:34] perfectdreaming: with that said nbarnes, you REALLY dont want to let the user set that
[21:23:43] hello9: @rhizome :)
[21:24:01] adac: has joined #RubyOnRails
[21:24:16] hello9: @rhizome i hear that
[21:24:21] hello9: @rhizome hahaha
[21:24:39] rhizome: are u in college
[21:24:40] a1fa: smathy: i figured out a way
[21:25:18] brunoalano: has joined #RubyOnRails
[21:26:16] brunoalano: What's the best way to implement a Form Object in Rails, using the "reform" gem or thoughtbot attempt (https://robots.thoughtbot.com/activemodel-form-objects)?
[21:26:24] a1fa: smathy: how nasty is this? https://gist.github.com/doekerqhtv/ac4f78ae31ba934083d7
[21:26:37] mostlybadfly: has joined #RubyOnRails
[21:26:38] pkrnj: has joined #RubyOnRails
[21:27:17] tubbo: reform handles a little more for you
[21:27:23] tubbo: at least that's what it seems like
[21:27:39] tubbo: honestly though i typically just create active_model objects to avoid pulling in a new dependency
[21:29:08] smathy: a1fa, I don't know what you're trying to achieve, I thought the problem was that you were `sign_out`ing a user and devise was also killing `current_user`, but your code is using `current_user` itself as the user - so not sure wju just a `sign_out current_user` wouldn't work.
[21:30:19] alex88: has joined #RubyOnRails
[21:30:27] smathy: tubbo, isn't that what that thoughtbot article is doing?
[21:30:50] arthurix_: has joined #RubyOnRails
[21:31:18] a1fa: smathy: my code was signing out only the current_user, and not the target user
[21:31:26] a1fa: its a thing with rails, passenger and devise
[21:31:35] smathy: brunoalano, if that simpler method works for you then use it, but does it work with form builders that you may want to use, like simple_form, does it handle nested forms, is it easy to test?
[21:31:49] a1fa: so to work around it, i created a cell called logged_off, which gets checked everytime user moves about the site
[21:31:55] smathy: a1fa, ok, but the code you're showing me now is using current_user
[21:32:10] Radar: GOOD MORNING
[21:32:18] brunoalano: I'm getting `warning: toplevel constant` in a strange way
[21:32:22] brunoalano: Doesn't make sense
[21:32:28] Radar: brunoalano: !ncnh
[21:32:28] helpa: brunoalano: 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.
[21:33:18] a1fa: smathy: yes, because its in application_controller. admin sets the flag, and target user gets logged off next time they try to move about the site
[21:33:27] brunoalano: https://gist.github.com/brunoalano/9f915b95e8ccb0423835
[21:33:42] brunoalano: Can I've a module called Company::Api and other only called Api ?
[21:33:53] a1fa: in the past, i've tried to do user/:id/signoff to initiate sign-off
[21:34:08] a1fa: but that would only sign off the admin trying to invoke the sign off
[21:34:22] jkamenik: has joined #RubyOnRails
[21:34:32] sniperhaxor: quick question: is it common for JS to be loaded in the header for rails apps? I'm used to loading them in the footer and hear that is good practice. However I just ran my first rake assets:precomile and realized it output all my js in the header.
[21:35:43] sniperhaxor: also, what folder are the minified js/css help in a rails app?
[21:35:47] brunoalano: I've updated the Gist with the issue
[21:35:57] rakm: has joined #RubyOnRails
[21:37:13] Radar: brunoalano: you might need to define those constants manually, rather than relying on const_missing from ActiveSupport::Autoload to automatically define them for you.
[21:37:16] Radar: brunoalano: TL;DR: https://gist.github.com/radar/6ea294f399e9ef139c8a
[21:37:48] kies: has joined #RubyOnRails
[21:38:04] ascarter: has joined #RubyOnRails
[21:38:11] ascarter_: has joined #RubyOnRails
[21:38:32] brunoalano: Radar: but with that, has conflicts with my model called `Company`
[21:38:43] Radar: hash-tag lols.
[21:38:55] Radar: Why does a company need its own API like this?
[21:39:09] Radar: Why can't it just be module Api, then class ApplicationController underneath it?
[21:39:28] Radar: Would you do User::Api::ApplicationController too?
[21:39:36] TPBallbag: has joined #RubyOnRails
[21:40:10] ascarter: has joined #RubyOnRails
[21:40:17] chipotle: has joined #RubyOnRails
[21:40:34] brunoalano: No, in my case, it's a SAAS, where the general product has an API and the Company (our customer), has one too
[21:41:19] tubbo: you don't necessarily need to name everything so explicitly to get that working
[21:41:42] tubbo: brunoalano: have you heard of the apartment gem? i haven't deployed anything with it yet, but i'm working on an app right now that uses it.
[21:41:56] TheNet: has joined #RubyOnRails
[21:42:00] momomomomo: has joined #RubyOnRails
[21:42:15] brunoalano: tubbo: Sure, but apartment it's a database abstraction layer that uses tenancy (schema) on pg
[21:43:27] sloggerkhan: Came across this in a legacy application I have to support but didn't write today: https://gist.github.com/anonymous/4df29be9a2afc53d5a0d
[21:43:32] sloggerkhan: It's been fun.
[21:44:27] rhizome: how would you write it?
[21:44:38] tubbo: brunoalano: and?
[21:44:54] brunoalano: tubbo: it's not the thing that I'm trying to solve
[21:45:12] tubbo: brunoalano: seems kinda like it is, unless everything needs to be global...
[21:45:28] tubbo: maybe i just don't understand what you're trying to solve brunoalano
[21:45:36] Radar: SloggerKhan: Oh :)
[21:45:45] Radar: SloggerKhan: They should've used https://github.com/radar/by_star
[21:46:20] Radar: brunoalano: I also don't understand what you're trying to solve. This is the kind of problem that I'd typically consult on.
[21:46:30] Radar: Helping for this over IRC is not going to do anyone any favours.
[21:48:05] sloggerkhan: Radar: Sadly the project isn't in ruby, but yeah, how I wish they'd used something like that.
[21:51:07] ss_much: has joined #RubyOnRails
[21:52:13] pydave6367: has joined #RubyOnRails
[21:54:24] Scriptonaut: Does anyone know how I can get the full src for an image? I can do: image_tag 'users/archived.svg', and it returns an image with src: "/assets/users/archived.svg". Is there a method that will take my path and return the actual one?
[21:54:37] darrencauthon: has joined #RubyOnRails
[21:55:03] gmci: has joined #RubyOnRails
[21:56:56] darrenca_: has joined #RubyOnRails
[21:58:09] Tref: has joined #RubyOnRails
[21:59:30] a1fa: how can i redirect_to with "DELETE" method?
[22:00:24] B1n4r10: has joined #RubyOnRails
[22:02:54] a1fa: i tried routing it, but i got slapped in the face for "unsafe" route
[22:02:56] rhizome: just delete whatever you want to delete wherever you are
[22:04:06] portiad: has joined #RubyOnRails
[22:04:30] riotjones: has joined #RubyOnRails
[22:04:35] ewnd9_: has joined #RubyOnRails
[22:05:25] atomical: has joined #RubyOnRails
[22:05:36] pawnbox: has joined #RubyOnRails
[22:06:25] a1fa: http://stackoverflow.com/questions/25858606/how-to-devise-destroy-session-and-sign-out-from-controller
[22:06:45] a1fa: rhizome: sign_out_and_redirect
[22:06:48] a1fa: this may work
[22:08:06] Axsuul: has joined #RubyOnRails
[22:08:21] a1fa: finally ;)
[22:08:22] a1fa: that worked
[22:08:56] a1fa: divse + ability to logout other users, at the expense of having to checked for logged_off flag
[22:09:08] a1fa: at every page load (before_filter)
[22:09:54] cornerma1: has joined #RubyOnRails
[22:10:11] tuelz: has joined #RubyOnRails
[22:12:03] yoongkang: has joined #RubyOnRails
[22:12:26] annlewis: has joined #RubyOnRails
[22:13:00] [Butch]_: has joined #RubyOnRails
[22:13:33] baweaver: has joined #RubyOnRails
[22:14:12] Megamos: has joined #RubyOnRails
[22:15:45] TPBallbag: has joined #RubyOnRails
[22:17:01] stannard: has joined #RubyOnRails
[22:17:15] Jasaka: has joined #RubyOnRails
[22:17:30] orikremer: has joined #RubyOnRails
[22:17:35] njero: has joined #RubyOnRails
[22:20:05] arthurix: has joined #RubyOnRails
[22:20:26] jetpackjoe: has joined #RubyOnRails
[22:21:05] arooni: has joined #RubyOnRails
[22:21:41] unreal_: has joined #RubyOnRails
[22:21:43] arthurix_: has joined #RubyOnRails
[22:21:45] simplyianm: has joined #RubyOnRails
[22:22:55] jsrn_: has joined #RubyOnRails
[22:25:26] yfeldblum: has joined #RubyOnRails
[22:26:33] Scripore: has joined #RubyOnRails
[22:28:24] colleenmcguckin: has joined #RubyOnRails
[22:30:43] Radar: Scriptonaut: I don't understand the question. Why do you want to do that?
[22:31:18] uris: has joined #RubyOnRails
[22:31:18] axsuul_: has joined #RubyOnRails
[22:31:36] orolo: has joined #RubyOnRails
[22:31:36] renews: has joined #RubyOnRails
[22:33:17] quazimodo: has joined #RubyOnRails
[22:33:50] Scriptonaut: Radar, rather than rendering an image with: image_tag 'users/archived.svg', I need to simply replace the src attribute for my current problem. I can't just replace it with 'users/archived.svg' because it's really in assets. I think asset_path() is what I'm looking for
[22:34:14] colleenmcguckin: has joined #RubyOnRails
[22:34:37] Doddlin: has joined #RubyOnRails
[22:35:03] matthewd: Scriptonaut: Yes, that sounds like what you want (or image_path)
[22:39:21] hnanon: has joined #RubyOnRails
[22:39:30] patrick2: has joined #RubyOnRails
[22:39:52] hnanon: You guys/gals ever feel overwhelmed working on multiple apps simultaneously?
[22:40:30] TheRokh: has joined #RubyOnRails
[22:41:05] Radar: That's how this happened http://ryanbigg.com/2015/11/open-source-work/
[22:41:40] smathy: ACTION doesn't over-commit
[22:42:53] Scriptonaut: if I need helper methods in my controller, is that a sign that I'm doing something wrong?
[22:43:00] exadeci: has joined #RubyOnRails
[22:43:30] TheNet: has joined #RubyOnRails
[22:43:37] smathy: Scriptonaut, nope.
[22:44:01] Radar: Depends on what the helper methods do.
[22:45:01] pawnbox: has joined #RubyOnRails
[22:45:42] Haydos: has joined #RubyOnRails
[22:47:54] Radar: slash_quit: I /quit :P
[22:47:58] tubbo: smathy: aren't you just a perfect little snowflake
[22:48:00] slash_quit: haha yeah i was just thinking that
[22:48:15] smathy: tubbo, mostly just very selfish.
[22:48:28] Fire-Dragon-DoL: has joined #RubyOnRails
[22:48:34] tubbo: Radar: fuck you man, what am i supposed to do about redis-rails? ;)
[22:48:46] slash_quit: tubbo: take over!
[22:48:48] smathy: tubbo, ...which at least more than a couple of people consider very IMperfect (but not me :)
[22:48:53] Radar: tubbo: I think you just volunteers
[22:49:01] Radar: volunteered
[22:49:05] Radar: I'll tell jodosha to add you too
[22:49:10] slash_quit: ACTION nominates tubbo
[22:49:28] tubbo: might as well, i use it on practically every project..
[22:49:31] slash_quit: but for all your projects... not just that one
[22:49:41] slash_quit: tubbo: just don't fuck it up
[22:49:53] arthurix: has joined #RubyOnRails
[22:49:54] orikremer: has joined #RubyOnRails
[22:50:06] tubbo: lol like i care about fucking up some stupid gem
[22:50:13] tubbo: have fun waiting 3 weeks for your merges suckassssssss
[22:50:36] tubbo: Radar: i feel ya on that overwhelming tip though. it's why i stopped working on diaspora.
[22:50:38] Mia: has joined #RubyOnRails
[22:50:38] Mia: has joined #RubyOnRails
[22:50:50] tubbo: just got tired of having to mediate discussions of why WE NEED TO ADD THIS FEATURE NOW vs. actual problems
[22:51:11] Megamosaren: has joined #RubyOnRails
[22:52:05] Radar: It really needs to be something that has financial backing along with a vested interest from that backing, It falls apart otherwise.
[22:53:29] slash_quit: Radar: i like contributing, but as a ronin you know?
[22:53:33] rgtk: has joined #RubyOnRails
[22:54:15] slash_quit: contributing commits, not committing to contribution
[22:55:00] Radar: Someone needs to do that committing to contribution.
[22:55:34] Aeyrix: Radar: You made it into /r/ruby btw
[22:55:53] slash_quit: Radar: yeah... just not necessarily someone with a full time job and a family to love on
[22:55:54] Radar: oh fuck that ghetto
[22:55:57] slash_quit: and an outside to enjoy
[22:56:11] Aeyrix: g h e t t o
[22:56:15] Aeyrix: They were praising your latest blog post.
[22:56:41] Aeyrix: https://www.reddit.com/r/ruby/comments/3t0xki/blog_of_ryan_bigg_open_source_work
[22:56:59] Radar: It's usually a ghetto. Much better now.
[22:58:21] Aeyrix: t w o w e e k s
[22:59:33] Radar: Dec 4th. Remember it or note it down or something.
[22:59:43] banister: has joined #RubyOnRails
[23:00:01] jessemcgilallen: has joined #RubyOnRails
[23:00:02] Aeyrix: Goddammit.
[23:00:02] VeryBewitching: Every time I try to remember someone's birthday I'm reminded of how old I am.
[23:00:16] Aeyrix: I'm out of state for just that day and the day after.
[23:00:17] VeryBewitching: Happy early birthday now so I don't have to remember in a few weeks :D
[23:00:46] adaedra: I can never remember my own age.
[23:00:59] rhizome: i remember that song
[23:02:15] momomomomo: has joined #RubyOnRails
[23:04:21] beneggett: has joined #RubyOnRails
[23:04:25] Doddlin: has joined #RubyOnRails
[23:05:20] riotjones: has joined #RubyOnRails
[23:06:24] zombie_squad: has joined #RubyOnRails
[23:06:38] Scriptonaut: does anyone know how I can use asset_path in my controller?
[23:07:22] blackmesa: has joined #RubyOnRails
[23:07:25] helpa: 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
[23:07:27] Radar: xyxyxyxyxy
[23:08:15] Scriptonaut: I need to return an image src from my controller so my frontend can replace some image srces
[23:08:37] Scriptonaut: however, I'm having trouble getting the full path
[23:08:43] Mia: has joined #RubyOnRails
[23:08:44] Mia: has joined #RubyOnRails
[23:08:50] Scriptonaut: I'm just rendering json
[23:09:00] wldcordeiro: has joined #RubyOnRails
[23:09:36] flori_: has left #RubyOnRails: ()
[23:10:33] rhizome: you mean like Images#show?
[23:10:40] Scriptonaut: figured it out: ActionController::Base.helpers.asset_path('users/archived.svg')
[23:11:48] flori: has joined #RubyOnRails
[23:13:12] annlewis: has joined #RubyOnRails
[23:14:29] workmaster2n: has joined #RubyOnRails
[23:17:28] rickmasta: has joined #RubyOnRails
[23:17:38] portiad: has joined #RubyOnRails
[23:17:59] doodlehaus: has joined #RubyOnRails
[23:19:45] corioliss: has joined #RubyOnRails
[23:27:13] roxtrongo: has joined #RubyOnRails
[23:28:34] annlewis: has joined #RubyOnRails
[23:31:27] Megamos: has joined #RubyOnRails
[23:35:18] njero: has joined #RubyOnRails
[23:35:44] c355E3B: has joined #RubyOnRails
[23:35:48] gwiz: has joined #RubyOnRails
[23:39:09] B1n4r10: has joined #RubyOnRails
[23:39:40] tuelz: has joined #RubyOnRails
[23:40:28] simplyianm: has joined #RubyOnRails
[23:42:56] beneggett: has joined #RubyOnRails
[23:44:10] Megamos: has left #RubyOnRails: ("Leaving...")
[23:44:43] Megamos: has joined #RubyOnRails
[23:47:37] hahuang65: has joined #RubyOnRails
[23:48:21] gwiz: has joined #RubyOnRails
[23:49:24] shibabu: has joined #RubyOnRails
[23:55:02] Palsson: has joined #RubyOnRails
[23:55:21] gwiz: has joined #RubyOnRails
[23:55:44] workmaster2n: has joined #RubyOnRails
[23:56:23] maxx88: radar: per your blog/reddit posts, congrats on making your life choices in terms of Open source projects vs paid work/writing/family. I did the same thing almost 30 years ago when i was 30. It???s a hard choice but, worth the family dividends. kudos!
[23:56:30] Radar: maxx88: Thank you :)
[23:57:53] leonardoajim: has joined #RubyOnRails
[23:58:15] leonardoajim: has joined #RubyOnRails
[23:59:02] Aeyrix: It is a shame that there can't be a compromise found on part of your employer, though.
[23:59:07] Aeyrix: Like you said it would be a unicorn.