lib/happy/extras/resources.rb in happy-0.1.0.pre21 vs lib/happy/extras/resources.rb in happy-0.1.0.pre22
- old
+ new
@@ -93,20 +93,20 @@
def route
options[:singular_name] ||= options[:class].to_s.tableize.singularize
options[:plural_name] ||= options[:class].to_s.tableize.pluralize
- path options[:plural_name] do
- get('new') { do_new }
+ path? options[:plural_name] do
+ get?('new') { do_new }
- path :id do
- get { do_show }
- post { do_update }
- get('edit') { do_edit }
+ path? :id do
+ get? { do_show }
+ post? { do_update }
+ get?('edit') { do_edit }
end
- post { do_create }
- get { do_index }
+ post? { do_create }
+ get? { do_index }
end
end
end
end
end