Skip to content

Commit

Permalink
Sync images when accounts are updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Prince committed Oct 20, 2011
1 parent cdc930b commit 9927115
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/images_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def destroy

end

# POST /images/1/sync
# POST /images/sync
def sync
user=User.find(session[:user_id])
AsyncExec.run_job(SyncImages, user.id)
Expand Down
5 changes: 5 additions & 0 deletions app/views/users/_account.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ function my_account() {
}
});

$.ajax({
url: "/images/sync",
type: 'POST'
});

}

</script>
Expand Down

0 comments on commit 9927115

Please sign in to comment.