Comments (2)
I had a situation where I wanted this functionality too. I was going to write a gem called arbre_rails (since Arbre is going eventually be a gem too #113) that would provide "translations" from Rails helpers to Arbre. This is what I have so far. Let me know what you think and I'll start coding it up:
# Duplicate Rails' view helper in Arbre.
# Normal Rails view helpers will be available without this, but
# when done in Arbre, they will use the Arbre builder and be rendered as expected.
module ActiveAdmin::RailsViewHelpers
def link_to(content, url)
a(href: url) { content }
end
def content_tag_for(tag, resource, &block)
send(tag, class: resource.class.model_name.singular, id: dom_id(resource), &block)
end
end
ActiveAdmin::Views::Pages::Base.send :include, ActiveAdmin::RailsViewHelpers
from activeadmin.
Closing this. It will be included in arbre-rails which will be released with Active Admin 0.5.0
from activeadmin.
Related Issues (20)
- ransack never receives an auth object HOT 1
- Unexpected behavior of form when trying to add raw html in the admin page form
- Is there a way to add expand/collapse method to has_many inputs in form
- ActiveAdmin - Error on boot HOT 1
- undefined method `to_ary` for Enumerator (Rails 7.1.1 & Activeadmin 3.1.0) HOT 4
- index columns / show rows
- `contains` filter no longer working HOT 1
- Update action does not call `authorize_resource!` after assigning attributes HOT 10
- uninitialized constant InheritedResources::Base (NameError) HOT 1
- Filtering on associations does not use the foreign_key when defined HOT 3
- Uninitialized constant `Devise::SessionsController` when extending controller HOT 1
- Rails 7.1.2 compatibility HOT 1
- InvalidAuthenticityToken Can't verify CSRF with rails 7.1.2.
- v4 beta 3: Kaminari translation override may affect the host application HOT 2
- v4 beta 3: External CDNs do not play well with CSP and may be a problem for intranet apps HOT 2
- Defining Actions in Index as a Table (4.0.0.beta3) HOT 3
- after_save called even if validation fails HOT 5
- 4.0.0.beta4 nesting in menus HOT 6
- Indentation broken for nested lists HOT 1
- No access to routes helpers from ActiveAdmin views [v4.0.0.beta5] HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from activeadmin.