Note that there are some explanatory texts on larger screens.

plurals
  1. PORemove the duplicated form code by refactoring with Rails
    text
    copied!<pre><code>Finished in 15.53 seconds ←[31m86 examples, 4 failures←[0m </code></pre> <p>Failed examples:</p> <pre><code>←[31mrspec ./spec/requests/user_pages_spec.rb:95←[0m ←[36m# User pages signup wi th valid information should create a user←[0m ←[31mrspec ./spec/requests/user_pages_spec.rb:104←[0m ←[36m# User pages signup w ith valid information after saving the user ←[0m ←[31mrspec ./spec/requests/user_pages_spec.rb:105←[0m ←[36m# User pages signup w ith valid information after saving the user ←[0m ←[31mrspec ./spec/requests/user_pages_spec.rb:106←[0m ←[36m# User pages signup w ith valid information after saving the user ←[0m </code></pre> <p>don't understand why im getting this error. i followed instructions at the ruby guides, Problem 5.. <a href="http://ruby.railstutorial.org/chapters/updating-showing-and-deleting-users?version=3.2#sec:updating_deleting_exercises" rel="nofollow">http://ruby.railstutorial.org/chapters/updating-showing-and-deleting-users?version=3.2#sec:updating_deleting_exercises</a> </p> <p>app/views/users/new.html.erb</p> <pre><code>&lt;%= provide(:title, 'Sign up') %&gt; &lt;h1&gt;Sign up&lt;/h1&gt; &lt;div class="row"&gt; &lt;div class="span6 offset3"&gt; &lt;%= form_for(@user) do |f| %&gt; &lt;%= render 'fields', f: f %&gt; &lt;%= f.submit "Create my account", class: "btn btn-large btn-primary" %&gt; &lt;% end %&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>app/views/users/edit.html.erb</p> <pre><code>&lt;%= provide(:title, 'Edit user') %&gt; &lt;h1&gt;Update your profile&lt;/h1&gt; &lt;div class="row"&gt; &lt;div class="span6 offset3"&gt; &lt;%= form_for(@user) do |f| %&gt; &lt;%= render 'fields', f: f %&gt; &lt;%= f.submit "Save changes", class: "btn btn-large btn-primary" %&gt; &lt;% end %&gt; &lt;%= gravatar_for @user %&gt; &lt;%= link_to "change", "http://gravatar.com/emails", :target =&gt; "_new"%&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>app/views/users/_fields.html.erb</p> <pre><code>&lt;%= render 'shared/error_messages' %&gt; &lt;%= f.label :name %&gt; &lt;%= f.text_field :name %&gt; &lt;%= f.label :email %&gt; &lt;%= f.text_field :email %&gt; &lt;%= f.label :password %&gt; &lt;%= f.password_field :password %&gt; &lt;%= f.label :password_confirmation, "Confirm Password" %&gt; &lt;%= f.password_field :password_confirmation %&gt; </code></pre> <p>when i don't try to settle for refactoring this code, and leaving it duplicated i get no errors.. so i'm thinking <b> /spec/requests/user_pages_spec.rb </b> doesn't really have a problem.. Any suggestions would be appreciated.</p> <p>and it's weird cause the app doesn't seem to have any problems (or so it seems to have none) but yeah it works perfectly fine.. its just that error that's bugging me.</p> <p>-Marc</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload