andy_admin 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,7 @@ module AndyAdminHelper
4
4
  date = value.strftime("%A, %e %B %Y")
5
5
  if date != @last_date
6
6
  @last_date = date
7
- "<div class='date_breakout'>#{date}</div>"
7
+ "<div class='date_breakout'>#{date}</div>".html_safe
8
8
  end
9
9
  end
10
10
  end
@@ -8,13 +8,14 @@ class AndyAdmin::FormBuilder < ActionView::Helpers::FormBuilder
8
8
  define_method(name) do |field_name, *args|
9
9
  options = args.extract_options!
10
10
  options[:title] ||= field_name.to_s.humanize
11
- heading = "<h2>" + options[:title] + "</h2>"
11
+ heading = ("<h2>" + options[:title] + "</h2>").html_safe
12
12
  heading += error_message_on(field_name, args)
13
13
  description = if options[:description]
14
- @template.content_tag(:div, options[:description], :class => "description")
14
+ @template.content_tag(:div, options[:description].html_safe, :class => "description")
15
15
  else
16
- ""
16
+ "".html_safe
17
17
  end
18
+ input = "".html_safe
18
19
  options.merge!({:class => name})
19
20
  if name == "check_box"
20
21
  label = label(field_name, options[:label])
@@ -29,16 +30,16 @@ class AndyAdmin::FormBuilder < ActionView::Helpers::FormBuilder
29
30
  end
30
31
 
31
32
  def actions
32
- @template.concat @template.content_tag(:div, yield, :class => "actions")
33
+ @template.concat @template.content_tag(:div, yield.html_safe, :class => "actions")
33
34
  end
34
35
 
35
36
  def submit(label, *args)
36
37
  options = args.extract_options!
37
38
  options[:colour] ||= "green"
38
- @template.content_tag(:button, label, :class => "awesome #{options[:colour]}", :type => "submit")
39
+ @template.content_tag(:button, label.html_safe, :class => "awesome #{options[:colour]}", :type => "submit")
39
40
  end
40
41
 
41
42
  def cancel(label, link)
42
- @template.content_tag(:a, label, :href => link)
43
+ @template.content_tag(:a, label.html_safe, :href => link)
43
44
  end
44
45
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 3
9
- version: 0.0.3
8
+ - 4
9
+ version: 0.0.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Andy Jeffries