Displaying 3 results from an estimated 3 matches for "hub_url".
Did you mean:
hub_ups
2010 Feb 09
2
undefined method `generate_token'
...ne: @invitation.sender = @user
i tied replacing @user with user, but still no use..
def create
@invitation = Invitation.new(params[:invitation])
@invitation.sender = @user
if @invitation.save
flash[:notice] = "Thanks - Invitation sent successfully."
redirect_to hub_url
else
render :action => ''new''
end
end
Any ideas why this wont decrement, and why this error is still
visible?
Many Thanks
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group...
2008 Jun 13
1
TypeError (can't modify frozen hash) - Production Mode Only
...e.recipients +
User.find_by_screen_name(hold[i]).get_user_id.to_s + ","
end
i+=1
end
end
@message.sender = find_user_and_messages.get_user_id.to_s
@message.save
flash[:notice] = "Message Sent!"
redirect_to hub_url and return
end
And as a secondary question, what is it that makes Rails behave
differently in production mode? And how do I go about avoiding surprise
behavior changes in future apps?
Thanks for your help in advance :)
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~--...
2010 Feb 10
16
nil object - can anyone help?
...ontroller < ApplicationController
def new
@invitation = Invitation.new
end
def create
@invitation = Invitation.new(params[:invitation])
@invitation.sender = user
if @invitation.save
flash[:notice] = "Thanks - Invitation sent successfully."
redirect_to hub_url
else
render :action => ''new''
end
end
end
And finally, the invite count, made visible to the user:
<% if @user.invitation_limit > 0 %>
<%= link_to ''Send invitation!'', new_invitation_path %>
<% end %>
THis pa...