enju_event 0.0.18 → 0.0.19

Sign up to get free protection for your applications and to get access to all the features.
@@ -60,7 +60,7 @@ class ParticipatesController < ApplicationController
60
60
  if @participate.update_attributes(params[:participate])
61
61
  flash[:notice] = 'Participate was successfully updated.'
62
62
  format.html { redirect_to(@participate) }
63
- format.json { head :ok }
63
+ format.json { head :no_content }
64
64
  else
65
65
  format.html { render :action => "edit" }
66
66
  format.json { render :json => @participate.errors, :status => :unprocessable_entity }
@@ -74,8 +74,8 @@ class ParticipatesController < ApplicationController
74
74
  @participate.destroy
75
75
 
76
76
  respond_to do |format|
77
- format.html { redirect_to(participates_url) }
78
- format.json { head :ok }
77
+ format.html { redirect_to participates_url }
78
+ format.json { head :no_content }
79
79
  end
80
80
  end
81
81
  end
data/app/models/event.rb CHANGED
@@ -8,7 +8,6 @@ class Event < ActiveRecord::Base
8
8
 
9
9
  belongs_to :event_category, :validate => true
10
10
  belongs_to :library, :validate => true
11
- has_many :attachment_files, :as => :attachable
12
11
  has_many :picture_files, :as => :picture_attachable
13
12
  has_many :participates, :dependent => :destroy
14
13
  has_many :patrons, :through => :participates
@@ -18,17 +18,17 @@
18
18
  <p>
19
19
  <%- case params[:mode]
20
20
  when 'upcoming' -%>
21
- <%= link_to t('event.all'), params.merge(:mode => nil) -%>
21
+ <%= link_to t('event.all'), url_for(params.merge(:mode => nil, :only_path => true)) -%>
22
22
  <strong><%= t('event.upcoming') -%></strong>
23
- <%= link_to t('event.past'), params.merge(:mode => 'past') -%>
23
+ <%= link_to t('event.past'), url_for(params.merge(:mode => 'past', :only_path => true)) -%>
24
24
  <%- when 'past' -%>
25
- <%= link_to t('event.all'), params.merge(:mode => nil) -%>
26
- <%= link_to t('event.upcoming'), params.merge(:mode => 'upcoming') -%>
25
+ <%= link_to t('event.all'), url_for(params.merge(:mode => nil, :only_path => true)) -%>
26
+ <%= link_to t('event.upcoming'), url_for(params.merge(:mode => 'upcoming', :only_path => true)) -%>
27
27
  <strong><%= t('event.past') -%></strong>
28
28
  <%- else -%>
29
29
  <strong><%= t('event.all') -%></strong>
30
- <%= link_to t('event.upcoming'), params.merge(:mode => 'upcoming') -%>
31
- <%= link_to t('event.past'), params.merge(:mode => 'past') -%>
30
+ <%= link_to t('event.upcoming'), url_for(params.merge(:mode => 'upcoming', :only_path => true)) -%>
31
+ <%= link_to t('event.past'), url_for(params.merge(:mode => 'past', :only_path => true)) -%>
32
32
  <%- end -%>
33
33
  </p>
34
34
 
@@ -21,17 +21,17 @@
21
21
  <p>
22
22
  <%- case params[:mode]
23
23
  when 'upcoming' -%>
24
- <%= link_to t('event.all'), params.merge(:mode => nil) -%>
24
+ <%= link_to t('event.all'), url_for(params.merge(:mode => nil, :only_path => true)) -%>
25
25
  <strong><%= t('event.upcoming') -%></strong>
26
- <%= link_to t('event.past'), params.merge(:mode => 'past') -%>
26
+ <%= link_to t('event.past'), url_for(params.merge(:mode => 'past', :only_path => true)) -%>
27
27
  <%- when 'past' -%>
28
- <%= link_to t('event.all'), params.merge(:mode => nil) -%>
29
- <%= link_to t('event.upcoming'), params.merge(:mode => 'upcoming') -%>
28
+ <%= link_to t('event.all'), url_for(params.merge(:mode => nil, :only_path => true)) -%>
29
+ <%= link_to t('event.upcoming'), url_for(params.merge(:mode => 'upcoming', :only_path => true)) -%>
30
30
  <strong><%= t('event.past') -%></strong>
31
31
  <%- else -%>
32
32
  <strong><%= t('event.all') -%></strong>
33
- <%= link_to t('event.upcoming'), params.merge(:mode => 'upcoming') -%>
34
- <%= link_to t('event.past'), params.merge(:mode => 'past') -%>
33
+ <%= link_to t('event.upcoming'), url_for(params.merge(:mode => 'upcoming', :only_path => true)) -%>
34
+ <%= link_to t('event.past'), url_for(params.merge(:mode => 'past', :only_path => true)) -%>
35
35
  <%- end -%>
36
36
  </p>
37
37
  </div>
