Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

link_to / form_for doesn't work for singular resource #1769

Open
Godisemo opened this Issue · 59 comments
@Godisemo

In my routes I have

resource :company

and in my views

<% form_for(@store) do |f| %><% end %>

When

new action gets an error when rendering

undefined method `hash_for_companies_path' for #<Module:0x00000102bfd3f0>

The stack trace reviels that the problem occurs in

lib/action_dispatch/routing/polymorphic_routes.rb:133:in `polymorphic_url'

edit action can render without errors but the forms url is /company.4 where 4 is the id of the company.

This seems to be a bug that has been around for a very long time so I think it's time to fix it.

@pixeltrix
Owner

You're right the error has been around for a long while however a clean solution doesn't readily represent itself. The polymorphic_url helper has no 'intelligence' in how it operates - it has no information about what you've declared as resources in your routes.rb. All it has to go on it the name of the model and how that maps to the named url helpers.

In your case when passing a new Company instance it tries to map to the plural path as that's the standard route for the create action. The question is how to determine a singular resource from a regular resource - suggestions are welcome. The best solution I can think of is to try a respond_to? first and if it doesn't then try the singular option - I'll take a look at it.

@pixeltrix pixeltrix was assigned
@gucki

Ah, didn't know there's already a ticket for htis. So here's my post from the mailing list:

What about making the polymorphic routing in rails to try a plural route first. If it fails, try a singleton route. If it fails, raise.

