Create state for object in Rails - ruby-on-rails

Firstly I'm sorry for my english. Ha ha
So, I'm learning to create sites with Ruby on Rails so I started with that framework. I stuck for a few hours because I do not find the right method for something that I try to do.
I try to create a crowdfunding site. I have successfully installed and configured ActiveAdmin and configured it to create projects. I would now like to add a condition into these projects. I would like 4 states: "Empty" when the project is created, but not all features are filled. "Upcoming" when it met all the requirements. And then when it is ready it should get "Upcoming" state. I want my project management panel to be represented on activeadmin. I have a select box that would change the project status to "Validate" or "No validate".
So I thought to simply use the tool 'if condition' to do the above, but my problem is I have no idea of ​​where I should put it. If I put it into the active admin controller, a controller would be created for projects or in my project model? Should I create a method and if so when to call it? Maybe do something else? I struggle to see clearly the whole picture.
Thank you in advance for your suggestions!

Related

OrangeHRM Custom Fields

I am trying to change the number of custom fields I can create in OrgangeHRM PIM section.
I have found a few articles on this site that say what part of the code to change but non saying where to find the file where the code is stored is in.
If anyone can help then that would be great.
I am running version 4.0 of OrangeHRM.
Thanks
orangeHRM have slots for custom field (i dont remember, but i think 10 slot in orange 4.0), you can use this for put what you need.
Out the box, you can follow guides for add more custom or pre-format fields, but not is more recomendable, this can make broken code.
meanwhile, you think work out the box, remember orangeHRM is a symfony based software, if you know how work symfony (MVC framework), work it whit OrangeHRM is more easy
good luck

Cant create new team project in TFS 2010

I have an old setup with a tfs2010 and sql2008 and the current Collection is holding 3 team Projects. Now i want to create a new team project but for some reason i cant. it seems that it has something to do with the SQL Reporting that dosent excists. i get an error TF218027.
Ive been going through the setup and im wondering a bit
What exactly does the TFS use the reportServer for (MSDN dosent seem to want to tell me)
is there any way to create a Team project without the reporting
Will it damage my excisting data if i create and connect to a new sql reportServer
Hope someone will take the time to give an answer
thanks.
I have already tried the different approtaches discussed on different threads and im primarily looking for information on the 3 questions written above
Try the steps below:
In browser go to: http://application-tier/Reports/Pages/Folder.aspx
Press Folder settings button in the toolbar
Press New Role Assignment button in the toolbar
Specify user name in Group or user name field, check Content Manager role and press OK.
So for the people that actually read the question the answer is.
Keeps track of agile work progress
yes and its actually easy. go to the reporting service and stop it and then tell TFS not to report under reporting
Since it was never running the answer here is No

Where is the code for Spree Master Variant Creation?

I'm using Spree's 3-0 Stable Backend. I know that Master Variant get created after a new product gets created, but I cannot find the file/code where the Master Variant code gets triggered.
The resource controller had pretty generic create code and a redirect to the Product's url. Does anyone know where/how the Master Variant gets created?
Anddd, I found my own answer after posting. Funny how that works out.
For anyone in the future searching this, you have to look inside of the core gem rather than the backend. Variants get created after a Product gets created if the "option_values_hash" exists, which triggers the "build_variants_from_option_values_hash" method.
"Options_values_hash" and "build_variants_from_option_values_hash" can both be found at "spree/core/app/models/spree/product.rb ".

symfony: trying to create a patch. What should be my first step(s)?

i created this ticked some days ago.
http://trac.symfony-project.org/ticket/8922#preview
I'm interested in creating a patch (if possible). I dont have experience
debugging (just using var_dump). What should be my first step(s) ?
Javi
Why do you want to create a patch? Do you want to fix your problem and publish the solution? If so than patches are usually created with a diff tool: http://stephenjungels.com/jungels.net/articles/diff-patch-ten-minutes.html
About your problem: you extend sfGuardUser class and add slug to the child table. Why do you expect that it shows up in the parent? It's not how inheritance works.

How to add "Project Description" in FogBugz?

When I create a new project (or even when I edit the Sample Project) there is no way to add Description to the project.
Or am I blind to the obvious?
There's no such thing as a project description, really. There's a column in the Projects page which is used so you can see which project is the default, built-in inbox, and we couldn't think of anything better to put as the column header for that column.
You are not crazy. It is used internally and not even stored in the database. I wondered the same thing when I first started using FogBugz, but found a forum entry to answer my question. As of today, I still don't think they have implemented it. Jump over to FogCreek and submit a request, if you would like to make it editable.
"Description" missing from Project?
How to Edit a Project Description
The description is mostly for system projects, like e-mail inbox.
You might be able to set one in the underlying DB table.

Resources