Rails style guide for render using double or single quotes -


i've been reading few books, blogs , open source code , have rails style guide question.

is popular consensus using single quotes when using the rendering partials.

<%= render 'posts' %> 

or

<%= render "posts" %> 

some books use both on coding examples.

thanks everyone.

the thing mention here single quote strings more efficient double qoute strings.

double quote strings interpolated:

"hello #{@name}!" # => "hello chris!" 

single quote strings don't:

'hello #{@name}!' # => 'hello #{@name}!' 

this gives single quote strings slight edge in speed during execution. don't worry much: speed gain really small.


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -