If you are like many (most?) of us, you have encountered Rails
Credentials/Secrets and secret_key_base and may have been
left a bit (or more) confused.
This post is an attempt to remove some of that confusion by
| http://stackoverflow.com/questions/22667401/postgres-json-data-type-rails-query | |
| http://stackoverflow.com/questions/40702813/query-on-postgres-json-array-field-in-rails | |
| #payload: [{"kind"=>"person"}] | |
| Segment.where("payload @> ?", [{kind: "person"}].to_json) | |
| #data: {"interest"=>["music", "movies", "programming"]} | |
| Segment.where("data @> ?", {"interest": ["music", "movies", "programming"]}.to_json) | |
| Segment.where("data #>> '{interest, 1}' = 'movies' ") | |
| Segment.where("jsonb_array_length(data->'interest') > 1") |
| <% Category.order(:name).each do |category| %> | |
| <ul> | |
| <li><%= category.name %></li> | |
| <ul> | |
| <% category.sub_categories.each do |sub_category| %> | |
| <li><%= sub_category.name %></li> | |
| <% end %> | |
| </ul> | |
| </ul> | |
| <% end %> |
| Feature: Items in scheduled | |
| As an singed up user | |
| I want to manage my todos or projects which placed in scheduled | |
| Background: | |
| Given I am a confirmed user and signed in as "tom@iamtom.com" with password "iamtom" | |
| Scenario: Move a new todo to Scheduled | |
| When I create a todo "To meet David" on "" about "About trip planning" | |
| And I drag todo "To meet David" to place Scheduled |