« Back to channel list

#RubyOnRails - 24 June 2016

« Back 1 day Forward 1 day »
[00:00:12] chopin: has joined #RubyOnRails
[00:01:02] Darmani: SteenJobs: I would say so.
[00:01:21] SteenJobs: haha underrated, seems like session is always the move for remembering anything :)
[00:02:21] Darmani: SteenJobs: for sure :)
[00:03:04] SteenJobs: i mean, why not - it’s super easy to access from code, persists throughout the scope of your app, so as long as it’s not terribly sensitive info, seems as good an option as any
[00:05:06] jenrzzz: has joined #RubyOnRails
[00:05:06] jenrzzz: has joined #RubyOnRails
[00:08:11] timdotrb: has joined #RubyOnRails
[00:16:12] JamesGames: If you had an app that didnt register logins that occured,...what would u suspect?
[00:17:58] sevenseacat: has joined #RubyOnRails
[00:23:19] chipotle_: has joined #RubyOnRails
[00:23:30] jenrzzz: has joined #RubyOnRails
[00:26:03] harfangk: has joined #RubyOnRails
[00:26:27] JamesGames: has joined #RubyOnRails
[00:30:16] JamesGames: hello. My current_user is defined in the session_helper.rb AND the application_controller.rb, where is the right place?
[00:30:37] Leepoff: has joined #RubyOnRails
[00:32:56] DoctorMonocular: has joined #RubyOnRails
[00:36:26] sevenseacat: application_controller.rb.
[00:39:40] pawnbox: has joined #RubyOnRails
[00:40:37] JamesGames: hello sevenseacat
[00:41:03] JamesGames: it is in session helper along with logged_in?
[00:41:11] JamesGames: do I delete them?
[00:42:15] JamesGames: or can I redirect them in some way
[00:42:44] sevenseacat: I don't know what they're doing there. if you put them there for some reason, your app will likely break if you just delete them.
[00:43:06] JamesGames: ok. I just did what M Hartle did
[00:43:31] JamesGames: so. I rename the ones in Application Controller?
[00:43:43] sevenseacat: thats for a tutorial. in a real app, you would use something like devise.
[00:43:54] sevenseacat: I believe he makes explicit mention of this
[00:44:32] kies: has joined #RubyOnRails
[00:44:34] JamesGames: so I should rename the methods or import the devise gem
[00:44:36] sevenseacat: nonetheless, helpers are for view logic only, an business logic like a current user is not the responsibility of a view helper.
[00:44:51] sevenseacat: what does the tutorial tell you to do?
[00:45:20] JamesGames: I finished it . I made a twitter-type app
[00:45:43] emachnic: has joined #RubyOnRails
[00:46:13] JamesGames: um. Can I rename the methods or will that mess things up?
[00:46:30] sevenseacat: ugh, the tutorial got written to recommend writing your own
[00:46:45] sevenseacat: another reason to dislike it immensely, not that there werent enough already
[00:47:40] JamesGames: just. from session_helper to application_controller. won't that break when the sessions are made?
[00:48:06] sevenseacat: no idea. i dont know what you've implemented.
[00:48:21] sevenseacat: try it and see.
[00:48:30] JamesGames: ill try it now
[00:50:18] JamesGames: its not finding the logged_in? method
[00:50:35] JamesGames: on the start page
[00:51:04] sevenseacat: you'll need to make it available to your views from your controller, ie. `helper_method :logged_in?`
[00:51:45] sevenseacat: I would greatly emphasise that writing your own auth system from scratch is not appropriate at this stage of your Rails learning
[00:53:37] JamesGames: this looks good!
[00:54:57] JamesGames: it isnt rendering the room variables --- <%= @room.name%>
[00:55:36] sevenseacat: thats irrelevant to any changes do to with current_user
[00:56:18] JamesGames: ok. I will remove the room refrences from the view. and see if it renders the user
[00:57:03] dtzuzu: has joined #RubyOnRails
[00:57:30] JamesGames: dude it worked!
[00:57:47] JamesGames: so, what about the @room variable
[00:57:53] sevenseacat: what about it?
[00:58:32] JamesGames: fair enough. I asked a question and u answered it
[00:59:35] JamesGames: My problem tho is that i need the @room variable to be set by the user.room_name attribute
[00:59:59] sevenseacat: thats fine, you cao do that
[01:00:05] sevenseacat: where are you doing that?
[01:00:35] JamesGames: in rooms_controller.rb
[01:00:40] JamesGames: @room = Room.find_by_name(current_user)
[01:00:40] JamesGames: render "show"
[01:00:42] pydave6367: has joined #RubyOnRails
[01:00:50] JamesGames: i shud have gist that
[01:02:48] dstarh: has joined #RubyOnRails
[01:02:59] JamesGames: the current is set in routes to redirect
[01:04:02] Spami: has joined #RubyOnRails
[01:06:01] JamesGames: I don't get it . why @room or @current_user, but not both?
[01:06:12] Oliphaunte: has joined #RubyOnRails
[01:08:49] jenrzzz: has joined #RubyOnRails
[01:08:54] jenrzzz: has joined #RubyOnRails
[01:09:53] Ropeney: has joined #RubyOnRails
[01:11:24] JamesGames: sevenseacat ----- I got it !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Sorry about the spam!! 4 ****ing days!! Someone tell Adam12 !!! Now Gentlemen, I have a game to make!! I will post the link here when is done
[01:12:06] JamesGames: good bye and thank you all,
[01:21:27] jetpackjoe: has joined #RubyOnRails
[01:23:32] Hobogrammer: has joined #RubyOnRails
[01:24:08] Spami: has joined #RubyOnRails
[01:27:16] Leepoff: has joined #RubyOnRails
[01:32:09] pawnbox: has joined #RubyOnRails
[01:33:02] PotatoChipz: has joined #RubyOnRails
[01:37:52] _Tariq: has joined #RubyOnRails
[01:40:20] emachnic: has joined #RubyOnRails
[01:42:30] moeabdol: has joined #RubyOnRails
[01:46:24] siaw23: has joined #RubyOnRails
[01:53:55] xall: has joined #RubyOnRails
[01:54:28] Leepoff: has joined #RubyOnRails
[01:54:41] Spami: has joined #RubyOnRails
[01:54:56] enitiz: has joined #RubyOnRails
[01:56:34] sneakers: has joined #RubyOnRails
[01:58:03] roamingdog: has joined #RubyOnRails
[01:58:28] ur5us: has joined #RubyOnRails
[01:59:21] sn1ff3r: has joined #RubyOnRails
[02:00:15] northfurr: has joined #RubyOnRails
[02:05:41] rubyonrailed: has joined #RubyOnRails
[02:11:46] _Tariq: has joined #RubyOnRails
[02:11:55] dcunit3d: has joined #RubyOnRails
[02:12:05] sumobob: has joined #RubyOnRails
[02:12:59] valetudo: has joined #RubyOnRails
[02:13:25] rubyonra_: has joined #RubyOnRails
[02:15:11] Guest31: has joined #RubyOnRails
[02:20:41] Oliphaunte: has joined #RubyOnRails
[02:22:21] roamingdog: has joined #RubyOnRails
[02:22:31] northfurr: has joined #RubyOnRails
[02:24:23] dezull: has joined #RubyOnRails
[02:25:43] dstarh: has joined #RubyOnRails
[02:26:13] pawnbox: has joined #RubyOnRails
[02:26:38] Oliphaunte: has joined #RubyOnRails
[02:28:58] one_zero: has joined #RubyOnRails
[02:31:46] northfurr: has joined #RubyOnRails
[02:32:18] wd40s: has joined #RubyOnRails
[02:34:34] ketherah: has joined #RubyOnRails
[02:34:39] emachnic: has joined #RubyOnRails
[02:38:13] braincra-: has joined #RubyOnRails
[02:39:56] jenrzzz: has joined #RubyOnRails
[02:39:56] jenrzzz: has joined #RubyOnRails
[02:42:12] northfurr: has joined #RubyOnRails
[02:45:22] pilne: has joined #RubyOnRails
[02:47:51] roamingdog: has joined #RubyOnRails
[02:50:02] Oliphaunte: has joined #RubyOnRails
[02:53:34] pwnd_nsfw`: has joined #RubyOnRails
[02:53:35] quazimodo: has joined #RubyOnRails
[02:53:36] quazimod1: has joined #RubyOnRails
[02:53:46] sarink: has joined #RubyOnRails
[02:58:09] _Tariq: has joined #RubyOnRails
[02:59:17] DoctorMonocular: has joined #RubyOnRails
[03:02:06] pawnbox: has joined #RubyOnRails
[03:04:52] northfurr: has joined #RubyOnRails
[03:07:47] jtong: has joined #RubyOnRails
[03:09:08] Oliphaunte: has joined #RubyOnRails
[03:11:30] Oliphaunte: has joined #RubyOnRails
[03:12:03] SteenJobs: has joined #RubyOnRails
[03:13:18] chipotle: has joined #RubyOnRails
[03:15:55] dstarh: has joined #RubyOnRails
[03:18:36] braincrash: has joined #RubyOnRails
[03:19:06] sumobob: has joined #RubyOnRails
[03:21:21] k3rn31: has joined #RubyOnRails
[03:23:45] rubyonrailed: has joined #RubyOnRails
[03:26:45] pwnd_nsfw`: lmfao sevenseacat ahhh
[03:30:32] moeabdol: has joined #RubyOnRails
[03:38:08] pawnbox: has joined #RubyOnRails
[03:40:59] jenrzzz: has joined #RubyOnRails
[03:43:55] rafaelfranca: has joined #RubyOnRails
[03:46:43] AmiMoench: has joined #RubyOnRails
[03:52:13] SteenJobs: has joined #RubyOnRails
[03:55:50] ensyde__: has joined #RubyOnRails
[03:57:33] northfurr: has joined #RubyOnRails
[03:58:09] dstarh: has joined #RubyOnRails
[04:07:42] swap_a_b: has joined #RubyOnRails
[04:09:15] jtong: has joined #RubyOnRails
[04:11:33] pontiki: has joined #RubyOnRails
[04:11:34] joycse06: has joined #RubyOnRails
[04:19:18] Wolland: has joined #RubyOnRails
[04:22:46] Oliphaunte: has joined #RubyOnRails
[04:22:47] emachnic: has joined #RubyOnRails
[04:22:56] sumobob: has joined #RubyOnRails
[04:23:50] zave: has joined #RubyOnRails
[04:31:14] patrick_star: has joined #RubyOnRails
[04:33:52] dcunit3d: has joined #RubyOnRails
[04:35:28] xall: has joined #RubyOnRails
[04:40:21] Oliphaunte: has joined #RubyOnRails
[04:44:43] conta: has joined #RubyOnRails
[04:51:51] djbkd: has joined #RubyOnRails
[04:52:57] atrius: has joined #RubyOnRails
[04:53:04] jenrzzz: has joined #RubyOnRails
[04:53:04] jenrzzz: has joined #RubyOnRails
[04:53:45] Oliphaunte: has joined #RubyOnRails
[04:56:35] rubyonrails849: has joined #RubyOnRails
[04:57:49] PotatoChipz: has joined #RubyOnRails
[04:58:54] pontiki: pretty quiet
[04:58:56] sevenseacat: has joined #RubyOnRails
[04:59:03] rubyonrails849: wondering whether I should learn ruby first in order to learn rails
[04:59:17] rubyonrails849: new to the rails community and was suggested to come here
[04:59:51] sevenseacat: yes, learn ruby first.
[05:00:14] rubyonrails849: also was wondering I set up my dev environment and downloaded an rvm
[05:00:17] pontiki: it's sort of like asking "should i learn french by writing a french novel first?"
[05:00:28] rubyonrails849: is that also something i should learn after learning basic syntax of ruby?
[05:02:33] rubyonrails849: Sorry for asking a pretty obvious question, but thank you for the input. I appreciate it thank you
[05:02:36] helpa: Just the tips: http://logs.ryanbigg.com/tips
[05:03:00] helpa: Ubuntu, Ruby, ruby-install, chruby, Rails setup guide: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you/ - Gauranteed to work 100% of the time or your money back!
[05:03:19] swap_a_b: has left #RubyOnRails: ()
[05:03:20] rvanlieshout: has joined #RubyOnRails
[05:03:37] pontiki: there's one near that for mac
[05:03:56] helpa: Remove RVM (with 'rvm implode --force') and use chruby + ruby-install. Ubuntu guide: http://bit.ly/1mvdEuH Mac guide: http://bit.ly/1QA85bc
[05:04:43] pontiki: if you're on windows, use cloud 9
[05:04:52] rubyonrails849: Also was wondering how long did it take most of you guys before being able to use rails to build an application? I pick things up pretty quick, learned html5 and css basics in about a week and a healf
[05:05:06] rubyonrails849: I'm using a mac
[05:05:45] rvanlieshout: rubyonrails849: your first tutorial would be to build an app, so pretty quick :
[05:05:46] pontiki: do you mean build any application, including toy apps, etc?
[05:06:14] pontiki: the way you learn to build rails apps is to build rails apps
[05:06:21] pontiki: just like all the other stuff
[05:06:47] pontiki: then you do it again, and again, and so on, then you teach someone else, etc
[05:06:59] pontiki: no magic, no silver bullets
[05:07:13] pontiki: i'm still learning every day
[05:07:30] yfeldblum: has joined #RubyOnRails
[05:07:32] rubyonrails849: I'm trying to land a junior developer position as a RoR developer within a 9 month time frame
[05:07:41] rubyonrails849: studying about 3 hours a day while working
[05:07:56] rubyonrails849: started about a week ago
[05:08:21] rubyonrails849: are you working as a dev pontiki?
[05:09:04] pontiki: and i'm teaching people
[05:10:03] rubyonrails849: Awesome, I'm glad I stumbled across this resource. Thank you for the input and looking forward to joining the RoR community with all of you guys! Pleased to meet you all
[05:10:27] pontiki: you have joined, you are one of us
[05:11:04] rubyonrails849: hahaha thanks again, I'll definitely be back. Good night all
[05:11:07] jtong: has joined #RubyOnRails
[05:14:26] Cache_Money: has joined #RubyOnRails
[05:14:29] pLaToOn: has joined #RubyOnRails
[05:18:19] PotatoChipz: has joined #RubyOnRails
[05:25:42] harfangk: has joined #RubyOnRails
[05:26:18] Hyuk: has joined #RubyOnRails
[05:26:46] alfiemax: has joined #RubyOnRails
[05:32:41] Leepoff: has joined #RubyOnRails
[05:34:59] sar1nk: has joined #RubyOnRails
[05:36:31] Cervajz: has joined #RubyOnRails
[05:36:55] Cervajz: has joined #RubyOnRails
[05:40:26] Coldblackice: has joined #RubyOnRails
[05:40:43] pawnbox: has joined #RubyOnRails
[05:44:09] pLaToOn: has joined #RubyOnRails
[05:45:00] Wolland: has joined #RubyOnRails
[05:52:20] joycse06: has joined #RubyOnRails
[05:53:40] joycse06: has joined #RubyOnRails
[05:53:50] pawnbox: has joined #RubyOnRails
[05:55:27] duncannz: has joined #RubyOnRails
[05:55:41] northfurr: has joined #RubyOnRails
[05:58:12] chopin: has joined #RubyOnRails
[06:00:16] arBmind: has joined #RubyOnRails
[06:02:35] dcunit3d: has joined #RubyOnRails
[06:07:05] PotatoChipz: has joined #RubyOnRails
[06:10:24] northfurr: has joined #RubyOnRails
[06:10:59] Niham: has joined #RubyOnRails
[06:11:17] emachnic: has joined #RubyOnRails
[06:11:52] jtong: has joined #RubyOnRails
[06:15:26] moei: has joined #RubyOnRails
[06:15:27] dalpo: has joined #RubyOnRails
[06:15:52] sarink: has joined #RubyOnRails
[06:16:19] harfangk: has joined #RubyOnRails
[06:24:40] dminca: has joined #RubyOnRails
[06:25:12] dminca: has joined #RubyOnRails
[06:25:39] dminca: has joined #RubyOnRails
[06:29:57] agit0: has joined #RubyOnRails
[06:32:24] workmad3: has joined #RubyOnRails
[06:32:51] conta1: has joined #RubyOnRails
[06:33:28] mixnblend: has joined #RubyOnRails
[06:34:18] Dimik: has joined #RubyOnRails
[06:38:35] banister: has joined #RubyOnRails
[06:39:10] jenrzzz: has joined #RubyOnRails
[06:39:10] jenrzzz: has joined #RubyOnRails
[06:41:01] Oliphaunte: has joined #RubyOnRails
[06:44:27] joycse06: has joined #RubyOnRails
[06:45:26] comrad: has joined #RubyOnRails
[06:45:33] adac: has joined #RubyOnRails
[06:45:43] aganov: has joined #RubyOnRails
[06:47:38] douglascorrea: has joined #RubyOnRails
[06:48:18] jenrzzz: has joined #RubyOnRails
[06:53:46] GoranPavlovic: has joined #RubyOnRails
[06:54:39] FrankD: has joined #RubyOnRails
[06:54:41] yfeldblum: has joined #RubyOnRails
[06:55:39] xall: has joined #RubyOnRails
[06:56:01] darutoko: has joined #RubyOnRails
[07:00:07] jas02: has joined #RubyOnRails
[07:07:20] dionysus69: has joined #RubyOnRails
[07:09:29] sarink: has joined #RubyOnRails
[07:10:45] Hyuk: has joined #RubyOnRails
[07:14:10] jtong: has joined #RubyOnRails
[07:19:14] dcunit3d: has joined #RubyOnRails
[07:19:26] jenrzzz: has joined #RubyOnRails
[07:19:47] DoctorMonocular: has joined #RubyOnRails
[07:29:44] siaw23: has joined #RubyOnRails
[07:33:49] Ergo: has joined #RubyOnRails
[07:34:57] edwinvdgraaf: has joined #RubyOnRails
[07:36:24] Oliphaunte: has joined #RubyOnRails
[07:38:24] binaryplease1: has joined #RubyOnRails
[07:41:54] Pumukel: has joined #RubyOnRails
[07:42:55] blackhuey: has joined #RubyOnRails
[07:44:02] srinidhi: has joined #RubyOnRails
[07:48:40] fermonkus: has joined #RubyOnRails
[07:49:39] yfeldblum: has joined #RubyOnRails
[07:50:07] alfiemax: has joined #RubyOnRails
[07:51:54] Cervajz: has joined #RubyOnRails
[07:51:56] srinidhi1: has joined #RubyOnRails
[07:52:16] arBmind: has joined #RubyOnRails
[07:52:30] njero: has joined #RubyOnRails
[07:53:04] eGGshke: has joined #RubyOnRails
[07:56:24] sarink: has joined #RubyOnRails
[07:59:49] emachnic: has joined #RubyOnRails
[08:00:42] eGGshke: has joined #RubyOnRails
[08:02:40] _Tariq: has joined #RubyOnRails
[08:03:58] jsrn_: has joined #RubyOnRails
[08:04:51] pawnbox_: has joined #RubyOnRails
[08:05:19] mdw: has joined #RubyOnRails
[08:05:37] jenrzzz: has joined #RubyOnRails
[08:06:56] Spami: has joined #RubyOnRails
[08:07:00] Hyuk: has joined #RubyOnRails
[08:08:19] harfangk: has joined #RubyOnRails
[08:09:42] _Tariq: has joined #RubyOnRails
[08:12:33] Ropeney: has joined #RubyOnRails
[08:15:01] jtong: has joined #RubyOnRails
[08:16:51] adre: has joined #RubyOnRails
[08:17:09] piotrj: has joined #RubyOnRails
[08:20:10] harfangk: has joined #RubyOnRails
[08:22:55] GorillaApe: has joined #RubyOnRails
[08:29:44] Oliphaunte: has joined #RubyOnRails
[08:32:36] Pazician: has joined #RubyOnRails
[08:32:48] marr: has joined #RubyOnRails
[08:36:34] piotrj: has joined #RubyOnRails
[08:38:00] jgt: has joined #RubyOnRails
[08:39:14] snowy: has joined #RubyOnRails
[08:41:41] workmad3: has joined #RubyOnRails
[08:42:49] Cervajz: has joined #RubyOnRails
[08:45:44] oystersauce8: has joined #RubyOnRails
[08:49:34] skroon: how can I directly write some javascript code in view.html.erb ?
[08:51:23] harfangk: has joined #RubyOnRails
[08:52:18] oystersauce8: skroon: yes you can
[08:52:42] skroon: oystersauce8: oke I thought it perhaps needed to be in a .js file it self, and then load it in via the layouts or application.js
[08:54:34] skroon: oystersauce8: so do I need to make a script tag with text/javascript and then put js in there?
[08:54:46] gingray: has joined #RubyOnRails
[08:54:46] emachnic: has joined #RubyOnRails
[08:55:08] oystersauce8: its not a good practice but yeah you can put it in script tags
[08:55:48] sarink: has joined #RubyOnRails
[08:57:07] swap_a_b: has joined #RubyOnRails
[08:57:21] swap_a_b: has left #RubyOnRails: ()
[08:58:53] AmiMoench: has joined #RubyOnRails
[09:01:08] pawnbox: has joined #RubyOnRails
[09:01:58] mixnblend: has joined #RubyOnRails
[09:02:29] emachnic: has joined #RubyOnRails
[09:04:35] yfeldblum: has joined #RubyOnRails
[09:07:29] srinidhi: has joined #RubyOnRails
[09:09:14] tildes: has joined #RubyOnRails
[09:13:21] agit0: has joined #RubyOnRails
[09:13:38] ur5us: has joined #RubyOnRails
[09:13:45] solars: has joined #RubyOnRails
[09:16:30] jtong: has joined #RubyOnRails
[09:23:57] Oliphaunte: has joined #RubyOnRails
[09:35:34] fermonkus: has joined #RubyOnRails
[09:36:01] Niham: has joined #RubyOnRails
[09:39:10] skroon: has joined #RubyOnRails
[09:39:14] alfiemax: has joined #RubyOnRails
[09:39:14] Niham: has joined #RubyOnRails
[09:41:38] jak: has joined #RubyOnRails
[09:42:20] Niham: has joined #RubyOnRails
[09:45:55] pawnbox: has joined #RubyOnRails
[09:50:10] lxsameer: has joined #RubyOnRails
[09:50:17] agit0: has joined #RubyOnRails
[09:54:27] dcunit3d: has joined #RubyOnRails
[09:54:35] Pazician: has joined #RubyOnRails
[09:56:59] harfangk: has joined #RubyOnRails
[10:02:19] skroon: has joined #RubyOnRails
[10:05:49] eGGshke: has joined #RubyOnRails
[10:06:30] dminuoso: has joined #RubyOnRails
[10:07:19] jgt: has joined #RubyOnRails
[10:12:28] tildes: has joined #RubyOnRails
[10:12:59] AzaToth: has joined #RubyOnRails
[10:17:47] fox_mulder_cp: has joined #RubyOnRails
[10:19:13] srinidhi: has joined #RubyOnRails
[10:20:26] quazimodo: has joined #RubyOnRails
[10:20:26] quazimod1: has joined #RubyOnRails
[10:20:41] pwnd_nsfw: has joined #RubyOnRails
[10:24:16] emiltin: has joined #RubyOnRails
[10:27:04] mdw: has joined #RubyOnRails
[10:38:04] DoubleMalt: has joined #RubyOnRails
[10:39:36] jgt: has joined #RubyOnRails
[10:44:20] Detch: has joined #RubyOnRails
[10:47:21] jgt: has joined #RubyOnRails
[10:50:22] diegoaguilar: has joined #RubyOnRails
[10:58:16] AntiSpamMeta: has joined #RubyOnRails
[10:59:14] Geffy: has joined #RubyOnRails
[11:01:59] sarink: has joined #RubyOnRails
[11:07:05] wethu: has joined #RubyOnRails
[11:12:04] Oliphaunte: has joined #RubyOnRails
[11:13:28] King_Rex: has joined #RubyOnRails
[11:16:00] rodfersou: has joined #RubyOnRails
[11:17:42] roamingdog: has joined #RubyOnRails
[11:20:44] umdstu: has joined #RubyOnRails
[11:22:51] yfeldblum: has joined #RubyOnRails
[11:24:26] GodFather: has joined #RubyOnRails
[11:25:50] moeabdol: has joined #RubyOnRails
[11:26:02] allcentury: has joined #RubyOnRails
[11:29:49] basldex: has joined #RubyOnRails
[11:30:50] basldex: I'm near desperation: what could cause active admin 401 to redirect to my app's login? authentication_method is :authenticate_admin_user! and current_user_method is :current_admin_user. could it maybe be something related to the order in which I've put my routes?
[11:31:06] GodFather: has joined #RubyOnRails
[11:33:43] njero: I'm not familiar with active admin. Is the request reaching the appropriate controller? can't you just check log n see. what is serving where?
[11:34:02] basldex: yes it is and it's responding with 401 as expected
[11:34:07] basldex: but the redirect path is not expected
[11:34:49] alfiemax: basldex, if active_admin authentication is a failure then where else do you expect it to redirect to?
[11:35:11] njero: you mean: redirect_to path is not working properly :: o0
[11:35:19] dcunit3d: has joined #RubyOnRails
[11:35:26] alfiemax: wait, when you said, did you mean your app login? and not active_admin login?
[11:35:40] basldex: alfiemax: of course it's supposed to redirect to admin panel login
[11:35:55] basldex: when I try to reach the admin panel and get 401 I want to get redirected to the admin panel login
[11:36:04] basldex: but I am getting redirected to my app login
[11:36:48] njero: OIC.. do you have any before filters for admin login page which require app login :P
[11:37:17] basldex: I would see them in the server log in that case
[11:37:51] basldex: it somehow seems to think it's in the other devise scope
[11:37:54] basldex: tough I have no clue why
[11:38:16] alfiemax: can you show the device routes you have?
[11:38:42] Niham: has joined #RubyOnRails
[11:38:44] alfiemax: and maybe try setting `config.root_to` in your active_admin initializer
[11:39:43] alfiemax: wipe that out, that was for after login
[11:41:01] basldex: got a second app with a very same setup (both have a selfmade engine inside too)
[11:41:05] basldex: works fine on the second app
[11:41:14] basldex: must be some tiny thing I overlook
[11:42:00] Niham: has joined #RubyOnRails
[11:44:29] Detch: has joined #RubyOnRails
[11:45:20] ldnunes: has joined #RubyOnRails
[11:45:59] techsethi: has joined #RubyOnRails
[11:54:22] _Tariq: has joined #RubyOnRails
[12:01:11] basldex: warden_options in devise' failure_app say scope :user
[12:01:24] basldex: ok, cool. that explains the redirect. but I have no idea why that's set -.-
[12:03:07] njero: maybe user helper methods or something like current_user asks warden to authenticate --"Wild guess :O"
[12:03:11] c355E3B: has joined #RubyOnRails
[12:03:24] ensyde__: has joined #RubyOnRails
[12:05:00] basldex: n_e_o: thought the same but:
[12:05:10] basldex: config.authentication_method = :authenticate_admin_user!
[12:05:11] basldex: config.current_user_method = :current_admin_user
[12:05:57] Oliphaunte: has joined #RubyOnRails
[12:06:18] conta1: has joined #RubyOnRails
[12:07:17] njero: are those set after starting server or something, may be stop spring tooo. if locally
[12:07:17] tknz: has joined #RubyOnRails
[12:07:27] basldex: they are set in an initializer
[12:08:38] conta1: so I have model Item with product_it. How can I find products that have been the most used in last month?
[12:08:40] vale_tudo: has joined #RubyOnRails
[12:09:11] njero: conta1, lol... not unless if u track
[12:09:39] conta1: what do you mean by track?
[12:09:40] moep: has joined #RubyOnRails
[12:09:47] basldex: first: define "used"
[12:10:03] njero: basldex, yeah rt
[12:10:16] conta1: Item is "product has been bought", so most bought ones
[12:10:39] conta1: Item has belongs_to :product
[12:11:30] conta1: not sure if it's too hot in my office, or it's hard to write such a query
[12:11:50] douglascorrea: has joined #RubyOnRails
[12:12:27] dminuoso: has joined #RubyOnRails
[12:12:37] basldex: if product has_many :items you can just do product.items.size
[12:12:43] basldex: still we don't know about your business logic
[12:13:14] armyriad: has joined #RubyOnRails
[12:13:45] vale-tudo: has joined #RubyOnRails
[12:13:54] nickjj_: has joined #RubyOnRails
[12:13:56] d0nn1e: has joined #RubyOnRails
[12:14:27] conta1: basldex, it is has_many
[12:14:40] Ergo: has joined #RubyOnRails
[12:15:05] conta1: so I guess I need to write some method to find most bought products
[12:16:25] benlieb: has joined #RubyOnRails
[12:17:25] mrbubbles: has joined #RubyOnRails
[12:17:50] AntiSpamMeta: has joined #RubyOnRails
[12:21:25] armyriad: has joined #RubyOnRails
[12:32:14] basldex: conta1: simply sort_by size
[12:32:27] basldex: shouldn't be more than a one liner
[12:32:40] mdw: has joined #RubyOnRails
[12:36:12] alfiemax: has joined #RubyOnRails
[12:39:10] ensyde__: has joined #RubyOnRails
[12:40:09] rvanlieshout: don't sort_by size
[12:40:14] rvanlieshout: try to sort using db queries
[12:40:42] rvanlieshout: more efficient
[12:41:50] workmad3: has joined #RubyOnRails
[12:42:12] basldex: how would you?
[12:42:19] rvanlieshout: by what exactly do you want to sort?
[12:43:09] basldex: guess he wants to sort by number of associated models
[12:44:25] rvanlieshout: the fastest way for that is to use counter_cache
[12:44:27] rvanlieshout: and just order by that
[12:44:51] alfiemax: rvanlieshout, what about an alternative ?
[12:45:03] rvanlieshout: an alternative?
[12:45:13] alfiemax: to using counter_cache
[12:45:26] rvanlieshout: join it, order by COUNT(foo.*)
[12:45:33] alfiemax: i agree it's the fastest method
[12:45:45] rvanlieshout: left join it, if the relationship is optional
[12:45:58] Cervajz: has joined #RubyOnRails
[12:45:59] alfiemax: what about for a has many through association?
[12:46:38] nettoweb: has joined #RubyOnRails
[12:46:42] Macaveli: has joined #RubyOnRails
[12:46:46] basldex: sounds like a great pro-tipp for performance
[12:47:06] Macaveli: Hello! Why isn't this getting passed to params? "<input type="hidden" id="txtTamoID" name="txtTamoID" value="blabla"/>"
[12:47:23] rvanlieshout: Macaveli: !gist your request log and form html
[12:47:23] helpa: Macaveli: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[12:47:41] conta1: rvanlieshout, basldex I think I will give up, it would be too slow with a lot of data anyway
[12:47:52] ghormoon: has joined #RubyOnRails
[12:48:10] basldex: conta1: why don't you try rvanlieshout's way?
[12:48:39] voidDotClass: has joined #RubyOnRails
[12:49:41] Oliphaunte: has joined #RubyOnRails
[12:49:54] conta1: basldex I tried solution from here: http://stackoverflow.com/questions/8696005/rails-3-activerecord-order-by-count-on-association, which seems to be similar, but it's slow
[12:50:00] voidDotClass: If I'm requiring a css file via app.css (assets pipeline), and the css file refers to foo.png which is the same directory as the css file (app/assets/styles/foo.png), will that work or would i need to do something else to get them to work?
[12:50:16] rvanlieshout: conta1: what models do you have?
[12:50:49] conta1: LineItem belongs to Product, Product has_many line_items
[12:51:05] rvanlieshout: and you want what sorted by what?
[12:51:13] alfiemax: has joined #RubyOnRails
[12:51:48] conta1: top 5 Products for last month (LineItem is 'bought product')
[12:52:27] conta1: Unfortunately Product is STI so I am filtering there as well so it's slow
[12:52:30] rvanlieshout: Product.joins('LEFT JOIN line_items ON line_items.product_id = products.id').group('products.*').order('COUNT(line_items.*) DESC').limit(5)
[12:52:50] ghormoon: has joined #RubyOnRails
[12:52:58] alfiemax: i've these associations in my Event Model
[12:52:59] alfiemax: has_many :reservations
[12:53:02] alfiemax: has_many :reserved_guests, through: :reservations, source: :guest
[12:53:04] rvanlieshout: ah.. i've yet to see the first person here who uses STI for a valid reason
[12:53:08] rvanlieshout: why are you using STI?
[12:53:38] alfiemax: reserved_guests association with a condition of reservations being approved
[12:53:45] basldex: rvanlieshout: honestly, tough I see the performance boost, I'd hate to have lines like that in my codebase
[12:53:57] alfiemax: i tried passing in `-> { where reservations: { accepted: true } }`
[12:53:57] conta1: Different kind of Products (eg, delivery, payment, etc.)
[12:54:11] rvanlieshout: conta1: and what's wrong with having multiple tables?
[12:54:27] alfiemax: but that's giving me an odd error, `syntax error, unexpected '\n', expecting =>`
[12:54:43] conta1: rvanlieshout: it's the code that I got to work on, can't change it now
[12:54:48] rvanlieshout: conta1: fair enough
[12:54:51] rvanlieshout: tried that statement?
[12:55:00] rvanlieshout: product_format = @product_product_format.product_format
[12:55:02] rvanlieshout: wrong window :)
[12:55:28] conta1: column "products.id" must appear in the GROUP BY clause or be used in an aggregate function rvanlieshout
[12:56:19] rvanlieshout: ah. then you'll have to split down the columns in a .select
[12:57:09] sergio_101: has joined #RubyOnRails
[13:04:08] jgt: has joined #RubyOnRails
[13:06:29] jgt1: has joined #RubyOnRails
[13:08:26] voidDotClass: has joined #RubyOnRails
[13:08:39] allcentury: has joined #RubyOnRails
[13:12:32] Leepoff: has joined #RubyOnRails
[13:13:17] snowy: has joined #RubyOnRails
[13:16:24] Detch: has joined #RubyOnRails
[13:16:40] pawnbox: has joined #RubyOnRails
[13:18:42] GoranPavlovic: has joined #RubyOnRails
[13:18:48] aegis3121: has joined #RubyOnRails
[13:19:38] Niham: has joined #RubyOnRails
[13:19:44] DTZUBDUB: has joined #RubyOnRails
[13:22:30] fmcgeough: has joined #RubyOnRails
[13:22:46] jtong: has joined #RubyOnRails
[13:22:56] Oliphaunte: has joined #RubyOnRails
[13:24:56] douglascorrea: has joined #RubyOnRails
[13:26:29] diegoviola: has joined #RubyOnRails
[13:27:22] sevenseacat: alfiemax: you should know by know, gists with code and error
[13:28:19] alfiemax: ok, will do.. :) it was just one line that's why thought of just pasting it here
[13:28:36] sevenseacat: alfiemax: we don't know what the final line looks like, where you added that lambda
[13:29:11] sevenseacat: we also don't know which line you added the lambda to
[13:29:26] sevenseacat: we don't have these rules to be pedantic, its to answer questions
[13:29:43] JulienITARD: has joined #RubyOnRails
[13:29:50] alfiemax: hmm, fair enough :)
[13:33:29] alfiemax: here you go: https://gist.github.com/alfie-max/e40ecaef8998c776cbed1379bcb705b4
[13:34:34] sevenseacat: alfiemax: http://apidock.com/rails/ActiveRecord/Associations/ClassMethods/has_many the scope must be the second argument to has_many, not the third
[13:35:45] asheinfeld: has joined #RubyOnRails
[13:36:10] alfiemax: oh, thanks :) that fixed it
[13:36:31] alfiemax: the error messages has to be more descriptive
[13:36:54] universa1: alfiemax: it is a syntax error
[13:37:18] universa1: alfiemax: you are using an implicit hash argument, it is hard to give more descriptive error messages.
[13:43:47] yellow5: has joined #RubyOnRails
[13:44:19] shinnya: has joined #RubyOnRails
[13:45:10] rubyonrailed: has joined #RubyOnRails
[13:45:21] Oliphaunte: has joined #RubyOnRails
[13:47:26] JamieD: has joined #RubyOnRails
[13:49:43] jhack: has joined #RubyOnRails
[13:56:22] andywww: has joined #RubyOnRails
[13:56:25] agit0: has joined #RubyOnRails
[13:58:07] chipotle: has joined #RubyOnRails
[13:58:55] brendan-: has joined #RubyOnRails
[14:00:23] chipotle: has joined #RubyOnRails
[14:03:05] pwnd_nsfw`: has joined #RubyOnRails
[14:03:58] jstrong: has joined #RubyOnRails
[14:04:52] FernandoBasso: has joined #RubyOnRails
[14:05:10] solars: hi, does anyone know tools (web based) that let a user select tables/attributes of a db and visualize it as charts? like admin interfaces or something like that? (nothing programatically)
[14:06:48] arnonhongklay: has joined #RubyOnRails
[14:08:42] andywww: has left #RubyOnRails: ()
[14:09:22] macsteps: has joined #RubyOnRails
[14:09:54] Spami: has joined #RubyOnRails
[14:09:57] jtong: has joined #RubyOnRails
[14:10:40] snowy: has joined #RubyOnRails
[14:11:01] pontiki: has joined #RubyOnRails
[14:17:31] AlexJakeGreen: has joined #RubyOnRails
[14:18:52] emachnic: has joined #RubyOnRails
[14:19:20] JamieD: has joined #RubyOnRails
[14:20:26] DTZUBDUB: has joined #RubyOnRails
[14:22:15] tvw: has joined #RubyOnRails
[14:23:55] caudill: has joined #RubyOnRails
[14:24:12] emachnic_: has joined #RubyOnRails
[14:24:55] gremly: has joined #RubyOnRails
[14:25:04] gnguyen: has joined #RubyOnRails
[14:27:02] quazimodo: has joined #RubyOnRails
[14:27:30] quazimod1: has joined #RubyOnRails
[14:27:57] gnguyen: hi all, i'm finding a library which supports filling PDF form. found this pdf_forms (https://github.com/jkraemer/pdf-forms) but I got difficulty in installing the dependency pdftk. Here's the full log http://bit.ly/28TNdh2 . Question is: is there any other library/gem to use? anyone ever use this pdf_forms?
[14:28:17] FCser: has joined #RubyOnRails
[14:29:20] moep: has joined #RubyOnRails
[14:30:31] eljimmy: has joined #RubyOnRails
[14:34:21] ekinmur_: has joined #RubyOnRails
[14:35:50] polishdub: has joined #RubyOnRails
[14:36:35] benlieb: has joined #RubyOnRails
[14:38:54] adavia: has joined #RubyOnRails
[14:38:58] Oliphaunte: has joined #RubyOnRails
[14:39:16] skroon: has joined #RubyOnRails
[14:40:56] agent_white: has joined #RubyOnRails
[14:40:59] SteenJobs: has joined #RubyOnRails
[14:41:29] speakingcode: has joined #RubyOnRails
[14:42:13] jhack: has joined #RubyOnRails
[14:43:37] Oliphaunte: has joined #RubyOnRails
[14:45:04] Hobogrammer: has joined #RubyOnRails
[14:45:35] macsteps: has joined #RubyOnRails
[14:46:48] Oliphaunte: has joined #RubyOnRails
[14:48:05] Pulkit21: has joined #RubyOnRails
[14:51:38] asahi: has joined #RubyOnRails
[14:51:43] pontiki: hello agent_white
[14:55:30] harfangk: has joined #RubyOnRails
[14:56:55] antgel: has joined #RubyOnRails
[14:57:00] FCser: has joined #RubyOnRails
[14:57:09] tildes: has joined #RubyOnRails
[14:58:00] roamingdog: has joined #RubyOnRails
[15:02:03] speakingcode: has joined #RubyOnRails
[15:03:51] StumpGhost: has joined #RubyOnRails
[15:05:14] diegoaguilar: has joined #RubyOnRails
[15:09:44] diegoaguilar: has joined #RubyOnRails
[15:10:49] diegoaguilar: has joined #RubyOnRails
[15:13:41] mixnblend: has joined #RubyOnRails
[15:15:38] agit0: has joined #RubyOnRails
[15:18:53] moeabdol: has joined #RubyOnRails
[15:20:13] mdw: has joined #RubyOnRails
[15:21:37] alfiemax: has joined #RubyOnRails
[15:25:38] shibly: has joined #RubyOnRails
[15:25:47] shibly: has left #RubyOnRails: ()
[15:26:11] Cache_Money: has joined #RubyOnRails
[15:26:16] zeknox: has joined #RubyOnRails
[15:28:00] jetpack_joe: has joined #RubyOnRails
[15:28:38] mustmodify: has joined #RubyOnRails
[15:28:45] mustmodify: This is when you start to worry: "Unknown column 'projects.id' in 'field list'"
[15:29:46] disgrntld: has joined #RubyOnRails
[15:30:32] mustmodify: Oh, that was stupid.
[15:30:49] mustmodify: Project.joins('jobs') rather than Project.joins(:jobs)
[15:30:57] mustmodify: funny error, though.
[15:31:12] mustmodify: "Um... sorry, no id field here!"
[15:31:58] jowiar: has joined #RubyOnRails
[15:32:17] qejk: has joined #RubyOnRails
[15:33:16] 64MAAIAT7: has joined #RubyOnRails
[15:36:05] zave: has joined #RubyOnRails
[15:41:23] clandry94: has joined #RubyOnRails
[15:43:26] pickandmix: has joined #RubyOnRails
[15:43:32] jetpack_joe: has joined #RubyOnRails
[15:43:45] pickandmix: Hi guys, https://gist.github.com/anonymous/b28f1a9fd5cbf5526862c633e1b6b7be I get this error while trying to run rails, Can anyone see what's wrong and advice?
[15:44:28] sevenseacat: step 1 - upgrade rails from 5.0.0.beta3
[15:44:34] sevenseacat: step 2 - start your psql server
[15:44:41] sevenseacat: step 3 - note that we're not all guys here
[15:45:32] Beendllanke: has joined #RubyOnRails
[15:45:34] Malgorath: has joined #RubyOnRails
[15:47:12] Malgorath: Was looking for ideas on how to auto populate a new form. I was just linking directly to the list but from time to time the items need to be changed without altering the master list. Basically I have a drop down field with list of items in it but when its changed I'd like to auto populate the rest of the form with the record associated with the current item in the drop down list.
[15:49:54] braincrash: has joined #RubyOnRails
[15:50:41] [Butch]: has joined #RubyOnRails
[15:51:50] jlogsdon: has joined #RubyOnRails
[15:54:18] emiltin: has joined #RubyOnRails
[15:56:03] davidw: has joined #RubyOnRails
[15:57:26] triangles: has joined #RubyOnRails
[15:58:23] fermonkus: has joined #RubyOnRails
[16:01:43] netzfisch: has joined #RubyOnRails
[16:02:04] conta: has left #RubyOnRails: ()
[16:04:30] dminuoso: has joined #RubyOnRails
[16:05:41] cydrobolt: has joined #RubyOnRails
[16:05:41] cydrobolt: has joined #RubyOnRails
[16:06:46] emachnic: has joined #RubyOnRails
[16:06:51] braincrash: has joined #RubyOnRails
[16:08:33] macsteps: has joined #RubyOnRails
[16:08:57] Mia: has joined #RubyOnRails
[16:12:04] macsteps: has joined #RubyOnRails
[16:15:27] whathappens: has joined #RubyOnRails
[16:16:10] User458764: has joined #RubyOnRails
[16:21:37] FCser: has joined #RubyOnRails
[16:22:38] DTZUBDUB: has joined #RubyOnRails
[16:23:21] davidelliott: has joined #RubyOnRails
[16:23:50] asheinfeld: has joined #RubyOnRails
[16:24:36] dc1: has joined #RubyOnRails
[16:24:49] dionysus69: has joined #RubyOnRails
[16:27:12] emachnic: has joined #RubyOnRails
[16:28:21] emachnic: has joined #RubyOnRails
[16:28:43] kitsuneyo: has joined #RubyOnRails
[16:32:17] moeabdol: has joined #RubyOnRails
[16:33:56] kitsuneyo: what's that operator that's like, use foo or default to bar? it's something like ||=
[16:34:59] dminuoso: kitsuneyo: ||
[16:35:02] mustmodify: has left #RubyOnRails: ()
[16:35:11] dvinciguerra: has joined #RubyOnRails
[16:35:33] kitsuneyo: so what does ||= do?
[16:36:13] dminuoso: kitsuneyo: It assigns to the variable if a) it has not been defined yet, or b) it evaluates to a falsy value.
[16:37:11] kitsuneyo: with @something = a || b in a controller, my tests fail if a is nil
[16:37:37] kitsuneyo: is there an alternative to using try all the time?
[16:37:48] Dimik: has joined #RubyOnRails
[16:37:53] dminuoso: kitsuneyo: Be more specific about what fails. Please gist some code.
[16:42:34] phrozen77: has joined #RubyOnRails
[16:42:38] kitsuneyo: has joined #RubyOnRails
[16:44:06] jlogsdon: has left #RubyOnRails: ("Out")
[16:46:28] tape88: has joined #RubyOnRails
[16:46:36] jowiar: has joined #RubyOnRails
[16:47:19] FCser: has joined #RubyOnRails
[16:47:25] kitsuneyo: dminuoso, i can't seem to recreate the failure now but this is the gist: https://gist.github.com/kitsuneyo/6c972ff42e6ac9fdfa9230f9c4c9c22c
[16:48:22] kitsuneyo: the 'passes' version is what i resorted to get my test to pass, but i know that can't be the most efficient way to do it...
[16:49:02] pwnd_nsfw: has joined #RubyOnRails
[16:50:00] arunpyasi: has joined #RubyOnRails
[16:53:08] lalalaaa: has joined #RubyOnRails
[16:59:03] Leepoff: has joined #RubyOnRails
[17:02:57] JamieD: has joined #RubyOnRails
[17:05:25] jgt1: has joined #RubyOnRails
[17:05:52] Spami: has joined #RubyOnRails
[17:07:20] djbkd: has joined #RubyOnRails
[17:09:49] SteenJobs: has joined #RubyOnRails
[17:11:56] dc1: has joined #RubyOnRails
[17:12:05] xall: has joined #RubyOnRails
[17:12:10] whathappens: has joined #RubyOnRails
[17:12:46] macsteps: has joined #RubyOnRails
[17:13:43] whathapp_: has joined #RubyOnRails
[17:14:08] pure_eval: has joined #RubyOnRails
[17:14:43] User458764: has joined #RubyOnRails
[17:16:03] Scriptonaut: has joined #RubyOnRails
[17:16:16] Scriptonaut: can anyone tell me why this rake task won't run when I pass it more than one parameter? https://gist.github.com/robins35/09d9736577d1548349e46494adbe7721
[17:16:34] pureeval: has joined #RubyOnRails
[17:16:37] pureeval: has left #RubyOnRails: ()
[17:16:37] Scriptonaut: in that gist, I provide both the rake task, and the session where I ran it, and the error it produced
[17:16:51] Scriptonaut: it works fine if I pass it just the one param
[17:16:56] Scriptonaut: but 2 params and it fips out
[17:19:59] pilne: has joined #RubyOnRails
[17:20:01] wilsonc91: has joined #RubyOnRails
[17:25:55] DoctorMonocular: has joined #RubyOnRails
[17:26:37] cnk: has joined #RubyOnRails
[17:30:38] moeabdol: has joined #RubyOnRails
[17:30:49] pawnbox: has joined #RubyOnRails
[17:31:23] jhass: Scriptonaut: omit the space or quote the entire thing
[17:31:40] jhass: the unquoted space makes your shell pass it as two arguments
[17:31:53] jhass: where rake expects it as single argument
[17:32:04] rafaelfranca: has joined #RubyOnRails
[17:32:04] rafaelfranca: has joined #RubyOnRails
[17:32:11] adre: has joined #RubyOnRails
[17:33:35] djbkd: has joined #RubyOnRails
[17:33:56] pawnbox: has joined #RubyOnRails
[17:35:17] Scriptonaut: ah, thanks jhass
[17:35:39] siaw23: has left #RubyOnRails: ()
[17:36:18] rafaelfranca: has joined #RubyOnRails
[17:36:18] Oliphaunte: has joined #RubyOnRails
[17:38:21] dionysus69: has joined #RubyOnRails
[17:38:21] djbkd: has joined #RubyOnRails
[17:38:38] diegoaguilar: has joined #RubyOnRails
[17:45:09] JamieD: has joined #RubyOnRails
[17:52:59] emiltin: has joined #RubyOnRails
[17:53:50] yellow5: has joined #RubyOnRails
[17:54:13] solars: has joined #RubyOnRails
[17:57:22] djbkd: has joined #RubyOnRails
[18:00:05] sloggerkhan: Is there a way to use active record order to specify ordering by columns on a joined table without having to resort to manually creating the order string by hand?
[18:01:54] lele: has joined #RubyOnRails
[18:02:00] sloggerkhan: (Looks like Arel is the go-to?)
[18:03:30] TheShaun: has joined #RubyOnRails
[18:06:28] aegis3121: has joined #RubyOnRails
[18:06:51] harfangk: has joined #RubyOnRails
[18:07:02] Scriptonaut: has left #RubyOnRails: ()
[18:09:26] djbkd: has joined #RubyOnRails
[18:13:17] macsteps: has joined #RubyOnRails
[18:15:00] roamingdog: has joined #RubyOnRails
[18:15:05] rbr: has joined #RubyOnRails
[18:15:30] pLaToOn: has joined #RubyOnRails
[18:16:28] SteenJobs: what could cause on random js asset to not load? it’s within the tree of application.js, and its siblings in the directory are firing, but this one file won’t print any console statements
[18:19:25] jhack: has joined #RubyOnRails
[18:19:44] voidDotClass: has joined #RubyOnRails
[18:20:06] greghoggard: has joined #RubyOnRails
[18:21:23] DoctorMonocular: is there a clever way to batch a bunch of find_or_create_by calls? I'm writing a tagging thing and when I call something like foo.tag(:this,:that,:the_other), then first I have to find or create the Tags by the given names, then find or create the Tagging with the given tag and foo--that could be a lot of database round trips. What's the best way to do this with a minimum of calls?
[18:21:52] adac: has joined #RubyOnRails
[18:21:53] greghoggard: Hi, So i have a store where people can both buy from and sell to me. Basically I want the app to be able to go into "Buylist" mode which would then change the prices of the items to their buylist price. And also it would have a separate shopping cart. What is usually the best way to accomplish this?
[18:22:25] aeruder: has left #RubyOnRails: ("WeeChat 1.0.1")
[18:22:36] djbkd: has joined #RubyOnRails
[18:23:01] TheShaun: has joined #RubyOnRails
[18:24:05] adam12: greghoggard: Too hard without knowing all the pieces of the puzzle, but you can store their "mode" in their session
[18:24:16] DoctorMonocular: greghoggard: I think it would be a mistake to try to make one set of views that could switch between the modes. It's almost certainly the right thing to do to have separate views for buying and selling that display the underlying data in whatever way makes sense instead of having a never-ending procession of conditionals and bullshit built into the views and controllers
[18:24:29] adam12: greghoggard: Then namespace their cart depending on the mode.
[18:24:52] adam12: SteenJobs: Any console errors? Maybe it's a naming issue.
[18:25:10] greghoggard: That makes sense. Thank you :)
[18:25:15] SteenJobs: adam12: figured it wasn’t worth my time now, just moved it to a different file in the pipeline. have a question for you though
[18:25:22] SteenJobs: just curious your thoughts
[18:25:48] jhack: has joined #RubyOnRails
[18:26:19] SteenJobs: so i have a service that manages all my stripe connect account creation logic - i also built a payment service for managing all transactions with stripe - would you abstract your payment logic or would you place it in the appropriate controller(s)?
[18:26:42] ur5us: has joined #RubyOnRails
[18:27:06] adam12: SteenJobs: I don't like my controllers to have too much logic, so I'd stick it somewhere else.
[18:27:10] adam12: Normally a "service" object.
[18:27:20] SteenJobs: yea cool. i’m with you on that.
[18:27:30] SteenJobs: it’s nice because my controllers don’t have to know anything about stripe’s logic
[18:28:00] SteenJobs: and the service only has to know about the initialized object
[18:31:39] lalalaaa: lean and mean :P
[18:32:07] lalalaaa: Steen & Strøm
[18:32:58] SteenJobs: especially when it gets reused, it’s the worst when you don’t spend time in the beginning to structure it the good way, and then you have to make a change in 10 places, forgot you missed 3 other places, and it all could’ve been just taken care of in one singe place..
[18:33:14] Oliphaunte: has joined #RubyOnRails
[18:36:26] roamingdog: has joined #RubyOnRails
[18:36:29] dionysus69: has joined #RubyOnRails
[18:37:10] Leepoff: has joined #RubyOnRails
[18:37:42] xall: has joined #RubyOnRails
[18:39:16] kitsuneyo: has joined #RubyOnRails
[18:42:22] Leepoff: has joined #RubyOnRails
[18:43:37] Oliphaunte: has joined #RubyOnRails
[18:50:35] asheinfeld: has joined #RubyOnRails
[18:51:58] kitsuneyo: has joined #RubyOnRails
[18:52:09] roamingdog: has joined #RubyOnRails
[18:56:34] pLaToOn: has joined #RubyOnRails
[18:56:40] Leepoff: has joined #RubyOnRails
[18:56:57] choke: has joined #RubyOnRails
[18:57:14] dvinciguerra_: has joined #RubyOnRails
[19:00:41] asheinfeld: has joined #RubyOnRails
[19:02:20] mdw: has joined #RubyOnRails
[19:07:17] Leepoff: has joined #RubyOnRails
[19:11:27] Spami: has joined #RubyOnRails
[19:11:32] solars: has joined #RubyOnRails
[19:12:22] asheinfeld: has joined #RubyOnRails
[19:12:27] dionysus70: has joined #RubyOnRails
[19:12:53] voidDotClass: has joined #RubyOnRails
[19:13:13] Leepoff: has joined #RubyOnRails
[19:14:46] roamingdog: has joined #RubyOnRails
[19:17:24] sneakers: has joined #RubyOnRails
[19:19:47] DoctorMonocular: has joined #RubyOnRails
[19:23:20] elementaru: has joined #RubyOnRails
[19:23:30] crankharder: looks like factory girl is dropping the namespace part of my model when executing some query. anyone know why? https://gist.github.com/anonymous/b99ee033cd8d34f9f7820093739bf7c4#file-gistfile1-txt-L40
[19:24:12] sumobob: has joined #RubyOnRails
[19:24:49] adam12: crankharder: Not factorygirl. Likely your model definition missing a table prefix.
[19:25:35] bluelf: has joined #RubyOnRails
[19:25:51] crankharder: the model works fine
[19:26:51] kitsuneyo: has joined #RubyOnRails
[19:27:28] jhass: consider the suggestion anyway
[19:27:53] Spami: has joined #RubyOnRails
[19:29:08] choke: has joined #RubyOnRails
[19:33:25] jhack: has joined #RubyOnRails
[19:35:35] skiz: has joined #RubyOnRails
[19:36:46] seaworthy: has joined #RubyOnRails
[19:37:46] lxsameer: has joined #RubyOnRails
[19:39:25] bluelf: I am a mediocre rails developer, for a side project I want to analyse news of Indian and Pakistani newspapers. They don't have any Api, so I plan to daily parse their RSS feed to get list of web links of articles and then storing content in a DB, and later analyse them using semantic apis etc. I feel I can accomplish this using rails, but maybe rails would be overkill for such simple project. Any suggestions on how should I approach this p
[19:42:26] aegis3121: has joined #RubyOnRails
[19:43:00] jhass: bluelf: well none of what you described really describes anything rails does for you. ActiveRecord you can use quite well outside rails. What usecases of that side project do you hope to implement using things Rails provides you?
[19:45:31] mixnblend: has joined #RubyOnRails
[19:46:23] bluelf: jhass: I have never made any web based project without Rails, not really sure how to structure the project without Rails.
[19:47:18] jhack: has joined #RubyOnRails
[19:48:21] jhass: bluelf: my point is that you only described things consuming the web (making HTTP requests, putting them into the DB)
[19:48:43] jhass: nothing about how you want to present the data
[19:48:49] jhass: or to who
[19:51:07] bluelf: jhass: First step is just to store data in a DB.
[19:51:37] jhass: well, no need for rails there at all
[19:52:24] jhass: write the fetcher in a standard gem like structure, if you later decide to do use rails you can just move it into the lib folder of your rails app
[19:53:15] moep: has joined #RubyOnRails
[19:53:16] bluelf: jhass: How would I schedule the task?
[19:53:43] jhass: well there's a whole bunch of possible approaches here
[19:53:57] bluelf: jhass: planning to use heroku
[19:54:05] chopin: has joined #RubyOnRails
[19:54:41] jhass: https://github.com/swanson/stringer might be an interesting study then to take ideas from
[19:54:44] sypheren: has joined #RubyOnRails
[19:55:23] bluelf: jhass: Thanks, looking into it.
[19:59:08] pontiki: has joined #RubyOnRails
[19:59:49] roamingdog: has joined #RubyOnRails
[20:02:05] jhack: has joined #RubyOnRails
[20:02:34] SteenJobs: has joined #RubyOnRails
[20:05:36] dc1: has joined #RubyOnRails
[20:07:19] AndroidLoverInSF: has joined #RubyOnRails
[20:08:27] SteenJobs: has joined #RubyOnRails
[20:09:20] macsteps: has joined #RubyOnRails
[20:09:51] roamingdog: has joined #RubyOnRails
[20:12:45] macsteps: has joined #RubyOnRails
[20:13:29] arnonhongklay: has joined #RubyOnRails
[20:13:58] asheinfeld: has joined #RubyOnRails
[20:17:27] rbr: has joined #RubyOnRails
[20:20:49] yfeldblum: has joined #RubyOnRails
[20:21:21] SteenJobs: has joined #RubyOnRails
[20:21:33] JesseH: has joined #RubyOnRails
[20:21:59] Pazician: has joined #RubyOnRails
[20:22:30] Detch: has joined #RubyOnRails
[20:22:32] terrabl: has joined #RubyOnRails
[20:24:07] terrabl: Hello, I need to link to my show method in my controller and I thought I could do this by doing <%= link_to 'Show', response %> but whenever I click on that button it doesn't direct me to the correct place. It should be redirecting me to /tests/:uuid but it just redirecting me to /:uuid
[20:24:24] emachnic_: has joined #RubyOnRails
[20:26:24] djbkd: has joined #RubyOnRails
[20:27:43] frem_: has joined #RubyOnRails
[20:28:39] terrabl: Like it renders the html as <a href="a91a5580-1bab-0134-ecad-074d5946dff2">Show</a> When it should be <a href="loadtests/a91a5580-1bab-0134-ecad-074d5946dff2">Show</a>
[20:30:35] graft: has joined #RubyOnRails
[20:31:19] Ergo: has joined #RubyOnRails
[20:31:43] fox_mulder_cp: folks, i have a qa - i have a class Reseller. iit has property - operator. In before_destroy hook i want to check this option and block destroying when this option is true.
[20:31:52] fox_mulder_cp: and test it with minitest
[20:32:35] srinidhi: has joined #RubyOnRails
[20:34:14] emachnic: has joined #RubyOnRails
[20:35:56] desnudop1nguino: has joined #RubyOnRails
[20:37:42] AndroidLoverInSF: has joined #RubyOnRails
[20:40:26] djbkd: has joined #RubyOnRails
[20:44:19] roamingdog: has joined #RubyOnRails
[20:50:04] roamingdog: has joined #RubyOnRails
[20:54:03] centrx: has joined #RubyOnRails
[20:58:33] macsteps: has joined #RubyOnRails
[20:59:44] adac: has joined #RubyOnRails
[20:59:47] pur3eval: has joined #RubyOnRails
[21:04:49] arBmind: has joined #RubyOnRails
[21:06:51] chopin: has joined #RubyOnRails
[21:07:28] moeabdol: has joined #RubyOnRails
[21:11:02] allcentury: has joined #RubyOnRails
[21:14:14] emachnic: has joined #RubyOnRails
[21:14:41] jetpack_joe: has joined #RubyOnRails
[21:18:23] choke: has joined #RubyOnRails
[21:19:22] Synthead: in routes.rb, I have "resources :resources", and in resources_controller.rb, I have "def show; ...; end". I can pass, i.e., /resources/5 and hit the "show" route with params[:id] == 5. Is there a way I can get this url the other way around? Meaning, can I dynamically generate a URL of /resources/5 from a model class and ID?
[21:20:46] choke: hey guys, is what i'm doing possible? syntax is right but it's not exactly working: variable = Model.any_in("#{@key}" => @params), no error is thrown but it's not working in that the @key isn't brought into what the variable should be.
[21:21:18] Synthead: <%= resources_path(5) %> returns "/resources.5". is this normal?
[21:22:06] voidDotClass: has joined #RubyOnRails
[21:22:10] Synthead: choke: why not do ...(@key => @params)? is the key not a string?
[21:22:30] choke: the key is a string, but let me try that and see if it works.
[21:22:55] choke: same thing, let me gist up what i have to show you the full scope of what i've got
[21:23:26] centrx: Synthead: resources_path(5) should return /resources/5 (http://guides.rubyonrails.org/routing.html#path-and-url-helpers)
[21:23:38] Synthead: choke: it sounds like it shouldn't matter tbh
[21:24:32] Synthead: centrx: why does it join the URI with a "." ?
[21:25:11] centrx: Synthead: found a possibility: http://stackoverflow.com/questions/5674116/path-helpers-generate-paths-with-dots-instead-of-slashes
[21:25:29] jscheel: has joined #RubyOnRails
[21:25:45] Synthead: centrx: perfect! thanks a lot!
[21:26:25] choke: yeah, problem is it's returning a blank array but if i change it to exactly what i'm looking for it works just fine.
[21:26:32] choke: https://gist.github.com/jblac/d197487356994a1cd6fd1db533c44505 here's the gist for what i've got.
[21:26:48] northfurr: has joined #RubyOnRails
[21:27:10] udiudi: has joined #RubyOnRails
[21:28:06] chopin: has joined #RubyOnRails
[21:28:33] choke: uh fixed it... was an issue with my request being made through postman...
[21:31:32] whathappens: has joined #RubyOnRails
[21:32:47] pawnbox: has joined #RubyOnRails
[21:34:09] yfeldblum: has joined #RubyOnRails
[21:34:30] mdw: has joined #RubyOnRails
[21:36:00] duncannz: has joined #RubyOnRails
[21:40:41] srgupta_: has joined #RubyOnRails
[21:43:06] chipotle: has joined #RubyOnRails
[21:51:35] chipotle: has joined #RubyOnRails
[21:52:15] dminuoso: has joined #RubyOnRails
[21:52:25] Astro4ver: has joined #RubyOnRails
[21:53:13] chipotle: can someone answer some basic questions about design and theming a website?
[21:56:28] Astro4ver: I am trying to add a download link for a csv file, but it seems like the it is not using UTF-8. send_data(csv_data, type: 'text/csv; charset=utf-8', filename: 'test.csv')
[21:57:12] Astro4ver: I am currently getting this char inside the csv data - Â
[21:57:15] filipechagas: has joined #RubyOnRails
[21:57:21] Astro4ver: I believe this is an ISO char
[21:58:46] Astro4ver: If I print out the csv_data value it is suppose to be a space
[22:02:13] udiudi: has joined #RubyOnRails
[22:02:16] l4v2: has joined #RubyOnRails
[22:02:31] diegoaguilar: has joined #RubyOnRails
[22:03:11] sypheren: has joined #RubyOnRails
[22:03:12] roamingdog: has joined #RubyOnRails
[22:04:27] ekinmur: has joined #RubyOnRails
[22:06:25] mdw: has joined #RubyOnRails
[22:08:58] MrPunkin: has joined #RubyOnRails
[22:09:48] MrPunkin: What’s the best way to generate XML that will be POSTed to an external API? It seems like using views is the easiest way to generate the XML, however getting those views rendered into whatever model handles the API integration seems like a break in the MVC system.
[22:23:48] GodFather: has joined #RubyOnRails
[22:24:54] l4v2: Hey guys, I’m doing this active Record tutorial to learn from, and I just want the line of code that I need to get the answer on line https://gist.github.com/anonymous/8291072fbd819f2eaf134187701a8ef1 It is not for school
[22:25:27] l4v2: whoops, line 9
[22:26:51] baweaver: as I mentioned, a lot of us are on both channels
[22:27:10] l4v2: yeah, and you aren’t the whole community
[22:27:24] baweaver: MrPunkin: A view is simply a representation of the data that's presented. You could technically write it like a to_s method
[22:27:31] l4v2: I have a degree, this is jsut for fun, let it go
[22:28:01] lalalaaa: I'm probably not the first to say this, but RIP Bernie Worrell
[22:28:04] MrPunkin: baweaver: Actually I realized the built in to_xml methods for hashes will achieve what I need for how non-complex the dataset that needs to get POSTed is.
[22:28:06] MrPunkin: thanks though
[22:28:55] kitsuneyo: how easy do you think it is to create one of those as-you-type lookup systems, like on facebook where you type someone's name in a comment and you can link them from there?
[22:29:00] kitsuneyo: is there a gem for that?
[22:29:16] lalalaaa: kitsuneyo: twitter typeahead
[22:29:28] baweaver: typeahead, select2, basically javascript
[22:29:43] lalalaaa: kitsuneyo: with pg_search
[22:30:06] kitsuneyo: so it isn't so difficult to implement something like that?
[22:30:06] lalalaaa: baweaver: i feel bad for select2, but selectize.js is nice
[22:30:30] lalalaaa: kitsuneyo probably wants twitter-typeahead though, and no, it's pretty easy. there's even a free railscast
[22:30:30] kitsuneyo: lalalaaa you prefer selectize?
[22:30:34] baweaver: basically you need a debounce and a trigger event to research with partial matches
[22:30:49] baweaver: because you don't want an event firing for every single keypress
[22:31:12] kitsuneyo: that's encouraging to hear :D
[22:31:22] lalalaaa: kitsuneyo: yeah it's 100 times simpler. plus if you have your own css it's even more simpler.
[22:31:24] baweaver: you can do an SQL LIKE query, or get something more in depth like ngrams or elasticsearch
[22:31:50] baweaver: I would not suggest reimplementing it unless you need to, because debugging can be a pain
[22:32:47] wd40s: has joined #RubyOnRails
[22:32:49] kitsuneyo: i'm not even gonna try to do it now, but good to know it's doable
[22:32:50] baweaver: I find the more you custom make, the more annoying it is to get things done later whenever those things break.
[22:33:03] baweaver: yeah, I can appreciate the desire to know how it works.
[22:33:06] kitsuneyo: agreed baweaver
[22:33:20] baweaver: on occasion I try to remake things as an exercise.
[22:33:44] baweaver: If you want some insight to ActiveRecord, try and make an ActiveFile library that works on text files.
[22:34:04] baweaver: I've had some interesting revelations from doing that, but it takes some time.
[22:34:05] lalalaaa: kitsuneyo: I'm still working on my styling ;) http://jsfiddle.net/08Lzu7rq/
[22:34:15] kitsuneyo: i have very little time to spend on stuff like that :/
[22:34:34] l4v2: bweaver what I tried earlier was this reverse_cars = Car.find_by(color => 'cheetah').order(created_at: :desc) and it didnt work
[22:34:39] moeabdol: has joined #RubyOnRails
[22:34:40] l4v2: which is what you said
[22:34:58] baweaver: then create cars with that color
[22:35:05] baweaver: Car.create(params)
[22:35:41] l4v2: I’m not supposed to do that according to how the other tests went
[22:35:42] baweaver: besides, that line won't work either
[22:35:45] baweaver: color will be undefined
[22:35:50] l4v2: so will params
[22:35:57] baweaver: it's an example
[22:36:24] l4v2: It’s only going to be one line of code, I don’t have to define anything, everything I need is defined in this file
[22:36:32] kitsuneyo: it looks nice lalalaaa
[22:36:37] baweaver: in `find_by(color: 'x')`, color: is a symbol
[22:36:58] baweaver: if you read through a ruby tutorial you'll see that;s the JSON like hash syntax.
[22:37:10] kitsuneyo: i have something really similar with select2 that fits my vanilla bootstrap layout, it was simple to do too
[22:37:42] baweaver: {color: 'a'} == {:color => 'a'}
[22:37:50] superlou: has joined #RubyOnRails
[22:38:00] sypheren: has joined #RubyOnRails
[22:38:26] l4v2: I’m not great with this stuff, I read a book already, now I am trying to implement the things I read.
[22:38:47] centrx: has joined #RubyOnRails
[22:38:53] l4v2: so if I get an answer here, then I can learn something
[22:39:04] baweaver: Let's keep the meta talk out of it.
[22:39:07] l4v2: I’ve looked, asking is my last resort
[22:40:05] baweaver: and we're trying to help you understand that we've given you answers.
[22:40:52] l4v2: I am not going to have to define Color unless it is defined in the query
[22:41:00] baweaver: but everything you're saying is contradictory, if you have read a ruby book, most of this would have been covered by now.
[22:41:38] baweaver: we can't help you if you refuse to be helped.
[22:43:21] l4v2: No, you are just being a tool about answering something, you reffered me to a whole book like a arrogant programer.
[22:43:33] baweaver: aaaand that's quite enough of that
[22:43:56] l4v2: Hey how do I do a query? go take a basic intro to programing class
[22:44:02] l4v2: that’s your answer to me
[22:44:05] baweaver: last chance
[22:44:16] l4v2: ok, stop replying to me
[22:44:20] ChanServ: +q *!*@cpe-24-59-157-0.twcny.res.rr.com
[22:46:52] moeabdol: has joined #RubyOnRails
[22:51:47] sypheren: has joined #RubyOnRails
[22:53:28] dminuoso: has joined #RubyOnRails
[22:57:41] Markhor1991: has joined #RubyOnRails
[22:59:31] allcentury: has joined #RubyOnRails
[23:02:07] siaw23: has joined #RubyOnRails
[23:02:27] Markhor1991: good evening all.
[23:02:53] l4v2: has left #RubyOnRails: ()
[23:03:26] ChanServ: -q *!*@cpe-24-59-157-0.twcny.res.rr.com
[23:04:51] pur3eval: is this a problem with savon 2.3.0 or a problem on the endpoint? "(soap:Server) org.hibernate.exception.GenericJDBCException: Cannot open connection"
[23:05:16] roamingdog: has joined #RubyOnRails
[23:09:12] siaw23: someone help. https://gist.github.com/siaw23/5e4827a3e194f026e5aa387c2f7ddf2a
[23:09:26] centrx: pur3eval: Sounds like a problem with the JDBC connection
[23:09:34] siaw23: i have to files in that gist. one is the error i’m getting from running the test
[23:09:41] Darmani: has joined #RubyOnRails
[23:10:52] centrx: siaw23: Looks like example is not defined there, but the error message says something about being able to use it in a different context
[23:11:15] siaw23: problem is i don’t understand what the error is expecting me to fix
[23:11:38] baweaver: aren't those things normally defined in spec_helper?
[23:12:59] siaw23: like the example?
[23:14:11] upsell5: has joined #RubyOnRails
[23:15:38] xibalba: has joined #RubyOnRails
[23:19:37] rbr: has joined #RubyOnRails
[23:23:12] dalbuschat: has joined #RubyOnRails
[23:24:22] braincra-: has joined #RubyOnRails
[23:25:24] speakingcode: has joined #RubyOnRails
[23:26:27] siaw23: has left #RubyOnRails: ()
[23:31:43] pawnbox: has joined #RubyOnRails
[23:35:34] wd40s: has joined #RubyOnRails
[23:38:56] Darmani: Hey everyone.
[23:39:00] Darmani: I'm really confused :[
[23:39:24] Darmani: I thought I knew how to structure my T-shirt website but I don't know if what I have is correct.
[23:39:25] Darmani: https://gist.github.com/mfifth/70f8048c14e662536153713bbf5f86ef
[23:39:52] Darmani: Someone please take a look for me? q>q
[23:40:11] Radar: Darmani: Everything looked good until this point: https://gist.github.com/mfifth/70f8048c14e662536153713bbf5f86ef#file-show-html-erb-L15-L21
[23:40:27] Radar: Darmani: Typically what you'd have there instead is a link / button to an action which adds the specific item to the order.
[23:41:00] ur5us: has joined #RubyOnRails
[23:41:12] Darmani: Radar: So... I'm on the right track?
[23:41:50] Radar: Yes, pretty much. The form is not at all right though. What you're doing there is saying that an order has a size, color, and quantity.
[23:42:15] Darmani: Radar: I'm not really sure how to do it ._.
[23:43:29] Radar: <%= button_to "Add to cart", add_item_orders_path(shirt) %>
[23:43:42] Radar: Darmani: That might be enough to get you started.\
[23:43:53] Darmani: Radar: What should I read to help me understand it better?
[23:44:28] Radar: Hm, actually this might be better: <%= button_to "Add to cart", add_item_orders_path(shirt_id: shirt) %>
[23:45:17] Darmani: Radar: Okay well I'm going to think about that. Thanks man ^^
[23:47:11] Radar: Darmani: For this you might want to use a singular resource route: https://gist.github.com/radar/869f825cbadec68c42c581b4e3cca7ce
[23:47:29] Radar: Because you'll always be working with the user's current order, rather than a collection of orders
[23:47:43] Radar: so the route to view the order could be something just like /order, which would go to OrdersController#show
[23:53:39] xlegoman: has joined #RubyOnRails
[23:54:14] dminuoso: has joined #RubyOnRails
[23:54:16] emachnic: has joined #RubyOnRails
[23:57:01] Darmani: Radar: https://gist.github.com/mfifth/70f8048c14e662536153713bbf5f86ef#file-show-html-erb-L15
[23:57:07] Darmani: kinda sorta maybe like that?
[23:57:19] Radar: Darmani: It doesn't need to be a form at all.
[23:57:31] Radar: Just a button will be fine. Use button_to like I showed earlier.
[23:57:47] Darmani: But... Shouldn't the user choose if they want a small or large?
[23:58:34] Darmani: Radar: That's what I thought anyway..
[23:58:44] Radar: Darmani: Oh if you want to implement that now the yes make it a form... but I'd probably use form_tag there since there isn't really an object you're building in the form
[23:58:54] SteenJobs: has joined #RubyOnRails
[23:58:57] Radar: <%= form_tag add_item_to_order_path(shirt) do %>
[23:59:17] Radar: <%= select_tag "size", options_from_collection_for_select(["Small", "Medium", "Large"]) %>
[23:59:26] Darmani: ACTION needs to read up on forms
[23:59:30] djbkd: has joined #RubyOnRails