All config files described here are the same as my Mac OS's and all works
fine in Mac OS.
I got the same error in CentOS 6 x86_64:
Ident authentication failed for user 'abelard'
When running the following two commands:
1. rake db:create
2. psql -d testforabelard2 -U abelard -h loc
On 29 June 2015 at 21:27, Federicko wrote:
>> Hi All,
>
>
> I have moved everything over to the model as suggested. Check it out :p
>
> In the model, I created a Class method as well as the previous instance
> methods:
>
> class Article < ActiveRecord::Base
>
> def self.rank(id, rank)
> @this_ar
>
> Hi All,
I have moved everything over to the model as suggested. Check it out :p
In the model, I created a Class method as well as the previous instance
methods:
class Article < ActiveRecord::Base
def self.rank(id, rank)
@this_article = find(id)
if (rank == "up")
@next_article =
On 29 June 2015 at 18:54, William de Lima wrote:
> ..
> ActionView::Template::Error (undefined method `name' for nil:NilClass):
> 9: .pull-right
> 10: = submit_tag t('news.comment'), class: 'btn btn-primary'
> 11: .clearfix
> 12: - unless @item.comments.any?
> 13: #comment-comp
On 29 June 2015 at 19:42, Federicko wrote:
>> Hi Fred,
>
>
> I took your advice and tried to move the ranking logic over to the model.
> I've also consolidated the 2 actions.
>
> Here's what I got:
>
> In the controller:
>
> def rank
> @this_article = Article.find(params[:id])
>
> if (params[:
Hi, i'm pretty new to the Rail and Ruby and today I have a problem that I
have to solve (tl;dr: the expert ruby/rails has left our company and now
the newbies like me have to work on the projects that he left). So, let's
go straight:
I have an app running "normally", login function OK, but then
>
> Hi Fred,
I took your advice and tried to move the ranking logic over to the model.
I've also consolidated the 2 actions.
Here's what I got:
In the controller:
def rank
@this_article = Article.find(params[:id])
if (params[:rank] == 'up')
@next_article = Article.find_by(rank: @this_
My rails version is 4.2.2.
понедельник, 29 июня 2015 г., 20:00:27 UTC+3 пользователь Frederick Cheung
написал:
>
>
>
> On Monday, June 29, 2015, Мурыгин Антон >
> wrote:
>>
>> Now this is my model
>> class Business < ActiveRecord::Base
>> belongs_to :category, class_name: 'BusinessCategory', f
On Monday, June 29, 2015, Мурыгин Антон wrote:
>
> Now this is my model
> class Business < ActiveRecord::Base
> belongs_to :category, class_name: 'BusinessCategory', foreign_key:
> 'business_category_id'
>
> def category
> super || BusinessCategory.new(name: 'other')
> end
> end
>
> Why
Hi All,
Thank for the feedback.
Yeah, my next step is to consolidate the two actions together.
Good point on using POST instead of GET.
I will change the link_to helper.
As to using generators, I followed the tutorial and used generators for
creating the model and controllers for Articles and
Hey, but i did not rename it. My model hasn't methods called
busyness_category! I though AR generates them according to first argument
to 'belongs_to' method, rather than from foreign key name
понедельник, 29 июня 2015 г., 17:05:42 UTC+3 пользователь Dave Aronson
написал:
>
> On Monday, June 29
On Jun 29, 2015, at 8:18 AM, Padmahas Bn wrote:
> Hello Elizabeth McGurty that worked!!! (with little modification)
>
> Unique id for each modal generated fine but when calling that modal the the
> link_to didn't worked for me.
>
> I had to change this
> <%= link_to 'Show', "data-toggle" =>
On Monday, June 29, 2015, Мурыгин Антон wrote:
>
> class Business < ActiveRecord::Base
> belongs_to :category, class_name: 'BusinessCategory', foreign_key:
> 'business_category_id'
>
> def category
> super || BusinessCategory.new(name: 'other')
> end
> end
>
> Why it keeps throwing
>
>
Hi! I saw that i documentation here
- http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html
> Overriding generated methods
>
> Association methods are generated in a module that is included into the
> model class, which allows you to easily override with your own methods
Hello Elizabeth McGurty that worked!!! (with little modification)
Unique id for each modal generated fine but when calling that modal the the
link_to didn't worked for me.
I had to change this
<%= link_to 'Show', "data-toggle" => "modal", :class => 'btn
btn-default', :id => designation_dict.dd_id
On 29 June 2015 at 02:35, Katrina Swales wrote:
> Except even the one you linked pointed out, they WERE using the appropriate
> version, no one answered there either. Having the same problem myself
Don't understand your comment, the link I posted
(http://stackoverflow.com/questions/15537191/why-
16 matches
Mail list logo