Sha256: 1d3103a4b8dfa968462f5c407cdbffd8e283916a663bdaddc44523ef8987024b
Contents?: true
Size: 818 Bytes
Versions: 2
Compression:
Stored size: 818 Bytes
Contents
class Kaui::BundleTagsController < ApplicationController 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.external_key) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
kaui-0.0.2 | app/controllers/kaui/bundle_tags_controller.rb |
kaui-0.0.1 | app/controllers/kaui/bundle_tags_controller.rb |