Browsing projects by Tag(s)

Select a tag to browse associated projects and drill deeper into the tag cloud.

Showing page 1 of 1

Localization Scaffold plugin for Ruby on Rails. Specially designed for East-Asian customs (also compatible with other languages). Written by Cao, Weiyuan (Forrest Cao) caoweiyuan(at)gmail(dot)com. In this plugin, the scaffold_resource generator can also generate nested resources, considering the ... [More] difference in MVC codes and functional test. 中文Ruby on Rails的脚手架本地化插件。特别考虑了东亚语言的特点(其他语言也可以使用)。作者:曹维远 caoweiyuan(at)gmail(dot)com。 由于嵌套资源(nested resource)的代码与众不同而富有规律,在这个插件中,还为scaffold_resource生成器集成了生成嵌套资源的功能。具体使用方法参见Wiki。 [Less]

0
 
  0 reviews  |  0 users  |  0 current contributors
 
 

MOVED TO GITHUBhttp://github.com/stalcottsmith/limber/tree/master git://github.com/stalcottsmith/limber.git WARNING: Experimental... LimberBending Flex to Rails. What Does It Do?This Rails plugin provides a two-stage active code generator for Adobe Flex applications which interact with a ... [More] Rails resource on the back end. The input to the generator is a Ruby DSL along with a number of helpers (behaviors and components) to help keep your code dry. This allows Ruby developers to utilize the full UI widget library for Flex to develop Rich Internet Applications with relatively few lines of Ruby. It provides generators and rake tasks to produce the entire application using the Cairngorm framework. I tried to remain faithful to the general ideas contained in the example application in the Flexible Rails book, however, having produced one entire production application this way, I am thinking about refactoring and possibly generating code using a different framework. There should be no need to modify the generated code except in some cases where you may wish to test or debug something. As such, it is an "active" code generator. You only maintain Ruby code. You may include arbitrary ActionScript where needed, however, when you find yourself dropping into ActionScript more than once for the same type of thing, it is advisable to extend Limber by adding a Behavior or a Component. (The names for these abstractions may change.) So far I have developed a couple components such as: form_for data_grid_for create_or_update_buttons_for and so on. These are really more analogous to Rails helpers so I am a little unhappy overloading the term "component." Behaviors include: for_each create update destroy reorder alert filter_on_boolean_value format_currency format_date and more... Example CodeUsage of data_grid_for def users_list_panel panel :title => "User List", :id => :userListPanel, :background_alpha => 0.15, :height => "100%", :width => "50%", :status => "({_model.users.length}) Users" do data_grid_for(:users, :id => :usersDG, :background_alpha => 0.15, :width => "100%", :height => "100%", :item_click => "userSelectionChanged(event)" ) do |grid| grid.column "ID", :id, :width => 30 grid.column "Logon Name", :logon_name, :width => 145 grid.column "Name", :known_as_name, :width => 145 grid.column "Company", :company_name, :width => 200 end end endUsage of form_for def user_data_form v_box('Details', :height => "100%", :width => "100%") { form_for( :user, :truth_values => ['Y', 'N'] ) do |f| f.heading "{_model.currentUser == null ? 'Enter new user' : 'Update existing user' }" f.text "First Name", :first_name f.text "Last Name", :last_name f.text "Logon Username", :logon_name, :required => true, :max_chars => 50 f.text "Password", :password, :display_as_password => true, :max_chars => 50, :text => "{null}" f.text "Confirm Password", :password_confirmation, :display_as_password => true, :max_chars => 50, :text => "{null}" f.text "Email Address", :email_address f.check "Internal User?", :is_internal_user f.combo "Company", :company_id, :label_field => 'name', :width => 225, :collection => :companies, :label_function => "companyStateAndName" f.button_bar { create_or_update_buttons_for(:user, :cancel => "_model.currentUser = null ; #{f.clear}", :create => f.form_values, :after_create => f.clear, :update => f.form_values.merge(:id => model_value(:user, :id)), :after_update => f.clear) button "Delete", :click => "deleteClickHandler(event) ; #{f.clear}", :enabled => bind_to("_model.currentUser != null") } end } endAs you can see, some ActionScript is required but I have tried to make it as minimal as possible. Why?The impetus for development of this plugin came in the form a consulting project. I was contacted about an application using Ruby on Rails and Flex which had been in development for quite some time and was way behind schedule. They were seeking to on-shore the development and get the project into production in six weeks. I did not know Flex but I was intrigued and immediately began to review the Flexible Rails example application and related Flex documentation. In the end, I was able to rewrite the entire application from scratch, replacing 30,000 lines of hand coded MXML and ActionScript with about 3000 lines of ruby, including a minimal amount of ActionScript. This seemed to me to be a far more maintainable code base. I was able to do this in two months, while developing the plugin. I am convinced the value of Code Generation cannot be underestimated. Furthermore, Ruby is a fantastic language for writing code generators. Under Active DevelopmentThis code is under active development and may not work. There are parts which are not yet included. Documentation is so far, non-existent, however, you are welcome to take a peek. Known IssuesI know there are places where I am not doing things the best way and have been sloppy. There is cruft that needs to be removed. The main method in FlexMXMLComponent needs to be cleaned up. Debugging behaviors could be a lot easier. I know that I have been inconsistent in some of my meta-programming techniques and I look forward to cleaning up based on what I have learned. Please be forgiving. I developed this primarily as a tool for myself under heavy deadline pressure to make an impossible project just barely possible. It worked. I think there is considerable value in this approach and I plan to clean this up, document it and release a screencast and example application in May or June. Stay tuned. [Less]

0
 
  0 reviews  |  0 users  |  3,048 lines of code  |  0 current contributors  |  Analyzed about 2 years ago
 
 

Useful plugins, helpers, generators, etc for rails.

0
 
  0 reviews  |  0 users  |  0 current contributors
 
 

Who's your daddy? Kill Rails fixtures, Don't Repeat Yourself, reduce the complexity of your tests.

0
 
  0 reviews  |  0 users  |  1,014 lines of code  |  0 current contributors  |  Analyzed 7 days ago
 
 
 
 

Creative Commons License Copyright © 2013 Black Duck Software, Inc. and its contributors, Some Rights Reserved. Unless otherwise marked, this work is licensed under a Creative Commons Attribution 3.0 Unported License . Ohloh ® and the Ohloh logo are trademarks of Black Duck Software, Inc. in the United States and/or other jurisdictions. All other trademarks are the property of their respective holders.