minor change

This commit is contained in:
Hauke Klement
2015-03-18 10:35:35 +01:00
parent 9d6b79c919
commit 8787a21c3d
3 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
button.btn class=(local_assigns[:classes] || 'btn-primary') *(local_assigns[:data] || {}) id=id title=local_assigns[:title] type='button'
button.btn class=local_assigns.fetch(:classes, 'btn-primary') *local_assigns.fetch(:data, {}) id=id title=local_assigns[:title] type='button'
i.fa.fa-circle-o-notch.fa-spin
i class=icon
= label

View File

@ -1 +1 @@
= link_to(t('shared.edit'), local_assigns.has_key?(:path) ? path : send(:"edit_#{object.class.name.underscore}_path", object), class: 'btn btn-default pull-right')
= link_to(t('shared.edit'), local_assigns.fetch(:path, send(:"edit_#{object.class.name.underscore}_path", object), class: 'btn btn-default pull-right')

View File

@ -1,4 +1,4 @@
- if policy(model).new?
a.btn.btn-success href=(local_assigns.has_key?(:path) ? path : send(:"new_#{model.model_name.singular}_path"))
a.btn.btn-success href=local_assigns.fetch(:path, send(:"new_#{model.model_name.singular}_path"))
i.fa.fa-plus
= t('shared.new_model', model: model.model_name.human)