You could use this gem to validate email addresses:
https://github.com/alexdunae/validates_email_format_of
You should be able to use it without needing AR, as well.
On Monday, April 15, 2013 6:16:13 PM UTC-4, Ruby-Forum.com User wrote:
>
> Gintautas S. wrote in post #1105766:
> > private/protect
Did you ask this question twice?
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, sen
On Sun, Apr 14, 2013 at 7:19 PM, wrote:
> I'm working on a project at the moment that has a rather unusual requirement
> and I'm hoping to get some advice on the best way to handle it or even some
> pointers to info that can help me build a solution.
>
> Ok, so this is what I need to do. The appl
It'd take less time that replying to this email.
You should always teach yourself with micro-experiments where possible IMHO.
Julian
On 15/04/2013, at 7:29 PM, and...@benjamin.dk wrote:
> I just dont have the time right now to try this. just wanted to see if there
> was any documentation the s
I guess I would probably use the one table, and use single table inheritance on
each of your "deploys" if I've understood what you mean correctly.
Each subclass model could "rename" fields according to its purpose... of
course, it all depends what you want to do with the metadata in the end.
Th
On 15/04/2013, at 1:27 AM, Peter Hicks wrote:
> All,
>
> I've been struggling to find a neat solution to this problem for a couple of
> weeks now, so I'd love to hear anyone else's opinion. I'm on Rails 3.2.13
> and Ruby 1.9.3-p392.
>
> I have a table of train schedules, and a table of tra
Gintautas S. wrote in post #1105766:
> private/protected methods? What r u trying to accomplish?
> --
> Pagarbiai,
> Gintautas
I want to validate data from a form - an email string and a
password string. The Rails do not have special validator classes for the
common use cases (emails, digits, ip'
private/protected methods? What r u trying to accomplish?
2013/4/16 Wins Lin
> There is no validation_context methods in API. But the instance has
> them:
> validation_context
> validation_context=
>
> What are these methods? What do they do? Where to get info about them?
>
> --
> Posted via ht
There is no validation_context methods in API. But the instance has
them:
validation_context
validation_context=
What are these methods? What do they do? Where to get info about them?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Googl
On 15 April 2013 21:22, Ryo Saeba wrote:
> I'm working on a videogame database, where users can signup, make game
> entries, rate and review them.
>
> I have the Models: User, Game, Rating and Review. Each user can give his
> own rating to any game, so I have to pass the game.id to the
> ratings.g
I'm working on a videogame database, where users can signup, make game
entries, rate and review them.
I have the Models: User, Game, Rating and Review. Each user can give his
own rating to any game, so I have to pass the game.id to the
ratings.game_id in order to associate ratings to certain games
On 15 April 2013 07:02, Brahmaji Venkat wrote:
> Hi All,
>
> I verey new to Ruby on Rails and am using windows xp 32 bit so any one can
> explain how to install ruby on rails in windows xp machine
My advise is not to use Windows, but use Linux (eg Ubuntu) or Mac
instead. If you absolutely must u
I am testing an engine which normally is mounted at /
NotifyMe::Application.routes.draw do
> mount_opro_oauth :controllers => {:oauth_client_apps =>
> 'oauth/client_apps'}
I am trying to mount it inside my existing backoffice namespace, is it
possible or not advisable
namespace :backo
On Mon, Apr 15, 2013 at 7:10 AM, Wins Lin wrote:
> tamouse mailing lists wrote in post #1105626:
>> On Sun, Apr 14, 2013 at 6:31 PM, tamouse mailing lists
>> wrote:
>> The Rails application is not brought up and shut down for every
>> request. It lives in a long running process.
>
> But how it ca
On Apr 15, 2013, at 8:10 AM, Wins Lin wrote:
> tamouse mailing lists wrote in post #1105626:
>> On Sun, Apr 14, 2013 at 6:31 PM, tamouse mailing lists
>> wrote:
>>
>> Never mind, I mis-read what you wrote.
>>
>> ZF I'm assuming is Zend Framework, aka, PHP? Which works nothing like
>> Rails, bt
tamouse mailing lists wrote in post #1105626:
> On Sun, Apr 14, 2013 at 6:31 PM, tamouse mailing lists
> wrote:
>
> Never mind, I mis-read what you wrote.
>
> ZF I'm assuming is Zend Framework, aka, PHP? Which works nothing like
> Rails, btw, as you are essentially restarting the entire applicatio
Ricardo Franco wrote in post #1105627:
> Maybe hardcoding them in a before_filter on ApplicationController...
>
> Which kind of variables are you talking about? Where do you plan to use
> them?
Yes, "before_filter" works just fine. Yet do not understand the details
how it works but it works :)
I
Thx, helped alot,
now I just:
In my model
attr_accessor :can_edit,:can_read
In my controller i set the can_edit and simply
respond_with(@scripts,:methods => [:can_edit,:can_view])
there is allso a as_json method you can put into the model and it overrides
to_json
so you do not need to write ",:m
I just dont have the time right now to try this. just wanted to see if
there was any documentation the subject because I couldnt find anything
that would tell me otherwise. but thanks for your help guys :)
On Friday, 12 April 2013 15:49:42 UTC+2, Julian wrote:
>
> AFAIK, using the array syntax,
On Monday, April 15, 2013 8:46:22 AM UTC+1, Filip Matošić wrote:
>
> As zou have suggested i have done this by adding
> attr_writer :can_edit,:can_read
> to my model
> and in my controller
> @scripts.each do |script|
> script[:can_edit]=can?(:edit,script)
> end
>
Having defined the accessor you
After some research i have added
attr_accessor :can_edit,:can_read
and now when I:
@scripts.each do |script|
script.can_edit=can?(:edit,script)
logger.debug("Script#{script.to_yaml}")
end
I do not get any warning, but in my log can_edit is not being printed,
allso if i json the result (@s
I'm using:
ruby 1.9.3p125 (2012-02-16 revision 34643)
rails 3.2.13
activesupport (3.2.11)
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to rubyonrails-ta
As zou have suggested i have done this by adding
attr_writer :can_edit,:can_read
to my model
and in my controller
@scripts.each do |script|
script[:can_edit]=can?(:edit,script)
end
but still getting the warning
guess I'm doing something wrong,
can you lead me in the right direction?
Dana ponedjel
On Monday, April 15, 2013 2:24:43 AM UTC+1, reag...@magian.com wrote:
> I'm working on a project at the moment that has a rather unusual requirement
> and I'm hoping to get some advice on the best way to handle it or even some
> pointers to info that can help me build a solution.
> Ok, so this is
On Monday, April 15, 2013 8:18:18 AM UTC+1, Filip Matošić wrote:
> Developing an application with angular I came into a problem. In my
> application I use cancan ( https://github.com/ryanb/cancan ).
> Now when showing data in a table i have to filter if the logged user can or
> cannot edit, view
On Sunday, April 14, 2013 5:13:11 PM UTC+1, Ruby-Forum.com User wrote:
> Is there a way to differ if params are set through form submit:
>
> or through url
>
> http://some.site/login?record[username]=user&record[password]=pwd
>
> In both cases they appear in controller as params[:record][:user]
Developing an application with angular I came into a problem. In my
application I use cancan ( https://github.com/ryanb/cancan ).
Now when showing data in a table i have to filter if the logged user can or
cannot edit, view etc, and thus disabling buttons that allow given
operations.
When using
I'm working on a project at the moment that has a rather unusual
requirement and I'm hoping to get some advice on the best way to handle it
or even some pointers to info that can help me build a solution.
Ok, so this is what I need to do. The application stores and manages
various types of me
I am a fairly new Rails developer, allso i begun to develop with angular as
it gives sense and clarity.
I have come up to a bit of a problem. I use CANCAN to manage user->role
wrights, but now it
gives me a very hard time to implement with angular in cases where i have a
repeater, as i need to
I'm working on a project at the moment that has a rather unusual
requirement and I'm hoping to get some advice on the best way to handle it
or even some pointers to info that can help me build a solution.
Ok, so this is what I need to do. The application stores and manages
various types of me
Hi All,
I verey new to Ruby on Rails and am using windows xp 32 bit so any one can
explain how to install ruby on rails in windows xp machine
Thanks
Venkat
On Saturday, April 13, 2013 1:52:10 PM UTC+5:30, Ruby-Forum.com User wrote:
> I am new to Ruby on Rails. I just installed the ROR taking
All,
I've been struggling to find a neat solution to this problem for a couple
of weeks now, so I'd love to hear anyone else's opinion. I'm on Rails
3.2.13 and Ruby 1.9.3-p392.
I have a table of train schedules, and a table of train schedule locations
with a has_many association. Each schedu
32 matches
Mail list logo