Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/banker/newsmonger
/ functions
Functions
97 in github.com/banker/newsmonger
⨍
Functions
97
◇
Types & classes
31
↓ 17 callers
Method
new
app/controllers/users_controller.rb:4
↓ 6 callers
Function
e
()
public/javascripts/jquery-1.3.2.min.js:12
↓ 6 callers
Function
t
(F,E)
public/javascripts/jquery-1.3.2.min.js:19
↓ 5 callers
Function
F
(Y,U,ab,ac)
public/javascripts/jquery-1.3.2.min.js:19
↓ 5 callers
Function
Q
(T)
public/javascripts/jquery-1.3.2.min.js:19
↓ 5 callers
Method
authenticate
(email, secret)
app/models/user.rb:17
↓ 5 callers
Method
upvote
(story_id, user_id)
app/models/story.rb:39
↓ 4 callers
Function
E
(U,T)
public/javascripts/jquery-1.3.2.min.js:19
↓ 4 callers
Function
I
()
public/javascripts/jquery-1.3.2.min.js:12
↓ 4 callers
Function
J
(T,aa)
public/javascripts/jquery-1.3.2.min.js:19
↓ 4 callers
Function
j
(E,F)
public/javascripts/jquery-1.3.2.min.js:12
↓ 3 callers
Function
H
(I,J)
public/javascripts/jquery-1.3.2.min.js:19
↓ 3 callers
Function
L
()
public/javascripts/jquery-1.3.2.min.js:19
↓ 3 callers
Method
current_user
Accesses the current user from the session. Future calls avoid the database because nil is not equal to false.
lib/authentication.rb:18
↓ 3 callers
Method
password
app/models/user.rb:35
↓ 3 callers
Method
run
config/boot.rb:37
↓ 2 callers
Function
K
(N,O)
public/javascripts/jquery-1.3.2.min.js:12
↓ 2 callers
Function
N
(X)
public/javascripts/jquery-1.3.2.min.js:19
↓ 2 callers
Method
create
app/controllers/users_controller.rb:9
↓ 2 callers
Method
embedded_callbacks_on_create
lib/embedded_document_callbacks.rb:20
↓ 2 callers
Method
find_by_slug
(slug)
app/models/story.rb:31
↓ 2 callers
Function
i
(F,E)
public/javascripts/jquery-1.3.2.min.js:19
↓ 2 callers
Method
root?
Is this a root node?
app/models/comment.rb:68
↓ 2 callers
Method
threaded_with_field
Return an array of comments, threaded, from highest to lowest votes. Sorts by votes descending by default, but could use any other field. If you want
app/models/comment.rb:27
↓ 1 callers
Function
B
()
public/javascripts/jquery-1.3.2.min.js:19
↓ 1 callers
Method
authenticate
Filter method to enforce a sign_in requirement. To require sign_ins for all actions, use this in your controllers: before_filter :sign_in_required
lib/authentication.rb:59
↓ 1 callers
Method
authenticated?
(secret)
app/models/user.rb:31
↓ 1 callers
Method
boot!
config/boot.rb:8
↓ 1 callers
Method
gem_version
config/boot.rb:74
↓ 1 callers
Method
index
app/controllers/stories_controller.rb:9
↓ 1 callers
Method
load_rubygems
config/boot.rb:84
↓ 1 callers
Method
new
app/controllers/stories_controller.rb:5
↓ 1 callers
Method
new
app/controllers/sessions_controller.rb:6
↓ 1 callers
Method
password_required?
app/models/user.rb:55
↓ 1 callers
Method
set_password_code!
app/models/user.rb:59
↓ 1 callers
Method
show
app/controllers/stories_controller.rb:14
Function
P
(U,Z,Y,ad,aa,ac)
public/javascripts/jquery-1.3.2.min.js:19
Function
S
(U,Z,Y,ad,aa,ac)
public/javascripts/jquery-1.3.2.min.js:19
Function
a
(F)
public/javascripts/jquery-1.3.2.min.js:19
Method
access_denied
Redirect as appropriate when an access request fails. The default action is to redirect to the sign_in screen. Override this method in your controll
lib/authentication.rb:71
Method
assemble
Used by Comment#threaded_with_field to assemble the results.
app/models/comment.rb:45
Method
authorized?
Check if the user is authorized Override this method in your controllers if you want to restrict access to only a few actions or if you want to check
lib/authentication.rb:41
Method
auto_upvote
Comment owner automatically upvotes.
app/models/comment.rb:80
Method
before_create
(*methods)
lib/embedded_document_callbacks.rb:15
Method
booted?
config/boot.rb:15
Function
c
(H)
public/javascripts/jquery-1.3.2.min.js:19
Method
calculate_relevance
Stories are displayed in order of relevance. Relevance will eventually reach zero, at which point, stories are displayed in order of date posted and v
app/models/story.rb:59
Method
convert_to_slug
Create a slug from the title. From Sluggable Finder: http://github.com/ismasan/sluggable-finder/
app/models/story.rb:71
Method
create
app/controllers/stories_controller.rb:19
Method
create
app/controllers/sessions_controller.rb:12
Method
create
app/controllers/comments_controller.rb:9
Method
create_slug
Note: this slug creation code is vulnerable to race conditions. Refactoring forthcoming.
app/models/story.rb:82
Method
current_user=
Store the given user id in the session.
lib/authentication.rb:23
Method
destroy
app/controllers/sessions_controller.rb:23
Method
email=
(new_email)
app/models/user.rb:50
Function
handleReply
()
public/javascripts/application.js:4
Method
included
Inclusion hook to make #current_user and #signed_in? available as ActionView helper methods.
lib/authentication.rb:6
Method
included
(base)
lib/embedded_document_callbacks.rb:4
Method
increment_story_comment_count
app/models/comment.rb:84
Method
index
app/controllers/comments_controller.rb:5
Method
inherited
Make sure that each test case has a teardown method to clear the db after each test.
test/test_helper.rb:20
Function
k
()
public/javascripts/jquery-1.3.2.min.js:19
Method
load_initializer
config/boot.rb:44
Method
load_initializer
config/boot.rb:52
Method
load_rails_gem
config/boot.rb:58
Method
login_required
app/controllers/application_controller.rb:15
Method
parse_gem_version
(text)
config/boot.rb:97
Method
password=
(value)
app/models/user.rb:43
Method
pick_boot
config/boot.rb:19
Method
preinitialize
config/boot.rb:27
Method
preinitializer_path
config/boot.rb:31
Method
read_environment_rb
config/boot.rb:102
Method
redirect_back_or_default
Redirect to the URI stored by the most recent store_location call or to the passed default. Set an appropriately modified after_filter :store_location
lib/authentication.rb:96
Method
rubygems_version
config/boot.rb:70
Method
save_with_callbacks
lib/embedded_document_callbacks.rb:26
Method
set_path
Store the comment's path.
app/models/comment.rb:89
Method
should_be_signed_in_as
(&block)
test/test_helper.rb:29
Method
should_not_be_signed_in
test/test_helper.rb:39
Method
sign_in_from_basic_auth
Called from #current_user. Now, attempt to sign_in by basic authentication information.
lib/authentication.rb:109
Method
sign_in_from_session
Called from #current_user. First attempt to sign_in by the user id stored in the session.
lib/authentication.rb:102
Method
sign_out_keeping_session!
This is ususally what you want; resetting the session willy-nilly wreaks havoc with forgery protection, and is only strictly necessary on sign_in. How
lib/authentication.rb:118
Method
sign_out_killing_session!
The session should only be reset at the tail end of a form POST -- otherwise the request forgery protection fails. It's only really necessary when you
lib/authentication.rb:128
Method
signed_in?
Returns true or false if the user is signed in. Preloads @current_user with the user model if they're signed in.
lib/authentication.rb:12
Method
store_location
Store the URI of the current request in the session. We can return to this location by calling #redirect_back_or_default.
lib/authentication.rb:88
Method
store_user_data
Cache username and upvote.
app/models/story.rb:64
Method
teardown
test/test_helper.rb:12
Method
test_homepage
test/performance/browsing_test.rb:6
Method
to_param
app/models/story.rb:35
Function
u
()
public/javascripts/jquery-1.3.2.min.js:19
Method
upvote
Uses the class method of upvote to fire and forget.
app/controllers/stories_controller.rb:30
Method
upvote
app/controllers/comments_controller.rb:16
Method
upvote
Upvote this comment.
app/models/comment.rb:59
Function
upvoteComment
()
public/javascripts/application.js:12
Function
upvoteStory
()
public/javascripts/application.js:22
Method
user=
(user)
app/models/comment.rb:72
Method
vendor_rails?
config/boot.rb:23
Function
z
(E,F)
public/javascripts/jquery-1.3.2.min.js:12