New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

text_field doesn't display correctly with attribute default value of Proc #24249

Closed
willnet opened this Issue Mar 19, 2016 · 4 comments

Comments

Projects
None yet
4 participants
@willnet
Contributor

willnet commented Mar 19, 2016

Steps to reproduce

executable test case

  • create new rails project
  • rails g scaffold post title
  • rails db:migrate
  • modify post model like following
class Post < ApplicationRecord
  attribute :title, :string, default: -> { 'hello' }
end

Expected behavior

image

Actual behavior

image

System configuration

Rails version:
5.0.0.beta3 and master

Ruby version:
2.3.0

@maclover7

This comment has been minimized.

Show comment
Hide comment
@maclover7

maclover7 Mar 19, 2016

Member

Is passing a Proc supported, as per the documentation?

Member

maclover7 commented Mar 19, 2016

Is passing a Proc supported, as per the documentation?

@prathamesh-sonpatki

This comment has been minimized.

Show comment
Hide comment
@willnet

This comment has been minimized.

Show comment
Hide comment
@willnet

willnet Mar 20, 2016

Contributor

@maclover7

This example seems to say that we can use Proc.

Contributor

willnet commented Mar 20, 2016

@maclover7

This example seems to say that we can use Proc.

@Sen-Zhang

This comment has been minimized.

Show comment
Hide comment
@Sen-Zhang

Sen-Zhang Mar 24, 2016

Contributor

Replaced the old solution with a new one.

Contributor

Sen-Zhang commented Mar 24, 2016

Replaced the old solution with a new one.

@sgrif sgrif closed this in ba06dab Mar 24, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment