Archive for the 'Rails 2.3' Category

render_nested_form Helper

Die in Rails 2.3 eingeführten Nested Forms haben mir am Anfang sehr viele Kopfschmerzen bereitet und tun dies immer mal wieder.

Dank schorsch vom SalesKing muss ich mir um diese Dinge keine Sorgen mehr machen.
Sein render_nested_form Helper übernimmt alles und hat ein paar sehr nette Options.

# Options are:
# * <tt>:new</tt> - specify a certain number of new elements to be added to the form. Useful for displaying a few blank elements at the bottom.
# * <tt>:name</tt> - override the name of the association, both for the field names, and the name of the partial
# * <tt>:partial</tt> - specify the name of the partial in which the form is located.
# * <tt>:fields_for</tt> - specify additional options for the fields_for_associated call
# * <tt>:locals</tt> - specify additional variables to be passed along to the partial
# * <tt>:render</tt> - specify additional options to be passed along to the render :partial call
# * <tt>:skip</tt> - array of elements which will be skipped, usefull if you already rendered a partial in the same form with parts of the data. eg. obj.addresses, render the firt address on top of form, render all the other addresses at the bottom
 
f.render_nested_form(@project.tasks, :new => 3, :partial=>'some_partial', :locals=>..)

Update:
Ich hab den Helper geforked und die Option :as hinzugefügt. Damit kann man den Namen der lokalen Variable definieren, wenn man den Partial z.B. für unterschiedliche Objekte und Attribute nutzt (bei mir ist das ein Upload Form).
Hier findet ihr den Fork.

Funkenrailsdav: Webdav with Rails e.g. for ical

So you want a rails application to give you a webdav? Good, railsdav can do this for you. However, it might take you an hour or two as well to figure out how it works :)

This plugin is a copy of the original railsdav plugin with some modifications to make it run out-of-the-box. Just drop this plugin into your newly created rails application and it becomes a webdav-server. It comes with Authentication, so you can publish and synchronize your ical-files without fear :)

This was done using Rails 2.3.2.

Get it here: http://github.com/funkensturm/railsdav

Presenting: The Funkengallery Demo App

Still in beta mode, but we are proud to present a Rails 2.3 application, modularized in plugins, fully I18n (German, English, Swedish), and of course published at github.

This funkengallery demo application includes demonstration of all our plugins:

  • acts_as_category
  • acts_as_identifiable
  • funkengallery
  • funkenlogin
  • funkenlogin
  • irobot
  • manipulify

Again, this is beta still, which means that for example the admin area wants your models to be called exactly “Category” and “User”. So not 100% modularized yet, but we’re getting there and you can already use it as a perfect standalone application ;)

What’s so special about this gallery is the very dynamic user rights management and the simplicity. It is designed for a complex category tree with many thousands of pictures. However, you might expect flickr design and you get… well… funkengallery. It is different and simpler, but really neat if you want to share your pictures quick, private and with individual user rights.

Screenshots and Demo

Check out our Downloads site to see how you can easily test your local demo.