forked from captproton/rboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
default_scope apparently doesn't like conditions
- Loading branch information
Showing
10 changed files
with
58 additions
and
36 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,30 @@ | ||
<tbody> | ||
<tr> | ||
<td><%= f.label :title, t(:Title) %></td> | ||
<td><%= f.text_field "title" %></td> | ||
</tr> | ||
|
||
<tr> | ||
<td valign='top'><%= f.label :description, t(:Description) %></td> | ||
<td><%= f.text_area "description", :cols => 40, :rows => 5 %></td> | ||
</tr> | ||
|
||
<% unless @forums.empty? %> | ||
<tr> | ||
<td><%= f.label :parent_id, t(:Child_of) %></td> | ||
<td><%= f.select "parent_id", @forums.map { |forum| [select_display(forum),forum.id] }, :include_blank => true %></td> | ||
</tr> | ||
<% end %> | ||
|
||
<% unless @category %> | ||
<tr> | ||
<td><%= f.label :category_id, t(:Category) %></td> | ||
<td><%= f.select "category_id", @categories.map { |category| [select_display(category, 'name'), category.id] }, :include_blank => true %></td> | ||
</tr> | ||
<% end %> | ||
<tbody> | ||
<tr> | ||
<td><%= f.label :title, t(:Title) %></td> | ||
<td><%= f.text_field "title" %></td> | ||
</tr> | ||
|
||
<tr> | ||
<td valign='top'><%= f.label :description, t(:Description) %></td> | ||
<td><%= f.text_area "description", :cols => 40, :rows => 5 %></td> | ||
</tr> | ||
|
||
<% unless @forums.empty? %> | ||
<tr> | ||
<td><%= f.label :parent_id, t(:Child_of) %></td> | ||
<td><%= f.select "parent_id", @forums.map { |forum| [select_display(forum),forum.id] }, :include_blank => true %></td> | ||
</tr> | ||
<% end %> | ||
|
||
<% unless @category %> | ||
<tr> | ||
<td><%= f.label :category_id, t(:Category) %></td> | ||
<td><%= f.select "category_id", @categories.map { |category| [select_display(category, 'name'), category.id] }, :include_blank => true %></td> | ||
</tr> | ||
<% end %> | ||
|
||
<tr> | ||
<td><%= f.label :active, t(:Active) %></td> | ||
<td><%= f.check_box :active %></td> | ||
</tr> | ||
</tbody> |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Given /^there is an inactive forum$/ do | ||
Forum.create(:title => "Hidden Forum", :description => "This is a hidden forum", :active => false) | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Given /^I can see inactive forums$/ do | ||
@permission = @user.permissions.global | ||
@permission.update_attribute(:can_see_inactive_forums, true) | ||
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
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