Commit Graph

213 Commits

Author SHA1 Message Date
Miles Gould
4701bd1b2e Merge branch 'dev' into places2
Conflicts:
	Gemfile.lock
	config/application.rb
	credentials.example
2013-08-31 15:49:30 +01:00
Lilly
5c4ee581cc Added 'bulb' as a 'planted_from' option. 2013-08-30 15:08:23 +10:00
Skud
b73c4db17a Merge branch 'newsletter' of https://github.com/Skud/growstuff into Skud-newsletter
Conflicts:
	db/schema.rb
	spec/models/member_spec.rb
2013-08-29 00:06:44 +10:00
Miles Gould
2c6e2ee2d7 Merge branch 'dev' into places2
Conflicts:
	app/views/members/_popover.html.haml
2013-08-28 13:02:25 +01:00
Skud
30bb877537 Added wants_newsletter scope to Member
also cleaned up member tests which were using FG.build instead of
.create
2013-08-27 21:34:30 +10:00
Skud
99bfc704dc Added plantings_count (i.e. counter_cache) to Member
Also removed the superfluous .plantings_count method on Crop, which was
causing some confusion.

A thing we learned today: we should use .size to find the size of
ActiveRecord collections, not .count, because .count doesn't use the
cache (while .size does).
2013-08-26 13:54:09 +10:00
Skud
475a402133 Refactor ALL THE THINGS
Refactored tests to take into account that plantings now have owners
directly, not via gardens. Mostly this was just tweaking FactoryGirl
calls to do the right thing.
2013-08-26 12:17:23 +10:00
Skud
1ad416269d Added owner to planting
Previously we got the owner indirectly, through the garden in which the
planting was planted.  Now we're directly specifying an owner.  This
allows us to let people plant things in each other's gardens.

Tests are probably broken at this point; we're about to refactor ALL THE
THINGS.
2013-08-26 12:17:06 +10:00
Miles Gould
8ce2798fb3 Fail gracefully if location is not found. 2013-08-23 14:12:04 +01:00
Miles Gould
7857bfd0df Merge branch 'dev' into places2
Fix up broken indentation on navbar.
Conflicts:
	app/views/layouts/_header.html.haml
2013-08-23 13:29:37 +01:00
Skud
9df8ec15ba Merge branch 'dev' of https://github.com/Growstuff/growstuff into member-bio
Conflicts:
	db/schema.rb
2013-08-22 13:15:02 +10:00
Skud
a5b2db3458 added creator to scientific names 2013-08-21 17:50:51 +10:00
Skud
57fe663675 Merge branch 'dev' of https://github.com/Growstuff/growstuff into places2
Conflicts:
	app/controllers/members_controller.rb
	app/models/member.rb
	app/views/members/_popover.html.haml
	spec/models/member_spec.rb
2013-08-21 17:35:31 +10:00
martyhines
e77f7fdf31 Added creator field to crops 2013-08-20 21:22:02 -04:00
Skud
e8cb5e89b6 Changed interesting methods to always return 12
... because it makes the caching more effective.  Use .first(n) to get a
smaller number if you want it.
2013-08-14 11:58:54 +10:00
Skud
32f2830df5 changed located scope to ignore blank lat/long 2013-08-12 10:46:35 +10:00
martyhines
0d5b2bbcce Added bio to member model 2013-08-08 21:38:01 -04:00
Skud
d5d004306b randomise crops on homepage 2013-08-07 16:33:39 +10:00
Skud
0e401c907e Only interesting (locatable) seeds are shown on homepage 2013-08-07 16:26:51 +10:00
Skud
937ef36b6d don't count empty strings as interesting locations 2013-08-07 16:26:41 +10:00
Skud
ee39156036 Only interesting (locatable) seeds are shown on homepage 2013-08-07 16:25:38 +10:00
Skud
3122aa6484 Shuffle interesting crops 2013-08-07 16:16:08 +10:00
Skud
a1383ad9b6 don't count empty strings as interesting locations 2013-08-07 16:13:31 +10:00
Skud
749a9b8fdc Added seeds and people to homepage 2013-08-07 13:21:27 +10:00
Skud
56e7b8392f refactored interesting crops 2013-08-07 13:21:27 +10:00
Skud
2cd298fbde refactored 'interesting plantings' 2013-08-07 13:21:26 +10:00
Skud
4bcc408236 added recent scope for crops 2013-08-07 13:21:26 +10:00
Skud
fd466e795b Minor tweaks to seed trading:
- changed "Will trade to" to "Will trade" on seeds/show page
- on crop page, only list tradable seeds (not "nowhere" ones) -- did
this by adding a tradable scope to Crop
- on crop page, say "(location unknown)" where necessary
- change heading on crop page to "Find seeds"
- show "Find seeds" heading regardless of whether any are available, and
say there are none if there aren't any, along with a link to add some
- moved "sign in or sign up to add seeds" to under the Find seeds area
2013-07-24 11:20:47 +10:00
Miles Gould
b7cbadf84a Merge branch 'dev' into seed_trade
Conflicts:
	spec/views/crops/show.html.haml_spec.rb
