Method: Espresso::View::InstanceMethods#link_to_edit
- Defined in:
- lib/espresso/view/inherited_resources.rb
#link_to_edit(object = nil, path = nil) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/espresso/view/inherited_resources.rb', line 31 def link_to_edit(object=nil, path=nil) object ||= resource path ||= if object == resource edit_resource_path else [:edit, object] end link_to(t("helpers.action.#{object.class.name.underscore}.edit", :default => [:'helpers.action.edit', 'Edit']), path, :class => Espresso::View.block_classes('action', %w(edit))) rescue end |