Address

Attribute partials are used to display a single attribute of a model, within an `index` table colum or the resource's `show` screen. Read more about them and about the form field partials in the extensive developer documentation.

Samples

Multi-line

5.3ms 2608 allocs

2800 East Observatory Road
Los Angeles California 90027
UNITED STATES

View Source
<%= render 'shared/attributes/address', object: object, attribute: :address_value %>

One-line

1.0ms 641 allocs
2800 East Observatory Road, Los Angeles California 90027, UNITED STATES
View Source
<%= render 'shared/attributes/address', object: object, attribute: :address_value, one_line: true %>

Options

Name Required Type Default Description
object
Object
Reference to the model object
attribute
String
Attribute of the model
one_line
Boolean
Render into a single line