rails c
Loading development environment (Rails 5.0.0)
>> Rails.root
=> #
>> Rails.root.class
=> Pathname
You can get any path in your Rails app by using join method:
>> Rails.root.join('app', 'assets')
=> #
You have to call to_s to get a string like this:
>> Rails.root.join('app', 'assets').to_s
=> "/Users/zepho/temp/zurb/app/assets"
No comments:
Post a Comment