{"action":"created","comment":{"url":"https://api.github.com/repos/jollygoodcode/s3ff/pulls/comments/22578802","id":22578802,"diff_hunk":"@@ -32,24 +32,31 @@ def include_s3ff_templates\n                 <button class=\"close\" data-dismiss=\"alert\" data-unique_id=\"{{:unique_id}}\" data-target=\"#upload-{{:unique_id}}\" style=\"margin-left:1em;\" type=\"button\">\n                   <span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Remove</span>\n                 </button>\n-                <span class=\"fa fa-file-o\"></span>\n-                {^{:result.filename}}\n+                <span class=\"filename\">\n+                  <span class=\"fa fa-file-o\"></span>\n+                  {^{:result.filename}}\n+                </span>\n               </div>\n             </div>\n           {^{else}}\n-            {^{if placeholder}}\n-              {^{if placeholder.url || placeholder.filename}}\n-                <div class=\"thumbnail\" id=\"upload-{{:unique_id}}\">\n-                  {^{if placeholder.url}}\n-                    <img data-link=\"src{:placeholder.url}\">\n-                  {{/if}}\n-                  {^{if placeholder.filename}}\n-                    <div class=\"caption\">\n-                      <span class=\"fa fa-file-o\"></span>\n-                      {^{:placeholder.filename}}\n-                    </div>\n-                  {{/if}}\n-                </div>\n+            {^{if !progress_pct}}\n+              {^{if placeholder}}\n+                {^{if placeholder.url || placeholder.filename}}\n+                  <div class=\"thumbnail\" id=\"upload-{{:placeholder.id}}\">\n+                    {^{if placeholder.url}}\n+                      <img data-link=\"src{:placeholder.url}\">\n+                    {{/if}}\n+                    {^{if placeholder.filename}}\n+                      <div class=\"caption\">\n+                        {^{:placeholder.remove_existing_link}}","path":"lib/s3ff/view_helper.rb","position":35,"original_position":35,"commit_id":"5dbf22d8502f1e220c47d4d6527fff2bd8d39d04","original_commit_id":"5dbf22d8502f1e220c47d4d6527fff2bd8d39d04","user":{"login":"winston","id":2112,"avatar_url":"https://avatars.githubusercontent.com/u/2112?v=3","gravatar_id":"","url":"https://api.github.com/users/winston","html_url":"https://github.com/winston","followers_url":"https://api.github.com/users/winston/followers","following_url":"https://api.github.com/users/winston/following{/other_user}","gists_url":"https://api.github.com/users/winston/gists{/gist_id}","starred_url":"https://api.github.com/users/winston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/winston/subscriptions","organizations_url":"https://api.github.com/users/winston/orgs","repos_url":"https://api.github.com/users/winston/repos","events_url":"https://api.github.com/users/winston/events{/privacy}","received_events_url":"https://api.github.com/users/winston/received_events","type":"User","site_admin":false},"body":"Eg:\r\n\r\n````\r\n      = f.s3_file_field :file,\r\n        id: \"#{parent_id}_images_attributes_#{f.index}_file\",\r\n        class: 'form-control',\r\n        url: xxx,\r\n        data: { \\\r\n            placeholder: { \\\r\n              id: f.object.id, \\\r\n              url: placeholder_url_for(f.object.file, :small, f.object.file_direct_url), \\\r\n              filename: f.object.file_file_name, \\\r\n              remove_existing_link: link_to_remove_association('<span aria-hidden=\"true\">×</span>'.html_safe, f, class: 'close') \\\r\n            } \\\r\n          }\r\n````","created_at":"2015-01-07T10:05:51Z","updated_at":"2015-01-07T10:05:51Z","html_url":"https://github.com/jollygoodcode/s3ff/pull/3#discussion_r22578802","pull_request_url":"https://api.github.com/repos/jollygoodcode/s3ff/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/jollygoodcode/s3ff/pulls/comments/22578802"},"html":{"href":"https://github.com/jollygoodcode/s3ff/pull/3#discussion_r22578802"},"pull_request":{"href":"https://api.github.com/repos/jollygoodcode/s3ff/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/jollygoodcode/s3ff/pulls/3","id":26947430,"html_url":"https://github.com/jollygoodcode/s3ff/pull/3","diff_url":"https://github.com/jollygoodcode/s3ff/pull/3.diff","patch_url":"https://github.com/jollygoodcode/s3ff/pull/3.patch","issue_url":"https://api.github.com/repos/jollygoodcode/s3ff/issues/3","number":3,"state":"open","locked":false,"title":"Patch view helper","user":{"login":"winston","id":2112,"avatar_url":"https://avatars.githubusercontent.com/u/2112?v=3","gravatar_id":"","url":"https://api.github.com/users/winston","html_url":"https://github.com/winston","followers_url":"https://api.github.com/users/winston/followers","following_url":"https://api.github.com/users/winston/following{/other_user}","gists_url":"https://api.github.com/users/winston/gists{/gist_id}","starred_url":"https://api.github.com/users/winston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/winston/subscriptions","organizations_url":"https://api.github.com/users/winston/orgs","repos_url":"https://api.github.com/users/winston/repos","events_url":"https://api.github.com/users/winston/events{/privacy}","received_events_url":"https://api.github.com/users/winston/received_events","type":"User","site_admin":false},"body":"Please see annotation on file for the explanation of the changes.","created_at":"2015-01-07T09:56:18Z","updated_at":"2015-01-07T10:05:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"65dbde12377e1500cfc111bb5cb797b41aa2e4d3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jollygoodcode/s3ff/pulls/3/commits","review_comments_url":"https://api.github.com/repos/jollygoodcode/s3ff/pulls/3/comments","review_comment_url":"https://api.github.com/repos/jollygoodcode/s3ff/pulls/comments/{number}","comments_url":"https://api.github.com/repos/jollygoodcode/s3ff/issues/3/comments","statuses_url":"https://api.github.com/repos/jollygoodcode/s3ff/statuses/5dbf22d8502f1e220c47d4d6527fff2bd8d39d04","head":{"label":"jollygoodcode:patch/view-changes","ref":"patch/view-changes","sha":"5dbf22d8502f1e220c47d4d6527fff2bd8d39d04","user":{"login":"jollygoodcode","id":5326832,"avatar_url":"https://avatars.githubusercontent.com/u/5326832?v=3","gravatar_id":"","url":"https://api.github.com/users/jollygoodcode","html_url":"https://github.com/jollygoodcode","followers_url":"https://api.github.com/users/jollygoodcode/followers","following_url":"https://api.github.com/users/jollygoodcode/following{/other_user}","gists_url":"https://api.github.com/users/jollygoodcode/gists{/gist_id}","starred_url":"https://api.github.com/users/jollygoodcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jollygoodcode/subscriptions","organizations_url":"https://api.github.com/users/jollygoodcode/orgs","repos_url":"https://api.github.com/users/jollygoodcode/repos","events_url":"https://api.github.com/users/jollygoodcode/events{/privacy}","received_events_url":"https://api.github.com/users/jollygoodcode/received_events","type":"Organization","site_admin":false},"repo":{"id":25803752,"name":"s3ff","full_name":"jollygoodcode/s3ff","owner":{"login":"jollygoodcode","id":5326832,"avatar_url":"https://avatars.githubusercontent.com/u/5326832?v=3","gravatar_id":"","url":"https://api.github.com/users/jollygoodcode","html_url":"https://github.com/jollygoodcode","followers_url":"https://api.github.com/users/jollygoodcode/followers","following_url":"https://api.github.com/users/jollygoodcode/following{/other_user}","gists_url":"https://api.github.com/users/jollygoodcode/gists{/gist_id}","starred_url":"https://api.github.com/users/jollygoodcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jollygoodcode/subscriptions","organizations_url":"https://api.github.com/users/jollygoodcode/orgs","repos_url":"https://api.github.com/users/jollygoodcode/repos","events_url":"https://api.github.com/users/jollygoodcode/events{/privacy}","received_events_url":"https://api.github.com/users/jollygoodcode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jollygoodcode/s3ff","description":"Using `s3_file_field` with `paperclip`","fork":false,"url":"https://api.github.com/repos/jollygoodcode/s3ff","forks_url":"https://api.github.com/repos/jollygoodcode/s3ff/forks","keys_url":"https://api.github.com/repos/jollygoodcode/s3ff/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jollygoodcode/s3ff/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jollygoodcode/s3ff/teams","hooks_url":"https://api.github.com/repos/jollygoodcode/s3ff/hooks","issue_events_url":"https://api.github.com/repos/jollygoodcode/s3ff/issues/events{/number}","events_url":"https://api.github.com/repos/jollygoodcode/s3ff/events","assignees_url":"https://api.github.com/repos/jollygoodcode/s3ff/assignees{/user}","branches_url":"https://api.github.com/repos/jollygoodcode/s3ff/branches{/branch}","tags_url":"https://api.github.com/repos/jollygoodcode/s3ff/tags","blobs_url":"https://api.github.com/repos/jollygoodcode/s3ff/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jollygoodcode/s3ff/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jollygoodcode/s3ff/git/refs{/sha}","trees_url":"https://api.github.com/repos/jollygoodcode/s3ff/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jollygoodcode/s3ff/statuses/{sha}","languages_url":"https://api.github.com/repos/jollygoodcode/s3ff/languages","stargazers_url":"https://api.github.com/repos/jollygoodcode/s3ff/stargazers","contributors_url":"https://api.github.com/repos/jollygoodcode/s3ff/contributors","subscribers_url":"https://api.github.com/repos/jollygoodcode/s3ff/subscribers","subscription_url":"https://api.github.com/repos/jollygoodcode/s3ff/subscription","commits_url":"https://api.github.com/repos/jollygoodcode/s3ff/commits{/sha}","git_commits_url":"https://api.github.com/repos/jollygoodcode/s3ff/git/commits{/sha}","comments_url":"https://api.github.com/repos/jollygoodcode/s3ff/comments{/number}","issue_comment_url":"https://api.github.com/repos/jollygoodcode/s3ff/issues/comments/{number}","contents_url":"https://api.github.com/repos/jollygoodcode/s3ff/contents/{+path}","compare_url":"https://api.github.com/repos/jollygoodcode/s3ff/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jollygoodcode/s3ff/merges","archive_url":"https://api.github.com/repos/jollygoodcode/s3ff/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jollygoodcode/s3ff/downloads","issues_url":"https://api.github.com/repos/jollygoodcode/s3ff/issues{/number}","pulls_url":"https://api.github.com/repos/jollygoodcode/s3ff/pulls{/number}","milestones_url":"https://api.github.com/repos/jollygoodcode/s3ff/milestones{/number}","notifications_url":"https://api.github.com/repos/jollygoodcode/s3ff/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jollygoodcode/s3ff/labels{/name}","releases_url":"https://api.github.com/repos/jollygoodcode/s3ff/releases{/id}","created_at":"2014-10-27T04:52:32Z","updated_at":"2015-01-06T09:07:35Z","pushed_at":"2015-01-07T09:55:52Z","git_url":"git://github.com/jollygoodcode/s3ff.git","ssh_url":"git@github.com:jollygoodcode/s3ff.git","clone_url":"https://github.com/jollygoodcode/s3ff.git","svn_url":"https://github.com/jollygoodcode/s3ff","homepage":null,"size":317,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":4,"default_branch":"master"}},"base":{"label":"jollygoodcode:master","ref":"master","sha":"8be8382b2b518cc1f36089ba42134d60c3f816c0","user":{"login":"jollygoodcode","id":5326832,"avatar_url":"https://avatars.githubusercontent.com/u/5326832?v=3","gravatar_id":"","url":"https://api.github.com/users/jollygoodcode","html_url":"https://github.com/jollygoodcode","followers_url":"https://api.github.com/users/jollygoodcode/followers","following_url":"https://api.github.com/users/jollygoodcode/following{/other_user}","gists_url":"https://api.github.com/users/jollygoodcode/gists{/gist_id}","starred_url":"https://api.github.com/users/jollygoodcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jollygoodcode/subscriptions","organizations_url":"https://api.github.com/users/jollygoodcode/orgs","repos_url":"https://api.github.com/users/jollygoodcode/repos","events_url":"https://api.github.com/users/jollygoodcode/events{/privacy}","received_events_url":"https://api.github.com/users/jollygoodcode/received_events","type":"Organization","site_admin":false},"repo":{"id":25803752,"name":"s3ff","full_name":"jollygoodcode/s3ff","owner":{"login":"jollygoodcode","id":5326832,"avatar_url":"https://avatars.githubusercontent.com/u/5326832?v=3","gravatar_id":"","url":"https://api.github.com/users/jollygoodcode","html_url":"https://github.com/jollygoodcode","followers_url":"https://api.github.com/users/jollygoodcode/followers","following_url":"https://api.github.com/users/jollygoodcode/following{/other_user}","gists_url":"https://api.github.com/users/jollygoodcode/gists{/gist_id}","starred_url":"https://api.github.com/users/jollygoodcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jollygoodcode/subscriptions","organizations_url":"https://api.github.com/users/jollygoodcode/orgs","repos_url":"https://api.github.com/users/jollygoodcode/repos","events_url":"https://api.github.com/users/jollygoodcode/events{/privacy}","received_events_url":"https://api.github.com/users/jollygoodcode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jollygoodcode/s3ff","description":"Using `s3_file_field` with `paperclip`","fork":false,"url":"https://api.github.com/repos/jollygoodcode/s3ff","forks_url":"https://api.github.com/repos/jollygoodcode/s3ff/forks","keys_url":"https://api.github.com/repos/jollygoodcode/s3ff/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jollygoodcode/s3ff/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jollygoodcode/s3ff/teams","hooks_url":"https://api.github.com/repos/jollygoodcode/s3ff/hooks","issue_events_url":"https://api.github.com/repos/jollygoodcode/s3ff/issues/events{/number}","events_url":"https://api.github.com/repos/jollygoodcode/s3ff/events","assignees_url":"https://api.github.com/repos/jollygoodcode/s3ff/assignees{/user}","branches_url":"https://api.github.com/repos/jollygoodcode/s3ff/branches{/branch}","tags_url":"https://api.github.com/repos/jollygoodcode/s3ff/tags","blobs_url":"https://api.github.com/repos/jollygoodcode/s3ff/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jollygoodcode/s3ff/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jollygoodcode/s3ff/git/refs{/sha}","trees_url":"https://api.github.com/repos/jollygoodcode/s3ff/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jollygoodcode/s3ff/statuses/{sha}","languages_url":"https://api.github.com/repos/jollygoodcode/s3ff/languages","stargazers_url":"https://api.github.com/repos/jollygoodcode/s3ff/stargazers","contributors_url":"https://api.github.com/repos/jollygoodcode/s3ff/contributors","subscribers_url":"https://api.github.com/repos/jollygoodcode/s3ff/subscribers","subscription_url":"https://api.github.com/repos/jollygoodcode/s3ff/subscription","commits_url":"https://api.github.com/repos/jollygoodcode/s3ff/commits{/sha}","git_commits_url":"https://api.github.com/repos/jollygoodcode/s3ff/git/commits{/sha}","comments_url":"https://api.github.com/repos/jollygoodcode/s3ff/comments{/number}","issue_comment_url":"https://api.github.com/repos/jollygoodcode/s3ff/issues/comments/{number}","contents_url":"https://api.github.com/repos/jollygoodcode/s3ff/contents/{+path}","compare_url":"https://api.github.com/repos/jollygoodcode/s3ff/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jollygoodcode/s3ff/merges","archive_url":"https://api.github.com/repos/jollygoodcode/s3ff/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jollygoodcode/s3ff/downloads","issues_url":"https://api.github.com/repos/jollygoodcode/s3ff/issues{/number}","pulls_url":"https://api.github.com/repos/jollygoodcode/s3ff/pulls{/number}","milestones_url":"https://api.github.com/repos/jollygoodcode/s3ff/milestones{/number}","notifications_url":"https://api.github.com/repos/jollygoodcode/s3ff/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jollygoodcode/s3ff/labels{/name}","releases_url":"https://api.github.com/repos/jollygoodcode/s3ff/releases{/id}","created_at":"2014-10-27T04:52:32Z","updated_at":"2015-01-06T09:07:35Z","pushed_at":"2015-01-07T09:55:52Z","git_url":"git://github.com/jollygoodcode/s3ff.git","ssh_url":"git@github.com:jollygoodcode/s3ff.git","clone_url":"https://github.com/jollygoodcode/s3ff.git","svn_url":"https://github.com/jollygoodcode/s3ff","homepage":null,"size":317,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jollygoodcode/s3ff/pulls/3"},"html":{"href":"https://github.com/jollygoodcode/s3ff/pull/3"},"issue":{"href":"https://api.github.com/repos/jollygoodcode/s3ff/issues/3"},"comments":{"href":"https://api.github.com/repos/jollygoodcode/s3ff/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/jollygoodcode/s3ff/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/jollygoodcode/s3ff/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/jollygoodcode/s3ff/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/jollygoodcode/s3ff/statuses/5dbf22d8502f1e220c47d4d6527fff2bd8d39d04"}}}}