Open kulakowka opened 10 years ago
I get same error when using f.sir_trevor_text_area in Active Admin
wrong number of arguments (4 for 0) ruby 2.0 rails 4.0.4
Hi guys.
Try this branch of the gem: https://github.com/madebymany/sir-trevor-rails/tree/redesign-gem
There are some changes that you will need to make but in the long run it should make ST integration easier as it removes the need for sir_trevor_text_area
. Plus I've been using it with Rails 4 ruby 2 on a number of apps so should work there.
I'm just trying to find the time to write some test before I PR it to master.
Let me know if you have any problems
gem 'sir_trevor_rails' Could not find gem 'sir_trevor_rails (>= 0) x64-mingw32' in the gems available
gem 'sir_trevor_rails', github: 'madebymany/sir-trevor-rails', branch: 'redesign-gem' work but
rails s C:/Ruby200-x64/lib/ruby/gems/2.0.0/bundler/gems/sir-trevor-rails-0b6fb9a7f458/lib/sir_trevor_rails/view_resolver.rb:2:in `module:SirTrevorRails': uninitialized constant ActionView::FileSystemResolver (NameError)
can you upload working example with sir trevor on rails?
+1
Rails: 4.0.4 Ruby 2.1.1
Can't even try @ninjabiscuit s branch as I get this error:
Could not find gem 'sir-trevor-rails (>= 0) ruby' in https://github.com/madebymany/sir-trevor-rails.git (at redesign-gem).
@tomgrim for some (stupid) reason, I renamed the gem to be sir_trevor_rails (note the underscores) for consistency. try it again by referencing the the correct name in the gemfile
Ah good catch! Unfortunately I'm now getting:
undefined method 'sir_trevor_text_area' for #<Formtastic::...
I see someone else fixed this by restarting their server but I haven't had the same luck.
Yeah, I need to write an upgrade guide for this gem I guess.
I've removed the sir_trevor_text_area
helper (as well as a bunch of other helpers too)
Most of the breaking changes are mentioned here: https://github.com/madebymany/sir-trevor-rails/blob/redesign-gem/README.md
to fix that error, you'll need to manually set up a textarea for use with sir trevor. IE use a normal textarea_tag
with a class that you can reference from your JS when you instantiate ST.
I'll try and put together a guide at some point.
Should really have read the commits before posting but at least it's working now! Thanks a lot for your help :thumbsup:
No problem, glad you got it working. You've spurred me on to finish the documentation
I use manual: https://github.com/madebymany/sir-trevor-rails
My gemfile i add: gem 'sir-trevor-rails', github: 'madebymany/sir-trevor-rails', branch: 'v4'
But i have error:
In _form.html.haml i write:
Model have attribute :body
When has be error ???
P.S. $ rails -v