fixed bug about co-author-relation
This commit is contained in:
		
							parent
							
								
									d4c6fc66d5
								
							
						
					
					
						commit
						54de86eeb4
					
				| 
						 | 
					@ -25,7 +25,7 @@ class Desktop::CoAuthorRelationsController < ApplicationController
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if @co_author_relation.save
 | 
					    if @co_author_relation.save
 | 
				
			||||||
      newv = render_to_string partial: "show_form", object: @co_author_relations
 | 
					      newv = render_to_string partial: "show_form", object: @co_author_relations
 | 
				
			||||||
      render json: {success: true, msg: "New Relation successfully saved!", newvalue: newvm}.to_json
 | 
					      render json: {success: true, msg: "New Relation successfully saved!", newvalue: newv}.to_json
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      error_msg = @co_author_relation.errors.full_messages.join("<br />")
 | 
					      error_msg = @co_author_relation.errors.full_messages.join("<br />")
 | 
				
			||||||
      render json: {success: false, msg: error_msg}.to_json
 | 
					      render json: {success: false, msg: error_msg}.to_json
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,14 +1,14 @@
 | 
				
			||||||
<div class="toolbar hh2">
 | 
					<div class="toolbar hh2">
 | 
				
			||||||
  <div class="fn_g hp">
 | 
					  <div class="fn_g hp">
 | 
				
			||||||
  	<div class="hh2 sdm">
 | 
					    <div class="hh2 sdm">
 | 
				
			||||||
    <div class="sdm_t hp hh2 thmc2 thmtxt">Create</div>
 | 
					      <div class="sdm_t hp hh2 thmc2 thmtxt">Create</div>
 | 
				
			||||||
    <div class="admbg sdm_o">
 | 
					      <div class="admbg sdm_o">
 | 
				
			||||||
      <ul>
 | 
					        <ul>
 | 
				
			||||||
        <li class="vp hp s_form" style="width:282px;"><%= render 'new' %></li>
 | 
					          <li class="vp hp s_form" style="width:282px;"><%= render 'new' %></li>
 | 
				
			||||||
      </ul>
 | 
					        </ul>
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </div>
 | 
					    <%= submit_tag "Back", :type => "button", class: "bt-cancel fn_btn ini_input hp hh2 thmtxt" %>
 | 
				
			||||||
  	<%= submit_tag "Back", :type => "button", class: "bt-cancel fn_btn ini_input hp hh2 thmtxt" %>
 | 
					 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
  <div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
 | 
					  <div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
 | 
				
			||||||
  <div class="viewport">
 | 
					  <div class="viewport">
 | 
				
			||||||
    <div class="overview">
 | 
					    <div class="overview">
 | 
				
			||||||
    <%= render :partial => 'show_form'%>
 | 
					      <%= render :partial => 'show_form'%>
 | 
				
			||||||
	</div>
 | 
					    </div>
 | 
				
			||||||
</div>
 | 
					  </div>
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,4 +3,10 @@ require 'spec_helper'
 | 
				
			||||||
describe "Co-Author pages" do
 | 
					describe "Co-Author pages" do
 | 
				
			||||||
  subject {co-author}
 | 
					  subject {co-author}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  describe "Co-Author list" do
 | 
				
			||||||
 | 
					    before { visit desktop_co_authors }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    it { should have_selector('h1', text: 'Sign up') }
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue