Skip to content
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

Please pull typo fix #21

Closed
wants to merge 20 commits into from
Closed

Please pull typo fix #21

wants to merge 20 commits into from

Conversation

tpo
Copy link

@tpo tpo commented Apr 18, 2011

This commit: tpo@03ca986
fixes the following issue: #11

Also it'd be nice to pull the history fix from earnold. I have it merged in my tree and it works as advertised so far :-)

Thanks,
*t

Tomáš Pospíšek and others added 20 commits March 28, 2011 14:30
Currently when the user clicks on a link, she gets to
the no.html.erb page which only links to a "wiki/new"
action without the newly to be created page title.
If there's no configuration set irwi will create
a new instance of the configuration every time it is
queried. Instead save the instance the first time it's
queried.
That's an ugly no DRY solution, however it'll serve as an ugly wart
to rip out once rails2 is phased out.
The problem was that, from example from a test:

  WikiPage.new()

would make a new instance with content => nil. When invoking

  WikiPageController -> show

show.html.erb would call "@page.content( nil)", which would call
"wiki_show_attachments( nil )", which would call "nil.gsub", which
would bomb.

I think the optimal solution would be to set the default for the
content column to an empty string inside the migration, however
I did not succeed in implementing that (MySQL doesn't seem to allow
default values for "TEXT" type columns?).

And instead of peppering all methods with "foo( arg || '')" I though
setting it in before_save would be the second best solution.
* therefore drop mention of RoR 2.x problems from the README
* note that irwi is a RoR 3 plugin
Conflicts:
	lib/irwi/extensions/models/wiki_page_version.rb
Fixes: alno#19

See the commit itself for explanations of the
technical details.
It would trigger the following:
NOTE: Gem::Specification#has_rdoc= is deprecated with no replacement. It
will be removed on or after 2011-10-01.
@alno alno closed this May 11, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants