Skip to content

Commit

Permalink
specs ok
Browse files Browse the repository at this point in the history
  • Loading branch information
nofxx committed May 3, 2009
1 parent 6e8b299 commit a33a9a9
Show file tree
Hide file tree
Showing 48 changed files with 224 additions and 698 deletions.
4 changes: 2 additions & 2 deletions app/models/message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#
#
class Message < ActiveRecord::Base
belongs_to :sender, :foreign_key => :from_id, :class_name => "user"
belongs_to :receiver, :foreign_key => :to_id, :class_name => "user"
belongs_to :sender, :foreign_key => :from_id, :class_name => "User"
belongs_to :receiver, :foreign_key => :to_id, :class_name => "User"
belongs_to :parent, :foreign_key => :parent_id, :class_name => "Message"

validates_presence_of :sender, :receiver
Expand Down
12 changes: 12 additions & 0 deletions app/views/ads/_ad.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
- semantic_form_for(@ad) do |f|
= f.input :title
= f.input :kind
= f.input :body
= f.input :start_at, :as => :string
= f.input :end_at, :as => :string
%p
= f.submit 'Update'

= link_to 'Show', @ad
|
= link_to 'Back', ads_path
32 changes: 0 additions & 32 deletions app/views/ads/edit.html.erb

This file was deleted.

3 changes: 3 additions & 0 deletions app/views/ads/edit.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
%h1 Editing ad

= render @ad
28 changes: 0 additions & 28 deletions app/views/ads/index.html.erb

This file was deleted.

35 changes: 35 additions & 0 deletions app/views/ads/index.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
%h1
Listing ads
%table
%tr
%th
Title
%th
Kind
%th
Body
%th
Start at
%th
End at
- @ads.each do |ad|
%tr
%td
= h ad.title
%td
= h ad.kind
%td
= h ad.body
%td
= h ad.start_at
%td
= h ad.end_at
%td
= link_to 'Show', ad
%td
= link_to 'Edit', edit_ad_path(ad)
%td
= link_to 'Destroy', ad, :confirm => 'Are you sure?', :method => :delete

%br
= link_to 'New ad', new_ad_path
31 changes: 0 additions & 31 deletions app/views/ads/new.html.erb

This file was deleted.

3 changes: 3 additions & 0 deletions app/views/ads/new.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
%h1 New ad

= render @ad
28 changes: 0 additions & 28 deletions app/views/ads/show.html.erb

This file was deleted.

23 changes: 23 additions & 0 deletions app/views/ads/show.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
%p
%b
Title:
= h @ad.title
%p
%b
Kind:
= h @ad.kind
%p
%b
Body:
= h @ad.body
%p
%b
Start at:
= h @ad.start_at
%p
%b
End at:
= h @ad.end_at
= link_to 'Edit', edit_ad_path(@ad)
|
= link_to 'Back', ads_path
33 changes: 15 additions & 18 deletions app/views/areas/show.html.haml
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
<p>
<b>Name:</b>
<%=h @area.name %>
</p>

<p>
<b>Kind:</b>
<%=h @area.kind %>
</p>

<p>
<b>Geom:</b>
<%=h @area.geom %>
</p>


<%= link_to 'Edit', edit_area_path(@area) %> |
<%= link_to 'Back', areas_path %>
%p
%b
Name:
= h @area.name
%p
%b
Kind:
= h @area.kind
%p
%b
Geom:
= h @area.geom
= link_to 'Edit', edit_area_path(@area)
|
= link_to 'Back', areas_path
2 changes: 1 addition & 1 deletion app/views/laws/edit.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
.head
%h2.title Editando Lei
.content
.inner= render @plaw
.inner= render @law
32 changes: 0 additions & 32 deletions app/views/registers/edit.html.erb

This file was deleted.

28 changes: 0 additions & 28 deletions app/views/registers/index.html.erb

This file was deleted.

31 changes: 0 additions & 31 deletions app/views/registers/new.html.erb

This file was deleted.

28 changes: 0 additions & 28 deletions app/views/registers/show.html.erb

This file was deleted.

Loading

0 comments on commit a33a9a9

Please sign in to comment.