-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added owner to every model to provide public/private functionality
- patched with patch from @lhm - updated seeded user - added new rake task permissions:add:all to add all permissions to an user - updated factories - added a few tests - add correct paging path when searching this fixes #27 and #34
- Loading branch information
ben
committed
Dec 9, 2011
1 parent
f9c7b02
commit 4f25acd
Showing
14 changed files
with
284 additions
and
124 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
$:.unshift File.expand_path(File.dirname(__FILE__)) | ||
require 'lib/api.rb' | ||
run Sinatra::Application | ||
|
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 |
---|---|---|
|
@@ -7,4 +7,3 @@ def self.down | |
add_timestamps :permissions_users | ||
end | ||
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,19 @@ | ||
class AddPropertyStuff < ActiveRecord::Migration | ||
def self.up | ||
remove_column :data_calendar_events, :public | ||
remove_column :data_calendar_events, :user_id | ||
ActiveRecord::Base.connection.tables.select{|t| t =~ /^data_/}.each do |table| | ||
add_column table, :owner_id, :integer | ||
add_column table, :public, :boolean, :default => true | ||
end | ||
end | ||
|
||
def self.down | ||
ActiveRecord::Base.connection.tables.select{|t| t =~ /^data_/}.each do |table| | ||
remove_column table, :owner_id | ||
remove_column table, :public | ||
end | ||
add_column :data_calendar_events, :public, :boolean | ||
add_column :data_calendar_events, :user_id, :integer | ||
end | ||
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Oops, something went wrong.