Skip to content

Commit

Permalink
Remove NameError rescue in page base
Browse files Browse the repository at this point in the history
  • Loading branch information
ndrluis committed Jul 4, 2017
1 parent 6c9d30c commit bcb6d1a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 0 additions & 2 deletions lib/administrate/page/base.rb
Expand Up @@ -25,8 +25,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
4 changes: 3 additions & 1 deletion spec/example_app/db/schema.rb
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20170507115814) do
ActiveRecord::Schema.define(version: 20170702033920) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Expand Down Expand Up @@ -58,6 +58,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 bcb6d1a

Please sign in to comment.