Class VocabularyListsController
In: app/controllers/vocabulary_lists_controller.rb
Parent: ApplicationController

Methods

Public Instance methods

[Source]

    # File app/controllers/vocabulary_lists_controller.rb, line 58
58:   def export
59:     respond_to do |format|
60:       @vocabulary_list = VocabularyList.find_by_id(params[:id])
61:       if @vocabulary_list
62:         format.kls{  render( :layout => true, :content_type => 'text/plain' ); return }
63:         format.xml{  render( :xml => @vocabulary_list ); return }
64:         format.json{ render( :json => @vocabulary_list ); return }
65:       else
66:         redirect_to( :controller => :vocabulary_lists, :action => :list)
67:       end
68:     end
69:   end

[Source]

    # File app/controllers/vocabulary_lists_controller.rb, line 71
71:   def my_lists
72: 
73:   end

Protected Instance methods

[Source]

    # File app/controllers/vocabulary_lists_controller.rb, line 93
93:   def before_create_save(vocabulary_list)
94: #    manage_words(vocabulary_list)
95:   end

[Source]

     # File app/controllers/vocabulary_lists_controller.rb, line 97
 97:   def before_update_save(vocabulary_list)
 98:     manage(vocabulary_list, CharactersVocabularyList, 'characters', 'character_id')
 99:     manage(vocabulary_list, VocabularyListsWord, 'words', 'word_id')
100:   end

[Source]

    # File app/controllers/vocabulary_lists_controller.rb, line 77
77:   def conditions_for_collection
78:     [
79: #      'words.language_id = ? and definitions.language_id = ?', 
80: #      [
81: #        session[:language_dictionary_id]
82: #      ],
83: #      [
84: #        session[:language_target_id]
85: #      ]      
86:       'vocabulary_lists.language_id = ?', 
87:       [
88:         session[:language_dictionary_id]
89:       ]    
90:     ]
91:   end

[Source]

     # File app/controllers/vocabulary_lists_controller.rb, line 118
118:   def create_authorized?
119:     return is_authorized_as?(UserRole::USER_ROLE_USER)
120:   end

[Source]

     # File app/controllers/vocabulary_lists_controller.rb, line 102
102:   def current_user
103:       session && session[:user_id] ? User.find_by_id(session[:user_id]) : nil
104:   end

[Source]

     # File app/controllers/vocabulary_lists_controller.rb, line 122
122:   def delete_authorized?
123:     return is_authorized_as?(UserRole::USER_ROLE_USER)
124:   end

[Source]

     # File app/controllers/vocabulary_lists_controller.rb, line 110
110:   def read_authorized?
111:     return is_authorized_as?(UserRole::USER_ROLE_USER)
112:   end

[Source]

     # File app/controllers/vocabulary_lists_controller.rb, line 106
106:   def search_authorized?
107:     return is_authorized_as?(UserRole::USER_ROLE_USER)
108:   end

[Source]

     # File app/controllers/vocabulary_lists_controller.rb, line 114
114:   def update_authorized?
115:     return is_authorized_as?(UserRole::USER_ROLE_USER)
116:   end

[Validate]