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
{% if post.tags %} | |
<ul class="post-tags"> | |
{% for tag in post.tags %} | |
{% if tag not in skiptags %} | |
<li><a href="/tag/{{ tag }}">{{ tag }}</a></li> | |
{% endif %} | |
{% endfor %} | |
</ul> | |
{% endif %} |
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
{% set skiptags = ['bananas', 'apples', 'status:finaldraft'] %} |
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
koret_development=# select surveys.id, surveys.title,count(*) as count from surveys, survey_sessions, users where survey_sessions.completed_at is not null and users.id = survey_sessions.user_id and survey_sessions.survey_id = surveys.id group by surveys.id order by count; | |
(END) | |
id | title | count | |
----+---------------------------------------------------------------------------------------------------------------------------------------+------- | |
17 | Additional surveys will be added here | 5 | |
22 | TEST YOUR KNOWLEDGE - Feline Sanitation | 22 | |
11 | Performing Health Exams | 34 | |
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
2 | |
1 | |
2 | |
1 | |
2 | |
11 | |
6 | |
1 | |
8 | |
1 |
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
class State < ActiveRecord::Base | |
has_many :case_type_states | |
has_many :case_types, :through => :case_type_states | |
has_many :process_types, :through => :case_type_states | |
def case_type_processes=(hash) | |
hash.each do |case_type_id, process_type_ids| | |
case_type_states.create!(:case_type_id => case_type_id, | |
:process_type_ids => process_type_ids) | |
end |
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
require 'active_record' | |
unless defined?(Page) | |
class Page < ActiveRecord::Base; end | |
end | |
unless defined?(ApplicationController) | |
class ApplicationController; end | |
end |
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
def next | |
page = self.class.choose(self, 'rgt >', :first) | |
page ||= self.class.choose(self, 'lft <', :first) | |
end | |
def prev | |
page = self.class.choose(self, 'lft <', :last) | |
page ||= self.class.choose(self, 'rgt >', :last) | |
end |
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
class CanonicalRedirect | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
request = Rack::Request.new(env) | |
# | |
# | |
# |
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
module NavigationHelpers | |
module Refinery | |
module Authentication | |
def path_to(page_name) | |
case page_name | |
when /the signup page/ | |
signup_path | |
else |
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
<feed> | |
<entry> | |
<title>The Artwork Title</title> | |
<author> | |
<name>First Name & Last Name</name> | |
<email>[email protected]</email> | |
<website>http://www.hello.com</website> | |
<location>Chicago, IL</location> | |
</author> | |
<vice>Hookers</vice> |
NewerOlder