This file contains hidden or 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
def add_subagent_link(name, div) | |
link_to_function name do |page| | |
page.insert_html :top, div.to_sym, :partial => 'subagent', :object => CompanyCompany.new | |
end | |
end |
This file contains hidden or 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
.bigsansed | |
=link_to_function "Clients", nil do |page| | |
-@companies = @clients | |
-page.replace_html :companies, :partial => "companies" |
This file contains hidden or 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
<% Columnlog::Column.all.each do |column| %> | |
<div id="left" style="float:left;width:250px;padding:3px;margin:5px;"> | |
<h1><%= column.name.capitalize %></h1> | |
<br/> | |
<% column.app.get(10).each do |post| %> | |
<b><%= post.body %></b><br/> | |
<i><%= post.posted_at %></i> | |
<p/> | |
<% end %> | |
</div> |
This file contains hidden or 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
- id: 4 | |
name: text | |
title: Text | |
app_type: Text | |
url: http://wehavelazers.com | |
settings: |
This file contains hidden or 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
--- | |
- title: News 12/5/08 | |
body: Not too much news today! Not too much news today! Not too much news today! Not too much news today! | |
posted_at: Fri Dec 05 15:32:10 -0500 2008 | |
- title: News 12/4/08 | |
body: Not too much news today! | |
posted_at: Fri Dec 04 12:21:30 -0500 2008 |
This file contains hidden or 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 is a test! |
This file contains hidden or 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
module ActionView | |
module Helpers | |
class InstanceTag | |
def to_check_box_tag(options = {}, checked_value = "1", unchecked_value = "0") | |
options = options.stringify_keys | |
options["type"] = "checkbox" | |
options["value"] = checked_value | |
if options.has_key?("checked") | |
cv = options.delete "checked" | |
checked = cv == true || cv == "checked" |
This file contains hidden or 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
module ActionView | |
module Helpers | |
class InstanceTag | |
def to_check_box_tag(options = {}, checked_value = "1", unchecked_value = "0") | |
options = options.stringify_keys | |
options["type"] = "checkbox" | |
options["value"] = checked_value | |
if options.has_key?("checked") | |
cv = options.delete "checked" | |
checked = cv == true || cv == "checked" |
This file contains hidden or 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
def unique_name | |
errors.add_to_base "Full Name must be Unique" if Author.all.collect{|x| x.title}.include?("#{lastname.upcase}, #{firstname.upcase}") | |
end |
This file contains hidden or 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
>> d = "http://github.com/quirkey.atom" | |
=> "http://github.com/quirkey.atom" | |
>> Nokogiri::HTML(open(d).read).xpath('//entry').length | |
=> 20 |