Attention, François !
en:
notification:
one: You have 1 notification
other: You have %{count} notifications
##What asset pipeline is
The asset pipeline provides a framework to concatenate and minify or compress JavaScript and CSS assets. It also adds the ability to write these assets in other languages and pre-processors such as CoffeeScript, Sass and ERB. It allows assets in your application to be automatically combined with assets from other gems.
The asset pipeline is implemented by the sprockets-rails gem, and is enabled by default.
Sprockets concatenates all JavaScript files into one master .js file and all CSS files into one master .css file.
You can disable it while creating a new application by passing the --skip-sprockets option
.
###Why?
Do you need to track objects by ID and look them up again, or look them up based on attributes, or even utilize some relational semantics, but have no real need for persistence?
PassiveRecord may be right for you!
###Features
def change_token | |
next_token = tokens.rotate!.first | |
CapsuleCRM.configure do |config| | |
config.api_token = next_token | |
end | |
end | |
def get_classes | |
CapsuleCRM.constants.map do |sym| | |
CapsuleCRM.const_get(sym) |
```rails new my_api --api````
*Configure your application to start with a more limited set of middleware than normal. Specifically, it will not include any middleware primarily useful for browser applications (like cookies support) by default. *Make ApplicationController inherit from ActionController::API instead of ActionController::Base. As with middleware, this will leave out any Action Controller modules that provide functionalities primarily used by browser applications. *Configure the generators to skip generating views, helpers and assets when you generate a new resource.
```config.api_only = true````
```class ApplicationController < ActionController::API````
// child combinator (>) | |
ol > li { | |
color: red; | |
} | |
// general sibling combinator (~) | |
.featured-image ~ p { | |
font-size: 90%; | |
} |
# to_i and to_int; | |
# to_s and to_str; | |
# to_a and to_ary; | |
# to_h and to_hash. | |
"string" + other #will call to_str on other, [1,2,3] + other will call #to_ary and so on (and will raise TypeError: no implicit conversion if object not responds to this methods); | |
"string" * other || [1,2,3] * other # will call #to_int on other; | |
a, b, c = *other # will call other to_ary (and, therefore, can be used to “unpack” custom collection objects—but also can cause unintended behavior, if other implements to_ary but was not thought as a collection); | |
some_method(*other) #—same as above, uses other#to_ary; | |
some_method(**other) #—new in Ruby 2, uses other#to_hash. |