CodeHint


Ruby on Rails (7 items)



rails new app

Create new rails application

  Edit
rails generate controller Posts
Create new controller at app folder with the following code:

class PostsController < ApplicationController
end
  Edit
rails routes

See the routes in the application

  Edit
  Form example
<%= form_for :article, url: articles_path do |f| %>
   <p>
      <%= f.label :title %><br />
      <%= f.text_field :title %>
   </p>
   <p>
      <%= f.label :text %><br />
      <%= f.text_area :text %>
   </p>
   <%= f.submit %>
<% end %>
  Edit
rails about

Gives information about version numbers for Ruby, RubyGems, Rails, the Rails subcomponents, your application's folder, the current Rails environment name, your app's database adapter, and schema version. It is useful when you need to ask for help, check if a security patch might affect you, or when you need some stats for an existing Rails installation.

  Edit
rails server

Serves the application (You must be INSIDE project folder) just like php artisan serve in Laravel

  Edit
  config.reload_classes_only_on_change = false

Updates every change on puma server

  Edit