rails datatypes

  1. String:
  2. Explanation: Represents a sequence of characters. Enclosed in single or double quotes.

  3. Integer:

  4. Explanation: Represents whole numbers without decimals.

  5. Float:

  6. Explanation: Represents numbers with decimal points.

  7. Boolean:

  8. Explanation: Represents either true or false.

  9. Array:

  10. Explanation: Ordered collection of elements. Accessed by index, starting from 0.

  11. Hash:

  12. Explanation: Collection of key-value pairs. Provides fast lookup using keys.

  13. Symbol:

  14. Explanation: Lightweight, immutable identifiers, often used as keys in Hashes.

  15. NilClass:

  16. Explanation: Represents the absence of a value.

  17. Date:

  18. Explanation: Represents dates without time information.

  19. Time:

    • Explanation: Represents a point in time with date and time information.
  20. DateTime:

    • Explanation: Similar to Time but includes additional information about time zones.
  21. ActiveRecord::Base:

    • Explanation: The base class for Rails models, representing database tables.
  22. Custom Classes:

    • Explanation: User-defined classes to encapsulate behavior and data.
  23. File:

    • Explanation: Represents files on the system, allowing manipulation and interaction.
  24. Regexp:

    • Explanation: Represents regular expressions for pattern matching.
  25. Range:

    • Explanation: Represents an interval of values.
  26. Proc:

    • Explanation: Represents a block or a chunk of code that can be stored in a variable.
  27. Lambda:

    • Explanation: Similar to Proc, representing an anonymous function or code block.
  28. Method:

    • Explanation: Represents a reusable piece of code that can be called with arguments.
  29. Module:

    • Explanation: A way to group similar methods, constants, and classes together.
  30. Class:

    • Explanation: Blueprint for creating objects, encapsulating behavior and state.
  31. ActiveRecord Associations:

    • Explanation: Represents relationships between models in a database.
  32. ActiveRecord Validations:

    • Explanation: Rules specified to ensure data integrity when saving objects.
  33. ActiveRecord Callbacks:

    • Explanation: Methods that are called at certain points in the lifecycle of an Active Record object.
  34. ActiveRecord Migrations:

    • Explanation: Scripts to evolve the database schema over time.