class LicensesController < ApplicationController
- layout 'test' if Pettanr::TestLayout
+ layout 'test' if MagicNumber['test_layout']
before_filter :authenticate_admin!, :only => [:list, :browse]
# GET /licenses
end
end
+ def search
+ @licenses = License.list_by_name(params[:name])
+
+ respond_to do |format|
+ format.html
+ format.json { render json: @licenses.to_json }
+ end
+ end
+
def list
@licenses = License.all