Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug worked out #5

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
*.swp
*.swo
*.DS_STORE
.bundle
db/*.sqlite3
log/*.log
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ source 'http://rubygems.org'

gem 'rails', '3.0.1'
gem 'devise', '1.1.5'
gem 'chameleon'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ GEM
activesupport (~> 3.0.0)
bcrypt-ruby (2.1.2)
builder (2.1.2)
chameleon (0.2.2)
devise (1.1.5)
bcrypt-ruby (~> 2.1.2)
warden (~> 1.0.2)
Expand Down Expand Up @@ -76,6 +77,7 @@ PLATFORMS
ruby

DEPENDENCIES
chameleon
devise (= 1.1.5)
rails (= 3.0.1)
sqlite3-ruby
2 changes: 2 additions & 0 deletions app/helpers/tasks_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ def create_links(content)

return content.html_safe
end


end
1 change: 1 addition & 0 deletions app/views/tasks/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@
<ul id="tasks">
<%= render :partial => 'task', :collection => @tasks %>
</ul>
<%= @test %>
10 changes: 10 additions & 0 deletions app/widgets/users_widget.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
widget :users do
key "8c2f3348656213da127da80376540291c627151d"
type "number_and_secondary"
data do
{
:value => User.count,
:previous => User.count(:conditions => "created_at < '#{1.month.ago.to_s(:db)}'")
}
end
end
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Fluttr::Application.routes.draw do
match "widgets/:id", :to => "widgets#show"

devise_for :users, :path_names => { :sign_in => "login", :sign_out => "logout", :sign_up => "signup" }
get "users" => redirect("/users/edit")
Expand Down
12 changes: 6 additions & 6 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
end

create_table "tasks", :force => true do |t|
t.string "name", :null => false
t.string "content", :null => false
t.timestamp "created_at"
t.timestamp "updated_at"
t.boolean "completed", :default => false, :null => false
t.integer "list_id"
t.string "name", :null => false
t.string "content", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "completed", :default => false, :null => false
t.integer "list_id"
end

create_table "users", :force => true do |t|
Expand Down