This is not the nicest and most performant way (the result could be cached in production so it doesn't really matter in the end) but I guess it should solve most cases. Or is this too much magic?

@wildchild

I am wondering why this ticket pointed to 3.2 milestone?

@pixeltrix
Owner

Because it’s not a blocker for the 3.1 release and it may require too many changes to go into a patch release.

@mikeni

i think this bug should be written in rails guides somewhere.

for anyone using a singular resource, they will eventually find themselves on this bug page. better to announce first

@maximeg

Still occurring.

@mikeni

for now i just use scope =(

@phantomwhale

Yep, my first time with the singular resource form, and I walked smack into this bug. Would be great to see a fix in an upcoming version - don't see any target milestone, so I presume it's not under active development at the moment ?

@kjakub

Yep, here too, my first time with singular resource, lost 3h coz i was blaming myself like a first

@glebm

+1

@felipero

I believe respond_with has the same problem.

@pixeltrix
Owner

@felipero yes it will - as will anything where you can pass a model instance and get a url.

I haven't forgotten about this issue, it's just trickier than it seems to fix. The problem is there is no easy way to discern whether a model maps to a singular or a regular resource url. Checking for the presence of a collection url doesn't work as the resource may have been specified with :except => :index and trying to rescue route generation errors doesn't work because passing an instance to a singular resource url helper will generate a url with the format set to the id and no exception.

The only apparent way I can think of doing it is by creating a data structure that keeps a track of whether a set of routes is a singular resource and then querying that data structure in polymorphic_url. However before I or someone else can go ahead with that there needs to be a discussion whether we want the overhead of that structure.

@felipero

Well, it is a non-blocking issue. Thanks for you prompt answer. :)

@zelig

I think someone ought to patch this. My thinking would not be along the lines of trying routes to fail (and fall back on the plural as in the comments in the rails issue) but go after association reflections.

Can we make the assumption that behind every nested resource form there is an activerecord association? No but we can test it

for form_for [a, b] (of classes A, B) if there is a model class A with has_many assoc to B, we can safely assume, expect that routes are set up to support a plural ("a_bs_path") for create. If there is a has_one we can safely assume, expect that routes are set up to support a singular ("a_bs_path"). If we find none, we fall back to the plural as the status quo educated guess. My 2 cents. Is this against modularity and decoupling MVC?

@pixeltrix
Owner

@zelig firstly, I think anything like that is tying your models to your routes too much. Secondly, what about non-AR models, and finally it doesn't fix the problem for top-level singular resources, e.g;

class Basket < ActiveRecord::Base
end

resource :basket

There's nothing in the model that's going to help with that - the only way it to store the fact that it's a singular resource and query that when generating the url. Adding metadata to the model won't help as a model may sometimes be a singular resource (/account) or a multiple resource (/admin/users/1).

@zelig

Surely this doesn't solve all problems but in the special case of nested AR resources, plurality can be reasonably guessed using model class associations, for others (i.e., top-level resource or non-AR models or models with implicit associations) the plural is a decent guess. This sounds to me a simple improvement but maybe the caveat is that it is not the right solution.

So where would you store resource singularity so that polyorphic_url could access this info? In case people are interested in fixing this ugly duckling.

@jakevose

Add me to the list of people who just lost a bunch of time trying to figure out the "right" way to work around this and thinking myself crazy before stumbling upon this obscure reference to a long-standing, known bug.

@pjg

Add me to the list of people who just lost a bunch of time trying to figure out the "right" way to work around this and thinking myself crazy before stumbling upon this obscure reference to a long-standing, known bug.

And me as well.

@pjg

To anyone stumbling upon this issue, the workaround is quite simple. Given:

resource :billing_info

You generate the form_for call like this:

= form_for @billing_info, url: billing_info_path do |f|
@gmile

@pjg one of the nice features of form_for is to generate a proper url, based on object's persistance state, i.e. autodetect a path with either _create or _update affixes. That said, i'm unsure if the solution you propose will handle both cases at the same time. Will it?

@pjg

Yeah, it does handle both :create and :update actions.

@asymmetric

It would be really nice to have this fixed, or at least to have the problem prominently documented somehow. Just spent 2hrs thinking it was an error on my end!

@jlbenc

Wasted 2+ hours hunting this issue down, :(

Thanks @pjg for your workaround! :+1:

@gaurish

Today, I faced issue too. solved via workaround given Thanks @pjg :+1:

@hasghari

I agree with @mikeni that this bug should be documented in the Rails guides.

@athal7 athal7 referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@athal7 athal7 referenced this issue from a commit in athal7/rails
Andrew Thal Add tests to demonstrate form_for issues with a singular resource. Is…
…sue #1769

These failing tests were written in an attempt to demonstrate the issues
discussed in #1789 related to attempting to use form_for with a singular
resource. I am aware from the discussion that the fix will most likely
not be an easy one, but I figured it could be helpful to have tests to
demonstrate the issue, and I hope that these tests serve that purpose.
6534486
@nazar

Thanks @pijg for saving me an hour or three

@gustavokloh

+1 for this issue!

And one more thanks @pjg

@nl0pvm

Wasted 1,5 hours hunting this issue down :-1:

@leebrooks0

All in All using singular resources as a newbie is a huge PITA

@codyrobbins

The above documentation fix should at least hopefully prevent anyone else from running into this bug until it’s fixed.

@tute tute referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@jonleung

I love how this is still a bug lol

@tute

@rafaelfranca, can I help you squash this?

@rafaelfranca

Of course. Pull requests are always welcome. Make sure to ping @pixeltrix if you got a fix

@tute

@rafaelfranca got the failing test from @athal7 running on current master, but seems I'll need some help. The issue is ActionDispatch::Routing::PolymorphicRoutes#polymorphic_path not knowing if the route was defined as singular or not. See #1769 (comment). How to approach it?

@pixeltrix
Owner

@tute you refactor the routing code, adding a :model option to resource and resources so that we can map from the model class to the route and the route needs to keep track of whether it's a singular or collection resource. That way you can directly lookup the correct route and not infer the route name from the model class.

That's how I plan to do if for Rails 4.1 :persevere:

@tute

I'd love a way for PolymorphicRoutes to check the routes of the app. That way, and I know it's obvious, from the record it could check if it relates to a singular ot collection resource.

Too many moving parts for my new-to-rails-code brain. Would love to peek onto your machine while you work if that's fine with you, so I learn and can help in upcoming ones!

@stephdatu

Can't wait til this is fixed! Thanks, yet again, @pjg

@rosswilson

I too have just encountered this issue, it'd be great if a fix can be found

@RKushnir

How about having a singular option? What do you think?

form_for @resource, singular: true

I guess, this would then have to be passed down to polymorphic_url.

@pixeltrix
Owner

@RKushnir there's already a :url option so that doesn't really buy us anything since the create url and update url are the same, e.g:

form_for @resource, url: resource_url

I promise to fix it for 4.1 :smile:

@RKushnir

@pixeltrix I can't totally agree. True that it doesn't buy anything in terms that we still have to pass an option, yet there's some profit in it. It's easier to type and abstract the singular option(or even make a helper singular_form_for) to use in all cases, instead of providing specific url option for each case individually.

Do you already have any ideas on how you would fix it?
An easier way would be to allow users to override some method in the model(i.e. model_name.route_key) to specify a singular form, but it's a view+routes issue and involving the model would be highly undesirable.
Another option would be to make polymorphic_url dependent on the router, so it has enough information about the resource, but seems like it would add much logic into polymorphic_url.

@codyrobbins

@RKushnir: I’m with @pixeltrix that adding a singular option doesn’t really gain you anything when you can already use the url option to work around the problem. Adding an additional special-purpose option when there’s already a workaround is just cruft as opposed to fixing the underlying behavior.

@RKushnir

@codyrobbins Yeah, agree it's a cruft. But in a situation when workaround has become the standard because the bug stays unresolved for years, the hope is almost gone :frowning: I doubt if there's a clean way for

fixing the underlying behavior

Leaving the form_for options aside, if we had a concrete idea on how it should be done, it would increase the chance that someone makes a so long-awaited pull request. So, ideas?

@pixeltrix
Owner

@RKushnir you fix it in the router by linking the model class directly to the route rather than guessing the url helper name based on the model class, e.g.

# default :model option of Post
resources :posts

# default :model option of Basket - router knows that it's a singular resource route
resource :basket

# custom :model option - form_for @user uses singular resource route account_url
resource :account, model: 'User'

This needs significant refactoring of Journey, Mapper, RouteSet, etc. classes - I'm not expecting a PR to appear like magic so I'll be doing it myself. I had hoped to get it done for 4.0 but illness restricted the amount of time I had available.

There are some kinks to work out like what happens when a resource is used in a singular and normal context (e.g. /account for current user and /users/1 for user pages). Also there's the issue of how to handle namespaces routes like admin - currently you use an array like [:admin, @user] so I'd like to be able to continue using that.

@RKushnir

what happens when a resource is used in a singular and normal context

That's one of the reasons why you shouldn't let the model mess with this.

@tute tute referenced this issue from a commit in tute/rails
@tute tute Failing test for rails#1769 464c54e
@shockone

In case anybody is looking for a workaround:

class Company < ActiveRecord::Base
  model_name.instance_variable_set(:@route_key, 'company')
end

http://stackoverflow.com/a/16229154/1149074

@pixeltrix
Owner

@shockone that only works if your model is accessed via the singular resource url only - if you have a resource that's accessed via both then you'll break the other one.

@tute tute referenced this issue from a commit in tute/rails
@tute tute Failing test for rails#1769 9537bab
@jeremyf jeremyf referenced this issue from a commit in projecthydra-labs/orcid
@jeremyf jeremyf Fixing singular Rails resource behavior
Since we have a singular resource for ProfileRequest, the
`Controller#respond_with` was treating the profile_request parameter
as the :format option (i.e. format = 'xml').

The solution was to tease apart the automagic behavior of the
`#respond_with` method into its two response options for
transformative actions - either render the page with errors or
redirect due to success.

I believe this is related to rails/rails#1769,
which is called out in http://guides.rubyonrails.org/routing.html#singular-resources

Below is a more detailed breakdown of what I am refering to:

The ProfileRequest is a singular resource.

```ruby
Orcid::Engine.routes.draw do
  scope module: 'orcid' do
    resource :profile_request, only: [:show, :new, :create]
    resources :profile_connections, only: [:new, :create, :index]
  end
end
```

As a singluar resource the following routes are available.

```console
$ rake app:routes
Routes for Orcid::Engine:
   profile_request  POST /profile_request(.:format)     orcid/profile_requests#create
new_profile_request GET  /profile_request/new(.:format) orcid/profile_requests#new
                    GET  /profile_request(.:format)     orcid/profile_requests#show
```

If we had a plural resource for ProfileRequest
```ruby
Orcid::Engine.routes.draw do
  scope module: 'orcid' do
    resources :profile_request, only: [:show, :new, :create]
    resources :profile_connections, only: [:new, :create, :index]
  end
end
```

Then the routes would be:
```console
$ rake app:routes
profile_request_index POST /profile_request(.:format)     orcid/profile_request#create
  new_profile_request GET  /profile_request/new(.:format) orcid/profile_request#new
      profile_request GET  /profile_request/:id(.:format) orcid/profile_request#show
```
2cdfc00
@jeremyf jeremyf referenced this issue in projecthydra-labs/orcid
Merged

Fixing singular Rails resource behavior #23

@jeremyf jeremyf referenced this issue from a commit in projecthydra-labs/orcid
@jeremyf jeremyf Fixing singular Rails resource behavior
Since we have a singular resource for ProfileRequest, the
`Controller#respond_with` was treating the profile_request parameter
as the :format option (i.e. format = 'xml').

The solution was to tease apart the automagic behavior of the
`#respond_with` method into its two response options for
transformative actions - either render the page with errors or
redirect due to success.

I believe this is related to rails/rails#1769,
which is called out in http://guides.rubyonrails.org/routing.html#singular-resources

Below is a more detailed breakdown of what I am refering to:

The ProfileRequest is a singular resource.

```ruby
Orcid::Engine.routes.draw do
  scope module: 'orcid' do
    resource :profile_request, only: [:show, :new, :create]
    resources :profile_connections, only: [:new, :create, :index]
  end
end
```

As a singluar resource the following routes are available.

```console
$ rake app:routes
Routes for Orcid::Engine:
   profile_request  POST /profile_request(.:format)     orcid/profile_requests#create
new_profile_request GET  /profile_request/new(.:format) orcid/profile_requests#new
                    GET  /profile_request(.:format)     orcid/profile_requests#show
```

If we had a plural resource for ProfileRequest
```ruby
Orcid::Engine.routes.draw do
  scope module: 'orcid' do
    resources :profile_request, only: [:show, :new, :create]
    resources :profile_connections, only: [:new, :create, :index]
  end
end
```

Then the routes would be:
```console
$ rake app:routes
profile_request_index POST /profile_request(.:format)     orcid/profile_request#create
  new_profile_request GET  /profile_request/new(.:format) orcid/profile_request#new
      profile_request GET  /profile_request/:id(.:format) orcid/profile_request#show
```
d5fef99
@Frankky

I've spent my last two weeks trying to deal with this issue with any suggestion I found on the internet. I still have my question here: http://stackoverflow.com/questions/23994887/rails-one-to-one-relationship-and-form-for-sending-format-instead-of-id-and-par/23994996#23994996. I'm writing here today not only because I'm desperate to find a cure to this rails issue (the workarounds I found didn't work) or a git example with a working app using singular resource and form_for. But also to underline this problem with a nested singular resource like resources :users do resource :profile end. I just hope that the solution you'll find will handle this case too.

@hasghari

@Frankky I have responded to your problem in stackoverflow.

@kaosf kaosf referenced this issue from a commit in kaosf/cure-general-election
@kaosf kaosf Implement home/index view
References about form_for URL direct specification
  http://guides.rubyonrails.org/routing.html#singular-resources
  rails/rails#1769
2bd2630
@schlick

I'd just like to add that the solution offered in #1769 (comment) isn't viable when dealing with a polymorphic nested singular resource since you need to use polymorphic_path directly in the url option as the parent resource can be one of many. The solution offered in #1769 (comment) worked well and meant I didn't even need to use the url option. But as has already been mentioned, this means you end up polluting your model class with a hack to make your views work and will break if your model is used by a collection route as well.

@Sammyfrw Sammyfrw referenced this issue in Sammyfrw/sastra
Merged

Add profiles to users #9

@rafaelfranca rafaelfranca modified the milestone: 4.2.0, 5.0.0
@stiff

How about this approach: when route is defined (resource :account) lookup the corresponding model class (Account). If there is one mark it as singular (maybe for given prefixes? model may have different resources like namespace :admin do resources accounts; end; subdomain account_name do resource account end), if there is no, then this problem is very unlikely (only if it's crafted at runtime, or something like that).

@siax84

Not sure if it can help to fix the overall problem but I helped myself the following way, since #1769 (comment) did not work properly for my new action

form_for(@equipment, :url=> {:action=> (@equipment.new_record? ? 'create' : 'update')}) do |f|

EDIT: slightly modified to make it work also when validation errors come up.

@eval eval referenced this issue from a commit in eval/rails
@eval eval Correctly generate default url for singular resource
Fixes #1769

This fixes (a long-standingi) bug that prevents `form_for` to
generate a url for singular resources.
a463011
@eval eval referenced this issue from a commit in eval/rails
@eval eval Correctly generate default url for singular resource
Fixes #1769

This fixes (a long-standingi) bug that prevents `form_for` to
generate a url for singular resources.
8d6f410
@eval eval referenced this issue from a commit in eval/rails
@eval eval Make form_for correctly handle singular resources.
Fixes #1769.

Given the following route:
```
resource :account
```

This would generate an error:
```ruby
<%= form_for(Account.new) do |f| %>
...
<% end %>
```

And this form would use the path `/account.1` instead of `/account`:
```ruby
<%= form_for(Account.first) do |f| %>
...
<% end %>
```

Both are now fixed.
b5b5cb2
@simnalamburt

Is there any workaround of this bug for the method respond_with? :sob:

@RKushnir

@simnalamburt Try respond_with @thing, location: your_singular_thing_url(@thing).

@azul azul referenced this issue from a commit in riseuplabs/crabgrass-core
@azul azul bugfix: avatars always use a single resource
So we set this in the model to work around the plural default.
This is because of a loong pending rails bug:
rails/rails#1769
2bbb526
@azul

@pixeltrix, How about trying the plural route first. Then catching the undefined method error in polymorphic_url and trying the singular route?
That would not solve the problem when both methods are defined. But I think it would be easy to document and understand. If one has both a resource and resources defined for the same model they will have to state which one they want anyway (using the url option for example).

@azul azul referenced this issue in riseuplabs/crabgrass-core
Merged

bugfix: avatars always use a single resource #153

@justinj656

The workaroud I use is to add as: to change the path helper for singular resource, like
resource company, as: :companies

@benja83 benja83 referenced this issue from a commit in benja83/toyotakataboard-relational
@benja83 benja83 initial commit, create kata and condition model
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6a502e9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,16 @@
+# See https://help.github.com/articles/ignoring-files for more about ignoring files.
+#
+# If you find yourself ignoring temporary files generated by your text editor
+# or operating system, you probably want to add a global ignore instead:
+#   git config --global core.excludesfile '~/.gitignore_global'
+
+# Ignore bundler config.
+/.bundle
+
+# Ignore the default SQLite database.
+/db/*.sqlite3
+/db/*.sqlite3-journal
+
+# Ignore all logfiles and tempfiles.
+/log/*.log
+/tmp
diff --git a/.rspec b/.rspec
new file mode 100644
index 0000000..83e16f8
--- /dev/null
+++ b/.rspec
@@ -0,0 +1,2 @@
+--color
+--require spec_helper
diff --git a/Gemfile b/Gemfile
new file mode 100644
index 0000000..1176802
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,43 @@
+source 'https://rubygems.org'
+
+
+# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
+gem 'rails', '4.1.0'
+# Use postgresql as the database for Active Record
+gem 'pg'
+# Use SCSS for stylesheets
+gem 'sass-rails', '~> 4.0.3'
+# Use Uglifier as compressor for JavaScript assets
+gem 'uglifier', '>= 1.3.0'
+# Use CoffeeScript for .js.coffee assets and views
+# gem 'coffee-rails', '~> 4.0.0'
+# See https://github.com/sstephenson/execjs#readme for more supported runtimes
+# gem 'therubyracer',  platforms: :ruby
+
+# Use jquery as the JavaScript library
+gem 'jquery-rails'
+# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
+gem 'turbolinks'
+# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
+gem 'jbuilder', '~> 2.0'
+# bundle exec rake doc:rails generates the API under doc/api.
+gem 'sdoc', '~> 0.4.0',          group: :doc
+
+# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
+gem 'spring',        group: :development
+
+# Use ActiveModel has_secure_password
+# gem 'bcrypt', '~> 3.1.7'
+
+# Use unicorn as the app server
+# gem 'unicorn'
+
+# Use Capistrano for deployment
+# gem 'capistrano-rails', group: :development
+
+# Use debugger
+# gem 'debugger', group: [:development, :test]
+
+group :development, :test do
+  gem 'rspec-rails', '~> 3.0'
+end
\ No newline at end of file
diff --git a/Gemfile.lock b/Gemfile.lock
new file mode 100644
index 0000000..9d708c6
--- /dev/null
+++ b/Gemfile.lock
@@ -0,0 +1,143 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    actionmailer (4.1.0)
+      actionpack (= 4.1.0)
+      actionview (= 4.1.0)
+      mail (~> 2.5.4)
+    actionpack (4.1.0)
+      actionview (= 4.1.0)
+      activesupport (= 4.1.0)
+      rack (~> 1.5.2)
+      rack-test (~> 0.6.2)
+    actionview (4.1.0)
+      activesupport (= 4.1.0)
+      builder (~> 3.1)
+      erubis (~> 2.7.0)
+    activemodel (4.1.0)
+      activesupport (= 4.1.0)
+      builder (~> 3.1)
+    activerecord (4.1.0)
+      activemodel (= 4.1.0)
+      activesupport (= 4.1.0)
+      arel (~> 5.0.0)
+    activesupport (4.1.0)
+      i18n (~> 0.6, >= 0.6.9)
+      json (~> 1.7, >= 1.7.7)
+      minitest (~> 5.1)
+      thread_safe (~> 0.1)
+      tzinfo (~> 1.1)
+    arel (5.0.1.20140414130214)
+    builder (3.2.2)
+    coffee-rails (4.1.0)
+      coffee-script (>= 2.2.0)
+      railties (>= 4.0.0, < 5.0)
+    coffee-script (2.4.1)
+      coffee-script-source
+      execjs
+    coffee-script-source (1.9.1.1)
+    diff-lcs (1.2.5)
+    erubis (2.7.0)
+    execjs (2.5.2)
+    hike (1.2.3)
+    i18n (0.7.0)
+    jbuilder (2.2.16)
+      activesupport (>= 3.0.0, < 5)
+      multi_json (~> 1.2)
+    jquery-rails (3.1.2)
+      railties (>= 3.0, < 5.0)
+      thor (>= 0.14, < 2.0)
+    json (1.8.2)
+    mail (2.5.4)
+      mime-types (~> 1.16)
+      treetop (~> 1.4.8)
+    mime-types (1.25.1)
+    minitest (5.6.1)
+    multi_json (1.11.0)
+    pg (0.18.2)
+    polyglot (0.3.5)
+    rack (1.5.3)
+    rack-test (0.6.3)
+      rack (>= 1.0)
+    rails (4.1.0)
+      actionmailer (= 4.1.0)
+      actionpack (= 4.1.0)
+      actionview (= 4.1.0)
+      activemodel (= 4.1.0)
+      activerecord (= 4.1.0)
+      activesupport (= 4.1.0)
+      bundler (>= 1.3.0, < 2.0)
+      railties (= 4.1.0)
+      sprockets-rails (~> 2.0)
+    railties (4.1.0)
+      actionpack (= 4.1.0)
+      activesupport (= 4.1.0)
+      rake (>= 0.8.7)
+      thor (>= 0.18.1, < 2.0)
+    rake (10.4.2)
+    rdoc (4.2.0)
+      json (~> 1.4)
+    rspec-core (3.2.3)
+      rspec-support (~> 3.2.0)
+    rspec-expectations (3.2.1)
+      diff-lcs (>= 1.2.0, < 2.0)
+      rspec-support (~> 3.2.0)
+    rspec-mocks (3.2.1)
+      diff-lcs (>= 1.2.0, < 2.0)
+      rspec-support (~> 3.2.0)
+    rspec-rails (3.2.1)
+      actionpack (>= 3.0, < 4.3)
+      activesupport (>= 3.0, < 4.3)
+      railties (>= 3.0, < 4.3)
+      rspec-core (~> 3.2.0)
+      rspec-expectations (~> 3.2.0)
+      rspec-mocks (~> 3.2.0)
+      rspec-support (~> 3.2.0)
+    rspec-support (3.2.2)
+    sass (3.2.19)
+    sass-rails (4.0.5)
+      railties (>= 4.0.0, < 5.0)
+      sass (~> 3.2.2)
+      sprockets (~> 2.8, < 3.0)
+      sprockets-rails (~> 2.0)
+    sdoc (0.4.1)
+      json (~> 1.7, >= 1.7.7)
+      rdoc (~> 4.0)
+    spring (1.3.6)
+    sprockets (2.12.3)
+      hike (~> 1.2)
+      multi_json (~> 1.0)
+      rack (~> 1.0)
+      tilt (~> 1.1, != 1.3.0)
+    sprockets-rails (2.3.1)
+      actionpack (>= 3.0)
+      activesupport (>= 3.0)
+      sprockets (>= 2.8, < 4.0)
+    thor (0.19.1)
+    thread_safe (0.3.5)
+    tilt (1.4.1)
+    treetop (1.4.15)
+      polyglot
+      polyglot (>= 0.3.1)
+    turbolinks (2.5.3)
+      coffee-rails
+    tzinfo (1.2.2)
+      thread_safe (~> 0.1)
+    uglifier (2.7.1)
+      execjs (>= 0.3.0)
+      json (>= 1.8.0)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  jbuilder (~> 2.0)
+  jquery-rails
+  pg
+  rails (= 4.1.0)
+  rspec-rails (~> 3.0)
+  sass-rails (~> 4.0.3)
+  sdoc (~> 0.4.0)
+  spring
+  turbolinks
+  uglifier (>= 1.3.0)
diff --git a/README.rdoc b/README.rdoc
new file mode 100644
index 0000000..dd4e97e
--- /dev/null
+++ b/README.rdoc
@@ -0,0 +1,28 @@
+== README
+
+This README would normally document whatever steps are necessary to get the
+application up and running.
+
+Things you may want to cover:
+
+* Ruby version
+
+* System dependencies
+
+* Configuration
+
+* Database creation
+
+* Database initialization
+
+* How to run the test suite
+
+* Services (job queues, cache servers, search engines, etc.)
+
+* Deployment instructions
+
+* ...
+
+
+Please feel free to use a different markup language if you do not plan to run
+<tt>rake doc:app</tt>.
diff --git a/Rakefile b/Rakefile
new file mode 100644
index 0000000..ba6b733
--- /dev/null
+++ b/Rakefile
@@ -0,0 +1,6 @@
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require File.expand_path('../config/application', __FILE__)
+
+Rails.application.load_tasks
diff --git a/app/assets/images/.keep b/app/assets/images/.keep
new file mode 100644
index 0000000..e69de29
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
new file mode 100644
index 0000000..d6925fa
--- /dev/null
+++ b/app/assets/javascripts/application.js
@@ -0,0 +1,16 @@
+// This is a manifest file that'll be compiled into application.js, which will include all the files
+// listed below.
+//
+// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
+// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
+//
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// compiled file.
+//
+// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
+// about supported directives.
+//
+//= require jquery
+//= require jquery_ujs
+//= require turbolinks
+//= require_tree .
diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
new file mode 100644
index 0000000..a443db3
--- /dev/null
+++ b/app/assets/stylesheets/application.css
@@ -0,0 +1,15 @@
+/*
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
+ * listed below.
+ *
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
+ *
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
+ * compiled file so the styles you add here take precedence over styles defined in any styles
+ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
+ * file per style scope.
+ *
+ *= require_tree .
+ *= require_self
+ */
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
new file mode 100644
index 0000000..d83690e
--- /dev/null
+++ b/app/controllers/application_controller.rb
@@ -0,0 +1,5 @@
+class ApplicationController < ActionController::Base
+  # Prevent CSRF attacks by raising an exception.
+  # For APIs, you may want to use :null_session instead.
+  protect_from_forgery with: :exception
+end
diff --git a/app/controllers/concerns/.keep b/app/controllers/concerns/.keep
new file mode 100644
index 0000000..e69de29
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
new file mode 100644
index 0000000..de6be79
--- /dev/null
+++ b/app/helpers/application_helper.rb
@@ -0,0 +1,2 @@
+module ApplicationHelper
+end
diff --git a/app/mailers/.keep b/app/mailers/.keep
new file mode 100644
index 0000000..e69de29
diff --git a/app/models/.keep b/app/models/.keep
new file mode 100644
index 0000000..e69de29
diff --git a/app/models/concerns/.keep b/app/models/concerns/.keep
new file mode 100644
index 0000000..e69de29
diff --git a/app/models/condition.rb b/app/models/condition.rb
new file mode 100644
index 0000000..e288628
--- /dev/null
+++ b/app/models/condition.rb
@@ -0,0 +1,3 @@
+class Condition < ActiveRecord::Base
+  belongs_to :kata
+end
diff --git a/app/models/kata.rb b/app/models/kata.rb
new file mode 100644
index 0000000..9fe377a
--- /dev/null
+++ b/app/models/kata.rb
@@ -0,0 +1,3 @@
+class Kata < ActiveRecord::Base
+  has_many :conditions
+end
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
new file mode 100644
index 0000000..c8c3a37
--- /dev/null
+++ b/app/views/layouts/application.html.erb
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>Toyotakataboard</title>
+  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
+  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
+  <%= csrf_meta_tags %>
+</head>
+<body>
+
+<%= yield %>
+
+</body>
+</html>
diff --git a/bin/bundle b/bin/bundle
new file mode 100755
index 0000000..66e9889
--- /dev/null
+++ b/bin/bundle
@@ -0,0 +1,3 @@
+#!/usr/bin/env ruby
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
+load Gem.bin_path('bundler', 'bundle')
diff --git a/bin/rails b/bin/rails
new file mode 100755
index 0000000..728cd85
--- /dev/null
+++ b/bin/rails
@@ -0,0 +1,4 @@
+#!/usr/bin/env ruby
+APP_PATH = File.expand_path('../../config/application',  __FILE__)
+require_relative '../config/boot'
+require 'rails/commands'
diff --git a/bin/rake b/bin/rake
new file mode 100755
index 0000000..1724048
--- /dev/null
+++ b/bin/rake
@@ -0,0 +1,4 @@
+#!/usr/bin/env ruby
+require_relative '../config/boot'
+require 'rake'
+Rake.application.run
diff --git a/config.ru b/config.ru
new file mode 100644
index 0000000..5bc2a61
--- /dev/null
+++ b/config.ru
@@ -0,0 +1,4 @@
+# This file is used by Rack-based servers to start the application.
+
+require ::File.expand_path('../config/environment',  __FILE__)
+run Rails.application
diff --git a/config/application.rb b/config/application.rb
new file mode 100644
index 0000000..784b718
--- /dev/null
+++ b/config/application.rb
@@ -0,0 +1,30 @@
+require File.expand_path('../boot', __FILE__)
+
+# Pick the frameworks you want:
+require "active_model/railtie"
+require "active_record/railtie"
+require "action_controller/railtie"
+require "action_mailer/railtie"
+require "action_view/railtie"
+require "sprockets/railtie"
+# require "rails/test_unit/railtie"
+
+# Require the gems listed in Gemfile, including any gems
+# you've limited to :test, :development, or :production.
+Bundler.require(*Rails.groups)
+
+module Toyotakataboard
+  class Application < Rails::Application
+    # Settings in config/environments/* take precedence over those specified here.
+    # Application configuration should go into files in config/initializers
+    # -- all .rb files in that directory are automatically loaded.
+
+    # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
+    # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
+    # config.time_zone = 'Central Time (US & Canada)'
+
+    # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
+    # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
+    # config.i18n.default_locale = :de
+  end
+end
diff --git a/config/boot.rb b/config/boot.rb
new file mode 100644
index 0000000..5e5f0c1
--- /dev/null
+++ b/config/boot.rb
@@ -0,0 +1,4 @@
+# Set up gems listed in the Gemfile.
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
+
+require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
diff --git a/config/database.yml b/config/database.yml
new file mode 100644
index 0000000..0ac6612
--- /dev/null
+++ b/config/database.yml
@@ -0,0 +1,85 @@
+# PostgreSQL. Versions 8.2 and up are supported.
+#
+# Install the pg driver:
+#   gem install pg
+# On OS X with Homebrew:
+#   gem install pg -- --with-pg-config=/usr/local/bin/pg_config
+# On OS X with MacPorts:
+#   gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
+# On Windows:
+#   gem install pg
+#       Choose the win32 build.
+#       Install PostgreSQL and put its /bin directory on your path.
+#
+# Configure Using Gemfile
+# gem 'pg'
+#
+default: &default
+  adapter: postgresql
+  encoding: unicode
+  # For details on connection pooling, see rails configuration guide
+  # http://guides.rubyonrails.org/configuring.html#database-pooling
+  pool: 5
+
+development:
+  <<: *default
+  database: toyotakataboard_development
+
+  # The specified database role being used to connect to postgres.
+  # To create additional roles in postgres see `$ createuser --help`.
+  # When left blank, postgres will use the default role. This is
+  # the same name as the operating system user that initialized the database.
+  #username: toyotakataboard
+
+  # The password associated with the postgres role (username).
+  #password:
+
+  # Connect on a TCP socket. Omitted by default since the client uses a
+  # domain socket that doesn't need configuration. Windows does not have
+  # domain sockets, so uncomment these lines.
+  #host: localhost
+
+  # The TCP port the server listens on. Defaults to 5432.
+  # If your server runs on a different port number, change accordingly.
+  #port: 5432
+
+  # Schema search path. The server defaults to $user,public
+  #schema_search_path: myapp,sharedapp,public
+
+  # Minimum log levels, in increasing order:
+  #   debug5, debug4, debug3, debug2, debug1,
+  #   log, notice, warning, error, fatal, and panic
+  # Defaults to warning.
+  #min_messages: notice
+
+# Warning: The database defined as "test" will be erased and
+# re-generated from your development database when you run "rake".
+# Do not set this db to the same as development or production.
+test:
+  <<: *default
+  database: toyotakataboard_test
+
+# As with config/secrets.yml, you never want to store sensitive information,
+# like your database password, in your source code. If your source code is
+# ever seen by anyone, they now have access to your database.
+#
+# Instead, provide the password as a unix environment variable when you boot
+# the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database
+# for a full rundown on how to provide these environment variables in a
+# production deployment.
+#
+# On Heroku and other platform providers, you may have a full connection URL
+# available as an environment variable. For example:
+#
+#   DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase"
+#
+# You can use this database configuration with:
+#
+#   production:
+#     url: <%= ENV['DATABASE_URL'] %>
+#
+production:
+  <<: *default
+  database: toyotakataboard_production
+  username: toyotakataboard
+  password: <%= ENV['TOYOTAKATABOARD_DATABASE_PASSWORD'] %>
diff --git a/config/environment.rb b/config/environment.rb
new file mode 100644
index 0000000..ee8d90d
--- /dev/null
+++ b/config/environment.rb
@@ -0,0 +1,5 @@
+# Load the Rails application.
+require File.expand_path('../application', __FILE__)
+
+# Initialize the Rails application.
+Rails.application.initialize!
diff --git a/config/environments/development.rb b/config/environments/development.rb
new file mode 100644
index 0000000..ddf0e90
--- /dev/null
+++ b/config/environments/development.rb
@@ -0,0 +1,37 @@
+Rails.application.configure do
+  # Settings specified here will take precedence over those in config/application.rb.
+
+  # In the development environment your application's code is reloaded on
+  # every request. This slows down response time but is perfect for development
+  # since you don't have to restart the web server when you make code changes.
+  config.cache_classes = false
+
+  # Do not eager load code on boot.
+  config.eager_load = false
+
+  # Show full error reports and disable caching.
+  config.consider_all_requests_local       = true
+  config.action_controller.perform_caching = false
+
+  # Don't care if the mailer can't send.
+  config.action_mailer.raise_delivery_errors = false
+
+  # Print deprecation notices to the Rails logger.
+  config.active_support.deprecation = :log
+
+  # Raise an error on page load if there are pending migrations.
+  config.active_record.migration_error = :page_load
+
+  # Debug mode disables concatenation and preprocessing of assets.
+  # This option may cause significant delays in view rendering with a large
+  # number of complex assets.
+  config.assets.debug = true
+
+  # Adds additional error checking when serving assets at runtime.
+  # Checks for improperly declared sprockets dependencies.
+  # Raises helpful error messages.
+  config.assets.raise_runtime_errors = true
+
+  # Raises error for missing translations
+  # config.action_view.raise_on_missing_translations = true
+end
diff --git a/config/environments/production.rb b/config/environments/production.rb
new file mode 100644
index 0000000..47d3553
--- /dev/null
+++ b/config/environments/production.rb
@@ -0,0 +1,83 @@
+Rails.application.configure do
+  # Settings specified here will take precedence over those in config/application.rb.
+
+  # Code is not reloaded between requests.
+  config.cache_classes = true
+
+  # Eager load code on boot. This eager loads most of Rails and
+  # your application in memory, allowing both threaded web servers
+  # and those relying on copy on write to perform better.
+  # Rake tasks automatically ignore this option for performance.
+  config.eager_load = true
+
+  # Full error reports are disabled and caching is turned on.
+  config.consider_all_requests_local       = false
+  config.action_controller.perform_caching = true
+
+  # Enable Rack::Cache to put a simple HTTP cache in front of your application
+  # Add `rack-cache` to your Gemfile before enabling this.
+  # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
+  # config.action_dispatch.rack_cache = true
+
+  # Disable Rails's static asset server (Apache or nginx will already do this).
+  config.serve_static_assets = false
+
+  # Compress JavaScripts and CSS.
+  config.assets.js_compressor = :uglifier
+  # config.assets.css_compressor = :sass
+
+  # Do not fallback to assets pipeline if a precompiled asset is missed.
+  config.assets.compile = false
+
+  # Generate digests for assets URLs.
+  config.assets.digest = true
+
+  # Version of your assets, change this if you want to expire all your assets.
+  config.assets.version = '1.0'
+
+  # Specifies the header that your server uses for sending files.
+  # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
+  # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
+
+  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
+  # config.force_ssl = true
+
+  # Set to :debug to see everything in the log.
+  config.log_level = :info
+
+  # Prepend all log lines with the following tags.
+  # config.log_tags = [ :subdomain, :uuid ]
+
+  # Use a different logger for distributed setups.
+  # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
+
+  # Use a different cache store in production.
+  # config.cache_store = :mem_cache_store
+
+  # Enable serving of images, stylesheets, and JavaScripts from an asset server.
+  # config.action_controller.asset_host = "http://assets.example.com"
+
+  # Precompile additional assets.
+  # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
+  # config.assets.precompile += %w( search.js )
+
+  # Ignore bad email addresses and do not raise email delivery errors.
+  # Set this to true and configure the email server for immediate delivery to raise delivery errors.
+  # config.action_mailer.raise_delivery_errors = false
+
+  # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
+  # the I18n.default_locale when a translation cannot be found).
+  config.i18n.fallbacks = true
+
+  # Send deprecation notices to registered listeners.
+  config.active_support.deprecation = :notify
+
+  # Disable automatic flushing of the log to improve performance.
+  # config.autoflush_log = false
+
+  # Use default logging formatter so that PID and timestamp are not suppressed.
+  config.log_formatter = ::Logger::Formatter.new
+
+  # Do not dump schema after migrations.
+  config.active_record.dump_schema_after_migration = false
+end
diff --git a/config/environments/test.rb b/config/environments/test.rb
new file mode 100644
index 0000000..053f5b6
--- /dev/null
+++ b/config/environments/test.rb
@@ -0,0 +1,39 @@
+Rails.application.configure do
+  # Settings specified here will take precedence over those in config/application.rb.
+
+  # The test environment is used exclusively to run your application's
+  # test suite. You never need to work with it otherwise. Remember that
+  # your test database is "scratch space" for the test suite and is wiped
+  # and recreated between test runs. Don't rely on the data there!
+  config.cache_classes = true
+
+  # Do not eager load code on boot. This avoids loading your whole application
+  # just for the purpose of running a single test. If you are using a tool that
+  # preloads Rails for running tests, you may have to set it to true.
+  config.eager_load = false
+
+  # Configure static asset server for tests with Cache-Control for performance.
+  config.serve_static_assets  = true
+  config.static_cache_control = 'public, max-age=3600'
+
+  # Show full error reports and disable caching.
+  config.consider_all_requests_local       = true
+  config.action_controller.perform_caching = false
+
+  # Raise exceptions instead of rendering exception templates.
+  config.action_dispatch.show_exceptions = false
+
+  # Disable request forgery protection in test environment.
+  config.action_controller.allow_forgery_protection = false
+
+  # Tell Action Mailer not to deliver emails to the real world.
+  # The :test delivery method accumulates sent emails in the
+  # ActionMailer::Base.deliveries array.
+  config.action_mailer.delivery_method = :test
+
+  # Print deprecation notices to the stderr.
+  config.active_support.deprecation = :stderr
+
+  # Raises error for missing translations
+  # config.action_view.raise_on_missing_translations = true
+end
diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb
new file mode 100644
index 0000000..59385cd
--- /dev/null
+++ b/config/initializers/backtrace_silencers.rb
@@ -0,0 +1,7 @@
+# Be sure to restart your server when you modify this file.
+
+# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
+# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
+
+# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
+# Rails.backtrace_cleaner.remove_silencers!
diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb
new file mode 100644
index 0000000..7a06a89
--- /dev/null
+++ b/config/initializers/cookies_serializer.rb
@@ -0,0 +1,3 @@
+# Be sure to restart your server when you modify this file.
+
+Rails.application.config.action_dispatch.cookies_serializer = :json
\ No newline at end of file
diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb
new file mode 100644
index 0000000..4a994e1
--- /dev/null
+++ b/config/initializers/filter_parameter_logging.rb
@@ -0,0 +1,4 @@
+# Be sure to restart your server when you modify this file.
+
+# Configure sensitive parameters which will be filtered from the log file.
+Rails.application.config.filter_parameters += [:password]
diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb
new file mode 100644
index 0000000..ac033bf
--- /dev/null
+++ b/config/initializers/inflections.rb
@@ -0,0 +1,16 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new inflection rules using the following format. Inflections
+# are locale specific, and you may define rules for as many different
+# locales as you wish. All of these examples are active by default:
+# ActiveSupport::Inflector.inflections(:en) do |inflect|
+#   inflect.plural /^(ox)$/i, '\1en'
+#   inflect.singular /^(ox)en/i, '\1'
+#   inflect.irregular 'person', 'people'
+#   inflect.uncountable %w( fish sheep )
+# end
+
+# These inflection rules are supported but not enabled by default:
+# ActiveSupport::Inflector.inflections(:en) do |inflect|
+#   inflect.acronym 'RESTful'
+# end
diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb
new file mode 100644
index 0000000..dc18996
--- /dev/null
+++ b/config/initializers/mime_types.rb
@@ -0,0 +1,4 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new mime types for use in respond_to blocks:
+# Mime::Type.register "text/richtext", :rtf
diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb
new file mode 100644
index 0000000..f73ba88
--- /dev/null
+++ b/config/initializers/session_store.rb
@@ -0,0 +1,3 @@
+# Be sure to restart your server when you modify this file.
+
+Rails.application.config.session_store :cookie_store, key: '_toyotakataboard_session'
diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb
new file mode 100644
index 0000000..33725e9
--- /dev/null
+++ b/config/initializers/wrap_parameters.rb
@@ -0,0 +1,14 @@
+# Be sure to restart your server when you modify this file.
+
+# This file contains settings for ActionController::ParamsWrapper which
+# is enabled by default.
+
+# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
+ActiveSupport.on_load(:action_controller) do
+  wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
+end
+
+# To enable root element in JSON for ActiveRecord objects.
+# ActiveSupport.on_load(:active_record) do
+#  self.include_root_in_json = true
+# end
diff --git a/config/locales/en.yml b/config/locales/en.yml
new file mode 100644
index 0000000..0653957
--- /dev/null
+++ b/config/locales/en.yml
@@ -0,0 +1,23 @@
+# Files in the config/locales directory are used for internationalization
+# and are automatically loaded by Rails. If you want to use locales other
+# than English, add the necessary files in this directory.
+#
+# To use the locales, use `I18n.t`:
+#
+#     I18n.t 'hello'
+#
+# In views, this is aliased to just `t`:
+#
+#     <%= t('hello') %>
+#
+# To use a different locale, set it with `I18n.locale`:
+#
+#     I18n.locale = :es
+#
+# This would use the information in config/locales/es.yml.
+#
+# To learn more, please read the Rails Internationalization guide
+# available at http://guides.rubyonrails.org/i18n.html.
+
+en:
+  hello: "Hello world"
diff --git a/config/routes.rb b/config/routes.rb
new file mode 100644
index 0000000..3f66539
--- /dev/null
+++ b/config/routes.rb
@@ -0,0 +1,56 @@
+Rails.application.routes.draw do
+  # The priority is based upon order of creation: first created -> highest priority.
+  # See how all your routes lay out with "rake routes".
+
+  # You can have the root of your site routed with "root"
+  # root 'welcome#index'
+
+  # Example of regular route:
+  #   get 'products/:id' => 'catalog#view'
+
+  # Example of named route that can be invoked with purchase_url(id: product.id)
+  #   get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
+
+  # Example resource route (maps HTTP verbs to controller actions automatically):
+  #   resources :products
+
+  # Example resource route with options:
+  #   resources :products do
+  #     member do
+  #       get 'short'
+  #       post 'toggle'
+  #     end
+  #
+  #     collection do
+  #       get 'sold'
+  #     end
+  #   end
+
+  # Example resource route with sub-resources:
+  #   resources :products do
+  #     resources :comments, :sales
+  #     resource :seller
+  #   end
+
+  # Example resource route with more complex sub-resources:
+  #   resources :products do
+  #     resources :comments
+  #     resources :sales do
+  #       get 'recent', on: :collection
+  #     end
+  #   end
+
+  # Example resource route with concerns:
+  #   concern :toggleable do
+  #     post 'toggle'
+  #   end
+  #   resources :posts, concerns: :toggleable
+  #   resources :photos, concerns: :toggleable
+
+  # Example resource route within a namespace:
+  #   namespace :admin do
+  #     # Directs /admin/products/* to Admin::ProductsController
+  #     # (app/controllers/admin/products_controller.rb)
+  #     resources :products
+  #   end
+end
diff --git a/config/secrets.yml b/config/secrets.yml
new file mode 100644
index 0000000..3581cc2
--- /dev/null
+++ b/config/secrets.yml
@@ -0,0 +1,22 @@
+# Be sure to restart your server when you modify this file.
+
+# Your secret key is used for verifying the integrity of signed cookies.
+# If you change this key, all old signed cookies will become invalid!
+
+# Make sure the secret is at least 30 characters and all random,
+# no regular words or you'll be exposed to dictionary attacks.
+# You can use `rake secret` to generate a secure secret key.
+
+# Make sure the secrets in this file are kept private
+# if you're sharing your code publicly.
+
+development:
+  secret_key_base: 302b3fcb0aa199aec43023bdb6908f5c00c3451fcabb825b33052c910958805752462436ba6725e921d4528068481d1888ddf3a58816b95a2d3cdd4623be22bc
+
+test:
+  secret_key_base: eed3713fdcb5cd2767385f7a9450f13eadd5ca88f125ec5b8fa81198dfa3bae7d0a6c7696c2ea866b982aa9c602e58af09f363de178e569fdb869cfe9f7f4d52
+
+# Do not keep production secrets in the repository,
+# instead read values from the environment.
+production:
+  secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
diff --git a/db/migrate/20150524190249_create_kata.rb b/db/migrate/20150524190249_create_kata.rb
new file mode 100644
index 0000000..3da4eb7
--- /dev/null
+++ b/db/migrate/20150524190249_create_kata.rb
@@ -0,0 +1,13 @@
+class CreateKata < ActiveRecord::Migration
+  def change
+    create_table :kata do |t|
+      t.string :name
+      t.string :vision
+      t.string :team
+      t.date :init_date
+      t.date :end_date
+      t.string :responsible
+      t.timestamps
+    end
+  end
+end
diff --git a/db/migrate/20150524192645_create_conditions.rb b/db/migrate/20150524192645_create_conditions.rb
new file mode 100644
index 0000000..d8725f3
--- /dev/null
+++ b/db/migrate/20150524192645_create_conditions.rb
@@ -0,0 +1,10 @@
+class CreateConditions < ActiveRecord::Migration
+  def change
+    create_table :conditions do |t|
+      t.string :title
+      t.string :type
+      t.timestamps
+    end
+    add_reference :conditions, :kata, index: true
+  end
+end
diff --git a/db/schema.rb b/db/schema.rb
new file mode 100644
index 0000000..b092856
--- /dev/null
+++ b/db/schema.rb
@@ -0,0 +1,30 @@
+# encoding: UTF-8
+# This file is auto-generated from the current state of the database. Instead
+# of editing this file, please use the migrations feature of Active Record to
+# incrementally modify your database, and then regenerate this schema definition.
+#
+# Note that this schema.rb definition is the authoritative source for your
+# database schema. If you need to create the application database on another
+# system, you should be using db:schema:load, not running all the migrations
+# from scratch. The latter is a flawed and unsustainable approach (the more migrations
+# you'll amass, the slower it'll run and the greater likelihood for issues).
+#
+# It's strongly recommended that you check this file into your version control system.
+
+ActiveRecord::Schema.define(version: 20150524190249) do
+
+  # These are extensions that must be enabled in order to support this database
+  enable_extension "plpgsql"
+
+  create_table "kata", force: true do |t|
+    t.string   "name"
+    t.string   "vision"
+    t.string   "team"
+    t.date     "init_date"
+    t.date     "end_date"
+    t.string   "responsible"
+    t.datetime "created_at"
+    t.datetime "updated_at"
+  end
+
+end
diff --git a/db/seeds.rb b/db/seeds.rb
new file mode 100644
index 0000000..4edb1e8
--- /dev/null
+++ b/db/seeds.rb
@@ -0,0 +1,7 @@
+# This file should contain all the record creation needed to seed the database with its default values.
+# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
+#
+# Examples:
+#
+#   cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
+#   Mayor.create(name: 'Emanuel', city: cities.first)
diff --git a/lib/assets/.keep b/lib/assets/.keep
new file mode 100644
index 0000000..e69de29
diff --git a/lib/tasks/.keep b/lib/tasks/.keep
new file mode 100644
index 0000000..e69de29
diff --git a/log/.keep b/log/.keep
new file mode 100644
index 0000000..e69de29
diff --git a/public/404.html b/public/404.html
new file mode 100644
index 0000000..b612547
--- /dev/null
+++ b/public/404.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>The page you were looking for doesn't exist (404)</title>
+  <meta name="viewport" content="width=device-width,initial-scale=1">
+  <style>
+  body {
+    background-color: #EFEFEF;
+    color: #2E2F30;
+    text-align: center;
+    font-family: arial, sans-serif;
+    margin: 0;
+  }
+
+  div.dialog {
+    width: 95%;
+    max-width: 33em;
+    margin: 4em auto 0;
+  }
+
+  div.dialog > div {
+    border: 1px solid #CCC;
+    border-right-color: #999;
+    border-left-color: #999;
+    border-bottom-color: #BBB;
+    border-top: #B00100 solid 4px;
+    border-top-left-radius: 9px;
+    border-top-right-radius: 9px;
+    background-color: white;
+    padding: 7px 12% 0;
+    box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
+  }
+
+  h1 {
+    font-size: 100%;
+    color: #730E15;
+    line-height: 1.5em;
+  }
+
+  div.dialog > p {
+    margin: 0 0 1em;
+    padding: 1em;
+    background-color: #F7F7F7;
+    border: 1px solid #CCC;
+    border-right-color: #999;
+    border-left-color: #999;
+    border-bottom-color: #999;
+    border-bottom-left-radius: 4px;
+    border-bottom-right-radius: 4px;
+    border-top-color: #DADADA;
+    color: #666;
+    box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
+  }
+  </style>
+</head>
+
+<body>
+  <!-- This file lives in public/404.html -->
+  <div class="dialog">
+    <div>
+      <h1>The page you were looking for doesn't exist.</h1>
+      <p>You may have mistyped the address or the page may have moved.</p>
+    </div>
+    <p>If you are the application owner check the logs for more information.</p>
+  </div>
+</body>
+</html>
diff --git a/public/422.html b/public/422.html
new file mode 100644
index 0000000..a21f82b
--- /dev/null
+++ b/public/422.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>The change you wanted was rejected (422)</title>
+  <meta name="viewport" content="width=device-width,initial-scale=1">
+  <style>
+  body {
+    background-color: #EFEFEF;
+    color: #2E2F30;
+    text-align: center;
+    font-family: arial, sans-serif;
+    margin: 0;
+  }
+
+  div.dialog {
+    width: 95%;
+    max-width: 33em;
+    margin: 4em auto 0;
+  }
+
+  div.dialog > div {
+    border: 1px solid #CCC;
+    border-right-color: #999;
+    border-left-color: #999;
+    border-bottom-color: #BBB;
+    border-top: #B00100 solid 4px;
+    border-top-left-radius: 9px;
+    border-top-right-radius: 9px;
+    background-color: white;
+    padding: 7px 12% 0;
+    box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
+  }
+
+  h1 {
+    font-size: 100%;
+    color: #730E15;
+    line-height: 1.5em;
+  }
+
+  div.dialog > p {
+    margin: 0 0 1em;
+    padding: 1em;
+    background-color: #F7F7F7;
+    border: 1px solid #CCC;
+    border-right-color: #999;
+    border-left-color: #999;
+    border-bottom-color: #999;
+    border-bottom-left-radius: 4px;
+    border-bottom-right-radius: 4px;
+    border-top-color: #DADADA;
+    color: #666;
+    box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
+  }
+  </style>
+</head>
+
+<body>
+  <!-- This file lives in public/422.html -->
+  <div class="dialog">
+    <div>
+      <h1>The change you wanted was rejected.</h1>
+      <p>Maybe you tried to change something you didn't have access to.</p>
+    </div>
+    <p>If you are the application owner check the logs for more information.</p>
+  </div>
+</body>
+</html>
diff --git a/public/500.html b/public/500.html
new file mode 100644
index 0000000..061abc5
--- /dev/null
+++ b/public/500.html
@@ -0,0 +1,66 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>We're sorry, but something went wrong (500)</title>
+  <meta name="viewport" content="width=device-width,initial-scale=1">
+  <style>
+  body {
+    background-color: #EFEFEF;
+    color: #2E2F30;
+    text-align: center;
+    font-family: arial, sans-serif;
+    margin: 0;
+  }
+
+  div.dialog {
+    width: 95%;
+    max-width: 33em;
+    margin: 4em auto 0;
+  }
+
+  div.dialog > div {
+    border: 1px solid #CCC;
+    border-right-color: #999;
+    border-left-color: #999;
+    border-bottom-color: #BBB;
+    border-top: #B00100 solid 4px;
+    border-top-left-radius: 9px;
+    border-top-right-radius: 9px;
+    background-color: white;
+    padding: 7px 12% 0;
+    box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
+  }
+
+  h1 {
+    font-size: 100%;
+    color: #730E15;
+    line-height: 1.5em;
+  }
+
+  div.dialog > p {
+    margin: 0 0 1em;
+    padding: 1em;
+    background-color: #F7F7F7;
+    border: 1px solid #CCC;
+    border-right-color: #999;
+    border-left-color: #999;
+    border-bottom-color: #999;
+    border-bottom-left-radius: 4px;
+    border-bottom-right-radius: 4px;
+    border-top-color: #DADADA;
+    color: #666;
+    box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
+  }
+  </style>
+</head>
+
+<body>
+  <!-- This file lives in public/500.html -->
+  <div class="dialog">
+    <div>
+      <h1>We're sorry, but something went wrong.</h1>
+    </div>
+    <p>If you are the application owner check the logs for more information.</p>
+  </div>
+</body>
+</html>
diff --git a/public/favicon.ico b/public/favicon.ico
new file mode 100644
index 0000000..e69de29
diff --git a/public/robots.txt b/public/robots.txt
new file mode 100644
index 0000000..3c9c7c0
--- /dev/null
+++ b/public/robots.txt
@@ -0,0 +1,5 @@
+# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
+#
+# To ban all spiders from the entire site uncomment the next two lines:
+# User-agent: *
+# Disallow: /
diff --git a/spec/models/condition_spec.rb b/spec/models/condition_spec.rb
new file mode 100644
index 0000000..bcf85ec
--- /dev/null
+++ b/spec/models/condition_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe Condition, type: :model do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/kata_spec.rb b/spec/models/kata_spec.rb
new file mode 100644
index 0000000..e75ae04
--- /dev/null
+++ b/spec/models/kata_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe Kata, type: :model do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb
new file mode 100644
index 0000000..c278035
--- /dev/null
+++ b/spec/rails_helper.rb
@@ -0,0 +1,50 @@
+# This file is copied to spec/ when you run 'rails generate rspec:install'
+ENV['RAILS_ENV'] ||= 'test'
+require 'spec_helper'
+require File.expand_path('../../config/environment', __FILE__)
+require 'rspec/rails'
+# Add additional requires below this line. Rails is not loaded until this point!
+
+# Requires supporting ruby files with custom matchers and macros, etc, in
+# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
+# run as spec files by default. This means that files in spec/support that end
+# in _spec.rb will both be required and run as specs, causing the specs to be
+# run twice. It is recommended that you do not name files matching this glob to
+# end with _spec.rb. You can configure this pattern with the --pattern
+# option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
+#
+# The following line is provided for convenience purposes. It has the downside
+# of increasing the boot-up time by auto-requiring all files in the support
+# directory. Alternatively, in the individual `*_spec.rb` files, manually
+# require only the support files necessary.
+#
+# Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
+
+# Checks for pending migrations before tests are run.
+# If you are not using ActiveRecord, you can remove this line.
+ActiveRecord::Migration.maintain_test_schema!
+
+RSpec.configure do |config|
+  # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
+  config.fixture_path = "#{::Rails.root}/spec/fixtures"
+
+  # If you're not using ActiveRecord, or you'd prefer not to run each of your
+  # examples within a transaction, remove the following line or assign false
+  # instead of true.
+  config.use_transactional_fixtures = true
+
+  # RSpec Rails can automatically mix in different behaviours to your tests
+  # based on their file location, for example enabling you to call `get` and
+  # `post` in specs under `spec/controllers`.
+  #
+  # You can disable this behaviour by removing the line below, and instead
+  # explicitly tag your specs with their type, e.g.:
+  #
+  #     RSpec.describe UsersController, :type => :controller do
+  #       # ...
+  #     end
+  #
+  # The different available types are documented in the features, such as in
+  # https://relishapp.com/rspec/rspec-rails/docs
+  config.infer_spec_type_from_file_location!
+end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
new file mode 100644
index 0000000..38a4f9a
--- /dev/null
+++ b/spec/spec_helper.rb
@@ -0,0 +1,87 @@
+# This file was generated by the `rails generate rspec:install` command. Conventionally, all
+# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
+# The generated `.rspec` file contains `--require spec_helper` which will cause
+# this file to always be loaded, without a need to explicitly require it in any
+# files.
+#
+# Given that it is always loaded, you are encouraged to keep this file as
+# light-weight as possible. Requiring heavyweight dependencies from this file
+# will add to the boot time of your test suite on EVERY test run, even for an
+# individual file that may not need all of that loaded. Instead, consider making
+# a separate helper file that requires the additional dependencies and performs
+# the additional setup, and require it from the spec files that actually need
+# it.
+#
+# The `.rspec` file also contains a few flags that are not defaults but that
+# users commonly want.
+#
+# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
+RSpec.configure do |config|
+  # rspec-expectations config goes here. You can use an alternate
+  # assertion/expectation library such as wrong or the stdlib/minitest
+  # assertions if you prefer.
+  config.expect_with :rspec do |expectations|
+    # This option will default to `true` in RSpec 4. It makes the `description`
+    # and `failure_message` of custom matchers include text for helper methods
+    # defined using `chain`, e.g.:
+    #     be_bigger_than(2).and_smaller_than(4).description
+    #     # => "be bigger than 2 and smaller than 4"
+    # ...rather than:
+    #     # => "be bigger than 2"
+    expectations.include_chain_clauses_in_custom_matcher_descriptions = true
+  end
+
+  # rspec-mocks config goes here. You can use an alternate test double
+  # library (such as bogus or mocha) by changing the `mock_with` option here.
+  config.mock_with :rspec do |mocks|
+    # Prevents you from mocking or stubbing a method that does not exist on
+    # a real object. This is generally recommended, and will default to
+    # `true` in RSpec 4.
+    mocks.verify_partial_doubles = true
+  end
+
+# The settings below are suggested to provide a good initial experience
+# with RSpec, but feel free to customize to your heart's content.
+=begin
+  # These two settings work together to allow you to limit a spec run
+  # to individual examples or groups you care about by tagging them with
+  # `:focus` metadata. When nothing is tagged with `:focus`, all examples
+  # get run.
+  config.filter_run :focus
+  config.run_all_when_everything_filtered = true
+
+  # Limits the available syntax to the non-monkey patched syntax that is
+  # recommended. For more details, see:
+  #   - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
+  #   - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
+  #   - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
+  config.disable_monkey_patching!
+
+  # Many RSpec users commonly either run the entire suite or an individual
+  # file, and it's useful to allow more verbose output when running an
+  # individual spec file.
+  if config.files_to_run.one?
+    # Use the documentation formatter for detailed output,
+    # unless a formatter has already been configured
+    # (e.g. via a command-line flag).
+    config.default_formatter = 'doc'
+  end
+
+  # Print the 10 slowest examples and example groups at the
+  # end of the spec run, to help surface which specs are running
+  # particularly slow.
+  config.profile_examples = 10
+
+  # Run specs in random order to surface order dependencies. If you find an
+  # order dependency and want to debug it, you can fix the order by providing
+  # the seed, which is printed after each run.
+  #     --seed 1234
+  config.order = :random
+
+  # Seed global randomization in this process using the `--seed` CLI option.
+  # Setting this allows you to use `--seed` to deterministically reproduce
+  # test failures related to randomization by passing the same `--seed` value
+  # as the one that triggered the failure.
+  Kernel.srand config.seed
+=end
+end
diff --git a/vendor/assets/javascripts/.keep b/vendor/assets/javascripts/.keep
new file mode 100644
index 0000000..e69de29
diff --git a/vendor/assets/stylesheets/.keep b/vendor/assets/stylesheets/.keep
new file mode 100644
index 0000000..e69de29
diff --git a/vendor/bundle/ruby/2.1.0/bin/erubis b/vendor/bundle/ruby/2.1.0/bin/erubis
new file mode 100755
index 0000000..301dd30
--- /dev/null
+++ b/vendor/bundle/ruby/2.1.0/bin/erubis
@@ -0,0 +1,23 @@
+#!/usr/bin/env ruby
+#
+# This file was generated by RubyGems.
+#
+# The application 'erubis' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'rubygems'
+
+version = ">= 0"
+
+if ARGV.first
+  str = ARGV.first
+  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
+  if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
+    version = $1
+    ARGV.shift
+  end
+end
+
+gem 'erubis', version
+load Gem.bin_path('erubis', 'erubis', version)
diff --git a/vendor/bundle/ruby/2.1.0/bin/htmldiff b/vendor/bundle/ruby/2.1.0/bin/htmldiff
new file mode 100755
index 0000000..6829c46
--- /dev/null
+++ b/vendor/bundle/ruby/2.1.0/bin/htmldiff
@@ -0,0 +1,25 @@
+#!/bin/sh
+'exec' "ruby" '-x' "$0" "$@"
+#!/Users/benjamintarenne/.rvm/rubies/ruby-2.1.1/bin/ruby
+#
+# This file was generated by RubyGems.
+#
+# The application 'diff-lcs' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'rubygems'
+
+version = ">= 0"
+
+if ARGV.first
+  str = ARGV.first
+  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
+  if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
+    version = $1
+    ARGV.shift
+  end
+end
+
+gem 'diff-lcs', version
+load Gem.bin_path('diff-lcs', 'htmldiff', version)
diff --git a/vendor/bundle/ruby/2.1.0/bin/ldiff b/vendor/bundle/ruby/2.1.0/bin/ldiff
new file mode 100755
index 0000000..5d8588a
--- /dev/null
+++ b/vendor/bundle/ruby/2.1.0/bin/ldiff
@@ -0,0 +1,25 @@
+#!/bin/sh
+'exec' "ruby" '-x' "$0" "$@"
+#!/Users/benjamintarenne/.rvm/rubies/ruby-2.1.1/bin/ruby
+#
+# This file was generated by RubyGems.
+#
+# The application 'diff-lcs' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'rubygems'
+
+version = ">= 0"
+
+if ARGV.first
+  str = ARGV.first
+  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
+  if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
+    version = $1
+    ARGV.shift
+  end
+end
+
+gem 'diff-lcs', version
+load Gem.bin_path('diff-lcs', 'ldiff', version)
diff --git a/vendor/bundle/ruby/2.1.0/bin/rackup b/vendor/bundle/ruby/2.1.0/bin/rackup
new file mode 100755
index 0000000..416d30a
--- /dev/null
+++ b/vendor/bundle/ruby/2.1.0/bin/rackup
@@ -0,0 +1,23 @@
+#!/usr/bin/env ruby
+#
+# This file was generated by RubyGems.
+#
+# The application 'rack' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'rubygems'
+
+version = ">= 0"
+
+if ARGV.first
+  str = ARGV.first
+  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
+  if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
+    version = $1
+    ARGV.shift
+  end
+end
+
+gem 'rack', version
+load Gem.bin_path('rack', 'rackup', version)
diff --git a/vendor/bundle/ruby/2.1.0/bin/rails b/vendor/bundle/ruby/2.1.0/bin/rails
new file mode 100755
index 0000000..b2a661f
--- /dev/null
+++ b/vendor/bundle/ruby/2.1.0/bin/rails
@@ -0,0 +1,23 @@
+#!/usr/bin/env ruby
+#
+# This file was generated by RubyGems.
+#
+# The application 'railties' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'rubygems'
+
+version = ">= 0"
+
+if ARGV.first
+  str = ARGV.first
+  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
+  if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
+    version = $1
+    ARGV.shift
+  end
+end
+
+gem 'railties', version
+load Gem.bin_path('railties', 'rails', version)
diff --git a/vendor/bundle/ruby/2.1.0/bin/rake b/vendor/bundle/ruby/2.1.0/bin/rake
new file mode 100755
index 0000000..97d1fcc
--- /dev/null
+++ b/vendor/bundle/ruby/2.1.0/bin/rake
@@ -0,0 +1,23 @@
+#!/usr/bin/env ruby
+#
+# This file was generated by RubyGems.
+#
+# The application 'rake' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'rubygems'
+
+version = ">= 0"
+
+if ARGV.first
+  str = ARGV.first
+  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
+  if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
+    version = $1
+    ARGV.shift
+  end
+end
+
+gem 'rake', version
+load Gem.bin_path('rake', 'rake', version)
diff --git a/vendor/bundle/ruby/2.1.0/bin/rdoc b/vendor/bundle/ruby/2.1.0/bin/rdoc
new file mode 100755
index 0000000..0d3d314
--- /dev/null
+++ b/vendor/bundle/ruby/2.1.0/bin/rdoc
@@ -0,0 +1,23 @@
+#!/usr/bin/env ruby
+#
+# This file was generated by RubyGems.
+#
+# The application 'rdoc' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'rubygems'
+
+version = ">= 0"
+
+if ARGV.first
+  str = ARGV.first
+  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
+  if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
+    version = $1
+    ARGV.shift
+  end
+end
+
+gem 'rdoc', version
+load Gem.bin_path('rdoc', 'rdoc', version)
diff --git a/vendor/bundle/ruby/2.1.0/bin/ri b/vendor/bundle/ruby/2.1.0/bin/ri
new file mode 100755
index 0000000..cf45350
--- /dev/null
+++ b/vendor/bundle/ruby/2.1.0/bin/ri
@@ -0,0 +1,23 @@
+#!/usr/bin/env ruby
+#
+# This file was generated by RubyGems.
+#
+# The application 'rdoc' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'rubygems'
+
+version = ">= 0"
+
+if ARGV.first
+  str = ARGV.first
+  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
+  if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
+    version = $1
+    ARGV.shift
+  end
+end
+
+gem 'rdoc', version
+load Gem.bin_path('rdoc', 'ri', version)
diff --git a/vendor/bundle/ruby/2.1.0/bin/rspec b/vendor/bundle/ruby/2.1.0/bin/rspec
new file mode 100755
index 0000000..1df29e9
--- /dev/null
+++ b/vendor/bundle/ruby/2.1.0/bin/rspec
@@ -0,0 +1,23 @@
+#!/usr/bin/env ruby
+#
+# This file was generated by RubyGems.
+#
+# The application 'rspec-core' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'rubygems'
+
+version = ">= 0"
+
+if ARGV.first
+  str = ARGV.first
+  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
+  if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
+    version = $1
+    ARGV.shift
+  end
+end
+
+gem 'rspec-core', version
+load Gem.bin_path('rspec-core', 'rspec', version)
diff --git a/vendor/bundle/ruby/2.1.0/bin/sass b/vendor/bundle/ruby/2.1.0/bin/sass
new file mode 100755
index 0000000..2ade46c
--- /dev/null
+++ b/vendor/bundle/ruby/2.1.0/bin/sass
@@ -0,0 +1,23 @@
+#!/usr/bin/env ruby
+#
+# This file was generated by RubyGems.
+#
+# The application 'sass' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'rubygems'
+
+version = ">= 0"
+
+if ARGV.first
+  str = ARGV.first
+  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
+  if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
+    version = $1
+    ARGV.shift
+  end
+end
+
+gem 'sass', version
+load Gem.bin_path('sass', 'sass', version)
diff --git a/vendor/bundle/ruby/2.1.0/bin/sass-convert b/vendor/bundle/ruby/2.1.0/bin/sass-convert
new file mode 100755
index 0000000..2c1393c
--- /dev/null
+++ b/vendor/bundle/ruby/2.1.0/bin/sass-convert
@@ -0,0 +1,23 @@
+#!/usr/bin/env ruby
+#
+# This file was generated by RubyGems.
+#
+# The application 'sass' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'rubygems'
+
+version = ">= 0"
+
+if ARGV.first
+  str = ARGV.first
+  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
+  if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
+    version = $1
+    ARGV.shift
+  end
+end
+
+gem 'sass', version
+load Gem.bin_path('sass', 'sass-convert', version)
diff --git a/vendor/bundle/ruby/2.1.0/bin/scss b/vendor/bundle/ruby/2.1.0/bin/scss
new file mode 100755
index 0000000..6be603a
--- /dev/null
+++ b/vendor/bundle/ruby/2.1.0/bin/scss
@@ -0,0 +1,23 @@
+#!/usr/bin/env ruby
+#
+# This file was generated by RubyGems.
+#
+# The application 'sass' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'rubygems'
+
+version = ">= 0"
+
+if ARGV.first
+  str = ARGV.first
+  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
+  if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
+    version = $1
+    ARGV.shift
+  end
+end
+
+gem 'sass', version
+load Gem.bin_path('sass', 'scss', version)
diff --git a/vendor/bundle/ruby/2.1.0/bin/sdoc b/vendor/bundle/ruby/2.1.0/bin/sdoc
new file mode 100755
index 0000000..b28fa10
--- /dev/null
+++ b/vendor/bundle/ruby/2.1.0/bin/sdoc
@@ -0,0 +1,25 @@
+#!/bin/sh
+'exec' "ruby" '-x' "$0" "$@"
+#!/Users/benjamintarenne/.rvm/rubies/ruby-2.1.1/bin/ruby
+#
+# This file was generated by RubyGems.
+#
+# The application 'sdoc' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'rubygems'
+
+version = ">= 0"
+
+if ARGV.first
+  str = ARGV.first
+  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
+  if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
+    version = $1
+    ARGV.shift
+  end
+end
+
+gem 'sdoc', version
+load Gem.bin_path('sdoc', 'sdoc', version)
diff --git a/vendor/bundle/ruby/2.1.0/bin/sdoc-merge b/vendor/bundle/ruby/2.1.0/bin/sdoc-merge
new file mode 100755
index 0000000..a836cc7
--- /dev/null
+++ b/vendor/bundle/ruby/2.1.0/bin/sdoc-merge
@@ -0,0 +1,25 @@
+#!/bin/sh
+'exec' "ruby" '-x' "$0" "$@"
+#!/Users/benjamintarenne/.rvm/rubies/ruby-2.1.1/bin/ruby
+#
+# This file was generated by RubyGems.
+#
+# The application 'sdoc' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'rubygems'
+
+version = ">= 0"
+
+if ARGV.first
+  str = ARGV.first
+  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
+  if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
+    version = $1
+    ARGV.shift
+  end
+end
+
+gem 'sdoc', version
+load Gem.bin_path('sdoc', 'sdoc-merge', version)
diff --git a/vendor/bundle/ruby/2.1.0/bin/spring b/vendor/bundle/ruby/2.1.0/bin/spring
new file mode 100755
index 0000000..49623b8
--- /dev/null
+++ b/vendor/bundle/ruby/2.1.0/bin/spring
@@ -0,0 +1,23 @@
+#!/usr/bin/env ruby
+#
+# This file was generated by RubyGems.
+#
+# The application 'spring' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'rubygems'
+
+version = ">= 0"
+
+if ARGV.first
+  str = ARGV.first
+  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
+  if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
+    version = $1
+    ARGV.shift
+  end
+end
+
+gem 'spring', version
+load Gem.bin_path('spring', 'spring', version)
diff --git a/vendor/bundle/ruby/2.1.0/bin/sprockets b/vendor/bundle/ruby/2.1.0/bin/sprockets
new file mode 100755
index 0000000..bb01742
--- /dev/null
+++ b/vendor/bundle/ruby/2.1.0/bin/sprockets
@@ -0,0 +1,23 @@
+#!/usr/bin/env ruby
+#
+# This file was generated by RubyGems.
+#
+# The application 'sprockets' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'rubygems'
+
+version = ">= 0"
+
+if ARGV.first
+  str = ARGV.first
+  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
+  if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
+    version = $1
+    ARGV.shift
+  end
+end
+
+gem 'sprockets', version
+load Gem.bin_path('sprockets', 'sprockets', version)
diff --git a/vendor/bundle/ruby/2.1.0/bin/thor b/vendor/bundle/ruby/2.1.0/bin/thor
new file mode 100755
index 0000000..2533f7b
--- /dev/null
+++ b/vendor/bundle/ruby/2.1.0/bin/thor
@@ -0,0 +1,23 @@
+#!/usr/bin/env ruby
+#
+# This file was generated by RubyGems.
+#
+# The application 'thor' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'rubygems'
+
+version = ">= 0"
+
+if ARGV.first
+  str = ARGV.first
+  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
+  if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
+    version = $1
+    ARGV.shift
+  end
+end
+
+gem 'thor', version
+load Gem.bin_path('thor', 'thor', version)
diff --git a/vendor/bundle/ruby/2.1.0/bin/tilt b/vendor/bundle/ruby/2.1.0/bin/tilt
new file mode 100755
index 0000000..cba5196
--- /dev/null
+++ b/vendor/bundle/ruby/2.1.0/bin/tilt
@@ -0,0 +1,23 @@
+#!/usr/bin/env ruby
+#
+# This file was generated by RubyGems.
+#
+# The application 'tilt' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'rubygems'
+
+version = ">= 0"
+
+if ARGV.first
+  str = ARGV.first
+  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
+  if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
+    version = $1
+    ARGV.shift
+  end
+end
+
+gem 'tilt', version
+load Gem.bin_path('tilt', 'tilt', version)
diff --git a/vendor/bundle/ruby/2.1.0/bin/tt b/vendor/bundle/ruby/2.1.0/bin/tt
new file mode 100755
index 0000000..34efa1b
--- /dev/null
+++ b/vendor/bundle/ruby/2.1.0/bin/tt
@@ -0,0 +1,23 @@
+#!/usr/bin/env ruby
+#
+# This file was generated by RubyGems.
+#
+# The application 'treetop' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'rubygems'
+
+version = ">= 0"
+
+if ARGV.first
+  str = ARGV.first
+  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
+  if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
+    version = $1
+    ARGV.shift
+  end
+end
+
+gem 'treetop', version
+load Gem.bin_path('treetop', 'tt', version)
diff --git a/vendor/bundle/ruby/2.1.0/cache/actionmailer-4.1.0.gem b/vendor/bundle/ruby/2.1.0/cache/actionmailer-4.1.0.gem
new file mode 100644
index 0000000..9e518e7
Binary files /dev/null and b/vendor/bundle/ruby/2.1.0/cache/actionmailer-4.1.0.gem differ
diff --git a/vendor/bundle/ruby/2.1.0/cache/actionpack-4.1.0.gem b/vendor/bundle/ruby/2.1.0/cache/actionpack-4.1.0.gem
new file mode 100644
index 0000000..1e70691
Binary files /dev/null and b/vendor/bundle/ruby/2.1.0/cache/actionpack-4.1.0.gem differ
diff --git a/vendor/bundle/ruby/2.1.0/cache/actionview-4.1.0.gem b/vendor/bundle/ruby/2.1.0/cache/actionview-4.1.0.gem
new file mode 100644
index 0000000..af9fb87
Binary files /dev/null and b/vendor/bundle/ruby/2.1.0/cache/actionview-4.1.0.gem differ
diff --git a/vendor/bundle/ruby/2.1.0/cache/activemodel-4.1.0.gem b/vendor/bundle/ruby/2.1.0/cache/activemodel-4.1.0.gem
new file mode 100644
index 0000000..3f961d6
Binary files /dev/null and b/vendor/bundle/ruby/2.1.0/cache/activemodel-4.1.0.gem differ
diff --git a/vendor/bundle/ruby/2.1.0/cache/activerecord-4.1.0.gem b/vendor/bundle/ruby/2.1.0/cache/activerecord-4.1.0.gem
new file mode 100644
index 0000000..c624bbb
Binary files /dev/null and b/vendor/bundle/ruby/2.1.0/cache/activerecord-4.1.0.gem differ
diff --git a/vendor/bundle/ruby/2.1.0/cache/activesupport-4.1.0.gem b/vendor/bundle/ruby/2.1.0/cache/activesupport-4.1.0.gem
new file mode 100644
index 0000000..c9b221c
Binary files /dev/null and b/vendor/bundle/ruby/2.1.0/cache/activesupport-4.1.0.gem differ
diff --git a/vendor/bundle/ruby/2.1.0/cache/arel-5.0.1.20140414130214.gem b/vendor/bundle/ruby/2.1.0/cache/arel-5.0.1.20140414130214.gem
new file mode 100644
index 0000000..5200b6f
Binary files /dev/null and b/vendor/bundle/ruby/2.1.0/cache/arel-5.0.1.20140414130214.gem differ
diff --git a/vendor/bundle/ruby/2.1.0/cache/builder-3.2.2.gem b/vendor/bundle/ruby/2.1.0/cache/builder-3.2.2.gem
new file mode 100644
index 0000000..b59ef92
Binary files /dev/null and b/vendor/bundle/ruby/2.1.0/cache/builder-3.2.2.gem differ
diff --git a/vendor/bundle/ruby/2.1.0/cache/coffee-rails-4.1.0.gem b/vendor/bundle/ruby/2.1.0/cache/coffee-rails-4.1.0.gem
new file mode 100644
index 0000000..7477588
Binary files /dev/null and b/vendor/bundle/ruby/2.1.0/cache/coffee-rails-4.1.0.gem differ
diff --git a/vendor/bundle/ruby/2.1.0/cache/coffee-script-2.4.1.gem b/vendor/bundle/ruby/2.1.0/cache/coffee-script-2.4.1.gem
new file mode 100644
index 0000000..7e4066d
Binary files /dev/null and b/vendor/bundle/ruby/2.1.0/cache/coffee-script-2.4.1.gem differ
diff --git a/vendor/bundle/ruby/2.1.0/cache/coffee-script-source-1.9.1.1.gem b/vendor/bundle/ruby/2.1.0/cache/coffee-script-source-1.9.1.1.gem
new file mode 100644
index 0000000..5c27695
Binary files /dev/null and b/vendor/bundle/ruby/2.1.0/cache/coffee-script-source-1.9.1.1.gem differ
diff --git a/vendor/bundle/ruby/2.1.0/cache/diff-lcs-1.2.5.gem b/vendor/bundle/ruby/2.1.0/cache/diff-lcs-1.2.5.gem
new file mode 100644
index 0000000..e4436cc
Binary files /dev/null and b/vendor/bundle/ruby/2.1.0/cache/diff-lcs-1.2.5.gem diffe…
a53f3de
@luketlancaster luketlancaster referenced this issue in elizabrock/median
Merged

Added gravatar and profile view #1

@philipgiuliani

Why a bug like this isn't fixed yet?

@notrab

@philipgiuliani I'm sure you'll discover, judging by the comments above, there isn't any easy way to do this without polluting other classes within Rails for this behaviour.

The workaround is quite simple and to be honest, I don't see a problem. Throw it in the docs and just be done with it. Adding url: to the form declaration isn't so hard work for singular routes.

😴

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.