« Back to channel list

#RubyOnRails - 09 June 2015

« Back 1 day Forward 1 day »
[00:00:15] baweaver: Redmega: Not that you can tell at least quite yet :P
[00:00:21] djbkd: has joined #RubyOnRails
[00:00:22] Redmega: Mmm, true enough
[00:00:42] nobitanobi: has joined #RubyOnRails
[00:01:20] djbkd: has joined #RubyOnRails
[00:01:46] mwlang: but I can do this: zone = ActiveSupport::TimeZone.new("Asia/Kolkata") which does have the appropriate ???IST??? as the zone abbr: #<TZInfo::TimezonePeriod: #<TZInfo::TimezoneTransitionDefinition: #<TZInfo::TimeOrDateTime: -764145000>,#<TZInfo::TimezoneOffset: 19800,0,IST>
[00:02:19] borodin: has joined #RubyOnRails
[00:02:39] cinnamon_bun: has left #RubyOnRails: ("WeeChat 0.4.2")
[00:02:50] mwlang: So I???m not sure why that would not work when ActiveSupport::TimeZone.new("MST") => returns a zone with current_period of #<TZInfo::TimezonePeriod: nil,nil,#<TZInfo::TimezoneOffset: -25200,0,MST>>>
[00:02:58] hahuang65: has joined #RubyOnRails
[00:03:37] mwlang: I think I???m just lucky most of the time with the abbreviations and missing something subtle in my Zone lookup approach.
[00:04:55] nettoweb: has joined #RubyOnRails
[00:05:08] Radar: hfp: bundle update rails
[00:05:22] hfp: Radar: Thanks
[00:06:19] annlewis: has joined #RubyOnRails
[00:06:38] ss_much: has joined #RubyOnRails
[00:07:12] nettoweb: has joined #RubyOnRails
[00:07:35] mark[oz]: has joined #RubyOnRails
[00:08:50] passbe: Radar: sure, i have a plan with attributes, ie: enabled: true, price: $40, api: true
[00:08:59] nettoweb: has joined #RubyOnRails
[00:09:17] passbe: id like to interact with this "Plan" model like i do any other active record object, however i dont want to store the plans in the database
[00:09:30] passbe: id like to store them in yaml and have them load when rails starts up
[00:09:50] Radar: You have just reworked your sentence into different words.
[00:10:02] Radar: You aren't explaining at all how you want it to act like "any other active record object"
[00:10:07] Radar: Do you want to create it? Update it? Destroy it?
[00:10:14] sevenseacat: has joined #RubyOnRails
[00:10:43] nettoweb: has joined #RubyOnRails
[00:11:01] passbe: ah sorry, this is fixed data so i dont want to create / update or destroy. id like to be able to find a plan based of a key, ie customer has plan_id in database, id like to be able to lookup that plan
[00:11:24] Radar: Can you show us the plan.yml that you have now?
[00:11:33] Radar: why not just add another key to that which represents the ID?
[00:11:36] Radar: id: "basic"
[00:11:41] Radar: then plan_id on the user is "basic"
[00:11:50] Radar: def plan; PLANS[plan_id]; end
[00:12:04] orlandodelaguila: has joined #RubyOnRails
[00:12:23] baweaver: You can just use Enumerable
[00:12:28] passbe: Radar: thats simply put how im doing it at the moment
[00:12:39] baweaver: I would very much suggest against conflating it with Rails queries
[00:12:40] nettoweb: has joined #RubyOnRails
[00:12:47] baweaver: that'll make for a headache in differentiating them later.
[00:13:07] baweaver: Use select and find from Enumerable, those should do just fine.
[00:13:16] Radar: passbe: so what's the issue?
[00:13:21] passbe: ah ok. its just a matter of if i want to store the attributes in a yaml file, i dont want every page load to have to re-read the yaml files
[00:13:30] blackhuey: has joined #RubyOnRails
[00:13:31] robbbroome: has joined #RubyOnRails
[00:13:33] orlandodelaguila: Hello, I'm having a hard time with has_many through and polymorphic associations. I'm trying to create a collection_singular_ids= but it doesn't save the associations after the model has been saved
[00:13:43] baweaver: Anything in config is loaded anyways, just put it in a constant
[00:13:47] passbe: so i need to read the yaml files on startup and store the objects somewhere to access them
[00:14:05] baweaver: config/initializers/my_config_stuffs.rb
[00:14:22] orlandodelaguila: can anybody help?
[00:14:26] digital-ghost: has joined #RubyOnRails
[00:14:27] nettoweb: has joined #RubyOnRails
[00:14:27] passbe: hmm ok, sounds like the way i have it working now is basically the best approach, just needs some tweaking
[00:14:36] tsktsk_: has joined #RubyOnRails
[00:14:44] passbe: Radar, baweaver thanks guys for hearing me out :)
[00:15:48] digital-ghost: Hi Guys, question for you: I am failing at searching for 'how do I use javascript in my rspec test' - specifically, I am trying to get the current controller name. I want to check it against css classes on the page. I wanted to use a javascript to grab the path and parse out the controller name.
[00:15:49] fwaokda: has joined #RubyOnRails
[00:16:23] nettoweb: has joined #RubyOnRails
[00:16:28] tsktsk_: has left #RubyOnRails: ()
[00:16:51] baweaver: Your frontend should have no clue what the backend is doing
[00:17:01] baweaver: Only that it upholds a contract to get information
[00:17:27] digital-ghost: Currently, I use the controller name inside of my body tag's classes, to scope css.
[00:17:36] Radar: digital-ghost: <script>yourThing.controller = "<%= params[:controller] %>"</script>
[00:17:51] Radar: now that I've shown you how to shoot yourself in the foot: why do you want to do it?
[00:17:53] baweaver: Still feels extremely dirty
[00:18:04] nettoweb: has joined #RubyOnRails
[00:18:14] baweaver: What that means is that your CSS needs a lot of work
[00:18:16] digital-ghost: baweaver: I don't disagree.
[00:18:32] newbie: has joined #RubyOnRails
[00:18:35] mwlang: ah, ha! I think I figured it out??????MST??? isn???t ???Mountain Standard Time??? when zone.display is called???it???s ???MST??? whereas ???IST??????s time zone is ???Asia/Kolkata???
[00:18:45] mwlang: https://gist.github.com/mwlang/d76f4b98f9650d78d02f
[00:19:10] mwlang: I???m actually not sure how to ???get at??? the Zone abbreviation that is displayed in the #inspect calls.
[00:19:42] baweaver: The question will still come down to "why?" but I have a feeling it's a legacy you probably don't have hack time for.
[00:19:51] nettoweb: has joined #RubyOnRails
[00:20:04] baweaver: If possible, refactor that because it will most certainly haunt you later.
[00:21:52] digital-ghost: The crappy thing is this: I've written maybe 10 tests before? So rspec/capybara, and testing in generally are a freaking nightmare to me
[00:22:13] digital-ghost: Fixed a bug, but someone asked if I could write a test. I said no, they said try it anyways. :|
[00:22:46] baweaver: So you're namespacing your CSS to make your tests work.
[00:22:58] Guest51183: has left #RubyOnRails: ()
[00:23:01] baweaver: That means your HTML needs to be more semantic
[00:23:03] jacor: has joined #RubyOnRails
[00:23:18] digital-ghost: No, the CSS was name spaced well before this. I was writing a test to ensure that the namespace was present. Because that was what broke before.
[00:23:27] kara_sweets: has joined #RubyOnRails
[00:24:17] cornerma1: has joined #RubyOnRails
[00:24:18] digital-ghost: I've tried to read up on thoughtbots testing tutorials, but still hasn't stuck well.
[00:25:03] Radar: slightly offtopic: what are people using for email on Mac that isn't Mail, Mailbox or Thunderbird?
[00:25:14] quazimodo: how does one remove the /:id param from a resource?
[00:25:17] Redmega: I use Geary
[00:25:23] baweaver: #ruby-offtopic :D
[00:25:24] Radar: quazimodo: remove?
[00:25:31] sevenseacat: remove it? howq will you identify the resource then?
[00:25:37] quazimodo: Radar: specify in routes that it's not a param that's passed in
[00:25:38] charliesome: has joined #RubyOnRails
[00:25:38] Radar: gm sevenseacat
[00:25:43] Radar: quazimodo: Why not?
[00:25:57] quazimodo: Radar: no idea, colleague using rocket pants asked me
[00:26:03] baweaver: ACTION shudders
[00:26:21] quazimodo: i think i've done it before using "resources :whatever" but I can't remember how at all
[00:26:38] Redmega: Thanks a ton for the help guys, I'm off. Until next time~
[00:26:41] mwlang: Radar: gmail. :-o
[00:26:53] sevenseacat: the only way it makes sense to remove the parameter is if you have a singular resource
[00:27:12] sevenseacat: then the ID is irrelevant, becuase theres only one of them
[00:27:19] Cache_Money: has joined #RubyOnRails
[00:27:28] quazimodo: kind of like passing "param: nil"
[00:27:59] quazimodo: "resource" vs "Resources"
[00:30:51] fmcgeough: has joined #RubyOnRails
[00:36:03] simplyianm: has joined #RubyOnRails
[00:37:12] rromanchuk: has joined #RubyOnRails
[00:37:43] fgo: has joined #RubyOnRails
[00:38:10] criosphinx: has joined #RubyOnRails
[00:38:41] symbol: has joined #RubyOnRails
[00:38:59] Pazician: has joined #RubyOnRails
[00:39:27] mark[oz]: has joined #RubyOnRails
[00:40:09] shock_one: has joined #RubyOnRails
[00:40:23] robustus: has joined #RubyOnRails
[00:40:47] ekain: has joined #RubyOnRails
[00:42:59] mark[oz]: has joined #RubyOnRails
[00:44:30] BlissOfBeing: has joined #RubyOnRails
[00:44:45] dclo: has joined #RubyOnRails
[00:44:52] n80: has joined #RubyOnRails
[00:45:29] Jasaka|NA: has joined #RubyOnRails
[00:45:48] ecksit: has joined #RubyOnRails
[00:46:27] ecksit: hey, what is the best approach for benchmarking rails boot times?
[00:46:36] Radar: ecksit: time rails runner
[00:47:15] ecksit: simple! thanks.
[00:47:17] givanse: has joined #RubyOnRails
[00:47:23] Radar: or possibly time rails runner 'puts Rails.env'
[00:47:38] Radar: My Rails app boots in 9.6 seconds which is about 9.5 too slow.
[00:47:40] bruno-: has joined #RubyOnRails
[00:48:59] mwlang: Radar: If you were still on Rails 1.2, you might be booting in 2.4 secs. :-D
[00:49:12] ecksit: what is the difference between the two?
[00:49:18] quazimodo: i have an old lenovo, without zeus i'd be dead
[00:49:25] Radar: 0.532 with Zeus.
[00:49:31] quazimodo: zeus is a nice project
[00:49:32] quazimodo: very clever
[00:49:33] Radar: ecksit: Zeus starts up the Rails app in the background.
[00:49:46] quazimodo: i wish there was an 'abstract' versioun of zeus i could use with any gem i'm writing
[00:49:47] ecksit: no, i knew that. i meant your examples :p
[00:50:03] Radar: ecksit: I don't understand.
[00:50:05] sevenseacat: 11sec on my laptop -_-
[00:50:16] quazimodo: Radar: how long does your spec suit take, i think
[00:50:21] ecksit: i'm purely looking to benchmark some changes that i am looking to implement.
[00:50:28] Radar: quazimodo: ~4m30s
[00:50:37] Radar: It runs in 6 parallel processes
[00:50:38] ecksit: @Radar, `time rails runner 'puts Rails.env'` vs. `time rails runner`
[00:50:56] Radar: ecksit: Oh. The first example there will actually boot the application, rather than just initializing Rails.
[00:51:09] Radar: Initializing Rails takes ~2 seconds on my machine
[00:51:10] ecksit: right - perhaps that is best then
[00:51:21] Radar: and really that's just the commands part, which I cover in my book: https://leanpub.com/ddr
[00:51:42] m0r0n: has joined #RubyOnRails
[00:52:17] ur5us_: has joined #RubyOnRails
[00:52:51] jstanton: has joined #RubyOnRails
[00:53:47] edwinvdgraaf: has joined #RubyOnRails
[00:55:22] m0r0n: has left #RubyOnRails: ()
[00:55:24] yaymukund: has joined #RubyOnRails
[00:55:50] mark[oz]: has joined #RubyOnRails
[00:56:49] paulcsmith: has joined #RubyOnRails
[00:57:24] mary5030: has joined #RubyOnRails
[00:57:44] mwlang: Radar: how???s the Leanpub site working for you? I???ve been considering writing some tutorials and looking at a few options???this is the first I???ve seen leanpub.
[00:58:03] Radar: mwlang: It's brilliant :)
[00:59:25] charliesome: has joined #RubyOnRails
[01:01:06] one_zero: has joined #RubyOnRails
[01:01:28] kies: has joined #RubyOnRails
[01:01:38] rubyonra_: has joined #RubyOnRails
[01:03:33] Jasaka: has joined #RubyOnRails
[01:06:21] jstanton: has joined #RubyOnRails
[01:09:08] fwaokda: is it possible to set up my routes so that I dont have to pass both objects when using form for like so, form_for([@ad.magazine_id,@ad]) ?
[01:09:33] fwaokda: i feel like I read something on how to do this before but can't seem to find anything on it right now
[01:11:02] hackeron: has joined #RubyOnRails
[01:12:07] GriffinHeart: has joined #RubyOnRails
[01:12:17] codelurker: has joined #RubyOnRails
[01:12:25] djbkd: has joined #RubyOnRails
[01:12:25] mark[oz]: has joined #RubyOnRails
[01:12:25] ght: has joined #RubyOnRails
[01:13:00] shyshy: has joined #RubyOnRails
[01:14:45] rhizome: what kind of route is it supposed to be?
[01:15:22] rhizome: or, if ad belongs_to magazine, why put it in the route at all?
[01:15:27] Radar: fwaokda: How would Rails know the route if you didn't tell it?
[01:16:33] rhizome: at any rate, you're probably thinking of shallow routing, which is sort of the direction of the questions i'm thinking of
[01:17:02] ght: Question: I am attempting to host multiple rails sites on a Centos 7 box via virtual hosts. I need passenger installed at the system lvel so httpd can access it, and then I specifcy individual ruby instances to use in the virutal host directives.
[01:17:59] ght: The problem I'm having is, I successfully deployed rvm at the system level, but now, when I su - to a username that utilizes a rails site and attempt to deploy rvm specifically for that user, it errors out with curl error 23, cannot write body.
[01:19:00] ght: Is there a better method for this? In the past, what I'd do is, the first rails site, I'd deploy rvm / ruby / passenger there, and in the httpd config, set that passenger instance as the module, but then I have to open up permissions for the other users that access it.
[01:19:13] ght: I've asked in #rvm but everyone is idle.
[01:19:21] ght: Wondering if anyone here is familiar with such.
[01:20:01] kinduff: has joined #RubyOnRails
[01:20:30] dontdont: has joined #RubyOnRails
[01:21:26] ur5us: has joined #RubyOnRails
[01:21:26] fwaokda: sorry just got back, yes! i think it was something with shallow routing because i recall the term. thanks I'll go look that up, sorry for the vague and likely incorrect question as Im probably not describing it correctly
[01:21:45] Rubie: has joined #RubyOnRails
[01:21:57] rhizome: ght: set up rvm for the user the webserver runs as
[01:22:15] rhizome: you'll also need it for your app users, but in general...
[01:22:48] rhizome: not sure where curl comes in for a deploy
[01:25:59] wmoxam: rhizome: I just download a package and it all works ??\_(???)_/??
[01:27:06] wmoxam: (re: Atom comment from earlier)
[01:27:24] dnlbyl: has joined #RubyOnRails
[01:27:30] Anakat: has joined #RubyOnRails
[01:27:32] rhizome: nope, the .deb is what broke
[01:28:39] wmoxam: I can only speak to using it on OSX & Ubuntu
[01:28:59] rhizome: alas and alack
[01:30:15] RegulationD: has joined #RubyOnRails
[01:30:25] Kudos2me2: has joined #RubyOnRails
[01:30:41] edwinrozario: has joined #RubyOnRails
[01:30:44] mheld: has joined #RubyOnRails
[01:35:23] edwinrozario: has joined #RubyOnRails
[01:35:39] mello: has joined #RubyOnRails
[01:35:39] mello: has joined #RubyOnRails
[01:36:03] beauby: has joined #RubyOnRails
[01:37:14] unreal_: has joined #RubyOnRails
[01:37:43] assembledbits: has joined #RubyOnRails
[01:37:54] dnlbyl: has joined #RubyOnRails
[01:40:18] justintv90: has joined #RubyOnRails
[01:42:56] dclo: has joined #RubyOnRails
[01:45:35] Rodya_: has joined #RubyOnRails
[01:50:33] willharr_: has joined #RubyOnRails
[01:51:37] BlissOfBeing: has joined #RubyOnRails
[01:51:45] rubyonrailed: has joined #RubyOnRails
[01:52:54] philcrissman: has joined #RubyOnRails
[01:53:02] scottmatheina: has joined #RubyOnRails
[01:53:16] Rubie: has joined #RubyOnRails
[01:58:24] Rodya_: has joined #RubyOnRails
[01:58:40] seank_: has joined #RubyOnRails
[01:58:40] edwinvdgraaf: has joined #RubyOnRails
[01:59:20] merryfett: has joined #RubyOnRails
[02:02:38] vin`: has joined #RubyOnRails
[02:03:05] simplyianm: has joined #RubyOnRails
[02:04:09] rromanchuk: has joined #RubyOnRails
[02:04:14] x1337807x: has joined #RubyOnRails
[02:04:28] Aeyrix: ght: Isn't that what rubyenv is for?
[02:04:37] Aeyrix: I thought rvm didn't handle containerised versions of Ruby.
[02:05:11] Aeyrix: ght: Also at what point are you using curl?
[02:05:19] Aeyrix: Error 23 means it can't write to disk - permission denied.
[02:06:29] fmcgeough: has joined #RubyOnRails
[02:07:08] r4pha: has joined #RubyOnRails
[02:07:23] bahar: has joined #RubyOnRails
[02:07:39] gerep: has joined #RubyOnRails
[02:08:27] gerep: Hi all. I noticed that when I make any model request like Seller.first, it runs the SQL command twice, like this: https://gist.github.com/anonymous/62e34ac771d9b9315dcd
[02:08:31] gerep: What is wrong?
[02:08:41] beauby: has joined #RubyOnRails
[02:10:04] gerep: Also, when I run a migration, at the end of the execution I have some weird output: https://gist.github.com/anonymous/51f056c401eb1e9d3ce5
[02:10:29] gerep: There are two Select commands doing some joins.
[02:10:41] gerep: What can it be? I never noticed that before
[02:10:43] gerep: It is weird =)
[02:10:45] Limix: has joined #RubyOnRails
[02:11:48] rhizome: looks pg-specific
[02:12:02] gerep: When I run the rollback, I also have that weird output
[02:12:04] zzing: has joined #RubyOnRails
[02:12:05] Aeyrix: Do you have a key to that table?
[02:12:05] ght: Yes aeyrix, and never mind.
[02:12:19] gerep: rhizome, but why would the console make the same query twice?
[02:12:30] gerep: Aeyrix, yes, it is the table generated by Devise
[02:12:41] Aeyrix: Fucking Devise.
[02:12:43] Aeyrix: Every time.
[02:13:16] gerep: Aeyrix, I know it will sound stupid but last night it was working perfectly, tonight I didn't update any gems or postgresql
[02:13:29] Aeyrix: gerep: It's not going to magically change overnight.
[02:13:33] gerep: Something weird must have happened
[02:13:44] gerep: Aeyrix, that's why I said it would sound stupid =)
[02:13:51] siemprefresco: has joined #RubyOnRails
[02:13:51] Aeyrix: Wait around for someone who can put up with Devise actually tabs into IRC.
[02:13:57] Aeyrix: I dislike it and avoid it.
[02:15:08] kara_sweets: has joined #RubyOnRails
[02:15:10] mconnolly: has joined #RubyOnRails
[02:15:43] gerep: A-ha!!!!!
[02:15:54] gerep: It was the gem rails_12factor
[02:16:08] PlasmaStar: has joined #RubyOnRails
[02:16:12] gerep: I added that last night, my last commit, so Heroku would stop warning me about it
[02:16:37] gerep: That was the "stupid overnight magic" :D
[02:16:41] Aeyrix: Ta-da, it wasn't magic! :P
[02:16:51] gerep: I had to set this gem to group production
[02:16:55] Aeyrix: Glad to hear it's solved.
[02:16:58] gerep: Well, lesson learned :)
[02:17:04] gerep: Aeyrix, thanks =)
[02:17:08] Aeyrix: ACTION makes a note to write a simplistic authentication gem for rails.
[02:17:14] fgo: has joined #RubyOnRails
[02:17:16] Seanzie: has joined #RubyOnRails
[02:17:45] scottmatheina: has joined #RubyOnRails
[02:17:53] gerep: Aeyrix, go for it! I'll use it!
[02:18:21] gerep: Devise is like a bazooka to kill a cockroach :(
[02:18:31] chriskk: has joined #RubyOnRails
[02:18:33] Aeyrix: Absolutely.
[02:18:43] Aeyrix: That's why I normally roll my own auth, much to the disdain of most Rails experts.
[02:18:59] Aeyrix: I work in security though, so I like to believe I'm probably doing it in a reasonably secure fashion.
[02:21:54] mconnolly: has joined #RubyOnRails
[02:21:59] earthquake: has joined #RubyOnRails
[02:22:15] chriskk: I have a table that I import 30+ million rows of data into everyday. The import is handled by resque tasks and takes 15+ hours. Unfortunately the imports are affecting the database and the performance of the app. What is a good strategy to improve performance? I???m thinking of moving the table in question to a separate database and setup a read only follower.
[02:22:23] haz111: has joined #RubyOnRails
[02:22:46] Aeyrix: chriskk: Tangential but what are you actually importing?
[02:22:54] iamjarvo: has joined #RubyOnRails
[02:23:12] chriskk: URLs and stats like impressions, CPMs
[02:23:30] iamjarvo: has joined #RubyOnRails
[02:23:35] Aeyrix: Are you bulk-importing 30m rows, or are you adding 30m rows over the course of a day?
[02:23:37] rhizome: get a bigger box
[02:23:59] chriskk: So I???m thinking 3 databases: main app db, db for the URLs plus follower for reads
[02:24:05] rhizome: also, hire a DBA, if only for a little while
[02:24:21] commondream: has joined #RubyOnRails
[02:24:23] chriskk: bulk importing 1000s at a time
[02:24:27] rhizome: multiple db is a pain in rails, i'll just throw that out there
[02:24:30] r4pha: has left #RubyOnRails: ("bye")
[02:24:40] Aeyrix: chriskk: This is more a question for your DB software's IRC channel.
[02:24:44] Aeyrix: Are you using PostgreSQL?
[02:24:50] Aeyrix: #postgresql is on this net.
[02:24:53] chriskk: yea, I???m going down the multiple db path and reading articles out there, but seems a bit hackish
[02:25:21] chriskk: ok, I???ll ask on that channel
[02:25:36] chriskk: another idea is to go down the map reduce route
[02:25:50] rhizome: yeah no, on the face of it
[02:25:52] chriskk: the app is on Heroku and there???s a hadoop add-on there
[02:25:59] rhizome: the what is on what
[02:26:22] chriskk: my app is on Heroku
[02:26:29] rhizome: your goal should be to get off of AWS for something like that, IMO
[02:27:14] chriskk: oh, because of performance?
[02:27:17] vin`: has joined #RubyOnRails
[02:27:19] Aeyrix: Get heavy metal.
[02:27:26] rhizome: yeah, because of performance.
[02:27:27] Aeyrix: rhizome: Heroku is on AWS.
[02:27:37] Aeyrix: You're literally suggesting "go from AWS abstracted to AWS".
[02:27:37] rhizome: just cutting to the chase
[02:27:51] Aeyrix: oops, my mistake
[02:27:54] chriskk: who would you go with?
[02:27:59] Aeyrix: chriskk: SoftLayer.
[02:28:02] rhizome: supermicro
[02:28:06] siemprefresco: has joined #RubyOnRails
[02:28:20] sevenseacat: I'd hire a dba.
[02:28:32] Aeyrix: ALL THESE ANSWERS AND YOU CHOSE THE HR ONE
[02:28:33] rhizome: at least. you should have some sizing brains in the mix
[02:28:38] Aeyrix: afk lunch
[02:29:06] rhizome: another question is why the data isn't going directly to you in the first place
[02:29:15] neanderslob: hi all, I'm using .read to store a string contained in a text file as a variable. The problem is that it seems to be including the line-break that my text editor adds at the end of the text file
[02:29:45] chriskk: it???s a ad infrastructure and they???re storing and aggregating the data
[02:30:02] neanderslob: anyone know a way to ignore the linebreak at the end?
[02:30:05] chriskk: so I get an CSV file
[02:30:49] rhizome: so they have a huge export and you have a huge import, filetransfer, rather than them like giving you access via an api? i know i may be overestimating ad network technology here.
[02:30:54] RegulationD: has joined #RubyOnRails
[02:31:06] rhizome: sounds partnershippy though
[02:31:07] Spami: has joined #RubyOnRails
[02:31:31] simplyianm: has joined #RubyOnRails
[02:31:41] beauby: has joined #RubyOnRails
[02:33:49] chriskk: I was surprised too...
[02:37:04] bruno-: has joined #RubyOnRails
[02:37:52] chriskk: neanderslob: chomp
[02:37:55] bahar: has joined #RubyOnRails
[02:38:20] neanderslob: chriskk: ow, you bit me
[02:38:57] moretti: has joined #RubyOnRails
[02:39:04] commondream: has joined #RubyOnRails
[02:39:28] neanderslob: chriskk: oh wow, there's a whole article recommending chomp to remove unwanted new lines
[02:39:34] neanderslob: chriskk: thanks
[02:39:43] krz: has joined #RubyOnRails
[02:39:54] chriskk: neanderslob: np
[02:39:59] jerematic: has joined #RubyOnRails
[02:40:26] chriskk: the Internet is helpful sometimes
[02:41:17] jerematic: has joined #RubyOnRails
[02:41:59] gerep: Goodnight lords!
[02:49:00] michael_mbp: has joined #RubyOnRails
[02:49:10] GriffinHeart: has joined #RubyOnRails
[02:51:26] rubyonrailed: has joined #RubyOnRails
[02:53:52] bronson: has joined #RubyOnRails
[02:54:06] hahuang65: has joined #RubyOnRails
[02:54:37] Limix: has joined #RubyOnRails
[02:57:17] BlissOfBeing: has joined #RubyOnRails
[02:59:25] seank_: has joined #RubyOnRails
[03:00:24] darrencauthon: has joined #RubyOnRails
[03:02:01] edwinvdgraaf: has joined #RubyOnRails
[03:02:14] parzo: has joined #RubyOnRails
[03:02:39] baweaver: has joined #RubyOnRails
[03:03:50] parzo: I am trying to build a simple calculator to take two numbers add them together and display the result on the page. I know I could easily use JS but want to use Ruby for this. I don't know how to correctly pass the variables from one controller action to another though. The following example means @results is always nil https://gist.github.com/mhoad/1e130c5868fd6f7c857e Any help would be really appreciated!
[03:05:09] nobitanobi: has joined #RubyOnRails
[03:05:11] parzo: ugh. Nevermind. Realised I mixed up the get vs. post types :)
[03:08:05] twilling: has joined #RubyOnRails
[03:09:09] platosha: has joined #RubyOnRails
[03:09:30] beauby: has joined #RubyOnRails
[03:10:25] braincrash: has joined #RubyOnRails
[03:12:16] aloneintheworld: has joined #RubyOnRails
[03:12:47] aloneintheworld: What is the RoR way to write this sentence? SELECT SUM(quantity*average)/SUM(quantity)
[03:13:03] aloneintheworld: I???ve tried multiple ways but none of them works
[03:13:25] bin_005: has joined #RubyOnRails
[03:13:38] xcesariox: has joined #RubyOnRails
[03:13:38] sevenseacat: .select("SUM(quantity....") ?
[03:14:20] aloneintheworld: sevenseacat: If I put this ???select(sum("quantity * average")/sum("quantity") ??? then I see in the log file that Rails generates 2 separated queries
[03:14:32] aloneintheworld: one for the first sum, another for the 2nd sum
[03:15:02] mary5030: has joined #RubyOnRails
[03:15:04] sevenseacat: well thats not what I said to do
[03:15:18] bahar: has joined #RubyOnRails
[03:15:40] aloneintheworld: you mean all in between the (??? ???)
[03:16:13] GriffinHeart: has joined #RubyOnRails
[03:16:45] benlieb_: has joined #RubyOnRails
[03:18:37] aloneintheworld: for some reason if I do that, i dont see the generated sql in the log file
[03:19:29] GriffinHeart: has joined #RubyOnRails
[03:19:50] tobobo: has joined #RubyOnRails
[03:20:30] aloneintheworld: i dont see rails generating the calculation in the sql
[03:24:25] mello: has joined #RubyOnRails
[03:24:25] sevenseacat: I don't know what you're seeing.
[03:27:19] sarink: has joined #RubyOnRails
[03:28:16] djbkd: has joined #RubyOnRails
[03:29:31] aloneintheworld: this self.select("SUM(quantity * average)/SUM(quantity)", :year).group(:year).order(year: :asc)
[03:29:42] aloneintheworld: is generating this: SELECT COUNT(*) AS count_all, year AS year FROM "psus" WHERE "psus"."school_id" = ? GROUP BY year ORDER BY "psus"."year" ASC [["school_id", 980190962]]
[03:30:25] rickmasta: has joined #RubyOnRails
[03:32:06] mark[oz]: has joined #RubyOnRails
[03:32:26] earthquake: has joined #RubyOnRails
[03:33:37] rhizome: hmm, can you use a find_or_create on a belongs_to?
[03:34:24] sevenseacat: aloneintheworld: I don't think it is
[03:35:06] johntrails: has joined #RubyOnRails
[03:36:39] sp1rs: has joined #RubyOnRails
[03:37:05] jenrzzz: has joined #RubyOnRails
[03:39:58] aloneintheworld: sevenseacat: you???re probably right
[03:42:24] ProLoser: has joined #RubyOnRails
[03:43:14] aloneintheworld: if i add a .map at the end of the select, I get the calculation being generated in the log file
[03:44:33] ModusPwnens: has joined #RubyOnRails
[03:44:49] drale2k: has joined #RubyOnRails
[03:44:59] Guest65493: has joined #RubyOnRails
[03:48:25] Artosis: has joined #RubyOnRails
[03:48:38] Artosis: Can you have both a has_many and a has_one relationship with the same class on a model?
[03:48:52] sevenseacat: yep, just give them distinct names
[03:49:21] Artosis: How do you give an assocation a name?
[03:49:30] kara_sweets: has joined #RubyOnRails
[03:49:31] sevenseacat: has_many :your_name_here
[03:49:33] Artosis: Oh, i guess there's probably an actual named option for that and its implicit when you leave it out
[03:49:58] sevenseacat: has_many :your_name_here, class: MyAwesomeClass, has_one :special_name_here, class: MyAwesomeClass
[03:50:00] sevenseacat: or something like that
[03:50:24] sevenseacat: I never remember if its class or class_name
[03:51:07] Artosis: it's class_name
[03:51:18] Artosis: Sweet. I just wanted to make sure i wasn't doing some rails cardinal sin by doing that
[03:52:03] sevenseacat: its uncommon, but if your business rules call for it, do it.
[03:52:36] iamjarvo: has joined #RubyOnRails
[03:53:11] iamjarvo: has joined #RubyOnRails
[03:56:18] dclo: has joined #RubyOnRails
[03:59:45] earthquake: has joined #RubyOnRails
[04:00:15] commondream: has joined #RubyOnRails
[04:00:24] arup_r: has joined #RubyOnRails
[04:00:32] lethjakman: has joined #RubyOnRails
[04:01:00] Nuck: has joined #RubyOnRails
[04:02:37] Artosis: is rails supposed to create a migration for you to add the type column when you pass --parent to rails generate model?
[04:02:45] commondream: has joined #RubyOnRails
[04:02:53] bratsche: has joined #RubyOnRails
[04:02:57] sevenseacat: i havent heard of the --parent option before
[04:03:15] Artosis: it talks about it a bit if you type rails generate model --help
[04:03:24] Artosis: but after running it, it didn't create a migration and i was wondering why
[04:03:34] Artosis: it's not a problem to make one myself and add the type column but..
[04:04:00] edwinvdgraaf: has joined #RubyOnRails
[04:05:15] baweaver_: has joined #RubyOnRails
[04:06:23] merryfett: has joined #RubyOnRails
[04:07:03] scottmatheina: has joined #RubyOnRails
[04:09:49] kp666: has joined #RubyOnRails
[04:10:38] cac: has joined #RubyOnRails
[04:13:19] commondream: has joined #RubyOnRails
[04:13:52] sarink: has joined #RubyOnRails
[04:13:57] stardiviner: has joined #RubyOnRails
[04:14:31] cac: has joined #RubyOnRails
[04:14:48] duderonomy: has joined #RubyOnRails
[04:18:03] towski_: has joined #RubyOnRails
[04:19:37] beneggett: has joined #RubyOnRails
[04:19:45] RegulationD: has joined #RubyOnRails
[04:20:57] n3b: has joined #RubyOnRails
[04:26:52] rubyonrails449: has joined #RubyOnRails
[04:27:25] rubyonrails449: has left #RubyOnRails: ()
[04:27:44] yunkai: has joined #RubyOnRails
[04:30:13] charliesome: has joined #RubyOnRails
[04:32:46] jcaho: has joined #RubyOnRails
[04:32:53] VaibhavRajput: has joined #RubyOnRails
[04:38:12] fragamus: has joined #RubyOnRails
[04:38:14] duncannz: has joined #RubyOnRails
[04:38:31] ryanf: has joined #RubyOnRails
[04:39:36] Liothen: has joined #RubyOnRails
[04:40:08] samuelsimoes: has joined #RubyOnRails
[04:42:09] cac: has joined #RubyOnRails
[04:43:25] dclo: has joined #RubyOnRails
[04:43:55] cac: has joined #RubyOnRails
[04:50:12] skiz_: has joined #RubyOnRails
[04:50:49] ferr: has joined #RubyOnRails
[04:51:50] shock_one: has joined #RubyOnRails
[04:54:45] darrencauthon: has joined #RubyOnRails
[04:58:33] shock_one: has joined #RubyOnRails
[04:58:52] TommyTheKid: has left #RubyOnRails: ("Leaving")
[05:03:42] codesoda: has joined #RubyOnRails
[05:03:49] scottmatheina: has joined #RubyOnRails
[05:04:27] Maletor: has joined #RubyOnRails
[05:04:31] Rubie: has joined #RubyOnRails
[05:04:32] Maletor: Does with_clean_env even remove stuff from ~/.bundle/config
[05:05:57] mheld: has joined #RubyOnRails
[05:08:10] yfeldblum: has joined #RubyOnRails
[05:08:16] rubyonrailed: has joined #RubyOnRails
[05:09:32] edwinvdgraaf: has joined #RubyOnRails
[05:10:51] philcrissman: has joined #RubyOnRails
[05:11:53] rickmasta: has joined #RubyOnRails
[05:12:04] _jesterfraud: has joined #RubyOnRails
[05:13:13] mello: has joined #RubyOnRails
[05:15:15] lxsameer: has joined #RubyOnRails
[05:16:42] yfeldblum: has joined #RubyOnRails
[05:17:39] skiz_: has joined #RubyOnRails
[05:24:03] skiz__: has joined #RubyOnRails
[05:26:11] tsujp: has joined #RubyOnRails
[05:27:53] _jesterfraud_: has joined #RubyOnRails
[05:28:29] Axsuul: has joined #RubyOnRails
[05:29:02] aganov: has joined #RubyOnRails
[05:29:06] Axsuul: Sublime users, i created a toggle :focus for rspec plugin, thoughts? https://github.com/axsuul/sublime-toggle-rspec-focus
[05:30:12] sevenseacat: axsuul: I probably wouldnt use it, but nifty :)
[05:30:31] Axsuul: thanks :)
[05:33:22] edwinrozario: has joined #RubyOnRails
[05:35:32] kara_sweets: has joined #RubyOnRails
[05:36:44] sandstrom: has joined #RubyOnRails
[05:37:53] BlissOfB_: has joined #RubyOnRails
[05:37:57] kadoppe: has joined #RubyOnRails
[05:44:08] dclo: has joined #RubyOnRails
[05:45:36] tagrudev: has joined #RubyOnRails
[05:45:43] rvanlieshout: has joined #RubyOnRails
[05:48:23] intuxicated: has joined #RubyOnRails
[05:48:41] metus_violarium: has joined #RubyOnRails
[05:48:43] intuxicated: has joined #RubyOnRails
[05:54:40] bmalum: has joined #RubyOnRails
[05:57:08] comrad: has joined #RubyOnRails
[05:57:33] tenderlove: has joined #RubyOnRails
[05:57:47] simplyianm: has joined #RubyOnRails
[05:59:54] codesoda: has anyone ever programmatically configured postfix from a ruby app?
[06:00:23] rvanlieshout: and by programmatically configure you mean setting up databases, users and grants?
[06:00:56] karmatronic: has joined #RubyOnRails
[06:01:14] Radar: seems bad
[06:02:03] rvanlieshout: well.. we use puppet to setup installations and puppet is written in ruby
[06:02:17] hahuang61: has joined #RubyOnRails
[06:02:53] Radar: helpa: !8ball <- is this ever wrong?
[06:03:16] Radar: Thanks helpa. I needed that for https://github.com/redis-store/redis-activesupport/pull/28#issuecomment-110210216
[06:03:17] JohnBat26: has joined #RubyOnRails
[06:03:28] Radar: OSS is fun
[06:03:38] eoy: has joined #RubyOnRails
[06:03:49] Lightsword: has joined #RubyOnRails
[06:03:52] IanVorn: has joined #RubyOnRails
[06:04:06] sevenseacat: i feel a bit sorry for that guy though
[06:04:17] sevenseacat: are you not merging it for a reason, and do they know why? >_>
[06:04:31] Radar: And because I do too many things :\
[06:04:53] sevenseacat: oh it got merged anyway
[06:06:10] pusewicz: has joined #RubyOnRails
[06:08:39] RegulationD: has joined #RubyOnRails
[06:08:39] netzfisch: has joined #RubyOnRails
[06:08:49] DukeDave: has joined #RubyOnRails
[06:10:24] roolo: has joined #RubyOnRails
[06:11:03] coin3d: has joined #RubyOnRails
[06:12:52] Hosh: has joined #RubyOnRails
[06:13:10] kerunaru: has joined #RubyOnRails
[06:13:22] ebryn: has joined #RubyOnRails
[06:13:30] hahuang61: has joined #RubyOnRails
[06:14:10] Frem: has joined #RubyOnRails
[06:14:18] bruno-: has joined #RubyOnRails
[06:14:56] hellschreiber: has joined #RubyOnRails
[06:14:57] alxndr: has joined #RubyOnRails
[06:15:34] danlucraft: has joined #RubyOnRails
[06:16:27] n0f3: has joined #RubyOnRails
[06:17:49] Etriaph: PikachuEXE
[06:17:59] commondream: has joined #RubyOnRails
[06:18:02] Etriaph: ACTION hates Pokemon
[06:18:14] Lightsword: has joined #RubyOnRails
[06:18:49] hahuang61: has joined #RubyOnRails
[06:18:56] BBHoss: has joined #RubyOnRails
[06:19:34] Macaveli: has joined #RubyOnRails
[06:19:41] Maletor: has joined #RubyOnRails
[06:20:58] coin3d: has joined #RubyOnRails
[06:21:05] balr0g: has joined #RubyOnRails
[06:21:56] rushed: has joined #RubyOnRails
[06:22:17] towski_: has joined #RubyOnRails
[06:23:28] krz: has joined #RubyOnRails
[06:25:20] chancancode: has joined #RubyOnRails
[06:25:33] ndrei: has joined #RubyOnRails
[06:25:46] shwoodard: has joined #RubyOnRails
[06:26:00] michael_mbp: has joined #RubyOnRails
[06:26:27] Iacobus: has joined #RubyOnRails
[06:26:45] kumavis: has joined #RubyOnRails
[06:27:10] bmalum: has joined #RubyOnRails
[06:27:25] maZtah: has joined #RubyOnRails
[06:27:59] rubyonrailed: has joined #RubyOnRails
[06:28:44] Macaveli: has joined #RubyOnRails
[06:30:02] culturelabs: has joined #RubyOnRails
[06:30:21] Seanzie: has joined #RubyOnRails
[06:30:22] amitchellbullard: has joined #RubyOnRails
[06:30:26] bryancp: has joined #RubyOnRails
[06:32:08] philcrissman: has joined #RubyOnRails
[06:33:50] rakm: has joined #RubyOnRails
[06:34:00] ecksit: has joined #RubyOnRails
[06:34:19] johnkpaul: has joined #RubyOnRails
[06:34:39] tenderlove: has joined #RubyOnRails
[06:34:54] zrl: has joined #RubyOnRails
[06:35:33] beneggett: has joined #RubyOnRails
[06:35:49] nomadicoder: has joined #RubyOnRails
[06:36:04] egray: has joined #RubyOnRails
[06:37:38] jlpeters: has joined #RubyOnRails
[06:38:53] rubyonrailed: has joined #RubyOnRails
[06:39:01] hahuang61: has joined #RubyOnRails
[06:39:36] spastorino: has joined #RubyOnRails
[06:41:42] ChadyG: has joined #RubyOnRails
[06:42:28] Sylario: has joined #RubyOnRails
[06:44:53] dclo: has joined #RubyOnRails
[06:45:53] ndrei: has joined #RubyOnRails
[06:46:44] MiracleBlue: has joined #RubyOnRails
[06:48:33] bahar: has joined #RubyOnRails
[06:49:15] dotty: has joined #RubyOnRails
[06:49:19] GriffinHeart: has joined #RubyOnRails
[06:49:44] allenn: has joined #RubyOnRails
[06:50:48] ewilliam: has joined #RubyOnRails
[06:51:20] GriffinHeart: has joined #RubyOnRails
[06:52:45] sinkensabe: has joined #RubyOnRails
[06:52:50] scottmatheina: has joined #RubyOnRails
[06:54:29] shock_one: has joined #RubyOnRails
[06:56:07] roqo: has joined #RubyOnRails
[06:56:32] Varun_krishna: has joined #RubyOnRails
[06:57:36] arBmind: has joined #RubyOnRails
[06:58:57] Varun_krishna: Hi guys why am I missing here ? getting completed 406 Not acceptable error.
[06:59:07] Varun_krishna: https://gist.github.com/Varun-Krishna-P/07f5f76de2ca038b4f8f
[07:00:16] bmalum: has joined #RubyOnRails
[07:00:28] hahuang65: has joined #RubyOnRails
[07:01:02] DEA7TH_: has joined #RubyOnRails
[07:01:56] mello: has joined #RubyOnRails
[07:01:56] mello: has joined #RubyOnRails
[07:04:06] sevenseacat: my eyes, they burn
[07:04:15] EduardoBautista: has joined #RubyOnRails
[07:04:44] existensil: has joined #RubyOnRails
[07:05:19] kapowaz: has joined #RubyOnRails
[07:05:35] Trefex: has joined #RubyOnRails
[07:06:46] sonOfRa: has joined #RubyOnRails
[07:07:13] mheld: has joined #RubyOnRails
[07:09:32] SanguineAnomaly: has joined #RubyOnRails
[07:10:34] Anakat_: has joined #RubyOnRails
[07:10:41] tsujp: has joined #RubyOnRails
[07:11:23] hakunin: has joined #RubyOnRails
[07:11:39] mostlybadfly: has joined #RubyOnRails
[07:12:20] mhoungbo: has joined #RubyOnRails
[07:12:33] solars: has joined #RubyOnRails
[07:12:53] jlyndon: has joined #RubyOnRails
[07:13:20] poikon: has joined #RubyOnRails
[07:13:38] grandy: has joined #RubyOnRails
[07:13:56] corioliss: has joined #RubyOnRails
[07:13:58] blackmesa: has joined #RubyOnRails
[07:14:18] Varun_krishna: sevenseacat: What is wrong ?
[07:14:40] krz: has joined #RubyOnRails
[07:15:14] kara_sweets: has joined #RubyOnRails
[07:15:35] Rubie: has joined #RubyOnRails
[07:15:42] cardoni: has joined #RubyOnRails
[07:16:01] ProLoser: has joined #RubyOnRails
[07:16:15] DoubleMalt: has joined #RubyOnRails
[07:16:36] firevolt: has joined #RubyOnRails
[07:17:34] patie: has joined #RubyOnRails
[07:17:54] tenderlove: has joined #RubyOnRails
[07:18:13] universa1: Varun_Krishna: since it generates an error, yes.
[07:19:05] kwd: has joined #RubyOnRails
[07:19:51] universa1: you have no else block, if the update fails, but than most of your code could be reorganized...
[07:20:05] jas02: has joined #RubyOnRails
[07:20:05] Contigi: has joined #RubyOnRails
[07:20:22] universa1: your service notification posts do a non existing url.
[07:20:29] Macaveli: has joined #RubyOnRails
[07:20:48] Radar: what universa1 said
[07:20:54] Radar: it's probably failing because the model is invalid
[07:21:02] Radar: and what's the deal with the variable called @Model?
[07:22:08] waseem_: Radar: It represents a real world model of something I guess. ;)
[07:22:35] Radar: It's just not 100% perfect and so I'm twitching like mad over here can't you tell
[07:23:03] sevenseacat: Radar: settle down and watch some flula videos like I am.
[07:24:38] Varun_krishna: Radar: Yes that was a typo, but I have changed the code, in my original code it is same . But is my Faraday syntax is correct ?
[07:25:04] AckZ: has joined #RubyOnRails
[07:25:35] mjc_: has joined #RubyOnRails
[07:25:52] quazimodo: Radar: what do you think about npm's habit of putting a physical copy of the dependencies for each package into that packages directory
[07:26:00] rushed: Varun_Krishna: what are we, the least efficient test runner in the universe?
[07:26:20] Varun_krishna: Radar: What I am trying to do is that from the update action, if the user updates his model, I should be able to send push notifications to the mobile device. So I am making use of faraday to help me out.
[07:26:27] Varun_krishna: rushed: Can't get you .
[07:26:35] universa1: Varun_Krishna: just run your code in console
[07:26:45] universa1: you should wrap it in some "service" anyways...
[07:27:08] bahar: has joined #RubyOnRails
[07:27:11] lacrosse__: has joined #RubyOnRails
[07:27:12] rushed: Varun_Krishna: whatever you're using to send push notifications... there is probably a gem for it
[07:27:15] dhjondoh: has joined #RubyOnRails
[07:27:42] Varun_krishna: rushed: I thought by adding a faraday gem will work .Oklet me check it.
[07:28:46] Varun_krishna: universa1: Ok. But when the user updates the model, he should be send a push.
[07:28:52] universa1: Varun_Krishna: yes.
[07:29:04] universa1: Varun_Krishna: first make sure your push notification code works
[07:29:13] universa1: than hook it up to whenever a user updates a model...
[07:29:28] universa1: divide and conquer!
[07:29:46] universa1: one of the best strategies in programming...
[07:30:01] Ergo: has joined #RubyOnRails
[07:30:35] rushed: and a lot of other domains :)
[07:30:55] Varun_krishna: universa1: Yes curl command is working from git bash.
[07:31:05] rubyonrailed: has joined #RubyOnRails
[07:31:11] Varun_krishna: universa1: I think I need this https://github.com/adelevie/parse-ruby-client instead of faraday.
[07:31:19] Varun_krishna: rushed: thank you man :)
[07:31:23] artto: has joined #RubyOnRails
[07:31:40] universa1: if you think so, ..., tbh i've no opinion.
[07:32:18] Forgetful_Lion: has joined #RubyOnRails
[07:32:41] daxroc: has joined #RubyOnRails
[07:32:47] sandstrom: has joined #RubyOnRails
[07:33:55] Varun_krishna: universa1: I'll try and let you know dude.
[07:34:02] Varun_krishna: Thanks guys :)
[07:35:03] bmalum: has joined #RubyOnRails
[07:36:14] simmerz: has joined #RubyOnRails
[07:36:21] exadeci: has joined #RubyOnRails
[07:38:00] bronson: has joined #RubyOnRails
[07:38:12] Varun_krishna: has left #RubyOnRails: ()
[07:40:40] edwinvdgraaf: has joined #RubyOnRails
[07:41:31] Guest12375: has joined #RubyOnRails
[07:42:04] vedu: Hello. I have a admin page to display the status of a user. How can I update this page after an API call from the user?
[07:42:56] nso95: has joined #RubyOnRails
[07:44:34] Macaveli: Anyone have an API out that uses "Apply via LinkedIn Functionality"?
[07:44:54] Macaveli: I wanna be sure that the problem is with LinkedIn and not with my APP
[07:45:30] sevenseacat: it's likely with your app.
[07:45:37] jimbeaudoin: has joined #RubyOnRails
[07:45:38] dclo: has joined #RubyOnRails
[07:46:58] tvw: has joined #RubyOnRails
[07:47:31] dclo_: has joined #RubyOnRails
[07:48:41] universa1: vedu: reload the page?
[07:49:59] vedu: universa1: yes I can reload but how to know when to reload?
[07:50:43] vedu: Basically I need to update my page if some changes are made to the database. Only 2 options I see is ajax polling or web sockets
[07:50:45] jxf: has joined #RubyOnRails
[07:51:11] ur5us: has joined #RubyOnRails
[07:51:19] ur5us: has joined #RubyOnRails
[07:52:38] lxkm_: has joined #RubyOnRails
[07:53:05] rhizome: every single api call?
[07:54:04] rushed: vedu: you might check out faye
[07:54:15] bmalum: has joined #RubyOnRails
[07:55:06] rushed: vedu: (or pusher if you like their value proposition)
[07:55:10] charliesome: has joined #RubyOnRails
[07:55:16] Moonlight-Angel: has joined #RubyOnRails
[07:55:30] michael_mbp: has joined #RubyOnRails
[07:55:49] ghr: has joined #RubyOnRails
[07:57:32] RegulationD: has joined #RubyOnRails
[08:02:49] ndrei: has joined #RubyOnRails
[08:03:01] yoongkang: has joined #RubyOnRails
[08:03:12] epistrephein: has joined #RubyOnRails
[08:05:20] mikecmpbll: has joined #RubyOnRails
[08:05:25] stardiviner: has joined #RubyOnRails
[08:05:25] bruno-: has joined #RubyOnRails
[08:05:55] mrbubbles: has joined #RubyOnRails
[08:06:21] universa1: that's why i actually said reload the page: an admin doesn't really sit in front of the page and waits for an individual user to make an api call... ...doesn't sound like something i would actually do ;)
[08:07:04] BlissOfBeing: has joined #RubyOnRails
[08:07:26] scottmatheina: has joined #RubyOnRails
[08:09:01] jsrn_: has joined #RubyOnRails
[08:10:52] iamdevnul: has joined #RubyOnRails
[08:12:15] t-richards: has joined #RubyOnRails
[08:12:25] arta82: has joined #RubyOnRails
[08:12:26] skandi: has joined #RubyOnRails
[08:14:08] darutoko: has joined #RubyOnRails
[08:14:23] Lloyd: has joined #RubyOnRails
[08:14:39] Oxynum: has joined #RubyOnRails
[08:16:14] hahuang65: has joined #RubyOnRails
[08:16:17] IanVorn: has joined #RubyOnRails
[08:16:27] Coldblackice: has joined #RubyOnRails
[08:17:31] michael_mbp: has joined #RubyOnRails
[08:17:32] dideler: has joined #RubyOnRails
[08:17:40] mello: has joined #RubyOnRails
[08:18:17] krz: has joined #RubyOnRails
[08:20:38] moeabdol: has joined #RubyOnRails
[08:21:35] willharrison: has joined #RubyOnRails
[08:23:49] weckl: has joined #RubyOnRails
[08:23:54] livathinos: has joined #RubyOnRails
[08:24:03] karimb: has joined #RubyOnRails
[08:25:48] n008f4g_: has joined #RubyOnRails
[08:27:06] Oxynum: has joined #RubyOnRails
[08:31:03] karmatronic: has joined #RubyOnRails
[08:31:14] fgo: has joined #RubyOnRails
[08:31:36] rhizome: maybe it's not a real app
[08:32:37] GriffinHeart: has joined #RubyOnRails
[08:33:46] arup_r: has joined #RubyOnRails
[08:34:06] GriffinHeart: has joined #RubyOnRails
[08:34:21] bmalum: has joined #RubyOnRails
[08:34:36] arup_r: why my localization not working ? https://gist.github.com/aruprakshit/be0ba121e0dc81a98bad
[08:34:40] arup_r: working console
[08:34:47] arup_r: but not in view
[08:35:27] karmatronic: has joined #RubyOnRails
[08:35:54] ndrei: has joined #RubyOnRails
[08:36:45] universa1: arup_r: your other translations are working?
[08:37:00] arup_r: No.. this is the first one I wrote..
[08:37:22] universa1: arup_r: you don't have any other translations?
[08:37:39] arup_r: default one I have..
[08:37:53] arup_r: well let me relook
[08:37:55] universa1: arup_r: so? make sure your view is actually using pt-br and not en...
[08:37:58] _jesterfraud_: has left #RubyOnRails: ()
[08:38:43] haz111: has joined #RubyOnRails
[08:38:53] GriffinHeart: has joined #RubyOnRails
[08:38:57] bruno-: has joined #RubyOnRails
[08:39:01] srinidhi: has joined #RubyOnRails
[08:39:10] karimb: has joined #RubyOnRails
[08:39:39] arBmind: has joined #RubyOnRails
[08:40:57] Moonlight-Angel: has joined #RubyOnRails
[08:44:33] bin_005: has joined #RubyOnRails
[08:47:48] arBmind: has joined #RubyOnRails
[08:49:36] krz: has joined #RubyOnRails
[08:53:29] Moonlight-Angel: has joined #RubyOnRails
[08:54:52] tsujp: has joined #RubyOnRails
[08:59:02] DaniG2k: has joined #RubyOnRails
[09:00:19] simmerz: has joined #RubyOnRails
[09:01:13] bahar: has joined #RubyOnRails
[09:03:32] srinidhi: has joined #RubyOnRails
[09:03:43] srinidhi: has joined #RubyOnRails
[09:05:13] marr: has joined #RubyOnRails
[09:06:26] yfeldblum: has joined #RubyOnRails
[09:06:51] Moonlight-Angel: has joined #RubyOnRails
[09:08:10] Rubie: has joined #RubyOnRails
[09:10:37] PotatoChipz: has joined #RubyOnRails
[09:11:09] PotatoChipz: hi can someone help me figure out why im passing an argument but it becomes nil when it reaches the method
[09:11:11] PotatoChipz: http://pastie.org/private/bw34dwsoeaj9tiefagbya
[09:11:57] rvanlieshout: PotatoChipz: why would you assume it's nil?
[09:12:10] rvanlieshout: gist the real code and stacktrace when it's nil
[09:12:10] sevenseacat: and "codes codes codes" isnt a good way to debug the problem
[09:12:23] afrianska: has joined #RubyOnRails
[09:12:26] moeabdol: has joined #RubyOnRails
[09:12:34] sandstrom: has joined #RubyOnRails
[09:12:43] PotatoChipz: rvanlieshout I printed it in the console ...
[09:13:25] rvanlieshout: PotatoChipz: !debug
[09:13:25] helpa: PotatoChipz: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[09:15:54] DaniG2k: does anyone know of a VPS host that can beat this: http://vpsdime.com/
[09:15:54] blackmesa: has joined #RubyOnRails
[09:16:47] DaniG2k: 4 CPU, 6GB RAM, 30G SSD, 10Gbit connection for $7 per month
[09:16:59] sevenseacat: whats the catch?
[09:16:59] rvanlieshout: so how much iops would you really get?
[09:17:04] rushed: what could go wrong~
[09:17:16] dseitz: has joined #RubyOnRails
[09:17:22] yfeldblum: has joined #RubyOnRails
[09:17:23] DaniG2k: rvanlieshout: hello :D
[09:17:45] Juanchito: has joined #RubyOnRails
[09:17:54] DoubleMalt: has joined #RubyOnRails
[09:18:16] arup_r: has joined #RubyOnRails
[09:19:01] bmalum: has joined #RubyOnRails
[09:19:21] Hates__: has joined #RubyOnRails
[09:19:46] rvanlieshout: cpu is mostly really overselled
[09:19:47] krz: has joined #RubyOnRails
[09:19:51] rvanlieshout: and bad io performance
[09:19:54] rvanlieshout: or no backups
[09:20:16] Moonlight-Angel: has joined #RubyOnRails
[09:22:12] edwinvdgraaf: has joined #RubyOnRails
[09:23:07] Oxynum: has joined #RubyOnRails
[09:23:38] Crashtown: has joined #RubyOnRails
[09:23:54] krz: has joined #RubyOnRails
[09:26:00] arta82: has joined #RubyOnRails
[09:29:10] b0nn1e: has joined #RubyOnRails
[09:29:13] haz111: has joined #RubyOnRails
[09:31:51] yoongkang: has joined #RubyOnRails
[09:32:37] fgo: has joined #RubyOnRails
[09:34:58] broman: has joined #RubyOnRails
[09:35:41] mhoungbo: has joined #RubyOnRails
[09:35:43] broman: can anyone help me? trying to use rspec and getting error... i wrote "let (:encryptor) { mock("encryptor") }" and im getting the "undefined method `mock' for #<RSpec::ExampleGroups::PasswordEncryptor..."
[09:35:57] Moonlight-Angel: has joined #RubyOnRails
[09:36:02] sevenseacat: so where is mock defined?
[09:36:03] rvanlieshout: broman: why would the method mock exist?
[09:38:13] scottmatheina: has joined #RubyOnRails
[09:38:23] broman: rvanlieshout, im learning ruby through video classes... that's the example the author of the videos is using ... im just trying to reproduce it :)
[09:38:37] rvanlieshout: and he / she didn't include some gem that you might forgot?
[09:39:15] sevenseacat: or you're using the same versions of all of the gems that they are?
[09:39:43] broman: i think so
[09:39:50] broman: im looking at his gemfile...
[09:39:55] broman: i dont think there is a diference
[09:40:03] rvanlieshout: compare Gemfile.lock
[09:40:03] sevenseacat: look at the Gemfile.lock, not the Gemfile
[09:40:23] rvanlieshout: eheh.. right...
[09:40:40] rvanlieshout: at least it's the same next step to take :)
[09:40:41] broman: found this rspec-mocks
[09:40:48] broman: let me put that on gemfile
[09:41:10] simplyianm: has joined #RubyOnRails
[09:41:17] broman: still no deal
[09:41:20] sevenseacat: if you're using rspec-rails, you'll already have it
[09:41:26] sevenseacat: its the versions that matter :)
[09:42:39] broman: i think his rspec is older
[09:42:57] sevenseacat: because mock() is older syntax.
[09:43:18] broman: what can i do to replace it?
[09:43:29] broman: the new syntax?
[09:43:30] sevenseacat: you can specify that you want to use the same version
[09:43:38] sevenseacat: or you can update the syntax
[09:43:51] DaniG2k: rvanlieshout: why you gotta hate?!?! >_< hahah the VPS might be good, who knows :P
[09:44:04] sevenseacat: https://github.com/rspec/rspec-mocks
[09:44:09] sevenseacat: DaniG2k: for that price? it wont be.
[09:44:10] rvanlieshout: DaniG2k: i don't hate it
[09:44:14] rvanlieshout: live just doesn't come for free
[09:44:23] sevenseacat: it'll have to be oversold.
[09:44:31] DaniG2k: hrmmmrmrmmm
[09:44:36] sevenseacat: or it wont be making money.
[09:44:37] DaniG2k: digitalocean is cheap
[09:44:38] strcmp1: has joined #RubyOnRails
[09:44:40] DaniG2k: and very good
[09:44:42] sevenseacat: and its not making money.
[09:45:05] rvanlieshout: machines with high iops and much memory are expensive
[09:45:10] strcmp1: hey. how can i call ordinalize for a custom time format defined in a locale yaml file?
[09:45:13] rvanlieshout: and you'll have to divide that over the users
[09:45:27] broman: now im trying to discover the new syntax
[09:45:42] rvanlieshout: broman: you could also finish the tutorial first, using the same versions
[09:45:45] rvanlieshout: then upgrade it
[09:45:53] sevenseacat: likely a better idea.
[09:45:56] strcmp1: is there some way to indicate i want a part of the a date to be run through ordinalize, from yaml?
[09:46:04] sevenseacat: tutorials are always very specific about the versions of things to use.
[09:46:07] sevenseacat: good ones are, anyway.
[09:46:26] RegulationD: has joined #RubyOnRails
[09:46:59] rvanlieshout: broman: just copy his Gemfile and Gemfile.lock, run bundle and *go*
[09:47:34] broman: cant do that! already fixed a lot of things
[09:47:44] sevenseacat: ACTION shrugs
[09:48:09] broman: i will try to do that now but im pretty sure i will start to get other kinds of erros
[09:48:59] dclo: has joined #RubyOnRails
[09:49:10] duncanm: has joined #RubyOnRails
[09:49:57] broman: like i said... :)
[09:50:30] broman: on bundle install http://pastie.org/10231034#3
[09:50:31] bin_005: has joined #RubyOnRails
[09:50:32] starfox_sf: has joined #RubyOnRails
[09:50:49] rvanlieshout: what really old tutorial is this?
[09:50:53] sevenseacat: so... do what it says?
[09:50:55] commondream: has joined #RubyOnRails
[09:50:58] sevenseacat: its a good couple years old
[09:51:02] rvanlieshout: aren't we all using rubygems as a source for a while now?
[09:51:20] broman: i think update for the new syntax is the best approach
[09:51:39] rvanlieshout: broman: https://relishapp.com/rspec/docs/upgrade
[09:51:42] sevenseacat: rspec 2.11 was july 2012
[09:51:48] sevenseacat: so its a three year old tutorial
[09:51:55] sevenseacat: lemme guess, rails 3.2?
[09:52:12] sevenseacat: yeah get a newer tutorial.
[09:52:15] broman: i need to work with rails 3.2...
[09:52:26] broman: i just got hired for a company that the system is rails 3.2
[09:52:39] sevenseacat: then use the versions that the tutorial uses, because you wont be able to use all of the syntax you're updating to.
[09:52:41] broman: i need to learn THAT rails :(
[09:52:53] rvanlieshout: so update the source-entry of your gemfile
[09:52:59] broman: the reason is the legacy
[09:53:04] sevenseacat: and upgrade the app as your first priority because rails 3.2 is no longer supported.
[09:53:14] sevenseacat: neither is rspec 2.
[09:53:31] broman: rspec is just for the tutorial
[09:53:44] rvanlieshout: so just use that version from the tutorial
[09:53:49] broman: yes.. you guys are right...
[09:54:00] broman: i will try to talk to my boos about this today
[09:54:05] rvanlieshout: all those assumptions :)
[09:54:14] simmerz: has joined #RubyOnRails
[09:54:19] broman: but it they already built a lot of things, they will not migrate
[09:54:40] sevenseacat: then tell them when their sites get hacked, oops
[09:54:45] arBmind1: has joined #RubyOnRails
[09:54:46] sevenseacat: rails 3 has security holes.
[09:54:53] sevenseacat: upgrade ASAP.
[09:55:12] broman: can you refer me something that says that? like milw0rm or something?
[09:55:22] broman: so i can show them?
[09:55:58] strcmp1: i found the answer: i can use define template variables in yaml that are substituted at runtime, so: l datetime, :the_format, day: day.ordinalize.
[09:56:31] sevenseacat: http://rubyonrails.org/security/ is a good start
[09:56:44] DaniG2k: ewww nobody wants to use Rails 3
[09:56:53] sevenseacat: you'll get patches for severe security issues, and thats it.
[09:57:29] sevenseacat: and the definition of security issue is... looser than i would like.
[09:57:55] mary5030: has joined #RubyOnRails
[09:58:13] gaussblurinc1: has joined #RubyOnRails
[09:58:14] DaniG2k: I'm excited for Rails 5 :D
[09:58:27] gaussblurinc1: hi! does anybody use thin webserver?
[09:58:33] sevenseacat: i've heard nothing about rails 5 that makes me excited at all
[09:58:39] sevenseacat: just more stuff to rip out
[09:58:49] broman: so.. do you guys know some GOOD video tutorials??
[09:58:54] sevenseacat: for rails 3? no.
[09:59:04] DaniG2k: sevenseacat: using Ruby's garbage collection, for one
[09:59:07] broman: i will try to convince them today
[09:59:11] DaniG2k: for symbols
[09:59:19] DaniG2k: which will make it more performant
[09:59:26] sevenseacat: DaniG2k: you mean previously it was inhibiting Ruby's GC or something?
[09:59:46] DaniG2k: sevenseacat: no, but it will support later versions of Ruby which have far better GC
[09:59:56] sevenseacat: I already use the latest version of ruby
[10:00:53] DaniG2k: sevenseacat: "Rails will only support Ruby 2.2.1 and up. Since it wants to be able to leverage all the speed improvements in the newer ruby versions."
[10:01:18] DaniG2k: sevenseacat: no more using the rake command either :D
[10:01:22] DaniG2k: just rails everything
[10:02:25] DaniG2k: sevenseacat: still not excited?
[10:03:38] broman: sevenseacat, do you know some good video tutorial for rails 4?
[10:03:50] Moonlight-Angel: has joined #RubyOnRails
[10:04:32] Axilla: has joined #RubyOnRails
[10:04:58] hahuang65: has joined #RubyOnRails
[10:05:12] rodfersou: has joined #RubyOnRails
[10:05:18] gaussblurinc1: well, does anybody use thin webserver?
[10:05:22] rvanlieshout: Guest41146: !use
[10:05:22] helpa: Guest41146: Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
[10:06:29] hamster88: has joined #RubyOnRails
[10:06:30] mello: has joined #RubyOnRails
[10:06:39] hamster88: hello everyone :)
[10:06:40] sevenseacat: nope, not excited
[10:06:46] sevenseacat: anyway, time for me to go: adios
[10:07:36] gaussblurinc1: I want to deploy Rails 4.2 app on heroku with thin webserver, could anybody gives me example of appropriate config for thin?
[10:08:13] hamster88: I am getting this error when i go under posts/new >> undefined method `val' for #<Arel::Nodes::BindParam:0x007ff4994cc058>
[10:10:12] hamster88: gist at > https://gist.github.com/thedesignable/fb556d4f78fecbf38790
[10:10:35] broman: on the second thought, i think i will finish learning rails 3.2 to maintain the existing software and upgrade it easily... can anyone help me discovering what the new syntax should be for "let (:encryptor) { mock("encryptor") }"??
[10:11:07] Moonlight-Angel: has joined #RubyOnRails
[10:11:23] hamster88: broman, check out the upgrade doc
[10:12:43] broman: the problem is that i dont understand this very well yet
[10:13:13] wpp: has joined #RubyOnRails
[10:14:57] sandstrom: has joined #RubyOnRails
[10:16:57] hamster88: resolved my issue :D
[10:17:12] hamster88: broman, what are you trying exactly?
[10:18:42] broman: hamster88, like i said earlier, im taking this video classes (very old video classes)
[10:18:56] broman: trying to develop a forum following the instructions
[10:19:15] broman: hamster88, now i can't get through this
[10:19:48] broman: i just want this little thing to work so i can move on
[10:19:56] rvanlieshout: still that same issue?
[10:20:03] broman: the mock thing
[10:20:07] rvanlieshout: use his gemfile
[10:20:11] rvanlieshout: change the source-line of it
[10:20:27] rickmasta: has joined #RubyOnRails
[10:21:34] broman: i tried that! it breaks other things...
[10:22:06] broman: like he's using older versions of all kids of stuff.. i already fixed a few things to get this working so far...
[10:22:19] samuelsimoes: has joined #RubyOnRails
[10:22:39] rvanlieshout: then either spend time in reading about this new syntax rspec is using, or revert those fixes you've already made
[10:23:37] baron: has joined #RubyOnRails
[10:24:23] lxsameer: has joined #RubyOnRails
[10:24:38] Guest42207: has left #RubyOnRails: ()
[10:25:42] meoblast001: has joined #RubyOnRails
[10:26:33] DaniG2k: rvanlieshout: what VPS do you suggest?
[10:26:45] rvanlieshout: DaniG2k: it totally depends on your needs
[10:27:01] rvanlieshout: and if you don't know them yet, use a cheap one (which i assume you prefer)
[10:27:01] DaniG2k: rvanlieshout: i have a small DO droplet but the RAM is insufficient
[10:27:34] DaniG2k: could do, but at that point it would be more expensive than the adorementioned solution
[10:27:43] rvanlieshout: then use that one
[10:28:03] DaniG2k: *aforementioned
[10:28:08] DaniG2k: hate typos
[10:28:13] rvanlieshout: also, i'm not familair with those vps providers
[10:28:18] rvanlieshout: never used them
[10:29:44] rvanlieshout: but your needs should not only consist of an amount of ram and an amount of diskspace
[10:30:04] DaniG2k: i actally don't *need* another VPS
[10:30:18] DaniG2k: just want to toy around with load balancing my apps on multiple servers and perhaps add puppet to manage them
[10:30:28] DaniG2k: so I'll think about it
[10:30:34] DaniG2k: might give VPSdime a try
[10:34:27] haz111: has joined #RubyOnRails
[10:35:17] simmerz: has joined #RubyOnRails
[10:36:22] ndrei: has joined #RubyOnRails
[10:37:23] stamina: has joined #RubyOnRails
[10:37:50] jerematic: has joined #RubyOnRails
[10:39:17] Moonlight-Angel: has joined #RubyOnRails
[10:39:36] adre: has joined #RubyOnRails
[10:40:07] eriksays: has joined #RubyOnRails
[10:42:35] JamesBrink: has joined #RubyOnRails
[10:43:19] lxsameer: has joined #RubyOnRails
[10:48:46] Guest30625: has joined #RubyOnRails
[10:48:49] rushed: has joined #RubyOnRails
[10:49:49] dclo: has joined #RubyOnRails
[10:49:58] rodfersou: has joined #RubyOnRails
[10:51:20] mostlybadfly: has joined #RubyOnRails
[10:55:53] meoblast: has joined #RubyOnRails
[10:59:24] ndrei: has joined #RubyOnRails
[11:00:14] renews: has joined #RubyOnRails
[11:01:19] bar0n: has joined #RubyOnRails
[11:02:23] srinidhi: has joined #RubyOnRails
[11:05:19] afrianska: has joined #RubyOnRails
[11:05:52] rikkipitt: has joined #RubyOnRails
[11:06:30] rikkipitt: hey guys, is there a "global" way to do unscoped in the console? i.e. unscoped on everything including relation lookups etc
[11:08:31] Varun_krishna: has joined #RubyOnRails
[11:09:17] Varun_krishna: Hey guys I am getting Completed 406 error from update action of my controller https://gist.github.com/Varun-Krishna-P/f1c1b3737bc5615be8e9
[11:09:44] doodlehaus: has joined #RubyOnRails
[11:09:47] arup_r1: has joined #RubyOnRails
[11:10:47] broman: when i'm running rails c and messing with an object... i cant get it to update database.. how can i make this console show me the mysql errors?
[11:10:54] arup_r__: has joined #RubyOnRails
[11:11:04] rvanlieshout: broman: access object.errors
[11:11:08] rvanlieshout: or errors.to_a
[11:11:13] rvanlieshout: object.errors.to_a
[11:11:48] Varun_krishna: rvanlieshout: Why do I get 406 error ?
[11:11:59] rvanlieshout: because it's unacceptible
[11:12:10] broman: rvanlieshout, it doesnt work... NameError: undefined local variable or method `object' for main:Object
[11:12:14] rickmasta: has joined #RubyOnRails
[11:12:16] rvanlieshout: what if mode.update_attributes fail?
[11:12:24] rvanlieshout: broman: !gist your console output
[11:12:24] helpa: broman: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[11:12:32] rvanlieshout: where you initialize the object and try to update it
[11:12:42] Varun_krishna: rvanlieshout: But what is wrong with my update action ?
[11:12:54] rvanlieshout: no response when update fails
[11:13:13] Varun_krishna: rvanlieshout: Ok let me try else block.
[11:13:27] broman: rvanlieshout, https://gist.github.com/brenoman/283f04406ab89096bb77
[11:13:34] doodlehaus: has joined #RubyOnRails
[11:13:36] rvanlieshout: u.errors.to_a
[11:13:55] dalafa: has joined #RubyOnRails
[11:13:58] broman: thanks! :)
[11:14:03] kerunaru: has joined #RubyOnRails
[11:14:09] six: hm, if I'm using pluck() in a loop to pick IDs from a dataset and that loop also adds IDs to said set, I need to "refresh" the query, right? Otherwise I'll get cached data
[11:14:40] Varun_krishna: rvanlieshout: Even after adding else block it shows 406
[11:14:57] rvanlieshout: gist it again?
[11:16:25] startupality: has joined #RubyOnRails
[11:16:57] ndrei: has joined #RubyOnRails
[11:18:00] zorak8: has joined #RubyOnRails
[11:18:07] yoongkang: has joined #RubyOnRails
[11:18:37] Varun_krishna: rvanlieshout: https://gist.github.com/Varun-Krishna-P/f1c1b3737bc5615be8e9
[11:18:40] Varun_krishna: I got the error.
[11:19:20] Varun_krishna: I have an active record validation in my model, since I hadn't written the else block, I was not seeint that error, please check the above gist.
[11:21:04] Detch: has joined #RubyOnRails
[11:25:59] skiz: has joined #RubyOnRails
[11:26:19] scottmatheina: has joined #RubyOnRails
[11:28:40] universa1: Varun_Krishna: your gists smell like fake... your controller is actually named MyController?
[11:29:34] jgpawletko: has joined #RubyOnRails
[11:31:49] kt2: has joined #RubyOnRails
[11:32:02] Varun_krishna: universa1: No I just renamed the names.
[11:32:32] Varun_krishna: universa1: any problem ?
[11:32:57] Varun_krishna: universa1: Shouldn't I rename controller/instance_variable ?
[11:33:36] universa1: Varun_Krishna: you should gist actual code, with full stack trace, and also full code for the controller... ...probably some before filter...
[11:33:43] Ergo: has joined #RubyOnRails
[11:34:02] universa1: Varun_Krishna: also i'd try removing all logic from update and just do render text: "works"
[11:34:05] Macaveli: has joined #RubyOnRails
[11:34:12] yoongkang: has joined #RubyOnRails
[11:34:32] fgo: has joined #RubyOnRails
[11:34:37] Varun_krishna: universa1: Coming up with another gist.
[11:34:48] jcromartie: has joined #RubyOnRails
[11:35:10] cac_: has joined #RubyOnRails
[11:35:17] RegulationD: has joined #RubyOnRails
[11:36:47] lupine: ACTION tries to work out why the AR connection pool is handing out connections to his threads willy-nilly
[11:37:22] Trefex1: has joined #RubyOnRails
[11:37:33] seank_: has joined #RubyOnRails
[11:38:18] justintv90: has joined #RubyOnRails
[11:39:15] starfox_sf: has joined #RubyOnRails
[11:39:20] arup_r: has joined #RubyOnRails
[11:41:19] arup_r1: has joined #RubyOnRails
[11:43:19] strcmp1: has joined #RubyOnRails
[11:44:47] ndrei: has joined #RubyOnRails
[11:47:32] Macaveli: this is dumb all my links are not working -.-
[11:47:37] Macaveli: can't click on them ...
[11:47:57] sandstrom: has joined #RubyOnRails
[11:50:27] dclo: has joined #RubyOnRails
[11:51:04] darrencauthon: has joined #RubyOnRails
[11:52:27] IanVorn: has joined #RubyOnRails
[11:53:10] ekain: has joined #RubyOnRails
[11:53:17] strixd: has joined #RubyOnRails
[11:53:58] hahuang65: has joined #RubyOnRails
[11:55:17] mello: has joined #RubyOnRails
[11:56:11] strcmp1: has joined #RubyOnRails
[12:02:24] drale2k: has joined #RubyOnRails
[12:03:47] Macaveli: I think the pages are rendered again wrong
[12:03:53] a346: has joined #RubyOnRails
[12:03:55] rustymyers: has joined #RubyOnRails
[12:04:18] srinidhi: has joined #RubyOnRails
[12:04:46] Ergo: has joined #RubyOnRails
[12:05:03] gerep: has joined #RubyOnRails
[12:05:26] shortCircuit__: has joined #RubyOnRails
[12:05:31] Pazician: has joined #RubyOnRails
[12:05:48] shortCircuit__: anyone experienced with imagemagick ?
[12:06:10] rvanlieshout: it's abandoned
[12:06:43] rvanlieshout: (read: you've been here long enough to know the answer to that question...)
[12:07:22] Varun_krishna: universa1: Are you there ?
[12:07:23] Varun_krishna: https://gist.github.com/Varun-Krishna-P/05eacb067195aacd45ef
[12:07:37] mconnolly: has joined #RubyOnRails
[12:07:48] Varun_krishna: rvanlieshout: When I try to send a push notification I get this error SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
[12:07:50] rvanlieshout: Varun_Krishna: what part of that error message is unclear?
[12:08:04] Varun_krishna: some ssl_connect error .
[12:08:06] Shidash: Is there a way to load images and pdfs from local files outside the rails project (where the path is specified in a config file)? Have been trying asset_path(path/to/document), but that gets a routing error
[12:08:13] Shidash: that works with urls though
[12:08:16] rvanlieshout: Varun_Krishna: what url are you connecting to?
[12:08:24] rvanlieshout: Varun_Krishna: and most people have dropped SSLv3 support
[12:08:57] rvanlieshout: so does the service you're trying to connect to even provide SSL support with a valid certificate?
[12:09:06] Varun_krishna: rvanlieshout: but there is no url mentoned here http://refactorcast.com/rails/2015/04/27/ruby-on-rails-send-push-notifications-to-android-ios-using-parse.html
[12:09:23] Varun_krishna: rvanlieshout: Need to check it out.
[12:09:52] rvanlieshout: Varun_Krishna: and it uses some url
[12:10:27] rvanlieshout: Shidash: loading in where?
[12:10:29] Varun_krishna: rvanlieshout: But I don't see any url there
[12:10:52] k4nd4lf: has joined #RubyOnRails
[12:10:58] Shidash: rvanlieshout: display in an iframe
[12:11:13] rvanlieshout: Shidash: then only if your webserver has access to it
[12:11:23] rvanlieshout: Varun_Krishna: reed the stacktrace
[12:11:28] rvanlieshout: it's the faraday gem that's performing the request
[12:11:57] rvanlieshout: used by parse-ruby-client
[12:12:23] hardtail: has joined #RubyOnRails
[12:12:37] hardtail: Good morning all
[12:13:01] Shidash: rvanlieshout: It's on the machine. It's possible the server doesn't have access to it, though I've been able to access local json files outside the rails project dir before (that was rails runner not rails server though). And I can open it in a debugger with File.read. But how do I make sure the server has access to it in the right way?
[12:13:12] Varun_krishna: rvanlieshout: Yes but, the post url is something like this https://api.parse.com/1/push
[12:13:16] rvanlieshout: Shidash: if the webserver doesn't have access to it, it cannot serve it
[12:13:23] rvanlieshout: Varun_Krishna: and api.parse.com supports SSLv3?
[12:13:35] ebbflowgo: has joined #RubyOnRails
[12:13:49] Varun_krishna: rvanlieshout: how do I check that ?
[12:14:00] Shidash: rvanlieshout: I understand that. But how do I tell if it has access to it?
[12:14:01] Varun_krishna: onething I know for sure is that they have build it on rails
[12:14:13] rvanlieshout: their documentation. although the issue is about verifcation
[12:14:37] Varun_krishna: rvanlieshout: Ok I will try that
[12:14:56] rvanlieshout: can you even access https://api.parse.com using your browser?
[12:15:39] bmalum: has joined #RubyOnRails
[12:16:09] bahar: has joined #RubyOnRails
[12:16:30] ndrei: has joined #RubyOnRails
[12:17:02] moeabdol: has joined #RubyOnRails
[12:17:18] Varun_krishna: rvanlieshout: It says 404
[12:17:34] gaussblurinc1: has joined #RubyOnRails
[12:17:34] rvanlieshout: your browser did accept the certificate
[12:17:50] rushed: Varun_Krishna: what OS, and can other ruby tools access https? (perhaps you don't have openssl/your root certs configured properly)
[12:17:58] leex: has joined #RubyOnRails
[12:18:00] lapide_viridi: has joined #RubyOnRails
[12:18:16] mase-chatter: has joined #RubyOnRails
[12:18:16] surrealanalysis: has joined #RubyOnRails
[12:19:06] stephskardal: has joined #RubyOnRails
[12:19:16] strixd: has joined #RubyOnRails
[12:19:32] darrencauthon: has joined #RubyOnRails
[12:19:43] leex: Hi, how do I get record_id on both ends of a has_one/belongs_to relationship? on the belongs_to side it is there, so is there a way to also get it on the has_one side? (without creating an t.integer record_id and then setting it in a after_create callback)
[12:19:58] rvanlieshout: leex: you shouldn't
[12:20:13] Varun_krishna: rushed: I am on great Windows :P
[12:20:22] leex: rvanlieshout: can you elaborate on why?
[12:20:55] jamiely: has joined #RubyOnRails
[12:21:08] simplyianm: has joined #RubyOnRails
[12:21:13] leex: rvanlieshout: what I would like to do is this: a.pluck(b_id) instead of a.map{|x| x.id}
[12:21:14] erichu: has joined #RubyOnRails
[12:21:27] rvanlieshout: because you've got duplicates in your db
[12:21:34] rvanlieshout: a.joins(:b).pluck('b.id')
[12:23:05] rushed: Varun_Krishna: well that's probably the issue then, I would look at a vm, dual boot, or getting a mac, alternately you could take a look at your cert setup and confirm ruby ssl in general works there are probably some windows centric articles about it avaialble if you google windows + your ssl error
[12:24:20] Hates_: has joined #RubyOnRails
[12:24:58] leex: rvanlieshout: cool, works :) thank you
[12:25:08] Varun_krishna: rushed: Oh that sounds like a lot of configuration :)
[12:25:38] rvanlieshout: Varun_Krishna: that's the life when developing on windows
[12:25:39] rushed: Varun_Krishna: what does?
[12:26:31] ndrei: has joined #RubyOnRails
[12:27:13] shortCircuit__: I have been using this http://scottcheng.github.io/cropit/ to crop and zoom image, using this I can get the offset: x, y. the zoom level and the image dimesions, how can I use these to crop a zoomed image and resize it to the height of the default preview box dimensions ?
[12:28:43] Pazician: has joined #RubyOnRails
[12:30:01] jan1337z: has joined #RubyOnRails
[12:32:01] Varun_krishna: rvanlieshout: He heh eh :P
[12:32:23] Pazician: has joined #RubyOnRails
[12:32:58] cac_: has joined #RubyOnRails
[12:34:48] earthquake: has joined #RubyOnRails
[12:35:11] bahar: has joined #RubyOnRails
[12:35:32] strcmp1: has joined #RubyOnRails
[12:36:07] RegulationD: has joined #RubyOnRails
[12:36:32] toomus: has joined #RubyOnRails
[12:37:16] soahccc: I try to debug a rake task which sometimes doesn't end. It runs every 5 minutes and in a week I "collected" ~150 zombie rake tasks which just don't end. The task does some HTTParty calls and saves the information in the database. What could possibly go wrong? HTTP requests should timeout eventually I thought. The only thing is that I do multiple requests in parallel with threads. Don't a thread #join when it raises an exeception?
[12:37:24] toomus: Why if I make @some_model_instance.some_association.size make SELECT count(*) query?
[12:38:13] rushed: toomus: why not?
[12:38:56] lupine: it can be a bit surprising if you expect it to just select * , get a ruby array and then for .size to return the size of that ruby array
[12:39:06] toomus: isn't size should just return number of elements?
[12:39:10] lupine: toomus, @some_model_instance.some_association.to_a.size
[12:39:11] strcmp1: thank god it doesn't do that, lupine
[12:39:15] strcmp1: most inefficient thing ever
[12:39:20] lupine: strcmp1, well, that depends
[12:39:24] rushed: toomus: it does~
[12:39:30] strcmp1: lupine, on?
[12:39:41] lupine: sometimes you only want the size. sometimes the size is wanted in addition to the elements
[12:39:50] strcmp1: if you want that behavior call to_a, if you just want to count do it the standard way
[12:40:04] lupine: in the former, select count(*) is fine and better. in the latter, it's an unnecessary extra query that you need to know how to avoid
[12:40:16] lupine: hence surprising, and hence the question in the first place
[12:40:24] soahccc: lupine: it is always faster to do an additional count query
[12:40:44] futilegames: has joined #RubyOnRails
[12:41:05] strcmp1: .size/.count doesn't load into anything into memory in ruby land except an integer, if you just want to do a count it surely is more efficient.
[12:41:10] Valien: has joined #RubyOnRails
[12:41:12] soahccc: lupine: well maybe not if you have < 100 records but then the time is negligible anyway
[12:41:35] toomus: I thought .size is done in regular Ruby way
[12:41:37] lupine: soahccc, a database query can take an unbounded amount of time
[12:41:51] lupine: the database server could be 50ms away (although usually isn't, obviously)
[12:41:51] soahccc: then your DB sucks :D
[12:42:07] lupine: but I'd expect Array#size to be faster in general
[12:42:12] toomus: lupine: yes, and if you have tens of that queries...
[12:42:31] lupine: toomus, aye. just convert it to an array first, with .to_a, if you want to get rid of that query
[12:42:38] strcmp1: lupine, to get that array, you have to call the database, initialize AR models, etc, your argument doesn't make any sense
[12:42:42] rushed: toomus: well now you know for an ActiveRelation it's an alias for count :)
[12:42:46] toomus: lupine: THX :)
[12:42:47] Rubie: has joined #RubyOnRails
[12:42:56] lupine: strcmp1, in the case I'm discussing, you are using that data anyway
[12:43:07] lupine: I set out the two cases and selected the latter
[12:43:52] lupine: in the latter case (but not the former), the select count query is unneeded additional overhead
[12:44:03] rushed: lupine: benchmarks not guesses~
[12:44:30] lupine: it's a nice platitude. in this case, it's rather obvious
[12:44:49] lupine: if you want to convince yourself, feel free to generate your own benchmark, of course
[12:45:04] rushed: lupine: right, no need to measure teh obvious stuff :)
[12:45:29] symbol: has joined #RubyOnRails
[12:45:29] lupine: well, that can get you in trouble sometimes
[12:45:47] lupine: but Array#size vs. Connection#execute is a no-brainer
[12:46:22] soahccc: hmm I just noticed, there is a difference between #size and #count on AR::Relation
[12:46:35] lupine: ACTION perks ears
[12:47:11] Varun_krishna: has left #RubyOnRails: ()
[12:47:11] lupine: ah, count never caches, size does?
[12:47:18] soahccc: https://gist.github.com/2called-chaos/a12be851a857b0855197
[12:47:28] jcaho: has joined #RubyOnRails
[12:47:50] lupine: hah, and length too
[12:47:52] soahccc: if the relation has loaded size responds with the collection size instead of doing a count query
[12:47:54] lupine: at least nitems is gone
[12:48:04] pothibo: has joined #RubyOnRails
[12:48:24] lupine: mm. that's good. if it hasn't yet, you still end up with the extra query though
[12:48:56] soahccc: and additionally AR::Relation also smartly implements the other ruby methods like #any? or
[12:49:11] soahccc: enum methods like that
[12:49:24] lupine: say you do s = MyFixedSizeStore.new(x.things.size) ; x.things.map {|y| s.add(y) }
[12:49:50] lupine: s.things.to_a.size is better in that case
[12:50:13] soahccc: micro improvements if you ask me
[12:50:37] lupine: IME, AR is the number one cause of "omg my ruby is slow"
[12:50:50] lupine: ACTION glares in its general direction
[12:51:10] rvanlieshout: when it's used wrong
[12:51:20] dclo: has joined #RubyOnRails
[12:52:18] mwlang: has joined #RubyOnRails
[12:52:37] soahccc: AR also caches a lot... can be dangerous in rare cases but generally it does a very good job
[12:53:02] toomus: lupine: .to_a do the trick,
[12:53:04] rvanlieshout: and there is no magic in what it caches and when
[12:53:15] lupine: ACTION is getting 3-4 orders of magnitude speedups out of dropping AR from things 
[12:53:20] rvanlieshout: .to_a and then .size is mostly not the right way to go
[12:53:24] lupine: it's just so easy to use it wrong ^^
[12:53:32] soahccc: rvanlieshout: well I was surprised in one case
[12:54:03] toomus: rvanlieshout: so how to prevent count(*) query?
[12:54:19] soahccc: rvanlieshout: I know the code is horrible but this goes nuts without the uncached directive... https://gist.github.com/2called-chaos/b9ee32e817b08bf94237
[12:54:30] rushed: lupine: you're not getting four orders of magnitude by removing AR unless you're not doing the same work when you're done (ie removing n+1s, etc)
[12:54:38] rvanlieshout: toomus: to start with: why would you want to prevent it?
[12:54:50] lupine: rushed, yes, the queries that I end up with are completely different to the ones AR generates
[12:55:05] lupine: the naive use of AR is very different to the naive use of SQL
[12:55:06] commondream: has joined #RubyOnRails
[12:55:09] toomus: rvanlieshout: because this is query, and it takes some time to execute?
[12:55:16] mwlang: Do y???all store every version of an image you might need (with Carrierwave, for example) or do you store one or two sizes and let the browser figure out the rest with CSS? We???re looking at 54 million images ahead of a site redesign that is going to use different sizes altogether, so idea is perhaps to keep only the largest size and generate a 2nd size that will be most often displayed. anything else, let the browser resize as need
[12:55:19] rvanlieshout: and fetching all is faster toomus?
[12:55:22] tsvenson: has joined #RubyOnRails
[12:55:39] lupine: rvanlieshout, it's not a case of select * being faster than select count(*)
[12:55:41] rushed: lupine: great, well you can use your super awesome queries with AR so your story is about being good a SQL not AR being bad at perf :)
[12:55:42] lupine: it's case of needing to select * anyway
[12:55:43] toomus: rvanlieshout: I don't know :P
[12:55:48] cac_: has joined #RubyOnRails
[12:55:51] lupine: so the select count(*) is an additional unnecessary query
[12:55:56] rvanlieshout: toomus: are you using _all_ records from that collection afterwards?
[12:55:57] zorak8: has joined #RubyOnRails
[12:56:00] rvanlieshout: in the same request
[12:56:25] toomus: rvanlieshout: no
[12:56:27] lupine: rushed, I can't as it happens, due to AR's connection checkout stuff, but that's another matter again
[12:56:31] soahccc: rvanlieshout: their point is that if you need to fetch them anyway you should do it before you do additional count queries but yeah
[12:56:37] rvanlieshout: toomus: then a count is proper way to go
[12:56:46] rvanlieshout: soahccc: true, but that's not the case here
[12:56:49] rvanlieshout: and .length would do that
[12:56:52] _aeris_: has joined #RubyOnRails
[12:57:39] wecklness: has joined #RubyOnRails
[12:57:58] yfeldblum: has joined #RubyOnRails
[12:58:00] soahccc: rvanlieshout: oh you are right :o didn't expect #length to have another behaviour than #size :S
[12:58:19] jhass: ^ that'S annoying
[12:58:19] lupine: it's not too obvious, is it? :D
[12:58:21] soahccc: so TIL #length != #size != #count
[12:58:42] xenog: has joined #RubyOnRails
[12:58:56] lupine: ACTION is mostly getting grumpy about the active record pattern at-all, it's not really the ruby implementation thereof's fault
[12:59:39] raj___: has joined #RubyOnRails
[13:00:27] raj___: hi guys I have file in public folder... on click that file has to print.................. need something on this
[13:00:39] raj___: file has to print on printer
[13:00:43] Scripore: has joined #RubyOnRails
[13:01:07] soahccc: raj___: you mean ctrl/cmd+p ?
[13:01:22] griffindy: has joined #RubyOnRails
[13:01:40] soahccc: "click here to print" is so 90s
[13:01:47] raj___: like that but I am providing one link in my template............ on clicking that a file which is located in public-folder has to print in the printer
[13:02:16] soahccc: raj___: so your app triggers a print on your (not client) side?
[13:02:37] raj___: yes something like that
[13:03:33] soahccc: raj___: win and linux solution here http://stackoverflow.com/questions/1608593/printing-a-file-to-a-printer-in-ruby
[13:04:05] startupality: has joined #RubyOnRails
[13:04:07] toomus: I have something another. When I make @some_model_instance.some_association.includes(:some_other_association).size there is no count(*) query
[13:04:53] merryfett: has joined #RubyOnRails
[13:05:13] sevenseacat: has joined #RubyOnRails
[13:05:45] rvanlieshout: what do you want to count?
[13:05:54] soahccc: toomus: sure? https://gist.github.com/2called-chaos/aa47d27d0e2b999ba5ad
[13:06:16] rvanlieshout: OrderItem.joins(:user).where(users: { id: 2 }).count
[13:06:40] rvanlieshout: or .joins(order: :user)
[13:07:07] pedrosnk: has joined #RubyOnRails
[13:09:00] cornerma1: has joined #RubyOnRails
[13:09:04] GriffinHeart: has joined #RubyOnRails
[13:09:57] wildfield: has joined #RubyOnRails
[13:10:14] raj___: soahccc_ I have one file in public folder and one print link in template............................. on clicking that print click the file in public folder should print through printer
[13:10:40] Trefex: has joined #RubyOnRails
[13:11:19] wildfield: Hello. I have this path: "recommendations GET /recommendations(.:format) recommendations#index", how do I write redirect_to function to this path?
[13:11:35] rvanlieshout: recommendations_path
[13:11:41] codeurge: has joined #RubyOnRails
[13:12:04] wildfield: rvanlieshout: thanks, it worked
[13:12:30] toomus: rvanlieshout: sorry: http://pastie.org/private/foikdmifixnx9o9aqhbrzw
[13:12:36] lxsameer: has joined #RubyOnRails
[13:13:01] rvanlieshout: you want all members that have 2 chat_threads?
[13:13:11] n1x: has joined #RubyOnRails
[13:13:34] rvanlieshout: version 1 prefetches all, but that doesn't have to be faster
[13:13:53] cac_: has joined #RubyOnRails
[13:14:07] rvanlieshout: ChatMember.joins(:chat_threads).group_by('chat_members.*').having('count(chat_threads.id) = 2')
[13:14:33] toomus: rvanlieshout: No, I want all threads where current user is member
[13:15:06] toomus: rvanlieshout: I just need some other behavior if this is private chat (2 members only)
[13:15:27] rvanlieshout: you could use counter_cache for it
[13:16:10] toomus: rvanlieshout: Yeah, this is awesome idea! I forget about counter cache :P
[13:16:26] davidhq: has joined #RubyOnRails
[13:17:08] soahccc: raj___: if you want to print the document on your side there is no need for the file being in the public folder. If you want the client to print the document it's a different thing
[13:17:24] shortCircuit__: no one to help :'(
[13:17:57] Macaveli: I had to place "??dataLayer = [];" in the head it is possible that the variable is not accesible from the Js.coffee ?
[13:18:52] raj___: soahccc_ trying to do it through javascript........ as file placed in public can be access through url so tryint to print a url page :)
[13:18:55] fryguy: Macaveli: window.dataLayer
[13:19:12] Macaveli: i'll try that fryguy thanks
[13:19:14] bahar: has joined #RubyOnRails
[13:19:17] mary5030: has joined #RubyOnRails
[13:19:41] soahccc: raj___: so you want the client to print? What kind of document are we talking about?
[13:20:41] mary5030: has joined #RubyOnRails
[13:20:46] raj___: it's a pdf or it could be anything.
[13:21:11] krz: has joined #RubyOnRails
[13:21:12] raj___: user upload files of any format and our applicatin give one feature to print that file on printer
[13:22:22] Macaveli: fryguy still doesn't find
[13:23:03] fryguy: Macaveli: you'll need to show people some code to get further help
[13:23:20] Macaveli: I'll gist something hold on
[13:27:36] dopie: has joined #RubyOnRails
[13:27:58] nertzy: has joined #RubyOnRails
[13:27:58] errakeshpd: has joined #RubyOnRails
[13:28:04] starfox_sf: has joined #RubyOnRails
[13:28:05] soahccc: raj___: well if you want the client to print the client must be able to "understand" the format or you need to transcode it (to PDF for example and even then windows users (<8) might have problems)
[13:28:11] jan1337z: Anyone issues using paperclip for multi-file-upload and having issues on the validation? When I upload a file that gets rejected by the validation the form just ignores the file and acts as if nothing went wrong - but the photo is not uploaded
[13:28:19] a346: has joined #RubyOnRails
[13:28:29] startupality_: has joined #RubyOnRails
[13:30:37] Macaveli: fryguy https://gist.github.com/YOUConsulting/b82d30fc9d7fb121e85a if I put the alert after window push. this popup that is behind the Link_to works
[13:30:47] Macaveli: without the alert the popup (fancybox) does not open
[13:31:07] soahccc: raj___: and again (for PDFs) you should let the user decide whether he wants to print, save or do whatever with the file. In case of web pages you can provide a print stylesheet and if you really want also a print button. With external files you have no control over this (and this is good imho)
[13:32:11] sardev: has joined #RubyOnRails
[13:32:31] doodlehaus: has joined #RubyOnRails
[13:32:37] thelastinuit: has joined #RubyOnRails
[13:33:25] Macaveli: It seems to work if I put a return instead of an Alert, I don't have a clue why I need to do that ....
[13:34:03] thatkid: has joined #RubyOnRails
[13:34:05] thiagovsk: has joined #RubyOnRails
[13:34:53] thatkid: Hello, I want to delete the values in the particular column in a table, can I do that from rails console
[13:35:42] raj___: soahccc_ thanks alot for the reply :)
[13:35:50] raj___: really appreciate it
[13:36:04] ndrei: has joined #RubyOnRails
[13:37:04] soahccc: Macaveli: are your event callbacks defined in a onDOMready function? ($() with jquery)
[13:37:29] soahccc: thatkid: there is SomeModel.update_all(column: nil)
[13:37:42] Macaveli: soahccc no clue someone just asked me to implement this code for Google Data Layer =0
[13:38:03] soahccc: Macaveli: https://learn.jquery.com/using-jquery-core/document-ready/
[13:38:11] Seanzie: has joined #RubyOnRails
[13:39:41] bratsche: has joined #RubyOnRails
[13:40:28] benhuda: has joined #RubyOnRails
[13:41:00] mello: has joined #RubyOnRails
[13:42:19] IanVorn: has joined #RubyOnRails
[13:42:26] hahuang65: has joined #RubyOnRails
[13:45:17] jkamenik: has joined #RubyOnRails
[13:48:24] ndrei: has joined #RubyOnRails
[13:48:47] bahar: has joined #RubyOnRails
[13:50:44] maZtah: does anyone here knows when sandi metz' new rails books will be published?
[13:50:48] fgo: has joined #RubyOnRails
[13:50:54] sevenseacat: she has new rails books?
[13:51:18] maZtah: rails book*
[13:51:22] maZtah: mi scuzi!
[13:51:48] maZtah: this one: http://practicalrailsbook.com/
[13:52:05] dclo: has joined #RubyOnRails
[13:53:30] DoubleMalt: has joined #RubyOnRails
[13:53:51] sevenseacat: ACTION signs up for more info
[13:54:57] bmalum: has joined #RubyOnRails
[13:56:14] umgrosscol: has joined #RubyOnRails
[13:56:27] sarink: has joined #RubyOnRails
[13:57:26] fwaokda: has joined #RubyOnRails
[14:03:27] haz111: has joined #RubyOnRails
[14:03:28] Anakat: has joined #RubyOnRails
[14:03:56] ruv: has joined #RubyOnRails
[14:03:59] thelastinuit: has joined #RubyOnRails
[14:06:04] bmalum: has joined #RubyOnRails
[14:08:25] givanse: has joined #RubyOnRails
[14:09:40] Senjai`work: has joined #RubyOnRails
[14:10:04] darrencauthon: has joined #RubyOnRails
[14:11:19] iamjarvo: has joined #RubyOnRails
[14:11:41] Senjai`work: has joined #RubyOnRails
[14:11:50] bahar: has joined #RubyOnRails
[14:13:03] bmalum: has joined #RubyOnRails
[14:13:50] gaussblurinc1: has joined #RubyOnRails
[14:19:57] mosez: knows somebody a way to require_tree assets accross multiple gems?
[14:20:52] RegulationD: has joined #RubyOnRails
[14:21:08] jwaldrip: has joined #RubyOnRails
[14:22:18] asheinfeld: has joined #RubyOnRails
[14:23:00] tenderlove: has joined #RubyOnRails
[14:23:59] cmisenas: has joined #RubyOnRails
[14:24:23] tubbo: has joined #RubyOnRails
[14:25:09] blackmesa: has joined #RubyOnRails
[14:25:34] gerep: The rails ParameterSanitizer is a model or controller?
[14:25:51] commondream: has joined #RubyOnRails
[14:26:52] roolo_: has joined #RubyOnRails
[14:28:44] gerep: As in here? https://github.com/plataformatec/devise/blob/master/lib/devise/parameter_sanitizer.rb
[14:28:58] kies: has joined #RubyOnRails
[14:29:04] maZtah: sevenseacat: did you get any information?
[14:29:34] beneggett: has joined #RubyOnRails
[14:29:56] alex88: has joined #RubyOnRails
[14:29:58] tubbo: gerep: it's just a plain old ruby object (PORO)
[14:30:31] shinnya: has joined #RubyOnRails
[14:30:31] tvw: has joined #RubyOnRails
[14:31:12] gerep: tubbo I'm using Devise and I have to extend that, I'm not sure where I should create it
[14:32:12] gerep: tubbo as explained here: https://gist.github.com/gerep/e52455424aae45f75654
[14:32:28] gerep: tubbo it is not clear to me where should I create this class User::ParameterSanitizer
[14:32:56] gerep: tubbo Looks like a controller :)
[14:33:09] tubbo: gerep: ParameterSanitizer is not a controller, like i said, it's just a class.
[14:33:16] tubbo: gerep: but why do you need to do this?
[14:33:39] gerep: tubbo I need to extend this class and add Model specific params
[14:33:45] gerep: tubbo I have two different models
[14:33:52] tubbo: i know that
[14:34:06] tubbo: ahh never mind i see
[14:34:37] tubbo: gerep: anyway, i feel like if i were you, i'd put my extensions in app/models/user
[14:34:43] tubbo: so app/models/user/parameter_sanitizer.rb
[14:34:52] tubbo: that's typically what i do when i want to namespace underneath a User model
[14:35:06] gerep: tubbo thanks a lot, I'll do that =)
[14:35:11] Fire-Dragon-DoL: has joined #RubyOnRails
[14:35:14] jonahR: has joined #RubyOnRails
[14:36:08] tubbo: gerep: it would be easy for you because you can define devise_parameter_sanitizer as "#{resource_class}::ParameterSanitizer".constantize.new resource_class, params
[14:36:15] rubyonrailed: has joined #RubyOnRails
[14:36:25] ndrei: has joined #RubyOnRails
[14:36:29] DigitallyBorn: has joined #RubyOnRails
[14:36:34] tubbo: or whatever... sanitizer_class.new(resource_class, resource_class.to_sym, params)
[14:37:16] gerep: tubbo wow! That's amazing...
[14:37:25] gerep: tubbo will be better to work this way
[14:37:32] gerep: tubbo thanks again!!!
[14:37:45] tubbo: gerep: remember, with great power comes great responsibility. use your sword wisely.
[14:37:51] tubbo: you might cut yourself (or someone else)
[14:38:02] gerep: tubbo =) I will use it wisely
[14:38:33] intinig: has joined #RubyOnRails
[14:41:23] n1x: has joined #RubyOnRails
[14:42:58] Polysics: has joined #RubyOnRails
[14:43:10] Polysics: hello! I hope there are some Devise experts around today :)
[14:43:23] Polysics: I am trying to get an extra parameter into a Spree registration form
[14:43:37] Polysics: using Devise, and no matter what I do, the parameter is always unpermitted
[14:43:50] Polysics: is it because Spree actually uses a different class than plain User?
[14:46:36] disgrntld: has joined #RubyOnRails
[14:47:44] ogpastaling: has joined #RubyOnRails
[14:48:39] Pazician: has joined #RubyOnRails
[14:50:21] ebbflowgo: has joined #RubyOnRails
[14:52:31] tubbo: polysics: i used Devise and Spree, and I just `include SpreeUserExtensions` in my User class (that I generated with Devise) and built my own forms.
[14:52:32] strcmp1: has joined #RubyOnRails
[14:52:47] dclo: has joined #RubyOnRails
[14:52:51] Polysics: that might be an easier way to do complex stuff
[14:52:53] tubbo: polysics: did you `rails g devise:views` to generate the forms, and override the strong_params?
[14:53:16] Polysics: in the end I found out that you have to push stuff onto Spree::PermittedAttributes.user_attributes
[14:53:21] tubbo: polysics: i *think* Spree ships with a Spree::User class or something, but you'd have more control over an auth system you've built/installed.
[14:53:27] Polysics: it's very counter-intuitive and not at all how Spree works but w/e
[14:53:40] Polysics: sorry, s/Spree/Rails/
[14:53:44] tubbo: i think Spree intends you to use your own User class if you're gonna do stuff like that.
[14:54:25] bahar: has joined #RubyOnRails
[14:55:55] pothibo: has joined #RubyOnRails
[14:55:57] ebbflowgo: has joined #RubyOnRails
[14:57:33] Papierkorb: has joined #RubyOnRails
[14:58:03] joaomdmoura: has joined #RubyOnRails
[15:00:36] nertzy: has joined #RubyOnRails
[15:00:54] lindii_: has joined #RubyOnRails
[15:01:35] chipotle: has joined #RubyOnRails
[15:01:47] Oxynum: has joined #RubyOnRails
[15:03:00] treehug88: has joined #RubyOnRails
[15:03:55] annlewis: has joined #RubyOnRails
[15:04:06] rustymyers: has joined #RubyOnRails
[15:05:44] commondream: has joined #RubyOnRails
[15:06:02] Jinkins: has joined #RubyOnRails
[15:07:02] Rubie: has joined #RubyOnRails
[15:07:52] bahar: has joined #RubyOnRails
[15:09:02] startupality: has joined #RubyOnRails
[15:09:34] cdnsteve: has joined #RubyOnRails
[15:10:42] cdnsteve: has left #RubyOnRails: ()
[15:11:15] meekohi: has joined #RubyOnRails
[15:11:23] sandstrom: has joined #RubyOnRails
[15:11:26] nixter1029: has joined #RubyOnRails
[15:12:13] disperso: has joined #RubyOnRails
[15:12:27] asheinfeld: has joined #RubyOnRails
[15:14:11] Cache_Money: has joined #RubyOnRails
[15:15:00] baron: has joined #RubyOnRails
[15:16:51] starfox_sf: has joined #RubyOnRails
[15:17:07] beneggett: has joined #RubyOnRails
[15:17:45] iamjarvo: has joined #RubyOnRails
[15:17:58] benhuda: has joined #RubyOnRails
[15:18:28] Spami: has joined #RubyOnRails
[15:18:44] Spami: has joined #RubyOnRails
[15:19:03] kies: has joined #RubyOnRails
[15:19:18] mase-chatter: has joined #RubyOnRails
[15:20:34] hamster88: has joined #RubyOnRails
[15:20:53] hamster88: Good evening every1
[15:20:55] xenog: has left #RubyOnRails: ()
[15:21:19] hamster88: I have a question
[15:21:26] hamster88: I am getting this error : undefined local variable or method `comment' for #<CommentsController:0x007f353b184ee0>
[15:22:32] tubbo: hamster88: i think you might have a problem with the comment method
[15:22:43] tubbo: i would check CommentsController to see if its defined
[15:27:21] beneggett: has joined #RubyOnRails
[15:28:02] hamster88: has joined #RubyOnRails
[15:28:13] asheinfeld: has joined #RubyOnRails
[15:29:57] mello: has joined #RubyOnRails
[15:30:21] tobobo: has joined #RubyOnRails
[15:30:37] fgo: has joined #RubyOnRails
[15:32:00] [H]unt3r: has joined #RubyOnRails
[15:34:19] pothibo: has joined #RubyOnRails
[15:35:17] snockerton: has joined #RubyOnRails
[15:35:34] sonofdirt: has joined #RubyOnRails
[15:35:54] tubbo: has joined #RubyOnRails
[15:37:24] bahar: has joined #RubyOnRails
[15:38:14] asheinfeld: has joined #RubyOnRails
[15:38:46] Fingel: has joined #RubyOnRails
[15:40:38] Fingel: has left #RubyOnRails: ()
[15:40:40] gerep: has joined #RubyOnRails
[15:40:51] asheinfeld: has joined #RubyOnRails
[15:41:33] yoongkang: has joined #RubyOnRails
[15:42:13] speakingcode: has joined #RubyOnRails
[15:42:30] gerep_: has joined #RubyOnRails
[15:43:42] Lightsword: has joined #RubyOnRails
[15:44:33] sandstrom: has joined #RubyOnRails
[15:44:35] dclo: has joined #RubyOnRails
[15:44:37] drale2k: has joined #RubyOnRails
[15:44:41] moretti: has joined #RubyOnRails
[15:47:18] Scripore: has joined #RubyOnRails
[15:48:56] hamster88: has joined #RubyOnRails
[15:50:04] beneggett: has joined #RubyOnRails
[15:50:06] nixmaniack: has joined #RubyOnRails
[15:52:48] speaking1ode: has joined #RubyOnRails
[15:53:38] fortunate: has joined #RubyOnRails
[15:53:43] baweaver: has joined #RubyOnRails
[15:56:06] tjbiddle: has joined #RubyOnRails
[15:56:24] Zadrel: has joined #RubyOnRails
[15:57:26] ruv: hey, updating a record with nested attributes, would I need to do a get first to get the records id?
[15:59:36] starfox_sf: has joined #RubyOnRails
[16:00:33] chrishough: has joined #RubyOnRails
[16:00:42] bronson: has joined #RubyOnRails
[16:01:00] cmisenas: has joined #RubyOnRails
[16:01:07] balr0g: has joined #RubyOnRails
[16:01:50] towski_: has joined #RubyOnRails
[16:02:40] Senjai: If no id is present in nested attrs, its considered a new record
[16:03:16] ruv: Senjai, thanks
[16:03:20] jkamenik1: has joined #RubyOnRails
[16:03:55] Limix: has joined #RubyOnRails
[16:05:19] ruv: Senjai, hmm so it is not smart enough to see that the row already exists? I am seeing it do a select, update, insert..
[16:05:38] ndrei: has joined #RubyOnRails
[16:06:14] Senjai: ruv: Lets think it through. If I wanted that behavior, how would I impliment it?
[16:06:20] Senjai: Can I ever have duplicate records?
[16:06:43] Senjai: So how can I tell which record I'm supposed to update without the id
[16:07:36] ruv: i mean after passing the id
[16:08:02] ruv: ok, n/m
[16:08:07] Senjai: It does a select to get the most recent version before upating it
[16:08:10] Senjai: updating*
[16:08:54] ruv: I have a has_many relationship
[16:09:04] ruv: that is why it keeps inserting
[16:09:50] jstanton: has joined #RubyOnRails
[16:10:22] arooni-mobile: has joined #RubyOnRails
[16:10:32] ogpastaling: has joined #RubyOnRails
[16:11:11] DigitallyBorn: has joined #RubyOnRails
[16:11:49] hakunin: has joined #RubyOnRails
[16:12:03] kies: has joined #RubyOnRails
[16:12:15] commondream: has joined #RubyOnRails
[16:12:34] machty: has joined #RubyOnRails
[16:12:47] treehug88: how would I write a mixin/module to add default_scope { order( 'id asc' ) } to a number of ActiveRecord models? Currently I'm just putting that line in each model, but a coworker asked me to factor it up. Newbie question, I know
[16:13:00] Scripore: has joined #RubyOnRails
[16:13:21] machty: treehug88: use a Concern http://api.rubyonrails.org/classes/ActiveSupport/Concern.html
[16:14:11] tjbiddle: has joined #RubyOnRails
[16:14:14] treehug88: thanks machty , I'll give that a shot
[16:14:58] jonahR: has joined #RubyOnRails
[16:15:34] nahtnam: has joined #RubyOnRails
[16:16:31] machty: is there a good ActiveModel pattern for recursively rebuilding an ActiveModel (and child activemodels) from JSON, without having to implement self.load and self.dump on each child ActiveModel?
[16:16:36] nahtnam: So I have a list of servers and every minute I want to reping each server, grab some info, and store it in the database. Im not sure if I should make a rake task and a cron job or use sidekiq
[16:16:53] annlewis: has joined #RubyOnRails
[16:17:15] machty: nahtnam: i've had good experiences with the sidekiq-scheduler gem
[16:18:02] machty: you'll probably wanna disable retries though
[16:18:07] machty: since it runs every minute anyway
[16:18:10] nahtnam: machty: Thanks. Doesnt it just make a cron job?
[16:18:33] ProLoser: has joined #RubyOnRails
[16:18:37] machty: you can use cron syntax i think but it's not actually linux cron
[16:18:51] nahtnam: machty: Kk. And you are rerfrerring to this right? https://github.com/Moove-it/sidekiq-scheduler
[16:20:05] nahtnam: machty: So I would create a sidekiq job that does the server pinging and then use sidekiq scheduler to make it happen every minute?
[16:20:16] ProLoser: has joined #RubyOnRails
[16:20:36] nahtnam: machty: Kk. Ty!
[16:21:03] alexfu: has joined #RubyOnRails
[16:21:29] treehug88: machty: like this? http://pastie.org/10231646
[16:21:51] machty: treehug88: seems right, that link had an example of pretty much what you're trying to do
[16:22:21] treehug88: machty: that yields: in `base_class': ActiveRecord::Base doesn't belong in a hierarchy descending from ActiveRecord (ActiveRecord::ActiveRecordError)
[16:23:20] tjbiddle: has joined #RubyOnRails
[16:23:31] zoo-zed: has joined #RubyOnRails
[16:23:41] machty: oh you're trying to apply to all of active record, hmm, not sure if there are limitations around that. but at the very least you could replace all your default_scopes with an included module
[16:23:55] artto: has joined #RubyOnRails
[16:24:22] treehug88: yeah and I don't think that applying it to all of active_record will work, we have objects that don't have id fields
[16:24:31] zoo-zed: has joined #RubyOnRails
[16:24:50] treehug88: plus replacing default_scope { order( 'id asc' ) } with include something doesn't seem like a big win
[16:25:38] hamster88: I am trying to get username in my post and comment section but i have no idea why they are not showing up :/
[16:25:47] stephskardal: has left #RubyOnRails: ()
[16:27:03] hamster88: here goes the gist > https://gist.github.com/thedesignable/9233ac23c246f5cf31d2
[16:28:08] bricker: has joined #RubyOnRails
[16:28:28] AzaToth: has joined #RubyOnRails
[16:28:33] jonahR: has joined #RubyOnRails
[16:28:47] alexfu: I want to rewrite the default DELETE url from `DELETE /api/appointment/:id` to `DELETE /api/user/:user_id/appointment` -- i keep getting a trailing `:id` in the resulting URI pattern. how do I get rid of the trailing `:id`
[16:28:54] hamster88: can anyone please point me to right direction :/
[16:29:40] simplyianm: has joined #RubyOnRails
[16:29:43] ogpastaling: has joined #RubyOnRails
[16:29:43] rodferso1: has joined #RubyOnRails
[16:30:00] beneggett: has joined #RubyOnRails
[16:30:27] commondream: has joined #RubyOnRails
[16:30:47] gerep_: has left #RubyOnRails: ()
[16:30:52] gerep_: has joined #RubyOnRails
[16:32:22] gerep: has joined #RubyOnRails
[16:32:51] gerep: When I'm using nested attributes on a Devise model, does it save the nested attributes automatically? I can't make it work
[16:32:57] Pazician: has joined #RubyOnRails
[16:34:53] ciree: gerep: example?
[16:35:09] ciree: do you mean like user.other_model.attrib = "stuff"?
[16:36:03] gerep: ciree, sorry for that :) https://gist.github.com/gerep/5184f01e3c0cec9343ca
[16:36:13] pixelhandler: has joined #RubyOnRails
[16:36:18] gerep: ciree, this is the controller create method
[16:36:33] centrx: has joined #RubyOnRails
[16:36:44] gerep: you see it is building the resource but after creating it I can't see any of the nested attributes
[16:36:58] gerep: wait a second, I'll update the Gist with the model too
[16:37:20] moretti: has joined #RubyOnRails
[16:37:46] ogpastaling: has joined #RubyOnRails
[16:38:11] gerep: ciree, https://gist.github.com/gerep/5184f01e3c0cec9343ca
[16:38:32] moretti: has left #RubyOnRails: ()
[16:38:49] ciree: whats your form look like
[16:39:51] gerep: ciree, https://gist.github.com/gerep/5184f01e3c0cec9343ca
[16:40:27] ldnunes: has joined #RubyOnRails
[16:41:19] gerep: ciree, the field :category is actually a partial, that's why you can see a |builder| but I have added they in the same file for simplicity, if that's not a problem =)
[16:42:12] codezomb: has joined #RubyOnRails
[16:43:13] gerep: ciree, In the sign_up path the form is displayed correctly with all fields and nested fields, when I submit it to test the validations, I get validation errors for the "merchant" fields but the "affiliation_address" fields are gone
[16:43:44] gerep: The nested fields doesn't even appear in the form
[16:44:04] intinig: has joined #RubyOnRails
[16:44:31] aaronds: has joined #RubyOnRails
[16:44:53] gerep: The create method should return an instance of the affiliation_address but I don't know how to do this, can I @merchant.affiliation_addresses.build? It sounds weird
[16:45:26] dclo: has joined #RubyOnRails
[16:45:35] mello: has joined #RubyOnRails
[16:47:29] ciree: shouldnt need to
[16:47:40] ciree: take a look at the docs again, make sure all your names are proper
[16:48:10] gerep: ciree I will, thanks!
[16:48:20] Scripore: has joined #RubyOnRails
[16:48:46] ciree: I dont think you need to loop in that form there
[16:49:07] ciree: http://api.rubyonrails.org/classes/ActiveRecord/NestedAttributes/ClassMethods.html
[16:49:40] aaronds: Hi. If I have a model users and I want to have a 'signup' page, I create the route "get 'signup' => 'users#new'" and intend for the form to use "post 'signup' => 'users#create'" (makes sense, right?). However, I've found that by default using form_for, I'll get an error that the route for 'users' cannot be found. How can I ensure the form uses the desired post route thus mitigating this error? Cheers
[16:50:13] shock_one: has joined #RubyOnRails
[16:50:44] ciree: aaronds: look up as:
[16:51:13] ciree: wait, that was probably bad advice
[16:51:15] ciree: i can't help
[16:51:46] djbkd: has joined #RubyOnRails
[16:51:54] aaronds: haha thanks anyway ciree
[16:52:36] alexfu: has joined #RubyOnRails
[16:52:50] ciree: you have something like this?
[16:52:53] ciree: <%= form_for @post do |f| %>
[16:52:58] ciree: with @user instead?
[16:53:22] Deor: has joined #RubyOnRails
[16:54:20] Filete: has joined #RubyOnRails
[16:55:01] ciree: url: post_path(@user)
[16:55:08] alexfu: i have a nested DELETE resource in my routes. but the URI pattern ends up having a trailing `:id` at the end. so it looks like `/api/parent/:parent_id/child/:id` instead of `/api/parent/:parent_id/child`
[16:55:14] ciree: http://apidock.com/rails/ActionView/Helpers/FormHelper/form_for
[16:55:23] Spami: has joined #RubyOnRails
[16:55:29] alexfu: how can I get rid of the trailing :id
[16:55:39] ciree: alexfu: do you want to delete all children?
[16:56:03] jcaho: has joined #RubyOnRails
[16:56:04] alexfu: ciree: in my case, there's a 1:1 relationship
[16:56:05] Dreamer3: has joined #RubyOnRails
[16:56:19] aaronds: ciree: cant find method post_path
[16:56:28] ciree: user_path
[16:56:41] alexfu: ciree: a parent can only have a single child in my scenario
[16:56:53] ciree: alexfu, not sure exactly how to do it, but explicitly state the url
[16:57:00] ciree: that way you can omit the id
[16:57:43] The_Phoenix: has joined #RubyOnRails
[16:57:46] tvw: has joined #RubyOnRails
[16:58:55] The_Phoenix: has joined #RubyOnRails
[16:58:58] alexfu: ciree: how is that done in routes?
[16:59:23] ciree: http://guides.rubyonrails.org/routing.html
[16:59:30] Crashtown: has left #RubyOnRails: ()
[16:59:35] The_Phoenix: has joined #RubyOnRails
[16:59:39] Crashtown: has joined #RubyOnRails
[16:59:57] AdrianChingHC: has joined #RubyOnRails
[17:00:06] ciree: get ':controller(/:action(/:id))'
[17:00:17] aaronds: ciree: user_path just yields the default
[17:00:18] x1337807x: has joined #RubyOnRails
[17:00:42] IanVorn: has joined #RubyOnRails
[17:01:38] ciree: aaronds: <%= form_for @person, url: { action: "create" },
[17:01:42] ciree: and sub in your values
[17:02:05] Crashtown: has joined #RubyOnRails
[17:03:13] simplyianm: has joined #RubyOnRails
[17:03:13] aaronds: ciree: got it working, thanks!
[17:04:11] tubbo: has joined #RubyOnRails
[17:04:19] gerep: ciree, It was an error in my form: =f.fields_for :affiliation_addresses do |builder| and it was :affiliation_address
[17:04:25] gerep: Unbelievable hahahaha
[17:04:28] gerep: Lesson learned!! :D
[17:04:37] ciree: good job!
[17:04:49] ciree: it happens
[17:05:06] bricker: has joined #RubyOnRails
[17:06:19] emachnic: has joined #RubyOnRails
[17:08:02] arBmind: has joined #RubyOnRails
[17:08:10] arBmind: has left #RubyOnRails: ()
[17:08:19] Crashtown: hello guys, I develop back-end for iOs app (android in project) that requires to get live data from server. iOs team told me that Apple's push notification cant be used for data source so I looking for another ways to do this without 3rd party services like Pusher or Firebase. Long poling looks not eloquent solution for that kind of tasks, maybe some websockets(socket.io, faye, websocket-rails). If anyone have experience in completing such kind o
[17:08:19] Crashtown: f tasks, please point me where i need to dig. :) Thanks
[17:09:32] edwinvdgraaf: has joined #RubyOnRails
[17:09:39] asheinfeld: has joined #RubyOnRails
[17:11:31] kerunaru: has joined #RubyOnRails
[17:15:34] Sigma00: websockets would be the way to go if you need real-time data, yes
[17:15:48] iamjarvo: has joined #RubyOnRails
[17:17:18] prereflect: has joined #RubyOnRails
[17:18:28] MEATCHICKEN: has joined #RubyOnRails
[17:18:59] commondream: has joined #RubyOnRails
[17:20:10] MEATCHICKEN: Season has_many :teams, Team has_many :registrations. Registration has a user_id
[17:20:23] MEATCHICKEN: How do I validate uniqueness of user_id per season?
[17:20:28] MEATCHICKEN: To ensure a user can only signup once
[17:20:58] Pazician: has joined #RubyOnRails
[17:20:59] MEATCHICKEN: The only way I can see it being done is putting a season_id in registration
[17:21:12] commondr_: has joined #RubyOnRails
[17:21:18] MEATCHICKEN: So I can do validates_uniqueness_of :user_id, scope: :season_id
[17:21:23] MEATCHICKEN: Unless there is another way?
[17:21:37] Sigma00: can a user belong to multiple teams?
[17:21:51] nertzy: has joined #RubyOnRails
[17:23:35] MEATCHICKEN: Sigma00: I can access the registration's season through teams though
[17:23:37] Sigma00: then check for team uniqueness. I'm assuming you check for user uniqueness in teams already
[17:23:46] Scripore: has joined #RubyOnRails
[17:23:46] MEATCHICKEN: Season has_many teams, team has_many registrations
[17:24:20] rubyonrailed: has joined #RubyOnRails
[17:24:26] MEATCHICKEN: Sigma00: I think you're onto something. sec
[17:24:43] MEATCHICKEN: So validate the uniquenes of user_id, scoped to team_id in registration?
[17:25:11] MEATCHICKEN: Sigma00: How am I ensuring that a user doesn't just run to another team?
[17:25:18] Sigma00: no, just validate team_id is unique in Season
[17:25:31] IanVorn: has joined #RubyOnRails
[17:25:40] Sigma00: meatchicken: because you're validating unique user_id in registrations, unique registration_id in teams, etc
[17:26:14] MEATCHICKEN: Sigma00: Season will pre-generates teams and will always have unique teams though
[17:26:34] Sigma00: then it should be easy to just validate unique teams in a season, no?
[17:26:54] IanVorn: has joined #RubyOnRails
[17:27:26] MEATCHICKEN: Sigma00: Wow. I see what you're saying
[17:27:30] MEATCHICKEN: Damn how did I miss it
[17:27:35] disperso: has joined #RubyOnRails
[17:27:42] Limix: has joined #RubyOnRails
[17:28:37] asheinfeld: has joined #RubyOnRails
[17:29:03] hamster88: I have a question regarding a parameter of devise ... before_action :configure_permitted_parameters, if: :devise_controller?
[17:29:04] hamster88: def configure_permitted_parameters
[17:29:04] hamster88: devise_parameter_sanitizer.for(:sign_up) << :username
[17:29:06] nonparfumee: has joined #RubyOnRails
[17:29:36] hamster88: what would this piece of code do... does it allows us to use the post.user.name type thing or what?
[17:30:46] coin3d: has joined #RubyOnRails
[17:31:27] jstanton: has joined #RubyOnRails
[17:32:09] elaptics: hamster88: not super familiar with devise but my guess is that it'll allow you to collect a username parameter from the user when you're registering them
[17:32:40] hamster88: ok elaptics may i ask another question from you.. not related to devise tho?
[17:32:58] elaptics: was that the question? :)
[17:33:04] elaptics: my answer is yes
[17:33:20] ebbflowgo: has joined #RubyOnRails
[17:34:03] MEATCHICKEN: Sigma00: Sorry. I lost it. https://gist.github.com/anonymous/96437ab1e10b6d56492c
[17:34:14] MEATCHICKEN: I don't see how what you're saying is possible through this association network
[17:34:17] snockerton: has joined #RubyOnRails
[17:34:26] MEATCHICKEN: because a team doesn't have a user_id column
[17:34:28] hamster88: this piece of code.. <%= comment.user.name %> it was not working before i added devise... i was getting error as name is not defined and also when i was trying @post.user.name this was not working too.. my old gist for your reference is at https://gist.github.com/thedesignable/9233ac23c246f5cf31d2
[17:34:39] MEATCHICKEN: It can't validate the column of a child record(registration)
[17:34:41] hotpancakes: has joined #RubyOnRails
[17:35:18] MEATCHICKEN: hamster88: Does your user model have a name column?
[17:36:28] RegulationD: has joined #RubyOnRails
[17:36:28] elaptics: hamster88: you either need an actual name column in your users table or a method called name in your user model which provides the result
[17:36:31] asheinfeld: has joined #RubyOnRails
[17:36:57] hamster88: meatchicken, no i didn't had that column
[17:37:09] MEATCHICKEN: Then name won't work
[17:37:12] MEATCHICKEN: why do you think it will work
[17:37:26] MEATCHICKEN: Either create the column or create a name method in the model like elaptics stated
[17:37:49] MrPunkin: has joined #RubyOnRails
[17:37:49] coetry: has joined #RubyOnRails
[17:38:12] hamster88: i added that column name using migration tho it didn't worked..
[17:38:36] elaptics: hamster88: !gist your current code
[17:38:36] helpa: hamster88: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[17:38:57] hamster88: elaptics, alright.
[17:39:09] MrPunkin: has left #RubyOnRails: ()
[17:39:11] snockerton1: has joined #RubyOnRails
[17:39:20] coetry: i wanna call the :asset_path method from the Rails console and am trying to use ActionView::Helpers::AssetUrlHelper.asset_path
[17:39:25] coetry: what am i doing wrong?
[17:39:44] MEATCHICKEN: I'll repeat my question. Would anyone know how to validate the uniqueness of a user_id through associations?
[17:39:46] MEATCHICKEN: https://gist.github.com/anonymous/96437ab1e10b6d56492c
[17:39:55] MEATCHICKEN: I'm trying to ensure a user can only sign up once per season.
[17:39:59] nixter1029: has joined #RubyOnRails
[17:40:47] hamster88: here is th new gist https://gist.github.com/thedesignable/5eb36cb47a08306299e3
[17:41:11] MEATCHICKEN: hamster88: create a migration
[17:41:21] MEATCHICKEN: rails g migration AddNameToUsers name:string
[17:41:31] MEATCHICKEN: Assuming you have a user model
[17:42:07] Anakat_: has joined #RubyOnRails
[17:42:16] hamster88: meatchicken, i have done that , and the code is now working after i added those lines from devise.. but i don't know if thats the reason or what.
[17:43:00] hamster88: and shouldn't it be user instead of users? because i think models are always singular .. rather than plural :/
[17:43:09] coetry: nvm i got it, its a module and i just used 'include ..."
[17:44:36] baweaver: has joined #RubyOnRails
[17:44:44] elaptics: hamster88: not in creating the migration, writing the migration like that just lets rails pre-generate more of the migration file
[17:44:44] cnk: has joined #RubyOnRails
[17:45:22] elaptics: hamster88: you could just as well write `rails g migration do_the_flibble name`
[17:45:42] elaptics: then you'd just need to write the actual migration lines you want in the file it creates
[17:45:49] zmd: has left #RubyOnRails: ()
[17:45:54] hamster88: so that really doesn't matters if i am doing singular or plural for migrations
[17:46:13] dclo: has joined #RubyOnRails
[17:46:19] dmz: has joined #RubyOnRails
[17:46:28] hamster88: it would just add that column to that table right?
[17:46:55] elaptics: hamster88: not for the name of the migration file. You will need to specify the migration line correctly, e.g. when adding a column to a table
[17:46:55] cmisenas: has joined #RubyOnRails
[17:47:24] camonz: has joined #RubyOnRails
[17:47:42] annlewis: has joined #RubyOnRails
[17:47:43] elaptics: hamster88: more info http://edgeguides.rubyonrails.org/active_record_migrations.html#creating-a-standalone-migration
[17:47:46] rubyonrailed: has joined #RubyOnRails
[17:47:49] camonz: I'm trying to load my schema on a CI srever and i'm getting a `PG::InvalidDatetimeFormat: ERROR: invalid input syntax for type date: "(now() - '1 day'::interval)"` error
[17:48:03] hamster88: elaptics, so all that mess that was happening was due to migration only?
[17:48:17] camonz: the (now() - '1 day'::interval) is the default value that I'm setting to a column
[17:48:19] elaptics: hamster88: which mess?
[17:48:31] hamster88: like those errors i was getting
[17:48:40] hamster88: like name undefined
[17:49:02] elaptics: hamster88: that was due to you not having the name column in your db or your model as a method
[17:49:17] elaptics: the migration would have added it to your db
[17:49:59] DLSteve: has joined #RubyOnRails
[17:50:04] hamster88: elaptics, one more thing i would like to ask..
[17:50:51] nixter1029: has joined #RubyOnRails
[17:50:52] hamster88: let's say i forgot to add a parameter when trying to add a model.. can i just add that column later on using migration?
[17:51:09] cnk: has left #RubyOnRails: ()
[17:51:33] shock_one: has joined #RubyOnRails
[17:52:18] cnk: has joined #RubyOnRails
[17:52:50] elaptics: hamster88: you mean another column for your database?
[17:53:05] hamster88: another column to same table in the database
[17:53:07] elaptics: yes, that's what you just did for your users name
[17:53:21] asheinfeld: has joined #RubyOnRails
[17:53:32] elaptics: that's what migrations are for, making changes to your database over time
[17:54:00] ghr: has joined #RubyOnRails
[17:54:27] hamster88: I understood now, thank you and meatchicken for explaining everything and giving your valuable time :)
[17:55:24] zzing: has joined #RubyOnRails
[17:55:56] hamster88: I have been trying to learn rails from a while.. but tutorials on youtube and all confuses me at times :( could you tell me about some good resources for that and books etc..
[17:56:06] __butch__: has joined #RubyOnRails
[17:58:45] Scripore: has joined #RubyOnRails
[17:59:20] MEATCHICKEN: hamster88: The official rails getting started guide
[17:59:29] MEATCHICKEN: That and hours of reading/exploring
[17:59:31] MEATCHICKEN: is what did it for me
[17:59:36] MEATCHICKEN: Never ending struggle, it is
[17:59:51] hamster88: meatchicken, how much time did it took for you to learn RoR
[18:00:24] qwertme: has joined #RubyOnRails
[18:00:26] MEATCHICKEN: I haven't completely learned it but I know how to build shit. Took me about 1 year of full time work. 2-3 months of exploratory
[18:00:44] nixter1029: has joined #RubyOnRails
[18:00:46] MEATCHICKEN: The 2-3 months is what got me the work position
[18:01:20] hamster88: what are you referring to by reading?
[18:01:27] hamster88: books or something?
[18:02:16] MEATCHICKEN: Mostly blog posts
[18:02:18] MEATCHICKEN: Stackoverflow
[18:02:33] MEATCHICKEN: I never read a rails book. Too slow for me
[18:03:04] towski_: has joined #RubyOnRails
[18:03:25] hamster88: i think i took a long path.. i have studied ruby first actually
[18:03:42] MEATCHICKEN: hamster88: Fair enough. I learned why learning rails
[18:03:46] MEATCHICKEN: And I'm fine at it now
[18:04:21] hamster88: lol i am trying it this way too.. i keep my ruby book next to me when i am creating a rails project
[18:04:35] disperso: has joined #RubyOnRails
[18:04:48] hamster88: just in case i want to understand something in more detail
[18:04:59] hamster88: it helps a bit i think
[18:05:39] nelsonsozinho: has joined #RubyOnRails
[18:06:02] nixter1029: has joined #RubyOnRails
[18:06:07] hamster88: meatchicken, have you tried the devise admin model by anychance? I am just not sure if i should use that to create admins
[18:06:31] hamster88: so that the admin user can delete all posts or remove comments etc
[18:06:53] MEATCHICKEN: I don't think devise has a built-in admin model, hamster88
[18:07:05] MEATCHICKEN: I'd just create it myself if your use-case is simple
[18:07:12] MEATCHICKEN: Add an admin boolean to the user model
[18:07:40] hamster88: meatchicken, all you need to do is run rails g devise admin ... that generates admin model
[18:08:15] nonparfumee: has joined #RubyOnRails
[18:08:17] sshuff: has joined #RubyOnRails
[18:08:39] MEATCHICKEN: That doesn't actually generate an admin model
[18:08:50] MEATCHICKEN: That's just another model called "admin" with devise functionality
[18:08:58] MEATCHICKEN: There's nothing "admin" about it
[18:09:06] hamster88: let me get it for you
[18:09:27] hamster88: https://github.com/plataformatec/devise/wiki/How-To:-Add-an-Admin-Role << have a look at that
[18:09:30] MEATCHICKEN: https://github.com/plataformatec/devise#getting-started
[18:09:34] MEATCHICKEN: Read the getting started section again
[18:09:45] tubbo: has joined #RubyOnRails
[18:10:24] MEATCHICKEN: Well..that isn't anything special hamster88
[18:10:34] commondream: has joined #RubyOnRails
[18:10:36] MEATCHICKEN: Devise is just generating another model that happens to be called admin
[18:10:48] MEATCHICKEN: It isn't really doing anything special other than the standard devise stuff
[18:10:52] Zadrel: can anyone help me? this line isn't working in my migration --change_column :gifts, :used, :null=>false, :default=>0-- its generating this error:**You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'nullfalsedefault0 DEFAULT NULL' at line 1: ALTER TABLE `gifts` CHANGE `used` `used` nullfalsedefault0 DEFAULT NULL**
[18:11:09] hamster88: but if you go at last of the page you can see, one can add the existing user to with admin privileges
[18:11:57] mello: has joined #RubyOnRails
[18:12:14] hamster88: let me quote it >>> The code below can be used to grant admin status to the current user.
[18:12:15] hamster88: current_user.update_attribute :admin, true
[18:12:39] fryguy: Zadrel: you need to specify the type of the column before specifying options like null and default
[18:12:57] Zadrel: fryguy: thx :)
[18:13:00] fryguy: Zadrel: see the desired method signature here: http://apidock.com/rails/ActiveRecord/ConnectionAdapters/SchemaStatements/change_column
[18:13:11] duderonomy: has joined #RubyOnRails
[18:13:47] Scripore: has joined #RubyOnRails
[18:13:48] Zadrel: fryguy: worked :)
[18:14:04] mikecmpbll: has joined #RubyOnRails
[18:14:12] nelsonsozinho: has left #RubyOnRails: ()
[18:14:19] MEATCHICKEN: hamster88: Not sure how to explain it any better. The "code below" grants admin status because you're flipping the admin boolean to true
[18:14:47] hamster88: meatchicken, hmm i guess i understood what you are trying to say..
[18:15:17] hamster88: doing that would just add attribute to the user but won't give any admin like rights or anything to user for posts and all right?
[18:15:47] tvw: has joined #RubyOnRails
[18:16:34] pvertenten: has joined #RubyOnRails
[18:17:11] givanse_: has joined #RubyOnRails
[18:17:34] ur5us: has joined #RubyOnRails
[18:17:45] sandelius: has joined #RubyOnRails
[18:18:05] cac_: has joined #RubyOnRails
[18:19:00] michael_mbp: has joined #RubyOnRails
[18:19:18] DukeDave: I'm rolling my own `to_xml` and writing it to a file, but `file.write` is calling `to_s` on the XmlBuilder instance, putting a `<to_s/>` at the end of my XML, any ideas what I'm doing wrong? https://gist.github.com/dukedave/d17147ace0cf7f3553be
[18:19:52] baweaver: has joined #RubyOnRails
[18:20:24] centrx: has joined #RubyOnRails
[18:20:43] shinnya: has joined #RubyOnRails
[18:21:27] hotpancakes: has joined #RubyOnRails
[18:21:41] IanVorn: has joined #RubyOnRails
[18:22:45] pothibo: has joined #RubyOnRails
[18:24:11] baron: has joined #RubyOnRails
[18:24:37] Fire-Dragon-DoL: if I have multiple instances of model "email message" all using the same email account, when retriving it with my belongs_to relationship, will rails used the cached version instead of re-querying the database? From my understanding, yes
[18:25:01] DukeDave: Ah, well, here's a workaround: http://stackoverflow.com/a/5512780/21115
[18:25:38] IceBear: has joined #RubyOnRails
[18:26:20] DukeDave: Fire-Dragon-DoL: per request, yes, if you make the same query multiple times (i.e. `email_account.email_messages.to_a`), then Rails will use a cached version
[18:26:50] Fire-Dragon-DoL: mhhh what about a rake task? duckedave
[18:26:59] Fire-Dragon-DoL: sorry, dukedave*
[18:27:05] _aeris_: has joined #RubyOnRails
[18:27:40] mib_mib: has joined #RubyOnRails
[18:28:25] DukeDave: Fire-Dragon-DoL: hmm, good question. Answer here, but no citation (I'd like to see one): http://stackoverflow.com/questions/880482/activerecord-models-cached-in-rake-tasks
[18:28:29] broman: what's the best IDE for ubuntu?
[18:28:56] kies: has joined #RubyOnRails
[18:29:20] mib_mib: hi guys - i have a column that stores a semicolon separate list of ids - like 1;2;3;4;5 ..... now, i am trying to get the has_many association to work properly (ultimately, I want the .includes method to work properly) - does anyone have any good suggestions here?
[18:29:37] mib_mib: the semi-colon separated list of ids are primary keys into another table
[18:30:10] hahuang65: has joined #RubyOnRails
[18:30:32] DukeDave: mib_mib: Postgres?
[18:30:58] treehug88: sounds like you're doing it wrong. If it's a one-to-meny relationship put the IDs of this table's rows in the other table
[18:31:35] mib_mib: treehug88: i realize i'm abusing it here a little bit - but its sort of for good reason, the table is really large, and I dont want to duplicate rows for each item
[18:31:44] waseem_: mib_mib: Why are you storing those ids like that?
[18:31:57] treehug88: I don't think you understood my point mib_mib
[18:32:05] mib_mib: so, there could be 1000 items, i dont want to have 1000 rows (each with their own timestamp, data, etc)
[18:32:21] mib_mib: because then my data is going to explode by a factor of 100 to 1000
[18:32:39] MEATCHICKEN: hamster88: Correct. You'd have to add the logic for that.
[18:33:33] treehug88: no, you already have one row in table A and (from your example) 5 rows in table B. This would just add one column to table B
[18:33:35] Fire-Dragon-DoL: dukedave: thanks, that's very important, you might have spotted a performance bottleneck :P
[18:33:45] Fire-Dragon-DoL: (in our codebase I mean)
[18:33:58] IanVorn: has joined #RubyOnRails
[18:34:08] whatasunnyday: has joined #RubyOnRails
[18:34:15] snockerton: has joined #RubyOnRails
[18:34:26] mib_mib: anyway, if there's no way to do waht i want to do so be it, i can do it manually, but would like to use 'includes' if possible...
[18:34:36] DukeDave: mib_mib: you'll have to roll your own SQL, so I'd figure out the join first (ask in #mysql for help), then worry about getting it back in to AR. BUT, as others said, you're doing it wrong (assuming it's anything other than an exercise)
[18:35:02] centrx: has joined #RubyOnRails
[18:36:07] pvertenten: has joined #RubyOnRails
[18:37:06] whatasunnyday: Radar, just curious, how come you don't recommend people adding a .gemrc with no rdoc and no ri in your guide? too complicated?
[18:37:11] waseem_: mib_mib: You're designing it wrong. You should create the associations the way those are supposed to be. If you table is large, shard your database.
[18:37:15] DukeDave: mib_mib: (basically, don't fight the DB, normalize your data correctly, and then worry about performance later)
[18:37:50] DukeDave: Heh, i.e. what waseem_ said ;)
[18:37:56] choke: has joined #RubyOnRails
[18:37:59] waseem_: mib_mib: "Given a choice of pushing complexity in your data and code always push it in your data". -- Some Smartass Programmer.
[18:38:46] mib_mib: all of this logic only applies at a certain data size assumption
[18:38:48] waseem_: If you don't, you'll have to do some weird dance in your code to get things done which will be both non-performant and difficult to debug.
[18:39:03] apofis: has joined #RubyOnRails
[18:39:07] mib_mib: i'm telling you, if i do that, the data size will grow too large.
[18:39:23] waseem_: mib_mib: When designing you relationship assume that you've infinite storage. Storage is cheap, CPU cycles are not.
[18:39:27] dopie: has joined #RubyOnRails
[18:39:29] mib_mib: sharding the database right now is not an option - and is much more hassle than changing a sql query imho
[18:39:56] mib_mib: waseem_: infinite storage, sure, not infinite ram though.
[18:40:27] solars: has joined #RubyOnRails
[18:40:38] waseem_: mib_mib: Well then, retrieve that column and do a split(';') and check if the the array contains the id that you're looking for.
[18:40:44] mib_mib: it almost have it working, but the has_many ... primary_key: <my method to give ids here> only seems to use the first id instead of all the ids
[18:40:47] waseem_: mib_mib: Tables are not stored in the RAM.
[18:40:59] mib_mib: i guess i'll dive in and see why..
[18:41:47] waseem_: mib_mib: You could at least serialize that column to an Array.
[18:42:08] waseem_: But then you've other problems.
[18:42:54] Senjai: When in an after_create method for a Variant, a join table in my has_many: :through does not have variant_id set until all the callbacks are resolved
[18:42:58] Senjai: Why could this be?
[18:43:07] Senjai: Variant.create option_values [things]
[18:45:39] tjbiddle: has joined #RubyOnRails
[18:45:50] x1337807x: has joined #RubyOnRails
[18:46:05] klue: has joined #RubyOnRails
[18:46:49] maz-dev: has joined #RubyOnRails
[18:46:55] dclo: has joined #RubyOnRails
[18:47:06] nertzy: has joined #RubyOnRails
[18:47:28] blackmesa: has joined #RubyOnRails
[18:48:11] Zackio: has joined #RubyOnRails
[18:50:02] HenriettaSalt: has joined #RubyOnRails
[18:50:18] simplyianm: has joined #RubyOnRails
[18:50:44] sinkensabe: has joined #RubyOnRails
[18:50:54] kadoppe: has joined #RubyOnRails
[18:50:55] Jinkins: has joined #RubyOnRails
[18:51:30] shock_one: has joined #RubyOnRails
[18:51:50] coetry: has joined #RubyOnRails
[18:54:37] simplyianm: has joined #RubyOnRails
[18:54:52] tobobo: has joined #RubyOnRails
[18:55:03] smoak: has joined #RubyOnRails
[18:55:10] doodlehaus: has joined #RubyOnRails
[18:55:54] mhoungbo: has joined #RubyOnRails
[18:56:15] smoak: are there any guides/tutorials for creating my own ActiveRecord adapter?
[18:57:07] mhoungbo: has joined #RubyOnRails
[18:57:22] ekain: has joined #RubyOnRails
[18:57:33] pothibo: has joined #RubyOnRails
[18:58:29] mhoungbo: has joined #RubyOnRails
[18:58:34] rhizome: reading the source of existing ones is probably a good place to start
[18:59:40] cac_: has joined #RubyOnRails
[18:59:56] bin_005: has joined #RubyOnRails
[19:00:46] pixelhandler: has joined #RubyOnRails
[19:01:02] bronson: has joined #RubyOnRails
[19:05:37] kara_sweets: has joined #RubyOnRails
[19:06:50] arooni-mobile: has joined #RubyOnRails
[19:08:09] ghr: has joined #RubyOnRails
[19:08:26] asheinfeld: has joined #RubyOnRails
[19:09:12] emachnic: has joined #RubyOnRails
[19:10:06] nfk: has joined #RubyOnRails
[19:11:16] nahtnam: Hey! I am trying to get sidekiq working but when I try starting the sidekiq server, it says "Server is not a class". https://gist.github.com/nahtnam/7403c30e64f75e6c2851
[19:11:21] nahtnam: Im pretty sure Server is a class
[19:12:04] strcmp1: paste the actual exception, and a backtrace
[19:12:12] vickleton: has joined #RubyOnRails
[19:12:20] bricker: has joined #RubyOnRails
[19:13:06] Anakat_: has joined #RubyOnRails
[19:13:52] jenrzzz: has joined #RubyOnRails
[19:13:52] nahtnam: strcmp1: This is the sidekiq log. https://gist.github.com/nahtnam/c4603ff081e04e324095
[19:14:42] yfeldblum: has joined #RubyOnRails
[19:14:56] strcmp1: it sounds like 'Server' has already been defined as something else, maybe? what is line 1 of server.rb? just.. class Server < ActiveRecord::Base, i guess?
[19:14:57] nahtnam: I am getting an error why I try to run my rails server. undefined method `all' for Server:Module https://gist.github.com/nahtnam/9528dabf983dc01242cb That error never showed up before I ran the sidekiq server
[19:15:15] strcmp1: yeah, so, somewhere and somehow, 'Server' is being defined as a module
[19:15:19] nahtnam: strcmp1: Yep Thats the first line
[19:15:40] strcmp1: what is line 7 of that controller?
[19:16:12] nahtnam: strcmp1: @servers = Server.all
[19:16:17] nahtnam: It just a standard scaffold
[19:16:19] nahtnam: I never changed anything
[19:16:59] strcmp1: are you using pry/pry-rails?
[19:17:26] dbslone: has joined #RubyOnRails
[19:18:13] strcmp1: the problem is literally that 'Server' is defined elsewhere as a module, and by the time you try to create a class of the same name, you get that error.
[19:18:26] strcmp1: so the solution is to try find where it is defined as a module.
[19:18:29] nahtnam: strcmp1: Ahhh
[19:18:33] nahtnam: I think I know what is happening
[19:18:43] nahtnam: I am using a gem which I think define a class called server
[19:18:53] strcmp1: yeah, that may be it
[19:19:05] nahtnam: the first line of the sidekiq is require steam condenser
[19:19:49] IanVorn: has joined #RubyOnRails
[19:20:57] codepete: has joined #RubyOnRails
[19:21:24] asheinfeld: has joined #RubyOnRails
[19:21:39] hotpancakes: has joined #RubyOnRails
[19:22:10] sinkensabe: has joined #RubyOnRails
[19:22:28] ebbflowgo: has joined #RubyOnRails
[19:23:40] n008f4g_: has joined #RubyOnRails
[19:23:46] qwertme: has joined #RubyOnRails
[19:24:15] nertzy: has joined #RubyOnRails
[19:25:27] ProLoser: has joined #RubyOnRails
[19:25:54] meekohi: has left #RubyOnRails: ()
[19:26:04] sandelius: has joined #RubyOnRails
[19:28:54] djbkd: has joined #RubyOnRails
[19:29:04] sarink: has joined #RubyOnRails
[19:29:40] Etriaph: has joined #RubyOnRails
[19:30:33] commondream: has joined #RubyOnRails
[19:30:40] ebbflowgo: has joined #RubyOnRails
[19:31:16] DigitallyBorn: has joined #RubyOnRails
[19:32:19] simplyianm: has joined #RubyOnRails
[19:33:16] ogpastal_: has joined #RubyOnRails
[19:33:51] shock_one: has joined #RubyOnRails
[19:34:23] sarink: has joined #RubyOnRails
[19:34:44] shock_one: has joined #RubyOnRails
[19:35:03] shock_one: has joined #RubyOnRails
[19:35:39] jan1337z: has joined #RubyOnRails
[19:37:28] centrx: has joined #RubyOnRails
[19:38:36] hamster88: has joined #RubyOnRails
[19:38:52] hamster88: any one came across this error lately?
[19:38:53] hamster88: PG::ForeignKeyViolation: ERROR: update or delete on table "posts" violates foreign key constraint "fk_rails_1c8a895318" on table "comments" DETAIL: Key (id)=(7) is still referenced from table "comments". : DELETE FROM "posts" WHERE "posts"."id" = $1
[19:38:57] gaussblurinc1: has joined #RubyOnRails
[19:39:09] hamster88: i can't get rid of it :/
[19:40:03] Papierkorb: hamster88: delete the referenced comments beforehand
[19:40:23] hamster88: Papierkorb, can you give an example please?
[19:40:55] IanVorn: has joined #RubyOnRails
[19:41:04] hamster88: i have a comment model, user, model and post model
[19:41:09] emachnic: has joined #RubyOnRails
[19:41:13] Papierkorb: hamster88: I'm quite sure that active record has something for that, but, just do Comment.where(post: the_post).destroy before the the_post.destroy
[19:42:33] hamster88: Papierkorb, here is what my delete thing looks like in show.html <% if @post.user == current_user %>
[19:42:33] hamster88: <%= link_to "Edit", edit_post_path(@post) %>
[19:42:33] hamster88: <%= link_to "Delete", post_path(@post), method: :delete, data: { confirm: "Are you sure?" }%>
[19:42:33] hamster88: <p><%= render 'partials/commentform' %></p>
[19:43:02] mhoungbo: has joined #RubyOnRails
[19:43:05] Mession: has joined #RubyOnRails
[19:43:11] hamster88: shall i add .destroy to post_path(@post).destroy <== that way?
[19:43:30] sandstrom: has joined #RubyOnRails
[19:44:08] ohhmaar: has joined #RubyOnRails
[19:44:20] mhoungbo: has joined #RubyOnRails
[19:44:25] ohhmaar: Can you upload a pdf and an image using paperclip gem?
[19:45:35] jan1337z: Can someone tell me how rails adds errors to record.errors[:field] ?
[19:45:45] mhoungbo: has joined #RubyOnRails
[19:45:56] hamster88: ohhmaar, use ckeditor might help :D
[19:47:24] mhoungbo: has joined #RubyOnRails
[19:47:38] ohhmaar: hamster88 what?
[19:47:41] dclo: has joined #RubyOnRails
[19:47:41] ChargedLight: has joined #RubyOnRails
[19:47:54] hamster88: use ckeditor gem with paperclip as backend
[19:48:32] ohhmaar: ckeditor is a text editor.. why would i need that
[19:48:39] Trefex: has joined #RubyOnRails
[19:49:06] cac: has joined #RubyOnRails
[19:49:06] robbyoconnor: has joined #RubyOnRails
[19:49:10] ohhmaar: i think i found my answer hamster88 http://stackoverflow.com/questions/24715918/how-to-upload-image-word-docs-and-or-pdf-files-via-paperclip-rails-4
[19:49:14] ohhmaar: thanks anyways
[19:49:22] hamster88: alright thats cool
[19:49:55] haz111: has joined #RubyOnRails
[19:50:52] _aeris_: has left #RubyOnRails: ("Konversation terminated!")
[19:51:28] bahar: has joined #RubyOnRails
[19:51:31] Frem: has joined #RubyOnRails
[19:52:13] ChargedLight: Hello. I am trying to create scrapping script, which will show info about current iPhone warranty. I have URL = https://selfsolve.apple.com/agreementWarrantyDynamic.do You should enter your IMEI in the form to check. I am using mechanize for this. The problem is, that IMEI starts with 0 (f.e. 013977000323877). And if i trying to fill the form with this number, i'm getting ruby error - SyntaxError: Invalid octal digit. If i try to pass this num
[19:52:14] ChargedLight: ber as a string, i'm getting redirected to this page - https://selfsolve.apple.com/Sorry.do?caller=SalesAgrWarDyn. If i try to "013977000323877".to_i, than ruby cuts off the leading zero. How can i solve this?
[19:54:25] centrx: has joined #RubyOnRails
[19:55:01] chadwtaylor: has joined #RubyOnRails
[19:55:10] baweaver: has joined #RubyOnRails
[19:57:05] premera: has joined #RubyOnRails
[19:57:13] chriskk: has joined #RubyOnRails
[19:57:33] Etriaph: Self Solve
[19:58:11] pvertenten: has joined #RubyOnRails
[19:58:18] ChargedLight: Etriaph, sorry?
[19:58:52] bendangelo: has joined #RubyOnRails
[19:58:58] helpa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[19:59:16] weaksauce: ChargedLight why are you converting to a number when it's really just text
[20:00:50] willharr_: has joined #RubyOnRails
[20:01:00] choke: has joined #RubyOnRails
[20:01:12] weaksauce: ChargedLight there is probably a header that you are not sending with the correct text. use something to capture the headers for a valid serial number request and see what's missing
[20:01:49] smoak: has left #RubyOnRails: ("WeeChat 1.2")
[20:02:48] sdwrage: has joined #RubyOnRails
[20:03:37] ohhmaar: hamster88 for the rails migration (since i want both image and document) i would do 'rails generate paperclip image document' or no?
[20:04:31] hamster88: let me check it i did it a while ago give me a sec
[20:04:35] centrx: has joined #RubyOnRails
[20:05:17] qejk: has joined #RubyOnRails
[20:05:28] centrx: has joined #RubyOnRails
[20:05:50] hamster88: I wanted the image to be associated with post, so i did this rails g paperclip post image
[20:05:59] hamster88: that might help you
[20:06:07] x1337807x: has joined #RubyOnRails
[20:06:29] ohhmaar: hm. lets see if what i said works
[20:07:23] ohhmaar: ok it works
[20:07:48] dseitz: has joined #RubyOnRails
[20:07:48] hamster88: mine worked too finally xD
[20:07:51] ChargedLight: weaksauce, https://gist.github.com/andrei-sheina/234bc1b3cec2bde78156 Form has some hidden values. I assume that problem is with them? Because when i fill the form in browser, this hidden values are filled automatically, and with mechanize i should fill them manually? If so, how can i find out, what should be filled in this hidden fileds?
[20:08:14] hamster88: anyways gotta go now.. adios people have a great afternoon/night everyone
[20:09:11] cntrx: has joined #RubyOnRails
[20:09:55] baweaver: has joined #RubyOnRails
[20:11:16] ProLoser: has joined #RubyOnRails
[20:12:11] cntrx: has joined #RubyOnRails
[20:12:18] DigitallyBorn: has joined #RubyOnRails
[20:12:57] asheinfeld: has joined #RubyOnRails
[20:13:14] weaksauce: ChargedLight when you fill out the page interactively what do they get changed to?
[20:13:59] Trefex1: has joined #RubyOnRails
[20:14:06] tjbiddle: has joined #RubyOnRails
[20:14:59] r627099: has joined #RubyOnRails
[20:15:17] klue: is there anyway a controller can get called if thre isn't a specific mapping in routes.rb? I don't see a map.connect that might be used for default routes
[20:17:57] pharserror: has joined #RubyOnRails
[20:18:06] arooni-mobile: has joined #RubyOnRails
[20:20:46] doodleha_: has joined #RubyOnRails
[20:20:48] darrencauthon: has joined #RubyOnRails
[20:21:50] cac: has joined #RubyOnRails
[20:21:54] bamorim: has joined #RubyOnRails
[20:21:59] ChargedLight: weaksauce, okay, i've found out that when i fill in in browser and submit, a number being generated in [hidden:0x1cf3644 type: hidden name: num value: ] And this value is different for different imeis
[20:22:23] arathald: has joined #RubyOnRails
[20:22:42] chrishough: has joined #RubyOnRails
[20:22:50] snockerton: has left #RubyOnRails: ()
[20:23:09] brenop: has joined #RubyOnRails
[20:23:36] nahtnam: has joined #RubyOnRails
[20:24:01] rakm: has joined #RubyOnRails
[20:24:06] towski_: has joined #RubyOnRails
[20:24:14] Coldblackice: has joined #RubyOnRails
[20:24:30] yaymukund: has joined #RubyOnRails
[20:24:40] willharrison: has joined #RubyOnRails
[20:24:40] iamdevnul: has joined #RubyOnRails
[20:24:43] machty: has joined #RubyOnRails
[20:27:48] tenderlove: has joined #RubyOnRails
[20:27:57] cnk: has joined #RubyOnRails
[20:28:47] EXCHGR: has joined #RubyOnRails
[20:29:54] cac: has joined #RubyOnRails
[20:30:06] lindii_: how can i avoid repeating strong params for my create and update action in this case http://pastie.org/10231961
[20:30:15] klue: is there any way a controller can get called if there isn't a specific mapping in routes.rb? I don't see a map.connect that might be used for default routes.
[20:31:57] brenop: has joined #RubyOnRails
[20:32:17] bruno-: has joined #RubyOnRails
[20:32:56] tobobo: has joined #RubyOnRails
[20:33:30] jonahR: has joined #RubyOnRails
[20:34:20] sandstrom: has joined #RubyOnRails
[20:34:43] borodin: anyone here using postgresql for database? I haven't used it in a while - can't get Ident auth to work
[20:34:54] borodin: I probably forgot some arcana
[20:36:36] Senjai: borodin: You probably have md5 setup as a default
[20:38:43] djbkd: has joined #RubyOnRails
[20:39:04] m0r0n: has joined #RubyOnRails
[20:39:15] tjbiddle: has joined #RubyOnRails
[20:39:46] centrx: has joined #RubyOnRails
[20:39:57] weaksauce: ChargedLight you might have to use some js or figure out how that number is being created
[20:40:34] ChargedLight: weaksauce, yeah, i'll try, thanks for help
[20:41:03] weaksauce: np. the js on that page looks fairly well documented and not obfuscated so there is that if you want to RE it
[20:42:28] Cache_Money: has joined #RubyOnRails
[20:43:08] w0rd-driven: has joined #RubyOnRails
[20:43:45] ogpastaling: has joined #RubyOnRails
[20:44:48] ebbflowgo: has joined #RubyOnRails
[20:45:16] srinidhi: has joined #RubyOnRails
[20:46:18] apofis: has joined #RubyOnRails
[20:47:12] nonparfumee: has joined #RubyOnRails
[20:48:50] mrbubbles: has joined #RubyOnRails
[20:49:09] w0rd-driven: has joined #RubyOnRails
[20:49:36] cac: has joined #RubyOnRails
[20:50:38] tubbo: has joined #RubyOnRails
[20:51:04] commondream: has joined #RubyOnRails
[20:51:36] victorko_: has joined #RubyOnRails
[20:52:51] victorkohl: has joined #RubyOnRails
[20:54:34] jacor_m: has joined #RubyOnRails
[20:56:05] ebbflowgo: has joined #RubyOnRails
[20:57:42] shock_one: has joined #RubyOnRails
[20:57:56] jcaho_m: has joined #RubyOnRails
[20:58:13] commondream: has joined #RubyOnRails
[21:00:08] m0r0n: has joined #RubyOnRails
[21:01:18] DigitallyBorn: has joined #RubyOnRails
[21:01:26] kartouch: has joined #RubyOnRails
[21:01:52] centrx: has joined #RubyOnRails
[21:01:54] commondr_: has joined #RubyOnRails
[21:01:54] EminenceHC: On my production server, when I try to run "RAILS_ENV=production rails console" I receive error: gems/activesupport-4.0.2/lib/active_support/core_ext/object/try.rb:45:in `round': NaN (FloatDomainError). I have no idea what is NaN. I cant tell if its from a gem, a script, controller, etc. How can I find out more information about what might be causing this?
[21:02:46] njero: has joined #RubyOnRails
[21:03:01] pixelhandler: has joined #RubyOnRails
[21:04:14] jcaho: has joined #RubyOnRails
[21:04:34] meoblast001: has joined #RubyOnRails
[21:04:58] Hates_: EminenceHC: NaN = not a number
[21:05:19] EminenceHC: Hates_: I know that, I just dont know what is evaluation to NaN so I can fix it.
[21:05:33] EminenceHC: what is evaluating**
[21:05:47] Hates_: EminenceHC: do you have the full stacktrace you can put in a gist?
[21:06:15] EminenceHC: Hates_: Sure, one sec
[21:06:37] EminenceHC: Nothing pertaining to this issue is in the log/production.log either :(
[21:07:00] rromanchuk: has joined #RubyOnRails
[21:07:35] EminenceHC: Hates_: https://gist.github.com/EminenceHC/a0346589b6a7311f7d8c
[21:08:17] Hates_: EminenceHC: missing_client_tests_calculation.rb:26 perhaps?
[21:08:34] cntrx: has joined #RubyOnRails
[21:08:52] borodin: this doesn't sem possible - does devise create migration scripts which are database-dependent? i.e. if you create an app using postgresql, but want to change it to mysql later, but you get errors about postgresql data types
[21:09:12] EminenceHC: Hates_: I will check around in that, for some reason I thought only the first line in the stacktrace was relevant. Thanks.
[21:10:26] Hates_: borodin: I don't believe so. You might run into trouble if you are just loading in the schema, but running the migrations from scratch should work.
[21:10:48] Hates_: EminenceHC: np, hope that helps
[21:11:30] borodin: rake db:create worked fine. Now rake db:migrate fails with a message about t.inet :current_sign_in_ip
[21:11:54] borodin: I understand that t.inet is an abstraction for a datatype in the underlying database...
[21:11:57] Hates_: borodin: ahhh
[21:12:01] borodin: but does it map to mysql?
[21:12:22] Hates_: borodin: ahhh yeah sorry it does look like it creates a db specific migration
[21:12:31] choke: has joined #RubyOnRails
[21:13:15] Hates_: borodin: it's a string if not postgres
[21:13:27] borodin: so I can just chanegt eh migration file and go for it?
[21:13:32] borodin: I shall try and see :)
[21:13:34] edwinrozario: has joined #RubyOnRails
[21:14:01] Hates_: borodin: yeah, :current_sign_in_ip and :last_sign_in_ip
[21:14:49] qejk: has joined #RubyOnRails
[21:14:53] borodin: worked fine. So, that's a *bad smell*, right?
[21:14:57] borodin: shame on devise?
[21:15:37] Hates_: It's a trade off I suppose. I don't think many people switch
[21:15:45] Hates_: why are you moving to MySQL?
[21:15:54] arBmind: has joined #RubyOnRails
[21:16:30] mello: has joined #RubyOnRails
[21:16:31] mello: has joined #RubyOnRails
[21:17:19] baweaver: has joined #RubyOnRails
[21:17:27] smathy: has joined #RubyOnRails
[21:17:32] borodin: I developed using docker and postgresql
[21:17:38] borodin: it *just worked* and I was happy
[21:18:01] borodin: but now when I try to install it in prod, the admins are like "we no do postgresql beep boop"
[21:18:16] borodin: so I converted to mysql and leaned back and smoked a stoagie
[21:18:20] njero: borodin: they might be robot-admins...
[21:18:27] weaksauce: that's rough... postgres is the light
[21:19:03] borodin: postgres is a black box for me - I'll say this, mysql is a hella lot easier to install
[21:20:02] uris: has joined #RubyOnRails
[21:22:43] centrx: has joined #RubyOnRails
[21:23:27] Pazician: has joined #RubyOnRails
[21:24:04] ur5us: has joined #RubyOnRails
[21:24:18] bin_005: has joined #RubyOnRails
[21:24:26] tjbiddle: has joined #RubyOnRails
[21:25:28] m0r0n: has joined #RubyOnRails
[21:29:40] tjbiddle_: has joined #RubyOnRails
[21:30:56] jhass: actually once you overcame that fear postgres is almost easier
[21:31:02] jhass: creating users and dbs is a lot easier
[21:31:11] jhass: ident authentication is a lot easier
[21:31:48] jhass: you can get pretty far without ever touching the configs
[21:33:46] Scripore: has joined #RubyOnRails
[21:33:51] michaeldeol: has joined #RubyOnRails
[21:33:57] weaksauce: I agree with jhass
[21:34:28] speakingcode: has joined #RubyOnRails
[21:34:47] smathy: I think they're both dead simple to install.
[21:35:05] jhass: and more importantly you don't have to care about what engine to use or if utf8 really means utf8 (hint: it does not on mysql)
[21:35:39] paulcsmith: has joined #RubyOnRails
[21:35:56] karimb: has joined #RubyOnRails
[21:36:34] IanVorn: has joined #RubyOnRails
[21:36:36] neanderslob: has joined #RubyOnRails
[21:37:18] Filete: has joined #RubyOnRails
[21:37:42] rromanchuk: has joined #RubyOnRails
[21:39:20] EvangelistaT: has joined #RubyOnRails
[21:40:06] philcrissman: has joined #RubyOnRails
[21:42:16] sdwrage: has joined #RubyOnRails
[21:42:46] Sigma00: plus it has a ridiculous amount of nice features
[21:43:03] centrx: has joined #RubyOnRails
[21:43:44] eggoez: has joined #RubyOnRails
[21:44:00] tobobo: has joined #RubyOnRails
[21:44:22] njero: has joined #RubyOnRails
[21:46:34] FernandoBasso: has joined #RubyOnRails
[21:46:40] Maletor: has joined #RubyOnRails
[21:47:22] EvangelistaT: has left #RubyOnRails: ()
[21:48:21] nonparfumee: has joined #RubyOnRails
[21:48:55] jhass: yeah, like PL/Ruby ;D
[21:49:02] terabytest: has joined #RubyOnRails
[21:50:09] weaksauce: plus it's not owned by oracle.
[21:50:18] commondream: has joined #RubyOnRails
[21:50:18] Sigma00: I meant more like full text search, hstore, json coluimns, etc
[21:52:16] jhass: you're saying you don't use PL/Ruby? heresy!
[21:53:13] weaksauce: what happened to rubyforge?
[21:53:14] lindii_: how can i avoid repeating strong params for my create and update action in this case http://pastie.org/10231961
[21:53:15] ValicekB: has joined #RubyOnRails
[21:53:33] iamjarvo: has joined #RubyOnRails
[21:54:22] weaksauce: make it a method(or two because they are different calls.)
[21:54:53] startupality: has joined #RubyOnRails
[21:55:00] weaksauce: or pass in the permitted params to the method by using a constant.
[21:55:11] lindii_: weaksauce: how would that be
[21:55:19] wethu: has joined #RubyOnRails
[21:55:24] lindii_: never used constants
[21:56:25] kinduff: has joined #RubyOnRails
[21:56:25] kinduff: has joined #RubyOnRails
[21:56:27] Scripore: has joined #RubyOnRails
[21:57:20] blackmesa: has joined #RubyOnRails
[21:58:42] weaksauce: something similar to this: https://gist.github.com/anonymous/10a61525a5c30374095e
[21:59:01] weaksauce: just do the same thing for the update method and it should work
[21:59:23] rubyonra_: has joined #RubyOnRails
[21:59:30] Sigma00: lindii_: you're not avoiding repetition if your params are different for each action...
[21:59:34] darrencauthon: has joined #RubyOnRails
[21:59:53] ghr: has left #RubyOnRails: ()
[22:00:47] lindii_: Sigma00: yeah but maybe is better being read as weaksauce showed
[22:01:18] Sigma00: you could also just permit the same stuff for both, if it doesn't matter
[22:01:38] lindii_: Sigma00: it matters =)
[22:01:59] blackhuey: has joined #RubyOnRails
[22:02:00] asheinfeld: has joined #RubyOnRails
[22:02:01] lindii_: weaksauce: so basically define 2 constants
[22:02:12] weaksauce: yes lindii_
[22:02:47] davidhq: has joined #RubyOnRails
[22:11:11] asheinfeld: has joined #RubyOnRails
[22:12:21] meoblast001: has joined #RubyOnRails
[22:13:24] qwertme: has joined #RubyOnRails
[22:13:50] rickmasta: has joined #RubyOnRails
[22:16:06] eriksays: has joined #RubyOnRails
[22:16:48] dybarra: has joined #RubyOnRails
[22:17:22] shock_one: has joined #RubyOnRails
[22:18:19] Axsuul: has joined #RubyOnRails
[22:21:00] asheinfeld: has joined #RubyOnRails
[22:21:05] jstanton: has joined #RubyOnRails
[22:22:19] choke: has joined #RubyOnRails
[22:22:28] axsuul_: has joined #RubyOnRails
[22:23:40] axsuul_: has joined #RubyOnRails
[22:23:44] Rubie: has joined #RubyOnRails
[22:23:57] fgielow: has joined #RubyOnRails
[22:24:14] sar1nk: has joined #RubyOnRails
[22:26:21] penguinpowernz: has joined #RubyOnRails
[22:26:32] wldcordeiro: has joined #RubyOnRails
[22:26:44] Axsuul: has joined #RubyOnRails
[22:27:02] Axsuul: How do you guys recommend testing of pushing data to webhook urls?
[22:27:40] dybarra: has left #RubyOnRails: ()
[22:28:55] dybarra: has joined #RubyOnRails
[22:29:16] dybarra: has left #RubyOnRails: ()
[22:29:39] Axsuul: guess I just answered my own question, thanks :)
[22:31:10] fmcgeough: has joined #RubyOnRails
[22:32:33] bronson: has joined #RubyOnRails
[22:33:01] WillAmes: has joined #RubyOnRails
[22:34:29] zorak8: has joined #RubyOnRails
[22:34:46] commondream: has joined #RubyOnRails
[22:35:34] Rubie: has joined #RubyOnRails
[22:37:42] edwinrozario: has joined #RubyOnRails
[22:38:53] paulcsmith: has joined #RubyOnRails
[22:39:47] hotpancakes: has joined #RubyOnRails
[22:40:52] arBmind: has joined #RubyOnRails
[22:44:31] aloneintheworld: has joined #RubyOnRails
[22:44:32] Scripore: has joined #RubyOnRails
[22:45:17] pixelhandler: has joined #RubyOnRails
[22:45:55] hakunin: has joined #RubyOnRails
[22:47:23] babykosh: has joined #RubyOnRails
[22:48:05] babykosh: is there a way to install a ruby with rbenv with ???no-rdoc set?
[22:48:07] startupality: has joined #RubyOnRails
[22:48:36] ekain: has joined #RubyOnRails
[22:48:52] asteros: has joined #RubyOnRails
[22:49:12] JoshGlzBrk: has joined #RubyOnRails
[22:49:53] dclo: has joined #RubyOnRails
[22:51:33] baweaver: has joined #RubyOnRails
[22:52:00] rickmasta: has joined #RubyOnRails
[22:52:11] babykosh: trying to install 2.1.2 and keep getting this error???make: *** [rdoc] Error 1
[22:53:31] codepete: has joined #RubyOnRails
[22:54:07] jcaho_m: has joined #RubyOnRails
[22:55:34] [H]unt3r: has joined #RubyOnRails
[22:55:45] babykosh: nvr mind i got it
[22:55:59] mark[oz]: has joined #RubyOnRails
[22:57:38] chadwtaylor: has joined #RubyOnRails
[22:57:51] bamorim: has joined #RubyOnRails
[22:57:57] jenrzzz: has joined #RubyOnRails
[23:01:21] tjbiddle: has joined #RubyOnRails
[23:02:05] fgo: has joined #RubyOnRails
[23:03:25] Guest86906: has left #RubyOnRails: ()
[23:03:28] djbkd: has joined #RubyOnRails
[23:05:36] mello: has joined #RubyOnRails
[23:05:36] mello: has joined #RubyOnRails
[23:06:38] rubyonrailed: has joined #RubyOnRails
[23:08:23] ekain: has joined #RubyOnRails
[23:12:00] x-light: has joined #RubyOnRails
[23:14:25] mary5030: has joined #RubyOnRails
[23:14:50] prereflect: has joined #RubyOnRails
[23:17:50] jonahR: has joined #RubyOnRails
[23:19:08] Ropeney: has joined #RubyOnRails
[23:20:45] Axsuul: has joined #RubyOnRails
[23:21:40] Axsuul: has joined #RubyOnRails
[23:22:31] Axsuul: has joined #RubyOnRails
[23:23:30] jkamenik: has joined #RubyOnRails
[23:27:00] hahuang65: has joined #RubyOnRails
[23:28:21] moeabdol: has joined #RubyOnRails
[23:30:00] Rubie: has joined #RubyOnRails
[23:31:31] rubie_: has joined #RubyOnRails
[23:32:11] quazimodo: has joined #RubyOnRails
[23:32:12] ekain: has joined #RubyOnRails
[23:33:04] x1337807x: has joined #RubyOnRails
[23:34:09] sardev: has joined #RubyOnRails
[23:34:21] ogpastal_: has joined #RubyOnRails
[23:34:36] JoshGlzBrk: has joined #RubyOnRails
[23:36:08] eriksays: has joined #RubyOnRails
[23:37:51] cooldman224: has joined #RubyOnRails
[23:38:51] asheinfeld: has joined #RubyOnRails
[23:39:29] twilling: has joined #RubyOnRails
[23:42:33] twilling: has joined #RubyOnRails
[23:46:30] michael_mbp: has joined #RubyOnRails
[23:47:17] zubov: has joined #RubyOnRails
[23:47:56] charliesome: has joined #RubyOnRails
[23:48:17] willharr_: has joined #RubyOnRails
[23:48:32] mark[oz]: has joined #RubyOnRails
[23:50:36] dclo: has joined #RubyOnRails
[23:51:01] ght: I have a standard profile page in RoR 4.2, and I want to add a button or link to send the current contents of the form as a post statement without having to save the forms.
[23:51:05] ght: Any thoughts on that? Is that possible?
[23:51:10] njero: has joined #RubyOnRails
[23:51:24] djbkd: has joined #RubyOnRails
[23:51:26] Fire-Dragon-DoL: ght: you need to use AJAX for such a thing
[23:51:34] Fire-Dragon-DoL: if I understood correctly what you want
[23:51:37] gambl0re: has joined #RubyOnRails
[23:52:13] ght: Yes, just taking the current contents of a rails form_for and sending the data in a POST statement via a button or link without having to save the changes in Rails.
[23:52:52] ght: Fire-Dragon-Dol: Any thoughts on a gem to facilitate that? Or perhaps a starting point in terms of research?
[23:52:54] rhizome: what does "in rails" mean there
[23:53:37] Fire-Dragon-DoL: ght: you can use form_for(remote: true) http://edgeguides.rubyonrails.org/working_with_javascript_in_rails.html#form-for
[23:54:01] Fire-Dragon-DoL: it's quite nice
[23:55:43] asheinfeld: has joined #RubyOnRails
[23:55:55] commondream: has joined #RubyOnRails
[23:55:56] hotpancakes: has joined #RubyOnRails
[23:58:15] drale2k: has joined #RubyOnRails