There’s a file called
Add in it
ActiveSupport::Inflector.inflections do |inflect| inflect.acronym 'API' end
and the API namespace will be available as a directory called
- Accessing a class’s constants
- Scope of Constants in Ruby Modules
- Where’s the best place to define a constant in a Ruby on Rails application?
- What is the best way to handle constants in Ruby when using Rails?
- How to get a random number in Ruby
- How to drop columns using Rails migration
- Remove duplicate elements from array in Ruby
- Case statement with multiple values in each ‘when’ block
- How to replace a hash key with another key
- Paperclip::Errors::MissingRequiredValidatorError with Rails 4
- How to prevent browser page caching in Rails
- Rails: Open link in new tab (with ‘link_to’)
- What is the difference between pluck and collect in Rails?
- How do I strip non alphanumeric characters from a string and keep spaces?
- RSpec controller testing – blank response.body
- To change directory inside a ruby script?
- Rails 4: How to reset test database?
- If string is empty then return some default value
- How to suppress Rails console/irb outputs
- Converting UTC timestamp to ISO 8601 in Ruby
- Difference between after_create, after_save and after_commit in rails callbacks
- How to add minutes to a Time object
- Welcome/home page in Ruby on Rails – best practice
- Rspec Output Format: Documentation
- Connecting Rails 3.1 with Multiple Databases
- Call method only if it exists
- How to set a file upload programmatically using Paperclip
- How can I replace a hash key with another key?
- How to know whether a model is new or not?
- How to organize minitest/unit tests?
- Using send_file to download a file from Amazon S3?
- Forking a gem for a Rails project
- What is the difference between `try` and `&.` (safe navigation operator) in Ruby
- Radio buttons on Rails
- Is there a way in Ruby/Rails to execute code that is in a string?
- How can I send mail with rails without a template?
- rails convert string to number
- In Rails, how to get current URL (but no paths)
- Running a spec in RubyMine results in “cannot load such file — teamcity/spec/runner/formatter/teamcity/formatter (LoadError)”
- Ruby on Rails app on Google App Engine
- How can I delete special characters?
- Rails Routing (root :to => …)
- Can I install gems with apt-get on Ubuntu?
- How to get request’s target controller and action with Rails 3?
- What does `:location => …` and `head :ok` mean in the ‘respond_to’ format statement?
- Rails: Postgres permission denied to create database on rake db:create:all
- Logging in delayed_job?
- Rails: Testing named scopes with RSpec
- How can I create a new Date instance in Ruby
- Ruby on Rails: conditionally display a partial