Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: e62396c40a
Fetching contributors…

Cannot retrieve contributors at this time

30 lines (25 sloc) 0.624 kB
module CornerStones
class Table
module DeletableRows
def delete_row(options)
warn "[DEPRECATION] `delete_row` is deprecated. Please use `row(row_spec).delete` instead."
row(options).delete
end
def build_row(node)
row = super
row.extend RowMethods
row
end
module RowMethods
def delete
delete_link = node.first('td .delete-action')
if delete_link
delete_link.click
else
raise "The row '#{attributes}' does not have a delete-link"
end
end
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.