--
You received this message because you are subscribed to the Google Groups "Ruleby" group.
To post to this group, send email to rul...@googlegroups.com.
To unsubscribe from this group, send email to ruleby+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ruleby?hl=en.
I am curious how to perform operations via the rules. In my example:
http://pastie.org/848757
what I'm trying to do is change current_user.milestone according to
the rule. Now that the view loads, it doesn't change the milestone.
I understand that this is a very newb question, but please be patient.
Do I need to assign the 'retrieve'd element?-- such as:
current_user.milestone = retrieve(v[:m].status = 'next level')
thanks
On Mar 1, 4:32 pm, Jason Nah <jason....@gmail.com> wrote:
> Hi Jesse,
>
> I think the problem is that your controller doesn't know anything about
> ActionRulebook
>
> You can solve this by editing your environment.rb and adding the search path
> there so that the rest of your app understands the app/rules directory...
>
> Cheers,
> Jason
>
> On 2 March 2010 08:15, Jesse <teff...@gmail.com> wrote:
>
> > I'm trying to get the curretn_user's milestone to change in the
> > rules. I can't get past the errors.
>
> >http://pastie.org/848757
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Ruleby" group.
> > To post to this group, send email to rul...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > ruleby+un...@googlegroups.com<ruleby%2Bunsu...@googlegroups.com>
All I need to do at this point is match current_user.milestone
On Mar 1, 4:32 pm, Jason Nah <jason....@gmail.com> wrote:
> Hi Jesse,
>
> I think the problem is that your controller doesn't know anything about
> ActionRulebook
>
> You can solve this by editing your environment.rb and adding the search path
> there so that the rest of your app understands the app/rules directory...
>
> Cheers,
> Jason
>
> On 2 March 2010 08:15, Jesse <teff...@gmail.com> wrote:
>
> > I'm trying to get the curretn_user's milestone to change in the
> > rules. I can't get past the errors.
>
> >http://pastie.org/848757
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Ruleby" group.
> > To post to this group, send email to rul...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > ruleby+un...@googlegroups.com<ruleby%2Bunsu...@googlegroups.com>
To unsubscribe from this group, send email to ruleby+un...@googlegroups.com.
Why do I need to assert both current_user and
Action.new(current_user) ?
How do I assert only the User? (Instead of current_user.milestone)
Why am I getting back User or Action objects instead of, eg, "next
milestone"
Thanks again. Hopefully I can get warmed up to this and get some work
done.
On Mar 2, 10:06 am, Matt Smith <codeaspe...@gmail.com> wrote:
> Hi Jesse,
>
> Have a look at this: http://pastie.org/849965
>
> If I am correct I think this is what you are trying to do.
>
> The retrieve method is a method on the engine object, so you would want to
> call it after the match and it will return all facts of a certain type.
>
> HTH,
>
> Matt
>
> On Tue, Mar 2, 2010 at 2:04 AM, Jesse <teff...@gmail.com> wrote:
> > I'm doing a trial and error, getting nothing. Here is where I am
> > right now. http://pastie.org/849426
>
> > All I need to do at this point is match current_user.milestone
>
> > On Mar 1, 4:32 pm, Jason Nah <jason....@gmail.com> wrote:
> > > Hi Jesse,
>
> > > I think the problem is that your controller doesn't know anything about
> > > ActionRulebook
>
> > > You can solve this by editing your environment.rb and adding the search
> > path
> > > there so that the rest of your app understands the app/rules directory...
>
> > > Cheers,
> > > Jason
>
> > > On 2 March 2010 08:15, Jesse <teff...@gmail.com> wrote:
>
> > > > I'm trying to get the curretn_user's milestone to change in the
> > > > rules. I can't get past the errors.
>
> > > >http://pastie.org/848757
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "Ruleby" group.
> > > > To post to this group, send email to rul...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > > > ruleby+un...@googlegroups.com<ruleby%2Bunsu...@googlegroups.com>
> > <ruleby%2Bunsu...@googlegroups.com<ruleby%252Buns...@googlegroups.com>
I'm only passing a User.
On Mar 2, 10:06 am, Matt Smith <codeaspe...@gmail.com> wrote:
> Hi Jesse,
>
> Have a look at this: http://pastie.org/849965
>
> If I am correct I think this is what you are trying to do.
>
> The retrieve method is a method on the engine object, so you would want to
> call it after the match and it will return all facts of a certain type.
>
> HTH,
>
> Matt
>
> On Tue, Mar 2, 2010 at 2:04 AM, Jesse <teff...@gmail.com> wrote:
> > I'm doing a trial and error, getting nothing. Here is where I am
> > right now. http://pastie.org/849426
>
> > All I need to do at this point is match current_user.milestone
>
> > On Mar 1, 4:32 pm, Jason Nah <jason....@gmail.com> wrote:
> > > Hi Jesse,
>
> > > I think the problem is that your controller doesn't know anything about
> > > ActionRulebook
>
> > > You can solve this by editing your environment.rb and adding the search
> > path
> > > there so that the rest of your app understands the app/rules directory...
>
> > > Cheers,
> > > Jason
>
> > > On 2 March 2010 08:15, Jesse <teff...@gmail.com> wrote:
>
> > > > I'm trying to get the curretn_user's milestone to change in the
> > > > rules. I can't get past the errors.
>
> > > >http://pastie.org/848757
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "Ruleby" group.
> > > > To post to this group, send email to rul...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > > > ruleby+un...@googlegroups.com<ruleby%2Bunsu...@googlegroups.com>
> > <ruleby%2Bunsu...@googlegroups.com<ruleby%252Buns...@googlegroups.com>
To unsubscribe from this group, send email to ruleby+un...@googlegroups.com.
in irb it doesn't work. What I'm doing is creating a new user when the
page loads. The user has a default milestone of
'preproduction_1_get_started', and in the controller
( http://pastie.org/851390 ), it seems like it should match the rule,
but apparently this is not the case.
logger.info users.first.inspect:
#<User _id: 4b8e4997106a6c74ba000001, facebook_id: 547669129,
created_at: Wed Mar 03 11:35:51 UTC 2010, session_key:
"2.iq1uWc0a8DDNJ8UDUwJ67Q__.3600.1267621200-547669129", updated_at: Wed
Mar 03 11:35:51 UTC 2010, milestone: "preproduction_1_get_started">
The milestone should be 'it_works' at this point, yes?
> For more options, visit this group at
> http://groups.google.com/group/ruleby?hl=en.
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Ruleby" group.
> To post to this group, send email to rul...@googlegroups.com.
> To unsubscribe from this group, send email to ruleby