Skip to content

morsedigital/morse_assetable

Repository files navigation

MorseAssetable

todo include views

AR Helpers

@Terry my implementation of assetable is better because we

  1. include the assetable module at application record level
  2. use my nicer api 'set_assetables' rather than defining methods.

View Helpers

Add this line to ApplicationHelper:

include MorseAssetable::ViewHelpers

This gives you the following methods:

asset_input(form_object, instance, base_name)
# base_name is the assoication to the asset eg ':asset' or ':large_image_one' 

multiple_assets(instance, form_object)

nice_asset(a, :version)
# if no version is selected it default to the original

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published