diff options
| author | Teddy Wing | 2017-06-15 14:49:34 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2017-06-15 14:49:34 +0200 | 
| commit | 40b02ab0bdbf51ea4c9d3ebef26d880c789edf44 (patch) | |
| tree | b118ee690e838b0b0243f77a1fd91b9adcfdb304 /app/helpers | |
| parent | 22b4146541ce721447b2364c390c2dfe1efae8ef (diff) | |
| download | chouette-core-40b02ab0bdbf51ea4c9d3ebef26d880c789edf44.tar.bz2 | |
Link: Change :name & :content into a single property :content
The only difference between :name and :content was that :name contained
a string and :content contained HTML. But they're really the same thing.
Thus it makes much more sense to combine those into a single property
that means both, and handles content regardless of type.
Refs #3479
Diffstat (limited to 'app/helpers')
| -rw-r--r-- | app/helpers/table_builder_helper.rb | 2 | ||||
| -rw-r--r-- | app/helpers/table_builder_helper/custom_links.rb | 2 | 
2 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/table_builder_helper.rb b/app/helpers/table_builder_helper.rb index af05a7354..888bd40ad 100644 --- a/app/helpers/table_builder_helper.rb +++ b/app/helpers/table_builder_helper.rb @@ -121,7 +121,7 @@ module TableBuilderHelper              method: link.method,              data: link.data            ) do -            link.content || link.name +            link.content            end,            class: link.method == :delete ? 'delete-action' : '',          ) diff --git a/app/helpers/table_builder_helper/custom_links.rb b/app/helpers/table_builder_helper/custom_links.rb index f03acac1e..abb907678 100644 --- a/app/helpers/table_builder_helper/custom_links.rb +++ b/app/helpers/table_builder_helper/custom_links.rb @@ -17,7 +17,7 @@ module TableBuilderHelper      def links        actions_after_policy_check.map do |action|          Link.new( -          name: I18n.t("actions.#{action}"), +          content: I18n.t("actions.#{action}"),            href: polymorphic_url(action),            method: method_for_action(action)          )  | 
