app/models/viewable/block.rb in rails_admin_cms-0.0.2 vs app/models/viewable/block.rb in rails_admin_cms-0.0.3

- old
+ new

@@ -9,31 +9,7 @@ end def partial_name @_partial_name ||= unique_key_name.partition('/').first end - - class << self - def restricted_names - @_restricted_names ||= Viewable.names + begin - CMS.constants.grep(/Helper$/).map{ |name| - "CMS::#{name}".constantize.instance_methods.grep(/^cms_/) - }.flatten.map{ |name| - name.to_s.sub(/^cms_/, '') - } - end - end - - def names - @_names ||= begin - names = CMS.html_names 'app/views/cms/blocks' - names.each do |name| - if name.in? restricted_names - raise ArgumentError, "'cms/blocks/_#{name}.html' partial should be called otherwise, '#{name}' taken" - end - end - names - end - end - end end end