View gist:f7f6fa0a2c3cbac08fd7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NOKOGIRI_USE_SYSTEM_LIBRARIES=1 \ | |
gem install nokogiri -- \ | |
--with-xml2-config=/usr/local/opt/libxml2/bin/xml2-config \ | |
--with-xslt-config=/usr/local/opt/libxslt/bin/xslt-config |
View capybara cheat sheet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
View TimePickerInput
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TimePickerInput < SimpleForm::Inputs::Base | |
def input | |
js_node_id = input_html_options[:id] || "#{object_name}_#{attribute_name}" | |
template.content_tag :div, :class => 'input-append time' do | |
@builder.text_field(attribute_name, input_html_options.merge(:class => 'input-medium')) + | |
template.content_tag(:span, :class => 'add-on') do | |
template.content_tag :i, '', :class => 'icon-time' | |
end + js_code(js_node_id).html_safe | |
end |
View gist:144385
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= javascript_include_tag "sifr", "sifr-config", :cache => true, :content_type => 'text/javascript' %> |
View gist:142277
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
in yaml | |
en: | |
activerecord: | |
errors: | |
models: | |
entry: | |
attributes: | |
day_name: | |
blank: "Please fill in the day name" |