Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


Share this Page URL
Help

Chapter 6: Metadata and Push--Creating A... > Creating the first view using metada... - Pg. 122

Metadata and Push--Creating Agile Views The metadata for an adapter is synchronized to Rhodes along with the rest of the adapter dataset. Metadata is called before the query method in the SyncEngine workflow, so you can tailor your query method based on metadata. Rhodes uses the synchronized metadata definition to render views at runtime. These views are driven by the metadata definition, so when a new definition is synchronized, the views will automatically reflect the changes. To use this powerful feature metadata we have to install and configure Rhodes-translator gem. If you are new to Ruby, gem is a Ruby library. Time for action ­ Installing the Rhodes translator gem To get started, we have to follow these steps: 1. The first step is to install the rhodes-translator gem. Go to the command prompt and type the following command: gem install rhodes-translator 2. Then, add rhodes_translator to your extensions in your Rhodes application's build.yml file: extensions: ["rhodes-translator"] 3. You need to make sure that sync is enabled on the model, which is using metadata: class Company