README.md in wise_gopher-0.2.0 vs README.md in wise_gopher-0.2.1

- old
+ new

@@ -7,11 +7,11 @@ 1. ActiveRecord doesn't make it easy to use bind parameters with [`exec_query`](https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/DatabaseStatements.html#method-i-exec_query). It needs a lot of build up to pass arguments for your query. 2. The result of query is return as an array of hashes wich deprive us of good old OOP. 3. The column types are not always correctly retrieved by ActiveRecord, or sometimes you need a little more ruby treatment on the value before using it. [This article](https://blog.saeloun.com/2019/10/28/bind-parameters-in-activerecord-sql-queries.html) describe the benefits of using bind parameters with ActiveRecord. -[This one](https://use-the-index-luke.com/sql/where-clause/bind-parameters) goes further one the subject. +[This one](https://use-the-index-luke.com/sql/where-clause/bind-parameters) goes further on the subject. The basic idea of this gem is to provide you a way to declare what your query needs as input, what columns it returns and their type. In returns it will allow you to retrieve the rows from result as an array of plain Ruby objects. It will also dynamically creates a class for the row objects that you can customize or can provide it yourself. NB : This is my very first gem, any suggestions, feedbacks or bug reports are very welcome ! 😃 @@ -57,13 +57,13 @@ param :minimum_rating, :integer param :username, :string, transform: :strip row do column :title, :string, transform: :capitalize - column :average_rating, :float, -> { round(2) } + column :average_rating, :float, transform: -> { round(2) } column :published_at, :datetime - column :author_username, as: :author + column :author_username, :string, as: :author def to_s "Article '#{title}' by #{author} is rated #{"%.2f" % average_rating}/5." end end @@ -149,10 +149,10 @@ **If you don't give any block to `row`, make sure you include `WiseGopher::Row` in your class.** ------ ## Raw params -If you need to dinamically interpolate raw SQL in your query, you can use `raw_param`. The value passed with `execute_with` will be interpolated in the base query before inserting the other params. +If you need to dynamically interpolate raw SQL in your query, you can use `raw_param`. The value passed with `execute_with` will be interpolated in the base query before inserting the other params. ```ruby class AnnualReport < WiseGopher::Base query <<-SQL SELECT month, revenue FROM heavy_computations