Sha256: 94d8c4d2ea936bca339367906678af14683589affbe4dc3139f1019847860823
Contents?: true
Size: 607 Bytes
Versions: 3
Compression:
Stored size: 607 Bytes
Contents
module RailsAssist::File module Routes # insert as first route statement def insert_into_routes route_stmt=nil, &block statement = block ? yield : route_stmt routes_file.insert statement, :after => 'routes.draw do' end alias_method :insert_as_first_route_statement, :insert_into_routes # insert as last route statement def insert_last_in_routes route_stmt=nil, &block statement = block ? yield : route_stmt routes_file.insert statement, :before_last => 'end' end alias_method :insert_as_last_route_statement, :insert_last_in_routes end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rails_assist-0.5.2 | lib/rails_assist/file/routes_file.rb |
rails_assist-0.5.1 | lib/rails_assist/file/routes_file.rb |
rails_assist-0.5.0 | lib/rails_assist/file/routes_file.rb |