Displaying 20 results from an estimated 25 matches for "screen_name".
2006 Feb 06
1
Check, and display, AIM status on rails page
...some simple helpers to show AIM status on a webpage.
I searched before coding it, and didn''t find anything similar.
Maybe that''s because it was so simple :)
These methods belong in a helper (such as app/helpers/application_helper.rb)
# begin AIM helper methods
def aim_signed_on(screen_name)
require ''net/http''
host = "big.oscar.aol.com"
path = "/#{screen_name}?on_url=online&off_url=offline"
return true if Net::HTTP.get_response(host, path).header[''location'']
== "online"
end
def display_aim_status(screen_na...
2010 Jul 31
4
Exception: can't dup Symbol
...ing to test a little piece of code I wrote, and I get the
following error:
Exception: can''t dup Symbol
It happens in the following line: try_to_login @valid_user, :remember_me
=> "1",
where the function try_to_login is:
def try_to_login(user, options = {})
user_hash = {:screen_name => user.screen_name, :password =>
user.password}
user_hash.merge!(options)
post :login, :user => :user_hash
assert logged_in?
end
I can''t isolate the error, can anybody throw some light on it?
Thanks a lot in advance!
--
Posted via http://www.ruby-forum.com/.
--
Y...
2006 Feb 22
15
Fixtures and Relationships
In my daily development, I migrate back and forth between versions, and
often do: rake load_fixtures...
... in order to populate my development database with fun data.
Now, with any HABTM relationship, there are failures, as there is no way to
say "which" fixtures to load first.
Within an actual functional or unit test case, you could simply load them in
the proper order, but
2008 May 09
4
Validating Uniqueness From Two Database Tables?
Well, I''m working on adding a new type of user (organization) to my
application, using a different database table than the standard User
table (in the end, I think it works out being easier to deal with than
creating another column in the original User table for account type).
However, I''m running into a user registration problem. I can register
both types of users fine,
2009 Sep 12
3
Cannot get my password to validate
Hello,
I am working through the railsspace tutorrial, and i''ve noticed that
the password validation is no longer working.
I can get screen_name and email to validate, but for some reason, the
password field is ignored...
here''s what i have so far:
within user.rb file
PASSWORD_MIN_LENGTH = 4
PASSWORD_MAX_LENGTH = 40
validates_length_of :password, :within => PASSWORD_RANGE
def validate
errors.add(:email, "must b...
2010 Jan 29
0
Cucumber: fill_in does not take label
In a Cucumber step, the following line will fill in the screen_name
text box:
fill_in "user[screen_name]", :with => user.screen_name
but the following line will not
fill_in "Screen name:", :with => user.screen_name
Here is the text of the form:
<div class="form_row">
<label for="screen_name">Screen n...
2010 Aug 14
10
Redirecting after logging in
Hey everybody,
I''m trying to make an example of a small networking site, and when I log
in a user, it should redirect and show his profile, but I get the
following error:
NoMethodError in User#index
Showing app/views/user/index.html.erb where line #5 raised:
undefined method `screen_name'' for nil:NilClass
Extracted source (around line #5):
2: Your basic information
3: </h2>
4: <ul>
5: <li>Screen name: <%= @user.screen_name %></li>
6: <li>Email: <%= @user.email %></li>
7: <li>Password: ********** </li>
8:...
2007 Dec 06
2
passing parameters through link_to
Is it possible to pass parameters through link_to that will be used by
the controller that link_to directs to? Specifically I have this
code:
<% for user in @users -%>
<%= link_to user.screen_name, {:action => "index", :controller =>
"users", :user_id => user.id } %>
<% end %>
Is it possible to use the parameter at the end of link_to(:user_id =>
user.id) to initialize a hash @user using the user_id?
This is the index action in the users controller:...
2011 Jan 24
11
Can't get login to work
...x
@title = "Temporary View"
@users = User1.find(:all)
end
def register
@title = "Register"
if request.post?
@user = User1.new(params[:user1])
if @user.save
session[:user_id] = @user.id
flash[:notice] = "User with login #{@user.screen_name} created!"
redirect_to :action => :index
end
end
end
end
def login
@title = "Title"
if request.post?
@user = User1.new(params[:user1])
user = User.find_by_screen_name_and_password(@user.screen_name,
@user.password)
if user...
2009 Apr 06
9
setup method in functional tests and instance variables
...oller::TestCase
fixtures :users
def setup
@controller = UserController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
@invalid_user = user(:invalid_user)
@valid_user = users(:valid_user)
end
def test_login_success
@valid_user.screen_name
end
When I run a test that tries to use the @valid_user variable I get the
following error.
NoMethodError: You have a nil object when you didn''t expect it!
The error occurred while evaluating nil.screen_name
It seems that this class isn''t storing the instance variables in memor...
2011 Jul 15
3
Ruby variable that embeds html tags
This seems very simple, but I can''t quite get it. Probably because I''m
just starting out with RoR.
My view has a slew of labels and text fields; many are "required":
<%= f.text_field :screen_name %> <span class="required_field">Required
field</span>
(The "required_field" class turns the text red and smaller.) I''d like
to not have everything between <span> and </span> sitting at the end
of every required line. I''d like instead...
2008 Jul 07
3
How to get a users screen name into a hidden field in a PostsController action?
Instead of the user entering a name, I want to pass their screen name
along with supplied :title and :content fields. here is what I''ve
got..
f.hidden_field :author, user.screen_name
here is the create method from Posts controller:
def create
@title = "Gravity"
@user = User.find(params[:id]) # this does not work, and I don''t
know why
if request.post? and params[:post]
if new
flash[:notice] = "Comment created"
re...
2010 Sep 19
4
Rails 2.3.8 - InvalidAuthenticityToken problem. URGENT!
...2.179 at 2010-09-19
12:21:09) [POST]
Parameters: {"commit"=>"OK", "authenticity_token"=>"/
Y0aZETCsMhyI3CkrZJK6O2NaLEoi+LRe8ZuDPWU9kc=",
"user"=>{"remember_me"=>"0", "password"=>"xxxxx",
"screen_name"=>"rune"}}
ActionController::InvalidAuthenticityToken
(ActionController::InvalidAuthenticityToken):
/home/heroku_rack/lib/static_assets.rb:9:in `call''
/home/heroku_rack/lib/last_access.rb:15:in `call''
/home/heroku_rack/lib/date_header.rb:14:in `call'...
2012 Apr 25
8
showing error (gsub) when switching from session to cookies
...ib/action_controller/cookies.rb:65:in
`[]=''
app/controllers/user_controller.rb:27:in `login''
user_controller
if request.get?
@user = User.new(:remember_me => cookies[:remember_me] || "0")
elsif param_posted?(:user)
@user = User.new(params[:user])
user = User.find_by_screen_name_and_password(@user.screen_name,
@user.password)
if user
user.login!(session)
if @user.remember_me == "1"
cookies[:remember_me] = { :value => "1",
:expires => 10.years.from_now }
user.authorization_token = user.id
user.save!
cookies[:authorization_token] = {
:value =>...
2006 Feb 21
0
How do you order fixtures within each yml file?
...:
id: 2
parent_id: 1
title: Child
I''m unable to make sense of how to actually do this in order to make
my dynamic fixtures
load in the order specified in the file.
I''m doing something like this for loading practice data:
--- users.yml ---
<% screen_names = [ ''foo'', ''bar'', ''foobar'' ] %>
<% screen_names.each do |name| %>
<%= name %>:
username: <%= name %>
hashed_password: 12345
salt: 12345
screen_name: <%= name %>
email_address: <%= name %>@gmail.com
<...
2018 Aug 28
2
IceCast - Is it still being developed?
...l being
actively developed?
Thank you,
Jason
--
_DEFINE YOUR DESTINY IN ULTIMA GENESIS: CALL OF THE AVATAR [1]! PLAY FOR
FREE TODAY._
FOLLOW US ON SOCIAL MEDIA!
[2] [3]
Links:
------
[1] https://titanx.games
[2] https://www.facebook.com/titanxgames/
[3] https://twitter.com/intent/user?screen_name=_TitanXGames
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xiph.org/pipermail/icecast/attachments/20180828/af3a8b4b/attachment.html>
2020 Jul 21
2
error al instalar glue
Hola,
Estoy haciendo un análisis de datos de Twitter y cuando intento correr esta
línea de código:
timelines %>%
dplyr::filter(created_at > "2020-01-01") %>%
dplyr::group_by(screen_name) %>%
ts_plot("days", trim = 1L) +
ggplot2::geom_point() +
ggplot2::labs(
title = "Tuits publicados por cada cuenta"
)
Me da el siguiente error
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck
= vI[[j]]) :
namespace ?glue? 1.3.1 is a...
2008 May 04
5
simple Routing Error
...t}
The URL is http://localhost:3000/user/register
Here is app/views/user/register.rhtml
<h2>Register</h2>
<% form_for :user do |form| %>
<fieldset>
<legend>Enter Your Details</legend>
<div class="form_row">
<label for="screen_name">Screen name:</label>
<%= form.text_field :screen_name %>
</div>
<div class="form_row">
<label for="email">Email:</label>
<%= form.text_field :email %>
</div>
<div class="form_row...
2018 Aug 29
2
IceCast - Is it still being developed?
...>> --
>>
>> /*Define your destiny in Ultima Genesis: Call of the Avatar
>> <https://titanx.games>! Play forfree today.*/
>>
>> * Follow us on social media!*
>>
>> <https://www.facebook.com/titanxgames/><https://twitter.com/intent/user?screen_name=_TitanXGames>
>>
>>
>> _______________________________________________
>> Icecast mailing list
>> Icecast at xiph.org <mailto:Icecast at xiph.org>
>> http://lists.xiph.org/mailman/listinfo/icecast
>
>
> __________________________________________...
2010 Oct 13
2
Routing Error
my register.html.erb file is :
<% form_for :user do |form| %>
<p><br />
<fieldset>
<legend>Enter Your Detail</legend>
Screen Name
<input type="text" name="screen_name" id="screen_name" size="20"
maxlength="40"/>
</p>
<p>
Email
<input type="text" name="email" id="email" size="30"
maxlength="50"/>
</p>
<p>Password
<input type="...