Class: Pbw::TokensController

Inherits:
BaseModelsController show all
Defined in:
app/controllers/pbw/tokens_controller.rb

Instance Attribute Summary

Attributes inherited from BaseModelsController

#model_class

Instance Method Summary collapse

Methods inherited from BaseModelsController

#create, #destroy, #index, #index_models, #model_for_create, #model_for_read, #model_for_update, #model_id, #real_model_class, #show, #update, #update_model_before_update

Methods inherited from BaseController

#current_ability

Instance Method Details

#set_model_classObject



3
4
5
# File 'app/controllers/pbw/tokens_controller.rb', line 3

def set_model_class
	self.model_class = Token
end

#update_model_before_create(model) ⇒ Object



7
8
9
# File 'app/controllers/pbw/tokens_controller.rb', line 7

def update_model_before_create(model)
	model.user = current_user
end