lib/typus/actions.rb in typus-3.0.4 vs lib/typus/actions.rb in typus-3.0.5
- old
+ new
@@ -2,25 +2,39 @@
module Actions
protected
- def add_action(*args)
- options = args.extract_options!
- @actions ||= []
- @actions << options
+ def add_resource_action(*args)
+ @resource_actions ||= []
+ @resource_actions << args
end
- def prepend_action(*args)
- options = args.extract_options!
- @actions ||= []
- @actions = @actions.unshift(options)
+ def prepend_resource_action(*args)
+ @resource_actions ||= []
+ @resource_actions = @resource_actions.unshift(args)
end
- def append_action(*args)
- options = args.extract_options!
- @actions ||= []
- @actions = @actions.concat([options])
+ def append_resource_action(*args)
+ @resource_actions ||= []
+ @resource_actions = @resource_actions.concat([args])
+ end
+
+ # FIXME: I know this is ugly but first of all I want to see it working.
+
+ def add_resources_action(*args)
+ @resources_actions ||= []
+ @resources_actions << args
+ end
+
+ def prepend_resources_action(*args)
+ @resources_actions ||= []
+ @resources_actions = @resources_actions.unshift(args)
+ end
+
+ def append_resources_action(*args)
+ @resources_actions ||= []
+ @resources_actions = @resources_actions.concat([args])
end
end
end