beef-text_elements 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/models/text_element.rb +3 -3
- data/app/views/admin/text_elements/index.html.erb +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.5
|
data/app/models/text_element.rb
CHANGED
@@ -11,7 +11,7 @@ class TextElement < ActiveRecord::Base
|
|
11
11
|
rescue NoMethodError
|
12
12
|
#retrieve a value
|
13
13
|
te = object(method_name)
|
14
|
-
"<div class=\"ugc\">#{te.value || dummy_text(
|
14
|
+
"<div class=\"ugc\">#{te.value || dummy_text(te)}</div>"
|
15
15
|
end
|
16
16
|
|
17
17
|
#retrieve the actual Setting record
|
@@ -19,7 +19,7 @@ class TextElement < ActiveRecord::Base
|
|
19
19
|
TextElement.find_or_create_by_var(var_name.to_s)
|
20
20
|
end
|
21
21
|
|
22
|
-
def self.dummy_text(
|
23
|
-
"<p
|
22
|
+
def self.dummy_text(te)
|
23
|
+
"<p>#{te.var.titleize} dummy text. You can edit this text <a href=\"/admin/text_elements/#{te.id}\">here</a></p>"
|
24
24
|
end
|
25
25
|
end
|
@@ -16,7 +16,7 @@
|
|
16
16
|
<td class="title"><%=h text_element.var.titleize %></td>
|
17
17
|
<td><%= truncate(text_element.value_plain, 50, '…') %></td>
|
18
18
|
<td class="date"><%= text_element.updated_at.to_formatted_s(:short) %></td>
|
19
|
-
<td class="action"><%= link_to 'Edit', [:admin, text_element], :class => 'edit' %></td>
|
19
|
+
<td class="action"><%= link_to 'Edit', [:admin, text_element], :class => 'edit', :title => 'Edit this element' %></td>
|
20
20
|
</tr>
|
21
21
|
<% end %>
|
22
22
|
</tbody>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beef-text_elements
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve England
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-
|
12
|
+
date: 2010-02-25 00:00:00 +00:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|