2 Replies Latest reply on Aug 5, 2013 9:49 AM by Fin Hea

    Only Show and Index in Model ?

      Dear Professionals !

       

      Please explain:

      1) What is the difference between 2 gems -  rhoelements and rhodes ?

      2) How to create a model WITHOUT Delete,Update,Edit,Create,New Actions

      and Pages ?

            Only Show and Index ?

       

      Warm Wishes

       

        • Re: Only Show and Index in Model ?
          Pietro Francesco Maggi

          1) What is the difference between 2 gems -  rhoelements and rhodes ?

           

          "elements" and "des" :-P

           

          well, the Rhodes gem is the basic MVC framework, available with MIT license and developed in the open on github:

          https://github.com/rhomobile/rhodes

          http://rubygems.org/gems/rhodes

           

          The RhoElements gem, contains the Motorola Solution proprietary code:

          • Webkit browser for Windows Mobile and Windows CE
          • Enterprise device capabilities (RFID, NFC, Barcode, etc)
          • Etc.

           

          To use the RhoElements gem, rhodes is a prerequisite.

           

          2) How to create a model WITHOUT Delete,Update,Edit,Create,New Actions

          The code generators we provide can only build Rhodes model WITH the basic CRUD operation. You can delete what you don't need, once you generated the code or you can build it by hand following the step:

          • Create a folder under the /app folder (please start name of folder with an upper case).
          • Create a controller.rb file containing a basic class (class names in ruby start with an uppercase, use the same word used when you created the folder)

                  If you created the folder with the name "Pietro" then you can use:

          require 'rho/rhocontroller'
          require 'helpers/browser_helper'
          class PietroController < Rho::RhoController
          include BrowserHelper
          
            def index
            end
          
            def show
             end
          end
          

          Use the controller in the settings folder of the generated app as an example.

           

          Best regards

          Pietro