Permalink
Browse files

The rest_guilded filter is no automatically added to ActionController…

…::Base.
  • Loading branch information...
1 parent 199711e commit 0d14a7f40fd3c2f9b450830261420144546888f0 @midas committed Nov 16, 2009
Showing with 26 additions and 5 deletions.
  1. +2 −2 guilded.gemspec
  2. +3 −2 lib/guilded.rb
  3. +1 −1 lib/guilded/rails.rb
  4. +20 −0 lib/guilded/rails/controller_actions.rb
View
@@ -5,11 +5,11 @@
Gem::Specification.new do |s|
s.name = %q{guilded}
- s.version = "1.0.2"
+ s.version = "1.0.3"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["C. Jason Harrelson (midas)"]
- s.date = %q{2009-11-13}
+ s.date = %q{2009-11-16}
s.description = %q{Guilded intends to provide a toolset for creating and consuming reusable web components. Currently, this problem domain is filled with JavaScript frameworks. These frameworks are wonderful and work very well. However, they do not degrade gracefully and are not accessible (in most cases). Guilded seeks to provide the same level of "componentization" and ease of use without sacrificing degradability and accessibility. Guilded will achieve these goals by applying each technology at our disposal (HTML, CSS and JavaScript) to do as it was intended.}
s.email = %q{jason@lookforwardenterprises.com}
s.extra_rdoc_files = [
View
@@ -72,7 +72,8 @@
# <%= g_load_alerter :skin => 'blueish', :id => 'load_alerter' %>
#
module Guilded
- VERSION = '1.0.1'
+ VERSION = '1.0.3'
end
-ActionView::Base.send( :include, Guilded::Rails::ViewHelpers ) if defined?( ActionView )
+ActionView::Base.send( :include, Guilded::Rails::ViewHelpers ) if defined?( ActionView )
+ActionController::Base.send( :include, Guilded::Rails::ControllerActions ) if defined?( ActionController::Base )
@@ -1,4 +1,4 @@
module Guilded
- module Rails
+ module Rails
end
end
@@ -0,0 +1,20 @@
+module Guilded
+ module Rails
+ module ControllerActions
+
+ def self.included( base )
+ base.instance_eval do
+ before_filter :reset_guilded
+ end
+ base.include( InstanceMethods )
+ end
+
+ module InstanceMethods
+ def reset_guilded
+ Guilded::Guilder.instance.reset!
+ end
+ end
+
+ end
+ end
+end

0 comments on commit 0d14a7f

Please sign in to comment.