Skip to content

Commit

Permalink
Remove NameError rescue in page base (#920)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndrluis authored and pablobm committed Nov 1, 2019
1 parent 0e3966d commit dc856a9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/administrate/page/base.rb
Expand Up @@ -33,8 +33,6 @@ def attribute_field(dashboard, resource, attribute_name, page)

def get_attribute_value(resource, attribute_name)
resource.public_send(attribute_name)
rescue NameError
nil
end

attr_reader :dashboard, :options
Expand Down
@@ -0,0 +1,5 @@
class AddTimestampToPayments < ActiveRecord::Migration[5.1]
def change
change_table(:payments, &:timestamps)
end
end
2 changes: 2 additions & 0 deletions spec/example_app/db/schema.rb
Expand Up @@ -79,6 +79,8 @@

create_table "payments", id: :serial, force: :cascade do |t|
t.integer "order_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["order_id"], name: "index_payments_on_order_id"
end

Expand Down

0 comments on commit dc856a9

Please sign in to comment.