Skip to content
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

Changed show view to display simple_format instead of <pre> #1354

Merged
merged 1 commit into from Oct 12, 2012
Merged

Changed show view to display simple_format instead of <pre> #1354

merged 1 commit into from Oct 12, 2012

Conversation

radiokills
Copy link
Contributor

When large amount of text are inserted in - lets say - textarea, each paragraph is single line and it's extended well over the browser's edge.

I've changed the

 tag with div and formated the text with rails helper 'simple_format' and inserted it in div element with 'field_content' css style. Also created css style tag.

@bbenezech
Copy link
Collaborator

Thank you. I trust you with the result ;-)

bbenezech added a commit that referenced this pull request Oct 12, 2012
Changed show view to display simple_format instead of <pre> [ci skip]
@bbenezech bbenezech merged commit f51ca98 into railsadminteam:master Oct 12, 2012
@bbenezech
Copy link
Collaborator

Reverted in 3d5bb94

ActionView::Template::Error (can't dup Symbol):
    12:               %dt.label{:class => "#{field.type_css_class} #{field.css_class}"}= field.label
    13:               %dd
    14:                 .field_value{:class=>field.css_class}
    15:                   = simple_format(field.pretty_value)
  actionpack (3.2.8) lib/action_view/helpers/text_helper.rb:268:in `dup'
  actionpack (3.2.8) lib/action_view/helpers/text_helper.rb:268:in `simple_format'

I guess field.pretty_value is not always a string?

@bostonaholic
Copy link
Contributor

I see the changes for this were reverted. Is there a workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants