Skip to content

Call format again for resolved value#333

Draft
edgarMeinart wants to merge 1 commit into
TrestleAdmin:mainfrom
edgarMeinart:patch-1
Draft

Call format again for resolved value#333
edgarMeinart wants to merge 1 commit into
TrestleAdmin:mainfrom
edgarMeinart:patch-1

Conversation

@edgarMeinart
Copy link
Copy Markdown

No description provided.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coveralls
Copy link
Copy Markdown

coveralls commented Nov 26, 2020

Coverage Status

Coverage remained the same at 91.579% when pulling 3a7a054 on edgarMeinart:patch-1 into df9619a on TrestleAdmin:master.

@spohlenz
Copy link
Copy Markdown
Member

Could you give an example of what use case this is solving for you? What are you returning from your Trestle.config.display_methods instance method?

This just doesn't feel like the right way to achieve this but my mind is open.

@edgarMeinart
Copy link
Copy Markdown
Author

use case example

# Document ActiveRecord model
class Document
  belongs_to :organization
end

# Organization ActiveRecord model
class Organization
  has_many :documents
end

# Trestle admin /documents_admin.rb
...
table do 
  column :organization, truncate: { length: 20 }
end
...

For the current situation - (for example) in case when name of the subject is long - it takes up an unreasonable width of cell

This minor fix will allow to use such helpers as "truncate" to limit the output

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.

4 participants