class Admin::DesignsController < OrbitAdminController layout "structure" def index @designs = [] Dir.glob("#{Rails.root}/app/templates/*").each do |template| if template.split('/').last != "mobile" f = File.join("#{template}/template.json") if File.exists?f hash = JSON.parse(File.read(f)) rescue {} @designs << { "key"=>hash["key"], "title"=>hash["title"], "author"=>hash["author"] } end end end end end