mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 07:40:12 +01:00
major restructuring/refactoring of application.js. finally scratched that itch. Some tests are failing to be fixed later.
This commit is contained in:
parent
88a524a8d6
commit
879fbc99e2
12 changed files with 606 additions and 642 deletions
|
|
@ -1,9 +1,12 @@
|
|||
class NotesController < ApplicationController
|
||||
|
||||
before_filter :set_source_view
|
||||
|
||||
def index
|
||||
@all_notes = current_user.notes.all
|
||||
@count = @all_notes.size
|
||||
@page_title = "TRACKS::All notes"
|
||||
@source_view = 'note_list'
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.xml { render :xml => @all_notes.to_xml( :except => :user_id ) }
|
||||
|
|
@ -66,4 +69,11 @@ class NotesController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def set_source_view
|
||||
@source_view = params['_source_view'] || 'note'
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue