Skip to content
Snippets Groups Projects
  1. Mar 16, 2011
    • Ryan Bates's avatar
      use Item.new instead of build_item for singleton resource so it doesn't mess... · 3f6cecbf
      Ryan Bates authored
      use Item.new instead of build_item for singleton resource so it doesn't mess up database - closes #304
      3f6cecbf
    • Ryan Bates's avatar
      making accessible_by action default to :index and parent action default to... · fdd5ad02
      Ryan Bates authored
      making accessible_by action default to :index and parent action default to :show so we don't check :read action directly - closes #302
      fdd5ad02
    • Adam Wróbel's avatar
      Fixes inherited_resources collection authorization · 3639ca90
      Adam Wróbel authored
      This reverts e3eab13b
      
      I don't know what was the idea of that, but it turned out REAL bad.
      
      `collection` sets the collection instance variable. `resource_base` is used all
      over CanCan. It's also used inside `load_collection?` which is checked before
      `load_collection` is called. That means we actually set the collection instance
      variable through inherited_resources (without any authorization whatsoever) before trying to load it through CanCan using `accessible_by`.
      
          1. def load_resource
          2.  unless skip?(:load)
          3.    if load_instance?
          4.      self.resource_instance ||= load_resource_instance
          5.    elsif load_collection?
          6.      self.collection_instance ||= load_collection
          7.    end
          8.  end
          9. end
      
      `collection_instance` is set on line 5 instead of line 6.
      3639ca90
  2. Mar 11, 2011
  3. Mar 09, 2011
  4. Mar 08, 2011
  5. Feb 22, 2011
  6. Feb 17, 2011
  7. Feb 14, 2011
  8. Feb 04, 2011
  9. Feb 03, 2011
  10. Jan 28, 2011
  11. Jan 20, 2011
  12. Jan 19, 2011
  13. Jan 18, 2011
  14. Jan 11, 2011
Loading