As I continue learning to program, I am finding things I think can
probably be done in a better way. The following code seems like
programmers must run into all the time and I am wondering if there is a
better way to write the code in this situation (it seems very repetitive
to me). I'm having fun and trying to get better at this....
@subject_id = session[:subject_id]
@book_id = session[:book_id]
@chapter_id = session[:chapter_id]
@section_id = session[:section_id]
@subsection_id = session[:subsection_id]
@minisection_id = session[:minisection_id]
Is there a better way??