mirror of
https://github.com/github/rails.git
synced 2026-01-09 14:48:01 -05:00
Remove extra white spaces on ActiveRecord docs.
This commit is contained in:
@@ -176,7 +176,7 @@ module ActiveRecord
|
||||
# order in which mappings are defined determine the order in which attributes are sent to the
|
||||
# value class constructor.
|
||||
# * <tt>:allow_nil</tt> - Specifies that the value object will not be instantiated when all mapped
|
||||
# attributes are +nil+. Setting the value object to +nil+ has the effect of writing +nil+ to all
|
||||
# attributes are +nil+. Setting the value object to +nil+ has the effect of writing +nil+ to all
|
||||
# mapped attributes.
|
||||
# This defaults to +false+.
|
||||
# * <tt>:constructor</tt> - A symbol specifying the name of the constructor method or a Proc that
|
||||
|
||||
@@ -126,7 +126,7 @@ module ActiveRecord
|
||||
record
|
||||
end
|
||||
|
||||
# Add +records+ to this association. Returns +self+ so method calls may be chained.
|
||||
# Add +records+ to this association. Returns +self+ so method calls may be chained.
|
||||
# Since << flattens its argument list and inserts each record, +push+ and +concat+ behave identically.
|
||||
def concat(*records)
|
||||
result = true
|
||||
|
||||
@@ -18,7 +18,7 @@ module ActiveRecord
|
||||
#
|
||||
# If the association has a counter cache it gets that value. Otherwise
|
||||
# it will attempt to do a count via SQL, bounded to <tt>:limit</tt> if
|
||||
# there's one. Some configuration options like :group make it impossible
|
||||
# there's one. Some configuration options like :group make it impossible
|
||||
# to do an SQL count, in those cases the array count will be used.
|
||||
#
|
||||
# That does not depend on whether the collection has already been loaded
|
||||
|
||||
@@ -58,7 +58,7 @@ module ActiveRecord
|
||||
generated_attribute_methods.module_eval("def _#{attr_name}; #{access_code}; end; alias #{attr_name} _#{attr_name}", __FILE__, __LINE__)
|
||||
end
|
||||
|
||||
# Define an attribute reader method. Cope with nil column.
|
||||
# Define an attribute reader method. Cope with nil column.
|
||||
# method_name is the same as attr_name except when a non-standard primary key is used,
|
||||
# we still define #id as an accessor for the key
|
||||
def define_read_method(method_name, attr_name, column)
|
||||
|
||||
@@ -161,7 +161,7 @@ module ActiveRecord
|
||||
#
|
||||
# For performance reasons, we don't check whether to validate at runtime.
|
||||
# However the validation and callback methods are lazy and those methods
|
||||
# get created when they are invoked for the very first time. However,
|
||||
# get created when they are invoked for the very first time. However,
|
||||
# this can change, for instance, when using nested attributes, which is
|
||||
# called _after_ the association has been defined. Since we don't want
|
||||
# the callbacks to get defined multiple times, there are guards that
|
||||
|
||||
@@ -165,7 +165,7 @@ module ActiveRecord
|
||||
checkin conn if conn
|
||||
end
|
||||
|
||||
# If a connection already exists yield it to the block. If no connection
|
||||
# If a connection already exists yield it to the block. If no connection
|
||||
# exists checkout a connection, yield it to the block, and checkin the
|
||||
# connection when finished.
|
||||
def with_connection
|
||||
|
||||
@@ -42,7 +42,7 @@ module ActiveRecord
|
||||
undef_method :execute
|
||||
|
||||
# Executes +sql+ statement in the context of this connection using
|
||||
# +binds+ as the bind substitutes. +name+ is logged along with
|
||||
# +binds+ as the bind substitutes. +name+ is logged along with
|
||||
# the executed +sql+ statement.
|
||||
def exec_query(sql, name = 'SQL', binds = [])
|
||||
end
|
||||
@@ -276,7 +276,7 @@ module ActiveRecord
|
||||
|
||||
# Set the sequence to the max value of the table's column.
|
||||
def reset_sequence!(table, column, sequence = nil)
|
||||
# Do nothing by default. Implement for PostgreSQL, Oracle, ...
|
||||
# Do nothing by default. Implement for PostgreSQL, Oracle, ...
|
||||
end
|
||||
|
||||
# Inserts the given fixture into the table. Overridden in adapters that require
|
||||
|
||||
@@ -4,7 +4,7 @@ module ActiveRecord
|
||||
module ConnectionAdapters # :nodoc:
|
||||
module SchemaStatements
|
||||
# Returns a Hash of mappings from the abstract data types to the native
|
||||
# database types. See TableDefinition#column for details on the recognized
|
||||
# database types. See TableDefinition#column for details on the recognized
|
||||
# abstract data types.
|
||||
def native_database_types
|
||||
{}
|
||||
@@ -78,7 +78,7 @@ module ActiveRecord
|
||||
# Creates a new table with the name +table_name+. +table_name+ may either
|
||||
# be a String or a Symbol.
|
||||
#
|
||||
# There are two ways to work with +create_table+. You can use the block
|
||||
# There are two ways to work with +create_table+. You can use the block
|
||||
# form or the regular form, like this:
|
||||
#
|
||||
# === Block form
|
||||
@@ -299,7 +299,7 @@ module ActiveRecord
|
||||
raise NotImplementedError, "rename_column is not implemented"
|
||||
end
|
||||
|
||||
# Adds a new index to the table. +column_name+ can be a single Symbol, or
|
||||
# Adds a new index to the table. +column_name+ can be a single Symbol, or
|
||||
# an Array of Symbols.
|
||||
#
|
||||
# The index will be named after the table and the first column name,
|
||||
|
||||
@@ -407,7 +407,7 @@ module ActiveRecord
|
||||
|
||||
def exec_without_stmt(sql, name = 'SQL') # :nodoc:
|
||||
# Some queries, like SHOW CREATE TABLE don't work through the prepared
|
||||
# statement API. For those queries, we need to use this method. :'(
|
||||
# statement API. For those queries, we need to use this method. :'(
|
||||
log(sql, name) do
|
||||
result = @connection.query(sql)
|
||||
cols = []
|
||||
@@ -833,7 +833,7 @@ module ActiveRecord
|
||||
stmt.execute(*binds.map { |col, val| type_cast(val, col) })
|
||||
rescue Mysql::Error => e
|
||||
# Older versions of MySQL leave the prepared statement in a bad
|
||||
# place when an error occurs. To support older mysql versions, we
|
||||
# place when an error occurs. To support older mysql versions, we
|
||||
# need to close the statement and delete the statement from the
|
||||
# cache.
|
||||
stmt.close
|
||||
|
||||
@@ -199,7 +199,7 @@ module ActiveRecord
|
||||
# * <tt>:password</tt> - Defaults to nothing.
|
||||
# * <tt>:database</tt> - The name of the database. No default, must be provided.
|
||||
# * <tt>:schema_search_path</tt> - An optional schema search path for the connection given
|
||||
# as a string of comma-separated schema names. This is backward-compatible with the <tt>:schema_order</tt> option.
|
||||
# as a string of comma-separated schema names. This is backward-compatible with the <tt>:schema_order</tt> option.
|
||||
# * <tt>:encoding</tt> - An optional client encoding that is used in a <tt>SET client_encoding TO
|
||||
# <encoding></tt> call on the connection.
|
||||
# * <tt>:min_messages</tt> - An optional client min messages that is used in a
|
||||
@@ -619,7 +619,7 @@ module ActiveRecord
|
||||
create_database(name)
|
||||
end
|
||||
|
||||
# Create a new PostgreSQL database. Options include <tt>:owner</tt>, <tt>:template</tt>,
|
||||
# Create a new PostgreSQL database. Options include <tt>:owner</tt>, <tt>:template</tt>,
|
||||
# <tt>:encoding</tt>, <tt>:tablespace</tt>, and <tt>:connection_limit</tt> (note that MySQL uses
|
||||
# <tt>:charset</tt> while PostgreSQL uses <tt>:encoding</tt>).
|
||||
#
|
||||
|
||||
@@ -2,7 +2,7 @@ module ActiveRecord
|
||||
# = Active Record Counter Cache
|
||||
module CounterCache
|
||||
# Resets one or more counter caches to their correct value using an SQL
|
||||
# count query. This is useful when adding new counter caches, or if the
|
||||
# count query. This is useful when adding new counter caches, or if the
|
||||
# counter has been corrupted or modified directly by SQL.
|
||||
#
|
||||
# ==== Parameters
|
||||
|
||||
@@ -54,14 +54,14 @@ class FixturesFileNotFound < StandardError; end
|
||||
# name: Google
|
||||
# url: http://www.google.com
|
||||
#
|
||||
# This YAML fixture file includes two fixtures. Each YAML fixture (ie. record) is given a name and is followed by an
|
||||
# indented list of key/value pairs in the "key: value" format. Records are separated by a blank line for your viewing
|
||||
# This YAML fixture file includes two fixtures. Each YAML fixture (ie. record) is given a name and is followed by an
|
||||
# indented list of key/value pairs in the "key: value" format. Records are separated by a blank line for your viewing
|
||||
# pleasure.
|
||||
#
|
||||
# Note that YAML fixtures are unordered. If you want ordered fixtures, use the omap YAML type.
|
||||
# See http://yaml.org/type/omap.html
|
||||
# for the specification. You will need ordered fixtures when you have foreign key constraints on keys in the same table.
|
||||
# This is commonly needed for tree structures. Example:
|
||||
# for the specification. You will need ordered fixtures when you have foreign key constraints on keys in the same table.
|
||||
# This is commonly needed for tree structures. Example:
|
||||
#
|
||||
# --- !omap
|
||||
# - parent:
|
||||
@@ -75,7 +75,7 @@ class FixturesFileNotFound < StandardError; end
|
||||
#
|
||||
# = Using fixtures in testcases
|
||||
#
|
||||
# Since fixtures are a testing construct, we use them in our unit and functional tests. There are two ways to use the
|
||||
# Since fixtures are a testing construct, we use them in our unit and functional tests. There are two ways to use the
|
||||
# fixtures, but first let's take a look at a sample unit test:
|
||||
#
|
||||
# require 'test_helper'
|
||||
@@ -558,7 +558,7 @@ module ActiveRecord
|
||||
fixtures.size
|
||||
end
|
||||
|
||||
# Return a hash of rows to be inserted. The key is the table, the value is
|
||||
# Return a hash of rows to be inserted. The key is the table, the value is
|
||||
# a list of rows to insert to that table.
|
||||
def table_rows
|
||||
now = ActiveRecord::Base.default_timezone == :utc ? Time.now.utc : Time.now
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module ActiveRecord
|
||||
class Migration
|
||||
# ActiveRecord::Migration::CommandRecorder records commands done during
|
||||
# a migration and knows how to reverse those commands. The CommandRecorder
|
||||
# a migration and knows how to reverse those commands. The CommandRecorder
|
||||
# knows how to invert the following commands:
|
||||
#
|
||||
# * add_column
|
||||
@@ -20,7 +20,7 @@ module ActiveRecord
|
||||
@delegate = delegate
|
||||
end
|
||||
|
||||
# record +command+. +command+ should be a method name and arguments.
|
||||
# record +command+. +command+ should be a method name and arguments.
|
||||
# For example:
|
||||
#
|
||||
# recorder.record(:method_name, [:arg1, arg2])
|
||||
@@ -29,7 +29,7 @@ module ActiveRecord
|
||||
end
|
||||
|
||||
# Returns a list that represents commands that are the inverse of the
|
||||
# commands stored in +commands+. For example:
|
||||
# commands stored in +commands+. For example:
|
||||
#
|
||||
# recorder.record(:rename_table, [:old, :new])
|
||||
# recorder.inverse # => [:rename_table, [:new, :old]]
|
||||
|
||||
@@ -380,7 +380,7 @@ module ActiveRecord
|
||||
class ThroughReflection < AssociationReflection #:nodoc:
|
||||
delegate :foreign_key, :foreign_type, :association_foreign_key, :active_record_primary_key, :to => :source_reflection
|
||||
|
||||
# Gets the source of the through reflection. It checks both a singularized
|
||||
# Gets the source of the through reflection. It checks both a singularized
|
||||
# and pluralized form for <tt>:belongs_to</tt> or <tt>:has_many</tt>.
|
||||
#
|
||||
# class Post < ActiveRecord::Base
|
||||
|
||||
@@ -287,7 +287,7 @@ module ActiveRecord
|
||||
end
|
||||
|
||||
# Destroy an object (or multiple objects) that has the given id, the object is instantiated first,
|
||||
# therefore all callbacks and filters are fired off before the object is deleted. This method is
|
||||
# therefore all callbacks and filters are fired off before the object is deleted. This method is
|
||||
# less efficient than ActiveRecord#delete but allows cleanup methods and other actions to be run.
|
||||
#
|
||||
# This essentially finds the object (or multiple objects) with the given id, creates a new object
|
||||
@@ -316,7 +316,7 @@ module ActiveRecord
|
||||
# Deletes the records matching +conditions+ without instantiating the records first, and hence not
|
||||
# calling the +destroy+ method nor invoking callbacks. This is a single SQL DELETE statement that
|
||||
# goes straight to the database, much more efficient than +destroy_all+. Be careful with relations
|
||||
# though, in particular <tt>:dependent</tt> rules defined on associations are not honored. Returns
|
||||
# though, in particular <tt>:dependent</tt> rules defined on associations are not honored. Returns
|
||||
# the number of rows affected.
|
||||
#
|
||||
# ==== Parameters
|
||||
|
||||
@@ -66,7 +66,7 @@ module ActiveRecord
|
||||
calculate(:average, column_name, options)
|
||||
end
|
||||
|
||||
# Calculates the minimum value on a given column. The value is returned
|
||||
# Calculates the minimum value on a given column. The value is returned
|
||||
# with the same data type of the column, or +nil+ if there's no row. See
|
||||
# +calculate+ for examples with options.
|
||||
#
|
||||
@@ -93,7 +93,7 @@ module ActiveRecord
|
||||
calculate(:sum, column_name, options)
|
||||
end
|
||||
|
||||
# This calculates aggregate values in the given column. Methods for count, sum, average,
|
||||
# This calculates aggregate values in the given column. Methods for count, sum, average,
|
||||
# minimum, and maximum have been added as shortcuts. Options such as <tt>:conditions</tt>,
|
||||
# <tt>:order</tt>, <tt>:group</tt>, <tt>:having</tt>, and <tt>:joins</tt> can be passed to customize the query.
|
||||
#
|
||||
@@ -101,7 +101,7 @@ module ActiveRecord
|
||||
# * Single aggregate value: The single value is type cast to Fixnum for COUNT, Float
|
||||
# for AVG, and the given column's type for everything else.
|
||||
# * Grouped values: This returns an ordered hash of the values and groups them by the
|
||||
# <tt>:group</tt> option. It takes either a column name, or the name of a belongs_to association.
|
||||
# <tt>:group</tt> option. It takes either a column name, or the name of a belongs_to association.
|
||||
#
|
||||
# values = Person.maximum(:age, :group => 'last_name')
|
||||
# puts values["Drake"]
|
||||
@@ -119,7 +119,7 @@ module ActiveRecord
|
||||
# Options:
|
||||
# * <tt>:conditions</tt> - An SQL fragment like "administrator = 1" or [ "user_name = ?", username ].
|
||||
# See conditions in the intro to ActiveRecord::Base.
|
||||
# * <tt>:include</tt>: Eager loading, see Associations for details. Since calculations don't load anything,
|
||||
# * <tt>:include</tt>: Eager loading, see Associations for details. Since calculations don't load anything,
|
||||
# the purpose of this is to access fields on joined tables in your conditions, order, or group clauses.
|
||||
# * <tt>:joins</tt> - An SQL fragment for additional joins like "LEFT JOIN comments ON comments.post_id = id".
|
||||
# (Rarely needed).
|
||||
|
||||
@@ -83,7 +83,7 @@ module ActiveRecord
|
||||
#
|
||||
# Example for find with a lock: Imagine two concurrent transactions:
|
||||
# each will read <tt>person.visits == 2</tt>, add 1 to it, and save, resulting
|
||||
# in two saves of <tt>person.visits = 3</tt>. By locking the row, the second
|
||||
# in two saves of <tt>person.visits = 3</tt>. By locking the row, the second
|
||||
# transaction has to wait until the first is finished; we get the
|
||||
# expected <tt>person.visits == 4</tt>.
|
||||
#
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module ActiveRecord
|
||||
###
|
||||
# This class encapsulates a Result returned from calling +exec_query+ on any
|
||||
# database connection adapter. For example:
|
||||
# database connection adapter. For example:
|
||||
#
|
||||
# x = ActiveRecord::Base.connection.exec_query('SELECT * FROM foo')
|
||||
# x # => #<ActiveRecord::Result:0xdeadbeef>
|
||||
|
||||
@@ -106,7 +106,7 @@ HEADER
|
||||
spec = {}
|
||||
spec[:name] = column.name.inspect
|
||||
|
||||
# AR has an optimisation which handles zero-scale decimals as integers. This
|
||||
# AR has an optimisation which handles zero-scale decimals as integers. This
|
||||
# code ensures that the dumper still dumps the column as a decimal.
|
||||
spec[:type] = if column.type == :integer && [/^numeric/, /^decimal/].any? { |e| e.match(column.sql_type) }
|
||||
'decimal'
|
||||
|
||||
@@ -75,7 +75,7 @@ module ActiveRecord #:nodoc:
|
||||
# </firm>
|
||||
#
|
||||
# Additionally, the record being serialized will be passed to a Proc's second
|
||||
# parameter. This allows for ad hoc additions to the resultant document that
|
||||
# parameter. This allows for ad hoc additions to the resultant document that
|
||||
# incorporate the context of the record being serialized. And by leveraging the
|
||||
# closure created by a Proc, to_xml can be used to add elements that normally fall
|
||||
# outside of the scope of the model -- for example, generating and appending URLs
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module ActiveRecord
|
||||
# = Active Record Session Store
|
||||
#
|
||||
# A session store backed by an Active Record class. A default class is
|
||||
# A session store backed by an Active Record class. A default class is
|
||||
# provided, but any object duck-typing to an Active Record Session class
|
||||
# with text +session_id+ and +data+ attributes is sufficient.
|
||||
#
|
||||
@@ -23,7 +23,7 @@ module ActiveRecord
|
||||
# ActiveRecord::SessionStore::Session.data_column_name = 'legacy_session_data'
|
||||
#
|
||||
# Note that setting the primary key to the +session_id+ frees you from
|
||||
# having a separate +id+ column if you don't want it. However, you must
|
||||
# having a separate +id+ column if you don't want it. However, you must
|
||||
# set <tt>session.model.id = session.session_id</tt> by hand! A before filter
|
||||
# on ApplicationController is a good place.
|
||||
#
|
||||
@@ -46,7 +46,7 @@ module ActiveRecord
|
||||
# save
|
||||
# destroy
|
||||
#
|
||||
# The example SqlBypass class is a generic SQL session store. You may
|
||||
# The example SqlBypass class is a generic SQL session store. You may
|
||||
# use it as a basis for high-performance database-specific stores.
|
||||
class SessionStore < ActionDispatch::Session::AbstractStore
|
||||
module ClassMethods # :nodoc:
|
||||
@@ -79,7 +79,7 @@ module ActiveRecord
|
||||
|
||||
##
|
||||
# :singleton-method:
|
||||
# Customizable data column name. Defaults to 'data'.
|
||||
# Customizable data column name. Defaults to 'data'.
|
||||
cattr_accessor :data_column_name
|
||||
self.data_column_name = 'data'
|
||||
|
||||
@@ -161,12 +161,12 @@ module ActiveRecord
|
||||
end
|
||||
|
||||
# A barebones session store which duck-types with the default session
|
||||
# store but bypasses Active Record and issues SQL directly. This is
|
||||
# store but bypasses Active Record and issues SQL directly. This is
|
||||
# an example session model class meant as a basis for your own classes.
|
||||
#
|
||||
# The database connection, table name, and session id and data columns
|
||||
# are configurable class attributes. Marshaling and unmarshaling
|
||||
# are implemented as class methods that you may override. By default,
|
||||
# are configurable class attributes. Marshaling and unmarshaling
|
||||
# are implemented as class methods that you may override. By default,
|
||||
# marshaling data is
|
||||
#
|
||||
# ActiveSupport::Base64.encode64(Marshal.dump(data))
|
||||
@@ -176,7 +176,7 @@ module ActiveRecord
|
||||
# Marshal.load(ActiveSupport::Base64.decode64(data))
|
||||
#
|
||||
# This marshaling behavior is intended to store the widest range of
|
||||
# binary session data in a +text+ column. For higher performance,
|
||||
# binary session data in a +text+ column. For higher performance,
|
||||
# store in a +blob+ column instead and forgo the Base64 encoding.
|
||||
class SqlBypass
|
||||
extend ClassMethods
|
||||
@@ -286,7 +286,7 @@ module ActiveRecord
|
||||
end
|
||||
end
|
||||
|
||||
# The class used for session storage. Defaults to
|
||||
# The class used for session storage. Defaults to
|
||||
# ActiveRecord::SessionStore::Session
|
||||
cattr_accessor :session_class
|
||||
self.session_class = Session
|
||||
|
||||
@@ -13,7 +13,7 @@ module ActiveRecord
|
||||
ActiveRecord::IdentityMap.clear
|
||||
end
|
||||
|
||||
# Backport skip to Ruby 1.8. test/unit doesn't support it, so just
|
||||
# Backport skip to Ruby 1.8. test/unit doesn't support it, so just
|
||||
# make it a noop.
|
||||
unless instance_methods.map(&:to_s).include?("skip")
|
||||
def skip(message)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module ActiveRecord
|
||||
# = Active Record RecordInvalid
|
||||
#
|
||||
# Raised by <tt>save!</tt> and <tt>create!</tt> when the record is invalid. Use the
|
||||
# Raised by <tt>save!</tt> and <tt>create!</tt> when the record is invalid. Use the
|
||||
# +record+ method to retrieve the record which did not validate.
|
||||
#
|
||||
# begin
|
||||
|
||||
@@ -37,10 +37,10 @@ module ActiveRecord
|
||||
# validation contexts by default (+nil+), other options are <tt>:create</tt>
|
||||
# and <tt>:update</tt>.
|
||||
# * <tt>:if</tt> - Specifies a method, proc or string to call to determine if the validation should
|
||||
# occur (e.g. <tt>:if => :allow_validation</tt>, or <tt>:if => Proc.new { |user| user.signup_step > 2 }</tt>). The
|
||||
# occur (e.g. <tt>:if => :allow_validation</tt>, or <tt>:if => Proc.new { |user| user.signup_step > 2 }</tt>). The
|
||||
# method, proc or string should return or evaluate to a true or false value.
|
||||
# * <tt>:unless</tt> - Specifies a method, proc or string to call to determine if the validation should
|
||||
# not occur (e.g. <tt>:unless => :skip_validation</tt>, or <tt>:unless => Proc.new { |user| user.signup_step <= 2 }</tt>). The
|
||||
# not occur (e.g. <tt>:unless => :skip_validation</tt>, or <tt>:unless => Proc.new { |user| user.signup_step <= 2 }</tt>). The
|
||||
# method, proc or string should return or evaluate to a true or false value.
|
||||
def validates_associated(*attr_names)
|
||||
validates_with AssociatedValidator, _merge_attributes(attr_names)
|
||||
|
||||
@@ -83,7 +83,7 @@ module ActiveRecord
|
||||
# validates_uniqueness_of :user_name, :scope => :account_id
|
||||
# end
|
||||
#
|
||||
# Or even multiple scope parameters. For example, making sure that a teacher can only be on the schedule once
|
||||
# Or even multiple scope parameters. For example, making sure that a teacher can only be on the schedule once
|
||||
# per semester for a particular class.
|
||||
#
|
||||
# class TeacherSchedule < ActiveRecord::Base
|
||||
@@ -105,7 +105,7 @@ module ActiveRecord
|
||||
# The method, proc or string should return or evaluate to a true or false value.
|
||||
# * <tt>:unless</tt> - Specifies a method, proc or string to call to determine if the validation should
|
||||
# not occur (e.g. <tt>:unless => :skip_validation</tt>, or
|
||||
# <tt>:unless => Proc.new { |user| user.signup_step <= 2 }</tt>). The method, proc or string should
|
||||
# <tt>:unless => Proc.new { |user| user.signup_step <= 2 }</tt>). The method, proc or string should
|
||||
# return or evaluate to a true or false value.
|
||||
#
|
||||
# === Concurrency and integrity
|
||||
|
||||
Reference in New Issue
Block a user