Commit Graph

452 Commits

Author SHA1 Message Date
Courtney Hazel
b51113bc0f Merge pull request #2 from jcaudle/unique_usernames
Unique usernames
2013-02-21 19:11:25 -08:00
Joseph Caudle
434d06ad83 Add test to ensure uniqueness of login_name 2013-02-21 22:08:25 -05:00
Joseph Caudle
728f8ec9ce Update factory for members and specs about members
We have added a sequence for login_name which is similar to the one for
emails in which the member name is incremented each time a new member is
saved.

In addition, we have updated all specs which asked for an explicit
login_name of member1 to use a regex looking only for member and some
digit.
2013-02-21 21:57:39 -05:00
Gnat
efd90e2d76 Add validation for uniqueness of login_name 2013-02-11 02:43:47 +00:00
pozorvlak
649a1a4091 Merge pull request #106 from Skud/rack-upgrade
rack upgrade to 1.4.5
2013-02-08 15:31:54 -08:00
Skud
a4938eba23 rack upgrade to 1.4.5 2013-02-09 10:26:51 +11:00
pozorvlak
b126ac8358 Merge pull request #105 from Skud/comments2
Comments
2013-02-08 15:18:50 -08:00
Skud
8caa4d12e8 limit to recent comments 2013-02-08 18:14:37 +11:00
Skud
d37e7a148d Delete comments when post is deleted 2013-02-08 17:45:37 +11:00
Skud
b7f3634615 redirect to post after deleting comment 2013-02-08 17:37:37 +11:00
Skud
40bcb8c380 fixed up titles 2013-02-08 17:35:08 +11:00
Skud
979ad334f3 made the index page not be ugly 2013-02-08 17:31:17 +11:00
Skud
801347976e Added edit/delete buttons to comment display 2013-02-08 17:24:06 +11:00
Skud
62af897bf1 various prettification 2013-02-08 16:55:55 +11:00
Skud
f45434ff83 redirect to post after new/edit comment 2013-02-08 16:40:27 +11:00
Skud
660c626581 show comments on post page 2013-02-08 16:36:15 +11:00
Skud
acc1f4006f fixed tests to reflect removed fields 2013-02-08 16:13:52 +11:00
Skud
93edede4da Merged from mistaken branch on G/g 2013-02-08 16:11:38 +11:00
Skud
3b3f9d261f can't create a new post without a post_id 2013-02-08 15:02:21 +11:00
Skud
b6c759e521 edit comments 2013-02-08 14:49:07 +11:00
Skud
ae59b1e18d pass post_id through to comment 2013-02-08 14:37:57 +11:00
Skud
f66b4a64a3 added comment button to posts 2013-02-08 14:22:49 +11:00
Skud
a0a88bee11 comment form shouldn't have author/post fields 2013-02-08 14:14:07 +11:00
Joseph Caudle
01ab177cc9 Merge pull request #104 from Skud/public_email
Public email
2013-02-05 22:25:06 -08:00
Skud
09727d99b2 show email on profile if wanted 2013-02-06 16:54:15 +11:00
Skud
d5327ebbf3 show_email checkbox on settings page 2013-02-06 16:31:11 +11:00
Joseph Caudle
cf05e4108d Merge pull request #103 from Skud/edit_settings
Edit settings
2013-02-05 21:28:31 -08:00
Skud
363502a807 add show_email field to members 2013-02-06 16:25:17 +11:00
Skud
4f64946de2 Wrote some very basic tests for the improved settings page 2013-02-06 16:10:43 +11:00
Skud
a50bee4828 oops, broke tests with the change to 'Sign in' 2013-02-06 16:00:47 +11:00
Skud
1dbed949f6 s/Log in/Sign in/ -- be consistent with devise 2013-02-06 15:56:51 +11:00
Skud
9b458070e0 Settings form now works (and is prettified)
Had to add some Devise crud based on advice on their wiki, otherwise
you couldn't change your settings without changing your password.

Also had to make a hidden field for tos_agreement. I don't really love
it but nobody seems to be able to recommend a better way.
2013-02-06 15:54:43 +11:00
Skud
dfac54d936 Added hidden TOS field to edit settings page so it works 2013-02-06 15:31:14 +11:00
gnattery
6da3e4fae5 Added associations and tested them 2013-02-06 15:20:44 +11:00
gnattery
3cff543184 rails g scaffold Comment 2013-02-06 14:49:49 +11:00
Skud
e5d380729e we more or less have a settings page. doesn't WORK though. 2013-02-06 12:46:45 +11:00
Skud
fb37e1abaa fixed a weird variable expansion 2013-02-06 11:41:08 +11:00
Skud
893d92ac72 Added 'Settings' to top nav 2013-02-06 11:39:03 +11:00
pozorvlak
7beaf4afa4 Merge pull request #102 from Skud/nomemberjson
No member json
2013-02-05 03:44:55 -08:00
Skud
e41293c121 fixed placement of curly braces. tests now pass. 2013-02-05 22:30:28 +11:00
Skud
1ccaab3085 Don't allow members to be accessible with JSON
One of the tests is failing and I can't for the life of me figure out
why. Everything looks fine when I try it with curl from the command
line. Hmm.
2013-02-02 23:37:24 +11:00
pozorvlak
2f2ec81345 Merge pull request #101 from Skud/spike-cancan
Controller security
2013-02-01 04:33:58 -08:00
Skud
58e5d04d50 controller tests for plantings now pass 2013-02-01 22:55:48 +11:00
Skud
302a32c768 that can? check was superflous; controller does it for us. 2013-02-01 22:03:05 +11:00
Skud
75e8ea1119 I'd rather not use Member.new 2013-02-01 13:37:33 +11:00
Skud
21960a5494 Tried to get controller tests passing.
All are fine except for plantings.  I'm pretty sure hte problem is to do
with these two lines in app/model/ability.rb

  can :update, Planting, :garden => { :owner_id => member.id }
  can :destroy, Planting, :garden => { :owner_id => member.id }

I'm pretty sure that's the right syntax (according to
https://github.com/ryanb/cancan/wiki/Defining-Abilities) but since it's
the update and delete actions that are failing, I guess I must have it
wrong somehow.  Any hints?
2013-02-01 13:25:06 +11:00
Skud
87f14247e0 modified views to use CanCan 2013-02-01 13:24:32 +11:00
Skud
2d6f1ae210 redirect to previous page if available 2013-02-01 11:29:14 +11:00
Skud
3697c28a00 Added more informative error message. 2013-02-01 11:23:54 +11:00
Skud
cd469264bd this seems to mostly work 2013-02-01 11:21:13 +11:00