-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- rails view helpers instead of Isotope module methods
- rails 3 init file - improved rails app samples - plugin in rails sample app symlinked
- Loading branch information
Showing
29 changed files
with
362 additions
and
585 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
gem-public_cert.pem | ||
examples/rails3-example/log | ||
examples/rails3-example/tmp | ||
pkg | ||
pkg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
examples/rails3-example/app/controllers/welcome_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class WelcomeController < ApplicationController | ||
def index | ||
end | ||
end |
20 changes: 11 additions & 9 deletions
20
examples/rails3-example/app/views/articles/article.html.ejs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
<h2><%=item.title%></h2> | ||
<div class="article"> | ||
<h3><%=item.title%></h3> | ||
|
||
<div class="content"> | ||
<%=item.content%> | ||
</div> | ||
<div class="content"> | ||
<%=item.content%> | ||
</div> | ||
|
||
<ul class="tags"> | ||
<%item.tags.forEach(function (tag) {%> | ||
<li><%=tag.name%></li> | ||
<%});%> | ||
</ul> | ||
<ul class="tags"> | ||
<%item.tags.forEach(function (tag) {%> | ||
<li><a href="/tag/<%=encodeURIComponent(tag.name)%>"><%=tag.name%></a></li> | ||
<%});%> | ||
</ul> | ||
</div> |
29 changes: 29 additions & 0 deletions
29
examples/rails3-example/app/views/articles/render_client.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<script> | ||
window.addEvent("domready",function () { | ||
new Request.JSON({ | ||
url:"/articles/article_object", | ||
onSuccess:function (data) { | ||
$("single").set("html",Isotope($("article-template").get("text"),{ item:data })); | ||
}, | ||
}).get(); | ||
|
||
new Request.JSON({ | ||
url:"/articles/article_object_list", | ||
onSuccess:function (data) { | ||
$("list").set("html",Isotope($("article-template").get("text"), data)); | ||
}, | ||
}).get(); | ||
}); | ||
</script> | ||
|
||
<%= isotope_render_template('articles/article', :id => "article-template").html_safe %> | ||
|
||
<h1>Articles</h1> | ||
|
||
<h2>Single Example</h2> | ||
|
||
<div id="single" class="article-list"></div> | ||
|
||
<h2>List Example</h2> | ||
|
||
<div id="list" class="article-list"></div> |
5 changes: 5 additions & 0 deletions
5
examples/rails3-example/app/views/articles/render_server_template_in_view.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<h1>Articles</h1> | ||
|
||
<div class="article-list"> | ||
<%= isotope_render_partial('articles/article', :collection => @articles).html_safe %> | ||
</div> |
Oops, something went wrong.