[09:47:39]  mrclrnt (59567664@gateway/web/freenode/ip.89.86.118.100) joined #markus.
 [09:48:04]  mrclrnt (59567664@gateway/web/freenode/ip.89.86.118.100) left #markus.
 [11:35:01]  m_conley_away (~mconley@li67-220.members.linode.com) joined #markus.
 [11:35:01]  #markus: mode change '+o m_conley_away ' by gibson.freenode.net
 [13:28:21]  ddadacha (~ddadacha@76-10-181-224.dsl.teksavvy.com) joined #markus.
 [14:30:07]  karenreid (~karenreid@64.231.18.126) joined #markus.
 [14:34:30]  karenreid (~karenreid@64.231.18.126) left irc: Client Quit
 [15:02:57]  tobioboye (~drone@gw-wifi9.cdf.toronto.edu) joined #markus.
 [15:03:30] <ddadacha>  tobioboye: turns out that route problem was a URL issue
 [15:03:32]  ddadacha (~ddadacha@76-10-181-224.dsl.teksavvy.com) left #markus ("Leaving").
 [15:03:34]  ddadacha (~ddadacha@76-10-181-224.dsl.teksavvy.com) joined #markus.
 [15:03:36] <tobioboye>  o yeah?
 [15:03:38] <ddadacha>  damn too used to ctrl+w
 [15:03:40] <ddadacha>  woops
 [15:03:52] <tobioboye>  was it the parameters
 [15:03:58] <ddadacha>  so the link I'm looking at is http://localhost:3000/en/students/169/edit
 [15:04:00] <ddadacha>  yeah
 [15:04:08] <tobioboye>  yep I thought as much
 [15:04:20] <ddadacha>  whereas the route is usually assignments/2/submissions/16/....
 [15:04:23] <tobioboye>  that was what I would have looked at again
 [15:04:34] <ddadacha>  stupid mistake by me
 [15:04:41] <tobioboye>  lol
 [15:04:42] <ddadacha>  forgot rails automagically handles it if it's setup right
 [15:05:03] <ddadacha>  I was wondering why the heck it wasn't working because it was the exact same path func call as in the other file
 [15:05:04] <tobioboye>  ok so your issue was you didn't pass in the assignment ID right?
 [15:05:17] <ddadacha>  assignment and grouping
 [15:05:23] <ddadacha>  what's yours?
 [15:06:29] <tobioboye>  one sec
 [15:10:05] <ddadacha>  FYI, if you pass in all params to the _path funcs, you don't need to specify their keys
 [15:10:43] <ddadacha>  (e.g. I needed assignment_id, submission_id and result_id, if I gave all, I just passed the values in, not :assignment_id => ...,... etc)
 [15:13:40]  aimenk (~aimenk@CPE00226b45e6b2-CM001ac318b812.cpe.net.cable.rogers.com) joined #markus.
 [15:14:20] <ddadacha>  sorry to clarify, the params that the URL requires, not the params the func requires
 [15:14:56] <ddadacha>  e.g. edit_assignment_group GET /assignments/:assignment_id/groups/:id/edit(.:format) {:controller=>"groups", :action=>"edit"}
 [15:15:17] <ddadacha>  you don't need to add the ":assignment_id =>" and ":id =>" bit
 [15:15:43] <ddadacha>  but if the func looks for param[:some_key] that is not in -^, then you do
 [15:16:54] <ddadacha>  now that brings up the question of how in the world this link worked before without the above
 [15:16:59] <ddadacha>  maybe rails became more strict
 [15:19:01] <tobioboye>  yeah exactly
 [15:19:18] <tobioboye>  not sure how this worked before
 [15:19:51] <tobioboye>  I don't understand what you mean by the params that the URL requires, not the params that the fund requires
 [15:20:27] <tobioboye>  do you mean we do not need assignment_id, and :id
 [15:20:30] <tobioboye>  ddadacha:
 [15:20:54] <ddadacha>  yeah, you see the snippit of a URL after GET?
 [15:20:59] <ddadacha>  GET /assignments/:assignment_id/groups/:id/edit(.:format)
 [15:21:12] <ddadacha>  basically the URL needs :assignment_id and :id to work
 [15:21:31] <ddadacha>  so for these ones, if you pass them in order in the _path func, you don't need to specify the keys
 [15:22:28] <ddadacha>  the URL as in the snippets of URIS found in rake routes
 [15:22:58] <ddadacha>  anything with a :colon_at_start means it's a param and specifically a part of the URL.
 [15:23:04] <ddadacha>  tobioboye: did that clear things up?
 [15:23:23] <ddadacha>  here, the one I'm working on
 [15:23:25] <ddadacha>  delete_grace_period_deduction_assignment_submission_result_path(
 [15:23:25] <ddadacha>  grouping.assignment.id,
 [15:23:25] <ddadacha>  grouping.current_submission_used.id,
 [15:23:25] <ddadacha>  grouping.current_submission_used.result.id,
 [15:23:25] <ddadacha>  :deduction_id => grace_period_deduction.id),
 [15:23:43] <tobioboye>  yeah ddadacha
 [15:24:02] <ddadacha>  from routes, it's /assignments/:assignment_id/submissions/:submission_id/results/:id/delete_grace_period_deduction(.:format)
 [15:24:26] <ddadacha>  so notice how I did not explicitly say :assignment_id =>, :submission_id => and :id =>
 [15:24:53] <ddadacha>  whereas :deduction_id is one the func in the controller tries to find in params
 [15:24:55] <tobioboye>  but we can still use the key, value pair
 [15:26:17] <ddadacha>  if you want yeah
 [15:26:20] <ddadacha>  it's extra though
 [15:26:39] <ddadacha>  damn that link didn't work :(
 [15:26:54] <ddadacha>  nooooo and it deleted the grace period deduction
 [15:26:58] <ddadacha>  those are such pains to setup :/
 [15:27:15]  *** ddadacha rages, going to get a snack
 [15:27:19] <ddadacha>  br
 [15:27:20] <ddadacha>  b
 [16:02:25] <aimenk>  hey tobioboye
 [16:02:30] <aimenk>  how's it going?
 [16:02:39] <tobioboye>  good aimenk you?
 [16:02:45] <aimenk>  good as well
 [16:02:48] <aimenk>  i just had a question
 [16:03:11] <aimenk>  last week u said that we will have to add the check of the values to the dictionary
 [16:03:15] <aimenk>  what did u mean by that
 [16:03:25] <aimenk>  does dictionary have an option where u can like check it if its true or not
 [16:06:01] <tobioboye>  yeah i mentioned that because the columns that were set to invisible were being displayed after a refresh
 [16:06:56] <tobioboye>  the idea was that you would define a dictionary as an instance variable on the submissions controller which will hold the values set from the column preferences popup
 [16:07:25] <tobioboye>  the dictionary will hold the visibility boolean of each column
 [16:07:39] <aimenk>  hmm
 [16:07:45] <aimenk>  so have a new dictionary
 [16:08:01] <tobioboye>  it will be initialized to true then as soon as a user checks off some columns, that dictionary will get updated
 [16:08:09] <tobioboye>  do you understand what I mean by instance variable?
 [16:08:13] <aimenk>  yeaa
 [16:08:35]  sean2 (~sean@CPE602ad092b079-CM602ad092b076.cpe.net.cable.rogers.com) joined #markus.
 [16:09:16] <aimenk>  so the instance variable that can be under our update_column_filter def
 [16:14:18] <tobioboye>  no it should be at the very top
 [16:15:20] <tobioboye>  the variable should be declared outside any function and then you should check the values of the dictionary in the view with the columns
 [16:15:43] <tobioboye>  this is so that when ever you refresh, the view knows to make those columns invisible
 [16:20:39] <ddadacha>  tobioboye: still having problems with your route? I found an issue with mine
 [16:20:46] <tobioboye>  noep
 [16:20:51] <ddadacha>  ah k
 [16:20:52] <tobioboye>  *nope fixed it
 [16:26:28] <aimenk>  tobioboye: yea i got what u mean by the whole refresh thing
 [16:26:48] <aimenk>  but i was just trying to figure out where to put the instance variable, cos still new to the whole controller thing and how it works
 [16:30:30] <tobioboye>  just put it at the top before the first function
 [16:30:41] <tobioboye>  &also read up on instance variable in ruby
 [16:31:30] <aimenk>  yea doing that right now :)
 [16:31:36] <tobioboye>  cool
 [16:34:22]  Nick change: m_conley_away -> m_conley
 [16:46:18]  tobioboye (~drone@gw-wifi9.cdf.toronto.edu) left irc: Quit: tobioboye
 [16:48:33]  aimenk (~aimenk@CPE00226b45e6b2-CM001ac318b812.cpe.net.cable.rogers.com) left #markus.
 [16:59:05]  Nick change: sean2 -> sean_afk
 [17:12:34]  Nick change: sean_afk -> sean2
 [17:37:17]  tobioboye (~drone@user242-85.wireless.utoronto.ca) joined #markus.
 [18:08:15]  Nick change: m_conley -> m_conley_away
 [18:23:38]  lissyx (~alex@238.123.73.86.rev.sfr.net) left irc: Quit: Ex-Chat
 [18:31:18] <sean2>  tobioboye: hey tobi, do you have a second?
 [18:31:30] <tobioboye>  yeah sean2 :)
 [18:31:46] <sean2>  cool, so i was working on that issue with aimen today
 [18:32:07] <sean2>  i'm trying to store the values of a dictionary so that when a page is refreshed, they are not reset to all true
 [18:32:27] <sean2>  the dictionary is an instance variable in the submissions controller
 [18:32:48] <tobioboye>  ok
 [18:33:01] <tobioboye>  so what's the issue? :)
 [18:33:28] <sean2>  so i'm not sure how to define this varaible so that it persists through a page refresh
 [18:34:58] <sean2>  i've been playing around with different ways to define it within the submissions controller, but it always seems to be redefined when the page is refreshed.
 [18:35:49] <sean2>  should i be looking into storeing it as a session variable somehow? or in cookie or something like that?
 [18:37:32] <tobioboye>  what have you tried
 [18:38:25] <sean2>  so we currently have an instance varaible within a function that is defined in the submissions controller.
 [18:38:47] <sean2>  i tried moving that variable out of the function, so it is an instance variable for the submissions controller
 [18:39:12] <sean2>  that didn't work too well
 [18:40:04] <sean2>  so i tried creating a new variable within the submissions controller that is only instanciated if it was undefined
 [18:40:18] <sean2>  and that variable was updated from our function
 [18:40:36] <sean2>  that also didn't seem to work- i tried debugging and found that
 [18:40:41] <tobioboye>  so you tried declaring the instance variable at the top of the submissions controller
 [18:40:47] <sean2>  yes
 [18:41:07] <sean2>  i set it to only be instanciated if it was undefined
 [18:41:23] <sean2>  and through debugging i found it would always be instanciated every time i refreshed the page
 [18:41:41] <tobioboye>  yeah you should use sessions variable
 [18:41:52] <sean2>  Ok. That's what i was unsure about.
 [18:42:00] <sean2>  so my second question now
 [18:42:07] <tobioboye>  the general syntax is session[:some_new_var] = my_value
 [18:42:19] <tobioboye>  do you know how sessions work sean2 ?
 [18:42:21] <sean2>  I was doing some reading, and i found that session variables can take up a lot of space on the server side- will that be a problem?
 [18:42:30] <tobioboye>  not for this instance
 [18:42:41] <tobioboye>  we will be implementing user preferences anyway
 [18:42:42] <sean2>  oooh ok cool. i don't know how they work too well
 [18:42:44] <tobioboye>  for now you can use tjem
 [18:42:47] <tobioboye>  *tyem
 [18:42:49] <tobioboye>  *them
 [18:42:51] <sean2>  i can do some reading on google though
 [18:43:06] <tobioboye>  but do you understand the idea of having a session?
 [18:43:11] <tobioboye>  &in general
 [18:43:15] <sean2>  i think o
 [18:43:17] <sean2>  so*
 [18:43:31] <sean2>  basically each client gets a session when it connects to the server?
 [18:44:11] <tobioboye>  a session contains temporary information about a client that connected to some server
 [18:44:40] <tobioboye>  so information about the state of the client is stored in a sessiosn
 [18:44:44] <tobioboye>  *session using cookies
 [18:44:56] <sean2>  that makes sense. seems pretty intuitive.
 [18:45:14] <tobioboye>  these are called session cookies and they are only valid for a set amount of time
 [18:45:23] <sean2>  where should we define session variables? somewhere specific? or just where we need them- i.e. in my submision controller?
 [18:45:24] <tobioboye>  you should read up on how sessions / session cookies work in rails
 [18:45:31] <sean2>  ok ok. will do!
 [18:45:37] <sean2>  thanks tobi :)
 [18:45:48] <tobioboye>  yeah in the submissions controller
 [18:45:51] <sean2>  kk
 [18:46:08] <sean2>  alright, that answered all my questions or now, thanks so much!
 [18:46:15] <sean2>  for now*
 [18:46:25] <tobioboye>  ok good luck :)
 [18:46:30] <sean2>  ty
 [18:46:30] <tobioboye>  let me know if you have any other questions
 [18:46:34] <sean2>  kk
 [18:46:39] <sean2>  good luck to you too!
 [19:00:15]  ddadacha (~ddadacha@76-10-181-224.dsl.teksavvy.com) left irc: Quit: bye
 [19:20:17]  lissyx (~alex@2a01:240:fe3c:3:2677:3ff:fe5b:d594) joined #markus.
 [19:26:05]  lissyx (~alex@2a01:240:fe3c:3:2677:3ff:fe5b:d594) left irc: Quit: Ex-Chat
 [19:26:19]  lissyx (~alex@238.123.73.86.rev.sfr.net) joined #markus.
 [19:31:05] <sean2>  tobioboye: hey, i've made some progress, but i have a couple more questions
 [19:31:14] <tobioboye>  yeah sure go ahead sean2
 [19:31:32] <sean2>  cool, so i've got the whole session variables figured out
 [19:31:41] <sean2>  My next issue that i've run into is
 [19:31:48] <tobioboye>  cool :)
 [19:32:19] <sean2>  that when i refresh my browser, my .rjs file is not being run
 [19:32:27] <tobioboye>  yeah it wouldn't be
 [19:32:36] <sean2>  yeah, do you know what i mean?
 [19:32:52] <sean2>  like it will only run, and use ajax to update the table
 [19:32:53] <tobioboye>  that's because rjs files are only run when you call the corresponding action
 [19:32:57] <sean2>  when i click save on the modal
 [19:33:01] <tobioboye>  yep
 [19:33:02] <sean2>  yes
 [19:33:16] <sean2>  so is there a way to invoke my rjs file
 [19:33:16] <tobioboye>  that's because rjs files are only run when you call the corresponding action
 [19:33:34] <tobioboye>  you shouldn't be doing so when you refresh the view
 [19:33:41] <tobioboye>  that's why you're using a session variable
 [19:33:50] <sean2>  hmmm
 [19:34:11] <tobioboye>  so you will have to modify the code for the view based on the values in your session variable
 [19:34:54] <tobioboye>  basically you will have to add if checks in the view that will check the values of the different columns and specify whether to show a column or not
 [19:34:56] <sean2>  So we had thought about doing it that way before- but danesh suggested that using ajax to only re-render part of the page would be better
 [19:35:17] <tobioboye>  yeah ajax is better when you're not refreshing
 [19:35:32] <tobioboye>  which is the case when you use the modal
 [19:36:03] <sean2>  Ok.
 [19:36:09] <tobioboye>  however, when you refresh, you might as well set the values
 [19:36:20] <sean2>  yes, that makes sense
 [19:36:40] <tobioboye>  ok cool :)
 [19:36:41] <sean2>  ok cool.
 [19:36:45] <sean2>  I'm actually curious
 [19:36:53] <sean2>  if i did need the session variable or not
 [19:37:00] <tobioboye>  yes you need it
 [19:37:45] <tobioboye>  because the values of the checkboxes you set from the modal will not be accessible when you're refreshing