lib/happy/ext/resources.rb in happy-0.1.0.pre9 vs lib/happy/ext/resources.rb in happy-0.1.0.pre10

- old
+ new

@@ -8,10 +8,14 @@ run ResourceMounter, options.merge(:class => klass), &blk end end class ResourceMounter < Happy::Controller + def root_url + super(options[:plural_name]) + end + def render_resource_template(name) render "#{options[:plural_name]}/#{name}.html.haml" end def resource @@ -93,13 +97,17 @@ @options = { :singular_name => options[:class].to_s.tableize.singularize, :plural_name => options[:class].to_s.tableize.pluralize }.merge(@options) + puts url + path options[:plural_name] do + puts url get('new') { do_new } path :id do + puts url get { do_show } post { do_update } get('edit') { do_edit } end