Skip to content

Commit

Permalink
Mods for list view and some user spec
Browse files Browse the repository at this point in the history
  • Loading branch information
mbeckman committed Sep 11, 2014
1 parent 7993055 commit 43123d2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 25 deletions.
2 changes: 1 addition & 1 deletion app/helpers/users_helper.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module UsersHelper

def user_tag(user)
user.email
user.name
end

end
26 changes: 3 additions & 23 deletions app/views/taxon_names/list.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,13 @@
<th>Name</th>
<th>Parent</th>
<th>Cached name</th>
<th>Cached author year</th>
<th>Cached higher classification</th>
<!--<th>Lft</th>-->
<!--<th>Rgt</th>-->
<th>Source</th>
<th>Year of publication</th>
<th>Verbatim author</th>
<th>Rank class</th>
<th>Type</th>
<th>Cached original combination</th>
<th>Cached secondary homonym</th>
<th>Cached primary homonym</th>
<th>Cached secondary homonym alt</th>
<th>Cached primary homonym alt</th>
<th>Created by</th>
<th>Updated by</th>
<th>Project</th>
<th>Last updated</th>
<th></th>
<th></th>
<th></th>
Expand All @@ -38,23 +28,13 @@
<td><%= taxon_name.name %></td>
<td><%= object_tag(taxon_name.parent) %></td>
<td><%= taxon_name.cached_name %></td>
<td><%= taxon_name.cached_author_year %></td>
<td><%= taxon_name.cached_higher_classification %></td>
<!--<td><%#= taxon_name.lft %></td>-->
<!--<td><%#= taxon_name.rgt %></td>-->
<td><%= object_tag(taxon_name.source) %></td>
<td><%= taxon_name.year_of_publication %></td>
<td><%= taxon_name.verbatim_author %></td>
<td><%= taxon_name.rank_class %></td>
<td><%= taxon_name.type %></td>
<td><%= taxon_name.cached_original_combination %></td>
<td><%= taxon_name.cached_secondary_homonym %></td>
<td><%= taxon_name.cached_primary_homonym %></td>
<td><%= taxon_name.cached_secondary_homonym_alt %></td>
<td><%= taxon_name.cached_primary_homonym_alt %></td>
<td><%= taxon_name.created_by_id %></td>
<td><%= taxon_name.updated_by_id %></td>
<td><%= taxon_name.project_id %></td>
<td><%= object_tag(taxon_name.updater) %></td>
<td><%= object_time_since_update_tag(taxon_name) %></td>
<td><%= link_to 'Show', taxon_name.becomes(TaxonName) %></td>
<td><%= link_to 'Edit', edit_taxon_name_path(taxon_name.becomes(TaxonName)) %></td>
<td><%= link_to 'Destroy', taxon_name.becomes(TaxonName), method: :delete, data: {confirm: 'Are you sure?'} %></td>
Expand Down
3 changes: 2 additions & 1 deletion spec/features/users_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
visit root_path
}

it 'should have information and links' do
it 'on Dashboard, should have information and links' do
expect(page).to have_content("#{@user.email}")
expect(page).to have_link('Account')
expect(page).to have_link('Sign out')
Expand Down Expand Up @@ -96,6 +96,7 @@
}

it 'should have information and actions' do

end
end

Expand Down

0 comments on commit 43123d2

Please sign in to comment.