Sha256: 5aaccc225e4d07a55ad30078c845026cfe88f43a248771f1e943b892e63b1e0d
Contents?: true
Size: 816 Bytes
Versions: 1
Compression:
Stored size: 816 Bytes
Contents
class Kaui::BundleTagsController < Kaui::EngineController def show bundle_id = params[:id] if bundle_id.present? tags = Kaui::KillbillHelper::get_tags_for_bundle(bundle_id) else flash[:error] = "No account id given" end end def edit @bundle_id = params[:bundle_id] @available_tags = Kaui::KillbillHelper::get_tag_definitions.sort {|tag_a, tag_b| tag_a.name.downcase <=> tag_b.name.downcase } @bundle = Kaui::KillbillHelper::get_bundle(@bundle_id) @tags = Kaui::KillbillHelper::get_tags_for_bundle(@bundle_id) end def update bundle = Kaui::KillbillHelper::get_bundle(params[:bundle_id]) tags = params[:tags] Kaui::KillbillHelper::set_tags_for_bundle(bundle.bundle_id, tags) redirect_to Kaui.bundle_home_path.call(bundle.bundle_id) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kaui-0.1.6 | app/controllers/kaui/bundle_tags_controller.rb |