Sha256: 38ad7bd7b243c555b0328e3ebd59050f7a942eebfca66652b77d08be10393070

Contents?: true

Size: 490 Bytes

Versions: 134

Compression:

Stored size: 490 Bytes

Contents

class Marty::ComponentsController < Marty::ApplicationController
  # This is useful for individual component testing.  Note that the
  # appropriate route needs to be defined.
  # <base_url>/components/<ComponentCamelCaseName>

  def index
    component = params[:component]

    return redirect_to root_path unless component

    cname = component.gsub("::", "_").underscore
    render layout: true,
    inline: "<%= netzke :#{cname}, class_name: '#{component}', height: 650 %>"
  end
end

Version data entries

134 entries across 134 versions & 1 rubygems

Version Path
marty-2.5.2 app/controllers/marty/components_controller.rb
marty-2.5.1 app/controllers/marty/components_controller.rb
marty-2.5.0 app/controllers/marty/components_controller.rb
marty-2.4.9 app/controllers/marty/components_controller.rb
marty-2.4.8 app/controllers/marty/components_controller.rb
marty-2.4.7 app/controllers/marty/components_controller.rb
marty-2.4.6 app/controllers/marty/components_controller.rb
marty-2.4.5 app/controllers/marty/components_controller.rb
marty-2.4.4 app/controllers/marty/components_controller.rb
marty-2.4.3 app/controllers/marty/components_controller.rb
marty-2.4.2 app/controllers/marty/components_controller.rb
marty-2.4.1 app/controllers/marty/components_controller.rb
marty-2.4.0 app/controllers/marty/components_controller.rb
marty-2.3.15 app/controllers/marty/components_controller.rb
marty-2.3.14 app/controllers/marty/components_controller.rb
marty-2.3.13 app/controllers/marty/components_controller.rb
marty-2.3.12 app/controllers/marty/components_controller.rb
marty-2.3.11 app/controllers/marty/components_controller.rb
marty-2.3.10 app/controllers/marty/components_controller.rb
marty-2.3.9 app/controllers/marty/components_controller.rb