Skip to content

Commit

Permalink
Fix publisher issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mmangino committed Dec 3, 2008
1 parent d8c24c4 commit e5e0bd0
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 11 deletions.
1 change: 0 additions & 1 deletion config/environments/development.rb
Expand Up @@ -12,7 +12,6 @@
config.action_controller.consider_all_requests_local = true
config.action_view.debug_rjs = true
config.action_controller.perform_caching = false
config.action_view.cache_template_extensions = false

# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false
6 changes: 3 additions & 3 deletions config/facebooker.yml
Expand Up @@ -9,9 +9,9 @@ development:
callback_url: http://web1.tunnlr.com:10103
api: new
tunnel:
public_host_username: mmangino
public_host: cab.elevatedrails.com
public_port: 3002
public_host_username: tunnlr7
public_host: ssh1.tunnlr.com
public_port: 10103
local_port: 3000


Expand Down
17 changes: 12 additions & 5 deletions db/schema.rb
@@ -1,5 +1,5 @@
# This file is auto-generated from the current state of the database. Instead of editing this file,
# please use the migrations feature of ActiveRecord to incrementally modify your database, and
# please use the migrations feature of Active Record to incrementally modify your database, and
# then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your database schema. If you need
Expand All @@ -9,7 +9,7 @@
#
# It's strongly recommended to check this file into your version control system.

ActiveRecord::Schema.define(:version => 11) do
ActiveRecord::Schema.define(:version => 12) do

create_table "attacks", :force => true do |t|
t.integer "attacking_user_id"
Expand All @@ -20,8 +20,8 @@
t.boolean "hit"
end

add_index "attacks", ["defending_user_id", "created_at"], :name => "index_attacks_on_defending_user_id_and_created_at"
add_index "attacks", ["attacking_user_id", "created_at"], :name => "index_attacks_on_attacking_user_id_and_created_at"
add_index "attacks", ["defending_user_id", "created_at"], :name => "index_attacks_on_defending_user_id_and_created_at"

create_table "belts", :force => true do |t|
t.string "name"
Expand All @@ -42,6 +42,13 @@

add_index "comments", ["user_id", "created_at"], :name => "index_comments_on_user_id_and_created_at"

create_table "facebook_templates", :force => true do |t|
t.string "bundle_id"
t.string "template_name"
t.datetime "created_at"
t.datetime "updated_at"
end

create_table "moves", :force => true do |t|
t.string "name"
t.string "image_name"
Expand All @@ -57,11 +64,11 @@
t.datetime "updated_at"
end

add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"

create_table "users", :force => true do |t|
t.integer "facebook_id", :limit => 8, :null => false
t.integer "facebook_id", :limit => 20, :null => false
t.string "session_key"
t.datetime "created_at"
t.datetime "updated_at"
Expand Down
16 changes: 14 additions & 2 deletions vendor/plugins/facebooker/lib/facebooker/rails/publisher.rb
Expand Up @@ -87,6 +87,9 @@ module Rails
#
# Publisher makes many helpers available, including the linking and asset helpers
class Publisher
def initialize
@controller = PublisherController.new
end
class FacebookTemplate < ::ActiveRecord::Base


Expand Down Expand Up @@ -398,8 +401,6 @@ def protect_against_forgery?
end
ActionController::Routing::Routes.named_routes.install(self.master_helper_module)
include self.master_helper_module
# Publisher is the controller, it should do the rewriting
include ActionController::UrlWriter
class <<self

def register_all_templates
Expand Down Expand Up @@ -470,6 +471,17 @@ def inherited(child)
end

end
# implement the bits of functionality we need out of a controller object
class PublisherController
include Facebooker::Rails::Publisher.master_helper_module
include ActionController::UrlWriter

def self.default_url_options(*args)
Facebooker::Rails::Publisher.default_url_options(*args)
end

end

end
end
end

0 comments on commit e5e0bd0

Please sign in to comment.