Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A Guilded component that creates adabtaple show (detail) views of a single ActiveRecord object.
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
script
tasks
test
.rvmrc
History.txt
LICENSE
README.rdoc
Rakefile
VERSION
g_sectioned_shower.gemspec

README.rdoc

g_sectioned_shower

github.com/midas/g_sectioned_shower/tree/master

DESCRIPTION:

A Guilded (github.com/midas/guilded/tree/master) component that creates adaptable show (detail) views of a single ActiveRecord object.

FEATURES:

  • Generates a detail view of an ActiveRecord object using a XHTML data list

  • Can generate a status field (to integrate with AASM, etc)

  • Adaptable title section

  • Generates one main section and zero too many other sections

  • Can generate different sections of the detail (not necessarily divided by domain model)

  • Can pull details from associated has_one or belongs_to record

  • Can generate link to associated has_one or belongs_to record

  • Can pull details from associated has_many records (allows you to specify max and generates an efficient query)

  • Can generate link to associated has_many records and the associations list page

  • Can configure sections to dynamically display based on any conditions

INSTALL:

sudo gem install midas-g_sectioned_shower

In Rails environement.rb file:

config.gem 'midas-g_sectioned_shower', :version => '1.0.3', :lib => 'g_sectioned_shower', :source => 'http://gems.github.com'

USAGE:

View:

<%= g_sectioned_shower @item, :title_attr => :name, :date_format => :us_long, :status => @ticket.status,

      :id => 'item-detail', :sections => [ { :attributes => [:is_active, :created_at, :updated_at }, 
      { :title => 'Owner', :attributes => [:person], :person_attributes => [:first_name, :last_name, :address => 'Street Address'] } ] 
%>

Results in:

coming soon ...

REQUIREMENTS:

LICENSE:

(The MIT License)

Copyright © 2009 C. Jason Harrelson (midas)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Something went wrong with that request. Please try again.