Note: There is vast difference between `p` and `puts` though they might look behaving similarly. For normal string there seem no difference in behavior however when there comes multi-line string or string containing CR / LF characters then the difference is vivid.
p "first line\n second line"
>> "first line\n second line"
puts "first line\n second line"
>> first line
No matter how they behave, Symbol and String in Ruby are alike. We can define Symbols as a type of String ( just according to behavior ). We often use them interchangeably in our code knowingly or unknowingly. Its has been said that Symbols are better than String however many of us are unaware about the core reasons. Continue reading
MySQL is an example of a relational database – you would use an ORM to translate between your objects in code and the relational representation of the data.
Examples of ORMs are nHibernate, Entity Framework, Dapper and more…
MongoDB is an example of a document database – you would use an ODM to translate between your objects in code and the document representation of the data (if needed).
Mandango is an example of an ODM for MongoDB.
Though they look and sound similar, there is significant difference between these method. Some forcefully update the record where some only set the attributes but do not send the query to the
database. Continue reading