![]() ![]() rfm.yml # file of settings in yaml format.The current hierarchy of configurable objects in Rfm, starting at the top, is: class MyModel :customer1, :layout => ' some_layout ' end When you pass a :use => :subgroup to the config method, you're saying use that subgroup of settings (on top of any existing upstream configuration). Use the configuration setting method config to set configuration for specific objects, like Rfm models. You can use configuration subgroups to contain any arbitrary groups of settings. Rfm will pick those up just as with the yaml file. Or put your configuration settings in a hash called RFM_CONFIG. Now you can put your configuration settings in a rfm.yml file at the root of your project or in your project's config/ directory, and Rfm will use those settings automatically when building your Model's Server, Database, and Layout objects. In previous versions of Rfm, you may have stored your configuration settings in a variable or constant, then passed those settings to Rfm::Server.new(MY_SETTINGS). Here's an example setup for a simple order-item table.Īpp/models/order_item.rb class OrderItem ' order_item_layout ' endĪpp/controllers/order_item_controller.rb def show = OrderItem. The third step is using your new models to query, create, update, and delete records in your Filemaker database. ![]() Create as many models as you wish, each pointing to a layout/table-occurrence that you want to work with. The second step is creating a Ruby class (often referred to as a "model" in this documentation) that represent a layout in your Filemaker database. The first step in getting connected to your Filemaker databases with Rfm (assuming your Filemaker Server is properly set up - see the Filemaker Server instructions for "Custom Web Publishing") is to store your configuration settings in a yaml file or in the RFM_CONFIG hash. This is in keeping with the original rfm gem from Sixfriedrice and with other forks of the rfm gem. Note that while this gem is officially named "ginjo-rfm", you require/load it into your Ruby scripts as simply "rfm". If you have several Ruby XML parsers installed, you can specify which one you want Rfm to use by setting the configuration option :parser with one of the supported options (:libxml, :nokogiri, :ox, :rexml). ![]() If you want to use one of the other supported parsers (libxml-ruby, nokogiri, ox), just add it to your Gemfile or require it manually. Ginjo-rfm v3 will use the built-in Ruby XML parser REXML by default. If you want the additional features provided by ActiveModel, just add activemodel to your Gemfile (or require it manually). Ginjo-rfm v3 can be run without any other gems, allowing you to create models to interact with your Filemaker servers, layouts, tables, records, and data. gem ' ginjo-rfm ', :git => ' ', :branch => ' master ' You can find the latest development release on github. Download & Installationįind the latest stable release at. You can write simple and powerful stand-alone ruby scripts that use ginjo-rfm to talk to a Filemaker server. Ginjo-rfm works great with Rails, but it does not require Rails. ![]() Since Filemaker Pro client does not support this, Filemaker server is required. Ginjo-rfm will work with any Filemaker server that supports the fmresultset.xml grammar over the http protocol. However ginjo-rfm does not have to be installed on your Filemaker server - it can be installed on any machine that has network/internet access Ginjo-rfm's primary function is to interact with Filemaker Server, Ginjo-rfm should run on any machine with a standard ruby installation. Ginjo-rfm version 3 has been tested successfully on Ruby 1.8.7, 1.9.3, 2.0.0, and 2.1.2. ActiveModel features can be activated by adding activemodel to your Gemfile (or requiring activemodel manually). Version 3 removes the dependency on ActiveSupport and is now a completely independent Gem, able to run most of its core features without requiring any other supporting Gems. Ginjo-rfm picks up from the lardawge-rfm gem and continues to refine code and fix bugs. Query your Filemaker database, browse result records as persistent objects, and create/update/delete records with a syntax similar to ActiveRecord. Rfm is a Ruby-Filemaker adapter, a Ruby Gem that provides an interface between Filemaker Server and Ruby. To preview this file in plain markdown, edit in TextMate andĬhoose Bundles/Markdown/Preview menu option. Github uses markdown or rdoc (maybe others?). To preview this file in yard, run 'rake yard' To update ginjo-rfm's yard documentation from github's master branch,įirst find 'rfm' on, then in list-view click the update button uses yard and can use markdown and other markup languages. Whereas Markdown is just another markup language. Yard is not the same as markdown - Yard is for ruby and can use any markup language, ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |