![]() ![]() We are going to use PostgreSQL as our database. It is a popular choice among Ruby On Rails community. If you haven’t created any Rails apps with PostgreSQL yet, you may want to check this tutorial. Once you are familiar with PostgreSQL, navigate to a directory where you keep your projects and open a command line prompt. By default Rails uses SQlite3, but since we want to use PostgreSQL as our database, we need to specify it by adding: -database=postgresql To generate a new app run this line: rails new collabfield -database=postgresqlĬollabfield, that’s how our applications is going to be called. Navigate to a newly created directory by running the command: cd collabfieldĪnd now we can run our app by entering: rails s Now we should’ve successfully generated a new application. Now we should be able to see what we got so far. Open a browser and go to If everything went well, you should see the Rails signature welcome page. When we go to we see the Rails welcome page. We’re going to switch this default page with our own home page. In order to do that, generate a new controller called Pages. If you are not familiar with Rails controllers, you should skim through the Action Controller to get an idea what the Rails controller is. Run this line in your command prompt to generate a new controller. ![]() The output in the command prompt should look something like this: This rails generator should have created some files for us. We are going to use this PagesController to manage our special and static pages. ![]() Now open the Collabfield project in a text editor. Open a file pages_controller.rb app/controllers/pages_controller.rb I use Sublime Text, but you can use whatever you want to. Of course we could define home page in a different controller and in different ways. When we open pages_controller.rb, we see this: class PagesController Home page But usually I like to define the home page inside the PagesController. Now when we go to we should see something like this instead of the default Rails information page. We can start introducing new things to our website. If you don’t already know, when we generate a new application, a new local git repository is initialized.Īdd all current changes by running: git add -A I think it’s time to create our first commit. These charts showcased metrics like backlog, orders processed by value ($) and volume, aging buckets, team utilization, cost of operations, etc.Then commit all changes by running: git commit -m "Generate PagesController. This view was used to display the impact of an AI engine on the process without shooting too many numbers at the viewer. Then we surrounded the high-level process view images with panes containing charts to provide an excellent visual interface. Then, we created motion paths to let the orders move over the images of sub-processes to give them a progressive motion feel. We then saved these slides as images to be used in the model. ![]() Arriving trains contain cars of 5 different types that are sent to 5 departure tracks. A hump yard is a classification yard where cars are taken to a hump from where they are driven to classification tracks by the force of gravity. We created slides of as-is and to-be scenarios, each containing only the essential sub-processes. We will use AnyLogic Rail Library in this tutorial to build a model of a hump yard. We again used this logic to hide and unhide in creating a high-level overview of the overall process. E.g., When the model starts, one will see the toggle button image in the off state, but when you click on the image, the off-state image is set to invisible, and the on-state image will become visible and vice versa. We used programming to hide and unhide the images. Instead, we used images of the two states of a toggle button, i.e., on and off. While creating the switch, we didn’t use a button control as it looked very basic. At this juncture, the work we did to make the switch to toggle between as-is and to-be scenarios and view areas, that I learned in the AnyLogic in 3 days book, was to become the base of our presentation layer. We took a step back and decided to create a separate presentation layer over what we had built. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |