appoxy_ui 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown ADDED
@@ -0,0 +1 @@
1
+ Nada.
data/lib/appoxy_ui.rb ADDED
@@ -0,0 +1,2 @@
1
+ require File.join(File.dirname(__FILE__), "ui", "application_helper")
2
+
@@ -0,0 +1,32 @@
1
+ module Appoxy
2
+
3
+ module UI
4
+
5
+ module ApplicationHelper
6
+
7
+ FLASH_NAMES = [:error, :info, :success, :warning, :validation]
8
+
9
+ def flash_messages
10
+ return unless messages = flash.keys.select{|k| FLASH_NAMES.include?(k)}
11
+ formatted_messages = messages.map do |type|
12
+ content_tag :div, :class => type.to_s do
13
+ message_for_item(flash[type], flash["#{type}_item".to_sym])
14
+ end
15
+ end
16
+ formatted_messages.join
17
+ end
18
+
19
+
20
+ def message_for_item(message, item = nil)
21
+ if item.is_a?(Array)
22
+ message % link_to(*item)
23
+ else
24
+ message % item
25
+ end
26
+ end
27
+ end
28
+
29
+ end
30
+
31
+ end
32
+
metadata ADDED
@@ -0,0 +1,57 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: appoxy_ui
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Travis Reeder
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2010-02-02 00:00:00 -08:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: Appoxy UI gem description...
17
+ email: travis@appoxy.com
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - README.markdown
24
+ files:
25
+ - lib/appoxy_ui.rb
26
+ - lib/ui/application_helper.rb
27
+ - README.markdown
28
+ has_rdoc: true
29
+ homepage: http://www.appoxy.com
30
+ licenses: []
31
+
32
+ post_install_message:
33
+ rdoc_options:
34
+ - --charset=UTF-8
35
+ require_paths:
36
+ - lib
37
+ required_ruby_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: "0"
42
+ version:
43
+ required_rubygems_version: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: "0"
48
+ version:
49
+ requirements: []
50
+
51
+ rubyforge_project:
52
+ rubygems_version: 1.3.5
53
+ signing_key:
54
+ specification_version: 3
55
+ summary: Appoxy UI gem
56
+ test_files: []
57
+