irwi 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  <ul class="wiki_page_actions">
2
- <%= content_tag('li', link_to( wt( 'History' ), wiki_page_history_path )) if history_allowed? %>
3
- <%= content_tag('li', link_to( wt( 'Edit' ), wiki_page_edit_path )) if edit_allowed? %>
4
- <%= content_tag('li', link_to( wt( 'Destroy' ), wiki_page_path, :method => :delete, :confirm => wt( "Destroyed page cann't be restored. Are you ready for it?" ) )) if destroy_allowed? %>
2
+ <%= content_tag('li', link_to( wt( 'History' ), wiki_page_history_path(@page) )) if history_allowed? %>
3
+ <%= content_tag('li', link_to( wt( 'Edit' ), wiki_page_edit_path(@page) )) if edit_allowed? %>
4
+ <%= content_tag('li', link_to( wt( 'Destroy' ), wiki_page_path(@page), :method => :delete, :confirm => wt( "Destroyed page cann't be restored. Are you ready for it?" ) )) if destroy_allowed? %>
5
5
  </ul>
@@ -20,5 +20,5 @@
20
20
  <input type="submit" name="cancel" value="<%=wt 'Cancel' %>" class="submit" />
21
21
  <% end %>
22
22
 
23
- <% wiki_page_attachments(@page) %>
23
+ <%= wiki_page_attachments(@page) %>
24
24
 
@@ -3,7 +3,7 @@ module Irwi::Extensions::Controllers::WikiPageAttachments
3
3
  def add_attachment
4
4
  attachment = page_attachment_class.new(params[:wiki_page_attachment])
5
5
  attachment.save
6
- redirect_to url_for( :action => :edit)
6
+ redirect_to url_for(:path => attachment.page.path, :action => :edit)
7
7
  end
8
8
 
9
9
  def remove_attachment
@@ -66,7 +66,7 @@ module Irwi::Extensions::Controllers::WikiPages
66
66
  end
67
67
 
68
68
  def update
69
- return not_allowed unless @page.new_record? || edit_allowed? # Check for rights (but not for new record, for it we will use second check only)
69
+ return not_allowed unless params[:page] && (@page.new_record? || edit_allowed?) # Check for rights (but not for new record, for it we will use second check only)
70
70
 
71
71
  @page.attributes = params[:page] # Assign new attributes
72
72
  @page.comment = params[:page][:comment]
@@ -2,7 +2,7 @@ module Irwi
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 4
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: irwi
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 0
10
- version: 0.4.0
9
+ - 1
10
+ version: 0.4.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alexey Noskov
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-01-29 00:00:00 +03:00
19
+ date: 2011-03-10 00:00:00 +03:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency