disclaimer 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -87,6 +87,17 @@ Segments at /disclaimer/segments. If you wish to modify the controller behaviour
87
87
  to the same location in your application, and modify these copies. The versions
88
88
  in your application will take precedence over those in disclaimer.
89
89
 
90
+ == Managing views
91
+
92
+ The default views are simple, and you will probably want to modify them.
93
+ To do this create disclaimer view files in your host app. These will take
94
+ precedence over the versions located in the gem.
95
+
96
+ To create your own disclaimer page, create a new show file within your host
97
+ rails app. For example:
98
+
99
+ /app/views/disclaimer/documents/show.html.erb
100
+
90
101
  == Into production
91
102
 
92
103
  I would recommend using seeding to generate your initial disclaimer documents,
@@ -10,7 +10,4 @@
10
10
  // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11
11
  // GO AFTER THE REQUIRES BELOW.
12
12
  //
13
- //= require jquery
14
- //= require jquery_ujs
15
- //= require jquery-ui
16
13
  //= require_tree .
@@ -1,11 +1,12 @@
1
1
  module Disclaimer
2
2
  class Document < ActiveRecord::Base
3
- attr_accessible :footer, :header, :title, :name, :segments
3
+ attr_accessible :footer, :header, :title, :name, :segments, :segment_ids
4
4
 
5
5
  before_save :underscore_name
6
6
 
7
7
  has_many :segment_holders, :uniq => true
8
8
  has_many :segments, :through => :segment_holders, :uniq => true
9
+ accepts_nested_attributes_for :segments
9
10
 
10
11
  validates :name, :presence => true
11
12
 
@@ -2,7 +2,6 @@
2
2
  <h1><%= @document.title %></h1>
3
3
  <%= @document.header %>
4
4
  </header>
5
- <%= javascript_tag('$(function() {$( "#articles" ).accordion({heightStyle: "content"});});') %>
6
5
  <div id="articles">
7
6
  <% @document.segments.each do |segment| %>
8
7
 
@@ -1,3 +1,3 @@
1
1
  module Disclaimer
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
Binary file
Binary file