Hey,

You can do:

rule = Rule.weekly
rule_yaml = rule.to_yaml

schedule = Schedule.new(Time.now)
schedule.add_recurrence_rule Rule.from_yaml(rule_yaml)

Is this not what you're looking for?
Maybe a little clarification will help

Thanks,
John Crepezzi

On Oct 14, 8:26 am, James <ja...@wooshy.com> wrote:
> I'm using Ice_Cube to try and get the rule from a Model to be used to
> create a schedule, like so:
>
> @temp_sched.add_recurrence_rule
> IceCube::Rule.from_yaml(Transaction.last.rule)
>
> However this doesn't seem to be the right thing, I just want to create
> a new Rule using the rule specified for each Model.
> IceCube::Rule.new(the rule) would be a good way, but this doesn't seem
> to exist.
>
> Anyone know of a good way to create a rule using an existing rule
> stored within a model?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to