Skip to content

Instantly share code, notes, and snippets.

@azuby
Created March 6, 2012 04:22
Show Gist options
  • Save azuby/1983445 to your computer and use it in GitHub Desktop.
Save azuby/1983445 to your computer and use it in GitHub Desktop.
puts Permission.exists?(action: action, resource: resource, access: access, resource_attribute: resource_attribute)
OUTPUT:
0000005be80c0 @name="updated_at", @sql_type="timestamp without time zone", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>], "privileges"=>[#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005d6ff10 @name="id", @sql_type="integer", @null=false, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005d6e1b0 @name="role_id", @sql_type="integer", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005d54620 @name="permission_id", @sql_type="integer", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005d53518 @name="created_at", @sql_type="timestamp without time zone", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005d52de8 @name="updated_at", @sql_type="timestamp without time zone", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>]}, @columns_hash={"permissions"=>{"id"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005dee950 @name="id", @sql_type="integer", @null=false, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, "action"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5f568 @name="action", @sql_type="character varying(255)", @null=true, @limit=255, @precision=nil, @scale=nil, @type=:string, @default=nil, @primary=nil, @coder=nil>, "resource"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5f310 @name="resource", @sql_type="character varying(255)", @null=true, @limit=255, @precision=nil, @scale=nil, @type=:string, @default=nil, @primary=nil, @coder=nil>, "resource_attribute"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5f0b8 @name="resource_attribute", @sql_type="character varying(255)", @null=true, @limit=255, @precision=nil, @scale=nil, @type=:string, @default=nil, @primary=nil, @coder=nil>, "access"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5ee60 @name="access", @sql_type="character varying(255)", @null=true, @limit=255, @precision=nil, @scale=nil, @type=:string, @default=nil, @primary=nil, @coder=nil>, "created_at"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5ec08 @name="created_at", @sql_type="timestamp without time zone", @null=false, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>, "updated_at"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5ea00 @name="updated_at", @sql_type="timestamp without time zone", @null=false, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>}, "roles"=>{"id"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be9d80 @name="id", @sql_type="integer", @null=false, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, "name"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be9830 @name="name", @sql_type="character varying(255)", @null=true, @limit=255, @precision=nil, @scale=nil, @type=:string, @default=nil, @primary=nil, @coder=nil>, "company_id"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be9498 @name="company_id", @sql_type="integer", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, "description"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be9088 @name="description", @sql_type="text", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:text, @default=nil, @primary=nil, @coder=nil>, "created_at"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be8660 @name="created_at", @sql_type="timestamp without time zone", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>, "updated_at"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be80c0 @name="updated_at", @sql_type="timestamp without time zone", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>}, "privileges"=>{"id"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005d6ff10 @name="id", @sql_type="integer", @null=false, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, "role_id"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005d6e1b0 @name="role_id", @sql_type="integer", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, "permission_id"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005d54620 @name="permission_id", @sql_type="integer", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, "created_at"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005d53518 @name="created_at", @sql_type="timestamp without time zone", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>, "updated_at"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005d52de8 @name="updated_at", @sql_type="timestamp without time zone", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>}}, @primary_keys={"permissions"=>"id", "roles"=>"id", "privileges"=>"id"}>, @visitor=#<Arel::Visitors::PostgreSQL:0x000000062fd4a0 @connection=#<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter:0x00000005ecb558 ...>, @schema_cache=#<ActiveRecord::ConnectionAdapters::SchemaCache:0x000000062fdec8 @connection=#<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter:0x00000005ecb558 ...>, @tables={"permissions"=>true, "roles"=>true, "privileges"=>true}, @columns={"permissions"=>[#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005dee950 @name="id", @sql_type="integer", @null=false, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5f568 @name="action", @sql_type="character varying(255)", @null=true, @limit=255, @precision=nil, @scale=nil, @type=:string, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5f310 @name="resource", @sql_type="character varying(255)", @null=true, @limit=255, @precision=nil, @scale=nil, @type=:string, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5f0b8 @name="resource_attribute", @sql_type="character varying(255)", @null=true, @limit=255, @precision=nil, @scale=nil, @type=:string, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5ee60 @name="access", @sql_type="character varying(255)", @null=true, @limit=255, @precision=nil, @scale=nil, @type=:string, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5ec08 @name="created_at", @sql_type="timestamp without time zone", @null=false, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5ea00 @name="updated_at", @sql_type="timestamp without time zone", @null=false, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>], "roles"=>[#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be9d80 @name="id", @sql_type="integer", @null=false, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be9830 @name="name", @sql_type="character varying(255)", @null=true, @limit=255, @precision=nil, @scale=nil, @type=:string, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be9498 @name="company_id", @sql_type="integer", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be9088 @name="description", @sql_type="text", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:text, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be8660 @name="created_at", @sql_type="timestamp without time zone", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be80c0 @name="updated_at", @sql_type="timestamp without time zone", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>], "privileges"=>[#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005d6ff10 @name="id", @sql_type="integer", @null=false, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005d6e1b0 @name="role_id", @sql_type="integer", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005d54620 @name="permission_id", @sql_type="integer", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005d53518 @name="created_at", @sql_type="timestamp without time zone", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005d52de8 @name="updated_at", @sql_type="timestamp without time zone", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>]}, @columns_hash={"permissions"=>{"id"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005dee950 @name="id", @sql_type="integer", @null=false, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, "action"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5f568 @name="action", @sql_type="character varying(255)", @null=true, @limit=255, @precision=nil, @scale=nil, @type=:string, @default=nil, @primary=nil, @coder=nil>, "resource"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5f310 @name="resource", @sql_type="character varying(255)", @null=true, @limit=255, @precision=nil, @scale=nil, @type=:string, @default=nil, @primary=nil, @coder=nil>, "resource_attribute"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5f0b8 @name="resource_attribute", @sql_type="character varying(255)", @null=true, @limit=255, @precision=nil, @scale=nil, @type=:string, @default=nil, @primary=nil, @coder=nil>, "access"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5ee60 @name="access", @sql_type="character varying(255)", @null=true, @limit=255, @precision=nil, @scale=nil, @type=:string, @default=nil, @primary=nil, @coder=nil>, "created_at"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5ec08 @name="created_at", @sql_type="timestamp without time zone", @null=false, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>, "updated_at"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5ea00 @name="updated_at", @sql_type="timestamp without time zone", @null=false, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>}, "roles"=>{"id"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be9d80 @name="id", @sql_type="integer", @null=false, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, "name"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be9830 @name="name", @sql_type="character varying(255)", @null=true, @limit=255, @precision=nil, @scale=nil, @type=:string, @default=nil, @primary=nil, @coder=nil>, "company_id"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be9498 @name="company_id", @sql_type="integer", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, "description"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be9088 @name="description", @sql_type="text", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:text, @default=nil, @primary=nil, @coder=nil>, "created_at"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be8660 @name="created_at", @sql_type="timestamp without time zone", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>, "updated_at"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be80c0 @name="updated_at", @sql_type="timestamp without time zone", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>}, "privileges"=>{"id"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005d6ff10 @name="id", @sql_type="integer", @null=false, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, "role_id"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005d6e1b0 @name="role_id", @sql_type="integer", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, "permission_id"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005d54620 @name="permission_id", @sql_type="integer", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, "created_at"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005d53518 @name="created_at", @sql_type="timestamp without time zone", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>, "updated_at"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005d52de8 @name="updated_at", @sql_type="timestamp without time zone", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>}}, @primary_keys={"permissions"=>"id", "roles"=>"id", "privileges"=>"id"}>, @quoted_tables={"permissions"=>"\"permissions\"", "roles"=>"\"roles\"", "privileges"=>"\"privileges\""}, @quoted_columns={"*"=>"*", :action=>"\"action\"", :resource=>"\"resource\"", :access=>"\"access\"", :name=>"\"name\"", :resource_attribute=>"\"resource_attribute\"", "access"=>"\"access\"", "action"=>"\"action\"", "created_at"=>"\"created_at\"", "resource"=>"\"resource\"", "resource_attribute"=>"\"resource_attribute\"", "updated_at"=>"\"updated_at\"", "permission_id"=>"\"permission_id\"", "id"=>"\"id\""}, @last_column=nil>, @config={:adapter=>"postgresql", :database=>"db/syncin_test", :username=>"adam", :password=>"8%9R52pg", :pool=>5, :timeout=>5000}, @connection_parameters=[nil, 5432, nil, nil, "db/syncin_test", "adam", "8%9R52pg"], @local_tz="UTC", @table_alias_length=nil, @statements=#<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::StatementPool:0x00000006165980 @connection=#<PG::Connection:0x000000062fd400>, @max=1000, @counter=4, @cache={23944=>{"\"$user\",public- SELECT COUNT(*)\n FROM pg_class c\n LEFT JOIN pg_namespace n ON n.oid = c.relnamespace\n WHERE c.relkind in ('v','r')\n AND c.relname = $1\n AND n.nspname = ANY (current_schemas(false))\n"=>"a1", "\"$user\",public- SELECT DISTINCT(attr.attname)\n FROM pg_attribute attr\n INNER JOIN pg_depend dep ON attr.attrelid = dep.refobjid AND attr.attnum = dep.refobjsubid\n INNER JOIN pg_constraint cons ON attr.attrelid = cons.conrelid AND attr.attnum = cons.conkey[1]\n WHERE cons.contype = 'p'\n AND dep.refobjid = $1::regclass\n"=>"a2", "\"$user\",public-INSERT INTO \"permissions\" (\"access\", \"action\", \"created_at\", \"resource\", \"resource_attribute\", \"updated_at\") VALUES ($1, $2, $3, $4, $5, $6) RETURNING \"id\""=>"a3", "\"$user\",public-DELETE FROM \"permissions\" WHERE \"permissions\".\"id\" = $1"=>"a4"}}>, @schema_search_path="\"$user\",public", @transaction_joinable=false, @_current_transaction_records=[[#<Permission id: 32, action: "make", resource: "Shift", resource_attribute: nil, access: "individual", created_at: "2012-03-06 04:06:44", updated_at: "2012-03-06 04:06:44">, #<Permission id: 1, action: "create", resource: "User", resource_attribute: nil, access: "none", created_at: "2012-03-06 01:55:18", updated_at: "2012-03-06 01:55:18">, #<Permission id: 2, action: "read", resource: "User", resource_attribute: nil, access: "individual", created_at: "2012-03-06 01:55:19", updated_at: "2012-03-06 01:55:19">, #<Permission id: 3, action: "update", resource: "User", resource_attribute: nil, access: "individual", created_at: "2012-03-06 01:55:19", updated_at: "2012-03-06 01:55:19">, #<Permission id: 4, action: "destroy", resource: "User", resource_attribute: nil, access: "individual", created_at: "2012-03-06 01:55:19", updated_at: "2012-03-06 01:55:19">, #<Permission id: 5, action: "create", resource: "Shift", resource_attribute: nil, access: "none", created_at: "2012-03-06 01:55:19", updated_at: "2012-03-06 01:55:19">, #<Permission id: 6, action: "index", resource: "Shift", resource_attribute: nil, access: "individual", created_at: "2012-03-06 01:55:19", updated_at: "2012-03-06 01:55:19">, #<Permission id: 7, action: "show", resource: "Shift", resource_attribute: nil, access: "individual", created_at: "2012-03-06 01:55:19", updated_at: "2012-03-06 01:55:19">, #<Permission id: 8, action: "update", resource: "Shift", resource_attribute: nil, access: "individual", created_at: "2012-03-06 01:55:19", updated_at: "2012-03-06 01:55:19">, #<Permission id: 9, action: "destroy", resource: "Shift", resource_attribute: nil, access: "individual", created_at: "2012-03-06 01:55:19", updated_at: "2012-03-06 01:55:19">, #<Permission id: 10, action: "create", resource: "Job", resource_attribute: nil, access: "none", created_at: "2012-03-06 01:55:19", updated_at: "2012-03-06 01:55:19">, #<Permission id: 11, action: "read", resource: "Job", resource_attribute: nil, access: "company", created_at: "2012-03-06 01:55:19", updated_at: "2012-03-06 01:55:19">, #<Permission id: 12, action: "update", resource: "Job", resource_attribute: nil, access: "company", created_at: "2012-03-06 01:55:19", updated_at: "2012-03-06 01:55:19">, #<Permission id: 13, action: "destroy", resource: "Job", resource_attribute: nil, access: "company", created_at: "2012-03-06 01:55:19", updated_at: "2012-03-06 01:55:19">, #<Permission id: 33, action: "make", resource: "Shift", resource_attribute: nil, access: "individual", created_at: "2012-03-06 04:06:44", updated_at: "2012-03-06 04:06:44">]]>], @loaded_fixtures={}, @attr={:action=>"make", :resource=>"Shift", :access=>"individual"}>, @around_hooks=[]>, @fixture_cache={}, @fixture_connections=[#<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter:0x00000005ecb558 @mon_owner=nil, @mon_count=0, @mon_mutex=#<Mutex:0x00000005ecb468>, @active=nil, @connection=#<PG::Connection:0x000000062fd400>, @in_use=true, @instrumenter=#<ActiveSupport::Notifications::Instrumenter:0x000000062fe968 @id="84b21d0ddb8a083a6b1f", @notifier=#<ActiveSupport::Notifications::Fanout:0x00000002de7c98 @subscribers=[#<ActiveSupport::Notifications::Fanout::Subscriber:0x00000002a8c558 @pattern="sql.active_record", @delegate=#<ActiveRecord::LogSubscriber:0x00000002a8c850 @odd_or_even=false>>, #<ActiveSupport::Notifications::Fanout::Subscriber:0x00000002a8c418 @pattern="identity.active_record", @delegate=#<ActiveRecord::LogSubscriber:0x00000002a8c850 @odd_or_even=false>>, #<ActiveSupport::Notifications::Fanout::Subscriber:0x00000002a8c198 @pattern="odd?.active_record", @delegate=#<ActiveRecord::LogSubscriber:0x00000002a8c850 @odd_or_even=false>>, #<ActiveSupport::Notifications::Fanout::Subscriber:0x00000002a8bf90 @pattern="logger.active_record", @delegate=#<ActiveRecord::LogSubscriber:0x00000002a8c850 @odd_or_even=false>>, #<ActiveSupport::Notifications::Fanout::Subscriber:0x00000002a6b588 @pattern="sql.active_record", @delegate=#<ActiveRecord::ExplainSubscriber:0x00000002a6b5d8>>, #<ActiveSupport::Notifications::Fanout::Subscriber:0x000000028f6090 @pattern="start_processing.action_controller", @delegate=#<ActionController::LogSubscriber:0x000000028f6748>>, #<ActiveSupport::Notifications::Fanout::Subscriber:0x000000028f5ed8 @pattern="process_action.action_controller", @delegate=#<ActionController::LogSubscriber:0x000000028f6748>>, #<ActiveSupport::Notifications::Fanout::Subscriber:0x000000028e9750 @pattern="halted_callback.action_controller", @delegate=#<ActionController::LogSubscriber:0x000000028f6748>>, #<ActiveSupport::Notifications::Fanout::Subscriber:0x000000028e8e18 @pattern="send_file.action_controller", @delegate=#<ActionController::LogSubscriber:0x000000028f6748>>, #<ActiveSupport::Notifications::Fanout::Subscriber:0x000000028e84e0 @pattern="redirect_to.action_controller", @delegate=#<ActionController::LogSubscriber:0x000000028f6748>>, #<ActiveSupport::Notifications::Fanout::Subscriber:0x000000028e8030 @pattern="send_data.action_controller", @delegate=#<ActionController::LogSubscriber:0x000000028f6748>>, #<ActiveSupport::Notifications::Fanout::Subscriber:0x000000028e7b08 @pattern="write_fragment.action_controller", @delegate=#<ActionController::LogSubscriber:0x000000028f6748>>, #<ActiveSupport::Notifications::Fanout::Subscriber:0x000000028e7680 @pattern="read_fragment.action_controller", @delegate=#<ActionController::LogSubscriber:0x000000028f6748>>, #<ActiveSupport::Notifications::Fanout::Subscriber:0x000000028e7108 @pattern="exist_fragment?.action_controller", @delegate=#<ActionController::LogSubscriber:0x000000028f6748>>, #<ActiveSupport::Notifications::Fanout::Subscriber:0x000000028e6370 @pattern="expire_fragment.action_controller", @delegate=#<ActionController::LogSubscriber:0x000000028f6748>>, #<ActiveSupport::Notifications::Fanout::Subscriber:0x000000028e6208 @pattern="expire_page.action_controller", @delegate=#<ActionController::LogSubscriber:0x000000028f6748>>, #<ActiveSupport::Notifications::Fanout::Subscriber:0x000000028e19d8 @pattern="write_page.action_controller", @delegate=#<ActionController::LogSubscriber:0x000000028f6748>>, #<ActiveSupport::Notifications::Fanout::Subscriber:0x000000028e15a0 @pattern="logger.action_controller", @delegate=#<ActionController::LogSubscriber:0x000000028f6748>>, #<ActiveSupport::Notifications::Fanout::Subscriber:0x00000003472db0 @pattern="render_template.action_view", @delegate=#<ActionView::LogSubscriber:0x00000003472f40>>, #<ActiveSupport::Notifications::Fanout::Subscriber:0x00000003472c70 @pattern="render_partial.action_view", @delegate=#<ActionView::LogSubscriber:0x00000003472f40>>, #<ActiveSupport::Notifications::Fanout::Subscriber:0x00000003472a18 @pattern="render_collection.action_view", @delegate=#<ActionView::LogSubscriber:0x00000003472f40>>, #<ActiveSupport::Notifications::Fanout::Subscriber:0x000000034728d8 @pattern="logger.action_view", @delegate=#<ActionView::LogSubscriber:0x00000003472f40>>, #<ActiveSupport::Notifications::Fanout::Subscriber:0x000000062fd518 @pattern="deliver.action_mailer", @delegate=#<ActionMailer::LogSubscriber:0x000000062fd7c0>>, #<ActiveSupport::Notifications::Fanout::Subscriber:0x000000062fd3d8 @pattern="receive.action_mailer", @delegate=#<ActionMailer::LogSubscriber:0x000000062fd7c0>>, #<ActiveSupport::Notifications::Fanout::Subscriber:0x000000062fcfc8 @pattern="logger.action_mailer", @delegate=#<ActionMailer::LogSubscriber:0x000000062fd7c0>>], @listeners_for={"sql.active_record"=>[#<ActiveSupport::Notifications::Fanout::Subscriber:0x00000002a8c558 @pattern="sql.active_record", @delegate=#<ActiveRecord::LogSubscriber:0x00000002a8c850 @odd_or_even=false>>, #<ActiveSupport::Notifications::Fanout::Subscriber:0x00000002a6b588 @pattern="sql.active_record", @delegate=#<ActiveRecord::ExplainSubscriber:0x00000002a6b5d8>>]}>>, @last_use=2012-03-05 20:06:44 -0800, @logger=#<ActiveSupport::TaggedLogging:0x00000004d9a018 @logger=#<ActiveSupport::BufferedLogger:0x00000004d9a220 @level=0, @log_dest=#<File:/home/adam/sites/syncin/log/test.log>, @log=#<Logger:0x00000004d9a1d0 @progname=nil, @level=0, @default_formatter=#<Logger::Formatter:0x00000004d9a158 @datetime_format=nil>, @formatter=#<Logger::SimpleFormatter:0x00000004d9a040 @datetime_format=nil>, @logdev=#<Logger::LogDevice:0x00000004d9a108 @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<File:/home/adam/sites/syncin/log/test.log>, @mutex=#<Logger::LogDevice::LogDeviceMutex:0x00000004d9a0b8 @mon_owner=nil, @mon_count=0, @mon_mutex=#<Mutex:0x00000004d9a068>>>>>, @tags={#<Thread:0x000000016c01c8 run>=>[]}>, @open_transactions=1, @pool=#<ActiveRecord::ConnectionAdapters::ConnectionPool:0x00000004c69ec8 @mon_owner=nil, @mon_count=0, @mon_mutex=#<Mutex:0x00000004c69ce8>, @spec=#<ActiveRecord::Base::ConnectionSpecification:0x00000004d1b3a8 @config={:adapter=>"postgresql", :database=>"db/syncin_test", :username=>"adam", :password=>"8%9R52pg", :pool=>5, :timeout=>5000}, @adapter_method="postgresql_connection">, @reserved_connections={11927780=>#<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter:0x00000005ecb558 ...>}, @queue=#<MonitorMixin::ConditionVariable:0x00000004c69770 @monitor=#<ActiveRecord::ConnectionAdapters::ConnectionPool:0x00000004c69ec8 ...>, @cond=#<ConditionVariable:0x00000004c69590 @waiters=[], @waiters_mutex=#<Mutex:0x00000004c694c8>>>, @timeout=5, @size=5, @connections=[#<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter:0x00000005ecb558 ...>], @automatic_reconnect=true>, @query_cache={}, @query_cache_enabled=false, @schema_cache=#<ActiveRecord::ConnectionAdapters::SchemaCache:0x000000062fdec8 @connection=#<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter:0x00000005ecb558 ...>, @tables={"permissions"=>true, "roles"=>true, "privileges"=>true}, @columns={"permissions"=>[#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005dee950 @name="id", @sql_type="integer", @null=false, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5f568 @name="action", @sql_type="character varying(255)", @null=true, @limit=255, @precision=nil, @scale=nil, @type=:string, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5f310 @name="resource", @sql_type="character varying(255)", @null=true, @limit=255, @precision=nil, @scale=nil, @type=:string, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5f0b8 @name="resource_attribute", @sql_type="character varying(255)", @null=true, @limit=255, @precision=nil, @scale=nil, @type=:string, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5ee60 @name="access", @sql_type="character varying(255)", @null=true, @limit=255, @precision=nil, @scale=nil, @type=:string, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5ec08 @name="created_at", @sql_type="timestamp without time zone", @null=false, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5ea00 @name="updated_at", @sql_type="timestamp without time zone", @null=false, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>], "roles"=>[#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be9d80 @name="id", @sql_type="integer", @null=false, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be9830 @name="name", @sql_type="character varying(255)", @null=true, @limit=255, @precision=nil, @scale=nil, @type=:string, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be9498 @name="company_id", @sql_type="integer", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be9088 @name="description", @sql_type="text", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:text, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be8660 @name="created_at", @sql_type="timestamp without time zone", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be80c0 @name="updated_at", @sql_type="timestamp without time zone", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>], "privileges"=>[#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005d6ff10 @name="id", @sql_type="integer", @null=false, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005d6e1b0 @name="role_id", @sql_type="integer", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005d54620 @name="permission_id", @sql_type="integer", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005d53518 @name="created_at", @sql_type="timestamp without time zone", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>, #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005d52de8 @name="updated_at", @sql_type="timestamp without time zone", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>]}, @columns_hash={"permissions"=>{"id"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005dee950 @name="id", @sql_type="integer", @null=false, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, "action"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5f568 @name="action", @sql_type="character varying(255)", @null=true, @limit=255, @precision=nil, @scale=nil, @type=:string, @default=nil, @primary=nil, @coder=nil>, "resource"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5f310 @name="resource", @sql_type="character varying(255)", @null=true, @limit=255, @precision=nil, @scale=nil, @type=:string, @default=nil, @primary=nil, @coder=nil>, "resource_attribute"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5f0b8 @name="resource_attribute", @sql_type="character varying(255)", @null=true, @limit=255, @precision=nil, @scale=nil, @type=:string, @default=nil, @primary=nil, @coder=nil>, "access"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5ee60 @name="access", @sql_type="character varying(255)", @null=true, @limit=255, @precision=nil, @scale=nil, @type=:string, @default=nil, @primary=nil, @coder=nil>, "created_at"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5ec08 @name="created_at", @sql_type="timestamp without time zone", @null=false, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>, "updated_at"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000006f5ea00 @name="updated_at", @sql_type="timestamp without time zone", @null=false, @limit=nil, @precision=nil, @scale=nil, @type=:datetime, @default=nil, @primary=nil, @coder=nil>}, "roles"=>{"id"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be9d80 @name="id", @sql_type="integer", @null=false, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, "name"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be9830 @name="name", @sql_type="character varying(255)", @null=true, @limit=255, @precision=nil, @scale=nil, @type=:string, @default=nil, @primary=nil, @coder=nil>, "company_id"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be9498 @name="company_id", @sql_type="integer", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:integer, @default=nil, @primary=nil, @coder=nil>, "description"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be9088 @name="description", @sql_type="text", @null=true, @limit=nil, @precision=nil, @scale=nil, @type=:text, @default=nil, @primary=nil, @coder=nil>, "created_at"=>#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x00000005be8660 @name="created_at", @sql_type="timestamp without ......
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment