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
class StaleObject | |
include Redmine::I18n | |
include ERB::Util | |
attr_accessor :attributes | |
attr_accessor :changes | |
def initialize(stale_object) | |
raise ArgumentError.new("Call with an ActiveRecord object") unless stale_object.respond_to?(:attributes) | |
@attributes = stale_object.attributes.dup | |
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
I friend contacted me about a position opening at their startup. They'd prefer someone local to Portland, OR (USA) but are flexible. If you're interested, contact Tony McCormick: tony [AT] mi-squared [DOT] com and mention that you heard it from me (Eric Davis). | |
---------- | |
Wanted: | |
Looking for someone that is technically savvy, a quick learner and thinks that business application development, particularly medical records software is really cool. And can deal with a startup. | |
The pay is $25/hr max for now, so a new college grad (of any age) looking for a opportunity to learn this business is best. | |
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
diff --git a/app/models/project.rb b/app/models/project.rb | |
index b97d365..d4a5508 100644 | |
--- a/app/models/project.rb | |
+++ b/app/models/project.rb | |
@@ -389,7 +389,9 @@ class Project < ActiveRecord::Base | |
# remove disabled modules | |
enabled_modules.each {|mod| mod.destroy unless module_names.include?(mod.name)} | |
# add new modules | |
- module_names.each {|name| enabled_modules << EnabledModule.new(:name => name)} | |
+ module_names.each do |name| |
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
grouped_by_role = {} | |
members.each do |member| | |
member.roles.each do |role| | |
my_data[role] ||= [] | |
my_data[role] << member.user | |
end | |
end | |
return grouped_by_role |
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
issue = Issue.find(100) | |
issue.created_on = 10.days.ago | |
issue.save | |
# Or if you wanted to "create" the issues based on their start_date | |
Issue.all.each do |issue| | |
issue.created_on = issue.start_date | |
issue.save | |
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
task :default => :generate | |
desc "Generate using jekyll" | |
task :generate do | |
sh "jekyll" | |
end | |
desc "Auto generate using jekyll" | |
task :auto do | |
sh "jekyll --auto" |
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
# ....other stuff here | |
paginate: 10 |
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
<h3 class="content">Related articles</h3> | |
<ul class="related"> | |
{% for post in site.related_posts limit:5 %} | |
<li><a href="{{ post.url }}">{{ post.title }}</a></li> | |
{% endfor %} | |
</ul> |
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
class SourceUser < ActiveRecord::Base | |
include SecondDatabase | |
set_table_name :users | |
end |