Sha256: ae306961ed4ff570dd278ac565b7e9632829249f4fffa3f1721d80987205fcbd

Contents?: true

Size: 684 Bytes

Versions: 41

Compression:

Stored size: 684 Bytes

Contents

require 'rubygems'
require 'ramaze'
require 'sequel'
require 'scaffolding_extensions'

DB = Sequel.sqlite

class User < Sequel::Model(:user)
  set_schema do
    primary_key :id
    varchar :name
    text :description
  end

  create_table unless User.table_exists?
end

ScaffoldingExtensions.all_models = [User]

class UserController < Ramaze::Controller
  scaffold_all_models :only => [User]
end

class MainController < Ramaze::Controller
  def index
    %{Scaffolding extension enabled for
      <a href="http://sequel.rubyforge.org/classes/Sequel/Model.html">
      Sequel::Model
      </a> User.
      You can access the scaffolded Model at #{A('/user')}}
  end
end

Ramaze.start

Version data entries

41 entries across 41 versions & 5 rubygems

Version Path
Pistos-ramaze-2008.09 examples/misc/sequel_scaffolding.rb
Pistos-ramaze-2008.12 examples/misc/sequel_scaffolding.rb
Pistos-ramaze-2009.01 examples/misc/sequel_scaffolding.rb
Pistos-ramaze-2009.02 examples/misc/sequel_scaffolding.rb
Pistos-ramaze-2009.04.08 examples/misc/sequel_scaffolding.rb
Pistos-ramaze-2009.06.12 examples/misc/sequel_scaffolding.rb
manveru-ramaze-2008.07 examples/misc/sequel_scaffolding.rb
manveru-ramaze-2008.08 examples/misc/sequel_scaffolding.rb
manveru-ramaze-2008.09 examples/misc/sequel_scaffolding.rb
manveru-ramaze-2008.10 examples/misc/sequel_scaffolding.rb
manveru-ramaze-2008.12 examples/misc/sequel_scaffolding.rb
manveru-ramaze-2009.01 examples/misc/sequel_scaffolding.rb
manveru-ramaze-2009.04.01 examples/misc/sequel_scaffolding.rb
manveru-ramaze-2009.04.08 examples/misc/sequel_scaffolding.rb
manveru-ramaze-2009.04.18 examples/misc/sequel_scaffolding.rb
manveru-ramaze-2009.04.22 examples/misc/sequel_scaffolding.rb
manveru-ramaze-2009.04 examples/misc/sequel_scaffolding.rb
manveru-ramaze-2009.05.08 examples/misc/sequel_scaffolding.rb
manveru-ramaze-2009.05 examples/misc/sequel_scaffolding.rb
manveru-ramaze-2009.06.04 examples/misc/sequel_scaffolding.rb