similar to: permalink_fu and Rails 2.2.2

Displaying 20 results from an estimated 7000 matches similar to: "permalink_fu and Rails 2.2.2"

2010 May 08
19
mb_chars.upcase and Ruby 1.9.2
I''m testing ruby-head through rvm but can''t get ''ação''.mb_chars.upcase == ''AÇÃO''... I get ''AçãO'' instead... This happens both for Rails 2.3.5 and Rails 3 beta 3... How can I get upcase to work correctly? Thanks in advance, Rodrigo. -- You received this message because you are subscribed to the Google Groups "Ruby
2010 May 10
6
feedback on a few ActiveSupport::Multibyte patches
Hi all, In response to Rodrigo Rosas''s message about mb_chars.upcase not giving the expected result on 1.9, I''ve done some work in a fork to make String#mb_chars always return an instance of a proxy class, both with Ruby 1.8 and Ruby 1.9. The end result of the patch is (hopefully) to make Rails'' multibyte functionality behave the same way in 1.8.7 and 1.9.x.
2009 Sep 28
7
Basic Rails problem with has_many nil values and permalinks
Hi, I have a model property with has_many. I find the property and then I need to find the name of the building or the neighborhood that the property belongs to. The property is not always assigned a building or neighborhood. This becomes a problem when createing permalinks with permalink_fu. has_permalink [:neighborhood_name, :building_name, :address] The neighborhood name and building name
2008 Sep 17
0
permalink_fu and classes with different primary_key than id?
Has anyone else had problems with this scenario? class Team < ActiveRecord::Base # Primary key self.primary_key = ''team_id'' has_many :players, :foreign_key => :team_id has_permalink :city, :param => true end I am getting all kinds of trouble - that goes away if I comment out the has_permalink declaration. With PermalinkFu: >> fs = Team.new =>
2009 Nov 13
3
Encoding::UTF_8 missing?
I''ve just done a fresh reinstall of OS X Snow Leopard on my mac, and I''m having all kinds of problems with Rails, but the latest problem has me stumped. Whenever I run rake db:seed to populate my database I hit the following error: ** Invoke db:seed (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:seed rake aborted! uninitialized constant
2008 May 14
3
New blog application post slugs
Hello. I''m creating my own RESTful blog app. I am wondering about creating post slugs. I think Wordpress creates a slug at post creation time and stores the string in the database, then uses that for URLs. I read about the acts_as_sluggable strategy (http:// agilewebdevelopment.com/plugins/acts_as_sluggable) but I don''t like having a number (the ID) in the URL. Any
2007 Jul 04
0
How to handle plugin dependency
I am trying to use the permalink_fu plugin together with the acts_as_taggable plugin so my tags will have both a full name (like COM/OLE) and a permalink suitable for use in a url (like com-ole) so I can have urls like /article/list/com-ole. The only snag I have hit is that when I add: has_permalink :name to the Tag class definition I get a "method missing" error. I was able to get
2010 Jun 09
1
[patch] fix bytesize in exception template; multibyte titleize
Hi all, I wanted to draw some attention to a couple of very small multibyte-related patches I believe should be included before Rails 3.0 RC1: * Use String#bytesize rather than String#length in exception templates: This is a simple case where string length is checked, but bytes is needed, so it breaks with string with multibyte chars.
2009 Aug 02
13
NoMethodError in User sessionsController#create - Authlogic
Hi, I''m beginner in rails, and I wanted to add to my simple application Authlogic. So I''ve watched http://railscasts.com/episodes/160-authlogic and step-by-step done everything. And almost everything works fine, except login in. After registration new user is automatically logged in, he can edit his profile, but after clicking logout and trying to login again I get error
2006 Mar 24
3
String manipulation
I need to make some nicenames from my post titles, like: - convert spaces to "-" - delete all the !,?,commas,.,;.:,* from the string How can I do? Sorry for the noob question... Oh, and another thing... How can I make permalink this way: Not .../blog/show/4 but .../category/nicename ? Thankyou. -- Posted via http://www.ruby-forum.com/.
2007 Jul 01
1
ActiveRecord: why does 'self.name' and 'name' both work?
I''m trying to figure out why both ''self.name'' and ''name'' work in a model class. For example: class Category < ActiveRecord::Base before_save :set_permalink private def set_permalink # both work self.permalink = name self.permalink = self.name # doesn''t work permalink = name @permalink = name @permalink =
2006 Nov 08
14
Increased memory requirements on 1.2
I just recently upgraded a rails app of mine to run on edge (and the 1-2-pre-release branch) and I noticed my fcgis required roughly 6-8MBs more memory after just a couple requests. For example, each fcgi on edge would start around 40MB and rise to ~46MBs after a couple requests. I downgraded my app back to 1.1.6 and each fcgi would start at around 33MBs and rise to ~38MB. As a result of the
2008 Dec 15
1
Unicode problem with mb_chars.index
Hello, I tried the following str ="ÄÄa__" assert str.mb_chars.is_utf8? assert str.is_utf8? # this is logical assert_equal 4, str.index("a", 4) # this is not logical. shouldn''t this be nil !? assert_equal 2, str.mb_chars.index("a", 4) Why is the last line failing? And how could I fix this? Regards, Peter. PS: I am using ruby 1.8.6 on linux with rails
2010 Jun 12
2
Redirections, Duplicate Content & Permalinks
Hi, Recently I''ve looked at trying to get a permalink system up to increase my site''s ranking in google (and to have nice looking URLs); however I''ve been very worried about google and duplicate content. I currently already have a "flaw" in my site, in which if you go to mysite.com/tutorials/ID it will bring you to the same place as
2008 Jun 18
4
How to use Chars in classes not derived from AR
Hi! I have a class that derives from nothing and is located in /models. I''m using " my string ".chars to manipulate strings that potentially contain special chars and replace them with an US-ASCII equivalent. It did work until yesterday. Now on a linux system "a".chars returns #<Enumerable::Enumerator:0xb74e3d6c> While it should return
2008 Apr 30
3
pretty url
I want to write a permalink like /year/month/day/title, code is as follows: self.permalink = "#{now.year}/#{now.month}/#{now.day}/#{title}" in the view, I use restful url post_path(@post). And in the html source code, the url is /posts/2008%2F4%2F30%2FTest You can see, the ''/'' is replaced by "%2F", which is not I expect. How not to replace the
2006 Apr 11
4
wrong number of arguments (2 for 1)
Hi, Im having trouble figuring out how to query my database in ruby and i''m hoping someone can help me out. I''d like to find all my departments that match a permalink passed from the url. The department must also match a particular category, also passed through the url. I have written the following code. But unfortunatley I get an error "wrong number of arguments (2 for
2006 Oct 02
22
Multi Byte Strings
Hey guys, We''ve been talking about the multi-byte patch and I think it''s time to get feedback from you guys on a possible way forward. We can include ActiveSupport::Multibyte with rails 1.2, and update all of the relevant helpers to use the String#chars proxy. This will mean that none of the action view helpers will mangle multibyte strings. Similarly, if any Strings are being
2006 Mar 25
1
routes mapping, subdomains and page-caching
Each of its own is no problem, but the combination of them is confusing my head ! I want to to map in routes.rb an url for an article which is identified by its permalink. The permalink is unique per subdomain. Has anybody done that and can post an example ? Should I do subdomain filtering in routes.rb so I can get page-cachabled URLs (and URL rewriting in Lighttpd form subdomain-urls to
2010 Jul 16
1
Rails 3 bug: undefined method `<=>' for class `ActiveSupport::Multibyte::Chars'
I''m getting the following bug when I try to run rake db:migrate in Rails 3 beta 4: $ rake db:migrate --trace (in C:/Users/Adam/Documents/Aptana Workspace/QuestionBank) default formats are encoded in ISO-8859-1 ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate == CreateUsers: migrating