Skip to content

Commit

Permalink
Merge branch 'drnic'
Browse files Browse the repository at this point in the history
Fixed conflicts in:

	hobo/lib/hobo/dryml.rb
	hobo/lib/hobo/model_controller.rb
  • Loading branch information
tslocke committed Jun 13, 2008
2 parents db40016 + 0553a98 commit fbad600
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion doctest/lifecycles.rdoctest
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ We can test which transitions are available:
>> f.lifecycle.available_transitions_for(tom).*.name
=> []
>> f.lifecycle.available_transitions_for(bob).*.name
["accept", "reject"]
=> ["accept", "reject"]
>> f.lifecycle.can_accept?(tom)
=> false
>> f.lifecycle.can_reject?(tom)
Expand Down
2 changes: 1 addition & 1 deletion hobo/bin/hobo
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ end
puts "\nGenerating Rails app...\n"
opts = []
opts << "-d #{database_type}" if database_type
system("rails #{opts * ' '} #{app_path}")
system("rails _2.0.2_ #{opts * ' '} #{app_path}")


Dir.chdir(app_path) do
Expand Down
3 changes: 3 additions & 0 deletions hobo/lib/hobo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
rescue MissingSourceFile
# OK, Hobo won't do pagination then
end
require "active_record"
require "action_controller"
require "action_view"

Dependencies.load_paths |= [ File.dirname(__FILE__) ]

Expand Down
2 changes: 2 additions & 0 deletions hobo/lib/hobo/lifecycles.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
%w[lifecycle actions creator state transition].each { |lib| require "hobo/lifecycles/#{lib}" }

module Hobo

module Lifecycles
Expand Down
6 changes: 0 additions & 6 deletions hobo/lib/hobo/model_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,6 @@ def reorder; hobo_reorder end if include_action?(:reorder)
end


def def_auto_action(name, &block)
define_method name, &block if name.not_in?(instance_methods) && include_action?(name)
end



def def_auto_action(name, &block)
define_method name, &block if name.not_in?(instance_methods) && include_action?(name)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ class <%= class_name %>Controller < ApplicationController

hobo_model_controller

# changes require server restart
auto_actions :all

end
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ class <%= controller_class_name %>Controller < ApplicationController

hobo_model_controller

# changes require server restart
auto_actions :all

end
10 changes: 5 additions & 5 deletions hobo/tasks/hobo_tasks.rake
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ namespace :hobo do

desc "Replace commonly used hobo assets with symlinks into the plugin so that they stay up to date"
task :symlink_assets do

Dir.chdir("#{RAILS_ROOT}/public") do
Dir.chdir("javascripts") do
Dir.chdir("javascripts") do
puts "hobo-rapid.js"
`rm -f hobo-rapid.js`
`ln -s ../../vendor/plugins/hobo/rails_generators/hobo_rapid/templates/hobo-rapid.js`
Expand All @@ -16,8 +16,8 @@ namespace :hobo do
`ln -s ../../vendor/plugins/hobo/rails_generators/hobo_rapid/templates/themes/clean/public clean`
end
end

end

end

0 comments on commit fbad600

Please sign in to comment.