Main > Programming > Libraries >

Rails History Plugin 0.2

Rails History Plugin 0.2

Sponsored Links

Rails History Plugin 0.2 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.011 MB
Platform: Any Platform
License: MIT/X Consortium License
Price:
Downloads: 1215
Date added: 2006-06-29
Publisher: Damien Merenne

Rails History Plugin 0.2 description

Rails History Plugin is a Ruby on Rails plugin that stores user actions (i.e. URLs that the user has recently visited).
It avoids storage of POST and AJAX requests, and it provides a manual way to specify which actions not to store.
Installation:
Unpack into the vendor/plugin and that should be it.
Usage:
In your app/controllers/application_controller.rb, add a history line like this:
class ApplicationController < ActionController::Base
history :default => "http://default.url.com/",
:max => 10
end
The history function accepts a hash of options
:default, the default URL to redirect
:max, the maximum locations to remember (five by defaults).
None of the parameters are required. If somebody knows of a better way to obtain the default URL, he is welcomed to tell me how.
You can use the method history_skip in your controller if you want to avoid certain location to be stored in the history. By default, action resulting from a POST, PUT, DELETE request or an Ajax request are not stored in the history.
class FooController < ApplicationController
history_skip :action_to_skip
def action_to_skip
# I will not be stored in the history
end
end
In your actions, you can then use the following methods:
last_location: returns the last visited location, can be used with one numeric argument precising how many locations to go back in the history (1 by default),
peek_last_location: like last_location but dont remove it from the history,
redirect_back: redirect the user to the last location in history, it takes the same arguments as last_location,
store_location(force = false): stores the current location in the history, set force parameter to true to store location even if it would be skipped.
Note that if you want to use the plugin to create a "back" link on a page, you must go back two times. For example, using this controller
class HistoryController < ApplicationController
def foo
end
def bar
end
def back
redirect_back(2)
end
end
Ill try to explain clearly why. Lets say that in your bar view, you create a back link wich links to the back action. Now a user visits foo then bar. What you want is your user being redirected to foo when clicking your "back" link. Now your user hits the link. The controller will call the back action. From its point of view, you are in the back action so going back one time would take you to the bar action.
Enhancements:
- This release fixes a bug where a user variable was stored in a class variable instead of a session one, so a user going back would make another one skip a page in its history.
- The plugin no longer stores PUT and DELETE requests.
- A peek_last_location method was added to look at the history without modifying it, and a "force" parameter was added to the store_location method to force storing of a location even if it would normally be skipped.

Rails History Plugin 0.2 Screenshot

Advertisements

Rails History Plugin 0.2 Keywords

Bookmark Rails History Plugin 0.2

Hyperlink code:
Link for forum:

Rails History Plugin 0.2 Copyright

WareSeeker periodically updates pricing and software information of Rails History Plugin 0.2 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Rails History Plugin 0.2 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
Rails Page Cache Test Plugin adds two assertions to the Test::Units::TestCase class of Ruby on Rails. Free Download
Ruby on Rails SubList Plugin makes it easy to have dynamic lists of related models on a single editing page. Free Download
The jEdit Ruby Editor Plugin lets you manipulate Ruby and Rails code at the syntax level. Free Download
XFCE Radio Plugin is an XFCE panel plugin which allows you to control your v4l radio device from within the panel. Free Download
This class can be used to keep track of the pages navigated by a user, so it can generate back or next links. Free Download
Xfce 4 Radio Plugin is a plugin to control your V4l radio device. Free Download
Xfce 4 Dict Plugin can help you query a dictionary server(see RFC 2229) to search for the translation or explanation of a word. Free Download
hReview WordPress Plugin is a plugin that allows for the easy entry of hReview microformat content for reviews in WordPress. Free Download