0.0
No commit activity in last 3 years
No release in over 3 years
Inject some routes in your app that provides screens that help visualize any ressource versions, values and differences. Provide the ability no navigate related entities versions details.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

< 5, >= 4.0.3
 Project Readme

Historiqueux¶ ↑

This is a mountable gem that add a bootstrap presentation layer to paper_trail.

Inject some routes in your app that provides screens to help visualize any ressource versions, values and differences. Provide the ability no navigate related entities versions details.

Installation :¶ ↑

Add the following line to your Gemfile

Rails 4¶ ↑

gem 'historiqueux'

Usage¶ ↑

Mount the historiqueux gem in your routes:

mount Historiqueux::Engine => "/"

The routes that will be available are :

get '/historiqueux/:resource/:resource_id', to: 'history#index'
get '/historiqueux/:resource/:resource_id/relations/:relation_resource', to: 'history#index_relations'
get '/historiqueux/:resource/:resource_id/:version_id', to: 'history#show'

where :resource is the name of your model (you can use namespace)

Include the needed javascript file in your application.js or application.js.coffee¶ ↑

Javascript¶ ↑

//= require historiqueux/history

CoffeeScript¶ ↑

#= require historiqueux/history

Call url of historiqueux screens, for exemple, like that:

<%= link_to "<i class='icon-time text-blue'></i> Historique".html_safe,
    "/historiqueux/client::customer/#{@customer.id}?parent_div=ajax_target",
    :id => "history_tab", :data => {:remote => true} %>

With a binding like that in your application.js.coffee

$(document).delegate '#history_tab', 'ajax:success', (e, data, status, xhr) ->
  $('.tab_header').removeClass('active')
  $('#history_tab_header').addClass('active')
  $('#ajax_target').html(xhr.responseText)

Credits¶ ↑

Andy Stewart - The creator of papertrail.

Contributors¶ ↑

Serge Savoie

Rémi Gagnon

More¶ ↑

www.groupefungo.ca