Erubis 2.5.0 released - a fast and extensible eRuby

I have released Erubis 2.5.0.
Erubis is another eRuby implementation which is very fast and
extensible than ERB and eruby.

Enhancements from 2.4.1:

  • Ruby on Rails 2.0 support
    If you are using preprocessing, notice that _?(‘’) will be NG
    because it contains period (’.’) character.

    [%= link_to ‘Edit’, edit_user_path(_?(’’)) %]
    [%= link_to ‘Show’, @user %]
    [%= link_to ‘Delete’, @user, :confirm=>‘OK?’, :method=>:delete %]

    <%= user_id = %>
    [%= link_to ‘Edit’, edit_user_path(?(‘user_id’)) %]
    [%= link_to ‘Show’, :action=>‘show’, :id=>
    ?(‘user_id’) %]
    [%= link_to ‘Delete’, {:action=>‘destroy’, :id=>_?(‘user_id’)},
    {:confirm=>‘OK?’, :method=>:delete} %]

  • (experimental)
    Rails form helper methods for preprocessing are provided.
    These helper methos are available with preprocessing.

    ex. _form.rhtml

    Name: <%= text_field :user, :name %>
    Name: [%= pp_text_field :user, :name %]


    Name: <%= text_field :user, :name %>

    Ruby code:

    _buf << ’
    Name: '; _buf << ( text_field :stock, :name ).to_s; _buf << ’

    This shows that text_filed() is called every time when rendering,
    but pp_text_filed() is called only once when loading template,
    so pp_text_field() with prepocessing is much faster than

    See User’s guide for details.

Nice :smiley:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs