Sha256: 83c55021aec81458ab5a050f28bf1ce65ad238a1e3acd1633d6c843383684195

Contents?: true

Size: 580 Bytes

Versions: 1

Compression:

Stored size: 580 Bytes

Contents

class BaseController < ApplicationController
  helper_method :permitted_attributes

  def basic_form
    @user = User.new
  end

  def fields_for
    @user = User.new
    @user.addresses.build
    @user.build_tag
  end

  def fields_for_explicit
    @user = User.new
    @user.addresses.build
    @user.build_tag
  end

  def deep_fields_for
    @user = User.new
    @user.addresses.build.tags.build
    @user.build_tag
  end

  def nested_form_gem
    @user = User.new
    @user.addresses.build
  end

  private

  def permitted_attributes
    {
      bla: :blub
    }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
strong_form-0.0.9 spec/dummy/app/controllers/base_controller.rb