Skip to content
Browse files

docs

  • Loading branch information...
1 parent 9cf459c commit 04574c192b192e0a1f5d748a492aafd703f801bf @maccman maccman committed Sep 28, 2011
View
4 README
@@ -5,6 +5,4 @@ TODO
Views in jQuery.tmpl
Associations
Testing
-CommonJS
-WebSockets
-
+CommonJS
View
4 app/views/docs/index.html.erb
@@ -19,8 +19,10 @@
<article>
<div><h3><%= link_to "Controller patterns", docs_path("controller_patterns") %></h3> <span>Common controller abstractions</span></div>
<div><h3><%= link_to "Controller Manager", docs_path("controller_manager") %></h3> <span>Controller state machine</span></div>
- <div><h3><%= link_to "Using forms", docs_path("forms") %></h3> <span>Forms and validation</span></div>
+ <div><h3><%= link_to "Forms & Validation", docs_path("forms") %></h3> <span>Process forms and validate models</span></div>
<div><h3><%= link_to "Ajax", docs_path("ajax") %></h3> <span>Custom Ajax integration with models</span></div>
<div><h3><%= link_to "Hem", docs_path("hem") %></h3> <span>Dependency management with Hem</span></div>
<div><h3><%= link_to "Spine.app", docs_path("app") %></h3> <span>Generating Spine Apps</span></div>
+ <div><h3><%= link_to "Rails integration", docs_path("rails") %></h3> <span>Integrate Spine with Rails using REST</span></div>
+ <div><h3><%= link_to "Realtime apps", docs_path("realtime") %></h3> <span>Make your Spine app realtime!</span></div>
</article>
View
2 app/views/docs/models.md
@@ -170,7 +170,7 @@ If `validate()` returns anything, the validation will fail and an *error* event
Contact.bind "error", (rec, msg) ->
alert("Contact failed to save - " + msg)
-In addition, `save()`, `create()` and `updateAttributes()` will all return false if validation fails. For more information about validation, see the [validation guide](<%= docs_path("models_validation") %>).
+In addition, `save()`, `create()` and `updateAttributes()` will all return false if validation fails. For more information about validation, see the [validation guide](<%= docs_path("form") %>).
##Serialization
View
3 app/views/docs/models_validation.md
@@ -1,3 +0,0 @@
-<% title 'Validation' %>
-
-TODO
View
2 app/views/docs/realtime.md
@@ -85,7 +85,7 @@ That's pretty straightforward. So, the messages we broadcast to Juggernaut need
"record": {"name": "First one!"}
}
-We can create this server-side, broadcasting it to Juggernaut whenever a record changes. For example, we could use Juggernaut's Ruby adapter in Rails to integrate with ActiveRecord models. Here we're using an observer, to record whenever the `Page` model changes.
+We can create this server-side, broadcasting it to Juggernaut whenever a record changes. For example, we could use Juggernaut's Ruby adapter in Rails to integrate with ActiveRecord models. Here we're using an observer to record whenever the `Page` model changes.
class JuggernautObserver < ActiveRecord::Observer
observe :page
View
7 app/views/docs/testing.md
@@ -2,4 +2,9 @@
Jasmine
-Debugging
+Debugging
+
+##Testing models
+
+##Testing controllers
+
View
35 app/views/docs/views_tmpl.md
@@ -1,6 +1,39 @@
<% title 'Views & Templating using jQuery.tmpl' %>
-##Tmpl templates
+A
+
+##Tmpl syntax
+
+ object
+ url: "http://example.com"
+ getName: -> "Trevor"
+
+ template = '<li><a href="${url}">${getName()}</a></li>'
+
+ # Produces: <li><a href="http://example.com">Trevor</a></li>
+ element = jQuery.tmpl(template, object);
+
+ $("body").append(element)
+
+ {{if url}}
+ ${url}
+ {{/if}}
+
+ {{if messages.length}}
+ <!-- Display messages... -->
+ {{else}}
+ <p>Sorry, there are no messages</p>
+ {{/if}}
+
+ object =
+ foo: "bar"
+ messages: ["Hi there", "Foo bar"]
+
+ <ul>
+ {{each messages}}
+ <li>${$index + 1}: <em>${$value}</em></li>
+ {{/each}}
+ </ul>
##Compiling templates
View
2 app/views/layouts/docs.html.erb
@@ -35,8 +35,8 @@
<li><%= link_to "Controller patterns", docs_path("controller_patterns") %></li>
<li><%= link_to "Controller Manager", docs_path("manager") %></li>
<li><%= link_to "Forms & Validation", docs_path("forms") %></li>
- <li><%= link_to "Ajax integration", docs_path("ajax") %></li>
<li><%= link_to "Using Local Storage", docs_path("local") %></li>
+ <li><%= link_to "Using Ajax", docs_path("ajax") %></li>
<li><%= link_to "Using Spine.app", docs_path("app") %></li>
<li><%= link_to "Using Hem", docs_path("hem") %></li>
<li><%= link_to "Rails integration", docs_path("rails") %></li>
View
5 app/views/pages/examples.html.erb
@@ -8,11 +8,14 @@
<img src="https://lh4.googleusercontent.com/_IH1OempnqUc/TZF16JZSTlI/AAAAAAAABKM/ojAu7OBqXp8/s500/Screen%20shot%202011-03-29%20at%2019.01.44.png"/>
- <p>Spine contacts is a simple address book, allowing users to CRUD contacts. The full source is <a href="http://github.com/maccman/spine.contacts">available on GitHub</a>. *WebKit only*. <a href="http://maccman.github.com/spine.contacts">[Demo]</a></p>
+ <p>Spine contacts is a simple address book, allowing users to CRUD contacts. The full source is <a href="http://github.com/maccman/spine.contacts">available on GitHub</a>. <a href="http://maccman.github.com/spine.contacts">[Demo]</a></p>
<img src="https://lh5.googleusercontent.com/_IH1OempnqUc/TZpgYfnlUBI/AAAAAAAABKg/UYLhdmoc15o/s500/contacts.png" />
<p>Holla is the most advanced example, and <a href="http://github.com/maccman/holla">can be found on GitHub</a>. Holla is a group chat application, and uses a combination of <a href="http://rubyonrails.org">Rails</a>, <a href="http://github.com/maccman/juggernaut">Juggernaut</a> and Spine to let users chat in realtime. *WebKit only*. <a href="http://maccman-holla.heroku.com">[Demo]</a></p>
<img src="https://lh4.googleusercontent.com/_IH1OempnqUc/TZF1gMnidmI/AAAAAAAABKE/b9rp9RdtA3o/s500/Screen%20shot%202011-03-29%20at%2018.58.12.png" />
+ <p>The <a href="https://github.com/maccman/spine.rails3">last example</a> is a demonstration of integrating Spine &amp; Rails 3. There's also an example of realtime sync in the <a href="https://github.com/maccman/spine.rails3/tree/fowa">fowa</a> branch. <a href="http://spine-fowa.herokuapp.com/">[Demo]</a></p>
+
+ <img src="https://lh4.googleusercontent.com/-vxBcOT0TIpM/ToNWaL-o83I/AAAAAAAABao/ObsGjxoX5oQ/s500/Screen%252520Shot%2525202011-09-27%252520at%25252022.16.41.png">
</article>

0 comments on commit 04574c1

Please sign in to comment.
Something went wrong with that request. Please try again.