rostra 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,12 @@
|
|
1
1
|
module Rostra
|
2
2
|
module ApplicationHelper
|
3
3
|
|
4
|
+
# Loop thru included helper files and include them in the project.
|
5
|
+
#
|
6
|
+
Rostra::Config.included_helpers.each do |helper_file|
|
7
|
+
include helper_file
|
8
|
+
end
|
9
|
+
|
4
10
|
# Creates a list of tags linking to the index showing only questions with that tag
|
5
11
|
#
|
6
12
|
def tag_list(question)
|
@@ -1,5 +1,13 @@
|
|
1
1
|
# Use this setup block to configure all options available in Rostra.
|
2
2
|
Rostra::Config.setup do |config|
|
3
|
+
|
4
|
+
# If you want to access helpers defined in your main app, add them to this array.
|
5
|
+
# For example, if you'd like to use helpers defined in your <tt>ApplicationHelper</tt>:
|
6
|
+
#
|
7
|
+
# config.included_helpers = [ ApplicationHelper ]
|
8
|
+
#
|
9
|
+
# config.included_helpers = []
|
10
|
+
|
3
11
|
# Helper method used to access current user in the view
|
4
12
|
# config.deliver_emails_from = 'change_me@example.com'
|
5
13
|
|
data/lib/rostra/config.rb
CHANGED
@@ -1,18 +1,31 @@
|
|
1
1
|
module Rostra
|
2
2
|
module Config
|
3
|
+
|
4
|
+
# If you want to access helpers defined in your main app, add them to this array.
|
5
|
+
# For example, if you'd like to use helpers defined in your <tt>ApplicationHelper</tt>:
|
6
|
+
#
|
7
|
+
# config.included_helpers = [ ApplicationHelper ]
|
8
|
+
#
|
9
|
+
mattr_accessor :included_helpers
|
10
|
+
@@included_helpers = []
|
11
|
+
|
3
12
|
# Helper method used to access current user in the view
|
13
|
+
#
|
4
14
|
mattr_accessor :deliver_emails_from
|
5
15
|
@@deliver_emails_from = 'change_me@example.com'
|
6
16
|
|
7
17
|
# Helper method used to access current user in the view
|
18
|
+
#
|
8
19
|
mattr_accessor :rostra_user
|
9
20
|
@@rostra_user = :current_user
|
10
21
|
|
11
22
|
# Method called on the rostra'd model (e.g. User) to access the users full name
|
23
|
+
#
|
12
24
|
mattr_accessor :rostra_user_name
|
13
25
|
@@rostra_user_name = :name
|
14
26
|
|
15
27
|
# Method called on the rostra'd model (e.g. User) to access the users email
|
28
|
+
#
|
16
29
|
mattr_accessor :rostra_user_email
|
17
30
|
@@rostra_user_email = :email
|
18
31
|
|
@@ -27,10 +40,12 @@ module Rostra
|
|
27
40
|
@@rostra_user_avatar = :avatar
|
28
41
|
|
29
42
|
# Route to your login page
|
43
|
+
#
|
30
44
|
mattr_accessor :main_app_login_path
|
31
45
|
@@main_app_login_path = :new_user_session_path
|
32
46
|
|
33
47
|
# Route to your signup page
|
48
|
+
#
|
34
49
|
mattr_accessor :main_app_signup_path
|
35
50
|
@@main_app_signup_path = :new_user_registration_path
|
36
51
|
|
data/lib/rostra/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: rostra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.10
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Cory Schires
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-10-
|
13
|
+
date: 2011-10-20 00:00:00 -05:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|