Giter Club home page Giter Club logo

refinerycms-snippets's People

Contributors

inza avatar keram avatar parndt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

refinerycms-snippets's Issues

Are snippets ready for refinery 2.1?

I tried using snippets in my refinerycms 2.1 and got the following error:

/Users/anita/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:inrequire': no such file to load -- refinerycms-base (LoadError)
from /Users/anita/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in block in require' from /Users/anita/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:inload_dependency'
from /Users/anita/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in require' from /Users/anita/.rvm/gems/ruby-1.9.2-p290/gems/refinerycms-snippets-0.5/lib/refinerycms-snippets.rb:1:in<top (required)>'`

Is there something simple I can do to move past this?

refinery in rails 3.1 production mode

/home/keram/gems/gems/actionpack-3.1.1/lib/action_dispatch/middleware/stack.rb:119:in assert_index': No such middleware to insert after: ActionDispatch::Static (RuntimeError) from /home/keram/gems/gems/actionpack-3.1.1/lib/action_dispatch/middleware/stack.rb:91:ininsert_after'
from /home/keram/web-data/project/vendor/refinerycms-snippets/lib/refinerycms-snippets.rb:21
from /home/keram/gems/gems/railties-3.1.1/lib/rails/initializable.rb:30:in instance_exec' from /home/keram/gems/gems/railties-3.1.1/lib/rails/initializable.rb:30:inrun'
from /home/keram/gems/gems/railties-3.1.1/lib/rails/initializable.rb:55:in run_initializers' from /home/keram/gems/gems/railties-3.1.1/lib/rails/initializable.rb:54:ineach'
from /home/keram/gems/gems/railties-3.1.1/lib/rails/initializable.rb:54:in run_initializers' from /home/keram/gems/gems/railties-3.1.1/lib/rails/application.rb:96:ininitialize!'
from /home/keram/gems/gems/railties-3.1.1/lib/rails/railtie/configurable.rb:30:in send' from /home/keram/gems/gems/railties-3.1.1/lib/rails/railtie/configurable.rb:30:inmethod_missing'
from /home/keram/web-data/project/config/environment.rb:5
from /home/keram/gems/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in require' from /home/keram/gems/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:inrequire'
from /home/keram/gems/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in load_dependency' from /home/keram/gems/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:innew_constants_in'
from /home/keram/gems/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in load_dependency' from /home/keram/gems/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:inrequire'
from /home/keram/web-data/project/config.ru:4
from /home/keram/gems/gems/rack-1.3.5/lib/rack/builder.rb:51:in instance_eval' from /home/keram/gems/gems/rack-1.3.5/lib/rack/builder.rb:51:ininitialize'
from /home/keram/web-data/project/config.ru:1:in `new'
from /home/keram/web-data/project/config.ru:1

Add new page breaks with snippets

Thanks for making this add-on to address what I see as the biggest missing feature in Refinery!!!

Everything worked fine except it breaks when three are already snippets in the database and you try and add a new page. This is because the snippets_field partial tries to use @page.id before the page has been saved to the database. My quick fix was to override the admin/pages/tabs/snippets partial like so:

  <div class="wym_skin_refinery page_part" id="page_snippet_picker">
    <% if @page.new_record? %>
      <h2>Please save this page before you can add any snippets</h2>
    <% else %>
      <%= render :partial => '/admin/pages/tabs/snippets_content', :locals => {:f => f} %>
    <% end %>
  </div>

Works for now, but I'm guessing you'll want to do something more user friendly. Perhaps with Rails nested_attributes or the like.

peter

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.