{"action":"created","issue":{"url":"https://api.github.com/repos/jamesmartin/inline_svg/issues/37","repository_url":"https://api.github.com/repos/jamesmartin/inline_svg","labels_url":"https://api.github.com/repos/jamesmartin/inline_svg/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/jamesmartin/inline_svg/issues/37/comments","events_url":"https://api.github.com/repos/jamesmartin/inline_svg/issues/37/events","html_url":"https://github.com/jamesmartin/inline_svg/pull/37","id":155761516,"number":37,"title":"Adds default value support in transformations","user":{"login":"andrewaguiar","id":141706,"avatar_url":"https://avatars.githubusercontent.com/u/141706?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewaguiar","html_url":"https://github.com/andrewaguiar","followers_url":"https://api.github.com/users/andrewaguiar/followers","following_url":"https://api.github.com/users/andrewaguiar/following{/other_user}","gists_url":"https://api.github.com/users/andrewaguiar/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewaguiar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewaguiar/subscriptions","organizations_url":"https://api.github.com/users/andrewaguiar/orgs","repos_url":"https://api.github.com/users/andrewaguiar/repos","events_url":"https://api.github.com/users/andrewaguiar/events{/privacy}","received_events_url":"https://api.github.com/users/andrewaguiar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-19T15:10:59Z","updated_at":"2016-05-20T14:12:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jamesmartin/inline_svg/pulls/37","html_url":"https://github.com/jamesmartin/inline_svg/pull/37","diff_url":"https://github.com/jamesmartin/inline_svg/pull/37.diff","patch_url":"https://github.com/jamesmartin/inline_svg/pull/37.patch"},"body":"## Change Log\r\nAdds default value to custom transformations\r\n\r\nNow while adding a custom transformation you can specify a default value to the attribute using `default_value: 'value'` this way if the attribute is not set in the `inline_svg` method it'll assume the default value.\r\n\r\n```ruby\r\n# Note that the named `attribute` will be used to pass a value to your custom transform\r\nInlineSvg.configure do |config|\r\n  config.add_custom_transformation(attribute: :my_custom_attribute, transform: MyCustomTransform, default_value: 'default value')\r\nend\r\n```\r\n\r\n```haml\r\n%div\r\n  = inline_svg \"some-document.svg\"\r\n  = inline_svg \"some-document.svg\", my_custom_attribute: 'some value'\r\n```"},"comment":{"url":"https://api.github.com/repos/jamesmartin/inline_svg/issues/comments/220616633","html_url":"https://github.com/jamesmartin/inline_svg/pull/37#issuecomment-220616633","issue_url":"https://api.github.com/repos/jamesmartin/inline_svg/issues/37","id":220616633,"user":{"login":"andrewaguiar","id":141706,"avatar_url":"https://avatars.githubusercontent.com/u/141706?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewaguiar","html_url":"https://github.com/andrewaguiar","followers_url":"https://api.github.com/users/andrewaguiar/followers","following_url":"https://api.github.com/users/andrewaguiar/following{/other_user}","gists_url":"https://api.github.com/users/andrewaguiar/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewaguiar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewaguiar/subscriptions","organizations_url":"https://api.github.com/users/andrewaguiar/orgs","repos_url":"https://api.github.com/users/andrewaguiar/repos","events_url":"https://api.github.com/users/andrewaguiar/events{/privacy}","received_events_url":"https://api.github.com/users/andrewaguiar/received_events","type":"User","site_admin":false},"created_at":"2016-05-20T14:12:48Z","updated_at":"2016-05-20T14:12:48Z","body":"@jamesmartin I changed all minor improvements =)"}}
{"actor":{"display_login":"andrewaguiar"}}