Outpost::AssetHost
AssetHost integration with Outpost.
Dependencies:
- Outpost
- Backbone, >= 0.9
You should include these dependencies yourself.
Usage
class PostAsset < ActiveRecord::Base
belongs_to :post
end
class Post < ActiveRecord::Base
has_many :assets, class_name: "PostAsset"
accepts_json_input_for_assets
end
You'll also need to define a window.assethost
object, with "SERVER" and "TOKEN":
window.assethost =
SERVER: "http://assethost.yourserver.com"
TOKEN: "{your assethost key}
And include the javascript and stylesheet:
//= require outpost/asset_host
/*
*= require outpost/assets
*/
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request