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 |
| #from defunkt | |
| check process resque_worker_QUEUE | |
| with pidfile /data/APP_NAME/current/tmp/pids/resque_worker_QUEUE.pid | |
| start program = "/bin/sh -c 'cd /data/APP_NAME/current; nohup rake environment resque:work RAILS_ENV=production QUEUE=queue_name VERBOSE=1 PIDFILE=tmp/pids/resque_worker_QUEUE.pid & > log/resque_worker_QUEUE.log" as uid deploy and gid deploy | |
| stop program = "/bin/sh -c 'cd /data/APP_NAME/current && kill -s QUIT `cat tmp/pids/resque_worker_QUEUE.pid` && rm -f tmp/pids/resque_worker_QUEUE.pid; exit 0;'" | |
| if totalmem is greater than 300 MB for 10 cycles then restart # eating up memory? | |
| group resque_workers |