Linux SoftwareProgrammingLibrariesRails History Plugin 0.2

Rails History Plugin 0.2


Rails History Plugin is a Ruby on Rails plugin that stores user actions (i.e
Developer:   Damien Merenne
      more software by author →
Price:  0.00
License:   MIT/X Consortium License
File size:   10K
Language:   
OS:   
Rating:   0 /5 (0 votes)
Your vote:  
enlarge screenshot


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 don't 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

I'll try to explain clearly why. Let's 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.

What's New in This Release:
  • 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.
    tags the history  last location  you want  store location  the back  use the  back action  default url  back link  view you  end def  going back  was added  

    Download Rails History Plugin 0.2


     http://www.cosinux.org/~dam/projects/rails-history/rails_history-0.2.tar.bz2


    Authors software

    RailsTidy 0.1 (by Damien Merenne)
    RailsTidy project is a plugin for Ruby On Rails.

    Here are some key features of "RailsTidy":
    · validate your rhtml templates,
    · v

    Rails History Plugin 0.2 (by Damien Merenne)
    Rails History Plugin is a Ruby on Rails plugin that stores user actions (i.e


    Similar software

    Rails History Plugin 0.2 (by Damien Merenne)
    Rails History Plugin is a Ruby on Rails plugin that stores user actions (i.e

    History links 1.3 (by Vladimir Kudryavtsev)
    This class can be used to keep track of the pages navigated by a user, so it can generate back or next links providing a similar effe

    browser-history 2.8 (by Colas Nahaboo)
    Browser-history is a small and efficient daemon that keeps your browser history, independent of the browser you use.

    Browser-histo

    CVS History 0.8.0 (by Andrew Hsu)
    CVS History is a Web application for searching the history of CVS actions

    Rails Page Cache Test Plugin 0.2 (by canatella)
    Rails Page Cache Test Plugin adds two assertions to the Test::Units::TestCase class of Ruby on Rails to check the caching and expirin

    kio_history 0.1 (by Luke Sandell)
    kio_history is a protocol to access Konqueror's browsing history

    American History Lux 1.0.7 (by Sillysoft Games)
    American History Lux game takes you through the wars that have shaped American History

    Wiclear 0.10.1 (by David Jobet)
    Wiclear project is a Wiki engine

    Browser History Viewer 0.0.10 (by Loren Bandiera)
    Browser History Viewer allows you to examine the contents of web browser history files and export the data.

    Currently it supports

    RailsTidy 0.1 (by Damien Merenne)
    RailsTidy project is a plugin for Ruby On Rails.

    Here are some key features of "RailsTidy":
    · validate your rhtml templates,
    · v


    Other software in this category

    zlib 1.2.3 (by Jean-loup Gailly)
    zlib is designed to be a free, general-purpose, legally unencumbered, lossless data-compression library for use on virtually any comp

    libjpeg v6b (by Independent JPEG Group)
    libjpeg is a library for handling the JPEG (JFIF) image format

    OpenSSL 0.9.7c (by The OpenSSL Project Team)
    The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implement

    libxml2 2.6.27 (by DV)
    Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform), libxml2 library i

    GNU C library 2.4 (by Andreas Jaeger)
    GNU C library (glibc) is one of the most important components of GNU Hurd and most modern Linux distributions.

    GNU C library is us

  •     search


    Featured Software

    jEdit 4.3 pre8
    jEdit is an Open Source text editor written in Java

    Opera 9.02
    Surf the Internet in a safer, faster, and easier way with Opera browser

    GNU Aspell 0.60.4
    GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell


    Subscribe in Rojo
    Google Reader
    Add to My Yahoo!

    Add to My AOL
    Subscribe with Bloglines
    Subscribe in NewsGator Online
    Add 'nixbit linux software' to Newsburst from CNET News.com
    del.icio.us nixbit linux software


    Top tags