asf_scaffold_generator 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/templates/asf_view_show.rhtml +8 -2
  2. metadata +1 -1
@@ -25,9 +25,15 @@
25
25
  if component[:type] == "Field"
26
26
  field = component[:value]
27
27
  column = entity_def.api_name_to_column[field]
28
+
29
+ col_ref = "@#{singular_name}.#{column.name}"
30
+ unless column.reference_to
28
31
  %>
29
- <%%= @<%= singular_name %>.<%= column.name %> %>
30
- <% end
32
+ <%%= <%= col_ref %> ? <%= col_ref %> : '&nbsp;' %>
33
+ <% else %>
34
+ <%%= <%= col_ref %> ? link_to(<%= col_ref %>, { :controller => '<%= column.reference_to.pluralize.underscore %>', :action=> 'show', :id => <%= col_ref %> }) : '&nbsp;' %>
35
+ <% end
36
+ end
31
37
  end
32
38
  %>
33
39
  </td>
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: asf_scaffold_generator
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.4
6
+ version: 0.0.5
7
7
  date: 2006-02-26 00:00:00 -05:00
8
8
  summary: ActiveSalesforce Generator provides additional salesforce aware scaffolding support.
9
9
  require_paths: