Skip to content

Commit

Permalink
Show all text in show view and use truncate length from column.option…
Browse files Browse the repository at this point in the history
…s in list view
  • Loading branch information
Sergio committed Jun 3, 2009
1 parent 23f2502 commit acf677b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/active_scaffold/helpers/list_column_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def clean_column_value(v)
## Overrides
##
def active_scaffold_column_text(column, record)
truncate(clean_column_value(record.send(column.name)), :length => 50)
truncate(clean_column_value(record.send(column.name)), :length => column.options[:truncate] || 50)
end

def active_scaffold_column_checkbox(column, record)
Expand Down
2 changes: 1 addition & 1 deletion lib/active_scaffold/helpers/show_column_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def show_column_value(record, column)
end

def active_scaffold_show_text(column, record)
simple_format(get_column_value(record, column))
simple_format(clean_column_value(record.send(column.name)))
end

def show_column_override(column)
Expand Down

0 comments on commit acf677b

Please sign in to comment.