similar to: friendly_id / acts_as_referenced conflict?

Displaying 20 results from an estimated 900 matches similar to: "friendly_id / acts_as_referenced conflict?"

2011 Aug 04
3
#create tests fail when I add FriendlyId to my model
I am doing controller testing, and I can''t seem to get the create method test to pass when friendly_id is added to the mix. If I comment it out of the model, the tests all pass perfectly. The moment I add it back in, the error looks like this: 1) Error: test_create_valid(BrandsControllerTest): FriendlyId::BlankError: FriendlyId::BlankError
2009 Oct 05
4
Friendly_id and Rake problem.
Hello there, The plugin friendly_id (http://github.com/norman/friendly_id) has rake tasks that you can call. I''m using this plugin as a gem. I''m trying this: rake friendly_id:make_slugs MODEL=Post and it is rising this error: Don''t know how to build task ''friendly_id:make_slugs'' So the question is: how do I call a gem''s rake task? David
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 =
2012 Apr 27
1
Can't mass-assign protected attributes even if I use attr_accessible
Hi, I''m working on a Rails 3.2.2 application which has JSON APIs and I use a CLI client for inserting some data. It works fine except for the Author model. When I try to create a new post (Post belongs_to :author and Author has_many :posts) I get the following error : <h1> ActiveModel::MassAssignmentSecurity::Error in PostsController#create </h1>
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
2007 May 19
0
database outputting results twice per page (using pagination + sorthelper)
Each page is getting the same 5 db results listed twice, I cant seem to figure out why this is how the page look page 1: post 1 post 2 post 3 post 1 post 2 post 3 page 2: post 4 post 5 post 6 post 4 post 5 post 6 template ------------------------------ <%= render_collection_of_partials "upcoming", @albums_pages %> view (sorry its big) ------------------------------ <%
2015 Oct 07
0
brass and chert compiled / xapian port to Interix
Report by Eric Lindblad 06-10-2015 http://www.ericlindblad.blogspot.com cf: http://permalink.gmane.org/gmane.comp.search.xapian.general/9885 modifications allowing for brass and chert to compile on SFU Interix 3.5 (modified) [code change not performance critical] /xapian-core-1.2.21/backends/brass/brass_check.cc /xapian-core-1.2.21/backends/chert/chert_check.cc #include <climits> +
2012 Dec 20
0
[RFC PATCH v7 0/2] Btrfs: get/set label of a mounted file system
Hello, Per David''s comments upon v6, I missed a check up against the return value of btrfs_end_transaction for btrfs_ioctl_fs_setlabel(), it was fixed in this version. v7->v6: - take care of btrfs_end_transaction() in btrfs_ioctl_fs_setlabel() rather than keeping silence. The old versions can be found at: v6: http://www.spinics.net/lists/linux-btrfs/msg20922.html v5:
2008 Jan 02
0
why does rails keep prompting me for post?
Hi, was tryin to do a restful method to allow users to change password. This is what i did: 1) use restful authentication plugin. 2) use the code here http://www.railslodge.com/plugins/75-restful-authentication/documentations/1-change-password 3) realise that no1. i am using something funny like /v1/users/:permalink/ change_password and not just /change_password no2. i cant use html.erb for
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
2009 Dec 03
2
Dynamic Paths
Hey there, I''m in the muck of a major rails project, and need a bit of advice. Google isn''t much help in this case, so I came here. I''m trying to set up a URL structure as follows: url.com/username/blog/post_id where the user has_many posts and the post belongs_to user. I''m using the friendly_id plugin to enable easy lookup with the user''s username,
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
2015 Sep 30
1
brass and chert / xapian port to Interix
Report by Eric Lindblad 30-09-2015 http://www.ericlindblad.blogspot.com The xapian-core-1.2.21 'ambiguous overload' error on the files /backends/brass/brass_check.cc and /backends/chert/chert_check.cc appear to be resultant of a bug reported in gcc-3.3.4, which was fixed for 3.4.2 [Sept. 6, 2004] and 3.5. Bug 16854 - streams missing "long long" specializations on Tru64
2011 Mar 19
5
Routing issue
Hi! I have two models, artists and songs. I have this in my route file: resources :artists, :path => "ackord" do resources :songs end Which gives me urls like this (I''m using https://github.com/norman/friendly_id to create and manage slugs): example.com/ackord/artistname/songs/songname-id Now I want to remove the /songs part to get a url like this:
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
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
2011 Nov 21
1
uninitialized constant Sass::Script::Functions::EvaluationContext
Hi, after deploying a bunch of modifications to my web app... I get the error attached trying to load the page (see attached file). This is my environment.rb file: config.gem ''warden'' config.gem ''devise'', "~> 1.0.9" config.gem "role_model" config.gem "formtastic", :version => "~> 0.9.10" config.gem
2009 Apr 18
1
RESTful Routing: Getting names of resources out of paths
Hello - I''m trying to remain RESTful in a new application that I''m building, but I''m not sure how to get the routes that I want. I''m trying to avoid having resource names like "posts" and "comments" cluttering things up. For example, for a resource that I designate: GET example.com -> index GET example.com/1 -> show, id=1 GET
2006 Jul 18
2
A quick question on forms
I want to change parts of this form in order to use default values (with a disabled input). The problem is if I change it from text_field to text_field_tag that part of the form stops functioning. It seems like a silly question, but its been driving me crazy. Any help would help. Steve. <%= error_messages_for ''post'' %> <!--[form:post]--> <p><label
2006 Jul 22
0
RSS XML Generation Problem
I''m getting an interesting problem. I''d trying to generate an RSS document and then real it from outside of my app. Here''s what the view looks like. xml.instruct! :xml, :version=>"1.0" xml.rss(:version=>"2.0"){ xml.channel{ xml.title("mytitle") xml.link("http://www.myapp.com")