cowtech-rails 1.7.7.0 → 1.7.8.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -29,21 +29,17 @@ module Cowtech
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
+
def google_font_stylesheet(font)
|
33
|
+
tag('link', {:rel => :stylesheet, :type => Mime::CSS, :href => "http://fonts.googleapis.com/css?family=#{font}"}, false, false)
|
34
|
+
end
|
35
|
+
|
32
36
|
def get_data(key = nil, default = "")
|
33
|
-
|
34
|
-
|
35
|
-
begin
|
36
|
-
rv = @controller_data[key]
|
37
|
-
rescue
|
38
|
-
rv = default
|
39
|
-
end
|
40
|
-
|
41
|
-
rv
|
37
|
+
@controller_data.is_a?(Hash) ? @controller_data.fetch(key.to_sym, default) : default
|
42
38
|
end
|
43
39
|
|
44
40
|
def set_data(key, value)
|
45
41
|
@controller_data = {} unless defined?(@controller_data) && @controller_data.is_a?(Hash)
|
46
|
-
@controller_data[key] = value
|
42
|
+
@controller_data[key.to_sym] = value
|
47
43
|
end
|
48
44
|
|
49
45
|
def get_param(key, default = nil)
|
data/lib/cowtech/version.rb
CHANGED