This file contains hidden or 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
<!-- | |
<form autocomplete="off"> will turn off autocomplete for the form in most browsers | |
except for username/email/password fields | |
--> | |
<form autocomplete="off"> | |
<!-- fake fields are a workaround for chrome/opera autofill getting the wrong fields --> | |
<input id="username" style="display:none" type="text" name="fakeusernameremembered"> | |
<input id="password" style="display:none" type="password" name="fakepasswordremembered"> | |
This file contains hidden or 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
BUNDLE_GEMFILE=gemfiles/rails_51.gemfile bundle exec cucumber features/index/batch_actions.feature:4 --backtrace | |
Using the default profile... | |
.I, [2017-03-22T17:07:41.657194 #22920] INFO -- : Started GET "/admin/posts" for 127.0.0.1 at 2017-03-22 17:07:41 +0200 | |
I, [2017-03-22T17:07:41.855500 #22920] INFO -- : Started GET "/stylesheets/active_admin.css" for 127.0.0.1 at 2017-03-22 17:07:41 +0200 | |
I, [2017-03-22T17:07:41.857649 #22920] INFO -- : Started GET "/javascripts/active_admin.js" for 127.0.0.1 at 2017-03-22 17:07:41 +0200 | |
I, [2017-03-22T17:07:41.872773 #22920] INFO -- : Started GET "/stylesheets/active_admin/print.css" for 127.0.0.1 at 2017-03-22 17:07:41 +0200 | |
.........F-- | |
(::) failed steps (::) |
This file contains hidden or 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
Scenario: When the belongs to is optional and resources is renamed | |
Given a configuration of: | |
""" | |
ActiveAdmin.register User | |
ActiveAdmin.register Post, as: "Article" do | |
belongs_to :user, optional: true | |
navigation_menu :default | |
end | |
""" |
This file contains hidden or 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
bundle env | |
## Environment | |
``` | |
Bundler 1.14.3 | |
Rubygems 2.6.10 | |
Ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin15] | |
GEM_HOME /Users/igor/.rvm/gems/ruby-2.4.0 | |
GEM_PATH /Users/igor/.rvm/gems/ruby-2.4.0:/Users/igor/.rvm/gems/ruby-2.4.0@global | |
RVM 1.28.0 (master) |
This file contains hidden or 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
rvm install 2.4.0 --autolibs=homebrew | |
Searching for binary rubies, this might take some time. | |
No binary rubies available for: osx/10.11/x86_64/ruby-2.4.0. | |
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies. | |
Checking requirements for osx_brew. | |
Installing requirements for osx_brew. | |
Updating system..... | |
Installing required packages: zlib, zlib. | |
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date. | |
Requirements installation successful. |
This file contains hidden or 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
Coverage report generated for RSpec to /Users/igor/Projects/ruby/gems/activeadmin/coverage. 3614 / 4020 LOC (89.9%) covered. | |
/Users/igor/.rvm/rubies/ruby-2.2.2/bin/ruby -I/Users/igor/Projects/ruby/gems/activeadmin/gemfiles/vendor/bundle/ruby/2.2.0/gems/rspec-core-3.5.4/lib:/Users/igor/Projects/ruby/gems/activeadmin/gemfiles/vendor/bundle/ruby/2.2.0/gems/rspec-support-3.5.0/lib /Users/igor/Projects/ruby/gems/activeadmin/gemfiles/vendor/bundle/ruby/2.2.0/gems/rspec-core-3.5.4/exe/rspec --pattern spec/requests/\*\*/\*_spec.rb | |
Run options: | |
include {:focus=>true} | |
exclude {:skip=>true} | |
All examples were filtered out; ignoring {:focus=>true} | |
......Running JSLint: |
It's pretty easy to do polymorphic associations in Rails: A Picture can belong to either a BlogPost or an Article. But what if you need the relationship the other way around? A Picture, a Text and a Video can belong to an Article, and that article can find all media by calling @article.media
This example shows how to create an ArticleElement join model that handles the polymorphic relationship. To add fields that are common to all polymorphic models, add fields to the join model.
This file contains hidden or 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
en-GB: | |
date: | |
formats: | |
# Use the strftime parameters for formats. | |
# When no format has been given, it uses default. | |
# You can provide other formats here if you like! | |
default: "%d/%m/%Y" | |
short: "%d %b" | |
long: "%d %B, %Y" |
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 12 columns, instead of 4 in line 1.
This file contains hidden or 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
Task ID,Type,Name,Status,Project,Context,Start Date,Due Date,Completion Date,Duration,Flagged,Notes | |
1,Context,Rocky Raccoon,active | |
1.1,Action,Now somewhere in the black mountain hills of Dakota,,,Rocky Raccoon,,,,,0, | |
1.2,Action,There lived a young boy named Rocky Raccoon,,,Rocky Raccoon,,,,,0, | |
1.3,Action,And one day his woman ran off with another guy,,,Rocky Raccoon,,,,,0, | |
1.4,Action,He hit young Rocky in the eye,,,Rocky Raccoon,,,,,0, | |
1.5,Action,Rocky didn't like that he said I'm gonna get that boy,,,Rocky Raccoon,,,,,0, | |
1.6,Action,So one day he walked into town,,,Rocky Raccoon,,,,,0, | |
1.7,Action,Booked himself a room in the local saloon,,,Rocky Raccoon,,,,,0, | |
1.8,Action,Rocky Raccoon checked into his room,,,Rocky Raccoon,,,,,0, |