Added api user feature spec

This commit is contained in:
Priit Tark 2015-04-16 16:41:21 +03:00
parent 8d4124585c
commit 752e39e4a9
5 changed files with 44 additions and 4 deletions

View file

@ -1,5 +1,5 @@
- content_for :actions do
= link_to(t(:back_to_api_user), [:admin, @api_user], class: 'btn btn-default')
= render 'shared/title', name: "#{t(:edit)}: #{@api_user.name}"
= render 'shared/title', name: "#{t(:edit)}: #{@api_user.username}"
= render 'form'

View file

@ -2,7 +2,7 @@
= link_to(t(:edit), edit_admin_api_user_path(@api_user), class: 'btn btn-primary')
= link_to(t(:delete), admin_api_user_path(@api_user),
method: :delete, data: { confirm: t(:are_you_sure) }, class: 'btn btn-danger')
= render 'shared/title', @api_user.name
= render 'shared/title', name: @api_user.username
- if @api_user.errors.any?
- @api_user.errors.each do |attr, err|