Class: Admin::PrototypesController

Inherits:
ResourceController
  • Object
show all
Defined in:
app/controllers/admin/prototypes_controller.rb

Instance Method Summary collapse

Instance Method Details

#availableObject



6
7
8
9
10
11
# File 'app/controllers/admin/prototypes_controller.rb', line 6

def available
  @prototypes = Prototype.order('name asc')
  respond_with(@prototypes) do |format|
    format.html { render :layout => !request.xhr? }
  end
end

#selectObject



13
14
15
16
17
18
# File 'app/controllers/admin/prototypes_controller.rb', line 13

def select
  @prototype ||= Prototype.find(params[:id])
  @prototype_properties = @prototype.properties

  respond_with(@prototypes)
end