-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rails 4 support #1443
Comments
Yeah it needs real work, more than just bumping that number up. Want to have a crack at it in new branch? |
Maybe you already have a list of problems? |
I just tried updating the Gemfile and there were enough problems that it didn't look trivial. Strong parameters is the first problem. |
I create really painful hacks, but RailsAdmin work with (and only with) my project :). I can create real fixes only later. But today I can write problem places, that I found. |
My problems with Rails 4:
|
Do you mean you have rails_admin working with your rails 4 project? If I have time I might make a start tomorrow |
Yeap, rails4 branch run with Rails 4 project, can create/edit and delete records. I don’t run the tests and hacks are really rude and immoral :). |
Cool, that's a good start |
@ai & @gunn there is a pull request to rails to fix the asset path problem. |
Anyone have news about the Rails 4 support? |
@gbmoretti Maybe wait until |
I'm trying that, and as well as @ai I have an application running with Rails 4 and rails_admin but tests don't pass. |
Any chance we could start a Rails-4.0 branch to start work on migrating rails_admin to support Rails 4? I spent a few hours trying to update rails_admin to work against 4.0, but its still a work in progress. I would love to make it a communal effort. |
I added a rails-4 branch, feel free to send PR ;) |
Just fired up the rails-4 branch on my app. I'm getting the following exception when trying to create a new record (e.g. /admin/groups/new)
Looking at the rails_admin code, it appears as though there is a dependency on rails 3 mass assignment security (i.e. attr_accessible). The issue is that Would it be reasonable to remove this feature? |
Actually, the feature doesn't need to be removed entirely. Just the only way to make an attribute read_only would be via rails_admin config. See https://github.com/sferik/rails_admin/blob/rails-4/lib/rails_admin/config/fields/base.rb#L217 |
While working on Mongoid Rails4 support, I've come up with a question: Keeping backward compatibility is always good thing, but it might introduce some complexity to the logics. |
Can't be sure, but I doubt mass assignment will be popular amongst Rails 4 developers. It's not a Rails default, and there's a suitable (arguably much better) replacement. What relies on mass assignment beyond disabling form inputs for fields that can't be mass assigned? |
It was a way to allow for column configuration through the mass assignement role. We should ditch it and replace it with custom cancan verbs. |
Adding my 2 cents here, for what's it worth ;) I think you should go with Strong Parameter. Rails 3.2 apps can just add strong_parameter gem AFAIK and it would work out of the box. |
I am using |
@PikachuEXE you can monkey patch devise for now if you want: http://stackoverflow.com/questions/15520151/rails-4-authentication/15627422#15627422. |
@jipiboily I am using custom controllers anyway |
Still no Rails 4 support when do you plan to add it ? |
RailsAdmin 'rails-4' branch works nicely with Rails 4.0.0.rc1 now. |
Didn't work with jquery-rails 3.0.0
Installed 2.3.0 version and then it works fine. |
I've merged master into rails-4 branch. |
With latest |
Found the cause: seems to be sass-rails issue(ref. rails/sass-rails#139) gem 'sass-rails', github: 'rails/sass-rails' to Gemfile worked. |
Problem with install rake task: ➜ rails g rails_admin:install
- Hello, RailsAdmin installer will help you set things up!
- I need to work with Devise, let's look at a few things first:
- Checking for a current installation of devise...
- Found it!
- Looks like you've already installed it, good!
? Where do you want to mount rails_admin? Press <enter> for [admin] > admin
gsub config/routes.rb
route mount RailsAdmin::Engine => '/admin', :as => 'rails_admin'
- And you already set it up, good! We just need to know about your user model name...
- We found 'user' (should be one of 'user', 'admin', etc.)
? Correct Devise model name if needed. Press <enter> for [user] > user
- Ok, Devise looks already set up with user model name 'user':
- Now you'll need an initializer...
- You already have a config file. You're updating, heh? I'm generating a new 'rails_admin.rb.example' that you can review.
create config/initializers/rails_admin.rb.example
NameError: uninitialized constant Rails::Application::Railties
|
@swistaczek |
@mshibuya I updated to bleeding edge rails version (master) and I also tried to use dirty patch Rails::Engine.class_eval do
def railties
@railties ||= self.class.const_get(:Railties).new
end
end but without any effect. Gemfile: gem 'rails', github: 'rails/rails'
gem 'rails_admin', git: 'git://github.com/swistaczek/rails_admin.git', branch: 'rails-4' Running generator:
|
@swistaczek @sferik |
Hi guys, I see you have merged rails4 branch into master, but keep getting errors when trying to bundle install: Gemfile looks like this: gem 'rails_admin', github: 'swistaczek/rails_admin' And error goes like: Bundler could not find compatible versions for gem "rails":
In Gemfile:
rails_admin (>= 0) ruby depends on
rails (~> 3.1) ruby
rails (4.0.0) Any thoughts on this? |
@novito have you tried a bundle update rails_admin? When you have a github reference like that, you are locked into a specific revision I believe. If you run the bundle update it should update the revision lock to the latest commit. |
@davebrace interesting: I did bundle update rails_admin, and I got Could not find gem 'rails_admin' I removed the Gemfile.lock, run bundle install and got: Bundler could not find compatible versions for gem "coffee-rails":
In Gemfile:
rails_admin (>= 0) ruby depends on
coffee-rails (~> 3.1) ruby
coffee-rails (4.0.0) Are you guys seeing something similar? |
Ok. I was pointing to 'swistaczek' fork instead of 'sferik'. The bundle install worked fine after changing that. Sorry guys. |
after writing 'bundle exec rake db:migrate' I get the following message Admin does not respond to 'devise' method. This usually means you haven't loaded your ORM file or it's being loaded too late. To fix it, be sure to require 'devise/orm/YOUR_ORM' inside 'config/initializers/devise.rb' or before your application definition in 'config/application.rb' I have the version 4 of rails |
@wstan77 Your devise configuration is wrong. Not an issue with RailsAdmin. |
I found and what was the mistake, thanks :) |
Hi guys!.... I am a beginner in rails and when I enter my password I get the following error: ActiveModel::ForbiddenAttributesError in Devise::RegistrationsController#create I have installed rails 4 and rails_admin however, in rails 3 does not give me any errors! |
@wstan77 Please do not use the issue tracker for a support request. |
Note that the wiki docs are really old. This page https://github.com/sferik/rails_admin/wiki/CarrierWave still uses |
Ruby on Rails 4 is now beta and will be released very soon.
It will be nice, if RailsAdmin will support Rails 4.
Now RailsAdmin is locked on
rails ~> 3.1
. Is it code dependency, which need real strong refactoring?The text was updated successfully, but these errors were encountered: