Code Monkey home page Code Monkey logo

Comments (3)

kristianmandrup avatar kristianmandrup commented on July 22, 2024

Looks like an error (that was never tested and caught). I recommend you make a clone, then add test cases (specs) for these scenarios... that make a pull request (or just hack the fix directly)

Should be fixed to something like:

    def gallery_image type, photo, options = {}
      meth_name = "#{type}_gallery_image"
      validate_gallery_photo! photo
      unless respond_to? meth_name
        raise ArgumentError, "Gallery #{type} is not yet supported. Please add a View helper module for this gallery using the convention followed by the other galleries..." 
      end
      send meth_name, photo, options
    end

    def gallery_imageset type, imageset, options = {}
      meth_name = "#{type}_gallery_imageset"
      # validate_gallery_imageset! imageset
      unless respond_to? meth_name
        raise ArgumentError, "Gallery #{type} is not yet supported for imageset. Please add a View helper module for this gallery using the convention followed by the other galleries..." 
      end
      send meth_name, imageset, options
    end

I'm not sure why the validate_gallery_imageset! was not implemented. I guess an imageset is just an array of photos, and so, to validate it simply means iterating through the photos and calling validate_gallery_photo! for each one.

Haven't been using this lib for a looong time...

Thanks!

from rails-gallery.

microweb10 avatar microweb10 commented on July 22, 2024

Fixed!!

Once you have the new release you can close this issue.

:)

from rails-gallery.

kristianmandrup avatar kristianmandrup commented on July 22, 2024

Released 0.3.3 which should fix this :)

from rails-gallery.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.