instance method
select_value
Ruby on Rails 4.1.16
Since v2.2.3Signature
select_value(arel, name = nil, binds = [])
Returns a single value from a record
Parameters
-
arelreq -
nameopt = nil -
bindsopt = []
Source
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 34
def select_value(arel, name = nil, binds = [])
if result = select_one(arel, name, binds)
result.values.first
end
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb line 34
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::DatabaseStatements