« Back to channel list

#RubyOnRails - 03 June 2016

« Back 1 day Forward 1 day »
[00:00:04] flashpoint9: AMS is working at least partly because I removed extraneous meta data like craeeted at etc
[00:00:15] roamingdog: has joined #RubyOnRails
[00:00:23] flashpoint9: Any one know whats wrong or what the right path is?
[00:00:50] quazimodo: has joined #RubyOnRails
[00:00:51] quazimod1: has joined #RubyOnRails
[00:02:11] roamingd_: has joined #RubyOnRails
[00:03:29] jas02: has joined #RubyOnRails
[00:03:38] flashpoint9: got to run an errand ill be back!
[00:06:49] manfrin: has joined #RubyOnRails
[00:07:13] dandaman: has joined #RubyOnRails
[00:07:57] DoctorMonocular: has joined #RubyOnRails
[00:12:14] IFrank00: has joined #RubyOnRails
[00:12:24] IFrank004: has joined #RubyOnRails
[00:16:09] David_H_Smith: has joined #RubyOnRails
[00:17:20] creature: has joined #RubyOnRails
[00:17:20] creature: has joined #RubyOnRails
[00:17:23] David_H_Smith: has joined #RubyOnRails
[00:17:50] rickmasta: has joined #RubyOnRails
[00:18:12] hahuang65: has joined #RubyOnRails
[00:18:42] allcentury: has joined #RubyOnRails
[00:19:02] janebootydoe: has joined #RubyOnRails
[00:20:02] dandaman1: has joined #RubyOnRails
[00:20:43] mwlang: has joined #RubyOnRails
[00:21:51] webdestroya: has joined #RubyOnRails
[00:22:10] IFrank004: has joined #RubyOnRails
[00:22:10] IFrank00: has joined #RubyOnRails
[00:22:24] owenjones: has joined #RubyOnRails
[00:23:20] Radar: > Active Model Serilizers
[00:23:24] mwlang: Any idea what causes “TypeError: couldn't digest ActiveSupport::StringInquirer”? https://gist.github.com/mwlang/83cd33a43d6aaf85adb4c2a688c8dc7f
[00:23:41] Radar: trying to use AMS to output stuff that it isn't built to output is what the problem is.
[00:23:43] mwlang: I’ve virtually commented everything out and still get the error.
[00:24:13] Radar: mwlang: nope.
[00:24:17] lightt: has joined #RubyOnRails
[00:24:52] mwlang: rake assets:clean && rake tmp:cache:clear didn’t help, either.
[00:25:01] mwlang: any idea what to try next?
[00:25:08] Radar: mwlang: steps to reproduce in a new app kthx
[00:26:11] mwlang: ah, good idea.
[00:26:41] deadhound: has joined #RubyOnRails
[00:28:04] jenrzzz: has joined #RubyOnRails
[00:28:04] jenrzzz: has joined #RubyOnRails
[00:28:05] flashpoint9: has joined #RubyOnRails
[00:28:27] flashpoint9: Question, Im creating an api and rendering the json which looks like https://gist.github.com/JosephLeon/931be330ec08da2d524ac216e47735ed and I want to wrap them in a larger json object like https://gist.github.com/JosephLeon/84b5adb0e110423a96dcf308a1ec5dc5
[00:28:42] flashpoint9: I tried with Active Model Serilizer but still cant get it wrapped, AMS is working at least partly because I removed extraneous meta data like craeeted at etc
[00:28:44] JesseH: has joined #RubyOnRails
[00:29:30] mwlang: learn something new every day: http://api.rubyonrails.org/classes/ActiveSupport/StringInquirer.html
[00:30:41] jottr_: has joined #RubyOnRails
[00:33:07] flashpoint9: I got it with this
[00:33:08] flashpoint9: render json: { :stores => @stores }
[00:33:20] Axilla: flashpoint9: jbuilder 4tw
[00:33:35] flashpoint9: did I use jbuilder?
[00:33:54] flashpoint9: not familiar with it
[00:33:55] Axilla: did you create a file called blah.json.jbuilder in your rails views?
[00:34:11] Axilla: then no you didnt :)
[00:34:14] Axilla: https://github.com/rails/jbuilder
[00:34:27] Axilla: its a DSL for creating JSON data/structures
[00:34:34] Axilla: its really good, fast, and easy to use
[00:34:50] flashpoint9: ah, i knew it had to do with API stuff, I was building an api from scratch
[00:35:03] SteenJobs: mwlang: waaat. can you do that for any string?
[00:35:03] flashpoint9: ill probably swing back around again and try that gem out
[00:35:18] Axilla: all you need to do with jbuilder is create your instance variable
[00:35:33] Axilla: then in your jbuilder view create how you want to display that data.. pretty straight forward and easy..
[00:35:49] flashpoint9: axilla: thanks for the info
[00:37:17] Axilla: do i need the mysql-server/client to install the gem or just the dev libs? I don't want server/client on my server since i'm using AWS RDS
[00:37:59] manfrin: has joined #RubyOnRails
[00:38:09] mwlang: SteenJobs: any string instantiated as a ActiveSupport::StringInquirer
[00:38:15] flashpoint9: SteenJobs: I think you could use "any" string but it still needs to be wrapped
[00:38:21] flashpoint9: in that class
[00:38:51] SteenJobs: mwlang, flashpoint9: that’s huge…it’s like enums in Swift in the sense that it’s an excellent way to avoid comparing raw string values
[00:39:00] mwlang: ActiveSupport::StringInquirer.new("hello").hello? => true
[00:39:01] SteenJobs: which won’t throw an error if you type it wrong
[00:45:05] arBmind: has joined #RubyOnRails
[00:46:13] jbermudes: has joined #RubyOnRails
[00:46:58] jstransky: has joined #RubyOnRails
[00:50:14] lightt: has joined #RubyOnRails
[00:51:08] Inside: has joined #RubyOnRails
[00:53:12] Radar: SteenJobs: It's why you can do Rails.env.production?
[00:54:07] SteenJobs: Radar: right - i took a look at the docs. it looks like something i’d now try to use whenever i have to compare important raw string values. i’ve used enum in the past, but i like this StringInquirer fella
[00:54:44] SteenJobs: which, mind you, enum presumably uses the same because of the additional methods added to your enum that let you do .your_value?
[00:55:23] Ropeney: has joined #RubyOnRails
[00:57:26] fedexo: has joined #RubyOnRails
[00:57:38] jas02: has joined #RubyOnRails
[01:01:31] deadhound: has left #RubyOnRails: ()
[01:03:17] manfrin: has joined #RubyOnRails
[01:03:34] Axilla: ruby enums leave a lot to be desired
[01:03:50] Axilla: ruby/rails enums i should say.. i use a gem called ClassyEnums by a local dev here that i really love
[01:04:16] Axilla: https://github.com/beerlington/classy_enum
[01:04:23] Axilla: its one gem that i use in almost every project i have..
[01:04:29] Axilla: and i don't use many gems
[01:08:21] maxx88: has joined #RubyOnRails
[01:13:59] k1io: has joined #RubyOnRails
[01:17:24] mikecmpbll: has joined #RubyOnRails
[01:22:03] hiennaj: has joined #RubyOnRails
[01:23:13] lightt: has joined #RubyOnRails
[01:23:14] roamingdog: has joined #RubyOnRails
[01:24:09] roamingdog: has joined #RubyOnRails
[01:24:43] quazimodo: how do we specify tell simple_form to build a route like /users/locations or /users/locations/:id when locations are a nested collection resource under users?
[01:25:02] quazimodo: doing simple_form [current_user, @location] gives a url of /users/locations.1
[01:25:12] quazimodo: so clearly simple_form's trying to use the current_user id
[01:25:19] hiennaj: Aye guys, anyone know what happened to ruby koans?
[01:25:52] hiennaj: http://rubykoans.com/ github giving 404
[01:27:09] roamingdog: hiennaj: works for me
[01:27:23] hiennaj: I've got issues on my end.
[01:27:35] Radar: works for me too
[01:27:46] Radar: quazimodo: how did you define the route for users + locations?
[01:27:50] Radar: quazimodo: did you do resource, or resources?
[01:27:58] hiennaj: could anyone perhaps route me to a sub directory link?
[01:28:07] hiennaj: local network jackasses
[01:28:44] Radar: hiennaj: looks like github.com/neo is not what it used to be...
[01:29:02] artto: has joined #RubyOnRails
[01:29:28] manfrin: has joined #RubyOnRails
[01:29:31] beilabs: has joined #RubyOnRails
[01:29:34] hiennaj: Hmm. I just want koans lol been looking all day. Can't find a legitimate original
[01:29:45] roamingdog: https://github.com/neo/ruby_koans/blob/master/download/rubykoans.zip?raw=true
[01:29:59] roamingdog: oh, that's 404 for me
[01:30:13] hiennaj: Yeah, same.
[01:30:21] hiennaj: Was a great src for learning ruby
[01:31:13] quazimodo: Radar: i'm actually gisting it rigth now
[01:32:03] hiennaj: googling gist.. lol I never got into that
[01:33:41] flashpoint9: I have ruby koans on a repo https://github.com/JosephLeon/ruby-koans
[01:33:43] dblessing: has joined #RubyOnRails
[01:33:56] hiennaj: Thank you!
[01:33:57] flashpoint9: im partially into it, not sure how to reset it
[01:34:10] flashpoint9: i think I went through the first 4 lessons
[01:34:12] hiennaj: It's alright, better than nothing. I'll learn it
[01:34:17] SteenJobs: has joined #RubyOnRails
[01:34:24] hiennaj: Or anyone have better source for learning ruby?
[01:34:36] flashpoint9: koans is really good
[01:34:43] quazimodo: radar: https://gist.github.com/siassaj/1075615492e7f0e6dbd6d051bbe50a03
[01:34:49] flashpoint9: ruby docs are good too
[01:35:10] cd83x: has joined #RubyOnRails
[01:35:20] quazimodo: Radar: it's a little experiment in routing tbh, i wanted to keep all the users stuff under the /users/ that devise sets up
[01:35:22] Radar: quazimodo: Why did you wrap it in collection do?
[01:35:30] flashpoint9: @hiennaj looks like code academy has ruby https://www.codecademy.com/learn/ruby
[01:35:41] quazimodo: Radar: it's always for current user, having users/:user_id felt redundant
[01:35:52] quazimodo: also, devise does /users/edit for example
[01:35:56] Radar: quazimodo: So if it's always for the current user, then put it at /locations ?
[01:35:58] hiennaj: I forgot about code academy. Thank you for the help guys.
[01:36:01] Radar: I don't get why it needs to be nested at all.
[01:36:07] flashpoint9: hiennaj: have fun!
[01:36:32] hiennaj: RIP brain. I'm still clueless as to what to do in development. Just learning langs
[01:37:04] flashpoint9: hiennaj: I like to try and build things that have to do with hobbies
[01:37:20] hiennaj: I did with java.
[01:37:25] flashpoint9: like a ruby gem that uses nokogiri to scrape yahoo for stock prices etc
[01:37:42] flashpoint9: Good night all!
[01:37:50] hiennaj: I'm still not familiar with ruby and gems, etc. but good night and thank you again
[01:40:10] quazimodo: Radar: you're correct for now, i don't know if later a signed in user can have access to other locations on the sytem too.
[01:40:24] quazimodo: i kept /location in case i need a more general route
[01:40:32] quazimodo: but your suggestion is quite valid enough.
[01:40:54] quazimodo: I suppose i'm trying to figure out how to construct a form in case i did have to have this nested set up
[01:41:24] owenjones: has joined #RubyOnRails
[01:41:28] quazimodo: in other code i looked over we're manually setting the create/update paths and not letting simple_form or polymorphic_path decide
[01:42:15] Radar: I have to take some attributes that have changed on one model, called Product, and blat them out to another model, called Advert. Anyone got some advice on how to do that?
[01:42:31] arBmind1: has joined #RubyOnRails
[01:42:32] quazimodo: Radar: blat?
[01:42:34] Radar: i.e. an advert is linked to a product, so that if a product changes, then an advert should change with it.
[01:42:41] Radar: quazimodo: Techncial term.
[01:42:46] quazimodo: i haven't heard it before
[01:43:06] Radar: "make a bleating sound."
[01:43:45] quazimodo: wrap it up with a specialised AdvertisedProduct class that takes care of it?
[01:46:24] quazimodo: i mean, i know the answer sounds trivial but changed? gives you what changed and you can specify it with a locally defined proxy translator thing if you need to transform the data
[01:47:06] chrisml: has joined #RubyOnRails
[01:47:53] Radar: changed? would only return if the object changed or not.
[01:48:20] Radar: And Reform doesn't expose "changes", so that's nice.
[01:48:25] quazimodo: there's a method tha gives you what actually changed
[01:48:37] quazimodo: as long as it's AR anyway
[01:49:05] quazimodo: reform saved my ass last weekend
[01:51:11] arathald: has joined #RubyOnRails
[01:51:51] jas02: has joined #RubyOnRails
[01:54:18] blackjid: has joined #RubyOnRails
[01:54:55] dandaman1: has joined #RubyOnRails
[01:55:57] arathald: has joined #RubyOnRails
[01:57:17] blackjid: has joined #RubyOnRails
[02:00:09] Pupeno: has joined #RubyOnRails
[02:00:17] arathald: has joined #RubyOnRails
[02:00:24] grassass: has joined #RubyOnRails
[02:00:36] noobsu: has joined #RubyOnRails
[02:01:03] yfeldblum: has joined #RubyOnRails
[02:01:42] yfeldblum: has joined #RubyOnRails
[02:01:48] blackjid: has joined #RubyOnRails
[02:03:47] blackjid: has joined #RubyOnRails
[02:05:19] Axilla: anyone know why in my cap deploy to productions its copying the puma config for my staging even though i have set :puma_env, fetch(:rack_env, fetch(:rails_env, 'production')) in production.rb?
[02:05:40] arathald: has joined #RubyOnRails
[02:05:42] Axilla: when it creates the shared puma.rb file the environment is staging..
[02:05:58] Axilla: i initially had it setup wrong, but now its not updating the file
[02:07:17] blackjid: has joined #RubyOnRails
[02:08:04] Axilla: on my EC2 instance when i do 2.2.3 :002 > ENV.fetch("RAILS_ENV")
[02:08:14] Axilla: i get production...
[02:10:44] beilabs: has joined #RubyOnRails
[02:11:02] one_zero: has joined #RubyOnRails
[02:11:17] mwlang: has joined #RubyOnRails
[02:11:17] blackjid: has joined #RubyOnRails
[02:11:25] sevenseacat: has joined #RubyOnRails
[02:11:27] agent_white: has joined #RubyOnRails
[02:11:52] lightt: has joined #RubyOnRails
[02:12:18] blackjid: has joined #RubyOnRails
[02:12:57] arathald: has joined #RubyOnRails
[02:12:58] dandaman: has joined #RubyOnRails
[02:13:48] blackjid: has joined #RubyOnRails
[02:14:07] emachnic: has joined #RubyOnRails
[02:18:05] sypheren: has joined #RubyOnRails
[02:18:49] Axilla: alright then
[02:19:00] Axilla: it looks like capistrano creates the puma.rb file on initial deploy and doesn't update it
[02:19:11] Axilla: so i had to manually set the environment after my goof.. intersting
[02:19:23] Axilla: changing the environement on my server to production worked on the next deploy
[02:23:05] dmz: has joined #RubyOnRails
[02:23:05] dmz: has joined #RubyOnRails
[02:30:09] cd83x: has joined #RubyOnRails
[02:31:55] _Tariq: has joined #RubyOnRails
[02:32:05] rockyroadster: has joined #RubyOnRails
[02:32:35] IT-Manager_: has joined #RubyOnRails
[02:32:49] jottr_: has joined #RubyOnRails
[02:33:08] dblessing: has joined #RubyOnRails
[02:36:06] Axilla: well that didn't work out like i hoped :(
[02:37:52] jancel: has joined #RubyOnRails
[02:38:03] Axilla: i copied images from one s3 bucket to another that were uploaded w/ paperclip but they're still not showing up... hmmmm
[02:38:30] chouhoul_: has joined #RubyOnRails
[02:45:20] arBmind: has joined #RubyOnRails
[02:45:58] jas02: has joined #RubyOnRails
[02:51:04] spalenza: has joined #RubyOnRails
[02:51:23] DanByc: has joined #RubyOnRails
[02:51:40] Psyko: has joined #RubyOnRails
[02:57:26] harai: has joined #RubyOnRails
[02:59:50] Axilla: answer.. when using aws cli sync you need to make them all public after the transfer
[02:59:57] Axilla: fixed yay
[03:00:11] sandstrom: has joined #RubyOnRails
[03:00:12] Axilla: cap production deployments behind a load balancer + autoscailing to aws
[03:00:37] Axilla: pretty sure we're the only two still awake
[03:00:44] Axilla: i'm probably the only one working at 11pm ><
[03:03:00] lightt: has joined #RubyOnRails
[03:04:25] maxx88: has joined #RubyOnRails
[03:08:26] fedexo: has joined #RubyOnRails
[03:08:46] emachnic: has joined #RubyOnRails
[03:10:31] webnanners: Plenty of people work at 11pm
[03:10:32] draig: has joined #RubyOnRails
[03:10:34] Spami_: has joined #RubyOnRails
[03:10:53] sevenseacat: some people at work at 11am too :)
[03:13:41] braincrash: has joined #RubyOnRails
[03:16:31] adgtl: has joined #RubyOnRails
[03:16:31] adgtl: has joined #RubyOnRails
[03:20:59] k3rn31: has joined #RubyOnRails
[03:21:30] zel: has joined #RubyOnRails
[03:21:50] flopsec: has joined #RubyOnRails
[03:24:34] cd83x: has joined #RubyOnRails
[03:28:22] dblessing: has joined #RubyOnRails
[03:35:50] duncannz: has joined #RubyOnRails
[03:38:10] macsteps: has joined #RubyOnRails
[03:38:42] Inside: has joined #RubyOnRails
[03:38:54] Inside: has joined #RubyOnRails
[03:39:20] DZj091231kld: has joined #RubyOnRails
[03:40:12] jas02: has joined #RubyOnRails
[03:46:10] Axilla: i was kind of kidding ;) <3 hey seven
[03:46:19] Dimik: has joined #RubyOnRails
[03:46:30] Axilla: greeeeat success :D deployments with capistrano to AWS Autoscale Load Balanced web servers with RDS
[03:46:50] Axilla: this gem is the shit.. https://github.com/lserman/capistrano-elbas
[03:49:18] sevenseacat: (so was I - I'm not working lololololo)
[03:51:28] jerematic: has joined #RubyOnRails
[03:52:12] Axilla: man... that took a lot longer than i anticipated to setup my clients production environment
[03:52:28] Axilla: aws can be confusing.
[03:53:31] d0nn1e: has joined #RubyOnRails
[03:57:06] quazimodo: I need a nap
[03:58:25] tubbo: axilla: that gem looks like precisely what you were searching for
[04:02:08] Pupeno: has joined #RubyOnRails
[04:02:26] ElFerna: has joined #RubyOnRails
[04:02:31] darkxploit: has joined #RubyOnRails
[04:05:05] k3rn31: has joined #RubyOnRails
[04:06:09] lightt: has joined #RubyOnRails
[04:07:48] ElFerna: has left #RubyOnRails: ()
[04:08:02] darkxploit: has joined #RubyOnRails
[04:08:37] jetpackjoe: has joined #RubyOnRails
[04:08:57] ElFerna: has joined #RubyOnRails
[04:10:13] yfeldblum: has joined #RubyOnRails
[04:12:09] onechr: has joined #RubyOnRails
[04:13:39] jenrzzz: has joined #RubyOnRails
[04:13:39] jenrzzz: has joined #RubyOnRails
[04:15:00] darkxploit: has joined #RubyOnRails
[04:16:41] rockyroadster: has joined #RubyOnRails
[04:18:38] cd83x: has joined #RubyOnRails
[04:19:43] ElFerna: has joined #RubyOnRails
[04:25:28] jetpackjoe: has joined #RubyOnRails
[04:25:59] yfeldblum: has joined #RubyOnRails
[04:26:09] sid_fules: has joined #RubyOnRails
[04:27:08] pkrnj: has joined #RubyOnRails
[04:27:38] ensyde: has joined #RubyOnRails
[04:29:32] dandaman: has joined #RubyOnRails
[04:33:40] jottr_: has joined #RubyOnRails
[04:34:33] jas02: has joined #RubyOnRails
[04:35:32] ElFerna: has joined #RubyOnRails
[04:37:41] darkxploit: has joined #RubyOnRails
[04:37:52] ElFerna: has joined #RubyOnRails
[04:39:31] rubyonrails159: has joined #RubyOnRails
[04:40:13] owenjones: has joined #RubyOnRails
[04:41:21] darkxploit: has joined #RubyOnRails
[04:42:02] dgynn: has joined #RubyOnRails
[04:46:40] darkxploit: has joined #RubyOnRails
[04:47:58] emilkarl: has joined #RubyOnRails
[04:49:36] jovv303f: has joined #RubyOnRails
[04:50:10] Radar: smells like up dog in my room
[04:50:11] noobsu: has joined #RubyOnRails
[04:50:15] darkxploit: has joined #RubyOnRails
[04:50:38] jovv303f: How does one use a FactoryGirl factory for an embedded document in mongo?
[04:50:46] jovv303f: Like literally how to call it
[04:50:59] jovv303f: can it not be a separate let()?
[04:51:13] Radar: Step 1) don't use mongo
[04:51:32] sevenseacat: lol at 'smells like updog'
[04:51:37] dandaman: has joined #RubyOnRails
[04:51:44] Radar: if it's an embedded document it would need to be created in the same step as the original document, no?
[04:51:55] Radar: It's been years since I've used mongo
[04:52:01] jovv303f: ah ok thats what i was thinking
[04:52:06] jovv303f: yeah its torture
[04:53:39] arBmind: has joined #RubyOnRails
[04:56:13] darkxploit: has joined #RubyOnRails
[04:57:01] emachnic: has joined #RubyOnRails
[05:00:04] darkxploit: has joined #RubyOnRails
[05:03:06] tpendragon: has joined #RubyOnRails
[05:04:04] aguynamedben: has joined #RubyOnRails
[05:06:28] DoctorMonocular: has joined #RubyOnRails
[05:07:50] Spami: has joined #RubyOnRails
[05:09:43] czerasz: has joined #RubyOnRails
[05:12:20] pawnbox: has joined #RubyOnRails
[05:12:55] cd83x: has joined #RubyOnRails
[05:13:20] tildes_: has joined #RubyOnRails
[05:13:24] Devalo: has joined #RubyOnRails
[05:18:01] Devalo: has joined #RubyOnRails
[05:21:00] emilkarl: has joined #RubyOnRails
[05:21:37] dionysus69: has joined #RubyOnRails
[05:24:05] darkxploit: has joined #RubyOnRails
[05:27:30] sandstrom: has joined #RubyOnRails
[05:28:35] jas02: has joined #RubyOnRails
[05:32:19] pawnbox: has joined #RubyOnRails
[05:35:32] aguynamedben: has joined #RubyOnRails
[05:37:40] kgrz: has joined #RubyOnRails
[05:38:12] jas02: has joined #RubyOnRails
[05:39:27] grassass: has joined #RubyOnRails
[05:44:15] ksmutthu: has joined #RubyOnRails
[05:47:11] dionysus69: how do I create a devise user from console? as I understand, devise does Not save passwords in cleartext but when I create user in console I need to supply cleartext password, which will be saved as cleartext, won't it?
[05:47:58] rvanlieshout: has joined #RubyOnRails
[05:48:15] alfiemax: dionysus69, If your User model uses devise, no, the passwords would be encrypted
[05:48:35] dionysus69: oh ok thanks alfiemax xD
[05:48:51] dionysus69: just made sure before proceeding ^.^
[05:50:24] alfiemax: the user model if was generated using devise, if you take a look at the users table, you'll notice there is only `encrypted_password` field available
[05:50:28] helpa: Why don't you try it and find out for yourself?
[05:50:49] Radar: It should show in the console that it's saving the encrypted password.
[05:51:01] alfiemax: the `password=` method you use while creating a user is just provided by devise
[05:51:38] emachnic: has joined #RubyOnRails
[05:52:39] pawnbox: has joined #RubyOnRails
[05:54:15] jerematic: has joined #RubyOnRails
[05:55:46] dionysus69: hmm ok sounds good :) wasn't sure, I thought it would just assigning db variables to the input :D
[05:56:33] alfiemax: dionysus69, next time you could just try it out and see what values in the db get stored and how. that's how i figured it out :D
[05:56:51] dionysus69: ok sounds good x))
[05:57:03] dionysus69: thanks again ^.^
[05:59:26] ksoze: has joined #RubyOnRails
[06:00:17] Macaveli: has joined #RubyOnRails
[06:03:24] arathald: has joined #RubyOnRails
[06:04:32] noobsu: has joined #RubyOnRails
[06:05:30] pawnbox: has joined #RubyOnRails
[06:06:33] SteenJobs: has joined #RubyOnRails
[06:07:09] cd83x: has joined #RubyOnRails
[06:08:15] dionysus69: whats up with this? https://gist.github.com/anonymous/398c9149f83da6a3aeb85e140b242fe4 I try to save user but then it returns User exists and saving fails
[06:08:33] Radar: dionysus69: user.errors
[06:09:02] dionysus69: ok thanks Radar :D that was easy xD
[06:10:05] tpendragon: has joined #RubyOnRails
[06:10:07] aguynamedben: has joined #RubyOnRails
[06:10:54] darkxploit: has joined #RubyOnRails
[06:13:22] dionysus69: why aren't you on slack if I may ask, or your nicks are different?
[06:13:29] Radar: which slack?
[06:13:38] dionysus69: Ruby on Rails Link
[06:13:39] sevenseacat: I am in many slacks
[06:13:48] sevenseacat: yeah I left that one, it didnt offer anything
[06:13:57] dionysus69: I know of only one Rails slack team :)
[06:14:04] sevenseacat: I know of more
[06:14:07] dionysus69: hmm dunno, it has advantages over irc xD
[06:14:21] Radar: [16:13:48] <sevenseacat> yeah I left that one, it didnt offer anything
[06:14:24] SteenJobs: has joined #RubyOnRails
[06:14:25] Radar: strong agree
[06:14:48] dionysus69: well I am in both ))
[06:16:35] sevenseacat: and you still ask questions here
[06:18:14] dionysus69: thats because I missed you :D
[06:18:18] scepticulous: has joined #RubyOnRails
[06:19:06] dionysus69: well, sometimes slack channel feels/is inactive
[06:19:37] dionysus69: this is an unfortunate and unnecessary fragmentation of community
[06:20:20] sevenseacat: indeed, so I wonder why they fragmented it
[06:20:29] sevenseacat: given the IRC channel has been around far longer
[06:21:45] dionysus69: hopefully there will be a third player in future which will unite these two ))
[06:22:36] sevenseacat: too much fragmentation - must do more
[06:22:47] sevenseacat: http://xkcd.com/927/
[06:22:58] artto: has joined #RubyOnRails
[06:24:00] rafaelfranca: has joined #RubyOnRails
[06:27:05] sid_fules: has joined #RubyOnRails
[06:27:25] dionysus69: one definite advantage of slack over irc is its chat history and ability to receive messages when offline. I know irc offers some offline message capability but it requires extra command knowledge which deflects some of the users, well including me. I d rather not send a message at all than learn how to send it for only offline
[06:29:42] sevenseacat: enjoy using the slack channel then :)
[06:34:32] jottr_: has joined #RubyOnRails
[06:37:13] neanderslob: has joined #RubyOnRails
[06:37:50] simplon: has joined #RubyOnRails
[06:38:25] DZj091231kld: has joined #RubyOnRails
[06:43:09] Spami_: has joined #RubyOnRails
[06:43:42] blackjid: has joined #RubyOnRails
[06:44:11] aguynamedben: has joined #RubyOnRails
[06:44:37] yfeldblum: has joined #RubyOnRails
[06:45:54] ur5us: has joined #RubyOnRails
[06:47:51] arBmind: has joined #RubyOnRails
[06:53:46] ksoze: has joined #RubyOnRails
[06:57:45] owenjones: has joined #RubyOnRails
[07:00:55] edwinvdgraaf: has joined #RubyOnRails
[07:01:18] cd83x: has joined #RubyOnRails
[07:01:23] jerematic: has joined #RubyOnRails
[07:01:51] artto: has joined #RubyOnRails
[07:03:18] comrad: has joined #RubyOnRails
[07:04:55] sandstrom: has joined #RubyOnRails
[07:14:38] darutoko: has joined #RubyOnRails
[07:15:35] tpendragon: has joined #RubyOnRails
[07:16:01] norc_: has joined #RubyOnRails
[07:16:15] aguynamedben: has joined #RubyOnRails
[07:16:45] blackjid: has joined #RubyOnRails
[07:17:21] Macaveli_: has joined #RubyOnRails
[07:17:36] noobsu: has joined #RubyOnRails
[07:17:46] AzaToth: has joined #RubyOnRails
[07:22:15] njero: has joined #RubyOnRails
[07:23:22] zeitue: has joined #RubyOnRails
[07:28:07] arBmind1: has joined #RubyOnRails
[07:30:37] mdw: has joined #RubyOnRails
[07:31:30] mdw7: has joined #RubyOnRails
[07:33:22] darkxploit: has joined #RubyOnRails
[07:34:54] Mia: has joined #RubyOnRails
[07:34:54] Mia: has joined #RubyOnRails
[07:34:56] beilabs: has joined #RubyOnRails
[07:39:21] mark_66: has joined #RubyOnRails
[07:39:49] emachnic: has joined #RubyOnRails
[07:41:17] JmBm: has joined #RubyOnRails
[07:43:44] sevenseacat: jmb_: good afternoon
[07:44:23] sid_fules: has joined #RubyOnRails
[07:46:10] JmBm: hello sevenseacat. I came to the community for some help.
[07:46:26] sevenseacat: here is a good place to get help :)
[07:46:47] SteenJobs: has joined #RubyOnRails
[07:47:53] ksoze: has joined #RubyOnRails
[07:49:00] norc_: sevenseacat: oh brilliant. May I sit down before I talk about my problems?
[07:49:11] sevenseacat: *help with Rails code
[07:49:19] harai: has joined #RubyOnRails
[07:49:30] adaedra: ACTION takes away norc_'s _
[07:49:45] duncannz: has joined #RubyOnRails
[07:51:06] JmBm: Great! Onto my question. I'm trying to create a form for a view on one of my controllers called Main. The information for that form will be used to create a new user (@user) for the User model. I wrote code using <%= form_for @user do |f| > ... <% end %> but it gave me an error
[07:51:11] sypheren: has joined #RubyOnRails
[07:51:12] iamvery: has joined #RubyOnRails
[07:51:27] sevenseacat: what error did you get?
[07:52:10] JmBm: I'm opening up my application but from what I remember, it said undefined method 'users_path'
[07:52:31] njero: has joined #RubyOnRails
[07:52:37] sevenseacat: right, so thats the default path the form will try to submit to, given its a form for a User object
[07:52:42] sevenseacat: what route should the form submit to?
[07:53:51] watersoul: has joined #RubyOnRails
[07:54:26] jsrn: has joined #RubyOnRails
[07:54:52] JmBm: right now I'm trying to have the form submit through the create method of the Main controller.
[07:55:28] cd83x: has joined #RubyOnRails
[07:55:29] sevenseacat: so you need to find what named route that action corresponds to, and then use that in your form_for, eg. form_for @user, url: my_awesome_path do |f|
[07:58:04] JmBm: I wrote resources :users in the routes.rb file, and I stopped getting the error. I don't know if that fixes the problem or fixes one type of problem for now.
[07:58:17] sevenseacat: that does something quite different
[07:58:27] sevenseacat: now you've defined users_path, but submitting the form will raise an error
[08:01:19] JmBm: Yeah I just got the error and it told me I need to define the Users controller. That was probably my big error the whole time. I'll try to write it right now and if I finish fast I'll let you know what happens. Thanks for your help anyways sevenseacat
[08:01:52] artto: has joined #RubyOnRails
[08:01:53] sevenseacat: I thought you said you wanted to use the Main controller, not a Users controller
[08:02:06] jerematic: has joined #RubyOnRails
[08:05:35] artto: has joined #RubyOnRails
[08:07:46] JmBm: I'm trying to redo it because when it told me to implement Users controller, I used resources :users. I erased it and wrote post "/users" => "main#create"
[08:08:19] sevenseacat: I don't know what "it" is, but `resources :users` defines routes not a controller
[08:08:41] harai54: has joined #RubyOnRails
[08:08:43] sevenseacat: it seems you're a little bit shaky on the basics of MVC, what tutorial are you using?
[08:10:39] JmBm: I'm not using a tutorial. I did use Michael Hartl's Rails tutorial, but this is more for a side project I'm working on. I'm just going about this one on my own without a tutorial
[08:10:55] sevenseacat: so what told you to implement a Users controller ?
[08:12:07] kitsuneyo: has joined #RubyOnRails
[08:12:27] JmBm: That was the error on the page when I clicked Submit after putting in certain information. This was when I had resources :users
[08:13:03] sevenseacat: right, just like I said, resources :users has nothing to do with setting the URL to submit to your Main controller
[08:13:24] moeabdol: has joined #RubyOnRails
[08:14:40] moeabdol1: has joined #RubyOnRails
[08:14:45] pawnbox: has joined #RubyOnRails
[08:16:10] Devalo: has joined #RubyOnRails
[08:17:33] Takumo: Hi all, I'm deploying a rails (4.2) app using Capistrano and Capistrano puma, trying to set Jungle up but I get the error "No puma here…"
[08:18:00] quazimodo: has joined #RubyOnRails
[08:19:10] qejk: has joined #RubyOnRails
[08:21:56] AimlessRAven: has joined #RubyOnRails
[08:22:30] AimlessRAven: how to find my @order in my controller i use new action.. i call it download_codes
[08:22:37] AimlessRAven: in this action i wanna find my current_order
[08:22:51] AimlessRAven: @order = Order.find(params[:id])
[08:23:04] AimlessRAven: but rails tell me ActiveRecord::RecordNotFound: Couldn't find Order with 'id'=
[08:23:08] JmBm: alright I got it finally working the way I wanted to. I defined a post route. So it was like this: post "/main/create" => "main#create" and for the form code I put <%= form_for @user { :url => users_create_path } %>
[08:23:13] JmBm: That got it working properly
[08:23:53] sevenseacat: I don't think so
[08:24:28] sevenseacat: because your form_for line is not syntactically valid, and you also don't have a users_create_path
[08:24:45] lightt: has joined #RubyOnRails
[08:24:59] JmBm: Oh my bad. Horrible typo. I meant to say main_create_path
[08:28:53] marr: has joined #RubyOnRails
[08:29:41] JmBm: I think I was able to fix that problem. Thanks sevenseacat.
[08:29:51] sevenseacat: you're welcome.
[08:31:58] sypheren: has joined #RubyOnRails
[08:32:02] sid_fules: has joined #RubyOnRails
[08:34:26] emachnic: has joined #RubyOnRails
[08:36:32] SuppliedRelic__: has joined #RubyOnRails
[08:36:42] pawnbox: has joined #RubyOnRails
[08:36:44] Gkj8899_: has joined #RubyOnRails
[08:36:49] ELCALOR_: has joined #RubyOnRails
[08:36:49] lipoqil_: has joined #RubyOnRails
[08:36:51] meinside_: has joined #RubyOnRails
[08:36:55] Obi_obi__: has joined #RubyOnRails
[08:37:39] borkdude: has joined #RubyOnRails
[08:37:46] webhat_: has joined #RubyOnRails
[08:38:03] web_nanners: has joined #RubyOnRails
[08:38:17] dr_Poggs: has joined #RubyOnRails
[08:38:29] jiblet: has joined #RubyOnRails
[08:39:18] kaspergrubbe: has joined #RubyOnRails
[08:39:19] jokke: has joined #RubyOnRails
[08:39:22] camilasan: has joined #RubyOnRails
[08:39:22] zel: has joined #RubyOnRails
[08:39:23] zel: has joined #RubyOnRails
[08:39:48] plantigrade: has joined #RubyOnRails
[08:39:49] nibbo: has joined #RubyOnRails
[08:40:22] zeitue: has joined #RubyOnRails
[08:40:48] lacce: has joined #RubyOnRails
[08:40:50] beilabs: has joined #RubyOnRails
[08:41:03] amitchellbullard: has joined #RubyOnRails
[08:41:11] chrisml: has joined #RubyOnRails
[08:41:57] ksoze: has joined #RubyOnRails
[08:42:24] AntiSpamMeta: has joined #RubyOnRails
[08:43:16] jottr_: has joined #RubyOnRails
[08:44:56] kitsuneyo: has joined #RubyOnRails
[08:45:51] CornishPasty: has joined #RubyOnRails
[08:47:27] weckl: has joined #RubyOnRails
[08:48:38] digitalfiz: has joined #RubyOnRails
[08:49:05] DukeDave: has joined #RubyOnRails
[08:49:17] alfiemax: has joined #RubyOnRails
[08:49:43] jhill: has joined #RubyOnRails
[08:49:46] cd83x: has joined #RubyOnRails
[08:51:57] Hosh: has joined #RubyOnRails
[08:52:17] ebryn: has joined #RubyOnRails
[08:52:24] upgrayeddd: has joined #RubyOnRails
[08:53:23] deeprave: has joined #RubyOnRails
[08:54:09] moep: has joined #RubyOnRails
[08:54:16] Pupeno: has joined #RubyOnRails
[08:54:46] rafaelfranca: has joined #RubyOnRails
[08:54:46] rafaelfranca: has joined #RubyOnRails
[08:54:47] dmcc: has joined #RubyOnRails
[08:57:17] _Sypheren: has joined #RubyOnRails
[08:57:29] acalewin: has joined #RubyOnRails
[09:02:12] Sylario: has joined #RubyOnRails
[09:02:51] jerematic: has joined #RubyOnRails
[09:03:13] startupality: has joined #RubyOnRails
[09:04:55] norc: Do you reckon that using IPsec instead of TLS is a wise thing_
[09:05:17] arBmind: has joined #RubyOnRails
[09:06:08] workmaster2n: has joined #RubyOnRails
[09:06:31] edwinvdgraaf: has joined #RubyOnRails
[09:07:21] Ergo: has joined #RubyOnRails
[09:07:47] darkxploit: has joined #RubyOnRails
[09:10:33] Hates_: has joined #RubyOnRails
[09:11:08] Spami_: has joined #RubyOnRails
[09:12:03] hayden__: has joined #RubyOnRails
[09:12:28] swgillespie: has joined #RubyOnRails
[09:14:22] der-landgraf: has joined #RubyOnRails
[09:15:12] edwinvdgraaf: has joined #RubyOnRails
[09:16:51] jcp: has joined #RubyOnRails
[09:19:54] grvgr: has joined #RubyOnRails
[09:20:46] ketherah: has joined #RubyOnRails
[09:20:50] chorgi: has joined #RubyOnRails
[09:21:12] quazimodo: has joined #RubyOnRails
[09:24:41] JohnBat26: has joined #RubyOnRails
[09:27:41] sid_fules: has joined #RubyOnRails
[09:28:14] workmad3: has joined #RubyOnRails
[09:34:15] AimlessRAven: can i use each in controller
[09:34:25] AimlessRAven: @card = @order.cards.first data = Gateway.request_code(@card.gateway_id)
[09:34:31] AimlessRAven: i wanna each @order.cards
[09:34:41] AimlessRAven: and load to card.gateway_id
[09:34:50] AimlessRAven: to return me hash with this things
[09:35:00] AimlessRAven: in controller
[09:35:02] rvanlieshout: AimlessRaven: @order.cards.pluck(:gateway_id)
[09:35:15] rvanlieshout: or @order.cards.map{ |card| Gateway.request_code(card.gateway_id) }
[09:36:04] ksoze: has joined #RubyOnRails
[09:39:54] AimlessRAven: rvanlieshout: tnx
[09:41:09] rvanlieshout: you're welcome
[09:43:55] cd83x: has joined #RubyOnRails
[09:45:59] sid_fules: has joined #RubyOnRails
[09:48:19] alfiemax: has joined #RubyOnRails
[09:49:44] Tempesta: has joined #RubyOnRails
[09:51:22] noobsu: has joined #RubyOnRails
[09:53:56] Spami: has joined #RubyOnRails
[09:53:59] Spami: has joined #RubyOnRails
[09:56:08] sid_fules: has joined #RubyOnRails
[09:57:42] RedDwarf: has joined #RubyOnRails
[09:58:13] silverdust: How does rails reserve logged in session after server restart?
[09:58:48] rvanlieshout: silverdust: it depends on where session data is stored
[09:58:53] rvanlieshout: what session data store are you using?
[09:59:28] jhass: has joined #RubyOnRails
[09:59:31] silverdust: Using express now which is very basic and seeing how it uses MemoryStore by default which loses sessions on server restart it got me wondering how rails does it. I'm resorting to using redis with express now
[09:59:59] rvanlieshout: isn't the default cookie store for rails?
[10:00:04] rvanlieshout: not sure about that
[10:00:10] silverdust: expressjs I meant
[10:00:18] rvanlieshout: ah. don't know what that is
[10:00:29] rvanlieshout: and memory store uses a separate process doesn't it?
[10:01:00] silverdust: Perhaps it stores the session data in the database
[10:01:14] rvanlieshout: expressjs or rails?
[10:01:50] rvanlieshout: http://guides.rubyonrails.org/security.html#session-storage
[10:01:52] rvanlieshout: cookie store by default
[10:01:59] rvanlieshout: so sessions only get lost if cookies get lost
[10:02:32] silverdust: okay I see. Thanks
[10:03:00] noobsu: has joined #RubyOnRails
[10:03:35] jerematic: has joined #RubyOnRails
[10:05:45] shinnya: has joined #RubyOnRails
[10:05:55] artto: has joined #RubyOnRails
[10:06:15] contradictioned: has joined #RubyOnRails
[10:06:21] Quintasan: has joined #RubyOnRails
[10:06:21] Quintasan: has joined #RubyOnRails
[10:06:28] many: has joined #RubyOnRails
[10:06:40] soahccc: has joined #RubyOnRails
[10:06:54] differentreality: has joined #RubyOnRails
[10:07:31] jarib: has joined #RubyOnRails
[10:07:31] jarib: has joined #RubyOnRails
[10:07:31] bauruine: has joined #RubyOnRails
[10:08:34] CornishPasty: has joined #RubyOnRails
[10:09:24] digitalfiz: has joined #RubyOnRails
[10:09:46] DukeDave: has joined #RubyOnRails
[10:10:16] FastJack_: has joined #RubyOnRails
[10:10:22] jhill: has joined #RubyOnRails
[10:12:20] Hosh: has joined #RubyOnRails
[10:12:34] TheMonster: has joined #RubyOnRails
[10:12:37] ebryn: has joined #RubyOnRails
[10:12:45] upgrayeddd: has joined #RubyOnRails
[10:13:03] FaresKAl-: has joined #RubyOnRails
[10:13:29] thelacce: has joined #RubyOnRails
[10:13:39] deeprave: has joined #RubyOnRails
[10:13:47] vedu: has joined #RubyOnRails
[10:14:30] zyzioziom: has joined #RubyOnRails
[10:15:00] ksmutthu_: has joined #RubyOnRails
[10:15:14] dmcc: has joined #RubyOnRails
[10:18:05] acalewin: has joined #RubyOnRails
[10:18:26] pydave6367: has joined #RubyOnRails
[10:19:53] srinidhi: has joined #RubyOnRails
[10:20:52] der-land1: has joined #RubyOnRails
[10:25:10] contradictioned: has joined #RubyOnRails
[10:25:12] soahccc: has joined #RubyOnRails
[10:25:31] Quintasan: has joined #RubyOnRails
[10:25:31] Quintasan: has joined #RubyOnRails
[10:25:33] bauruine: has joined #RubyOnRails
[10:25:34] differentreality: has joined #RubyOnRails
[10:25:43] PaulePanter: has joined #RubyOnRails
[10:25:47] many: has joined #RubyOnRails
[10:26:28] Sylario: has joined #RubyOnRails
[10:28:25] AlexJakeGreen: has joined #RubyOnRails
[10:30:06] blackhuey: has joined #RubyOnRails
[10:30:15] ksoze: has joined #RubyOnRails
[10:31:01] TheMonster: has joined #RubyOnRails
[10:33:42] jokke: is there something like "as:" for the form_for helper that will _only_ alter the html id attribute of the form and fields
[10:33:50] jokke: and not the name attribute
[10:34:35] Hates_: has joined #RubyOnRails
[10:34:38] jokke: background: i need to have multiple forms for the same module and some of them have overlapping fields and so checkboxes won't work properly (since they share the same id)
[10:34:47] jokke: s/module/model/
[10:35:12] gingray: has joined #RubyOnRails
[10:35:30] sid_fules: has joined #RubyOnRails
[10:35:52] hayden__: has joined #RubyOnRails
[10:36:22] swgillespie: has joined #RubyOnRails
[10:36:28] rvanlieshout: jokke: for_for accepts html params?
[10:36:36] rvanlieshout: oh. including the fields
[10:36:55] rvanlieshout: set namespace too?
[10:37:08] rvanlieshout: :namespace - A namespace for your form to ensure uniqueness of id attributes on form elements. The namespace attribute will be prefixed with underscore on the generated HTML id.
[10:37:33] jokke: cool i'll try that
[10:38:28] cd83x: has joined #RubyOnRails
[10:40:20] AimlessRAven: has joined #RubyOnRails
[10:40:27] AimlessRAven: https://gist.github.com/anonymous/04698b6fbf70f5ceb3f6fefe87e6fdc4
[10:40:40] AimlessRAven: where here i can add my data objects
[10:40:58] AimlessRAven: for now just create csv with ['ID', 'Product', 'Activation number', 'Activation pin']
[10:41:03] AimlessRAven: theese headers.. how to include my data
[10:41:27] jcp: has joined #RubyOnRails
[10:41:45] vedu: has joined #RubyOnRails
[10:43:33] c355E3B: has joined #RubyOnRails
[10:45:01] grvgr: has joined #RubyOnRails
[10:45:28] alfiemax: has joined #RubyOnRails
[10:45:44] AzaToth: has joined #RubyOnRails
[10:46:01] ketherah: has joined #RubyOnRails
[10:46:02] chorgi: has joined #RubyOnRails
[10:46:13] Ergo: has joined #RubyOnRails
[10:49:47] flopsec: has joined #RubyOnRails
[10:49:48] mlitwiniuk: has joined #RubyOnRails
[10:49:48] webhat_: has joined #RubyOnRails
[10:49:48] Jasaka: has joined #RubyOnRails
[10:49:48] tw1sted: has joined #RubyOnRails
[10:49:48] eljimador: has joined #RubyOnRails
[10:49:48] oweff: has joined #RubyOnRails
[10:49:48] M-shine: has joined #RubyOnRails
[10:49:48] hypnosb: has joined #RubyOnRails
[10:49:48] eisi: has joined #RubyOnRails
[10:50:55] DaniG2k: has joined #RubyOnRails
[10:51:52] jokke: rvanlieshout: perfect
[10:52:00] jokke: rvanlieshout: works like a charm, thanks
[10:54:00] norc: So. I want to provide some critical data to the internet through an API. Now concerns were raised, and people want something in front of Rails to do some content validation (size constraints, URL formats).
[10:54:22] norc: Basically make it even harder to find attack vectors on Rails itself or my application.
[10:55:44] sandstrom: has joined #RubyOnRails
[10:58:23] pydave6367: has joined #RubyOnRails
[11:00:44] artto_: has joined #RubyOnRails
[11:02:29] darkxploit: has joined #RubyOnRails
[11:02:51] artto: has joined #RubyOnRails
[11:04:06] rodfersou: has joined #RubyOnRails
[11:04:23] jerematic: has joined #RubyOnRails
[11:05:04] Takumo: norc: AWS WAF sounds like what you want
[11:05:22] Takumo: or AWS API Gateway might be even better as you can check request contents directly
[11:05:57] sid_fules: has joined #RubyOnRails
[11:06:49] norc: Takumo: Are these AWS services limited to hosting inside the Amazon cloud?
[11:07:28] Takumo: norc: no, but I think there's a few features which are limited to AWS hosted services
[11:07:47] Moeh: has joined #RubyOnRails
[11:08:13] Takumo: but I don't think they're features you would use (e.g. using a lambda function to check access credentials before passing a request to backend)
[11:10:26] AimlessRAven: https://gist.github.com/anonymous/8818175fefe5ab7dcf7da89eeb49a640
[11:10:39] AimlessRAven: here i generate csv file in my public/exports/order_codes
[11:10:52] artto: has joined #RubyOnRails
[11:10:53] AimlessRAven: how to download this csv who my link generate
[11:12:29] Fernando-Basso: has joined #RubyOnRails
[11:15:09] moeabdol1: has joined #RubyOnRails
[11:16:47] norc: Takumo: Or a combination of the two products could be sensible.
[11:18:13] norc: Takumo: That actually might be the first product that could convince me. We have been presented by a few expensive security appliances, calling themselves "API Gateways".
[11:18:54] norc: Takumo: But when the vendor tells me how great its security is, after all it was not even vulnerable to Heartbleed because they have their own custom build SSL library.. (and that got me worried immediately)
[11:23:23] lightt: has joined #RubyOnRails
[11:26:20] Takumo: norc: as it should
[11:26:27] Takumo: if you think you know how to implement TLS properly
[11:26:37] Takumo: you can be sure you don't know how to implement TLS properly
[11:26:47] King_Rex: has joined #RubyOnRails
[11:27:53] AimlessRAven: https://gist.github.com/anonymous/67e511c8ef509ede81ba13b4178dafcf
[11:28:02] AimlessRAven: this link in my order view start action in my controller
[11:28:05] AimlessRAven: this generate csv file
[11:28:22] AimlessRAven: no how to make this link to generate and download this file
[11:28:35] AimlessRAven: for now just generate file .. but how to download in same aaction
[11:28:40] AimlessRAven: and same click
[11:29:26] ksoze: has joined #RubyOnRails
[11:30:35] k3rn31: has joined #RubyOnRails
[11:30:43] lacce: has joined #RubyOnRails
[11:31:01] alfiemax: has joined #RubyOnRails
[11:31:36] Hyuk: has joined #RubyOnRails
[11:32:33] cd83x: has joined #RubyOnRails
[11:32:53] AlexJakeGreen: has joined #RubyOnRails
[11:33:29] norc: Takumo: Indeed. From all my research I kept stumbling over one something. If there is something that all cryptographers can agree on, is that it is notoriously hard to implement cryptographic algorithms correctly.
[11:33:32] sid_fules: has joined #RubyOnRails
[11:33:35] AimlessRAven: or just how to make when my action is donw to download this csv
[11:33:58] norc: Takumo: And heartbleed was actually a great example of that, how the smallest mistakes can compromise the entire security system.
[11:36:44] Takumo: a small error which was unnoticed for YEARS
[11:37:28] Jamo_: has joined #RubyOnRails
[11:37:33] jamon_: has joined #RubyOnRails
[11:39:32] Jamo_: has joined #RubyOnRails
[11:39:52] pydave6367: has joined #RubyOnRails
[11:41:45] xlegoman: has joined #RubyOnRails
[11:41:49] jamo: has joined #RubyOnRails
[11:43:04] srinidhi: has joined #RubyOnRails
[11:44:42] snowy: has joined #RubyOnRails
[11:44:43] marchelzo: has joined #RubyOnRails
[11:45:21] allcentury: has joined #RubyOnRails
[11:46:25] norc: Takumo: Well the problem for that was unrelated.. not many people review OpenSSL..
[11:46:42] norc: Which might have to do that most people do not understand cryptography enough in the first place. :o)
[11:48:44] Takumo: I'm confident enough with tls to configure it properly on nginx because there's decent tools and whitepapers to check against
[11:48:50] Takumo: but I certainly wouldn't write my own tls code!
[11:49:54] maesitos: has joined #RubyOnRails
[11:50:52] ldnunes: has joined #RubyOnRails
[11:52:23] Takumo: norc: I think APIGW would probably be the best thing for your needs thikning about it, WAF is more for full apps which need to do scan for XSS and SQLi
[11:52:56] Takumo: APIGW you can limit specific requests e.g. "PUT /foo/bar must have a request looking like this: {...}."
[11:55:03] tvw: has joined #RubyOnRails
[11:56:34] rodferso1: has joined #RubyOnRails
[11:57:11] zyzioziom: has joined #RubyOnRails
[11:58:11] artto: has joined #RubyOnRails
[11:58:11] norc: Takumo: The pricing model is a lot more attractive.
[11:58:28] norc: Takumo: Seeing as we are just a small company, 5 figures for some security appliance is hard to justify.
[11:58:29] maucar: has joined #RubyOnRails
[11:58:30] Takumo: norc: you mean it isn't oracle pricing?
[11:59:08] norc: Takumo: In Oracle reporting bugs is not for free...
[11:59:09] Takumo: We're a small company too, we use AWS a lot (we're partners) so AWS is where I go to find a solution to an architectural or systems requirement
[11:59:13] kgrz_: has joined #RubyOnRails
[11:59:41] Takumo: norc: actually reading an article right now about how ugly Oracle is to customers
[12:00:26] norc: Takumo: Their last move to change licensing so that hosting on virtualized servers is practically impossible was really disgusting.
[12:00:34] norc: Takumo: It is a direct show stopper to upgrade to 12.
[12:01:05] norc: (If you happen to virtualize your guests on hosts with 24 or 48 cores like we do)
[12:02:56] Takumo: norc: let me guess, they charge per vm per physical host cpu?
[12:03:08] artto: has joined #RubyOnRails
[12:03:14] norc: In a nutshell, yes.
[12:03:48] Takumo: norc: are you using Lolacle?
[12:03:58] norc: Takumo: say what?
[12:04:16] kgrz: has joined #RubyOnRails
[12:04:44] DragonPunch: has joined #RubyOnRails
[12:05:03] Takumo: norc: Are you using Oracle, and is that an issue you are actually facing?
[12:05:03] norc: Takumo: Then you have these professional features which are readily activated on standard, but require licensing to use. And when Oracle then finds out you were using them, they charge you for the professional edition.. retroactively.
[12:05:07] jerematic: has joined #RubyOnRails
[12:05:12] norc: Takumo: Oh. We might. ;-)
[12:05:18] Takumo: norc: You poor soul.
[12:05:27] norc: Oracle itself is actually quite fine.
[12:06:32] ishamo: has joined #RubyOnRails
[12:06:54] nettoweb: has joined #RubyOnRails
[12:09:34] Pumukel: has joined #RubyOnRails
[12:09:35] beilabs: has joined #RubyOnRails
[12:10:19] Pupeno: has joined #RubyOnRails
[12:10:42] chouhoulis: has joined #RubyOnRails
[12:11:27] solars: has joined #RubyOnRails
[12:12:00] chouhoulis: has joined #RubyOnRails
[12:12:48] pontiki: has joined #RubyOnRails
[12:16:25] AntiSpamMeta: has joined #RubyOnRails
[12:17:04] rbr: has joined #RubyOnRails
[12:18:08] tbuehlmann: when having a gem more than once in the Gemfile, bundler spits out a warning. what to do about this if I, for example, want to have `gem 'pry-rails'` in the development group AND `gem 'pry-rails', require: false` in the production group?
[12:19:08] rvanlieshout: tbuehlmann: don't include it twice? :)
[12:19:30] rvanlieshout: require it conditionally in an initializer
[12:19:54] ksoze: has joined #RubyOnRails
[12:22:25] pydave6367: has joined #RubyOnRails
[12:22:36] artto: has joined #RubyOnRails
[12:23:05] alfiemax: has joined #RubyOnRails
[12:26:23] refinerysource: has joined #RubyOnRails
[12:26:41] artto: has joined #RubyOnRails
[12:26:44] cd83x: has joined #RubyOnRails
[12:27:11] xlegoman: has joined #RubyOnRails
[12:30:04] artto: has joined #RubyOnRails
[12:32:01] Pupeno: has joined #RubyOnRails
[12:32:25] darkxploit: has joined #RubyOnRails
[12:34:58] AimlessRAven: has joined #RubyOnRails
[12:35:12] AimlessRAven: = link_to "Download codes", corporate_order_download_codes_path(@order), class: 'btn btn-default m-t-10', data: { confirm: "If you click confirm, these cards will be marked as active"}, :target => "_blank"
[12:35:20] AimlessRAven: i click the button and then confirm
[12:35:25] AimlessRAven: but then i need to click again to link
[12:35:27] AimlessRAven: for download ..
[12:35:30] AimlessRAven: not automaticly
[12:35:47] rvanlieshout: because most browsers stop js execution after serving a downloadable file
[12:35:49] bruce_lee: has joined #RubyOnRails
[12:37:04] AimlessRAven: rvanlieshout: how to fix this
[12:38:00] rvanlieshout: by downloading using an iframe
[12:38:06] rvanlieshout: and i guess there are many methods more
[12:38:22] rvanlieshout: don't often have this scenario, so i don't know what people these day use for that
[12:39:21] fmcgeough: has joined #RubyOnRails
[12:40:22] perkisto: has joined #RubyOnRails
[12:41:34] flashpoint9: has joined #RubyOnRails
[12:41:46] perkisto: I'm just starting to test my Rails apps and came across the FactoryGirl gem. I was wondering if it's still the way to go?
[12:43:15] norc: perkisto: FactoryGirl is useful for tests sure.
[12:43:56] norc: perkisto: there is some other alternatives though. machinist or fabrication for example.
[12:44:18] norc: Machinist is pretty dead however.
[12:44:21] rvanlieshout: we still go with factorygirl here
[12:44:41] perkisto: I'd like to go for something that's well maintained and will presumably be around for a while
[12:45:12] norc: perkisto: factorygirl is the way to go then.
[12:45:56] Pupeno: has joined #RubyOnRails
[12:46:42] noobsu_: has joined #RubyOnRails
[12:46:57] rubyonrails877: has joined #RubyOnRails
[12:47:50] rubyonrails877: I'm trying to setup a nav bar to show certain links based on logged in and logged out status using devise. But even logged out the users status is showing logged in. Any ideas? My navbar code : https://gist.github.com/rivacom/3e6c2db2c7f6e15a50925608e2845f5b
[12:48:29] rvanlieshout: rubyonrails877: 'the status is showing logged in' means?
[12:49:47] rubyonrails877: I would assume that my if statement <% if user_signed_in? %> would catch if your signed in, which it does. If i hit log off/sign out, it signs out but it's still catching the if statement as signed in instead of using the else.
[12:50:06] rvanlieshout: even if you reload that page?
[12:50:12] rvanlieshout: log the user_signed_in? part
[12:50:29] rubyonrails877: i have <%= user_signed_in? %> in there and it comes back true even if signed out
[12:51:09] rvanlieshout: and what is <%= current_user %> ?
[12:52:11] rubyonrails877: #<User:0x007f2c24d2bb10>
[12:52:33] rvanlieshout: so then you're not signed out
[12:54:07] rubyonrails877: i've restarted teh server and database and it still shows that when i first goto the page.
[12:54:14] rubyonrails877: seems odd i'd be signed in on a fresh start
[12:54:23] rvanlieshout: that's because a server restart doesn't drop session
[12:55:37] sid_fules: has joined #RubyOnRails
[12:55:58] rubyonrails877: So would this be something with devise not destroying the session?
[12:56:22] darkxploit: has joined #RubyOnRails
[12:56:25] rvanlieshout: i doubt it's a devise bug
[12:56:35] rvanlieshout: more like something like you're not hitting the sign out path correctly
[12:57:52] sevenseacat: where are you signing the user out?
[12:58:17] ramortegui: has joined #RubyOnRails
[12:59:13] rubyonrails877: <%= link_to 'Logout', destroy_user_session_path, method: :delete %>
[12:59:44] rvanlieshout: and does your js console mention anything when you click that link?
[12:59:53] rvanlieshout: what does the log display for the request?
[13:01:04] hcnewsom: has joined #RubyOnRails
[13:01:13] rubyonrails877: Shows Started DELETE "/users/sign_out" for ip
[13:01:50] rubyonrails877: Processing by Devise::SessionsController#destroy as HTML
[13:02:19] Tempesta: has joined #RubyOnRails
[13:02:47] rubyonrails877: Java console just shows the redirect after the users logged out
[13:03:11] rvanlieshout: latest version of devise / rails gems?
[13:05:51] jerematic: has joined #RubyOnRails
[13:05:54] rvanlieshout: customized devise controller?
[13:06:27] kies: has joined #RubyOnRails
[13:06:28] FCser: has joined #RubyOnRails
[13:06:47] FCser: has joined #RubyOnRails
[13:06:52] rubyonrails877: I did add a omniauth ruby to it,
[13:07:21] rvanlieshout: to the sessionscontroller?
[13:08:24] rubyonrails877: Well it's just another gem https://rubygems.org/gems/omniauth-twitch
[13:09:02] rvanlieshout: i don't know if it affects the sign out process.. shouldn't expect that
[13:09:09] rvanlieshout: but you don't have a customized devise controller?
[13:09:35] sevenseacat: you havent implemented a guest user record or something like that?
[13:10:01] aegis3121: has joined #RubyOnRails
[13:10:04] rubyonrails877: I did think about that so I took that out , still get the same issue
[13:10:18] sevenseacat: took what out?
[13:10:21] rubyonrails877: I don't have a customized controller
[13:10:37] sevenseacat: without being able to see your code and only getting half answers, its really hard to debug
[13:11:35] rubyonrails877: Sorry, in my users model I had before_create :set_default_role , which just assigned role_id to 4, so I removed that code that set a default role out
[13:11:49] sevenseacat: what does that have to do with anything? :/
[13:12:28] camilasan: has joined #RubyOnRails
[13:12:30] triptec: has joined #RubyOnRails
[13:12:36] rubyonrails877: Well 4 was the role_id for guest
[13:13:32] sevenseacat: okay so. do you have a guest user record implemented or anything like that, so if you don't have a user logged in you assign an unsaved user?
[13:13:54] ksoze: has joined #RubyOnRails
[13:13:57] solars: has joined #RubyOnRails
[13:15:54] dcluna: has joined #RubyOnRails
[13:16:28] rubyonrails877: besides the above code no
[13:16:51] rockyroadster: has joined #RubyOnRails
[13:17:01] sevenseacat: is this app public on github?
[13:17:36] Devalo: has joined #RubyOnRails
[13:19:14] rubyonrails877: https://github.com/rivacom/Example
[13:19:37] sevenseacat: rubyonrails877: https://github.com/rivacom/Example/blob/master/app/controllers/application_controller.rb#L14
[13:19:40] sevenseacat: you do have a guest user.
[13:20:00] DanByc: has joined #RubyOnRails
[13:20:42] k3rn31: has joined #RubyOnRails
[13:21:07] cd83x: has joined #RubyOnRails
[13:24:34] sid_fules: has joined #RubyOnRails
[13:25:07] GodFather: has joined #RubyOnRails
[13:25:27] rubyonrails877: Ok, I guess i just assumed anything logged out was a guest
[13:26:11] Macaveli: has joined #RubyOnRails
[13:27:23] rubyonrails877: I assumed worked a little different I guess
[13:28:02] rvanlieshout: that ensures you always have a current_user
[13:28:14] groatyoats: has joined #RubyOnRails
[13:30:45] Cervajz: has joined #RubyOnRails
[13:35:00] dandaman: has joined #RubyOnRails
[13:35:35] roamingdog: has joined #RubyOnRails
[13:36:26] artto: has joined #RubyOnRails
[13:39:56] Hyuk: has joined #RubyOnRails
[13:41:10] srinidhi: has joined #RubyOnRails
[13:41:40] jerematic: has joined #RubyOnRails
[13:41:43] dblessing: has joined #RubyOnRails
[13:41:57] ZeroeSparticus: has joined #RubyOnRails
[13:42:33] JakFrist: has joined #RubyOnRails
[13:42:33] keoghpe: has joined #RubyOnRails
[13:43:33] keoghpe: hey, looking to contribute to rails for the first time. Any advice on how to get started?
[13:44:16] allcentury: has joined #RubyOnRails
[13:44:45] ZeroeSparticus: http://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html
[13:44:45] Jenzo: $20 for mirc
[13:44:48] Jenzo: what are the smoking
[13:45:04] tildes: keoghpe: https://www.youtube.com/watch?v=7zoD6NZy6vY
[13:45:44] sid_fules: has joined #RubyOnRails
[13:45:54] crystal77: has joined #RubyOnRails
[13:46:08] keoghpe: tildes hadn't seen this video yet. Thanks very much!
[13:46:19] tildes: keoghpe: you're welcome :)
[13:47:09] marcules: has joined #RubyOnRails
[13:47:16] frem_: has joined #RubyOnRails
[13:49:05] marchelzo: has joined #RubyOnRails
[13:50:02] futilegames: has joined #RubyOnRails
[13:52:16] sid_fules: has joined #RubyOnRails
[13:52:18] rafaelfranca: has joined #RubyOnRails
[13:58:11] Jenzo: Anyone know a good windows ruby on rails compiler
[13:58:34] fryguy: Jenzo: are you sure you want a compiler?
[13:58:41] hcnewsom: has joined #RubyOnRails
[13:58:54] Jenzo: I want a program to compile the programs
[13:58:54] fryguy: it's exceedingly rare to have compiled ruby code
[13:59:03] norc: fryguy: it is exceedingly common.
[13:59:14] norc: fryguy: What do you think Ruby does when it sees your code?
[13:59:25] fryguy: norc: generates bytecode on the fly and interprets it
[13:59:28] chouhoulis: has joined #RubyOnRails
[13:59:44] norc: fryguy: Indeed. That portion is even called "compiler" ;-)
[14:00:02] sevenseacat: no, you really dont compile ruby code
[14:00:25] sevenseacat: you especially don't compile "rails" code
[14:00:26] jhass: ACTION grabs popcorn
[14:00:42] norc: sevenseacat: lex, parse, compile, execute. That is what Ruby has been doing since 2.0 :-)
[14:00:55] sevenseacat: norc: doesnt matter, that's not what theyre asking for.
[14:01:23] fryguy: well, it probably *IS* what they are asking for, just in a very misguided fashion
[14:02:05] norc: Jenzo: But for what its worth, since Ruby 2.3 you can precompile source files. But for some reasons it is not very usuable yet.
[14:02:30] tbuehlmann: ACTION sits down next to jhass
[14:02:49] JakFrist: has joined #RubyOnRails
[14:03:15] sevenseacat: I'm not going to bother arguing with pedants
[14:03:49] subsonik: has joined #RubyOnRails
[14:04:11] jhass: Jenzo: can you describe what you want without the word "compiler"?
[14:04:54] yfeldblum: has joined #RubyOnRails
[14:05:13] banister: has joined #RubyOnRails
[14:06:31] triptec: has joined #RubyOnRails
[14:07:10] macsteps: has joined #RubyOnRails
[14:07:31] yfeldblum: has joined #RubyOnRails
[14:08:05] ksoze: has joined #RubyOnRails
[14:09:47] wilsonc91: has joined #RubyOnRails
[14:10:48] wilsonc91: Hey guys, quick question: I want to do a .where clause on an object, as well as check for the presence of a relation. So, I have say Person.where(Name: 'bob) and I also want to check that Person.family_member.sister exists for that person. What's the best way of doing this?
[14:12:46] norc: wilsonc91: Use .joins to join in the relation, that should force an inner join unless Im mistaken.
[14:12:48] Guest683: has joined #RubyOnRails
[14:12:50] dandaman: has joined #RubyOnRails
[14:13:11] norc: wilsonc91: Or use an explicit .where("foo_id IS NOT NULL")
[14:13:19] artto: has joined #RubyOnRails
[14:13:31] yellow5: has joined #RubyOnRails
[14:13:41] norc: wilsonc91: I suppose that last could also be a .where.not(foo_id: nil)
[14:15:19] IFrank00: has joined #RubyOnRails
[14:15:21] IFrank004: has joined #RubyOnRails
[14:15:23] cd83x: has joined #RubyOnRails
[14:16:07] gremly: has joined #RubyOnRails
[14:16:41] agent_white: has joined #RubyOnRails
[14:17:11] agit0: has joined #RubyOnRails
[14:17:51] roamingdog: norc: is it where.not or where_not (or both are ok?)
[14:19:23] DragonPunch: has joined #RubyOnRails
[14:19:25] roamingdog: nvm, there's no 'where_not'
[14:20:39] nettoweb: has joined #RubyOnRails
[14:21:57] nettoweb: heys guys, is there a way to run a specific validation in a model just if the current_user which is changing data is an admin?
[14:21:59] nettoweb: if not, whats is the best way to achieve this?
[14:22:11] nettoweb: or if it's possible anyway
[14:23:15] Axilla: i have used rolify in the past for a simple implementation and created my own roles..
[14:23:25] pydave6367: has joined #RubyOnRails
[14:23:40] norc: nettoweb: that is not validation, that is authorization.
[14:23:55] norc: nettoweb: validation is for data consistency and integrity.
[14:24:19] Axilla: the current app i built for a client(i wouldn't normally use devise or rolify if i had more time but only had 30 days to build the product from scratch).. and it worked out great using devise + activeadmin + rolify and creating a single user system based on admin roles.
[14:24:32] roamingdog: nettoweb: errors << 'my error' if current_user.admin? something along those lines?
[14:24:53] nettoweb: but it can be used like validation? like validation messages
[14:25:01] norc: nettoweb: you really should separate these two.
[14:25:13] norc: nettoweb: It can be fine to have authorization logic in your model, but don't use validations.
[14:25:30] roamingdog: nettoweb: you could make a gist with your attempt, better communication
[14:25:34] norc: nettoweb: just raise an UnauthorizedError.
[14:25:46] norc: nettoweb: And have your controller deal with it accordingly
[14:26:13] nettoweb: norc ok, thank. I'll try
[14:27:22] Axilla: nettoweb: why not do something like validates_presence_of :name, :if => current_user.admin?
[14:27:31] Axilla: or whatever validation you want to do.. if its not a data validation
[14:27:52] Axilla: handle it in your controller in a before_action or whatever you need to do, create a private method and do your thing.
[14:27:56] nettoweb: axilla I cant use current_user in model
[14:28:22] norc: axilla: because validation is about data integrity/consistency.
[14:28:40] norc: axilla: and whether data is valid does not depend on who created it, but what was entered.
[14:29:20] nettoweb: norc makes total sense, just learning how to achieve this
[14:29:20] Axilla: you can pass the user data to your model from your controller...
[14:29:34] Axilla: if its needed.
[14:29:47] Axilla: your controller should tell your model instance about your user.
[14:29:49] ZeroeSparticus: has joined #RubyOnRails
[14:29:59] Axilla: or you do the check in the controller like i said above.
[14:30:24] adavia: has joined #RubyOnRails
[14:30:27] roamingdog: nettoweb: once you grok what's going on with this, try pundit
[14:31:13] rbr: has joined #RubyOnRails
[14:31:20] Axilla: your instance should have an attribute_accessor to your current_user
[14:32:36] kgrz: has joined #RubyOnRails
[14:32:40] soule: has joined #RubyOnRails
[14:32:41] jhass: axilla: I disagree.
[14:33:20] Axilla: jhass: with?
[14:33:39] jhass: passing controller state (current_user) to the model
[14:33:49] jhass: which then has logic operating it
[14:34:07] jhass: so basically everything you said ;)
[14:34:23] Axilla: i'm not saying i'd do it that way
[14:34:27] Axilla: i'm saying it can be done.
[14:34:28] Axilla: https://gist.github.com/travisdmathis/609086dc024c87f9b24611e28ceb154c
[14:34:30] Axilla: something like that.
[14:34:50] jhass: axilla: then you want to lead somebody still unsure about this stuff to the wrong way...?
[14:34:54] Axilla: but, i would do it in the controller in a before_action/private method route if i were doing something where i needed to verify someone is an admin
[14:36:49] Axilla: this is how i would do it.
[14:36:50] Axilla: https://gist.github.com/travisdmathis/44633ffae4aefe1f6b321a9f97d6622a
[14:36:54] Axilla: something like that.
[14:37:01] Axilla: and is the "rails way"
[14:37:52] roamingdog: it's also the mvc way, dare i say
[14:38:33] Axilla: nettoweb: https://gist.github.com/travisdmathis/44633ffae4aefe1f6b321a9f97d6622a
[14:40:22] nettoweb: thanks folks
[14:40:28] nettoweb: I'll try here
[14:40:37] smathy: has joined #RubyOnRails
[14:42:08] marchelzo: has joined #RubyOnRails
[14:43:05] macsteps: has joined #RubyOnRails
[14:43:51] mwlang: has joined #RubyOnRails
[14:46:18] mwlang: How does Rails choose which Helper is in scope? I’m porting a Rails 2 app to 4 and I copied over the views and helpers. I have a controller called CaseloadController and a helper called CaseloadHelper, but we have the same method name “def link_to_show_and_hide” declared in many helpers. In the Rails 2.x app, the helpers reliably pair to the same named helper as the controller. but in Rails 4, it seems the last one loaded wins.
[14:48:15] artto: has joined #RubyOnRails
[14:48:20] emachnic: has joined #RubyOnRails
[14:49:02] emachnic: has joined #RubyOnRails
[14:50:22] zyzioziom: has joined #RubyOnRails
[14:50:45] chouhoulis: has joined #RubyOnRails
[14:52:18] Pupeno: has joined #RubyOnRails
[14:52:49] roamingdog: mwlang: what are the exact versions of the rails apps?
[14:52:58] marchelzo: has left #RubyOnRails: ("WeeChat 1.4")
[14:54:39] Dimik: has joined #RubyOnRails
[14:54:40] tubbo: mwlang: in rails 3+ (IIRC), all helpers are loaded in every view. so you don't need to redefine that method in every helper.
[14:54:54] zyzioziom1: has joined #RubyOnRails
[14:54:59] tubbo: frankly i'm not sure why you wouldn't just use a module for stuff like that, copy/pasting code is highly illogical
[14:55:05] mwlang: roamingdog: I just realized it’s a Rails 1.2.3 app I’m porting, not 2.x. and I’m porting it to Rails 4.2.6
[14:55:40] roamingdog: mwlang: wow, hope it's a small app, if not you're going to want to do it in many steps
[14:55:58] pawnbox: has joined #RubyOnRails
[14:56:19] mwlang: roamingdog: not small. :-/
[14:56:44] roamingdog: mwlang: might be better off reverse engineering it instead, lots of tests
[14:57:28] jokke: has joined #RubyOnRails
[14:57:30] mwlang: just knowing about the change in how helpers are loaded helps.
[14:58:07] mwlang: I’m going to have to come up with a strategy for that one because the prior developers put several thousand lines of code in the helpers.
[14:58:33] kies: has joined #RubyOnRails
[14:58:46] moeabdol: has joined #RubyOnRails
[14:58:58] mwlang: they made the views fairly consistent with same named structures and call out to the helpers and put the customization of what goes into each div, menu, section, etc. into the helpers.
[15:00:38] triptec: has joined #RubyOnRails
[15:00:48] roamingdog: mwlang: sounds like lots of duplication you'd want to clean up
[15:02:12] ksoze: has joined #RubyOnRails
[15:02:47] mwlang: yeah, looking at how to do as tubbo says — move all this logic into modules and start eliminating duplicates.
[15:03:01] neanderslob: has joined #RubyOnRails
[15:03:04] neanderslob_: has joined #RubyOnRails
[15:03:46] fedexo: has joined #RubyOnRails
[15:04:06] mwlang: it’s kind of insane what’s here anyway.
[15:04:23] neanderslob: has joined #RubyOnRails
[15:05:30] walidvb: has joined #RubyOnRails
[15:05:35] smathy: mwlang, helpers are global, last to be included wins, loaded in alphabetical order.
[15:05:51] pedro1: has joined #RubyOnRails
[15:06:01] walidvb: i'm trying to Fabricate a model, with a submodel that belongs_to it. How could i do that?
[15:06:09] pedro1: Hello guys
[15:07:29] walidvb: smth like this: https://gist.github.com/walidvb/2b1d04106ebe05673863fecb4b1fd829
[15:07:34] mwlang: I guess the good news about these helpers is there’s only 25 of them, but all 25 define more or less the same 10 methods with a smattering of offshoots specific to the controlloer’s view that they’re serving.
[15:08:01] walidvb: problem is, when my owner_fabricator calls his owned_object_fabricater, it has no ID to pass it..
[15:08:20] suchness: has joined #RubyOnRails
[15:08:45] walidvb: does it make sense?
[15:08:46] suchness: Crosspost from ruby: Can anyone explain why my "variable" is not getting set here: http://pastie.org/private/jtvckqrcqoop3eg4ngqja
[15:09:34] cd83x: has joined #RubyOnRails
[15:10:50] scepticulous: has joined #RubyOnRails
[15:11:02] pawnbox: has joined #RubyOnRails
[15:11:15] Devalo: has joined #RubyOnRails
[15:12:20] groatyoats: has joined #RubyOnRails
[15:14:43] jhass: suchness: now also transport the answer here or at least say you got one ;)
[15:15:01] Pupeno: has joined #RubyOnRails
[15:16:51] crystal77: has joined #RubyOnRails
[15:17:43] broman: has joined #RubyOnRails
[15:17:59] broman: Can someone please help? I'm using rails 3... this gives me a route error: <img src="/public/arquivos/<%=@produto.id%>/<%=@produto.banner_slide%>" ----- What's the correct url???
[15:18:10] pawnbox: has joined #RubyOnRails
[15:20:14] sid_fules: has joined #RubyOnRails
[15:20:47] suchness: jhass: Oh yes, my eagerness to get back to it made me forgetful.
[15:21:10] GodFather: has joined #RubyOnRails
[15:21:12] suchness: I found my answer in the ruby channel
[15:21:16] triptec: has joined #RubyOnRails
[15:21:46] jhass: broman: image_tag "#{@product.id}/#{@product.banner_slide}"
[15:21:55] suchness: instead of setter methods, creating a method that takes the value as an argument and assigning it to an instance variable
[15:22:46] walidvb: nothing for the fabrication issue? ;)
[15:24:22] ksmutthu: has joined #RubyOnRails
[15:28:28] smathy: walidvb, use another fabricator that inherits from :user instead.
[15:28:46] walidvb: fabricator inheritance? hm
[15:28:56] smathy: walidvb, yes.
[15:29:14] smathy: Fabricator( :subscribed_user, from: :user ) do ...
[15:30:32] walidvb: smathy: not sure how that'll help? what syntax would i use to create the subscriptions?
[15:31:51] walidvb: looking at the docs, inheritance seems more to override certain fields
[15:32:03] smathy: walidvb, the standard count syntax, as per the docs.
[15:32:15] smathy: walidvb, you are overriding certain fields.
[15:33:21] Albertico: has joined #RubyOnRails
[15:33:40] disgrntld: has joined #RubyOnRails
[15:35:20] dgynn: has joined #RubyOnRails
[15:36:41] edwinvdgraaf: has joined #RubyOnRails
[15:36:45] IFrank004: has joined #RubyOnRails
[15:36:45] IFrank00: has joined #RubyOnRails
[15:37:38] walidvb: right. let me check that. a bit frustrating not to be able to use transient attrs, but fair enough
[15:38:02] walidvb: also, i'd want to pass attrs down to my new subscription
[15:38:10] webnanners: has joined #RubyOnRails
[15:38:42] cd83x: has joined #RubyOnRails
[15:39:11] walidvb: thx smathy
[15:40:02] Jenzo: is his new name
[15:40:05] desnudopenguino: has joined #RubyOnRails
[15:40:12] edwinvdg_: has joined #RubyOnRails
[15:41:18] macsteps: has joined #RubyOnRails
[15:41:29] Jenzo: That isn't my real name
[15:41:30] tubbo: he is pretty salty
[15:41:33] Jenzo: names don't hurt me lol
[15:41:35] Mia: has joined #RubyOnRails
[15:41:35] Mia: has joined #RubyOnRails
[15:42:03] David_H_Smith: has joined #RubyOnRails
[15:42:46] David_H_Smith: has joined #RubyOnRails
[15:48:10] l1meon: has joined #RubyOnRails
[15:51:48] norc: has joined #RubyOnRails
[15:52:04] Pupeno: has joined #RubyOnRails
[15:52:26] [Butch]: has joined #RubyOnRails
[15:52:27] ksoze: has joined #RubyOnRails
[15:52:33] godzillaenlacasa: has joined #RubyOnRails
[15:54:05] dionysus69: has joined #RubyOnRails
[15:54:29] kdough: has joined #RubyOnRails
[15:55:00] FCser: has joined #RubyOnRails
[15:55:38] fowl: has joined #RubyOnRails
[15:56:05] ktchup: has joined #RubyOnRails
[15:56:46] triptec: has joined #RubyOnRails
[15:57:08] Gkj8899: has joined #RubyOnRails
[15:59:26] maxx88: has left #RubyOnRails: ()
[16:00:53] smathy: I'm salty? It's not even talk like a pirate day.
[16:01:30] roamingdog: has joined #RubyOnRails
[16:02:35] aegis3121: has joined #RubyOnRails
[16:03:12] davidw: has joined #RubyOnRails
[16:04:13] smathy: walidvb, even if you got the syntax right (you needed the count and your block shouldn't have been returning an array, just the fabricator object) I think it wouldn't work because the `if` would make the association have nils in it.
[16:04:53] fl4sh_: has joined #RubyOnRails
[16:05:11] walidvb: oh, that would be the reason then. i'll try with the nil return though
[16:05:42] alfiemax: has joined #RubyOnRails
[16:05:46] smathy: ...just having the `if` block will do the nil return when `attrs[:subscribed]` is false.
[16:06:13] kitsuneyo: has joined #RubyOnRails
[16:06:13] smathy: Ie. the subscriptions(count:3) will result in user.subscriptions == [nil, nil, nil]
[16:06:21] smathy: (but in an associations proxy object)
[16:06:52] smathy: walidvb, the inheritance is the right way to do this.
[16:07:36] kitsuneyo: i have this data: #<ISO4217::Currency:0x007fd152afb718 @code="USD", @name="Dollars", @symbol="$", @exchange_currency=nil>. i want to get the usd part. in rails console i can do it with object['code']. when i try to use that in my seed file, i get "undefined method `[]' for nil:NilClass". how else can i grab that data?
[16:07:45] walidvb: smathy: hm alright. in this specific case it's not worth it for me, but if my codebase grows i'll go that way then
[16:07:54] maxx88: has joined #RubyOnRails
[16:07:58] walidvb: in the meantime i'll just create a Sub after creating the user
[16:09:09] janiz: has joined #RubyOnRails
[16:09:33] smathy: It's like three extra lines of code, but ok.
[16:09:46] walidvb: haha well i'd need 3 different fabs, that's why
[16:09:59] walidvb: and i need them in 1 test suite only atm
[16:10:17] smathy: kitsuneyo, you will never be able to grab the data from nil
[16:10:22] rogue_koder: has joined #RubyOnRails
[16:10:50] Cohedrin: has joined #RubyOnRails
[16:10:54] janiz: Hey everyone. Is there any way to prefix my path helpers? I have rerouted app with nginx to have '/api' prefix. I need something this: search_path now returns '/search', I want it to return '/api/search'
[16:10:56] kitsuneyo: smathy, i guess i don't understand why it's nil
[16:11:08] smathy: walidvb, I think it's clearer to have your fabricator objects named logically, makes it clearer what your tests are loading.
[16:11:29] smathy: kitsuneyo, I guess, that wasn't what you asked though - you didn't seem to realize it was nil.
[16:12:13] smathy: kitsuneyo, ie. your error message is telling you that don't have the data you think you do.
[16:12:13] kitsuneyo: yeah i guess my question was too high level
[16:12:36] smathy: kitsuneyo, no, just that "I have this data..." is wrong. You have nil.
[16:13:17] hcnewsom: has joined #RubyOnRails
[16:13:38] smathy: Jani_, http://guides.rubyonrails.org/routing.html#controller-namespaces-and-routing
[16:13:59] kies: has joined #RubyOnRails
[16:14:08] kitsuneyo: i guess then, i don't understand why in rails console x.currency returns the data i pasted above, but in my seed file, x.currency returns just the "ISO4217::Currency:0x007fd152afb718" as a string (i think)
[16:14:45] smathy: kitsuneyo, !gist your seed file and the terminal output showing what you're claiming.
[16:14:45] helpa: kitsuneyo: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[16:15:52] PlasmaStar: has joined #RubyOnRails
[16:16:05] jancel: has joined #RubyOnRails
[16:18:02] kitsuneyo: ok smathy: https://gist.github.com/kitsuneyo/fc4b437c26ddabb3bd914bdd6ccb8eb8
[16:21:12] kitsuneyo: i guess you need to be familiar with the countries gem
[16:21:26] rockyroadster: has joined #RubyOnRails
[16:21:35] smathy: kitsuneyo, so in your console you're calling the `currency` method on whatever `Country['US']` returns, and in your seed you're calling it on the items returned by `ISO3166::Country.all.each` - there's no evidence in what you're showing that these two things are any way related.
[16:22:02] smathy: kitsuneyo, no I don't need to be (although am), I just need to be able to read your code.
[16:22:16] kitsuneyo: true, but they do both come from the countries gem
[16:22:35] kitsuneyo: obviously they aren't the same though, you're right
[16:22:51] kitsuneyo: i don't get why they aren't the same
[16:23:13] smathy: Right, so as you're checking things in your console, you need to compare like-to-like before there's any mystery as to why something in your seeds doesn't work and something in your console does.
[16:23:27] iloveitaly: has joined #RubyOnRails
[16:27:57] artto: has joined #RubyOnRails
[16:28:42] kitsuneyo: smathy, i amended my gist with something that i thought would fix the issue, but doesn't
[16:28:43] kitsuneyo: https://gist.github.com/kitsuneyo/fc4b437c26ddabb3bd914bdd6ccb8eb8
[16:28:46] snowy: has joined #RubyOnRails
[16:29:15] kitsuneyo: now the two methods used to get the currency code are nearly identical
[16:29:48] IFrank004: has joined #RubyOnRails
[16:29:49] IFrank00: has joined #RubyOnRails
[16:31:09] PlasmaStar: has joined #RubyOnRails
[16:32:26] JesseH: has joined #RubyOnRails
[16:32:37] cesarstafe: has joined #RubyOnRails
[16:33:16] k3rn31: has joined #RubyOnRails
[16:33:36] smathy: kitsuneyo, right, so how can you tell, in your loop, what's being returned?
[16:33:59] hive-mind: has joined #RubyOnRails
[16:34:47] kitsuneyo: smathy: ehh... i wanna say scope? the stuff it writes to active record??
[16:35:48] smathy: kitsuneyo, I was thinking a `pp c.currency` or `pp ISO3166::Country[c.alpha2].currency` in your loop.
[16:35:51] cesarstafe: hi people, I have a question here.. I want to do a query like that ... User.select('users.id, users.name, countries.name, countries.code') but using a notation like that User.select(:id, :name, :countries {:name, :code})
[16:36:09] kitsuneyo: smathy, what does pp mean?
[16:36:18] universa1: prettyprint
[16:36:28] universa1: cesarstafe: invalid ruby :p
[16:36:30] smathy: kitsuneyo, or p or puts - whatever you're using to print debug output.
[16:37:02] universa1: cesarstafe: have you tried your notation?
[16:37:13] smathy: cesarstafe, !query
[16:37:13] helpa: cesarstafe: Querying with ActiveRecord: http://guides.rubyonrails.org/active_record_querying.html
[16:37:17] kitsuneyo: ok, i'll try it. i have to go now though, thanks for your help smathy
[16:37:46] harai54: has joined #RubyOnRails
[16:37:46] cesarstafe: mmm.. I have been ther in querying page
[16:37:52] cesarstafe: not sure if they have the answer
[16:38:30] universa1: cesarstafe: have you tried your notation?
[16:38:47] cesarstafe: my notation in string mode works
[16:38:58] tjohnson: has joined #RubyOnRails
[16:39:04] adavia: if i have a post model that has many images and also a user model that has many images as well but these last can have an optional field for image description, should i handle this using STI or polymorphism?
[16:39:06] triptec: has joined #RubyOnRails
[16:39:12] cesarstafe: but I do not know how to especify with the :FIELD_NAME mode
[16:39:43] universa1: cesarstafe: so you tried the hash syntax? (i've zero clue if that'll work or not)
[16:39:51] sid_fules: has joined #RubyOnRails
[16:39:52] kies: has joined #RubyOnRails
[16:40:08] cesarstafe: yep.. it does not work
[16:40:19] cesarstafe: this is why I am trying to figure out
[16:40:37] kgrz: has joined #RubyOnRails
[16:41:18] cesarstafe: with the first fields it works ok but not sure how to specify with the fields that belongs to the other object model Country inside of this select
[16:42:06] universa1: cesarstafe: so, def self.select(args); super(*args.map {|a| a.kind_of? Symbol ? a.to_s : a.map{|k,v| "#{k}.#{v}}}.flatten); end
[16:42:21] universa1: *guess coding in irc
[16:42:35] cesarstafe: ok, that can works maybe
[16:42:52] cesarstafe: but I think that must exist other alternative
[16:43:06] cesarstafe: just searching for answers in my friend google
[16:43:16] cesarstafe: if I find something I will share here
[16:43:46] universa1: cesarstafe: tbh, i rarely use select in rails apps, so it might very well be, that there is no alternative, it least i can't remember seeing one.
[16:44:18] cesarstafe: it is a very long query
[16:44:24] cesarstafe: it needs to be customized
[16:44:35] cesarstafe: so that is the reason why I use select
[16:44:41] sk0r: has joined #RubyOnRails
[16:44:48] universa1: cesarstafe: https://github.com/rails/rails/blob/ad078767fb4d4a78224efaaf541e9bc847cde245/activerecord/lib/active_record/relation/query_methods.rb#L249
[16:44:52] universa1: cesarstafe: doesn't look like it
[16:45:00] cesarstafe: ah.. let me see
[16:45:35] manfrin: has joined #RubyOnRails
[16:45:56] cesarstafe: mmm.. I will try to redefine select for now
[16:46:06] cesarstafe: thanks anyway universal
[16:46:28] universa1: the redifinition will break the other select variants with as in it, but one can probably check for that, too.
[16:46:48] universa1: should be easy, checking for a string, now that i think of it.
[16:47:24] emachnic: has joined #RubyOnRails
[16:47:33] macsteps: has joined #RubyOnRails
[16:48:33] zyzioziom: has joined #RubyOnRails
[16:50:10] sharkman: has joined #RubyOnRails
[16:50:35] sharkman: how can i do ActiveRecord::Base.connection.execute(stuff).map(make each entry activerecord)
[16:51:03] djbkd: has joined #RubyOnRails
[16:51:04] emachnic: has joined #RubyOnRails
[16:51:24] emachnic: has joined #RubyOnRails
[16:54:41] agit0: has joined #RubyOnRails
[16:54:51] cesarstafe: another question people
[16:55:22] cesarstafe: is it possible?
[16:55:53] cesarstafe: Object.some_#{attribute} .... where attribute value is an String
[16:56:15] neanderslob: has joined #RubyOnRails
[16:56:35] neanderslob_: has joined #RubyOnRails
[16:57:05] cesarstafe: so for example attribute = 'currency' and so... Object.get_#{attribute} == Object.get_currency
[16:57:09] cesarstafe: is it possible?
[16:57:54] neanderslob: has joined #RubyOnRails
[16:57:56] Pupeno: has joined #RubyOnRails
[16:58:06] cesarstafe: I wanna get an string and can call an object attribute/method on the fly with this concatenation thing
[16:58:25] fowl: has joined #RubyOnRails
[16:59:05] walidvb: cesarstafe: Object.send("get_#{attribute}")
[16:59:11] arBmind: has joined #RubyOnRails
[16:59:20] cesarstafe: I forgot about send
[16:59:22] walidvb: cesarstafe: and Object.send("set_#{attribute}", arguments)
[16:59:33] cesarstafe: many thanks walidvb
[17:00:44] Gkj8899: has joined #RubyOnRails
[17:03:41] hahuang65: has joined #RubyOnRails
[17:04:02] qejk: has joined #RubyOnRails
[17:04:36] cnk: has joined #RubyOnRails
[17:06:42] dblessing: has joined #RubyOnRails
[17:07:28] SteenJobs: has joined #RubyOnRails
[17:08:24] sid_fules: has joined #RubyOnRails
[17:08:42] Pupeno: has joined #RubyOnRails
[17:10:49] sid_fules: has joined #RubyOnRails
[17:12:08] emachnic: has joined #RubyOnRails
[17:15:40] sid_fules: has joined #RubyOnRails
[17:17:05] Pazician: has joined #RubyOnRails
[17:17:05] Pazician: has joined #RubyOnRails
[17:17:45] beilabs: has joined #RubyOnRails
[17:19:41] noobRORDev_: has joined #RubyOnRails
[17:19:55] Coldblackice: has joined #RubyOnRails
[17:20:08] ZeroeSparticus: has joined #RubyOnRails
[17:20:34] njero: has joined #RubyOnRails
[17:21:03] sid_fules: has joined #RubyOnRails
[17:21:51] artto: has joined #RubyOnRails
[17:23:03] wilsonc91: has joined #RubyOnRails
[17:24:38] IFrank004: has joined #RubyOnRails
[17:24:38] IFrank00: has joined #RubyOnRails
[17:26:48] sid_fules: has joined #RubyOnRails
[17:27:43] cnk: noobRORDev_: kind of quiet in here today
[17:28:08] artto: has joined #RubyOnRails
[17:28:50] noobRORDev_: yes, but it is Friday
[17:28:56] jancel: has joined #RubyOnRails
[17:30:39] Aherin: has joined #RubyOnRails
[17:33:50] whathappens: has joined #RubyOnRails
[17:36:45] hcnewsom: has joined #RubyOnRails
[17:38:01] DoctorMonocular: has joined #RubyOnRails
[17:38:04] chouhoulis: has joined #RubyOnRails
[17:40:27] Spami: has joined #RubyOnRails
[17:41:06] njero: has joined #RubyOnRails
[17:42:07] adre: has joined #RubyOnRails
[17:43:35] ktchup: has joined #RubyOnRails
[17:47:00] moeabdol: has joined #RubyOnRails
[17:47:45] rafaelfranca: has joined #RubyOnRails
[17:49:41] moei: has joined #RubyOnRails
[17:51:43] marahin: has joined #RubyOnRails
[17:52:06] marahin: Hello, I have an issue where I have development:
[17:52:06] marahin: secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
[17:52:06] marahin: in my config/secrets.yml, and actually Rails.application.secrets shows that there it is:
[17:52:25] marahin: Rails.application.secrets
[17:52:26] marahin: => {:secret_key_base=>"8......", ...}
[17:52:37] marahin: but yet Puma throws an error: Puma caught this error: Missing `secret_key_base` for 'development' environment, set this value in `config/secrets.yml` (RuntimeError)
[17:52:59] njero: has joined #RubyOnRails
[17:53:02] marahin: Can someone point me where am I making a mistake?
[17:53:55] mwlang: marahin: gist your config/secrets.yml — likely a typo in there somewhere.
[17:54:15] cnk: marahin: Puma is probably running as some other user and does not have SECRET_KEY_BASE in therir env
[17:54:17] marahin: mwlang, https://gist.github.com/Marahin/8734d8aa956f7ae9a2c3f93079d3030d
[17:54:29] universa1: also dev vs prod env?!
[17:54:36] marahin: cnk, how come? I'm using JetBrains RubyMine IDE.
[17:54:38] universa1: doesn't one use the env stuff usually for production
[17:54:39] marahin: marahin 7552 0.3 0.4 1142228 68964 ? Sl 19:50 0:00 puma 3.4.0 (tcp://0.0.0.0:3000) <-- as ps aux
[17:55:06] cnk: How is puma running from RubyMine?
[17:55:12] marahin: universa1, just trying how does it work exactly, I usually (as I'm not a professional) set it up hardcoded in secrets.yml and added secrets in .gitignore
[17:55:49] marahin: cnk, as I understand it, it just executes puma, nonetheless it runs from me, as a user (see the ps aux part above)
[17:56:03] aegis3121: has joined #RubyOnRails
[17:56:15] universa1: marahin: in dev mode i just have some key set directly there, and not use some env variable.
[17:56:25] mwlang: marahin: more to the point, puma is likely launching w/o your full stack of ENV variables set up.
[17:56:30] marahin: universa1, me too usually, it's just that I want to learn how to do it with the environment vars ;)
[17:56:43] marahin: mwlang, I see. Aight, I'll look puma docs then, maybe I'll find a solution there
[17:56:43] universa1: marahin: don't run it through rubymine then.
[17:56:44] marahin: thank you!
[17:56:53] universa1: marahin: the problem is not puma.
[17:57:04] chouhoulis: has joined #RubyOnRails
[17:57:05] universa1: marahin: rubymine does not load whatever you set up in your shell.
[17:57:09] mwlang: marahin: look at rubymine docs…more likely to find a quick answer there or on stack overflow.
[17:57:29] universa1: marahin: if you would launch rubymine from a shell, which has these env vars set, it might work.
[17:57:40] flashpoint9: has joined #RubyOnRails
[17:57:41] cnk: http://www.redmine.org/boards/2/topics/32186
[17:57:59] crystal77: has joined #RubyOnRails
[17:58:01] universa1: cnk: redmine? rubymine? ;)
[17:58:39] owenjones: has joined #RubyOnRails
[17:59:06] marahin: universa1, mwlang I see.
[17:59:31] cnk: https://blog.pivotal.io/labs/labs/setting-environment-variables-in-rubymine-on-a-mac
[17:59:52] marahin: Indeed it works when I do run plain `rails s` from the shell. Thank you for the quick response and help!
[17:59:58] cnk: But in development, I think the answer is just hard code a secret
[18:00:07] wilsonc91: Hey guys I have list of objects with a 1:1 relation to another object. so articles -> category. Could I convert the list of articles directly to a list of categories?
[18:00:41] universa1: wilsonc91: list_a.map &:category ?
[18:01:19] crystal77: has joined #RubyOnRails
[18:03:17] wilsonc91: Can i do that from activerecord_relation?
[18:03:43] qejk: has joined #RubyOnRails
[18:04:01] njero: has joined #RubyOnRails
[18:05:01] universa1: wilsonc91: !try
[18:05:01] helpa: wilsonc91: Why don't you try it and find out for yourself?
[18:06:23] Dimik: has joined #RubyOnRails
[18:14:13] Devalo: has joined #RubyOnRails
[18:16:05] artto: has joined #RubyOnRails
[18:19:29] Pupeno: has joined #RubyOnRails
[18:20:03] njero: has joined #RubyOnRails
[18:20:22] moeabdol: has joined #RubyOnRails
[18:20:30] Sylario: Does anyone know how to ovveride default currency symbol in Money-rails ?
[18:21:29] jancel: has joined #RubyOnRails
[18:22:14] noobRORDev_: has joined #RubyOnRails
[18:23:44] yellow5: has joined #RubyOnRails
[18:23:52] yfeldblum: has joined #RubyOnRails
[18:25:01] bjaX: has joined #RubyOnRails
[18:27:39] l1meon: has joined #RubyOnRails
[18:30:05] noobRORDev_: Hello, I have a nested form using fields_for. The problem is that model A (the parent model) can have many of the models B so the form for model B is showing everything that is in that table. Is there a way to limit how many fields of model B show up using fields_for?
[18:31:26] Pupeno: has joined #RubyOnRails
[18:31:55] universa1: noobRORDev_: yes, f.fields_for :whatever, some_records do |ff| iirc -- check the docs for fields_for
[18:34:49] zyzioziom: has joined #RubyOnRails
[18:36:04] njero: has joined #RubyOnRails
[18:36:45] sid_fules: has joined #RubyOnRails
[18:36:56] SteenJobs: has joined #RubyOnRails
[18:37:21] njero: has joined #RubyOnRails
[18:39:50] blockchan: has joined #RubyOnRails
[18:40:31] terrabl: has joined #RubyOnRails
[18:40:41] terrabl: Hey guys I am having some trouble implementing CSS and JS on my html.erb files in Rails. The gist included (https://gist.github.com/anonymous/6b4262524ad96ccd48dd) has all of the files that I believe would be necessary for you to understand the problem. In application.html I changed the original stylesheet and javascript link tags to be 'default' instead of 'application' because that is what I read to do on a SO question. If y
[18:40:47] terrabl: I attempted to read up on the asset pipeline and I think I understand but I am always getting a 404 error when I try to load up default.js and default.css
[18:40:57] Dimik: anybody good with capybara?
[18:41:31] helpa: Nope. No one. Ever. In the history of the world.
[18:42:15] thermistor: has joined #RubyOnRails
[18:43:04] SteenJobs: have any of you worked with a designer using Adobe Muse before?
[18:43:10] terrabl: Showing c:/Users/*/Desktop/loadtest/app/views/layouts/application.html.erb where line #5 raised: TypeError: Object doesn't support this property or method This is the error that I am recieving when I try to load the page atm
[18:43:21] SteenJobs: meaning they generate the html/css with Muse and then you incorporate it into your rails app
[18:43:27] thejamespinto: has joined #RubyOnRails
[18:43:53] tvw: has joined #RubyOnRails
[18:44:55] ur5us: has joined #RubyOnRails
[18:47:00] universa1: terrabl: gist not found
[18:47:19] universa1: terrabl: you should leave the names!
[18:47:24] terrabl: https://gist.github.com/anonymous/6b4262524ad96ccd48dd1255305cd063
[18:47:40] terrabl: Leave the application name?
[18:47:46] terrabl: and not change to default?
[18:47:52] universa1: application.css and application.js
[18:49:03] terrabl: I have it at the point where it will load the html but it is unable to find the .css and .js files
[18:49:26] universa1: terrabl: https://gist.github.com/anonymous/6b4262524ad96ccd48dd1255305cd063#file-application-html-L5-L6
[18:49:38] terrabl: In the Inspect > network of google chrome it says that it 404s when it looks for default.js and default.css but I have never created those files
[18:49:41] universa1: terrabl: this should be application instead oif default.
[18:50:25] terrabl: Yeah they were like that originally but it results in the html not even being loaded
[18:50:49] universa1: terrabl: change it back! then add the full error trace
[18:51:06] terrabl: where would you like to see the full error trace?
[18:51:13] universa1: terrabl: in the gist!
[18:51:38] terrabl: Is there a way to edit it?
[18:51:38] dunpeal: has joined #RubyOnRails
[18:51:54] universa1: terrabl: yes, if you sign up
[18:53:11] terrabl: https://gist.github.com/terrabl/82f04b718d6e82c90ee6c02b4d04888d
[18:53:20] terrabl: I had to make a new one because i wasnt signed in for some reason
[18:53:43] broman: Can someone please help? I'm using rails 3... this gives me a route error: <img src="/public/arquivos/<%=@produto.id%>/<%=@produto.banner_slide%>" ----- What's the correct url??? image tag doesn't work... this file is under public folder... it's uploaded by users
[18:54:31] d0nn1e: has joined #RubyOnRails
[18:55:42] groatyoats: has joined #RubyOnRails
[18:56:51] adavia: if i have a post model that has many images and also a user model that has many images as well but these last can have an optional field for image description and default state, should i handle this using STI, polymorphism or maybe 2 different models?
[18:57:00] terrabl: universa1: I changed it to 'default' because of this SO question http://stackoverflow.com/questions/28421547/rails-execjsprogramerror-in-pageshome
[18:57:05] jancel: has joined #RubyOnRails
[18:57:39] emachnic: has joined #RubyOnRails
[18:58:46] emachnic: has joined #RubyOnRails
[19:00:05] cnk: adavia: I would probably just make one image model with optional descrirption and states
[19:00:29] cnk: unless the 2 kinds of images have different post processing (e.g. thumbnailing) needs
[19:00:49] adavia: cnk: both have the same processing
[19:01:03] cnk: the one down side for that is that you probably won't get automaic deleting if you remove a related obje
[19:01:04] terrabl: I just fixed it
[19:01:14] cnk: for example. if you delete a post, what should happen to the images?
[19:01:33] terrabl: I changed application to application.css and application.js and then I added =require turbolinks to application .js without the //
[19:01:34] cnk: if you have a shared model, you will need to pre-delete the images before removeing the post
[19:01:38] adavia: cnk: if the post has images then they should be deleted
[19:02:05] cnk: if you have a post_images model with a post_id field, you can automatically cascade the deletes
[19:02:37] cnk: but if you just have a mapping table - only the relatiionship gets automatically delelted - not the image itself
[19:02:49] N1njturt1e: has joined #RubyOnRails
[19:03:50] adavia: thats why maybe having a polymorphic association would do it but then i must handle different behaviors for users and posts in the same view
[19:03:53] braincrash: has joined #RubyOnRails
[19:04:06] Zackio: has joined #RubyOnRails
[19:04:13] boboc: has joined #RubyOnRails
[19:05:08] honeyroasted: has joined #RubyOnRails
[19:06:05] boboc: guys i have a sample rails app, i have installed nginx and puma to test a droplet on digital ocean to try to deploy a sample app. i have added the 'bind tcp://0.0.0.0:9292' setting in puma.rb and 'server 127.0.0.1:9292' in the nginx upstream directive but when i access a route from the rails app it doesn't work. puma was started and it shows it is listening on tcp://0.0.0.0:9292. Any idea what the problem is? thanks
[19:06:53] cnk: adavia: you can have separate views for the 2 cases - you just have to be explicit in your controller about which one to use
[19:07:38] N1njturt1e: has joined #RubyOnRails
[19:08:15] adavia: I can also do that using single table inheritance though.. guess both patterns would work
[19:13:14] tildes_: has joined #RubyOnRails
[19:14:55] tubbo: normalization > table inheritance
[19:15:03] Darmani: has joined #RubyOnRails
[19:18:54] shinnya: has joined #RubyOnRails
[19:19:22] fowl: has left #RubyOnRails: ("Leaving")
[19:20:57] Darmani: Hey guys! I recently changed my db from SQLite to PostgreSQL but I'm not too familiar with the process. I think I missed a few things cause I keep getting this error.
[19:20:59] Darmani: https://gist.github.com/mfifth/0635a701653de69f8a5cb05061045688
[19:21:06] Darmani: Could someone take a look?
[19:23:49] ktchup: has joined #RubyOnRails
[19:24:54] smathy_: has joined #RubyOnRails
[19:26:17] sypheren: has joined #RubyOnRails
[19:26:29] |meta: has joined #RubyOnRails
[19:27:52] cnk: Darmani: you have no database server
[19:28:01] cnk: "could not connect to server: Connection refused"
[19:28:26] pydave6367: has joined #RubyOnRails
[19:28:32] macsteps: has joined #RubyOnRails
[19:28:38] Darmani: cnk: I need a database server? o.o
[19:28:52] cnk: postgres and mysql need servers
[19:29:03] cnk: sqlite doesn't run a server, just a file
[19:29:37] Darmani: cnk: So I need to learn how to setup a PostgreSQL server?
[19:29:39] sandstrom: has joined #RubyOnRails
[19:29:50] cnk: If you want to use Postgres, yes
[19:29:58] cnk: I think we had this conversation last night
[19:30:10] Darmani: cnk: We did? I was playing Overwatch last night... lol
[19:30:11] cnk: You switched to PG so you can use Heroku, right?
[19:30:26] Darmani: oh yeah. that was me.
[19:30:55] cnk: So your options are to go back to whatever you were using for dev and test, and just use PG in production
[19:31:10] cnk: Or you need to set up PG in your dev environment
[19:31:34] Darmani: cnk: I am already done with the development side of things... So should I just use it in production?
[19:32:22] cnk: I would try that first
[19:32:57] cnk: there are some differences between databases - but for most simple things the ActiveRecord adapters will hide those differences from you
[19:33:42] sid_fules: has joined #RubyOnRails
[19:33:50] Darmani: cnk: What does it mean to only run pg in production?
[19:34:27] cnk: change your database.yml so that only the production stanza says it's adapter is postgres
[19:34:48] tubbo: Darmani: last time i did this which was like 5 years ago i just deleted the old sqlite db
[19:34:56] tubbo: because it was early enough in the process that i could stand up all the data again with seeds
[19:35:01] cnk: go back to whatever you used to have for dev and test
[19:35:14] tubbo: ^ nah. don't use sqlite if you don't plan to use it in prod
[19:35:40] tubbo: it sucks to have to deal with issues that you can't reproduce in dev, and you're just inviting those kinds of issues by using a different server in dev/test vs. prod.
[19:35:41] dionysus69: has joined #RubyOnRails
[19:35:53] groatyoats: has joined #RubyOnRails
[19:36:21] Darmani: tubbo: Okay... Well that's confusing.
[19:36:22] cnk: Darmani: one other option: https://devcenter.heroku.com/articles/connecting-to-heroku-postgres-databases-from-outside-of-heroku
[19:37:03] tubbo: Darmani: how is it confusing?
[19:37:10] Darmani: cnk: I'll look into that.
[19:37:11] cnk: you could use that to use a remote PG server for dev and test
[19:37:40] Darmani: tubbo: I haven't learned how to setup pg db yet
[19:37:53] tubbo: Darmani: `brew install postgresql` :P
[19:37:58] cnk: tubbo: I am guessing from the sorts of questions Darmani is asking, he is green enough that he isn't likely to be doing anything unusual in his db code
[19:38:02] tubbo: `rake db:create db:migrate db:seed`
[19:38:26] N1njturt1e: has joined #RubyOnRails
[19:38:38] cnk: Darmani: didn't you say you were using some sort of cloud IDE as your dev environment?
[19:38:45] tubbo: never thought pg was exceptionally difficult to work with frankly
[19:38:46] Jenzo: http://finance.yahoo.com/news/jpmorgan-recession-risk-new-high-160251309.html
[19:38:48] tubbo: or install
[19:38:51] Jenzo: Recession 2.0 is here
[19:38:52] Darmani: cnk: ythat's right.
[19:39:06] tubbo: Jenzo: off topic to the maxxxxx haha
[19:39:57] triptec: has joined #RubyOnRails
[19:40:20] cnk: So you have a lot of learning to do about setting up the full rails stack. For now, I would suggest you avoid that and move along with your web app. When you get bored or run into a problem, you can work on setitng up a local development environment - including installing postgres
[19:41:15] pawnbox_: has joined #RubyOnRails
[19:41:48] Darmani: cnk: Well I finished my web app. Radar said I should put it on Heroku and that's when I started learning about pg.
[19:42:45] sumobob: has joined #RubyOnRails
[19:43:13] groatyoats: has joined #RubyOnRails
[19:43:42] sumobob: I'm struggling with a ActiveRecord query problem
[19:44:03] sumobob: a job has and belongs to many specialties, a user has and belongs to many specialties
[19:44:20] sumobob: how can I find all the jobs that match at least one of the specialties the user has
[19:44:31] pipework: sumobob: has many through
[19:44:39] pipework: don't use habtm as much, imo
[19:44:43] Fernando-Basso: has joined #RubyOnRails
[19:44:55] honeyroasted: has joined #RubyOnRails
[19:45:06] xlegoman: has joined #RubyOnRails
[19:45:07] tubbo: yeah then you'd just need to do Specialty.where(user: user)
[19:45:18] tubbo: or user.specialties
[19:45:29] ktchup: has joined #RubyOnRails
[19:45:33] tubbo: user.specialties.includes(:jobs) i think
[19:46:13] pipework: user.jobs could be the association that you'd write, but you'd need to provide the scope to it.
[19:46:20] pipework: or user.potential_jobs
[19:46:28] pipework: whatever makes sense in English.
[19:46:39] honeyroasted_: has joined #RubyOnRails
[19:47:01] sumobob: sure, sure will this return duplicate jobs, a job can have many specialties
[19:47:12] tubbo: sure, sure, sure, .uniq
[19:47:34] tubbo: actually my fav. way to do this is starting with the class i want to return, Job
[19:47:53] tubbo: Job.where(user: user).distinct(:user) i think?
[19:48:23] sumobob: Thats how i have it now, its going to be a prettty complicated query but I'm rspec testing my way through it, so far i have jobs = Job.where("? <= jobs.min_year AND ? >= jobs.max_year", current_user.juris_doctorate_year, current_user.juris_doctorate_year)
[19:49:20] honeyroasted_: has joined #RubyOnRails
[19:49:26] hcnewsom: has joined #RubyOnRails
[19:49:54] tubbo: sumobob: if you're gonna do multiple sprintf-style interpolations, my suggestion is to name them.. Job.where(':min_year <= jobs.min_year AND :max_year <= jobs.max_year', min_year: current_user.juris_doctorate_year, max_year: current_user.juris_doctorate_year)
[19:50:17] tubbo: sumobob: but i don't believe you actually need query fragments here, you can do everything with hashes
[19:51:02] tubbo: sumobob: you can nest hashes in where() params, like if you did User.joins(:jobs).where(id: id, jobs: { min_year: Time.current })
[19:51:52] sumobob: I can do that with greater than less thans too?
[19:51:56] desnudopenguino: i'm trying to set up devise to redirect to the previous page on login, but I am stuck with a login loop... I have been using this howto: https://github.com/plataformatec/devise/wiki/How-To:-redirect-to-a-specific-page-on-successful-sign-in
[19:52:12] sumobob: my years coem from a csv as just ints, not Date times
[19:53:00] Zackio: has joined #RubyOnRails
[19:53:25] sk0r: has joined #RubyOnRails
[19:55:04] sumobob: user.specialties.includes(:jobs) returns the specialties I dont care about that, I just ened the jobs
[19:55:07] jenrzzz: has joined #RubyOnRails
[19:55:30] arBmind: has joined #RubyOnRails
[19:58:00] whathappens: has joined #RubyOnRails
[19:59:20] ur5us: has joined #RubyOnRails
[20:00:23] wilsonc91: has joined #RubyOnRails
[20:00:53] pipework: sumobob: we're not going to write all your code for you, we're giving you tools. :)
[20:02:20] sumobob: haha of course
[20:02:40] sumobob: active record does not like my Job.joins(:specialties).where('specialties.id in (?)', ids) syntax
[20:02:55] pipework: sumobob: The querying guide might help. I imagine you'd be using some form of disctint across a join table.
[20:02:58] honeyroasted: has joined #RubyOnRails
[20:02:59] helpa: http://guides.rubyonrails.org/active_record_querying.html - ActiveRecord Querying Guide by Ryan Bigg
[20:03:47] cnk: sumobob: what's the specific error? seems like that should be OK
[20:03:58] cnk: what is the data type for ids
[20:05:03] djbkd: has joined #RubyOnRails
[20:05:06] scepticulous: has joined #RubyOnRails
[20:05:29] sumobob: i tried an array of ints, then i reduced it into a single string like "12,14,15"
[20:06:37] dblessing: has joined #RubyOnRails
[20:07:03] futilegames: has joined #RubyOnRails
[20:10:02] sumobob: looks like this ended up working jobs = Job.joins(:specialties).where('specialties.id = :ids AND :min_year <= jobs.min_year AND :max_year <= jobs.max_year', ids: ids, min_year: current_user.juris_doctorate_year, max_year: current_user.juris_doctorate_year)
[20:10:40] sumobob: ids is created by mapping through the current_users specialties and returning the id
[20:11:07] chouhoul_: has joined #RubyOnRails
[20:11:18] Jenzo: Stop using weechat
[20:11:21] Jenzo: mirc is better
[20:11:36] dcluna: has joined #RubyOnRails
[20:12:26] blockchan: has joined #RubyOnRails
[20:12:44] cnk: sumobob: Interesting. Did the query that was actually performed do a 'where specialties.id in (ids)'?
[20:13:29] cnk: I am a little surprised at id = :ids where :ids is a list is how one does that. But its been way too long since I have been allowed to play w rails
[20:14:39] sumobob: let me check my tail log
[20:15:08] Pupeno: has joined #RubyOnRails
[20:15:47] N1njturt1e: has joined #RubyOnRails
[20:17:10] sumobob: nope it didnt do the array lookup properly, your right
[20:17:19] sumobob: SELECT "jobs".* FROM "jobs" INNER JOIN "jobs_specialties" ON "jobs_specialties"."job_id" = "jobs"."id" INNER JOIN "specialties" ON "specialties"."id" = "jobs_specialties"."specialty_id" WHERE (specialties.id = 25071 AND '2012' <= jobs.min_year AND '2012' <= jobs.max_year)
[20:18:14] owenjones: has joined #RubyOnRails
[20:18:15] cnk: well looks like in this case you only had 1 id
[20:22:19] jstransky: has joined #RubyOnRails
[20:23:07] tildes_: has joined #RubyOnRails
[20:23:31] sumobob: yeah test smell i think
[20:24:00] pydave6367: has joined #RubyOnRails
[20:26:57] sumobob: given a user with multiple specialties it just seperates them by commas.
[20:27:07] sumobob: SELECT "jobs".* FROM "jobs" INNER JOIN "jobs_specialties" ON "jobs_specialties"."job_id" = "jobs"."id" INNER JOIN "specialties" ON "specialties"."id" = "jobs_specialties"."specialty_id" WHERE (specialties.id = 25129,25131 AND '2012' <= jobs.min_year AND '2012' <= jobs.max_year)
[20:28:20] cnk: hmmm what db are you using? and does this work? seems odd to me
[20:28:35] triptec: has joined #RubyOnRails
[20:31:30] sumobob: cnk: had to tweak it a little to include the parends
[20:31:40] sumobob: jobs = Job.joins(:specialties).where('specialties.id in (:ids) AND :min_year <= jobs.min_year AND :max_year <= jobs.max_year', ids: ids, min_year: current_user.juris_doctorate_year, max_year: current_user.juris_doctorate_year)
[20:31:49] sumobob: becomes SELECT "jobs".* FROM "jobs" INNER JOIN "jobs_specialties" ON "jobs_specialties"."job_id" = "jobs"."id" INNER JOIN "specialties" ON "specialties"."id" = "jobs_specialties"."specialty_id" WHERE (specialties.id in (25183,25185) AND '2012' <= jobs.min_year AND '2012' <= jobs.max_year)
[20:31:49] dionysus69: has joined #RubyOnRails
[20:31:54] sumobob: which looks correct
[20:32:10] cnk: yes. But also looks like what you had 30 min ago that you said didn't work
[20:32:48] Pupeno: has joined #RubyOnRails
[20:33:29] chouhoulis: has joined #RubyOnRails
[20:33:36] sumobob: i had manually reduced the array into a string of ids like "12,13,14"
[20:33:47] Panfuran: has joined #RubyOnRails
[20:34:08] sumobob: so rails inserted the quotes around it and the sql came out like WHERE id in ('2002,1001')
[20:34:11] Panfuran: Realistically, would it be better to learn Nodejs in terms of finding jobs?
[20:35:18] beilabs: has joined #RubyOnRails
[20:35:49] Pupeno: has joined #RubyOnRails
[20:36:08] sid_fules: has joined #RubyOnRails
[20:36:47] Ergo: has joined #RubyOnRails
[20:38:16] cnk: Panfuran: Perhaps. But node is a moving target so would likely be harder to pick up as a first programming environment
[20:38:27] Darmani: cnk: hey I think I got it to work!
[20:38:40] cnk: Darmani: congrats!
[20:39:24] Darmani: cnk: The ide has support for Postgres so I just logged into the server and created the new db.
[20:39:59] cnk: Excellent! That's much better. Glad to hear PG was available to you after all
[20:40:40] Darmani: cnk: me too ^^
[20:44:34] pontiki: Panfuran: better than what? Not learning Nodejs?
[20:45:03] Panfuran: pontiki: Would it be better than investing more time into rails?
[20:45:34] pontiki: i don't think anyone can answer that except you, for yourself, Panfuran
[20:45:45] cnk: Panfuran: We know nothing about what you know or don't know, where you live, what kind of job you want....
[20:46:19] pontiki: if the question you're asking is are people seeking Rails developers, the answer is yes, but it depends on where, how much you know, etc.
[20:46:40] pontiki: i don't personally know anyone around here that is hiring junior Rails devs, though
[20:46:45] Panfuran: I live in Austin Texas, and I want to work in web dev, and possibly do some freelance while I'm training up my skills to get a dev job. I have experience in java, and that's about it.
[20:47:02] pontiki: how much experience in Java?
[20:47:03] Panfuran: Just having a hard time deciding what path to go down
[20:47:14] tubbo: Panfuran: what compelled you to come into a channel filled with rails devs, many of which with no experience in node, and ask whether you should learn nodejs to get jobs?
[20:47:26] Panfuran: tubbo: idiocy
[20:47:39] tubbo: Panfuran: i mean i didn't want to be too forthright...
[20:48:06] Panfuran: pontiki: I took 2 years in highschool + 1 in college
[20:48:06] cnk: Panfuran: Austin has a ton of devs and tons of Meetups. I suggest you try going to some, meeting some people, and getting tips there
[20:48:13] baweaver: "I should learn #{%w(ruby node elixir scala java).sample} to get jobs!"
[20:48:24] baweaver: run that in irb, and there ya go
[20:48:30] cnk: http://www.austinonrails.org/
[20:48:37] Darmani: baweaver: Lmao
[20:48:38] pontiki: learn them *all*
[20:48:47] baweaver: pontiki would not suggest, I've done that
[20:49:02] sandstrom: has joined #RubyOnRails
[20:49:14] quazimodo: has joined #RubyOnRails
[20:49:20] Guest21: has joined #RubyOnRails
[20:50:25] baweaver: I'm production level in 7 languages (could use in prod environments immediately), and familiar with somewhere around 30 that I could use within a few weeks.
[20:50:35] banister: has joined #RubyOnRails
[20:50:50] baweaver: rarely is language knowledge the issue for me, it's soft skills and architecture.
[20:51:07] baweaver: you learn one well and switching around is effectively trivial
[20:51:40] baweaver: unless you switch to a language way outside your range like Haskell, SML, OCaml, or Clojure
[20:52:25] baweaver: If you know Ruby, Javascript, and Haskell most other languages become trivial to learn
[20:52:29] pontiki: even then , my bet is that with concentration, you'll have the flow of it sooner rather than later
[20:52:53] baweaver: Yeah, just expect more bumps on the road if you have no grounding in an area.
[20:52:56] pontiki: understanding architecture takes experience with different architectures
[20:53:14] pontiki: but ultimately architecture, too, is a language
[20:53:24] Jenzo: HELLO POT HEADS
[20:53:30] baweaver: Yeah, Architecture is what I just got grilled on
[20:53:35] ChanServ: +q *!*@173.65.244.234
[20:54:00] pontiki: so are soft skills, although they again are a very different sort of language
[20:54:27] codezomb: has joined #RubyOnRails
[20:54:35] chouhoulis: has joined #RubyOnRails
[20:55:29] ChanServ: -q *!*@173.65.244.234
[20:56:20] baweaver: anyways, starting to veer OT, I'll go over to offtopic
[20:58:24] sumobob: I know both nodeJS and Rails and have used both professionally
[20:58:36] sumobob: although its been some time since I did rails
[20:59:31] godzillaenlacasa: has joined #RubyOnRails
[21:00:57] scepticulous: has joined #RubyOnRails
[21:01:03] svankmajer: has joined #RubyOnRails
[21:02:48] Guest21: has joined #RubyOnRails
[21:02:53] tubbo: baweaver: wtf man
[21:02:59] tubbo: what's wrong with HELLO POT HEADS
[21:03:53] cnk: tubbo: an earlier spammer was more obvious so Jenzo got jumped on hard
[21:03:56] svankmajer: Hello. Anyone knows of a way to check if each element of a list of routes returns 200 *without* hitting their respective controllers?
[21:04:43] cnk: svankmajer: no - it's the controller that returns a status code
[21:04:55] JakFrist: has joined #RubyOnRails
[21:04:56] cnk: Do you just want ot know if they exist?
[21:04:58] cd83x: has joined #RubyOnRails
[21:05:01] svankmajer: cnk: duh. Right.
[21:05:15] cd83x: has joined #RubyOnRails
[21:05:23] cnk: look at the rails routing tests
[21:05:32] cnk: there should be examples in the testing guide
[21:06:01] bruce_lee: has joined #RubyOnRails
[21:06:01] bruce_lee: has joined #RubyOnRails
[21:06:07] svankmajer: cnk: Thanks, man! I'll check them out!
[21:08:12] drale2k: If you have 5 chat rooms, what#s a good approach to show the current one and "hide" the others? I don't them all in the DOM because that will become a problem with more chat rooms. What's a good appraoch with Rails to "build" a chat room when you select it from the room list, on demand
[21:08:39] drale2k: fetching them every time from the db when switching channels also sucks
[21:08:47] Darmani: My app is officially on Heroku! :D
[21:09:19] pipework: Yay! Next step: Learn how to migrate off heroku.
[21:09:24] King_Rex: has joined #RubyOnRails
[21:09:24] Darmani: Why did I do that anyway though? I mean what's the benefit of having it on Heroku anyway?
[21:09:58] drale2k: ez deploy, ez sleep
[21:10:04] Darmani: pipework: heroku run rake db:migrate =p
[21:10:08] blockchan: has joined #RubyOnRails
[21:10:14] pipework: Darmani: wrong direction.
[21:10:20] pipework: Not up, nor down, but away.
[21:10:29] Darmani: pipework: oh shit.
[21:10:31] Darmani: you got me lol
[21:10:39] antgel: has joined #RubyOnRails
[21:11:29] manfrin: has joined #RubyOnRails
[21:13:16] k3rn31: has joined #RubyOnRails
[21:14:41] gingray: has joined #RubyOnRails
[21:15:51] Darmani: I have a question.
[21:16:13] Darmani: If I wanted to change something in development.. Would I have to reupload the whole project to Heroku?
[21:16:19] Darmani: Is there a simple way to edit the code? o.o
[21:16:40] cnk: Yes but don't
[21:16:56] cnk: edit in your dev environment, commit, then push to heroku
[21:17:11] macsteps: has joined #RubyOnRails
[21:17:13] cnk: your edits are not persistant so don't do it
[21:17:31] Darmani: cnk: that's lame -,-
[21:18:03] cnk: No that's the trade off you made when you used Heroku instead of setting up your own server
[21:18:04] der-landgraf: has joined #RubyOnRails
[21:18:10] whathapp_: has joined #RubyOnRails
[21:18:26] Darmani: cnk: yeah I guess.
[21:18:34] Darmani: Well thanks for letting me know ^^
[21:18:36] cnk: By the way, when you do get around to making a server of your own, use Digital Ocean. Their docs are great
[21:18:51] Darmani: Digital Ocean..? o.o
[21:19:29] cnk: https://www.digitalocean.com/
[21:19:51] cnk: for now, bookmark that and then forget it
[21:20:01] Darmani: cnk: Aye aye captain.
[21:20:18] Darmani: alright I need to eat. bbl
[21:20:25] cnk: There is a lot to learn. But you are getting there
[21:21:59] FailedGeologist: has joined #RubyOnRails
[21:22:07] yellow5: has joined #RubyOnRails
[21:22:19] Jenzo: Now to program in Ruby on rails do you need a compiler?
[21:22:25] drale2k: Digital Ocean + Dokku https://github.com/dokku/dokku = Your own Heroku
[21:22:32] Jenzo: I'm learning how to program using Coding Academy and using a virtual compiler.
[21:23:47] sumobob: dokku looks gorgeous
[21:23:57] cnk: what is a virtual compiler?
[21:28:29] Jenzo: cnk you program using the schools online emulator
[21:28:49] Jenzo: How do you program a Ruby on rails program?
[21:28:50] flashpoint9: has joined #RubyOnRails
[21:29:26] bmorrison: has joined #RubyOnRails
[21:29:28] cnk: I think there are some online environments but most people learn rails by setting it up on their own computer
[21:30:34] cnk: Jenzo: what are you trying to accmoplish and what do you have available to do so
[21:31:04] Jenzo: I would like to know where do i go to write a Rub on rails program?\
[21:31:08] tubbo: Jenzo: !ban op is a faggot
[21:31:14] tubbo: !ban Kenzo oiaf
[21:31:21] tubbo: !ban Jenzo oiaf
[21:31:38] Jenzo: I'm learning from the Academy
[21:31:45] tubbo: tubbo kicked Jenzo: you
[21:31:45] Jenzo: has joined #RubyOnRails
[21:32:00] tubbo: interesting
[21:32:05] Jenzo: Code Academy is an online free school
[21:32:05] ChanServ: +q *!*@173.65.244.234
[21:32:35] terra_: has joined #RubyOnRails
[21:33:20] terra_: Hey guys, I was wondering if there was a gem or something that would allow for a user to have the ability to use the scroll wheel when hovering over <%= number_field %> in ruby on rails?
[21:34:53] sharkman: has joined #RubyOnRails
[21:35:04] cnk: Jenzo: you probably need to install ruby + database + rails on your own machine to really learn much. These install instructions are generally pretty good: http://docs.railsbridge.org/docs/
[21:35:30] pontiki: terra_: that wouldn't be anything in ruby or rails itself, really; it's a browser type thing
[21:35:38] sumobob: if you hit ruby install problems reach out the people in #ruby
[21:36:03] tubbo: terra_: that would be something you'd make with JS, so it wouldn't be a gem.
[21:36:08] sumobob: https://github.com/cldwalker/nirvana
[21:36:12] terra_: I have previously used this "http://www.virtuosoft.eu/code/bootstrap-touchspin/" but when I changed my project from HTML/CSS/JS to ruby on rails it didnt work anymore
[21:36:22] noobsu__: has joined #RubyOnRails
[21:37:24] pontiki: you need all that HTML/CSS/JS even if you use rails, terra_
[21:37:29] cnk: terra_: it probably didn't play nicely with the asset pipeline
[21:37:50] cnk: you may need to install it in one of the vendor assets directories
[21:37:56] terra_: what cnk said is what really happened
[21:38:19] terra_: and I'm still have problems with my javascript in the assset pipeline
[21:38:28] terra_: at the moment it is just all at the top of my *.html.erb file
[21:38:31] N1njturt1e: has joined #RubyOnRails
[21:38:34] der-landgraf: has joined #RubyOnRails
[21:39:16] pontiki: http://guides.rubyonrails.org/asset_pipeline.html
[21:40:13] banister: has joined #RubyOnRails
[21:40:19] terra_: Yeah I read that about the asset pipeline and how it works but I still must be doing something wrong...
[21:42:01] noobRORDev_: member:terra_ do you get any erros in your browser console?
[21:42:38] mikeiniowa: has joined #RubyOnRails
[21:43:34] terra_: At the moment no but I had to do some crazy workaround in order to actually get everything to work
[21:43:55] pontiki: or not work, as it were
[21:44:00] terra_: I think I know where the problem is but I ahve no idea how to fix it, and if I change it then it just goes back to messing up again, ill put it in a gist 1 sec
[21:44:54] terra_: https://gist.github.com/terrabl/527ef853625fd3956870891ad580264c This is my application.js file, and I had to uncomment the require turbolinks or else it would just give a rails error
[21:45:24] kgrz: has joined #RubyOnRails
[21:47:00] workmaster2n: has joined #RubyOnRails
[21:48:46] noobRORDev_: try putting //= require turbolinks after jquery and jquery_ujs
[21:49:15] jancel: has joined #RubyOnRails
[21:50:24] macsteps: has joined #RubyOnRails
[21:50:35] cnk: terra_: are you using turbo links? if not, here is how to finish removing it so rails doesn't error http://blog.steveklabnik.com/posts/2013-06-25-removing-turbolinks-from-rails-4
[21:51:15] terra_: <%= stylesheet_link_tag 'application.css', media: 'all', 'data-turbolinks-track' => true %> <%= javascript_include_tag 'application.js', 'data-turbolinks-track' => true %> This is what my application.html.erb looks like so I think I am using turbo links
[21:51:21] terra_: Is there a reason to use them/not?
[21:52:57] cnk: turbolinks is integrated when you type 'rails new' but if you don't want the feature, you can turn it off using the steps in that post
[21:53:18] cnk: I want a more normal request/response cycle so I always remove it
[21:53:42] Pupeno: has joined #RubyOnRails
[21:53:46] terra_: Well I have to go right now but I alredya wanna thank you guys so much for helping me. I'm probably going to be in this channel a lot as im new to ruby on rails and I have to automate some stuff for my internship
[21:53:58] Pupeno: has joined #RubyOnRails
[21:55:07] yfeldblum: has joined #RubyOnRails
[21:56:08] branchini: has joined #RubyOnRails
[21:57:59] srinidhi: has joined #RubyOnRails
[21:58:01] branchini: I am using devise for user authentication, I then have 2 different user models, one is a teacher- the other is an artist which are polymorphic to the devise user. I am trying to add columns to the user table so that the fields will be shared across both models. I can not get this to work. Is it not possible?
[21:59:23] banister: has joined #RubyOnRails
[21:59:47] helpa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[22:00:11] cnk: branchini: show your current user models
[22:00:39] rogue_koder: has joined #RubyOnRails
[22:01:51] branchini: https://gist.github.com/anonymous/16abccc3d5307a8b6a2bc547e16669b6
[22:02:53] branchini: i used scaffolding to create the artist and teacher, so I haven't really changed anything in the controllers other then the index page of each. using ransack for searching
[22:03:00] yfeldblum: has joined #RubyOnRails
[22:03:07] allcentury: has joined #RubyOnRails
[22:03:59] cnk: branchini: You should be able to add common fields by adding ot user
[22:04:00] branchini: i read about the devise registrations controller, and how to overwrite it to allow additional params
[22:04:09] cnk: what form of 'not work' are you seeing
[22:04:20] branchini: so when a user logs in
[22:04:29] branchini: they do it at /users/sign_in
[22:04:46] branchini: before adding the fields, it would route them to their artist or teacher profile
[22:04:52] crystal77: has joined #RubyOnRails
[22:04:54] branchini: now it just kicks back to the user sign in
[22:05:13] branchini: the fields are on the users table, when i create a new artist or teacher, they go into the database
[22:05:22] branchini: which i can view from the rails console
[22:06:12] branchini: i could just upload it to github if anyone would be up for cloning it an seeing if they can identify the issue
[22:06:20] alfiemax: is there any view helper in rails, that we can use to print out code blocks ?
[22:06:28] cnk: branchini: seems odd
[22:06:49] alfiemax: something for html code like this : <pre><code><%= @page.to_hash %></code></pre>
[22:06:51] branchini: it is very, it is driving me nuts. last day and a half. I am at a pretty big wall
[22:07:16] cnk: and you are using stock devise without overrides - so it's harder to put some puts statements in to find out what's up
[22:07:46] art-solopov: has joined #RubyOnRails
[22:07:48] branchini: yeah, the only thing that would affect devise would be the registrations controller that I override
[22:08:20] branchini: i followed this http://jacopretorius.net/2014/03/adding-custom-fields-to-your-devise-user-model-in-rails-4.html
[22:08:23] cnk: How about putting in a sign_in method witht some puts statements and then a 'super'
[22:08:53] branchini: a sign in on the user model? or an artist/teacher
[22:09:02] jenrzzz: has joined #RubyOnRails
[22:09:21] cnk: in the RegistrationsController
[22:09:33] alfiemax: branchini, would you upload it to github, i could take a look. been playing around with devise for a couple of days now :)
[22:09:44] cnk: your class RegistrationsController < Devise::RegistrationsController is just passing all the controller actions to Devise
[22:09:48] cnk: intercept and debug
[22:09:54] branchini: ok yes I will, need to set it up on tthis pc
[22:10:19] jancel: has joined #RubyOnRails
[22:13:02] superlou: has joined #RubyOnRails
[22:13:36] IFrank004: has joined #RubyOnRails
[22:13:43] IFrank00: has joined #RubyOnRails
[22:15:54] branchini: alfiemax, uploaded here https://github.com/branchdev/registry.git
[22:16:04] alfiemax: btw, anyone knows if there is a builtin rails view helper for printing out code blocks ?
[22:16:12] branchini: cnk, if you are interest to take a look https://github.com/branchdev/registry.git
[22:16:20] alfiemax: branchini, ok, i'll take a look
[22:16:30] branchini: thanks, I appreciate it
[22:17:56] cnk: alfiemax: I don't think there is a built in. http://patricklenz.co/blog/2012/2/16/syntax-highlighting-for-a-rails-blog
[22:17:57] branchini: alfiemax, shoot, i hadn't commited what i was working on, i just did now
[22:19:26] alfiemax: cnk, thanks
[22:25:42] nickenchuggets: has joined #RubyOnRails
[22:25:42] nickenchuggets: has joined #RubyOnRails
[22:27:18] Pupeno: has joined #RubyOnRails
[22:29:50] sneakerhax: has joined #RubyOnRails
[22:30:08] alfiemax: branchini, so what was the exact issue you were facing?
[22:31:33] hahuang65: has joined #RubyOnRails
[22:31:55] theblang: has joined #RubyOnRails
[22:31:56] alfiemax: branchini, still around?
[22:33:03] owenjones: has joined #RubyOnRails
[22:37:04] arBmind: has joined #RubyOnRails
[22:38:02] moeabdol: has joined #RubyOnRails
[22:39:55] pawnbox: has joined #RubyOnRails
[22:40:02] pawnbox_: has joined #RubyOnRails
[22:40:08] triptec: has joined #RubyOnRails
[22:40:09] Mia: has joined #RubyOnRails
[22:40:09] Mia: has joined #RubyOnRails
[22:40:43] hahuang65: has joined #RubyOnRails
[22:47:53] owenjones: has joined #RubyOnRails
[22:48:45] duncannz: has joined #RubyOnRails
[22:54:15] xlegoman: has joined #RubyOnRails
[22:55:43] triptec: has joined #RubyOnRails
[22:56:56] hahuang65: has joined #RubyOnRails
[22:57:34] workmaster2n: has joined #RubyOnRails
[22:59:05] drale2k: has joined #RubyOnRails
[23:00:30] tildes_: has joined #RubyOnRails
[23:07:23] N1njturt1e: has joined #RubyOnRails
[23:10:22] jstransky: has joined #RubyOnRails
[23:12:22] JesseH: has joined #RubyOnRails
[23:13:19] JesseH2: has joined #RubyOnRails
[23:14:16] diegoaguilar: has joined #RubyOnRails
[23:14:25] DragonPunch: has joined #RubyOnRails
[23:15:10] diegoaguilar: has joined #RubyOnRails
[23:20:32] roamingdog: has joined #RubyOnRails
[23:22:04] bmorrison: has joined #RubyOnRails
[23:25:51] refinerysource: has joined #RubyOnRails
[23:25:56] roamingd_: has joined #RubyOnRails
[23:31:31] roamingdog: has joined #RubyOnRails
[23:35:52] beilabs: has joined #RubyOnRails
[23:37:13] rattatmatt: has joined #RubyOnRails
[23:39:00] kies: has joined #RubyOnRails
[23:40:51] pawnbox: has joined #RubyOnRails
[23:41:58] Inside: has joined #RubyOnRails
[23:41:58] Inside: has joined #RubyOnRails
[23:42:44] hahuang65: has joined #RubyOnRails
[23:47:14] dalbusch1t: has joined #RubyOnRails
[23:49:58] ur5us: has joined #RubyOnRails
[23:51:52] macsteps: has joined #RubyOnRails
[23:55:48] CornishPasty: has joined #RubyOnRails
[23:55:51] c355E3B: has joined #RubyOnRails
[23:57:28] Sylario: has joined #RubyOnRails
[23:57:39] grvgr: has joined #RubyOnRails
[23:58:33] workmaster2n: has joined #RubyOnRails
[23:58:48] Ropeney: has joined #RubyOnRails