Sha256: 7eba3273248aec70721ecb5ed3d401fe33c7b84cda5e11c385bb38199c51bab2
Contents?: true
Size: 694 Bytes
Versions: 3
Compression:
Stored size: 694 Bytes
Contents
class Admin::ReadersController < Admin::ResourceController helper :reader paginate_models only_allow_access_to :new, :create, :edit, :update, :remove, :destroy, :settings, :when => :admin, :denied_url => { :controller => 'pages', :action => 'index' }, :denied_message => 'You must be an administrator to add or modify readers' def create model.update_attributes!(params[:reader]) model.clear_password = params[:reader][:password] if params[:reader] && params[:reader][:password] # condition is so that radiant tests pass model.send_invitation_message flash[:notice] = t('reader_extension.reader_saved') response_for :create end private end
Version data entries
3 entries across 3 versions & 1 rubygems