Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Proc.instance_methods(false).sort
показать свои собственные методы экземпляра класса.
без false - покажет вообще все (свои, унаследованные и внедренные).
find(:id, 'user_39').set('вася')
find(:css, 'search').set('вася')
require 'test_helper'
class YourHelperTest < ActionView::TestCase
test "should work" do
assert_equal "result", your_helper_method
end
end
# оно типа само сделает
en:
"true": "yes"
"false": "no"
erb:
<%= t account.send_notifications?.to_s %>
notes:
1. "" in yaml is necessarily (all of them)