This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="https://mw-nauka.mtu.pl/soap/"> | |
<soapenv:Header/> | |
<soapenv:Body> | |
<soap:ObliczSkladkeMajatek> | |
<ObliczSkladkeMajatekParams> | |
<aut> | |
<Login>WS</Login> | |
<Haslo>test1</Haslo> | |
</aut> | |
<DaneDoWyceny> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Znizki> | |
<IdSzkodowosci>57ea4eeb7e3f4</IdSzkodowosci> | |
<DeklaracjaSzkodowosci>false</DeklaracjaSzkodowosci> | |
</Znizki> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Znizki> | |
<IdSzkodowosci>57ea4c7d3f1b6</IdSzkodowosci> | |
<DeklaracjaSzkodowosci>true</DeklaracjaSzkodowosci> | |
<IloscSzkodPowodziowych5Lat>3</IloscSzkodPowodziowych5Lat> | |
</Znizki> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ObliczSkladkeMajatekResult> | |
<Komunikat> | |
<Kod>-10</Kod> | |
<Tresc>Błędna wartość: Znizki</Tresc> | |
</Komunikat> | |
</ObliczSkladkeMajatekResult> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<DaneDoWyceny> | |
<NumerAgenta/> | |
<DataOd>2016-09-26</DataOd> | |
<Odnowienie>false</Odnowienie> | |
<Ubezpieczony type="OsobaFizycznaWycena"> | |
<KodPocztowy>16-010</KodPocztowy> | |
<Pesel>94121907898</Pesel> | |
<DataUrodzenia>2016-06-20 00:00:00 UTC</DataUrodzenia> | |
<DataPrawoJazdy/> | |
</Ubezpieczony> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%h3 Comments | |
%br | |
- @blog_post.comments.each do |comment| | |
%p= comment.body | |
%h5.p= comment.user.try(:email) | |
%h6.p= comment.created_at | |
%br | |
%h4 Add a comment: | |
= form_for(@comment, url: admin_blog_post_comments_path(@blog_post)) do |f| | |
%p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def show | |
@comments = @blog_post.comments | |
@comment = @blog_post.comments.new | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Admin::CommentsController < AdminController | |
def show | |
end | |
def create | |
blog_post = BlogPost.find(params[:blog_post_id]) | |
@blog_post_comment = blog_post.comments.new(params[:comment]) | |
@blog_post_comment.user = current_user | |
if @blog_post_comment.save |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resources :blog_posts do | |
resources :comments | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AddUserIdToComments < ActiveRecord::Migration | |
def change | |
add_column :comments, :user_id, :integer | |
add_index :comments, :user_id | |
end | |
end |