- before_filter :authorize_web
- before_filter :set_locale
- before_filter :require_user
+ before_action :authorize_web
+ before_action :set_locale
+ before_action :require_user
rescue ActiveRecord::RecordNotFound
@type = "client application"
render :action => "not_found", :status => :not_found
end
def edit
rescue ActiveRecord::RecordNotFound
@type = "client application"
render :action => "not_found", :status => :not_found
end
def edit
rescue ActiveRecord::RecordNotFound
@type = "client application"
render :action => "not_found", :status => :not_found
end
def update
rescue ActiveRecord::RecordNotFound
@type = "client application"
render :action => "not_found", :status => :not_found
end
def update
- @client_application = @user.client_applications.find(params[:id])
- if @client_application.update_attributes(application_params)
- flash[:notice] = t 'oauth_clients.update.flash'
+ @client_application = current_user.client_applications.find(params[:id])
+ if @client_application.update(application_params)
+ flash[:notice] = t "oauth_clients.update.flash"
redirect_to :action => "index"
rescue ActiveRecord::RecordNotFound
@type = "client application"
redirect_to :action => "index"
rescue ActiveRecord::RecordNotFound
@type = "client application"