similar to: having a problem with acts_as_state_machine

Displaying 20 results from an estimated 120 matches similar to: "having a problem with acts_as_state_machine"

2008 Sep 29
4
RJS is not loaded
Hello, I have here an issue which is really critical for me (it for my university work and I would like to not delete this feature). It based on a Rails 1.x tutorial which I use now under Rails 2.x. It contains the refreshment (adding content or records) of an div via RJS/JS. I access the RJS via (Controller): respond_to do |format| format.html { redirect_to :controller =>
2008 Jan 23
1
acts_as_state_machine doesn't error on invalid state transition?
While using acts_as_state_machine, I noticed it doesn''t error when invalid state transition is used. No false return, no exception. By invalid state transition, I mean utilizing an event that does not define the current state as a ''from'' state. Does anyone find this lacking? I would like to be able to catch invalid state transition (such as attempting to fulfill a
2008 Jan 07
2
acts_as_state_machine override :initial state
Hello, I''m not sure if this is where to post this, but i cannot find much information/support for acts_as_state_machine. I have a Friendship model which implements acts_as_state_machine. I have an :initial state of :pending, but i would like to create a Friendship model and save it directly with :accepted status. I have tried Friendship.create(:state => "accepted") and
2008 Aug 25
1
acts_as_state_machine: SecurityError calling insecure method
(also posted on rails forum: http://railsforum.com/viewtopic.php?id=21744, then I discovered this lilst and there are many more people...) Hi, since yesterday I suddenly recieve lots of such messages in my logfiles - and everything in the user model that uses that plugin fails! My deployed Rails code hasn''t changeed in 5 days, and those errors started to appear only a day ago.
2006 Jun 08
4
datetime fixture format for Mysql 5.0
Hi All: I develop on several machines, most have Mysql 4.* and one has Mysql 5.0. On 4.*, the following erb for a fixture works fine: updated_at: <%= 1.days.ago.to_s:db%> But fails on 5.0. I had a similar deal when I had date fixtures, and switched forrmats so that both 4.* and 5.0 were happy. is there to_s:db_works_for_mysql_50() ? or similar? Thanks Forrest
2008 Jul 28
2
Help with a loop
HI: I need ideas on how to make this code shorter (maybe with a second loop?). The code as it is works, but in this case I only have 14 samples, but it will become insane with more, so I need a way to make it more automatic. The problem is that the output from ts1, ts2, and so on is a vector with more than one value, so I do not know how to solve this. Thanks Prenewbie The code is the
2002 May 31
2
error in seq.POSIXt?
I am trying to extract only the winters (defined to be 01-Dec through 28-Feb) of daily data from 1948-2002. There are 90 days in each winter season. I wrote the following code to gather the winter dates into a single vector: DJF <- NULL for(year in 1949:1999) { temp.begin <- strptime(paste("01/12", year-1, sep="/"), "%d/%m/%Y") temp.end <-
2023 Feb 28
1
vector a partir de los valores de una tabla
Muy buenas, necesito crear un vector a partir de los valores de una tabla como la de abajo. Debe ser algo muy fácil pero no lo encuentro en la web. Gracias, Manuel 246, 345, 401, 131,125, 69 a partir de: TS1 TS2 TS3 TS4 TS5 TS6 246 345 401 131 125 69 [[alternative HTML version deleted]]
2008 May 25
1
n Realizations of a Stochastic Process assigned to dynamically generated variable names?
I am interested in creating multiple (say 1000) time series, from a given stochastic process, of length 250. I want to refer to each realization with its own variable name, of the format say, tsn, where n is the n'th simulation. i.e. ts1, ts2, ts3, ts4, .... , ts1000 The way I am thinking of doing this is placing the following code within another loop, and the 'tsn' assignment should
2008 Feb 28
2
random exception driving me crazy: SecurityError (Insecure: can't modify array)
Hi all, I''m running into a very strange but incredibly annoying problem that I just can''t seem to solve. The exception is occurring from a seemingly innocuous line in my code, a simple ''logger.warn("some debug information")''. The backtrace follows: SecurityError (Insecure: can''t modify array)
2010 Mar 17
0
Sims 3 and Microsoft.VC80.CRT
I had the Sims 3 working up until the town load section and was about to test something for Jeffz when something (I honestly don't know what) caused some breakage to do with the MS C++ libraries. Now when I try and run the game I get: Code: ben at xenith:~/Wine/Games/Sims3/Game/Bin$ wine TS3.exe fixme:ntoskrnl:KeInitializeTimerEx stub: 0x110f80 0 fixme:actctx:parse_depend_manifests Could
2008 Oct 28
7
aasm callback order?
Hello! Sometime ago I ran across a webpage where someone had identified the full callback sequence for an object lifecycle including AASM with it''s :enter and :exit and whatnot callbacks. Unfortunately, I can''t find it and searches don''t seem to help. Does anyone have a reference to a page that shows the callback sequence with Acts As State Machine (the gem)? I think
2009 May 19
4
Has anyone had any luck with the sims 3?
For those that have the sims 3 have you had any luck with the game at all? I looked at the sims 2 page and going off of that it does not look too promising :(
2006 Mar 09
4
sort-weirdness - active record issue?
I''m selecting data into a controller and sorting it. The code (in the controller) looks like this: def index @assignments = [] tasks = Task.find(:all, :conditions => ["person_id = ? and actual_end_date is null", session[:user].id.to_s ]) issues = Issue.find(:all, :conditions => ["person_id = ? and status <>
2008 Feb 11
6
Should I Test My Fixtures?
I have a number of fixtures in my test suite. For example, with acts_as_authenticated and acts_as_state_machine, I created a number of users in different account states for use in functional testing. (Suspended users can not log in, etc) Is it a good idea to run fixtures through tests to ensure that they conform to their ideals? EG: assert users(:suspended_user).suspended? If so, where should
2005 Apr 28
2
ips and netbios name on the logs
Hi people, does someone know how to only log the name of the machine and not the name of the machine AND the ip? Let me explain this: -rw-r--r-- 1 root root 0 Apr 28 02:47 0.0.0.0.log -rw-r--r-- 1 root root 0 Apr 28 02:49 10.3.0.10.log -rw-r--r-- 1 root root 0 Apr 28 02:47 10.3.0.21.log -rw-r--r-- 1 root root 0 Apr 28 02:46 10.3.0.22.log -rw-r--r-- 1 root root 0 Apr 28 02:48
2007 Dec 31
1
Store limited list in db?
Hello, I''m currently developing an application which contains a Movie object. I was wondering what the best way to store a limited list such as mpaa_rating would be? The list is not likely to expand often, so i was wondering if it was still best to store this list in a table? Or if there was something else like acts_as_state_machine for maintaining a simple list like this. thanks!
2006 Apr 16
2
Making requests in order
Hello all, This is an interesting problem I have been working on. What I have is a little multiuser project request tracking application. What happens is that I log in and create projects and assign people to the projects. Each project has steps associated with it, and the steps need to be done in a certain order. Now, I have to request that the assigned person perform each of the steps, and
2007 Mar 27
3
Stubbing out method for all instances
I am using the acts_as_state_machine plugin to control state of an object in my app, however when testing this I need to be able to stub out the guard conditions so that state will change when I fire off an event without depending on other models. Guard conditions simply return true or false so I have an instance method: def encoded? <check state of other objects> return true
2007 Jan 24
2
hello! first post + context_setup
Greetings all. I''m looking over a ''greenfield'' pasture, and enjoying the TDD(BDD) process of creation. I''m currently rspec''ing a finite state machine (acts_as_state_machine). As such, I need to persist the model through ''specifies'' within the context - from top to bottom. I have bumped into a couple of probs: 1. context_setup