Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove NameError rescue in page base #920

Merged
merged 2 commits into from Nov 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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