Sha256: 353dc3bb9f0470815bfc8f670fd6df5f2998b22cc4a01f03f5a64df975f0fc0f
Contents?: true
Size: 747 Bytes
Versions: 2
Compression:
Stored size: 747 Bytes
Contents
class ComponentsController < ApplicationController def index if params[:component] component_name = params[:component].gsub("::", "_").underscore if params[:spec] require 'active_record/fixtures' fixtures_dir = "../../spec/fixtures/#{params[:spec]}" Dir.glob(File.join(Rails.root, "#{fixtures_dir}/*.yml")).each do |fixture_file| ActiveRecord::Fixtures.reset_cache ActiveRecord::Fixtures.create_fixtures(File.join(Rails.root, fixtures_dir), File.basename(fixture_file, '.*')) end end render :inline => "<%= netzke :#{component_name}, :class_name => '#{params[:component]}', :height => 400 %>", :layout => true else redirect_to root_path end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
netzke-basepack-0.8.4 | test/basepack_test_app/app/controllers/components_controller.rb |
netzke-basepack-0.8.3 | test/basepack_test_app/app/controllers/components_controller.rb |