File: bootstrap_controller.rb

package info (click to toggle)
ruby-bootstrap-form 4.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 848 kB
  • sloc: ruby: 1,482; makefile: 4
file content (14 lines) | stat: -rw-r--r-- 312 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class BootstrapController < ApplicationController
  def form
    @collection = [
      Address.new(id: 1, street: "Foo"),
      Address.new(id: 2, street: "Bar")
    ]

    @user = User.new

    @user_with_error = User.new
    @user_with_error.errors.add(:email)
    @user_with_error.errors.add(:misc)
  end
end