I use gem "composite_primary_keys"
Model
class Role < ActiveRecord::Base
acts_as_xlsx :columns => [:id, :name, :'users.size']
has_many :phan_quyens
has_many :users, through: :phan_quyens
end
class User < ActiveRecord::Base
mount_uploader :avatar, AvatarUploader
acts_as_xlsx
has_many :phan_quyens
has_many :roles, through: :phan_quyens
end
class PhanQuyen < ActiveRecord::Base
self.primary_key = :user_id, :role_id
belongs_to :user
belongs_to :role
end
I don't insert new "phan_quyens" to database
This is log
Started GET "/netzke/ext.css" for 127.0.0.1 at 2017-04-14 23:06:29 +0700
Processing by NetzkeController#ext as CSS
User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
Rendered text template (0.1ms)
Completed 200 OK in 68ms (Views: 12.7ms | ActiveRecord: 11.7ms)
Started GET "/netzke/ext.js" for 127.0.0.1 at 2017-04-14 23:06:29 +0700
Processing by NetzkeController#ext as JS
User Load (1.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
Rendered text template (0.1ms)
Completed 200 OK in 47ms (Views: 1.1ms | ActiveRecord: 2.6ms)
Started POST "/netzke/direct/?authenticity_token=nWK5y7bix7Hv7vdiZGr0HezOMhDyk2u8Xd9j0lRkeiv2joOX4J1RBu4WjC0Xw67v07Gc74deLdyxmV2hc0voaw%3D%3D" for 127.0.0.1 at 2017-04-14 23:06:31 +0700
Processing by NetzkeController#direct as */*
Parameters: {"_json"=>[{"path"=>"users_and_phan_quyens_and_roles__users", "endpoint"=>"read", "data"=>{"args"=>[{"page"=>1, "start"=>0, "limit"=>300}], "configs"=>[{}, {}]}, "tid"=>1, "type"=>"rpc"}, {"path"=>"users_and_phan_quyens_and_roles__phan_quyens", "endpoint"=>"read", "data"=>{"args"=>[{"page"=>1, "start"=>0, "limit"=>300}], "configs"=>[{}, {}]}, "tid"=>2, "type"=>"rpc"}, {"path"=>"users_and_phan_quyens_and_roles__roles", "endpoint"=>"read", "data"=>{"args"=>[{"page"=>1, "start"=>0, "limit"=>300}], "configs"=>[{}, {}]}, "tid"=>3, "type"=>"rpc"}], "authenticity_token"=>"nWK5y7bix7Hv7vdiZGr0HezOMhDyk2u8Xd9j0lRkeiv2joOX4J1RBu4WjC0Xw67v07Gc74deLdyxmV2hc0voaw==", "netzke"=>{"_json"=>[{"path"=>"users_and_phan_quyens_and_roles__users", "endpoint"=>"read", "data"=>{"args"=>[{"page"=>1, "start"=>0, "limit"=>300}], "configs"=>[{}, {}]}, "tid"=>1, "type"=>"rpc"}, {"path"=>"users_and_phan_quyens_and_roles__phan_quyens", "endpoint"=>"read", "data"=>{"args"=>[{"page"=>1, "start"=>0, "limit"=>300}], "configs"=>[{}, {}]}, "tid"=>2, "type"=>"rpc"}, {"path"=>"users_and_phan_quyens_and_roles__roles", "endpoint"=>"read", "data"=>{"args"=>[{"page"=>1, "start"=>0, "limit"=>300}], "configs"=>[{}, {}]}, "tid"=>3, "type"=>"rpc"}]}}
User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
User Load (0.6ms) SELECT "users".* FROM "users" LIMIT 300 OFFSET 0
(0.4ms) SELECT COUNT(*) FROM "users"
SQL (4.8ms) SELECT "phan_quyens"."user_id" AS t0_r0, "phan_quyens"."role_id" AS t0_r1, "users"."id" AS t1_r0, "users"."email" AS t1_r1, "users"."encrypted_password" AS t1_r2, "users"."reset_password_token" AS t1_r3, "users"."reset_password_sent_at" AS t1_r4, "users"."remember_created_at" AS t1_r5, "users"."sign_in_count" AS t1_r6, "users"."current_sign_in_at" AS t1_r7, "users"."last_sign_in_at" AS t1_r8, "users"."current_sign_in_ip" AS t1_r9, "users"."last_sign_in_ip" AS t1_r10, "users"."created_at" AS t1_r11, "users"."updated_at" AS t1_r12, "users"."username" AS t1_r13, "users"."fullname" AS t1_r14, "users"."gender" AS t1_r15, "users"."address" AS t1_r16, "users"."avatar" AS t1_r17, "users"."birthday" AS t1_r18, "users"."active" AS t1_r19, "roles"."id" AS t2_r0, "roles"."code" AS t2_r1, "roles"."name" AS t2_r2, "roles"."created_at" AS t2_r3, "roles"."updated_at" AS t2_r4, "roles"."activities" AS t2_r5 FROM "phan_quyens" LEFT OUTER JOIN "users" ON "users"."id" = "phan_quyens"."user_id" LEFT OUTER JOIN "roles" ON "roles"."id" = "phan_quyens"."role_id" WHERE "phan_quyens"."user_id" IS NULL LIMIT 300 OFFSET 0
(8.0ms) SELECT COUNT(*) FROM (SELECT DISTINCT "phan_quyens"."user_id", "phan_quyens"."role_id" FROM "phan_quyens" LEFT OUTER JOIN "users" ON "users"."id" = "phan_quyens"."user_id" LEFT OUTER JOIN "roles" ON "roles"."id" = "phan_quyens"."role_id" WHERE "phan_quyens"."user_id" IS NULL) subquery_for_count
Role Load (0.8ms) SELECT "roles".* FROM "roles" LIMIT 300 OFFSET 0
(10.0ms) SELECT COUNT(*) FROM "roles"
Rendered text template (0.1ms)
Completed 200 OK in 4861ms (Views: 1.1ms | ActiveRecord: 25.5ms)
Started POST "/netzke/direct/?authenticity_token=nWK5y7bix7Hv7vdiZGr0HezOMhDyk2u8Xd9j0lRkeiv2joOX4J1RBu4WjC0Xw67v07Gc74deLdyxmV2hc0voaw%3D%3D" for 127.0.0.1 at 2017-04-14 23:06:41 +0700
Processing by NetzkeController#direct as */*
Parameters: {"path"=>"users_and_phan_quyens_and_roles__phan_quyens", "endpoint"=>"read", "data"=>{"args"=>[{"page"=>1, "start"=>0, "limit"=>300}], "configs"=>[{"selected_user_id"=>3}, {}]}, "tid"=>4, "type"=>"rpc", "authenticity_token"=>"nWK5y7bix7Hv7vdiZGr0HezOMhDyk2u8Xd9j0lRkeiv2joOX4J1RBu4WjC0Xw67v07Gc74deLdyxmV2hc0voaw==", "netzke"=>{"path"=>"users_and_phan_quyens_and_roles__phan_quyens", "endpoint"=>"read", "data"=>{"args"=>[{"page"=>1, "start"=>0, "limit"=>300}], "configs"=>[{"selected_user_id"=>3}, {}]}, "tid"=>4, "type"=>"rpc"}}
User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
SQL (0.8ms) SELECT "phan_quyens"."user_id" AS t0_r0, "phan_quyens"."role_id" AS t0_r1, "users"."id" AS t1_r0, "users"."email" AS t1_r1, "users"."encrypted_password" AS t1_r2, "users"."reset_password_token" AS t1_r3, "users"."reset_password_sent_at" AS t1_r4, "users"."remember_created_at" AS t1_r5, "users"."sign_in_count" AS t1_r6, "users"."current_sign_in_at" AS t1_r7, "users"."last_sign_in_at" AS t1_r8, "users"."current_sign_in_ip" AS t1_r9, "users"."last_sign_in_ip" AS t1_r10, "users"."created_at" AS t1_r11, "users"."updated_at" AS t1_r12, "users"."username" AS t1_r13, "users"."fullname" AS t1_r14, "users"."gender" AS t1_r15, "users"."address" AS t1_r16, "users"."avatar" AS t1_r17, "users"."birthday" AS t1_r18, "users"."active" AS t1_r19, "roles"."id" AS t2_r0, "roles"."code" AS t2_r1, "roles"."name" AS t2_r2, "roles"."created_at" AS t2_r3, "roles"."updated_at" AS t2_r4, "roles"."activities" AS t2_r5 FROM "phan_quyens" LEFT OUTER JOIN "users" ON "users"."id" = "phan_quyens"."user_id" LEFT OUTER JOIN "roles" ON "roles"."id" = "phan_quyens"."role_id" WHERE "phan_quyens"."user_id" = $1 LIMIT 300 OFFSET 0 [["user_id", 3]]
(0.4ms) SELECT COUNT(*) FROM (SELECT DISTINCT "phan_quyens"."user_id", "phan_quyens"."role_id" FROM "phan_quyens" LEFT OUTER JOIN "users" ON "users"."id" = "phan_quyens"."user_id" LEFT OUTER JOIN "roles" ON "roles"."id" = "phan_quyens"."role_id" WHERE "phan_quyens"."user_id" = $1) subquery_for_count [["user_id", 3]]
Rendered text template (0.1ms)
Completed 200 OK in 3785ms (Views: 1.1ms | ActiveRecord: 1.9ms)
Started POST "/netzke/direct/?authenticity_token=nWK5y7bix7Hv7vdiZGr0HezOMhDyk2u8Xd9j0lRkeiv2joOX4J1RBu4WjC0Xw67v07Gc74deLdyxmV2hc0voaw%3D%3D" for 127.0.0.1 at 2017-04-14 23:06:50 +0700
Processing by NetzkeController#direct as */*
Parameters: {"path"=>"users_and_phan_quyens_and_roles__phan_quyens", "endpoint"=>"deliverComponent", "data"=>{"args"=>[{"name"=>"add_window", "item_id"=>"add_window", "cache"=>"netzkeplugin,netzkebasepackitempersistenceeventsplugin,netzkegridbase,phanquyens,roles,usersandphanquyensandroles"}], "configs"=>[{"selected_user_id"=>3}, {}]}, "tid"=>5, "type"=>"rpc", "authenticity_token"=>"nWK5y7bix7Hv7vdiZGr0HezOMhDyk2u8Xd9j0lRkeiv2joOX4J1RBu4WjC0Xw67v07Gc74deLdyxmV2hc0voaw==", "netzke"=>{"path"=>"users_and_phan_quyens_and_roles__phan_quyens", "endpoint"=>"deliverComponent", "data"=>{"args"=>[{"name"=>"add_window", "item_id"=>"add_window", "cache"=>"netzkeplugin,netzkebasepackitempersistenceeventsplugin,netzkegridbase,phanquyens,roles,usersandphanquyensandroles"}], "configs"=>[{"selected_user_id"=>3}, {}]}, "tid"=>5, "type"=>"rpc"}}
User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
Rendered text template (0.1ms)
Completed 200 OK in 14873ms (Views: 1.3ms | ActiveRecord: 0.7ms)
Started POST "/netzke/direct/?authenticity_token=nWK5y7bix7Hv7vdiZGr0HezOMhDyk2u8Xd9j0lRkeiv2joOX4J1RBu4WjC0Xw67v07Gc74deLdyxmV2hc0voaw%3D%3D" for 127.0.0.1 at 2017-04-14 23:07:08 +0700
Processing by NetzkeController#direct as */*
Parameters: {"path"=>"users_and_phan_quyens_and_roles__phan_quyens__add_window__add_form", "endpoint"=>"getComboboxOptions", "data"=>{"query"=>"", "attr"=>"user__fullname", "configs"=>[{"selected_user_id"=>3}, {}, {}, {}], "page"=>1, "start"=>0, "limit"=>25}, "tid"=>6, "type"=>"rpc", "authenticity_token"=>"nWK5y7bix7Hv7vdiZGr0HezOMhDyk2u8Xd9j0lRkeiv2joOX4J1RBu4WjC0Xw67v07Gc74deLdyxmV2hc0voaw==", "netzke"=>{"path"=>"users_and_phan_quyens_and_roles__phan_quyens__add_window__add_form", "endpoint"=>"getComboboxOptions", "data"=>{"query"=>"", "attr"=>"user__fullname", "configs"=>[{"selected_user_id"=>3}, {}, {}, {}], "page"=>1, "start"=>0, "limit"=>25}, "tid"=>6, "type"=>"rpc"}}
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
User Load (0.5ms) SELECT "users".* FROM "users"
Rendered text template (0.1ms)
Completed 200 OK in 4666ms (Views: 1.0ms | ActiveRecord: 1.1ms)
Started POST "/netzke/direct/?authenticity_token=nWK5y7bix7Hv7vdiZGr0HezOMhDyk2u8Xd9j0lRkeiv2joOX4J1RBu4WjC0Xw67v07Gc74deLdyxmV2hc0voaw%3D%3D" for 127.0.0.1 at 2017-04-14 23:07:21 +0700
Processing by NetzkeController#direct as */*
Parameters: {"path"=>"users_and_phan_quyens_and_roles__phan_quyens__add_window__add_form", "endpoint"=>"getComboboxOptions", "data"=>{"query"=>"", "attr"=>"role__name", "configs"=>[{"selected_user_id"=>3}, {}, {}, {}], "page"=>1, "start"=>0, "limit"=>25}, "tid"=>7, "type"=>"rpc", "authenticity_token"=>"nWK5y7bix7Hv7vdiZGr0HezOMhDyk2u8Xd9j0lRkeiv2joOX4J1RBu4WjC0Xw67v07Gc74deLdyxmV2hc0voaw==", "netzke"=>{"path"=>"users_and_phan_quyens_and_roles__phan_quyens__add_window__add_form", "endpoint"=>"getComboboxOptions", "data"=>{"query"=>"", "attr"=>"role__name", "configs"=>[{"selected_user_id"=>3}, {}, {}, {}], "page"=>1, "start"=>0, "limit"=>25}, "tid"=>7, "type"=>"rpc"}}
User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
Role Load (0.5ms) SELECT "roles".* FROM "roles"
Rendered text template (0.0ms)
Completed 200 OK in 82ms (Views: 1.8ms | ActiveRecord: 1.3ms)
Started POST "/netzke/direct/?authenticity_token=nWK5y7bix7Hv7vdiZGr0HezOMhDyk2u8Xd9j0lRkeiv2joOX4J1RBu4WjC0Xw67v07Gc74deLdyxmV2hc0voaw%3D%3D" for 127.0.0.1 at 2017-04-14 23:07:26 +0700
Processing by NetzkeController#direct as */*
Parameters: {"path"=>"users_and_phan_quyens_and_roles__phan_quyens__add_window__add_form", "endpoint"=>"submit", "data"=>{"args"=>[{"data"=>"{\"user_id,role_id\":\",\",\"user__fullname\":3,\"role__name\":2}"}], "configs"=>[{"selected_user_id"=>3}, {}, {}, {}]}, "tid"=>8, "type"=>"rpc", "authenticity_token"=>"nWK5y7bix7Hv7vdiZGr0HezOMhDyk2u8Xd9j0lRkeiv2joOX4J1RBu4WjC0Xw67v07Gc74deLdyxmV2hc0voaw==", "netzke"=>{"path"=>"users_and_phan_quyens_and_roles__phan_quyens__add_window__add_form", "endpoint"=>"submit", "data"=>{"args"=>[{"data"=>"{\"user_id,role_id\":\",\",\"user__fullname\":3,\"role__name\":2}"}], "configs"=>[{"selected_user_id"=>3}, {}, {}, {}]}, "tid"=>8, "type"=>"rpc"}}
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
PhanQuyen Load (0.5ms) SELECT "phan_quyens".* FROM "phan_quyens" WHERE "phan_quyens"."user_id,role_id" = ',' ORDER BY "phan_quyens"."role_id" ASC LIMIT 1
PG::UndefinedColumn: ERROR: column phan_quyens.user_id,role_id does not exist
LINE 1: SELECT "phan_quyens".* FROM "phan_quyens" WHERE "phan_quyen...
^
: SELECT "phan_quyens".* FROM "phan_quyens" WHERE "phan_quyens"."user_id,role_id" = ',' ORDER BY "phan_quyens"."role_id" ASC LIMIT 1
Completed 500 Internal Server Error in 167ms
ActiveRecord::StatementInvalid (PG::UndefinedColumn: ERROR: column phan_quyens.user_id,role_id does not exist
LINE 1: SELECT "phan_quyens".* FROM "phan_quyens" WHERE "phan_quyen...
^
: SELECT "phan_quyens".* FROM "phan_quyens" WHERE "phan_quyens"."user_id,role_id" = ',' ORDER BY "phan_quyens"."role_id" ASC LIMIT 1):
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:592:in `async_exec'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:592:in `block in exec_no_cache'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract_adapter.rb:466:in `block in log'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract_adapter.rb:460:in `log'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:592:in `exec_no_cache'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:584:in `execute_and_clear'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql/database_statements.rb:160:in `exec_query'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/database_statements.rb:336:in `select'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/database_statements.rb:32:in `select_all'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/query_cache.rb:68:in `block in select_all'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/query_cache.rb:83:in `cache_sql'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/query_cache.rb:68:in `select_all'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/querying.rb:39:in `find_by_sql'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/relation.rb:638:in `exec_queries'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/relation.rb:514:in `load'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/relation.rb:243:in `to_a'
vendor/bundle/ruby/2.0.0/gems/bullet-5.0.0/lib/bullet/active_record42.rb:39:in `to_a'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/relation/finder_methods.rb:512:in `find_nth_with_limit'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/relation/finder_methods.rb:496:in `find_nth'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/relation/finder_methods.rb:139:in `first'
vendor/bundle/ruby/2.0.0/gems/netzke-basepack-1.0.1.0/lib/netzke/basepack/data_adapters/active_record_adapter.rb:144:in `find_record'
vendor/bundle/ruby/2.0.0/gems/netzke-basepack-1.0.1.0/lib/netzke/form/services.rb:58:in `create_or_update_record'
vendor/bundle/ruby/2.0.0/gems/netzke-basepack-1.0.1.0/lib/netzke/form/services.rb:12:in `submit'
vendor/bundle/ruby/2.0.0/gems/netzke-basepack-1.0.1.0/lib/netzke/form/endpoints.rb:10:in `block (2 levels) in <module:Endpoints>'
vendor/bundle/ruby/2.0.0/gems/netzke-core-1.0.1.0/lib/netzke/core/services.rb:118:in `invoke_endpoint'
vendor/bundle/ruby/2.0.0/gems/netzke-basepack-1.0.1.0/lib/netzke/grid/endpoints.rb:71:in `block (2 levels) in <module:Endpoints>'
vendor/bundle/ruby/2.0.0/gems/netzke-core-1.0.1.0/lib/netzke/core/services.rb:118:in `invoke_endpoint'
vendor/bundle/ruby/2.0.0/gems/netzke-core-1.0.1.0/lib/netzke/core/services.rb:132:in `invoke_endpoint'
vendor/bundle/ruby/2.0.0/gems/netzke-core-1.0.1.0/lib/netzke/core/railz/controller_extensions.rb:111:in `invoke_endpoint'
vendor/bundle/ruby/2.0.0/gems/netzke-core-1.0.1.0/lib/netzke/core/railz/controller_extensions.rb:63:in `direct'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/abstract_controller/base.rb:198:in `process_action'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_controller/metal/rendering.rb:10:in `process_action'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:117:in `call'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:117:in `call'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:151:in `call'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:151:in `block in halting_and_conditional'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in `call'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in `block in halting'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in `call'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in `block in halting'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in `call'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in `block in halting'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in `call'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in `block in halting'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:151:in `call'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:151:in `block in halting_and_conditional'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in `call'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in `_run_callbacks'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in `_run_process_action_callbacks'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:81:in `run_callbacks'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/abstract_controller/callbacks.rb:19:in `process_action'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_controller/metal/rescue.rb:29:in `process_action'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `block in instrument'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `instrument'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/abstract_controller/base.rb:137:in `process'
vendor/bundle/ruby/2.0.0/gems/actionview-4.2.0/lib/action_view/rendering.rb:30:in `process'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_controller/metal.rb:195:in `dispatch'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_controller/metal.rb:236:in `block in action'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:73:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:42:in `serve'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/journey/router.rb:43:in `block in serve'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/journey/router.rb:30:in `each'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/journey/router.rb:30:in `serve'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:802:in `call'
vendor/bundle/ruby/2.0.0/gems/bullet-5.0.0/lib/bullet/rack.rb:12:in `call'
vendor/bundle/ruby/2.0.0/gems/warden-1.2.6/lib/warden/manager.rb:35:in `block in call'
vendor/bundle/ruby/2.0.0/gems/warden-1.2.6/lib/warden/manager.rb:34:in `catch'
vendor/bundle/ruby/2.0.0/gems/warden-1.2.6/lib/warden/manager.rb:34:in `call'
vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/etag.rb:24:in `call'
vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/conditionalget.rb:38:in `call'
vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'
vendor/bundle/ruby/2.0.0/gems/remotipart-1.2.1/lib/remotipart/middleware.rb:27:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/flash.rb:260:in `call'
vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:225:in `context'
vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:220:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/cookies.rb:560:in `call'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/query_cache.rb:36:in `call'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:647:in `call'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/migration.rb:378:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:88:in `call'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:88:in `_run_callbacks'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in `_run_call_callbacks'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:81:in `run_callbacks'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/reloader.rb:73:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/rack/logger.rb:38:in `call_app'
vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/rack/logger.rb:20:in `block in call'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/tagged_logging.rb:68:in `block in tagged'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/tagged_logging.rb:26:in `tagged'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/tagged_logging.rb:68:in `tagged'
vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/rack/logger.rb:20:in `call'
vendor/bundle/ruby/2.0.0/gems/request_store-1.3.1/lib/request_store/middleware.rb:9:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/request_id.rb:21:in `call'
vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in `call'
vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/runtime.rb:18:in `call'
vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/lock.rb:17:in `call'
vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/static.rb:113:in `call'
vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/sendfile.rb:113:in `call'
vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/engine.rb:518:in `call'
vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/application.rb:164:in `call'
vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/content_length.rb:15:in `call'
vendor/bundle/ruby/2.0.0/gems/puma-3.7.1/lib/puma/configuration.rb:232:in `call'
vendor/bundle/ruby/2.0.0/gems/puma-3.7.1/lib/puma/server.rb:578:in `handle_request'
vendor/bundle/ruby/2.0.0/gems/puma-3.7.1/lib/puma/server.rb:415:in `process_client'
vendor/bundle/ruby/2.0.0/gems/puma-3.7.1/lib/puma/server.rb:275:in `block in run'
vendor/bundle/ruby/2.0.0/gems/puma-3.7.1/lib/puma/thread_pool.rb:120:in `call'
vendor/bundle/ruby/2.0.0/gems/puma-3.7.1/lib/puma/thread_pool.rb:120:in `block in spawn_thread'
Rendered vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/rescues/_source.erb (99.8ms)
Rendered vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/rescues/_trace.text.erb (1.9ms)
Rendered vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/rescues/_request_and_response.text.erb (1.8ms)
Rendered vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/rescues/diagnostics.text.erb (133.4ms)
--
Best regards!Nguyễn Văn Nam