Skip to content

Commit 6f85f73

Browse files
committed
Documenting helpers. Version 0.3.20
1 parent af0c2ef commit 6f85f73

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,18 @@ The local object name will either match the database table singular name 'post',
322322
table_column :actions, :partial => '/posts/actions', :partial_local => 'the_post'
323323
```
324324

325+
There are also a built in helper, `datatables_admin_path?` to considering if the current screen is in the `/admin` namespace:
326+
327+
```ruby
328+
table_column :created_at do |post|
329+
if datatables_admin_path?
330+
link_to admin_posts_path(post)
331+
else
332+
link_to posts_path(post)
333+
end
334+
end
335+
336+
325337
## table_columns
326338

327339
Quickly create multiple table_columns all with default options:

lib/effective_datatables/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module EffectiveDatatables
2-
VERSION = "0.3.19"
2+
VERSION = "0.3.20"
33
end

0 commit comments

Comments
 (0)