2013-07-23 12:59:41 +01:00
Miles Gould
da15994a46 Merge branch 'dev' into seed_trade
Conflicts:
	spec/views/crops/show.html.haml_spec.rb
2013-07-23 12:32:21 +01:00
Skud
470f8f2f22 allow nil/blank qtys for plantings/seeds 2013-07-23 21:19:21 +10:00
Skud
bdc267b044 added slug for seeds 2013-07-23 21:14:24 +10:00
Skud
2185f257c0 set 'nowhere' as default seed.tradable_to 2013-07-23 20:43:13 +10:00
Skud
d227da891e Merge branch 'dev' into seed_trade 2013-07-23 20:21:58 +10:00
Skud
2b6bdeda16 Merge branch 'dev' of https://github.com/Growstuff/growstuff into dev
Conflicts:
	spec/views/crops/show.html.haml_spec.rb
2013-07-23 19:35:31 +10:00
Ryan Clark
a87db0e406 Show list of seeds for trade on crop/show 2013-07-22 21:15:05 -07:00
Skud
52a00c5ed4 added numeric validation to qty for planting/seed 2013-07-22 16:40:42 +10:00
Skud
3a96cd96df removed tradable boolean field
we're now relying just on the "tradable_to" field, which is clearer.
2013-07-22 15:47:25 +10:00
Ryan Clark
e9dd18d977 Added tradable and tradable_to to seeds 2013-07-17 18:25:55 -07:00
Skud
91ea5146ac rails g scaffold seed... 2013-07-15 22:53:29 +10:00
Miles Gould
4d9ddd2707 Crop: method to return hash of planted_from frequencies
Also tidied up tests which relied on the default planting factory having
a planted_from value set.
2013-07-11 13:01:52 +01:00
Miles Gould
744b526dd1 Show sunniness frequencies on crop page
Also cleaned up tests that were relying on the default planting factory
to have a sunniness value set.
2013-07-11 12:41:22 +01:00
Miles Gould
fbc64a1ee2 Crop: method to return hash of sunniness values. 2013-07-11 12:13:38 +01:00
Skud
7801a7ec09 Merge branch 'dev' into staff 2013-07-09 10:05:37 +10:00
Skud
c2be06e68f Fixed failing timestamp test on postgres 2013-07-08 13:28:59 +10:00
Skud
1ff2211c0f removed boring tests from controllers
the tests generated by 'rails g scaffold...' are boring and brittle.
they don't actually test anything other than the rails framework, and
they were causing us all kinds of trouble. we've started to blow them
away (and raised a PT chore to remove them from other controllers in due
course).
2013-07-08 13:09:37 +10:00
Skud
ec80b01c7a cleaning up tests on postgres
- still trying to make sure we explicitly use a real member, not just
assume there's one with id = 1

- also it looks like the tests for post activity are passing for obscure
reasons on sqlite when they shouldn't be. this is a known bug
(https://www.pivotaltracker.com/story/show/51280861) apparently
invisible to us under sqlite.
2013-07-08 12:18:51 +10:00
Skud
878af07419 gave up on not_staff, shuffling interesting members instead 2013-07-08 11:54:55 +10:00
Skud
b71ac3decb added planted_from (eg seed, seedling) 2013-07-05 20:53:11 +10:00
Skud
e4dd0f98e8 Merge pull request #243 from lucymclaughlin/forex_link
Forex link
2013-07-04 01:28:40 -07:00