Sha256: 99b493b80ad6d7dbffef71e2e03697ff2801ab6121a59dc2a50a72028f10ea44

Contents?: true

Size: 482 Bytes

Versions: 2

Compression:

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

2 entries across 2 versions & 1 rubygems

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