@@ -4,11 +4,11 @@ xml.rss('version' => "2.0",
4
4
  'xmlns:atom' => "http://www.w3.org/2005/Atom"){
5
5
  xml.channel{
6
6
  xml.title t('event.library_group_event', :library_group_name => @library_group.display_name.localize)
7
- xml.link "#{request.protocol}#{request.host_with_port}#{url_for(params.merge(:format => nil))}"
7
+ xml.link "#{request.protocol}#{request.host_with_port}#{url_for(params.merge(:format => nil, :only_path => true))}"
8
8
  xml.description "Next-L Enju, an open source integrated library system developed by Project Next-L"
9
9
  xml.language @locale.to_s
10
10
  xml.ttl "60"
11
- xml.tag! "atom:link", :rel => 'self', :href => "#{request.protocol}#{request.host_with_port}#{url_for(params.merge(:format => :rss))}"
11
+ xml.tag! "atom:link", :rel => 'self', :href => "#{request.protocol}#{request.host_with_port}#{url_for(params.merge(:format => :rss, :only_path => true))}"
12
12
  xml.tag! "atom:link", :rel => 'alternate', :href => events_url
13
13
  #xml.tag! "atom:link", :rel => 'search', :type => 'application/opensearchdescription+xml', :href => "http://#{request.host_with_port}/page/opensearch"
14
14
  unless params[:query].blank?
@@ -1,3 +1,3 @@
1
1
  module EnjuEvent
2
- VERSION = "0.0.18"
2
+ VERSION = "0.0.19"
3
3
  end
@@ -92,10 +92,6 @@ Devise.setup do |config|
92
92
  # If true, extends the user's remember period when remembered via cookie.
93
93
  # config.extend_remember_period = false
94
94
 
95
- # If true, uses the password salt as remember token. This should be turned
96
- # to false if you are not using database authenticatable.
97
- config.use_salt_as_remember_token = true
98
-
99
95
  # Options to be passed to the created cookie. For instance, you can set
100
96
  # :secure => true in order to force SSL only cookies.
101
97
  # config.cookie_options = {}
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enju_event
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.18
4
+ version: 0.0.19
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-14 00:00:00.000000000 Z
12
+ date: 2012-05-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -477,7 +477,6 @@ files:
477
477
  - spec/dummy/config/locales/en.yml
478
478
  - spec/dummy/config/routes.rb
479
479
  - spec/dummy/config.ru
480
- - spec/dummy/db/development.sqlite3
481
480
  - spec/dummy/db/migrate/001_create_patrons.rb
482
481
  - spec/dummy/db/migrate/059_create_libraries.rb
483
482
  - spec/dummy/db/migrate/069_create_shelves.rb
@@ -504,8 +503,6 @@ files:
504
503
  - spec/dummy/lib/enju_leaf/master_model.rb
505
504
  - spec/dummy/lib/enju_leaf/url_validator.rb
506
505
  - spec/dummy/lib/enju_leaf.rb
507
- - spec/dummy/private/system/event_import_files/event_imports/000/000/001/original/event_import_file_sample1.tsv
508
- - spec/dummy/private/system/event_import_files/event_imports/000/000/001/original/event_import_file_sample2.tsv
509
506
  - spec/dummy/private/system/event_import_files/event_imports/000/000/004/original/event_destroy_file.tsv
510
507
  - spec/dummy/private/system/event_import_files/event_imports/000/000/004/original/event_import_file_sample1.tsv
511
508
  - spec/dummy/private/system/event_import_files/event_imports/000/000/004/original/event_import_file_sample2.tsv
@@ -636,7 +633,6 @@ test_files:
636
633
  - spec/dummy/config/locales/en.yml
637
634
  - spec/dummy/config/routes.rb
638
635
  - spec/dummy/config.ru
639
- - spec/dummy/db/development.sqlite3
640
636
  - spec/dummy/db/migrate/001_create_patrons.rb
641
637
  - spec/dummy/db/migrate/059_create_libraries.rb
642
638
  - spec/dummy/db/migrate/069_create_shelves.rb
@@ -663,8 +659,6 @@ test_files:
663
659
  - spec/dummy/lib/enju_leaf/master_model.rb
664
660
  - spec/dummy/lib/enju_leaf/url_validator.rb
665
661
  - spec/dummy/lib/enju_leaf.rb
666
- - spec/dummy/private/system/event_import_files/event_imports/000/000/001/original/event_import_file_sample1.tsv
667
- - spec/dummy/private/system/event_import_files/event_imports/000/000/001/original/event_import_file_sample2.tsv
668
662
  - spec/dummy/private/system/event_import_files/event_imports/000/000/004/original/event_destroy_file.tsv
669
663
  - spec/dummy/private/system/event_import_files/event_imports/000/000/004/original/event_import_file_sample1.tsv
670
664
  - spec/dummy/private/system/event_import_files/event_imports/000/000/004/original/event_import_file_sample2.tsv
Binary file
@@ -1,5 +0,0 @@
1
- "name" "category" "library_shortname" "start_at" "end_at" "dummy"
2
- "イベント名" "カテゴリ。休館日の場合はclosed" "図書館名" "開始日" "終了日" "インポート省略"
3
- "hogehoge" "おはなし会" "kamata" "2009-04-01" "2009-04-03"
4
- "hogehoge" "hachioji"
5
- "休館日" "closed" "kamata" "2011-04-01" "2011-04-03"
@@ -1,3 +0,0 @@
1
- "name" "library_shortname" "start_at" "end_at"
2
- "���{��̍Â���" "kamata" "2011-03-26" "2011-03-27"
3
- "���{��̍Â���2" "kamata" "2011-03-26" "2011-03-27"