rails datatypes
- String:
Explanation: Represents a sequence of characters. Enclosed in single or double quotes.
Integer:
Explanation: Represents whole numbers without decimals.
Float:
Explanation: Represents numbers with decimal points.
Boolean:
Explanation: Represents either true or false.
Array:
Explanation: Ordered collection of elements. Accessed by index, starting from 0.
Hash:
Explanation: Collection of key-value pairs. Provides fast lookup using keys.
Symbol:
Explanation: Lightweight, immutable identifiers, often used as keys in Hashes.
NilClass:
Explanation: Represents the absence of a value.
Date:
Explanation: Represents dates without time information.
Time:
- Explanation: Represents a point in time with date and time information.
DateTime:
- Explanation: Similar to Time but includes additional information about time zones.
ActiveRecord::Base:
- Explanation: The base class for Rails models, representing database tables.
Custom Classes:
- Explanation: User-defined classes to encapsulate behavior and data.
File:
- Explanation: Represents files on the system, allowing manipulation and interaction.
Regexp:
- Explanation: Represents regular expressions for pattern matching.
Range:
- Explanation: Represents an interval of values.
Proc:
- Explanation: Represents a block or a chunk of code that can be stored in a variable.
Lambda:
- Explanation: Similar to Proc, representing an anonymous function or code block.
Method:
- Explanation: Represents a reusable piece of code that can be called with arguments.
Module:
- Explanation: A way to group similar methods, constants, and classes together.
Class:
- Explanation: Blueprint for creating objects, encapsulating behavior and state.
ActiveRecord Associations:
- Explanation: Represents relationships between models in a database.
ActiveRecord Validations:
- Explanation: Rules specified to ensure data integrity when saving objects.
ActiveRecord Callbacks:
- Explanation: Methods that are called at certain points in the lifecycle of an Active Record object.
ActiveRecord Migrations:
- Explanation: Scripts to evolve the database schema over time.