lib/mkit/app/helpers/services_helper.rb in mkit-0.6.3 vs lib/mkit/app/helpers/services_helper.rb in mkit-0.7.0

- old
+ new

@@ -14,9 +14,16 @@ table.rows << build_table_row(data) end table.to_s end + def build_options_hash(params:, options:) + hash = {} + options.each do |option| + hash[option] = params[option] + end + hash + end def find_by_id_or_name srv = Service.find_by_id(params[:id]) srv ||= Service.find_by_name(params[:id]) error 404, "Couldn't find Service '#{params[:id]}'\n" unless srv srv