Class: Netzke::TestingController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/netzke/testing_controller.rb

Instance Method Summary collapse

Instance Method Details

#componentsObject



6
7
8
9
10
# File 'app/controllers/netzke/testing_controller.rb', line 6

def components
  component_name = params[:class].gsub("::", "_").underscore
  render :inline => "<%= netzke :#{component_name}, :class_name => '#{params[:class]}', :height => #{params[:height] || 400} %>",
         :layout => true
end

#specsObject



12
13
14
15
# File 'app/controllers/netzke/testing_controller.rb', line 12

def specs
  coffee = spec_file(params[:name])
  render js: CoffeeScript.compile(coffee)
end