app/helpers/crud_helper.rb in templus_models-1.0.5 vs app/helpers/crud_helper.rb in templus_models-1.0.6

- old
+ new

@@ -7,14 +7,14 @@ def is_active_action(action_name) params[:action] == action_name ? "active" : nil end def is_raro_crud(attribute) - if(Rails.env == "production") - @@cruds = Dir[Rails.root.join("app","raro_crud","*.rb")].map{|f| f.split(/\//).last.gsub(/_crud\.rb/,'')} unless @@cruds - else + #if(Rails.env == "production") + # @@cruds = Dir[Rails.root.join("app","raro_crud","*.rb")].map{|f| f.split(/\//).last.gsub(/_crud\.rb/,'')} unless @@cruds + #else @@cruds = Dir[Rails.root.join("app","raro_crud","*.rb")].map{|f| f.split(/\//).last.gsub(/_crud\.rb/,'')} - end + #end return @@cruds.include?(attribute.to_s) end def menu_helper_crud(modelo, url, nome, classe, icon='') if can?(:read, classe) \ No newline at end of file