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
| scope :for_account, lambda { |account| | |
| find_by_sql("SELECT 'tickets'.* FROM 'tickets' | |
| INNER JOIN 'groups' ON 'groups'.'id' = 'tickets'.'group_id' | |
| INNER JOIN 'assignments' ON 'groups'.'id' = 'assignments'.'group_id' | |
| INNER JOIN 'accounts' ON 'accounts'.'id' = 'assignments'.'account_id' | |
| WHERE ('accounts'.'id' = #{account.id}) | |
| UNION | |
| SELECT 'tickets'.* FROM 'tickets' | |
| INNER JOIN 'tasks' ON 'tasks'.'ticket_id' = 'tickets'.'id' | |
| INNER JOIN 'accounts' ON 'accounts'.'id' = 'tasks'.'account_id' |
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
| <div id="add_default_tasks"> | |
| <h2>Default Tasks</h2> | |
| <div class="fields"> | |
| <input id="ticket_tasks_attributes_0_name" name="ticket[tasks_attributes][0][name]" size="30" type="text" value="Create Invite" /> | |
| <input id="ticket_tasks_attributes_0__destroy" name="ticket[tasks_attributes][0][_destroy]" type="hidden" value="false" /><a href="javascript:void(0)" class="remove_task remove_nested_fields">Remove this task</a> | |
| <input id="ticket_tasks_attributes_0_name" name="ticket[tasks_attributes][0][name]" size="30" type="text" value="Name Tags" /> | |
| <input id="ticket_tasks_attributes_0__destroy" name="ticket[tasks_attributes][0][_destroy]" type="hidden" value="false" /><a href="javascript:void(0)" class="remove_task remove_nested_fields">Remove this task</a> | |
| <input id="ticket_tasks_attributes_0_name" name="ticket[tasks_attributes][0][name]" size="30" type="text" value="Giveaways" /> | |
| <input id="ticket_tasks_attributes_0__destroy" name="ticket[tasks_attributes][0][_destroy]" type="hidden" |
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
| <!-- START category.rb --> | |
| class Category < ActiveRecord::Base | |
| has_many :tickets | |
| has_many :tasks | |
| accepts_nested_attributes_for :tasks, :allow_destroy => true, :reject_if => proc { |obj| obj.blank? } | |
| end | |
| <!-- END category.rb --> | |
| <!-- START ticket.rb --> | |
| class Ticket < ActiveRecord::Base |
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
| activemodel (3.0.6) lib/active_model/attribute_methods.rb:367:in `method_missing' | |
| activerecord (3.0.6) lib/active_record/attribute_methods.rb:46:in `method_missing' | |
| activesupport (3.0.6) lib/active_support/dependencies.rb:372:in `local_const_defined?' | |
| activesupport (3.0.6) lib/active_support/dependencies.rb:497:in `load_missing_constant' | |
| activerecord (3.0.6) lib/active_record/relation.rb:98:in `any?' | |
| activerecord (3.0.6) lib/active_record/attribute_methods/read.rb:72:in `any?' | |
| activerecord (3.0.6) lib/active_record/relation.rb:98:in `each' | |
| activerecord (3.0.6) lib/active_record/relation.rb:98:in `any?' | |
| activerecord (3.0.6) lib/active_record/relation.rb:98:in `any?' | |
| activesupport (3.0.6) lib/active_support/dependencies.rb:497:in `load_missing_constant' |
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 Category < ActiveRecord::Base | |
| has_many :tickets | |
| has_many :tasks, :dependent => :destroy | |
| accepts_nested_attributes_for :tasks, :reject_if => lambda { |a| a[:name].blank? }, :allow_destroy => true | |
| acts_as_tree | |
| has_friendly_id :name, :use_slug => true | |
| scope :parent, where({:parent_id => nil}, {}) | |
| scope :children, where({'parent_id > ?', 0}, {}) |
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
| activesupport (3.0.6) lib/active_support/inflector/methods.rb:52:in `underscore' | |
| activesupport (3.0.6) lib/active_support/core_ext/string/inflections.rb:83:in `underscore' | |
| activesupport (3.0.6) lib/active_support/dependencies.rb:482:in `load_missing_constant' | |
| activesupport (3.0.6) lib/active_support/dependencies.rb:183:in `const_missing' | |
| activesupport (3.0.6) lib/active_support/dependencies.rb:181:in `each' | |
| activesupport (3.0.6) lib/active_support/dependencies.rb:181:in `const_missing' | |
| activerecord (3.0.6) lib/active_record/relation.rb:370:in `send' | |
| activerecord (3.0.6) lib/active_record/relation.rb:370:in `method_missing' | |
| activerecord (3.0.6) lib/active_record/relation.rb:125:in `scoping' | |
| activerecord (3.0.6) lib/active_record/relation.rb:370:in `method_missing' |
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
| RAILS_ROOT = File.dirname(File.dirname(__FILE__)) | |
| 20.times do |num| | |
| God.watch do |w| | |
| w.name = "dj-#{num}" | |
| w.group = 'dj' | |
| w.interval = 30.seconds | |
| w.start = "rake -f #{RAILS_ROOT}/Rakefile -I #{RAILS_ROOT} RAILS_ENV=production jobs:work" | |
| w.uid = 'git' |
NewerOlder