I hereby claim:
- I am ozzyaaron on github.
- I am ozzyaaron (https://keybase.io/ozzyaaron) on keybase.
- I have a public key whose fingerprint is 9F72 ECF8 98A2 1DB5 64AD 5EAA 87F2 6EE6 3850 F733
To claim this, I am signing this object:
| ### Keybase proof | |
| I hereby claim: | |
| * I am ozzyaaron on github. | |
| * I am ozzyaaron (https://keybase.io/ozzyaaron) on keybase. | |
| * I have a public key ASDB2sXhUw_VjEf3YOQZfp5N07rmVhOf10VYhyqPRDoHvQo | |
| To claim this, I am signing this object: |
I hereby claim:
To claim this, I am signing this object:
| SELECT pg_terminate_backend(pg_stat_activity.pid) | |
| FROM pg_stat_activity | |
| WHERE pg_stat_activity.datname = 'TARGET_DB' | |
| AND pid <> pg_backend_pid(); |
| The below doesn't work. Even if Observed.observer_instances shows and instance of Observer when you save an Observed instance nothing is hit inside the observer. | |
| If you register the observer in application bootup as per normal and specify "observe Observed" inside the Observer then of course it works. | |
| What magic do I need to weave to allow a class to register itself with an observer rather than the observer register itself with the observed classes? |
| class BulkActivityUpdate < Struct.new(:uuid, :user, :farm, :season, :task) | |
| def perform | |
| activities = Activity.with_permission_to(:update, { :user => user, :scope => farm }) | |
| case task | |
| when :refresh_pricing, :assign_missing_pricing | |
| activities = activities.joins(:activity_paddocks).where(["activity_paddocks.planned_season_id = ?", season.id]) | |
| activities.each { |activity| activity.refresh_pricing(task == :refresh_pricing) } # Force the refresh if :refresh_pricing |
| Feature: Searching the library | |
| In order to find information relevant for farm operations | |
| As a user | |
| I want to be able to search the library | |
| Background: | |
| Given I am logged in | |
| And there is a supplier called "Super Supplier" | |
| And there is a supplier called "Normal Supplier" | |
| And the supplier called "Super Supplier" has a product called "Super Roundup" |
| before_destroy { | |
| record.associations.each do |association| | |
| if association.is_has_association? | |
| if record.association.exists? | |
| return false | |
| end | |
| end | |
| end | |
| } |
| before_destroy { | |
| record.associations.each do |association| | |
| if association.is_has_association? | |
| if record.association.exists? | |
| return false | |
| end | |
| end | |
| end | |
| } |