Sha256: 006f4be8304419ccf2080cf20089191f03319d30ac2778ef8dcbf1105a136d29

Contents?: true

Size: 382 Bytes

Versions: 5

Compression:

Stored size: 382 Bytes

Contents

module RailsAssist::File
  module Routes
    def insert_into_routes route_stmt=nil, &block
      statement = block ? yield : route_stmt
      routes_file.insert statement, :after => 'routes.draw do'
    end

    def insert_last_in_routes route_stmt=nil, &block
      statement = block ? yield : route_stmt
      routes_file.insert statement, :before_last => 'end'
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rails_assist-0.4.4 lib/rails_assist/file/routes_file.rb
rails_assist-0.4.3 lib/rails_assist/file/routes_file.rb
rails_assist-0.4.2 lib/rails_assist/file/routes_file.rb
rails_assist-0.4.1 lib/rails_assist/file/routes_file.rb
rails_assist-0.4.0 lib/rails_assist/file/routes_file.rb