Sha256: bce6bc7e24bf6d47d852b6aedb3dba727c6b20c7498ef98dae36967441485daa
Contents?: true
Size: 948 Bytes
Versions: 8
Compression:
Stored size: 948 Bytes
Contents
class Kaui::AccountTagsController < Kaui::EngineController def show account_id = params[:id] if account_id.present? tags = Kaui::KillbillHelper::get_tags_for_account(account_id) else flash[:error] = "No account id given" end end def edit @account_id = params[:account_id] @available_tags = Kaui::KillbillHelper::get_tag_definitions.sort {|tag_a, tag_b| tag_a.name.downcase <=> tag_b.name.downcase } @account = Kaui::KillbillHelper::get_account(@account_id) @tags = Kaui::KillbillHelper::get_tags_for_account(@account.account_id) end def update account = Kaui::KillbillHelper::get_account(params[:account_id]) tags = params[:tags] if account.account_id.present? Kaui::KillbillHelper::set_tags_for_account(account.account_id, tags) redirect_to Kaui.account_home_path.call(account.external_key) else flash[:error] = "No account id given" end end end
Version data entries
8 entries across 8 versions & 1 rubygems