Sha256: 6c2e102048095b446dad18a134bfc39bee49893db645c2c391391730ff7ae3d8

Contents?: true

Size: 582 Bytes

Versions: 3

Compression:

Stored size: 582 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

3 entries across 3 versions & 1 rubygems

Version Path
strong_form-0.0.8 spec/dummy/app/controllers/base_controller.rb
strong_form-0.0.6 spec/dummy/app/controllers/base_controller.rb
strong_form-0.0.5 spec/dummy/app/controllers/base_controller.rb