README.md in searchjoy-0.3.1 vs README.md in searchjoy-0.3.2
- old
+ new
@@ -22,11 +22,11 @@
And run the generator. This creates a migration to store searches.
```sh
rails generate searchjoy:install
-rake db:migrate
+rails db:migrate
```
Next, add the dashboard to your `config/routes.rb`.
```ruby
@@ -89,11 +89,11 @@
#### Devise
In your `config/routes.rb`:
```ruby
-authenticate :user, -> (user) { user.admin? } do
+authenticate :user, ->(user) { user.admin? } do
mount Searchjoy::Engine, at: "searchjoy"
end
```
#### Basic Authentication
@@ -120,22 +120,22 @@
```
Link to the search results [master]
```ruby
-Searchjoy.query_url = -> (search) { Rails.application.routes.url_helpers.items_path(q: search.query) }
+Searchjoy.query_url = ->(search) { Rails.application.routes.url_helpers.items_path(q: search.query) }
```
Add additional info to the query in the live stream.
```ruby
-Searchjoy.query_name = -> (search) { "#{search.query} #{search.city}" }
+Searchjoy.query_name = ->(search) { "#{search.query} #{search.city}" }
```
Show the conversion name in the live stream.
```ruby
-Searchjoy.conversion_name = -> (model) { model.name }
+Searchjoy.conversion_name = ->(model) { model.name }
```
## TODO
- customize views