There is an issue with the latest release of Rails and AjaxScaffold. Well actually the problem is in a conflict between Prototype and Rico Corner, if you find that all the AJAX stops working – lots of spinning indicators and not much else you have three choices, wait a little and we will likely release an update, or if you are impatient / desperate for a fix you can use the following patch for prototype or you can remove the Rico Corner include……
I have been asked a few times for the code for the FCKeditor demo. So I thought I would put it up here for anyone to download, and by here I mean here.
The tar includes the fckeditor plugin, the ajax scaffold plugin and the bits to get them working together. You will need to create a db and update the config files though.
A few people have said they have been having problems with the text area not appearing in Firefox. This isn’t a problem I have had but for those of you who have, thanks to James Penny there is a solution…..
Simply add something like :width => ‘400’, :height => ‘200’ to the fckeditor_textarea call and you should get the editor appearing as expected. Obviously you can change the dimensions to suite your needs.
The solution also explains why I never saw the issue – I have always had the dimensions specified……
I released a new version of the FCKeditor plugin today. It contains a couple of changes to the controller to fix a potential security issue and also a remote_form_for helper so that now you can do this:
<% fckeditor_remote_form_for :note,
:url => @options.merge(:controller => 'notes'),
:editors => { :note => ['text'] } do |f| %>
<%= fckeditor_textarea( "note", "text", :ajax => true )
<% end %>
You still need to use the original fckeditor_textarea call as as of yet there is no f.fckeditor_textarea method.
I am currently trying to add a check for IsDirty to prevent accidental unloading of the editor and also looking at using the FCKeditor_IsCompatibleBrowser() function to degrade gracefully.
N.B If you are upgrading you will need to delete the public/javascripts/fckeditor directory before reinstalling…
So a couple of weeks ago we (Cominded) put up RailsPays, a free job board for Rails jobs in the UK. These can be anything – full time, part time, contract, etc so long as they are to do with Rails. I have to admit the idea was driven by the trouble we have had finding developers to join us and, well it has worked. A week or so ago we hired Matt Mower from the first post we put up……..
There are now a couple more jobs up there too (along with ours and we are still looking), but space for plenty more!!!
I”ve been asked a couple of times how to dynamically setup the columns displayed by the AS plugin dependant on the permissions of the user, so I though a quick post would be a good idea.
Basically its very simple, you simply define a hash of all the columns you potentially wish to display keyed by the column name, so something like:
@@columns_hash[:user] = ScaffoldColumn.new(..) @@columns_hash[:foo] = ScaffoldColumn.new(:name => 'bar')
Then define a before_filter along the lines of:
before_filter :create_columns,nly => ['table', 'update_table']
I released a new version of the plugin today that fixes a few outstanding issues and adds 3 new extension points. The main things that have been fixed are:
- Single table inheritance now works
- Legacy table names are now supported
- The table formats properly under IE
The 3 extra extra extension points are
- do_new
- do_edit
- do_delete
I will update the post on extending the plugin to fully cover these new features.
This release tidies up some of the things I thought I’d got right with the last one, doh. However, it turns out I had overlooked the paths for the spell check and the resource manager. Both of these now dynamically configure so that you can place your install anywhere you fancy. Unfortunately there is a single piece of configuration now required, if, and only if your app is hosted away from the root of the server.
So you’ve seen Ryan Daigle’s article on ResourceFeeder and you want all that RSS goodness. However, you are using Rails 1.1.6 and don’t want to move to edge at the moment.
All you need to do is install the ResourceFeeder and SimplyHelpful plugins:
./script/plugin install resource_feeder ./script/plugin install simply_helpful
This release fixes an issue with the base path to the editor being hardcoded into the helper. The problem arose when hosting an app using named virtual hosts and aliases. e.g. hosting your app at www.mydomain.com/scotts/railsapp instead of www.mydomain.com/railsapp.
This should now all work……..











