Sha256: 6d89f89a16d1ce0e0ff1c30360e29bd4849f85c3407d1c140a5e63650f6f3d6c

Contents?: true

Size: 869 Bytes

Versions: 6

Compression:

Stored size: 869 Bytes

Contents

require 'sugar-high/file'
require_all File.dirname(__FILE__) + '/crud'

module RailsAssist::Artifact
  (RailsAssist.artifacts - [:model]).each do |name|
    class_eval %{
      module #{name.to_s.camelize}
        def new_#{name}_content name, content=nil, options = {}, &block
          options = options.merge(:type => :#{name}, :content => content)
          new_artifact_content name, options, &block
        end
      end
    }
  end

  RailsAssist.artifacts.each do |name|
    plural_name = name.to_s.pluralize
    class_eval %{
      module #{name.to_s.camelize}
        include RailsAssist::BaseHelper
        
        def self.included base
          base.class_eval do              
            include RailsAssist::Artifact::CRUD        
          end
        end
                
        multi_aliases_for :#{name}            
      end
    }
  end    
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rails_artifactor-0.5.0 lib/rails_artifactor/artifact/crud.rb
rails_artifactor-0.4.0 lib/rails_artifactor/artifact/crud.rb
rails_artifactor-0.3.6 lib/rails_artifactor/artifact/crud.rb
rails_artifactor-0.3.5 lib/rails_artifactor/artifact/crud.rb
rails_artifactor-0.3.4 lib/rails_artifactor/artifact/crud.rb
rails_artifactor-0.3.3 lib/rails_artifactor/artifact/crud.rb