diff --git a/app/models/calentry.rb b/app/models/calentry.rb index d4c64bc..a69f5de 100644 --- a/app/models/calentry.rb +++ b/app/models/calentry.rb @@ -18,5 +18,5 @@ class Calentry < ActiveRecord::Base def name summary end - + scope :upcoming, -> { where("start >= ?" , Time.now).where("start <= ?", 8.days.from_now) } end diff --git a/app/models/fetprofile.rb b/app/models/fetprofile.rb index ca5eb35..87a402d 100644 --- a/app/models/fetprofile.rb +++ b/app/models/fetprofile.rb @@ -6,4 +6,5 @@ class Fetprofile < ActiveRecord::Base def name [vorname, nachname, "(",short,")"].join(" ") end + scope :active, -> { where(:active=>:true).order(:vorname) } end diff --git a/app/views/fetprofiles/index.html.erb b/app/views/fetprofiles/index.html.erb index 8f27cff..b005167 100644 --- a/app/views/fetprofiles/index.html.erb +++ b/app/views/fetprofiles/index.html.erb @@ -1,23 +1,25 @@ +
+
+

Listing fetprofiles

+
+
- - -
- +
+
<%= link_to 'New Fetprofile', new_fetprofile_path %> +
diff --git a/app/views/fetprofiles/show.html.erb b/app/views/fetprofiles/show.html.erb index 99e2912..b4e17fc 100644 --- a/app/views/fetprofiles/show.html.erb +++ b/app/views/fetprofiles/show.html.erb @@ -16,7 +16,7 @@

<%= "Aktiv".html_safe if @fetprofile.active %>

- +

<%= link_to 'Destroy', @fetprofile, method: :delete, data: { confirm: 'Are you sure?' } %>

diff --git a/app/views/galleries/show.html.erb b/app/views/galleries/show.html.erb index 95849b0..052f027 100644 --- a/app/views/galleries/show.html.erb +++ b/app/views/galleries/show.html.erb @@ -33,7 +33,7 @@