[00:00:01] <tobioboye>  yeah that's how you know what's happening. The logs is your best friend
 [00:00:03] <tobioboye>  :)
 [00:01:13] <aimenk>  lol yeaa
 [00:01:25] <aimenk>  i can put the debugger in the controller as well right?
 [00:02:22] <aimenk>  okk i'll take a look at this tomorrow
 [00:02:24] <aimenk>  thanks for ur help tobioboye
 [00:02:55] <tobioboye>  ok
 [00:03:03] <tobioboye>  you're welcome :)
 [00:03:42]  aimenk (~aimenk@CPE00226b45e6b2-CM001ac318b812.cpe.net.cable.rogers.com) left #markus.
 [00:05:32]  Ayaya-Aaron-MBP (~Ayaya-Aar@S010600059a3c7a00.vf.shawcable.net) left irc: Quit: Ayaya-Aaron-MBP
 [00:39:49]  Erop (~chatzilla@S0106001d098e7fbc.vc.shawcable.net) joined #markus.
 [00:58:34]  tobioboye (~drone@bas4-toronto02-1176006628.dsl.bell.ca) left irc: Quit: tobioboye
 [01:03:31]  Erop (~chatzilla@S0106001d098e7fbc.vc.shawcable.net) left irc: Quit: ChatZilla 0.9.88 [Firefox 10.0.2/20120216101208]
 [03:21:05]  Ayaya-Aaron-MBP (~Ayaya-Aar@S010600059a3c7a00.vf.shawcable.net) joined #markus.
 [04:34:54]  lissyx (~alex@ left irc: Ping timeout: 265 seconds
 [06:25:01]  Ayaya-Aaron-MBP (~Ayaya-Aar@S010600059a3c7a00.vf.shawcable.net) left irc: Quit: Ayaya-Aaron-MBP
 [06:40:10]  Ayaya-Aaron-MBP (~Ayaya-Aar@S010600059a3c7a00.vf.shawcable.net) joined #markus.
 [06:58:57]  Ayaya-Aaron-MBP (~Ayaya-Aar@S010600059a3c7a00.vf.shawcable.net) left irc: Quit: Ayaya-Aaron-MBP
 [07:21:09]  lissyx (~alex@ joined #markus.
 [08:46:11]  karenreid (~karenreid@red-gw73.cs.toronto.edu) joined #markus.
 [08:46:35]  #markus: mode change '+o karenreid' by MarkUsBot!~MarkUsBot@li136-145.members.linode.com
 [09:51:27]  Nick change: xddadacha -> ddadacha
 [12:56:18]  karenreid (~karenreid@red-gw73.cs.toronto.edu) left irc: Read error: Connection reset by peer
 [12:56:33]  karenreid (~karenreid@red-gw73.cs.toronto.edu) joined #markus.
 [12:56:47]  #markus: mode change '+o karenreid' by MarkUsBot!~MarkUsBot@li136-145.members.linode.com
 [13:21:43]  lissyx (~alex@ left irc: Ping timeout: 265 seconds
 [13:30:57]  baadshah (~jay@CPE001346fab9ed-CM602ad086fb19.cpe.net.cable.rogers.com) joined #markus.
 [14:21:34]  baadshah (~jay@CPE001346fab9ed-CM602ad086fb19.cpe.net.cable.rogers.com) left irc: Quit: Lost terminal
 [14:28:42]  lissyx (~alex@ joined #markus.
 [16:01:10]  ChristineY (~cyu@host82-69.wifi.ubc.ca) joined #markus.
 [16:57:17]  lissyx (~alex@ left irc: Ping timeout: 265 seconds
 [16:59:28]  ChristineY (~cyu@host82-69.wifi.ubc.ca) left irc: Ping timeout: 264 seconds
 [17:04:48]  karenreid (~karenreid@red-gw73.cs.toronto.edu) left irc: Ping timeout: 240 seconds
 [17:27:37]  ChristineY (~cyu@host109-66.wifi.ubc.ca) joined #markus.
 [17:55:37]  Nick change: ddadacha -> xddadacha
 [18:19:11]  ChristineY (~cyu@host109-66.wifi.ubc.ca) left irc: Read error: Operation timed out
 [18:38:03]  aimenk (~aimenk@ joined #markus.
 [18:44:55]  Erop (~chatzilla@S0106001d098e7fbc.vc.shawcable.net) joined #markus.
 [19:06:55] <aimenk>  hey Erop
 [19:06:58] <aimenk>  how's it going?
 [19:08:08] <Erop>  not bad aimenk, sup
 [19:08:18] <aimenk>  i had a question about routing
 [19:08:24] <Erop>  k
 [19:08:27] <aimenk>  i have a new method in my def
 [19:08:55] <aimenk>  and i wrote in routes.rb that it's a get 'get update_column_filter'
 [19:09:07] <aimenk>  but for some reason in the terminal it says "PoST"
 [19:09:11] <aimenk>  so u have any idea why?
 [19:10:59] <Erop>  what do you mean in the terminal it says post?
 [19:11:13] <aimenk>  it says Stated POST
 [19:11:16] <aimenk>  let me pastie it for u
 [19:11:45] <aimenk>  http://pastie.org/3631391
 [19:12:43]  sean2 (~sean@ joined #markus.
 [19:13:44] <Erop>  so you think that just because you had 'get update_column_filter' in routes.rb, that all references to update_column_filter would be through GET?
 [19:14:00] <aimenk>  yea i guess
 [19:14:02] <aimenk>  no?
 [19:14:08] <aimenk>  i m not too familiar with routing
 [19:14:09] <Erop>  writting 'get update_column_filter' in routes.rb just means that Rails will recognize GET requests for that function
 [19:14:21] <aimenk>  ooh
 [19:15:02] <sean2>  when should a function be declared in routes.rb as 'get'? when should it be declared as 'post'?
 [19:15:23] <sean2>  Erop:
 [19:16:03] <Erop>  1 sec
 [19:16:13] <sean2>  sure, i'll be here for a while :)
 [19:16:19] <sean2>  take your time.
 [19:17:14] <Erop>  nothing is really declared in routes.rb...when you add a new line to routes.rb like get 'move_criterion', for example
 [19:17:36] <aimenk>  yeaa?
 [19:17:48] <Erop>  you're just telling rails to route all GET requests to move_criterion to the move_criterion function
 [19:18:28] <Erop>  whether the function is called with GET or POST depends on how you wrote it in your view
 [19:18:40] <Erop>  does that make sense?
 [19:18:57] <sean2>  yes.
 [19:19:33] <Erop>  hey aimenk, did you understand what I wrote to you guys yesterday, in my email
 [19:20:06] <aimenk>  Erop: yea kinda
 [19:20:12] <Erop>  I can try to explain it more clearly
 [19:20:20] <aimenk>  yea sure
 [19:20:35] <Erop>  do you guys understand AJAX and how to call it in Rails 3?
 [19:20:38] <aimenk>  i'll tell u more in detail what we did and then let me know what u think about it and u can explain ur method
 [19:20:41] <Erop>  how to use it, i mean
 [19:21:05] <aimenk>  i m not sure
 [19:21:14] <aimenk>  i think we might have used it when creating out modal
 [19:21:24] <Erop>  yes, you did
 [19:21:42] <aimenk>  so yea we have used it, but we weren't sure 100%% how it works
 [19:21:50] <aimenk>  we kinda follow the role_switch example
 [19:22:01] <Erop>  :remote => true makes your form work with AJAX
 [19:22:11] <aimenk>  oh yeaa
 [19:22:17] <aimenk>  then thats what we are doing right now
 [19:22:35] <aimenk>  when we call our new method we all it through that
 [19:22:56] <Erop>  okay, so maybe 10 years ago, there was no AJAX, so when you modify a small piece of a web page, you have to redraw it completely
 [19:23:04] <aimenk>  hmm okk
 [19:23:10]  ChristineY (~cyu@host166-67.wifi.ubc.ca) joined #markus.
 [19:23:12] <Erop>  but AJAX allows you to redraw small portions of a page through javascript
 [19:23:22] <sean2>  oh i see,
 [19:23:33] <aimenk>  so i guess that's what we were trying to do
 [19:23:39] <aimenk>  just redraw the table
 [19:23:47] <Erop>  I looked through your code and you guys tried to use AJAX, but you tried to redraw the entire page with it :p
 [19:23:56] <sean2>  so as of now, we were trying to hide columns through the view
 [19:23:57] <aimenk>  haha yeaa probably
 [19:24:00] <Erop>  yep, you should just focus on the table for this task
 [19:24:04] <sean2>  but also use ajax
 [19:24:08] <aimenk>  yea wasnt sure how to go about it
 [19:24:28] <Erop>  so here's the workflow for AJAX forms
 [19:25:12] <Erop>  first you write your form with :remote => true
 [19:25:36] <aimenk>  so when u say form, do u mean for the submission column table
 [19:25:38] <aimenk>  or the pop up?
 [19:25:59] <aimenk>  by pop up i mean the modal where the different names of the table columns are listed
 [19:26:03] <Erop>  when I say form, I mean when I click the "Save" button
 [19:26:08] <aimenk>  ohh okk
 [19:26:21] <aimenk>  so in the contents_filter_column file
 [19:26:32] <Erop>  actually let me look up your code so i can explain it better
 [19:26:38] <aimenk>  okk cool
 [19:26:46] <aimenk>  let me update the branch
 [19:27:50] <aimenk>  Erop: its updated now
 [19:28:54] <Erop>  https://github.com/aimenk/Markus/commits/issue327a ?
 [19:29:00] <aimenk>  yess
 [19:29:27] <aimenk>  so basically i changed the render to redirect_to
 [19:29:35] <aimenk>  but it still didn't refresh the page
 [19:30:08] <aimenk>  and this was the error it kept giving http://pastie.org/3631391
 [19:31:51] <aimenk>  so Erop currently how we hide the table columns is that
 [19:32:11] <Erop>  as I mentioned in my email, you shouldn't be do render :action => "browse" or redirect_to :action => 'browse'
 [19:32:16] <aimenk>  if you go to apps/views/submissions/_submission_table_sortin_links.html.erb and look at line 14
 [19:32:28] <aimenk>  we use an if statement
 [19:32:51] <aimenk>  to draw or not to draw the table header depending on the value of the table header
 [19:33:04] <aimenk>  sorry i mean on the value of our variable
 [19:33:32] <aimenk>  now our variable is a 'dictionary' in submission controller under def browse, that's currently set to true (for col1, col2, col3..)
 [19:34:08] <Erop>  yes, I understand
 [19:34:20] <aimenk>  ok good
 [19:34:25] <aimenk>  then i don't have to explain lol
 [19:34:31] <aimenk>  so what do u suggest is the best way to go about this
 [19:34:50] <sean2>  should we scrap those if statemetns in the view? and instead try to use javascript to show/hide columns
 [19:34:59] <Erop>  back to the AJAX workflow....you have your form here: <% form_tag update_column_filter_assignment_submissions_path(), {:method => 'post', :remote => true} do %>
 [19:35:16] <aimenk>  yess
 [19:35:20] <sean2>  Ok, yes. please continue.
 [19:35:27] <sean2>  :)
 [19:35:55] <Erop>  and you make a POST request to update_column_filter when the user clicks on the save button which is defined here: <%= submit_tag I18n.t("browse_submissions.save"), :tabindex => 100, :class => 'button indent_button'%>
 [19:36:03] <Erop>  so in your update_column_filter function
 [19:36:12] <aimenk>  yesss
 [19:36:25] <Erop>  you should take your@submission_col_header and pass it to your newly created rjs file
 [19:37:11] <Erop>  so it would be like render :action => "hide_columns", local => { @submission_col_header => @submission_col_header }
 [19:37:17] <Erop>  *locals
 [19:37:30] <Erop>  now inside this hide_columns.rjs.erb, which you will create
 [19:37:40] <aimenk>  yeaa
 [19:37:44] <Erop>  you will read all the values passed in @submission_col_header
 [19:37:51] <Erop>  and if for example, col1 is set to false
 [19:38:20] <Erop>  you will hide the col1 footer, col1 header and col1 <td> element
 [19:38:26] <aimenk>  hmm
 [19:38:30] <Erop>  that will be done through javascript
 [19:38:47] <Erop>  page['col1']['style']['display']=none
 [19:38:56] <aimenk>  so we would have to create 2 new files?
 [19:39:01] <Erop>  would hide an element on the page with id = col1
 [19:39:02] <aimenk>  one rjs and another javasript file?
 [19:39:23] <Erop>  rjs is javascript
 [19:39:46] <Erop>  page['col1']['style']['display'] produces javascript
 [19:39:47] <aimenk>  hmm that make sense ruby java script lol
 [19:40:04] <Erop>  it uses the prototype helper library to produce javascript
 [19:41:11] <Erop>  this is why I suggested that you find a way to assign a unique id to every <th> in the footer and header of that table
 [19:41:40] <Erop>  so you can just do like: page['col1Header']['style']['display'] = none in your rjs if you want to hide it
 [19:41:48] <Erop>  does that make sense?
 [19:42:03] <Erop>  aimenk, sean2?
 [19:42:15] <aimenk>  yeaaa
 [19:42:48] <aimenk>  so in page['col1Header']['style']['display'] what is suppose to be style and display
 [19:42:57] <aimenk>  so if i say th id ='col1'
 [19:43:01]  #markus: mode change '-o NelleV' by NelleV!~Nelle@unaffiliated/nellev
 [19:43:24] <aimenk>  then if its false i would say page['col1']['style']['display'] = none
 [19:43:27]  #markus: mode change '+o NelleV' by MarkUsBot!~MarkUsBot@li136-145.members.linode.com
 [19:43:46] <NelleV>  MarkUsBot: really ? o_O
 [19:43:49]  #markus: mode change '-o NelleV' by NelleV!~Nelle@unaffiliated/nellev
 [19:43:58] <Erop>  wut going on, lol
 [19:44:02] <Erop>  *wuts
 [19:44:11] <aimenk>  lol
 [19:44:12] <Erop>  I dont think I understand your question, aimenk
 [19:44:29] <Erop>  are you asking what page['col1']['style']['display'] does?
 [19:44:33] <aimenk>  noo
 [19:44:49] <aimenk>  like what is the value of col1, style and display?
 [19:45:00] <aimenk>  like col1 would be the unique id given to the table header, i assume
 [19:45:14] <Erop>  oh
 [19:45:23] <Erop>  display is a css property
 [19:45:26] <Erop>  you know how you can write
 [19:45:38] <Erop>  <div style="display: inline">
 [19:46:03] <Erop>  you're just basically changing the value of display with javascript
 [19:46:31] <aimenk>  oohh
 [19:46:35] <Erop>  http://www.w3schools.com/cssref/pr_class_display.asp
 [19:47:01] <aimenk>  hmm okk
 [19:47:15] <aimenk>  so basically if my unique id for column 1 is col1
 [19:47:22] <aimenk>  and i dont want that column to display
 [19:47:37] <aimenk>  i'll just write in my javascript "page['col1']['style']['display'] = none"
 [19:48:29]  Ayaya-Aaron-MBP (~Ayaya-Aar@S010600179a2ca2c5.vc.shawcable.net) joined #markus.
 [19:48:55] <Erop>  let me look at that table again
 [19:48:56] <sean2>  Ok, i have a stupid question- most of the .rjs files in our project seem to have only one line. These files are not limited to one line, right? A .rjs is just a ruby javascript file?
 [19:49:19] <Erop>  I don't know if it stands for ruby javascript
 [19:49:25] <Erop>  but they dont have to be one line, no
 [19:49:45] <sean2>  ok, haha, i just figured rjs= ruby javascript. Thanks :)
 [19:49:47] <Erop>  I've been working with codeviewer.rjs which is a pretty large file
 [19:50:05] <sean2>  oh okay, i'll take a look at it :D
 [19:50:37] <aimenk>  Erop: i had one more question
 [19:50:42] <aimenk>  the hide_columns.rjs file
 [19:50:51] <aimenk>  would that be in the views/submission correct?
 [19:51:11] <Erop>  yes
 [19:51:16] <aimenk>  okk
 [19:51:29] <aimenk>  so by creating the javascript file we never have to call brwose again right?
 [19:51:36] <aimenk>  we dont have to refresh the page.
 [19:51:41] <aimenk>  would we have to close the modal?
 [19:51:48] <aimenk>  or does it close automatically