method
public_path
public_path()
public
Returns a Pathname object of the public folder of the current rails project, otherwise it returns nil if there is no project:
Rails.public_path # => #<Pathname:/Users/someuser/some/path/project/public>