Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Rails 3.1 Compatibility #1

Open
wants to merge 3 commits into from

2 participants

@zapnap

Rails changed the :prefix option for template rendering to :prefixes, which prevents inherited_views from finding the right template to render. Fixed it in this commit. Please note that this also directly affects ActiveAdmin, since that project uses this for view rendering.

@fphilipe

Is it possible that this also affects Rails 3.0.8? I updated the Rails today and ActiveAdmin complained about missing views.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 19, 2011
  1. @zapnap

    Rails 3.1 compatibility

    zapnap authored
Commits on May 23, 2011
  1. @zapnap

    fix deprecation warnings for Rails 3.1

    zapnap authored
    NOTE: still can't seem to get the test suite passing under 3.1
    TBD...
  2. @zapnap
This page is out of date. Refresh to see the latest.
View
4 lib/inherited_views/base.rb
@@ -21,7 +21,7 @@ class Base < ::InheritedResources::Base
#
# which would then use app/views/my_default_admin_views
#
- class_inheritable_accessor :default_views
+ class_attribute :default_views
self.default_views = 'inherited_views_default'
# Add our default views to the base path
@@ -103,7 +103,7 @@ def resources_name
def render_or_default(name, args = {})
render name, args
rescue ActionView::MissingTemplate
- render args.merge(:template => "#{self.class.default_views}/#{name}", :prefix => '')
+ render args.merge(:template => "#{self.class.default_views}/#{name}", :prefixes => '')
end
end
View
4 lib/inherited_views/table_builder.rb
@@ -46,7 +46,7 @@ def default_table_columns
# end
#
def table(*columns)
- options = columns.extract_options!
+ options = columns.extract_options!
if options[:except]
options[:except] = options[:except].is_a?(Array) ? options[:except] : [options[:except]]
@@ -59,4 +59,4 @@ def table(*columns)
end
end
-end
+end
Something went wrong with that request. Please try again.